Forráskód Böngészése

Merge branch 'master' of http://47.100.3.209:3000/gdc/yiliangyiyun

ccj 1 éve
szülő
commit
9f645404e1

+ 1 - 1
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/ExpenseInfo.java

@@ -158,7 +158,7 @@ public class ExpenseInfo extends BaseModel<ExpenseInfo> {
      */
     private String expensesPurpose;
     /**
-     * 是否自动分配(1不自动分配3仓储费自动分配5燃料费自动分配)
+     * 是否自动分配(1不自动分配5燃料费自动分配)
      */
     private String autoAssign;
     /**

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

@@ -115,7 +115,7 @@ public class CargoTitleDetailsServiceImpl extends ServiceImpl<CargoTitleDetailsM
                 if (weight >= warehousingOrder.getSurplusWeight()) {
                     weight = weight - warehousingOrder.getSurplusWeight();
                     //转出重量
-                    warehousingOrder.setTransferOutWeight(warehousingOrder.getSurplusWeight());
+                    warehousingOrder.setTransferOutWeight(warehousingOrder.getTransferOutWeight()+warehousingOrder.getSurplusWeight());
                     warehousingOrder.setSurplusWeight(0d);
                     warehousingOrder.setTransferOutNo(transferOutNo);
                     if ("1".equals(cargoTitleDetails.getRedeemFlag())) {
@@ -125,7 +125,7 @@ public class CargoTitleDetailsServiceImpl extends ServiceImpl<CargoTitleDetailsM
                 } else if (weight > 0) {
                     Double weightTmp = weight - warehousingOrder.getSurplusWeight();
                     //部分转出
-                    warehousingOrder.setTransferOutWeight(weight);
+                    warehousingOrder.setTransferOutWeight(warehousingOrder.getTransferOutWeight()+weight);
                     warehousingOrder.setSurplusWeight(warehousingOrder.getSurplusWeight()-weight);
                     warehousingOrder.setTransferOutNo(transferOutNo);
                     if ("1".equals(cargoTitleDetails.getRedeemFlag())) {
@@ -233,6 +233,7 @@ public class CargoTitleDetailsServiceImpl extends ServiceImpl<CargoTitleDetailsM
         pageView.put("startDate",cargoTitleDetails.getStartDate());
         pageView.put("endDate",cargoTitleDetails.getEndDate());
         pageView.put("searchKeyWord",cargoTitleDetails.getSearchKeyWord());
+        pageView.put("agent",cargoTitleDetails.getAgent());
         pageView.put("searchType", cargoTitleDetails.getSearchType());
         pageView.put("pageSize",cargoTitleDetails.getPageSize());
         pageView.put("currentPage",cargoTitleDetails.getCurrentPage());

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

@@ -24,6 +24,7 @@ import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import java.text.SimpleDateFormat;
 import java.util.*;
@@ -58,6 +59,7 @@ public class FuelFillingInfoServiceImpl extends ServiceImpl<FuelFillingInfoMappe
      * @return
      */
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String addFilling(FuelFillingInfo fuelFillingInfo) {
         if("1".equals(fuelFillingInfo.getFlag())){
             //新增主键id

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

@@ -820,39 +820,39 @@ public class WarehousingOrderServiceImpl extends ServiceImpl<WarehousingOrderMap
 //                    .eq("function_type", "2"));
 //            if (!CollectionUtils.isEmpty(enabledInfoList)) {
 //                for (EnabledInfo enabledInfo : enabledInfoList) {
-            Double value=0d;
-            //查剩余重量>0的入库单
-            List<WarehousingOrder> warehousingOrderList = this.selectList(new EntityWrapper<WarehousingOrder>()
-//                            .eq("comp_id", enabledInfo.getCompId())
-                    .ne("temporary_flag", "1")
-                    .gt("surplus_weight", 0));
-            if (!CollectionUtils.isEmpty(warehousingOrderList)) {
-                for (WarehousingOrder warehousingOrder : warehousingOrderList) {
-                    Double distributionMoney = 0d;
-                    List<ExpenseAllocationInfo> expenseAllocationInfoList1 = expenseAllocationInfoService.selectList(new EntityWrapper<ExpenseAllocationInfo>()
-                            .eq("order_id", warehousingOrder.getId())
-                            .ne("status", "已驳回"));
-                    if (!CollectionUtils.isEmpty(expenseAllocationInfoList1)) {
-                        distributionMoney = expenseAllocationInfoList1.stream().mapToDouble(ExpenseAllocationInfo::getDistributionMoney).sum();
-                    }
-                    distributionMoney = distributionMoney + warehousingOrder.getInterest() + warehousingOrder.getStorageFee();
-                    if (distributionMoney / warehousingOrder.getInWarehouseWeight() < 100) {
-                        WarehouseBaseInfo warehouseBaseInfo=warehouseBaseInfoService.selectById(warehousingOrder.getBaseId());
-                        //取当前入库单仓库利率
-                        if (warehouseBaseInfo.getInterestRate()!=null){
-                            value=warehouseBaseInfo.getInterestRate();
-                        }
-                        if (warehousingOrder.getSurplusWeight() > 1) {
-                            warehousingOrder.setInterest(warehousingOrder.getInterest() + (warehousingOrder.getAvgCost() * value / 30) * warehousingOrder.getSurplusWeight());
-                            warehousingOrder.setAvgCost(warehousingOrder.getAvgCost() + warehousingOrder.getAvgCost() * value / 30);
-                        } else {
-                            warehousingOrder.setInterest(warehousingOrder.getInterest() + (warehousingOrder.getAvgCost() * value * warehousingOrder.getSurplusWeight() / 30) * warehousingOrder.getSurplusWeight());
-                            warehousingOrder.setAvgCost(warehousingOrder.getAvgCost() + warehousingOrder.getAvgCost() * value * warehousingOrder.getSurplusWeight() / 30);
-                        }
-                    }
-                    this.updateById(warehousingOrder);
-                }
-            }
+//            Double value=0d;
+//            //查剩余重量>0的入库单
+//            List<WarehousingOrder> warehousingOrderList = this.selectList(new EntityWrapper<WarehousingOrder>()
+////                            .eq("comp_id", enabledInfo.getCompId())
+//                    .ne("temporary_flag", "1")
+//                    .gt("surplus_weight", 0));
+//            if (!CollectionUtils.isEmpty(warehousingOrderList)) {
+//                for (WarehousingOrder warehousingOrder : warehousingOrderList) {
+//                    Double distributionMoney = 0d;
+//                    List<ExpenseAllocationInfo> expenseAllocationInfoList1 = expenseAllocationInfoService.selectList(new EntityWrapper<ExpenseAllocationInfo>()
+//                            .eq("order_id", warehousingOrder.getId())
+//                            .ne("status", "已驳回"));
+//                    if (!CollectionUtils.isEmpty(expenseAllocationInfoList1)) {
+//                        distributionMoney = expenseAllocationInfoList1.stream().mapToDouble(ExpenseAllocationInfo::getDistributionMoney).sum();
+//                    }
+//                    distributionMoney = distributionMoney + warehousingOrder.getInterest() + warehousingOrder.getStorageFee();
+//                    if (distributionMoney / warehousingOrder.getInWarehouseWeight() < 100) {
+//                        WarehouseBaseInfo warehouseBaseInfo=warehouseBaseInfoService.selectById(warehousingOrder.getBaseId());
+//                        //取当前入库单仓库利率
+//                        if (warehouseBaseInfo.getInterestRate()!=null){
+//                            value=warehouseBaseInfo.getInterestRate();
+//                        }
+//                        if (warehousingOrder.getSurplusWeight() > 1) {
+//                            warehousingOrder.setInterest(warehousingOrder.getInterest() + (warehousingOrder.getAvgCost() * value / 30) * warehousingOrder.getSurplusWeight());
+//                            warehousingOrder.setAvgCost(warehousingOrder.getAvgCost() + warehousingOrder.getAvgCost() * value / 30);
+//                        } else {
+//                            warehousingOrder.setInterest(warehousingOrder.getInterest() + (warehousingOrder.getAvgCost() * value * warehousingOrder.getSurplusWeight() / 30) * warehousingOrder.getSurplusWeight());
+//                            warehousingOrder.setAvgCost(warehousingOrder.getAvgCost() + warehousingOrder.getAvgCost() * value * warehousingOrder.getSurplusWeight() / 30);
+//                        }
+//                    }
+//                    this.updateById(warehousingOrder);
+//                }
+//            }
 //                }
 //            }
             return "OK";
@@ -1292,39 +1292,39 @@ public class WarehousingOrderServiceImpl extends ServiceImpl<WarehousingOrderMap
             }
             //利率对成本的影响
             //查入库单利率
-            List<EnabledInfo> enabledInfoList = enabledInfoService.selectList(new EntityWrapper<EnabledInfo>()
-                    .eq("function_type", "2"));
-            if (!CollectionUtils.isEmpty(enabledInfoList)) {
-                for (EnabledInfo enabledInfo : enabledInfoList) {
-                    //查剩余重量>0的入库单
-                    List<WarehousingOrder> warehousingOrderList = this.selectList(new EntityWrapper<WarehousingOrder>()
-                            .eq("comp_id", enabledInfo.getCompId())
-//                            .eq("warehouse_name","甘南宏旗库")
-                            .gt("surplus_weight", 0));
-                    if (!CollectionUtils.isEmpty(warehousingOrderList)) {
-                        for (WarehousingOrder warehousingOrder : warehousingOrderList) {
-                            Double distributionMoney = 0d;
-                            List<ExpenseAllocationInfo> expenseAllocationInfoList1 = expenseAllocationInfoService.selectList(new EntityWrapper<ExpenseAllocationInfo>()
-                                    .eq("order_id", warehousingOrder.getId())
-                                    .ne("status", "已驳回"));
-                            if (!CollectionUtils.isEmpty(expenseAllocationInfoList1)) {
-                                distributionMoney = expenseAllocationInfoList1.stream().mapToDouble(ExpenseAllocationInfo::getDistributionMoney).sum();
-                            }
-                            distributionMoney = distributionMoney + warehousingOrder.getInterest() + warehousingOrder.getStorageFee();
-                            if (distributionMoney / warehousingOrder.getInWarehouseWeight() < 100) {
-                                if (warehousingOrder.getSurplusWeight() > 1) {
-                                    warehousingOrder.setInterest(warehousingOrder.getInterest() + (warehousingOrder.getAvgCost() * enabledInfo.getValue() / 30) * warehousingOrder.getSurplusWeight());
-                                    warehousingOrder.setAvgCost(warehousingOrder.getAvgCost() + warehousingOrder.getAvgCost() * enabledInfo.getValue() / 30);
-                                } else {
-                                    warehousingOrder.setInterest(warehousingOrder.getInterest() + (warehousingOrder.getAvgCost() * enabledInfo.getValue() * warehousingOrder.getSurplusWeight() / 30) * warehousingOrder.getSurplusWeight());
-                                    warehousingOrder.setAvgCost(warehousingOrder.getAvgCost() + warehousingOrder.getAvgCost() * enabledInfo.getValue() * warehousingOrder.getSurplusWeight() / 30);
-                                }
-                            }
-                            this.updateById(warehousingOrder);
-                        }
-                    }
-                }
-            }
+//            List<EnabledInfo> enabledInfoList = enabledInfoService.selectList(new EntityWrapper<EnabledInfo>()
+//                    .eq("function_type", "2"));
+//            if (!CollectionUtils.isEmpty(enabledInfoList)) {
+//                for (EnabledInfo enabledInfo : enabledInfoList) {
+//                    //查剩余重量>0的入库单
+//                    List<WarehousingOrder> warehousingOrderList = this.selectList(new EntityWrapper<WarehousingOrder>()
+//                            .eq("comp_id", enabledInfo.getCompId())
+////                            .eq("warehouse_name","甘南宏旗库")
+//                            .gt("surplus_weight", 0));
+//                    if (!CollectionUtils.isEmpty(warehousingOrderList)) {
+//                        for (WarehousingOrder warehousingOrder : warehousingOrderList) {
+//                            Double distributionMoney = 0d;
+//                            List<ExpenseAllocationInfo> expenseAllocationInfoList1 = expenseAllocationInfoService.selectList(new EntityWrapper<ExpenseAllocationInfo>()
+//                                    .eq("order_id", warehousingOrder.getId())
+//                                    .ne("status", "已驳回"));
+//                            if (!CollectionUtils.isEmpty(expenseAllocationInfoList1)) {
+//                                distributionMoney = expenseAllocationInfoList1.stream().mapToDouble(ExpenseAllocationInfo::getDistributionMoney).sum();
+//                            }
+//                            distributionMoney = distributionMoney + warehousingOrder.getInterest() + warehousingOrder.getStorageFee();
+//                            if (distributionMoney / warehousingOrder.getInWarehouseWeight() < 100) {
+//                                if (warehousingOrder.getSurplusWeight() > 1) {
+//                                    warehousingOrder.setInterest(warehousingOrder.getInterest() + (warehousingOrder.getAvgCost() * enabledInfo.getValue() / 30) * warehousingOrder.getSurplusWeight());
+//                                    warehousingOrder.setAvgCost(warehousingOrder.getAvgCost() + warehousingOrder.getAvgCost() * enabledInfo.getValue() / 30);
+//                                } else {
+//                                    warehousingOrder.setInterest(warehousingOrder.getInterest() + (warehousingOrder.getAvgCost() * enabledInfo.getValue() * warehousingOrder.getSurplusWeight() / 30) * warehousingOrder.getSurplusWeight());
+//                                    warehousingOrder.setAvgCost(warehousingOrder.getAvgCost() + warehousingOrder.getAvgCost() * enabledInfo.getValue() * warehousingOrder.getSurplusWeight() / 30);
+//                                }
+//                            }
+//                            this.updateById(warehousingOrder);
+//                        }
+//                    }
+//                }
+//            }
             return "OK";
         }
         return "NG";
@@ -2795,103 +2795,103 @@ public class WarehousingOrderServiceImpl extends ServiceImpl<WarehousingOrderMap
      * @param
      * @return
      */
-    @Transactional(rollbackFor = Exception.class)
-//    @Scheduled(cron = "30 30 16 * * ?")
-    public String editAvgCostInfo() {
-        //获取当天16:00
-        SimpleDateFormat now = new SimpleDateFormat("yyyy-MM-dd 16:00:00");
-        Calendar c = Calendar.getInstance();
-        c.setTime(new Date());
-        c.add(Calendar.DATE, 0);
-        String theDay = now.format(c.getTime());
-        Map<String, Object> pageView = new HashMap<>();
-        pageView.put("theDay", theDay);
-        List<WarehousingOrder> dataList = baseMapper.getWarehousingCostByCondition(pageView);
-        if (!CollectionUtils.isEmpty(dataList)) {
-            for (WarehousingOrder warehousingOrder1 : dataList) {
-                //定义未分配金额总和
-                Double totalUnallocatedAmount = 0d;
-                //定义当天分摊仓储费总和
-                Double inTarDayTotal = 0d;
-                //定义入库单剩余库存总量
-                Double totalSurplusWeight = 0d;
-                //查询仓储费用
-                List<ExpenseInfo> expenseInfoList = expenseInfoService.selectList(new EntityWrapper<ExpenseInfo>()
-                        .eq("warehouse_id", warehousingOrder1.getBaseId())
-                        .eq("delete_flag", "0")
-                        .eq("storage_fee_flag", "1")
-                        .eq("comp_id", warehousingOrder1.getCompId())
-                        .eq("status_flag", "4")
-                        .gt("unallocated_amount", 0d));
-                if (!CollectionUtils.isEmpty(expenseInfoList)) {
-                    for (int i = 0; i < expenseInfoList.size(); i++) {
-                        totalUnallocatedAmount += expenseInfoList.get(i).getUnallocatedAmount();
-                    }
-                }
-                //查询分摊金额
-                EnabledInfo enabledInfo = enabledInfoService.selectOne(new EntityWrapper<EnabledInfo>()
-                        .eq("comp_id", warehousingOrder1.getCompId())
-                        .eq("function_type", "3")
-                        .eq("delete_flag", "0"));
-                //查询入库单
-                List<WarehousingOrder> warehousingOrderList = selectList(new EntityWrapper<WarehousingOrder>()
-                        .eq("base_id", warehousingOrder1.getBaseId())
-                        .eq("delete_flag", "0")
-                        .eq("comp_id", warehousingOrder1.getCompId())
-                        .gt("surplus_weight", 0d)
-                        .ne("status", "待付款"));
-                if (!CollectionUtils.isEmpty(warehousingOrderList)) {
-                    for (int i = 0; i < warehousingOrderList.size(); i++) {
-                        totalSurplusWeight += warehousingOrderList.get(i).getSurplusWeight();
-                    }
-                }
-                Double distributionMoney = 0d;
-                List<ExpenseAllocationInfo> expenseAllocationInfoList1 = expenseAllocationInfoService.selectList(new EntityWrapper<ExpenseAllocationInfo>()
-                        .eq("order_id", warehousingOrder1.getId())
-                        .ne("status", "已驳回"));
-                if (!CollectionUtils.isEmpty(expenseAllocationInfoList1)) {
-                    distributionMoney = expenseAllocationInfoList1.stream().mapToDouble(ExpenseAllocationInfo::getDistributionMoney).sum();
-                }
-                distributionMoney = distributionMoney + warehousingOrder1.getInterest() + warehousingOrder1.getStorageFee();
-                if (distributionMoney / warehousingOrder1.getInWarehouseWeight() < 100) {
-                    //计算当天分摊仓储费总和
-                    inTarDayTotal = totalSurplusWeight * enabledInfo.getValue();
-                    for (ExpenseInfo expenseInfo1 : expenseInfoList) {
-                        ExpenseInfo expenseInfo = expenseInfoService.selectById(expenseInfo1.getId());
-
-                        //判断,未分配的仓储费总和 > 当天分摊仓储费总和
-                        if (totalUnallocatedAmount > inTarDayTotal) {
-
-                            Double totalUnallocatedAmount1 = totalUnallocatedAmount - inTarDayTotal;
-                            //修改平均成本:分摊平均成本+分摊金额
-                            warehousingOrder1.setAvgCost(warehousingOrder1.getAvgCost() + enabledInfo.getValue());
-                            warehousingOrder1.setStorageFee(warehousingOrder1.getStorageFee() + warehousingOrder1.getSurplusWeight() * enabledInfo.getValue());
-                            this.updateById(warehousingOrder1);
-                            //修改仓储费用未分配金额
-                            if (expenseInfo1.getUnallocatedAmount() > inTarDayTotal) {
-                                expenseInfo.setUnallocatedAmount(expenseInfo1.getUnallocatedAmount() - inTarDayTotal);
-                            } else {
-                                expenseInfo.setUnallocatedAmount(0d);
-                            }
-                            expenseInfoService.updateById(expenseInfo);
-                            totalUnallocatedAmount = totalUnallocatedAmount1;
-                        } else {
-                            //修改平均成本:分摊前平均成本+未分配金额总和÷入库单剩余库存总量
-                            warehousingOrder1.setAvgCost(warehousingOrder1.getAvgCost() + totalUnallocatedAmount / totalSurplusWeight);
-                            warehousingOrder1.setStorageFee(warehousingOrder1.getStorageFee() + warehousingOrder1.getSurplusWeight() * (totalUnallocatedAmount / totalSurplusWeight));
-                            this.updateById(warehousingOrder1);
-                            //修改仓储费用未分配金额
-                            expenseInfo.setUnallocatedAmount(0d);
-                            expenseInfoService.updateById(expenseInfo);
-
-                        }
-                    }
-                }
-            }
-            cacheComponent.delPrefixKey(Const.ADMIN_REPEATLIST,dataList.get(0).getCompId());
-        }
-        return "OK";
-    }
+//    @Transactional(rollbackFor = Exception.class)
+////    @Scheduled(cron = "30 30 16 * * ?")
+//    public String editAvgCostInfo() {
+//        //获取当天16:00
+//        SimpleDateFormat now = new SimpleDateFormat("yyyy-MM-dd 16:00:00");
+//        Calendar c = Calendar.getInstance();
+//        c.setTime(new Date());
+//        c.add(Calendar.DATE, 0);
+//        String theDay = now.format(c.getTime());
+//        Map<String, Object> pageView = new HashMap<>();
+//        pageView.put("theDay", theDay);
+//        List<WarehousingOrder> dataList = baseMapper.getWarehousingCostByCondition(pageView);
+//        if (!CollectionUtils.isEmpty(dataList)) {
+//            for (WarehousingOrder warehousingOrder1 : dataList) {
+//                //定义未分配金额总和
+//                Double totalUnallocatedAmount = 0d;
+//                //定义当天分摊仓储费总和
+//                Double inTarDayTotal = 0d;
+//                //定义入库单剩余库存总量
+//                Double totalSurplusWeight = 0d;
+//                //查询仓储费用
+//                List<ExpenseInfo> expenseInfoList = expenseInfoService.selectList(new EntityWrapper<ExpenseInfo>()
+//                        .eq("warehouse_id", warehousingOrder1.getBaseId())
+//                        .eq("delete_flag", "0")
+//                        .eq("storage_fee_flag", "1")
+//                        .eq("comp_id", warehousingOrder1.getCompId())
+//                        .eq("status_flag", "4")
+//                        .gt("unallocated_amount", 0d));
+//                if (!CollectionUtils.isEmpty(expenseInfoList)) {
+//                    for (int i = 0; i < expenseInfoList.size(); i++) {
+//                        totalUnallocatedAmount += expenseInfoList.get(i).getUnallocatedAmount();
+//                    }
+//                }
+//                //查询分摊金额
+//                EnabledInfo enabledInfo = enabledInfoService.selectOne(new EntityWrapper<EnabledInfo>()
+//                        .eq("comp_id", warehousingOrder1.getCompId())
+//                        .eq("function_type", "3")
+//                        .eq("delete_flag", "0"));
+//                //查询入库单
+//                List<WarehousingOrder> warehousingOrderList = selectList(new EntityWrapper<WarehousingOrder>()
+//                        .eq("base_id", warehousingOrder1.getBaseId())
+//                        .eq("delete_flag", "0")
+//                        .eq("comp_id", warehousingOrder1.getCompId())
+//                        .gt("surplus_weight", 0d)
+//                        .ne("status", "待付款"));
+//                if (!CollectionUtils.isEmpty(warehousingOrderList)) {
+//                    for (int i = 0; i < warehousingOrderList.size(); i++) {
+//                        totalSurplusWeight += warehousingOrderList.get(i).getSurplusWeight();
+//                    }
+//                }
+//                Double distributionMoney = 0d;
+//                List<ExpenseAllocationInfo> expenseAllocationInfoList1 = expenseAllocationInfoService.selectList(new EntityWrapper<ExpenseAllocationInfo>()
+//                        .eq("order_id", warehousingOrder1.getId())
+//                        .ne("status", "已驳回"));
+//                if (!CollectionUtils.isEmpty(expenseAllocationInfoList1)) {
+//                    distributionMoney = expenseAllocationInfoList1.stream().mapToDouble(ExpenseAllocationInfo::getDistributionMoney).sum();
+//                }
+//                distributionMoney = distributionMoney + warehousingOrder1.getInterest() + warehousingOrder1.getStorageFee();
+//                if (distributionMoney / warehousingOrder1.getInWarehouseWeight() < 100) {
+//                    //计算当天分摊仓储费总和
+//                    inTarDayTotal = totalSurplusWeight * enabledInfo.getValue();
+//                    for (ExpenseInfo expenseInfo1 : expenseInfoList) {
+//                        ExpenseInfo expenseInfo = expenseInfoService.selectById(expenseInfo1.getId());
+//
+//                        //判断,未分配的仓储费总和 > 当天分摊仓储费总和
+//                        if (totalUnallocatedAmount > inTarDayTotal) {
+//
+//                            Double totalUnallocatedAmount1 = totalUnallocatedAmount - inTarDayTotal;
+//                            //修改平均成本:分摊平均成本+分摊金额
+//                            warehousingOrder1.setAvgCost(warehousingOrder1.getAvgCost() + enabledInfo.getValue());
+//                            warehousingOrder1.setStorageFee(warehousingOrder1.getStorageFee() + warehousingOrder1.getSurplusWeight() * enabledInfo.getValue());
+//                            this.updateById(warehousingOrder1);
+//                            //修改仓储费用未分配金额
+//                            if (expenseInfo1.getUnallocatedAmount() > inTarDayTotal) {
+//                                expenseInfo.setUnallocatedAmount(expenseInfo1.getUnallocatedAmount() - inTarDayTotal);
+//                            } else {
+//                                expenseInfo.setUnallocatedAmount(0d);
+//                            }
+//                            expenseInfoService.updateById(expenseInfo);
+//                            totalUnallocatedAmount = totalUnallocatedAmount1;
+//                        } else {
+//                            //修改平均成本:分摊前平均成本+未分配金额总和÷入库单剩余库存总量
+//                            warehousingOrder1.setAvgCost(warehousingOrder1.getAvgCost() + totalUnallocatedAmount / totalSurplusWeight);
+//                            warehousingOrder1.setStorageFee(warehousingOrder1.getStorageFee() + warehousingOrder1.getSurplusWeight() * (totalUnallocatedAmount / totalSurplusWeight));
+//                            this.updateById(warehousingOrder1);
+//                            //修改仓储费用未分配金额
+//                            expenseInfo.setUnallocatedAmount(0d);
+//                            expenseInfoService.updateById(expenseInfo);
+//
+//                        }
+//                    }
+//                }
+//            }
+//            cacheComponent.delPrefixKey(Const.ADMIN_REPEATLIST,dataList.get(0).getCompId());
+//        }
+//        return "OK";
+//    }
 
     /**
      * 入库单导出

+ 6 - 0
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/CargoTitleDetailsMapper.xml

@@ -17,6 +17,9 @@
                 AND transfer_flag='2'
             </if>
         </if>
+        <if test="agent != null and agent != ''">
+            AND agent = #{agent}
+        </if>
         <if test="startDate != null">
             AND (DATE_FORMAT(create_date,"%Y%m%d") &gt;=
             DATE_FORMAT(#{startDate},"%Y%m%d"))
@@ -63,6 +66,9 @@
                 AND transfer_flag='2'
             </if>
         </if>
+        <if test="agent != null and agent != ''">
+            AND agent = #{agent}
+        </if>
         <if test="startDate != null">
             AND (DATE_FORMAT(create_date,"%Y%m%d") &gt;=
             DATE_FORMAT(#{startDate},"%Y%m%d"))

+ 5 - 4
winsea-haixin-plugin-yiliangyiyun/src/main/resources/mapper/FuelFillingInfoMapper.xml

@@ -16,11 +16,11 @@
         <if test="searchType != null and searchType != ''">
             <!--未完成-->
             <if test="searchType == 1">
-                AND ff.travel_status_flag = '1'
+                AND ff.status != '已通过'
             </if>
             <!--已完成-->
             <if test="searchType == 3">
-                AND (ff.travel_status_flag = '3' OR ff.travel_status_flag = '5')
+                AND ff.status = '已通过'
             </if>
         </if>
         GROUP BY ff.id
@@ -66,15 +66,16 @@
         left join filling_detail_info fd on ff.id = fd.filling_id and fd.delete_flag = '0'
         WHERE
         ff.comp_id = #{compId}
+        and ff.common_id = #{commonId}
         and ff.delete_flag = '0'
         <if test="searchType != null and searchType != ''">
             <!--未完成-->
             <if test="searchType == 1">
-                AND ff.travel_status_flag = '1'
+                AND ff.status != '已通过'
             </if>
             <!--已完成-->
             <if test="searchType == 3">
-                AND (ff.travel_status_flag = '3' OR ff.travel_status_flag = '5')
+                AND ff.status = '已通过'
             </if>
         </if>
         GROUP BY ff.id