|
@@ -3071,7 +3071,13 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract>
|
|
|
//校验是否能出货(非特批校验,特批跳过),订单结算方式包含 出货前付清 才做金额校验
|
|
|
String settlementMethod = contract.getSettlementMethod();
|
|
|
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;
|
|
|
for (ContractOutboundRecords productDto : productDtoList) {
|
|
|
//跳过出库数量为空||出库数量为0
|
|
@@ -3130,7 +3136,9 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract>
|
|
|
boolean flag = true;
|
|
|
List<ContractProduct> list = contractProductService.list(q -> q.eq(ContractProduct::getQuantity, contractId));
|
|
|
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)) {
|
|
|
cor = new ArrayList<>();
|