zhangyuewww 2 éve
szülő
commit
54e5a54011

+ 3 - 2
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/ContractManagementInfoServiceImpl.java

@@ -1043,9 +1043,10 @@ public class ContractManagementInfoServiceImpl extends ServiceImpl<ContractManag
                 if (!"已完成".equals(contractManagementInfo1.getStatus()) && !"已结算".equals(contractManagementInfo1.getStatus())) {
                     throw new RuntimeException(contractManagementInfo1.getContractNo() + "尚未完成");
                 }
-                //入库单货源没有未付>0的情况
+                //收购入库判断 入库单货源没有未付>0的情况
                 List<WarehousingOrder> warehousingOrderList = warehousingOrderService.selectList(new EntityWrapper<WarehousingOrder>()
-                        .eq("contract_no", contractManagementInfo1.getContractNo()).gt("amount_not_payable", 0)
+                        .eq("contract_no", contractManagementInfo1.getContractNo())
+                        .eq("in_type","收购入库").gt("amount_not_payable", 0)
                         .eq("comp_id", contractManagementInfo1.getCompId()));
                 if (CollectionUtils.isNotEmpty(warehousingOrderList)) {
                     throw new RuntimeException(contractManagementInfo1.getContractNo() + "有尚未完成粮款结算");

+ 2 - 2
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/ExpenseInfoServiceImpl.java

@@ -637,8 +637,8 @@ public class ExpenseInfoServiceImpl extends ServiceImpl<ExpenseInfoMapper, Expen
         ExpenseInfo expenseInfo1 = this.selectById(expenseInfo.getId());
         //确认收款
         if ("0".equals(expenseInfo.getFlag())) {
-            expenseInfo.setStatusFlag(StatusEnum.COST_RECEIVED.getFlag());
-            expenseInfo.setStatus(StatusEnum.COST_RECEIVED.getName());
+            expenseInfo.setStatusFlag(StatusEnum.COMPLETED.getFlag());
+            expenseInfo.setStatus(StatusEnum.COMPLETED.getName());
             this.updateById(expenseInfo);
             ContractExpensesInfo contractExpensesInfo = new ContractExpensesInfo();
             contractExpensesInfo.setCompId(expenseInfo1.getCompId());