haungfuli 2 years ago
parent
commit
0e0130f8fe

+ 8 - 2
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/OrderInfo.java

@@ -316,8 +316,14 @@ public class OrderInfo extends BaseModel<OrderInfo> {
      * 交管局上报失败原因
      */
     private String reportedFailureReason;
-
-
+    /**
+     * 保险单号
+     */
+    private String policyNo;
+    /**
+     * 保险公司代码
+     */
+    private String insuranceCompanyCode;
 
     @TableField(exist = false)
     private List<OrderInfo> orderInfoList;

+ 4 - 4
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/MonitoringSystemReporting.java

@@ -386,7 +386,7 @@ public class MonitoringSystemReporting {
         dispatch.setTotalMonetaryAmount(df.format(orderInfo.getActualFreight()));
         setConsignorInfo(dispatch, orderInfo);
         setConsigneeInfo(dispatch, orderInfo);
-        setInsuranceInformation(dispatch);
+        setInsuranceInformation(dispatch,orderInfo);
         setVehicleInfo(dispatch, orderInfo);
         //实际承运人信息
         ActualCarrierInfo actual = new ActualCarrierInfo();
@@ -425,11 +425,11 @@ public class MonitoringSystemReporting {
     }
 
     //保险信息
-    public static void setInsuranceInformation(Dispatch dispatch) {
+    public static void setInsuranceInformation(Dispatch dispatch, OrderInfo orderInfo) {
         List<InsuranceInformation> insuranceInformations = new ArrayList<>();
         InsuranceInformation insuranceInformation = new InsuranceInformation();
-        insuranceInformation.setPolicyNumber("none");
-        insuranceInformation.setInsuranceCompanyCode("none");
+        insuranceInformation.setPolicyNumber(orderInfo.getPolicyNo());
+        insuranceInformation.setInsuranceCompanyCode(orderInfo.getInsuranceCompanyCode());
         insuranceInformations.add(insuranceInformation);
         dispatch.setInsuranceInformation(insuranceInformations);
     }

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

@@ -556,6 +556,8 @@
         o.goods_type_key as goodsTypeKey,
         o.goods_name as goodsName,
         o.actual_freight as actualFreight,
+        o.policy_no as policyNo,
+        o.insurance_company_code as insuranceCompanyCode,
         o.create_date as createDate,
         o.update_date as updateDate
         FROM hy_order_info o