|
@@ -250,10 +250,10 @@ public class StatementOfAccountServiceImpl extends ServiceImpl<StatementOfAccoun
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<DocumentBySkuVo> getSkuDocument(List<Long> statementOfAccountIdList) {
|
|
|
+ public List<DocumentBySkuVo> getSkuDocument(List<Long> statementOfAccountIdList, Integer orderClassify) {
|
|
|
|
|
|
// 获取订单id列表
|
|
|
- List<Long> orderIdList = getOrderIdList(statementOfAccountIdList);
|
|
|
+ List<Long> orderIdList = getOrderIdList(statementOfAccountIdList, orderClassify);
|
|
|
|
|
|
if (orderIdList.isEmpty()) {
|
|
|
return Collections.emptyList();
|
|
@@ -315,10 +315,10 @@ public class StatementOfAccountServiceImpl extends ServiceImpl<StatementOfAccoun
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<DocumentByBomVo> getBomDocument(List<Long> statementOfAccountIdList) {
|
|
|
+ public List<DocumentByBomVo> getBomDocument(List<Long> statementOfAccountIdList, Integer orderClassify) {
|
|
|
|
|
|
// 获取订单id列表
|
|
|
- List<Long> orderIdList = getOrderIdList(statementOfAccountIdList);
|
|
|
+ List<Long> orderIdList = getOrderIdList(statementOfAccountIdList, orderClassify);
|
|
|
if (orderIdList.isEmpty()) {
|
|
|
return Collections.emptyList();
|
|
|
}
|
|
@@ -437,10 +437,12 @@ public class StatementOfAccountServiceImpl extends ServiceImpl<StatementOfAccoun
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<DocumentByOrderVo> getOrderDocument(List<Long> statementOfAccountId) {
|
|
|
+ public List<DocumentByOrderVo> getOrderDocument(List<Long> statementOfAccountId, Integer orderClassify) {
|
|
|
|
|
|
Assert.notEmpty(statementOfAccountId, "对账单id不能为空");
|
|
|
- List<OrderInfo> orderList = orderService.list(q -> q.in(OrderInfo::getStatementOfAccountId, statementOfAccountId));
|
|
|
+ List<OrderInfo> orderList = orderService.list(q -> q
|
|
|
+ .in(OrderInfo::getStatementOfAccountId, statementOfAccountId)
|
|
|
+ .eq(OrderInfo::getClassify, orderClassify));
|
|
|
|
|
|
return getOrderDocumentByOrderList(orderList);
|
|
|
}
|
|
@@ -508,7 +510,7 @@ public class StatementOfAccountServiceImpl extends ServiceImpl<StatementOfAccoun
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void export(Long id, int type) {
|
|
|
+ public void export(Long id, Integer orderClassify, int type) {
|
|
|
|
|
|
StatementOfAccount statementOfAccount = getById(id);
|
|
|
Assert.notNull(statementOfAccount, "没有找到对账单");
|
|
@@ -524,14 +526,14 @@ public class StatementOfAccountServiceImpl extends ServiceImpl<StatementOfAccoun
|
|
|
|
|
|
switch (type) {
|
|
|
case 1:
|
|
|
- statementOfAccountExportService.exportDocumentBySku(idList, departmentName, date, date);
|
|
|
+ statementOfAccountExportService.exportDocumentBySku(idList, departmentName, date, date, orderClassify);
|
|
|
break;
|
|
|
case 2:
|
|
|
- statementOfAccountExportService.exportDocumentByBom(idList, departmentName, date, date);
|
|
|
+ statementOfAccountExportService.exportDocumentByBom(idList, departmentName, date, date, orderClassify);
|
|
|
break;
|
|
|
case 3:
|
|
|
excelGenerateLogService.generateExcel(ExcelTypeEnum.STATISTICS_DOCUMENT_BY_ORDER,
|
|
|
- new DocumentByOrderExcelExportStrategy(idList, departmentName, date, date),
|
|
|
+ new DocumentByOrderExcelExportStrategy(idList, departmentName, date, date, orderClassify),
|
|
|
DateUtil.formatDate(new Date()) + " 对账单");
|
|
|
break;
|
|
|
default:
|
|
@@ -550,9 +552,10 @@ public class StatementOfAccountServiceImpl extends ServiceImpl<StatementOfAccoun
|
|
|
/**
|
|
|
* 根据对账单id获取对账订单id列表
|
|
|
*/
|
|
|
- private List<Long> getOrderIdList(List<Long> statementOfAccountIdList) {
|
|
|
+ private List<Long> getOrderIdList(List<Long> statementOfAccountIdList, Integer orderClassify) {
|
|
|
Assert.notEmpty(statementOfAccountIdList, "对账单id不能为空");
|
|
|
- List<OrderInfo> orderList = orderService.list(q -> q.in(OrderInfo::getStatementOfAccountId, statementOfAccountIdList));
|
|
|
+ List<OrderInfo> orderList = orderService.list(q -> q.in(OrderInfo::getStatementOfAccountId, statementOfAccountIdList)
|
|
|
+ .eq(OrderInfo::getClassify, orderClassify));
|
|
|
return orderList.stream().map(BaseIdPo::getId).collect(Collectors.toList());
|
|
|
}
|
|
|
|