Jelajahi Sumber

运单上报

haungfuli 1 tahun lalu
induk
melakukan
fac54e3f04

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

@@ -1182,6 +1182,8 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
                             if (hyCompanyInfo != null) {
                                 orderInfo1.setConsignorID(hyCompanyInfo.getUnifiedSocialCreditCode());
                             }
+                            //查询托运人名称
+                            orderInfo1.setConsignorName(publishTaskInfo.getCargoOwner());
                         }
                     }
                     //2.查询承运表,装卸货时间
@@ -1200,13 +1202,13 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
                         orderInfo1.setReceiptImg(hyCarrierInfo.getReceiptImg());
                     }
                     //3.查询托运人信息
-                    HyCargoOwnerInfo hyCargoOwnerInfo = cargoOwnerInfoService.selectOne(new EntityWrapper<HyCargoOwnerInfo>()
-                            .eq("common_id", orderInfo1.getCargoCommonId()).eq("delete_flag", "0"));
-                    if (hyCargoOwnerInfo != null) {
-                        orderInfo1.setConsignorName(hyCargoOwnerInfo.getName());
-                        if ("个人货主".equals(publishTaskInfo.getCargoOwner())) {
+                    if ("个人货主".equals(publishTaskInfo.getCargoOwner())) {
+                        HyCargoOwnerInfo hyCargoOwnerInfo = cargoOwnerInfoService.selectOne(new EntityWrapper<HyCargoOwnerInfo>()
+                                .eq("common_id", orderInfo1.getCargoCommonId()).eq("delete_flag", "0"));
+                        if (hyCargoOwnerInfo != null) {
                             //查询托运人身份证号
                             orderInfo1.setConsignorID(hyCargoOwnerInfo.getCardNumber());
+                            orderInfo1.setConsignorName(hyCargoOwnerInfo.getName());
                         }
                     }
                     //查询发货地区行政区划代码
@@ -1329,6 +1331,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
                             if (hyCompanyInfo != null) {
                                 orderInfo1.setConsignorID(hyCompanyInfo.getUnifiedSocialCreditCode());
                             }
+                            orderInfo1.setConsignorName(publishTaskInfo.getCargoOwner());
                         }
                     }
                     //2.查询承运表,装卸货时间
@@ -1358,12 +1361,12 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
                             orderInfo1.setPackageNumber(hyCarrierInfo.getPackageNumber());
                         }
                     }
-                    //3.查询托运人信息
-                    HyCargoOwnerInfo hyCargoOwnerInfo = cargoOwnerInfoService.selectOne(new EntityWrapper<HyCargoOwnerInfo>()
-                            .eq("common_id", orderInfo1.getCargoCommonId()).eq("delete_flag", "0"));
-                    if (hyCargoOwnerInfo != null) {
-                        orderInfo1.setConsignorName(hyCargoOwnerInfo.getName());
-                        if ("个人货主".equals(publishTaskInfo.getCargoOwner())) {
+                    //3.查询托运人信息,个人货主的情况
+                    if ("个人货主".equals(publishTaskInfo.getCargoOwner())) {
+                        HyCargoOwnerInfo hyCargoOwnerInfo = cargoOwnerInfoService.selectOne(new EntityWrapper<HyCargoOwnerInfo>()
+                                .eq("common_id", orderInfo1.getCargoCommonId()).eq("delete_flag", "0"));
+                        if (hyCargoOwnerInfo != null) {
+                            orderInfo1.setConsignorName(hyCargoOwnerInfo.getName());
                             //查询托运人身份证号
                             orderInfo1.setConsignorID(hyCargoOwnerInfo.getCardNumber());
                         }