Browse Source

feat(apChek): 更新明细应收应付金额统计方法

hejq 7 years ago
parent
commit
230108a038

+ 3 - 12
src/main/java/com/uas/platform/b2b/service/impl/ErpProdIODetailServiceImpl.java

@@ -172,24 +172,12 @@ public class ErpProdIODetailServiceImpl implements ErpProdIODetailService {
                 List<ErpProdIODetail> details = erpProdIo.getDetails().stream()
                     .filter(detail -> StringUtils.isEmpty(detail.getOrdercode())).collect(Collectors.toList());
                 collectOrders(group, details);
-                // 付款记录
-                List<ApCheckAmount> paymentList = countPayment(details);
-                group.setCheckAmountList(paymentList);
-                // 发货记录
-                List<ApCheckAmount> sendAmounts = countSendAmounts(details);
-                group.setSendAmountList(sendAmounts);
             } else {
                 group.setOrderCode(code);
                 // 筛选单号一样的明细
                 List<ErpProdIODetail> details = erpProdIo.getDetails().stream()
                     .filter(detail -> code.equals(detail.getOrdercode())).collect(Collectors.toList());
                 collectOrders(group, details);
-                // 付款记录
-                List<ApCheckAmount> paymentList = countPayment(details);
-                group.setCheckAmountList(paymentList);
-                // 发货记录
-                List<ApCheckAmount> sendAmounts = countSendAmounts(details);
-                group.setSendAmountList(sendAmounts);
             }
             groupList.add(group);
         });
@@ -306,6 +294,9 @@ public class ErpProdIODetailServiceImpl implements ErpProdIODetailService {
             }
             group.setCheckAmountList(amounts);
         });
+        // 发货记录
+        List<ApCheckAmount> sendAmounts = countSendAmounts(details);
+        group.setSendAmountList(sendAmounts);
         // 按照是否已对账排序
         group.getDetails().sort(comparing(ErpProdIODetail::getHaveChecked));
     }