haungfuli há 2 anos atrás
pai
commit
17072ec480

+ 18 - 5
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/OrderInfoServiceImpl.java

@@ -105,6 +105,8 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
     private ICommonSysParameterService commonSysParameterService;
     @Autowired
     private IOrderInfoService orderInfoService;
+    @Autowired
+    private IHyCarCaptainInfoService hyCarCaptainInfoService;
     @Value("${file-root-path}")
     private String localPath;
     @Getter
@@ -971,11 +973,22 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
                 HyCommonSysParameter hyCommonSysParameter1 = commonSysParameterService.selectOne(new EntityWrapper<HyCommonSysParameter>()
                         .eq("const_id", "REGION1").eq("const_value", orderInfo1.getUnloadArea()));
                 orderInfo1.setShipToNationalCode(hyCommonSysParameter1.getConstKey());
-                //查询司机信息
-                HyDriverInfo hyDriverInfo = driverInfoService.selectOne(new EntityWrapper<HyDriverInfo>()
-                        .eq("common_id", orderInfo1.getCommonId()).eq("delete_flag", "0"));
-                if (hyDriverInfo != null) {
-                    orderInfo1.setRoadTransportBusinessLicenseNo(hyDriverInfo.getActualCarrierBusinessLicense());
+                //判断该司机是否有车队长
+                if(orderInfo1.getCarCaptainCommonId() != null && !orderInfo1.getCarCaptainCommonId().isEmpty()){
+                    //有车队长
+                    //查询车队长信息
+                    HyCarCaptainInfo hyCarCaptainInfo = hyCarCaptainInfoService.selectOne(new EntityWrapper<HyCarCaptainInfo>()
+                            .eq("common_id", orderInfo1.getCarCaptainCommonId()).eq("delete_flag", "0"));
+                    if (hyCarCaptainInfo != null) {
+                        orderInfo1.setRoadTransportBusinessLicenseNo(hyCarCaptainInfo.getRoadTransportOperationLicenseNo());
+                    }
+                }else {
+                    //查询司机信息
+                    HyDriverInfo hyDriverInfo = driverInfoService.selectOne(new EntityWrapper<HyDriverInfo>()
+                            .eq("common_id", orderInfo1.getCommonId()).eq("delete_flag", "0"));
+                    if (hyDriverInfo != null) {
+                        orderInfo1.setRoadTransportBusinessLicenseNo(hyDriverInfo.getActualCarrierBusinessLicense());
+                    }
                 }
 
                 //监测系统上报

+ 2 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/OrderInfoMapper.xml

@@ -517,6 +517,8 @@
         case when o.freight_advance = 1 then '垫付' else '非垫付' end as freightAdvance,
         o.cargo_owner as cargoOwner,
         o.driver_name as driverName,
+        o.payee_name as payeeName,
+        o.payee_id_card as payeeIdCard,
         h.account_number as cargoOwnerPhone,
         d.account_number as driverPhone,
         o.freight,