zhangyuewww 3 years ago
parent
commit
6ecc15981f

+ 19 - 22
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/TranProcessInfoServiceImpl.java

@@ -44,6 +44,10 @@ public class TranProcessInfoServiceImpl extends ServiceImpl<TranProcessInfoMappe
     private ITranSettlementReportService tranSettlementReportService;
     @Autowired
     private ITranPriceApproveService tranPriceApproveService;
+    @Autowired
+    private IDriverViewInfoService driverViewInfoService;
+    @Autowired
+    private IDriverPayeeInfoService driverPayeeInfoService;
     /**
      * 汽运调度分页列表查询
      * @param tranProcessInfo
@@ -206,6 +210,21 @@ public class TranProcessInfoServiceImpl extends ServiceImpl<TranProcessInfoMappe
                             tranSettlementReport.setName(tranCarInfo.getDriver());
                             tranSettlementReport.setPhone(tranCarInfo.getDriverPhone());
                             tranSettlementReport.setCarNo(tranCarInfo.getCarNo());
+                            //查询账户信息
+                            List<DriverViewInfo> driverViewInfoList = driverViewInfoService.selectList(new EntityWrapper<DriverViewInfo>()
+                                    .eq("driver_name", tranCarInfo.getDriver())
+                                    .eq("delete_flag", "0"));
+                            if (!CollectionUtils.isEmpty(driverViewInfoList)){
+                                for (DriverViewInfo driverViewInfo:driverViewInfoList){
+                                    List<DriverPayeeInfo> driverPayeeInfoList=driverPayeeInfoService.selectList(new EntityWrapper<DriverPayeeInfo>()
+                                            .eq("driver_id", driverViewInfo.getId())
+                                            .eq("delete_flag", "0"));
+                                    if(!CollectionUtils.isEmpty(driverPayeeInfoList)){
+                                        //本次收款账户
+                                        tranSettlementReport.setCardNo(driverPayeeInfoList.get(0).getBankCard());
+                                    }
+                                }
+                            }
                             tranSettlementReport.setSettlementWeight(tranCarInfo.getLoadNetWeight());
                             tranSettlementReport.setTranCarNo(tranCarInfo.getTranCarNo());
                             tranSettlementReport.setLoadingWeight(tranCarInfo.getLoadNetWeight());
@@ -224,28 +243,6 @@ public class TranProcessInfoServiceImpl extends ServiceImpl<TranProcessInfoMappe
             }
         }
         return tranProcessInfo.getId();
-//        List<TranCarInfo> tranCarInfoList = tranProcessInfo.getTranCarInfoList();
-//        List<TranCarInfo> tranCarInfoListTmp = new ArrayList<>();
-//        if (!CollectionUtils.isEmpty(tranCarInfoList)) {
-//            for (TranCarInfo tranCarInfos : tranCarInfoList) {
-//                //判断是否有记录
-//                if(!StringUtils.isEmpty(tranCarInfos.getId())){
-//                    continue;
-//                }
-//                tranCarInfos.setProcessId(tranProcessInfo.getId());
-//                tranCarInfos.setInfoId(tranProcessInfo.getInfoId());
-//                tranCarInfos.setId(IdGenerator.generateUUID());
-//                //汽运类型
-//                if(tranCarInfos.getTranType().equals(NumberConstant.CONSTANT1)){
-//                    tranCarInfos.setStatusFlag(StatusEnum.NOT_DELIVERED.getFlag());
-//                    tranCarInfos.setStatus(StatusEnum.NOT_DELIVERED.getName());
-//                }
-//                tranCarInfoListTmp.add(tranCarInfos);
-//            }
-//        }
-//        boolean one = tranCarInfoService.insertBatch(tranCarInfoListTmp);
-//
-//
     }
 
     /**