Browse Source

问题处理

yzc 1 year ago
parent
commit
aaef6141d4

+ 10 - 2
hx-sale/src/main/java/com/fjhx/sale/service/contract/impl/ContractServiceImpl.java

@@ -3071,7 +3071,13 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract>
         //校验是否能出货(非特批校验,特批跳过),订单结算方式包含 出货前付清 才做金额校验
         //校验是否能出货(非特批校验,特批跳过),订单结算方式包含 出货前付清 才做金额校验
         String settlementMethod = contract.getSettlementMethod();
         String settlementMethod = contract.getSettlementMethod();
         Map<String, String> dictMap = DictUtils.getDictMap("settlement_way");
         Map<String, String> dictMap = DictUtils.getDictMap("settlement_way");
-        if (ObjectUtil.isNotEmpty(settlementMethod) && ("出货前付清".contains(settlementMethod) || "出货前付清".contains(dictMap.getOrDefault(settlementMethod, "")))) {
+
+        //排空
+        if (ObjectUtil.isEmpty(settlementMethod)) {
+            settlementMethod = "";
+        }
+        String val = settlementMethod + "_" + dictMap.getOrDefault(settlementMethod, "");
+        if (val.contains("出货前付清") || val.contains("全款")) {
             BigDecimal totalAmount = BigDecimal.ZERO;
             BigDecimal totalAmount = BigDecimal.ZERO;
             for (ContractOutboundRecords productDto : productDtoList) {
             for (ContractOutboundRecords productDto : productDtoList) {
                 //跳过出库数量为空||出库数量为0
                 //跳过出库数量为空||出库数量为0
@@ -3130,7 +3136,9 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract>
         boolean flag = true;
         boolean flag = true;
         List<ContractProduct> list = contractProductService.list(q -> q.eq(ContractProduct::getQuantity, contractId));
         List<ContractProduct> list = contractProductService.list(q -> q.eq(ContractProduct::getQuantity, contractId));
         for (ContractProduct contractProduct : list) {
         for (ContractProduct contractProduct : list) {
-            List<ContractOutboundRecordsVo> cor = contractOutboundRecordsService.getList(IWrapper.getWrapper().eq("cor", ContractOutboundRecords::getContractProductId, contractProduct.getId()).in("coi.status", 30, 60)
+            List<ContractOutboundRecordsVo> cor = contractOutboundRecordsService.getList(IWrapper.getWrapper()
+                    .eq("cor", ContractOutboundRecords::getContractProductId, contractProduct.getId())
+                    .in("coi.status", 30, 60)
             );
             );
             if (ObjectUtil.isEmpty(cor)) {
             if (ObjectUtil.isEmpty(cor)) {
                 cor = new ArrayList<>();
                 cor = new ArrayList<>();