zhangyuewww hace 2 años
padre
commit
b8260968e3

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

@@ -162,7 +162,11 @@ public class HyCarrierInfo extends BaseModel<HyCarrierInfo> {
      */
     @TableField(exist = false)
     private String loadingFlag;
-
+    /**
+     * 三方上报运单号
+     */
+    @TableField(exist = false)
+    private String tripartiteNo;
 
     @Override
     protected Serializable pkVal() {

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

@@ -269,14 +269,14 @@ public class OrderInfo extends BaseModel<OrderInfo> {
     /**
      * 运输开始日期
      */
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date tranStartDate;
     /**
      * 运输结束日期
      */
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date tranEndDate;
     /**
      * 联络人姓名

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

@@ -1601,6 +1601,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
                             orderInfo1.setTripartiteStatusKey(StatusEnum.TRIPARTITE_SUCESS.getFlag());
                             orderInfo1.setTripartiteStatus(StatusEnum.TRIPARTITE_SUCESS.getName());
                             orderInfoService.updateById(orderInfo1);
+                            hyCarrierInfo.setTripartiteNo(jsonObject.getString("data"));
                             //调用装卸sdk
                             hyCarrierInfo.setLoadingFlag("1");
                             String result2 = UplodeUtil.uploadLoad(hyCarrierInfo);

+ 33 - 9
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/UplodeUtil.java

@@ -307,7 +307,7 @@ public class UplodeUtil {
      */
     public static String uploadLoad(HyCarrierInfo hyCarrierInfo) throws Exception {
         LoadUtil loadUtil = new LoadUtil();
-        loadUtil.setShippingNoteNumber(hyCarrierInfo.getOrderNo());
+        loadUtil.setShippingNoteNumber(hyCarrierInfo.getTripartiteNo());
         loadUtil.setSerialNumber("0000");
         //装车标识
         if ("1".equals(hyCarrierInfo.getLoadingFlag())){
@@ -481,17 +481,41 @@ public class UplodeUtil {
         JSONObject addressInfoDTO = new JSONObject();
         addressInfoDTO.put("senderName", orderInfo.getCargoOwner());
         addressInfoDTO.put("senderPhone", orderInfo.getCargoOwnerPhone());
-        addressInfoDTO.put("senderProvince", orderInfo.getSendPrivate());
-        addressInfoDTO.put("senderCity", orderInfo.getSendCity());
-        addressInfoDTO.put("senderDistrict", orderInfo.getSendArea());
+        HyCommonSysParameter hyCommonSysParameter = uplodeUtil.commonSysParameterService.selectOne(new EntityWrapper<HyCommonSysParameter>()
+                .eq("const_id", "REGION1").eq("const_value", orderInfo.getSendPrivate()));
+        if (hyCommonSysParameter!=null) {
+            addressInfoDTO.put("senderProvince", hyCommonSysParameter.getConstKey());
+        }
+        HyCommonSysParameter hyCommonSysParameter2 = uplodeUtil.commonSysParameterService.selectOne(new EntityWrapper<HyCommonSysParameter>()
+                .eq("const_id", "REGION1").eq("const_value", orderInfo.getSendCity()));
+        if (hyCommonSysParameter2!=null) {
+            addressInfoDTO.put("senderCity",hyCommonSysParameter2.getConstKey());
+        }
+        HyCommonSysParameter hyCommonSysParameter3 = uplodeUtil.commonSysParameterService.selectOne(new EntityWrapper<HyCommonSysParameter>()
+                .eq("const_id", "REGION1").eq("const_value", orderInfo.getSendArea()));
+        if (hyCommonSysParameter3!=null) {
+            addressInfoDTO.put("senderDistrict", hyCommonSysParameter3.getConstKey());
+        }
         addressInfoDTO.put("senderLocation", orderInfo.getSendDetailedAddress());
         addressInfoDTO.put("senderLng", orderInfo.getSendLongitude());
         addressInfoDTO.put("senderLat", orderInfo.getSendLatitude());
         addressInfoDTO.put("receiverName", orderInfo.getShipToName());
         addressInfoDTO.put("receiverPhone", "");
-        addressInfoDTO.put("receiverProvince", orderInfo.getUnloadPrivate());
-        addressInfoDTO.put("receiverCity", orderInfo.getUnloadCity());
-        addressInfoDTO.put("receiverDistrict", orderInfo.getUnloadArea());
+        HyCommonSysParameter hyCommonSysParameter4 = uplodeUtil.commonSysParameterService.selectOne(new EntityWrapper<HyCommonSysParameter>()
+                .eq("const_id", "REGION1").eq("const_value", orderInfo.getUnloadPrivate()));
+        if (hyCommonSysParameter4!=null) {
+            addressInfoDTO.put("receiverProvince", hyCommonSysParameter4.getConstKey());
+        }
+        HyCommonSysParameter hyCommonSysParameter5 = uplodeUtil.commonSysParameterService.selectOne(new EntityWrapper<HyCommonSysParameter>()
+                .eq("const_id", "REGION1").eq("const_value", orderInfo.getUnloadCity()));
+        if (hyCommonSysParameter5!=null) {
+            addressInfoDTO.put("receiverCity",hyCommonSysParameter5.getConstKey());
+        }
+        HyCommonSysParameter hyCommonSysParameter6 = uplodeUtil.commonSysParameterService.selectOne(new EntityWrapper<HyCommonSysParameter>()
+                .eq("const_id", "REGION1").eq("const_value", orderInfo.getUnloadArea()));
+        if (hyCommonSysParameter6!=null) {
+            addressInfoDTO.put("receiverDistrict", hyCommonSysParameter6.getConstKey());
+        }
         addressInfoDTO.put("receiverLocation", orderInfo.getUnloadDetailedAddress());
         addressInfoDTO.put("treceiverLng", orderInfo.getUnsendLongitude());
         addressInfoDTO.put("treceiverLat", orderInfo.getUnsendLatitude());
@@ -512,9 +536,9 @@ public class UplodeUtil {
             }
         }
         carrierInfoDTO.put("carLicensePlate", orderInfo.getCarNumber());
-        carrierInfoDTO.put("carrierTransportCost", orderInfo.getFreight());
+        carrierInfoDTO.put("carrierTransportCost", 0);
         carrierInfoDTO.put("oilCardPaymenet", 0);
-        carrierInfoDTO.put("prePayment", orderInfo.getAdvanceCharge());
+        carrierInfoDTO.put("prePayment", 0);
         carrierInfoDTO.put("arrivePayment",0);
         carrierInfoDTO.put("receiptPayment", 0);
         carrierInfoDTO.put("informationPayment", 0);