zhangyuewww 2 years ago
parent
commit
c0af617b1e

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

@@ -369,8 +369,8 @@ public class ExpenseInfoServiceImpl extends ServiceImpl<ExpenseInfoMapper, Expen
         else {
             expenseInfo.setStatusFlag(StatusEnum.COST_PAYMENT.getFlag());
             expenseInfo.setStatus(StatusEnum.COST_PAYMENT.getName());
-            //库点费用未分配金额默认等于费用金额
-            if (!"1".equals(expenseInfo.getCostType()) && !"1".equals(expenseInfo.getExpensesPurpose())) {
+            //合同非粮款和库点费用未分配金额默认等于费用金额
+            if (("3".equals(expenseInfo.getCostType()) && "1".equals(expenseInfo.getExpensesPurpose()))||"3".equals(expenseInfo.getExpensesPurpose())) {
                 expenseInfo.setUnallocatedAmount(expenseInfo.getAmountMoney());
             }
             //合同粮款校验

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

@@ -298,7 +298,8 @@ public class WarehousingOrderServiceImpl extends ServiceImpl<WarehousingOrderMap
                         }
                     }
                     List<ExpenseAllocationInfo> expenseAllocationInfos = expenseAllocationInfoService.selectList(new EntityWrapper<ExpenseAllocationInfo>()
-                            .eq("order_id", warehousingOrder2.getId()));
+                            .eq("order_id", warehousingOrder2.getId())
+                            .ne("status","已驳回"));
                     if (!CollectionUtils.isEmpty(expenseAllocationInfos)) {
                         for (ExpenseAllocationInfo expenseAllocationInfo : expenseAllocationInfos) {
                             ExpenseInfo expenseInfo = expenseInfoService.selectById(expenseAllocationInfo.getInfoId());