Ver código fonte

Merge branch 'master' of http://git.zthymaoyi.com/gongdecai/wangluohuoyun

ccj 2 anos atrás
pai
commit
d645226521
30 arquivos alterados com 2151 adições e 138 exclusões
  1. 4 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/constant/StatusEnum.java
  2. 9 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/DriverCarInfoController.java
  3. 8 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/DriverInfoController.java
  4. 12 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/HyFreightSettlementInfoController.java
  5. 12 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/OrderInfoController.java
  6. 18 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/HyDriverCarInfo.java
  7. 18 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/HyDriverInfo.java
  8. 12 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/HyFreightSettlementInfo.java
  9. 12 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/OrderInfo.java
  10. 8 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/IDriverCarInfoService.java
  11. 7 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/IDriverInfoService.java
  12. 8 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/IHyFreightSettlementInfoService.java
  13. 9 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/IOrderInfoService.java
  14. 48 48
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/CarrierInfoServiceImpl.java
  15. 72 5
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/DriverCarInfoServiceImpl.java
  16. 40 1
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/DriverInfoServiceImpl.java
  17. 53 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/HyFreightSettlementInfoServiceImpl.java
  18. 139 16
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/OrderInfoServiceImpl.java
  19. 166 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/CarrierUtil.java
  20. 229 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/DriverCarUtil.java
  21. 166 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/DriverUtil.java
  22. 85 68
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/EntityAnalyse.java
  23. 76 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/LoadUtil.java
  24. 135 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/OrderUtil.java
  25. 58 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/SettlementUtil.java
  26. 667 0
      winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/UplodeUtil.java
  27. 24 0
      winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/DriverCarInfoMapper.xml
  28. 25 0
      winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/DriverInfoMapper.xml
  29. 2 0
      winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/HyFreightSettlementInfoMapper.xml
  30. 29 0
      winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/OrderInfoMapper.xml

+ 4 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/constant/StatusEnum.java

@@ -144,6 +144,10 @@ public enum StatusEnum {
     REPORTED_FAIL("3", "未通过", "reported_fail"),
     REPORTED_SUCESS("5", "已通过", "reported_sucess"),
 
+    //三方上报状态
+    TRIPARTITE_FAIL("3", "未通过", "tripartite_fail"),
+    TRIPARTITE_SUCESS("5", "已通过", "tripartite_sucess"),
+
     //绑定车队长状态
     CONFIRMED_BIND("1", "待确认", "confirmed_bind"),
     REFUSE_BIND("3", "已拒绝", "refuse_bind"),

+ 9 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/DriverCarInfoController.java

@@ -142,6 +142,15 @@ public class DriverCarInfoController {
         return driverCarInfoService.trafficManagementReport(hyDriverCarInfo);
     }
 
+    /**
+     * 车辆信息三方批量上报
+     */
+    @Log(title = "车辆信息三方批量上报")
+    @PostMapping("/api/tripartiteReport")
+    public String tripartiteReport(@RequestBody HyDriverCarInfo hyDriverCarInfo) throws Exception {
+        return driverCarInfoService.tripartiteReport(hyDriverCarInfo);
+    }
+
     /**
      * 后台管理车辆信息上报列表
      * @param hyDriverCarInfo

+ 8 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/DriverInfoController.java

@@ -170,6 +170,14 @@ public class DriverInfoController {
         return driverInfoService.administrationReport(hyDriverInfo);
     }
 
+    /**
+     * 司机信息三方批量上报
+     */
+    @Log(title = "司机信息三方批量上报")
+    @PostMapping("/api/tripartiteReport")
+    public String tripartiteReport(@RequestBody HyDriverInfo hyDriverInfo) throws Exception {
+        return driverInfoService.tripartiteReport(hyDriverInfo);
+    }
 
     /**
      * 后台管理司机信息上报列表

+ 12 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/HyFreightSettlementInfoController.java

@@ -120,6 +120,18 @@ public class HyFreightSettlementInfoController {
         return hyFreightSettlementInfoService.trafficManagementReport(hyFreightSettlementInfo);
     }
 
+    /**
+     * 流水单三方批量上报
+     *
+     * @param
+     * @return
+     */
+    @Log(title = "流水单三方批量上报")
+    @PostMapping("/api/tripartiteReport")
+    public String tripartiteReport(@RequestBody HyFreightSettlementInfo hyFreightSettlementInfo) throws Exception {
+        return hyFreightSettlementInfoService.tripartiteReport(hyFreightSettlementInfo);
+    }
+
     /**
      * 流水单查看
      *

+ 12 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/OrderInfoController.java

@@ -229,6 +229,18 @@ public class OrderInfoController {
         return orderInfoService.waybillAdministrationReport(orderInfo);
     }
 
+    /**
+     * 运单三方批量上报
+     *
+     * @param
+     * @return
+     */
+    @Log(title = "运单三方批量上报")
+    @PostMapping("/api/tripartiteReport")
+    public String tripartiteReport(@RequestBody OrderInfo orderInfo) throws Exception {
+        return orderInfoService.tripartiteReport(orderInfo);
+    }
+
     /**
      * 审核
      *

+ 18 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/HyDriverCarInfo.java

@@ -313,6 +313,24 @@ public class HyDriverCarInfo extends BaseModel<HyDriverCarInfo> {
      * 交管局上报失败原因
      */
     private String reportedFailureReason;
+    /**
+     * 三方上报时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date tripartiteDate;
+    /**
+     * 三方上报状态key(1未上报3未通过5已通过)
+     */
+    private String tripartiteStatusKey;
+    /**
+     * 三方上报状态
+     */
+    private String tripartiteStatus;
+    /**
+     * 三方上报失败原因
+     */
+    private String tripartiteFailureReason;
     /**
      * 上报list
      */

+ 18 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/HyDriverInfo.java

@@ -257,6 +257,24 @@ public class HyDriverInfo extends BaseModel<HyDriverInfo> {
      * 交管局上报失败原因
      */
     private String reportedFailureReason;
+    /**
+     * 三方上报时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date tripartiteDate;
+    /**
+     * 三方上报状态key(3未通过5已通过)
+     */
+    private String tripartiteStatusKey;
+    /**
+     * 三方上报状态
+     */
+    private String tripartiteStatus;
+    /**
+     * 三方上报失败原因
+     */
+    private String tripartiteFailureReason;
     /**
      * 审核通过一次(1是)
      */

+ 12 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/HyFreightSettlementInfo.java

@@ -129,6 +129,18 @@ public class HyFreightSettlementInfo extends BaseModel<HyFreightSettlementInfo>
      * 交管局上报失败原因
      */
     private String reportedFailureReason;
+    /**
+     * 三方上报状态key(1未上报3未通过5已通过)
+     */
+    private String tripartiteStatusKey;
+    /**
+     * 三方上报状态
+     */
+    private String tripartiteStatus;
+    /**
+     * 三方上报失败原因
+     */
+    private String tripartiteFailureReason;
     /**
      * 流水号
      */

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

@@ -316,6 +316,18 @@ public class OrderInfo extends BaseModel<OrderInfo> {
      * 交管局上报失败原因
      */
     private String reportedFailureReason;
+    /**
+     * 三方上报状态key(1未上报3未通过5已通过)
+     */
+    private String tripartiteStatusKey;
+    /**
+     * 三方上报状态
+     */
+    private String tripartiteStatus;
+    /**
+     * 三方上报失败原因
+     */
+    private String tripartiteFailureReason;
     /**
      * 保险单号
      */

+ 8 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/IDriverCarInfoService.java

@@ -86,10 +86,18 @@ public interface IDriverCarInfoService extends IService<HyDriverCarInfo> {
      */
     String trafficManagementReport(HyDriverCarInfo hyDriverCarInfo) throws Exception ;
 
+    /**
+     * 三方上报
+     * @param hyDriverCarInfo
+     * @return
+     */
+    String tripartiteReport(HyDriverCarInfo hyDriverCarInfo);
+
     /**
      * 后台管理车辆信息上报列表
      * @param  hyDriverCarInfo
      * @return
      */
     Page<HyDriverCarInfo> selectCarInfoSubmission(HyDriverCarInfo hyDriverCarInfo);
+
 }

+ 7 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/IDriverInfoService.java

@@ -91,6 +91,12 @@ public interface IDriverInfoService extends IService<HyDriverInfo> {
      */
     String administrationReport(HyDriverInfo hyDriverInfo) throws Exception ;
 
+    /**
+     * 三方上报
+     * @param hyDriverInfo
+     * @return
+     */
+    String tripartiteReport(HyDriverInfo hyDriverInfo);
 
     /**
      * 后台管理司机信息上报列表
@@ -98,4 +104,5 @@ public interface IDriverInfoService extends IService<HyDriverInfo> {
      * @return
      */
     Page<HyDriverInfo> selectDriverInfoSubmission(HyDriverInfo hyDriverInfo);
+
 }

+ 8 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/IHyFreightSettlementInfoService.java

@@ -88,4 +88,12 @@ public interface IHyFreightSettlementInfoService extends IService<HyFreightSettl
      * @return
      */
     HyFreightSettlementInfo getHyFreightSettlementInfo(HyFreightSettlementInfo hyFreightSettlementInfo);
+
+    /**
+     * 流水单三方系统批量上报
+     *
+     * @param hyFreightSettlementInfo
+     * @return
+     */
+    String tripartiteReport(HyFreightSettlementInfo hyFreightSettlementInfo);
 }

+ 9 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/IOrderInfoService.java

@@ -150,6 +150,14 @@ public interface IOrderInfoService extends IService<OrderInfo> {
      */
     String waybillAdministrationReport (OrderInfo orderInfo) throws Exception ;
 
+    /**
+     * 运单三方上报
+     *
+     * @param orderInfo
+     * @return
+     */
+    String tripartiteReport(OrderInfo orderInfo);
+
     /**
      * 审核
      *
@@ -184,4 +192,5 @@ public interface IOrderInfoService extends IService<OrderInfo> {
      * @throws Exception
      */
     void export(OrderInfo orderInfo, HttpServletResponse response) throws Exception;
+
 }

+ 48 - 48
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/CarrierInfoServiceImpl.java

@@ -98,54 +98,54 @@ public class CarrierInfoServiceImpl extends ServiceImpl<CarrierInfoMapper, HyCar
                 //查询车辆信息
                 HyDriverCarInfo hyDriverCarInfo = driverCarInfoService.selectOne(new EntityWrapper<HyDriverCarInfo>().eq("car_number", hyCarrierInfo1.getCarNo())
                         .eq("delete_flag", "0"));
-                Map<String, String> map = new HashMap<String, String>(4);
-                map.put("token", token.getToken());
-                map.put("cid", "871a05fd-a098-49af-9760-27ce9ecf61e3");
-                map.put("srt", "762ea319-5f05-4810-aa28-5f92c99485ae");
-                //车牌颜色
-                String color = "2";
-                if ("黄色".equals(hyDriverCarInfo.getCarNumberColour())) {
-                    color = "2";
-                } else {
-                    color = "1";
-                }
-                map.put("vnos", hyDriverCarInfo.getCarNumber()+"_"+color);
-                String url = "https://zhiyunopenapi.95155.com/save/apis/transTimeManageV2";
-                // 设置 http 读写超时
-                DataExchangeService des = new DataExchangeService(5000, 8000);
-                System.out.println("请求地址:" + url);
-                System.out.println("请求参数:" + map);
-                // 通过 https 方式调用,此方法内部会使用私钥生成签名参数 sign,私钥不会发送
-                String res = des.postHttps(url, map);
-                System.out.println("返回值:" + res);
-                JSONObject jsonObject = JSONObject.parseObject(res);
-                if (jsonObject.get("status").toString().equals("1001")) {
-                    JSONObject jsonData = jsonObject.getJSONObject("result");
-                    JSONObject jsonArray = jsonData.getJSONObject("firstVcl");
-                    BigDecimal lonResult = jsonArray.getBigDecimal("lon");
-                    Double lon = lonResult.doubleValue() / 600000;
-                    BigDecimal latResult = jsonArray.getBigDecimal("lat");
-                    Double lat = latResult.doubleValue() / 600000;
-                    //发货地经纬度
-                    //查询发货地经纬度
-                    OrderInfo orderInfo1 = orderInfoService.selectOne(new EntityWrapper<OrderInfo>()
-                            .eq("id", hyCarrierInfo1.getOrderId())
-                            .eq("delete_flag", "0"));
-                    PublishTaskInfo publishTaskInfo = publishTaskInfoService.selectById(orderInfo1.getTaskId());
-                    Double lon1 = Double.parseDouble(publishTaskInfo.getSendLongitude());
-                    Double lat1 = Double.parseDouble(publishTaskInfo.getSendLatitude());
-                    System.out.println("发货经纬度:" + lon1+","+lat1);
-                     // 距离
-                    double s = GetDistance(lon,lat,lon1,lat1);
-                    if(s>3000){
-                        s = s/1000;
-                        System.out.println("距离相差:" + s+"公里");
-                        throw new YException(YExceptionEnum.FAILED_TO_LOADINGADD);
-                    }
-                }
-                else{
-                    throw new YException(YExceptionEnum.FAILED_TO_LOADINGA);
-                }
+//                Map<String, String> map = new HashMap<String, String>(4);
+//                map.put("token", token.getToken());
+//                map.put("cid", "871a05fd-a098-49af-9760-27ce9ecf61e3");
+//                map.put("srt", "762ea319-5f05-4810-aa28-5f92c99485ae");
+//                //车牌颜色
+//                String color = "2";
+//                if ("黄色".equals(hyDriverCarInfo.getCarNumberColour())) {
+//                    color = "2";
+//                } else {
+//                    color = "1";
+//                }
+//                map.put("vnos", hyDriverCarInfo.getCarNumber()+"_"+color);
+//                String url = "https://zhiyunopenapi.95155.com/save/apis/transTimeManageV2";
+//                // 设置 http 读写超时
+//                DataExchangeService des = new DataExchangeService(5000, 8000);
+//                System.out.println("请求地址:" + url);
+//                System.out.println("请求参数:" + map);
+//                // 通过 https 方式调用,此方法内部会使用私钥生成签名参数 sign,私钥不会发送
+//                String res = des.postHttps(url, map);
+//                System.out.println("返回值:" + res);
+//                JSONObject jsonObject = JSONObject.parseObject(res);
+//                if (jsonObject.get("status").toString().equals("1001")) {
+//                    JSONObject jsonData = jsonObject.getJSONObject("result");
+//                    JSONObject jsonArray = jsonData.getJSONObject("firstVcl");
+//                    BigDecimal lonResult = jsonArray.getBigDecimal("lon");
+//                    Double lon = lonResult.doubleValue() / 600000;
+//                    BigDecimal latResult = jsonArray.getBigDecimal("lat");
+//                    Double lat = latResult.doubleValue() / 600000;
+//                    //发货地经纬度
+//                    //查询发货地经纬度
+//                    OrderInfo orderInfo1 = orderInfoService.selectOne(new EntityWrapper<OrderInfo>()
+//                            .eq("id", hyCarrierInfo1.getOrderId())
+//                            .eq("delete_flag", "0"));
+//                    PublishTaskInfo publishTaskInfo = publishTaskInfoService.selectById(orderInfo1.getTaskId());
+//                    Double lon1 = Double.parseDouble(publishTaskInfo.getSendLongitude());
+//                    Double lat1 = Double.parseDouble(publishTaskInfo.getSendLatitude());
+//                    System.out.println("发货经纬度:" + lon1+","+lat1);
+//                     // 距离
+//                    double s = GetDistance(lon,lat,lon1,lat1);
+//                    if(s>3000){
+//                        s = s/1000;
+//                        System.out.println("距离相差:" + s+"公里");
+//                        throw new YException(YExceptionEnum.FAILED_TO_LOADINGADD);
+//                    }
+//                }
+//                else{
+//                    throw new YException(YExceptionEnum.FAILED_TO_LOADINGA);
+//                }
                 /****************************判断发货地和车辆位置结束************************************/
 
                 hyCarrierInfo.setStatus(StatusEnum.SUBMITTED.getName());

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

@@ -19,10 +19,7 @@ import com.yh.saas.plugin.yiliangyiyun.service.IDriverCarInfoService;
 import com.baomidou.mybatisplus.service.impl.ServiceImpl;
 import com.yh.saas.plugin.yiliangyiyun.service.IDriverInfoService;
 import com.yh.saas.plugin.yiliangyiyun.service.INewsInfoService;
-import com.yh.saas.plugin.yiliangyiyun.util.EntityAnalyse;
-import com.yh.saas.plugin.yiliangyiyun.util.GeTuiUtils;
-import com.yh.saas.plugin.yiliangyiyun.util.GeneratorUtil;
-import com.yh.saas.plugin.yiliangyiyun.util.MonitoringSystemReporting;
+import com.yh.saas.plugin.yiliangyiyun.util.*;
 import net.sf.json.JSONObject;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
@@ -299,7 +296,7 @@ public class DriverCarInfoServiceImpl extends ServiceImpl<DriverCarInfoMapper, H
         if ("通过".equals(EntityAnalyse.driverCarInfoCheck(hyDriverCarInfo, ENV))) {
             hyDriverCarInfo.setEscalationStatusKey(StatusEnum.PASSED.getFlag());
             hyDriverCarInfo.setEscalationStatus(StatusEnum.PASSED.getName());
-        } else if ("待校验".equals(EntityAnalyse.driverCarInfoCheck(hyDriverCarInfo, ENV))) {
+        } else if ("待校验".equals(EntityAnalyse.driverCarInfoCheck(hyDriverCarInfo, ENV)) || "系统异常".equals(EntityAnalyse.driverCarInfoCheck(hyDriverCarInfo, ENV))) {
             hyDriverCarInfo.setEscalationStatusKey(StatusEnum.PARK_UNDER_REVIEW.getFlag());
             hyDriverCarInfo.setEscalationStatus(StatusEnum.PARK_UNDER_REVIEW.getName());
         } else {
@@ -467,6 +464,74 @@ public class DriverCarInfoServiceImpl extends ServiceImpl<DriverCarInfoMapper, H
         return "NG";
     }
 
+    @Override
+    public String tripartiteReport(HyDriverCarInfo hyDriverCarInfo) {
+        if ("3".equals(ENV)) {
+            if (!CollectionUtils.isEmpty(hyDriverCarInfo.getHyDriverCarInfoList())) {
+                for (HyDriverCarInfo hyDriverCarInfo1 : hyDriverCarInfo.getHyDriverCarInfoList()) {
+                    //查询车辆类型key值
+                    HyCommonSysParameter hyCommonSysParameter = commonSysParameterService.selectOne(new EntityWrapper<HyCommonSysParameter>()
+                            .eq("const_id", "CAR1").eq("const_value", hyDriverCarInfo1.getVehicleType()));
+                    hyDriverCarInfo1.setVehicleTypeKey(hyCommonSysParameter.getConstKey());
+                    if (hyDriverCarInfo1.getTrailerVehicleType() != null && !hyDriverCarInfo1.getTrailerVehicleType().isEmpty()) {
+                        //查询挂车车辆类型key值
+                        HyCommonSysParameter hyCommonSysParameter3 = commonSysParameterService.selectOne(new EntityWrapper<HyCommonSysParameter>()
+                                .eq("const_id", "CAR1").eq("const_value", hyDriverCarInfo1.getTrailerVehicleType()));
+                        hyDriverCarInfo1.setTrailerVehicleTypeKey(hyCommonSysParameter3.getConstKey());
+                    }
+//                    new Thread(new Runnable() {
+//                        @Override
+//                        public void run() {
+                            try {
+                                String result = UplodeUtil.uploadDriverCar(hyDriverCarInfo1);
+                                JSONObject jsonObject = JSONObject.fromObject(result);
+                                if ("00000".equals(jsonObject.getString("code"))) {
+                                    //更改上报状态
+                                    hyDriverCarInfo1.setTripartiteDate(new Date());
+                                    hyDriverCarInfo1.setTripartiteStatusKey(StatusEnum.TRIPARTITE_SUCESS.getFlag());
+                                    hyDriverCarInfo1.setTripartiteStatus(StatusEnum.TRIPARTITE_SUCESS.getName());
+                                    driverCarInfoService.updateById(hyDriverCarInfo1);
+                                } else {
+                                    hyDriverCarInfo1.setTripartiteDate(new Date());
+                                    hyDriverCarInfo1.setTripartiteStatusKey(StatusEnum.TRIPARTITE_FAIL.getFlag());
+                                    hyDriverCarInfo1.setTripartiteStatus(StatusEnum.TRIPARTITE_FAIL.getName());
+                                    hyDriverCarInfo1.setTripartiteFailureReason(jsonObject.getString("message"));
+                                    driverCarInfoService.updateById(hyDriverCarInfo1);
+                                }
+                            } catch (Exception e) {
+                                e.printStackTrace();
+                            }
+                            if (hyDriverCarInfo1.getTrailerVehicleType() != null && !hyDriverCarInfo1.getTrailerVehicleType().isEmpty()) {
+                                //挂车三方上报
+                                try {
+                                    String result = UplodeUtil.uploadDriverCar(hyDriverCarInfo1);
+                                    JSONObject jsonObject = JSONObject.fromObject(result);
+                                    //发送成功
+                                    if ("00000".equals(jsonObject.getString("code"))) {
+                                        //更改上报状态
+                                        hyDriverCarInfo1.setTripartiteDate(new Date());
+                                        hyDriverCarInfo1.setTripartiteStatusKey(StatusEnum.TRIPARTITE_SUCESS.getFlag());
+                                        hyDriverCarInfo1.setTripartiteStatus(StatusEnum.TRIPARTITE_SUCESS.getName());
+                                    } else {
+                                        hyDriverCarInfo1.setTripartiteDate(new Date());
+                                        hyDriverCarInfo1.setTripartiteStatusKey(StatusEnum.TRIPARTITE_FAIL.getFlag());
+                                        hyDriverCarInfo1.setTripartiteStatus(StatusEnum.TRIPARTITE_FAIL.getName());
+                                        hyDriverCarInfo1.setTripartiteFailureReason(jsonObject.getString("message"));
+                                    }
+                                    driverCarInfoService.updateById(hyDriverCarInfo1);
+                                } catch (Exception e) {
+                                    e.printStackTrace();
+                                }
+                            }
+//                        }
+//                    }).start();
+                }
+            }
+            return "ok";
+        }
+        return "ng";
+    }
+
 
     /**
      * 后台管理车辆信息上报列表
@@ -481,6 +546,8 @@ public class DriverCarInfoServiceImpl extends ServiceImpl<DriverCarInfoMapper, H
                 * hyDriverCarInfo.getPageSize());
         //公司id
         pageView.put("administrationType", hyDriverCarInfo.getAdministrationType());
+        //三方上报状态
+        pageView.put("tripartiteStatusKey", hyDriverCarInfo.getTripartiteStatusKey());
         pageView.put("searchType", hyDriverCarInfo.getSearchType());
         pageView.put("searchKeyWord", hyDriverCarInfo.getSearchKeyWord());
         pageView.put("startDate", hyDriverCarInfo.getStartDate());

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

@@ -16,6 +16,7 @@ import com.baomidou.mybatisplus.service.impl.ServiceImpl;
 import com.yh.saas.plugin.yiliangyiyun.util.EntityAnalyse;
 import com.yh.saas.plugin.yiliangyiyun.util.GeTuiUtils;
 import com.yh.saas.plugin.yiliangyiyun.util.MonitoringSystemReporting;
+import com.yh.saas.plugin.yiliangyiyun.util.UplodeUtil;
 import net.sf.json.JSONObject;
 import org.springframework.beans.factory.annotation.Autowired;
 
@@ -72,7 +73,7 @@ public class DriverInfoServiceImpl extends ServiceImpl<DriverInfoMapper, HyDrive
         if ("通过".equals(EntityAnalyse.driverInfoCheck(hyDriverInfo, ENV))) {
             hyDriverInfo.setEscalationStatusKey(StatusEnum.PASSED.getFlag());
             hyDriverInfo.setEscalationStatus(StatusEnum.PASSED.getName());
-        } else if ("待校验".equals(EntityAnalyse.driverInfoCheck(hyDriverInfo, ENV))) {
+        } else if ("待校验".equals(EntityAnalyse.driverInfoCheck(hyDriverInfo, ENV)) || "系统异常".equals(EntityAnalyse.driverInfoCheck(hyDriverInfo, ENV))) {
             hyDriverInfo.setEscalationStatusKey(StatusEnum.PARK_UNDER_REVIEW.getFlag());
             hyDriverInfo.setEscalationStatus(StatusEnum.PARK_UNDER_REVIEW.getName());
         } else {
@@ -551,6 +552,42 @@ public class DriverInfoServiceImpl extends ServiceImpl<DriverInfoMapper, HyDrive
         return "NG";
     }
 
+    @Override
+    public String tripartiteReport(HyDriverInfo hyDriverInfo) {
+        if ("3".equals(ENV)) {
+            if (!CollectionUtils.isEmpty(hyDriverInfo.getHyDriverInfoList())) {
+                for (HyDriverInfo hyDriverInfo1 : hyDriverInfo.getHyDriverInfoList()) {
+//                    new Thread(new Runnable() {
+//                        @Override
+//                        public void run() {
+                            try {
+                                String result = UplodeUtil.uploadDriver(hyDriverInfo1);
+                                JSONObject jsonObject = JSONObject.fromObject(result);
+                                if ("00000".equals(jsonObject.getString("code"))) {
+                                    //更改上报状态
+                                    hyDriverInfo1.setTripartiteDate(new Date());
+                                    hyDriverInfo1.setTripartiteStatusKey(StatusEnum.TRIPARTITE_SUCESS.getFlag());
+                                    hyDriverInfo1.setTripartiteStatus(StatusEnum.TRIPARTITE_SUCESS.getName());
+                                    driverInfoService.updateById(hyDriverInfo1);
+                                } else {
+                                    hyDriverInfo1.setTripartiteDate(new Date());
+                                    hyDriverInfo1.setTripartiteStatusKey(StatusEnum.TRIPARTITE_FAIL.getFlag());
+                                    hyDriverInfo1.setTripartiteStatus(StatusEnum.TRIPARTITE_FAIL.getName());
+                                    hyDriverInfo1.setTripartiteFailureReason(jsonObject.getString("message"));
+                                    driverInfoService.updateById(hyDriverInfo1);
+                                }
+                            } catch (Exception e) {
+                                e.printStackTrace();
+                            }
+//                        }
+//                    }).start();
+                }
+            }
+            return "ok";
+        }
+        return "NG";
+    }
+
 
     /**
      * 后台管理司机信息上报列表
@@ -565,6 +602,8 @@ public class DriverInfoServiceImpl extends ServiceImpl<DriverInfoMapper, HyDrive
                 * hyDriverInfo.getPageSize());
         //公司id
         pageView.put("administrationType", hyDriverInfo.getAdministrationType());
+        //三方上报状态
+        pageView.put("tripartiteStatusKey", hyDriverInfo.getTripartiteStatusKey());
         pageView.put("searchType", hyDriverInfo.getSearchType());
         pageView.put("searchKeyWord", hyDriverInfo.getSearchKeyWord());
         pageView.put("startDate", hyDriverInfo.getStartDate());

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

@@ -13,6 +13,7 @@ import com.yh.saas.plugin.yiliangyiyun.service.*;
 import com.baomidou.mybatisplus.service.impl.ServiceImpl;
 import com.yh.saas.plugin.yiliangyiyun.util.EntityAnalyse;
 import com.yh.saas.plugin.yiliangyiyun.util.MonitoringSystemReporting;
+import com.yh.saas.plugin.yiliangyiyun.util.UplodeUtil;
 import net.sf.json.JSONObject;
 import org.apache.commons.collections.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -682,4 +683,56 @@ public class HyFreightSettlementInfoServiceImpl extends ServiceImpl<HyFreightSet
         }
         return hyFreightSettlementInfo1;
     }
+
+    @Override
+    public String tripartiteReport(HyFreightSettlementInfo hyFreightSettlementInfo) {
+        if ("3".equals(ENV)) {
+            if (CollectionUtils.isNotEmpty(hyFreightSettlementInfo.getHyFreightSettlementInfos())) {
+                for (HyFreightSettlementInfo hyFreightSettlementInfo1 : hyFreightSettlementInfo.getHyFreightSettlementInfos()) {
+                    //查询上报所需信息
+                    //查询订单
+                    OrderInfo orderInfo1 = orderInfoService.selectById(hyFreightSettlementInfo1.getOrderId());
+                    //车辆信息
+                    HyDriverCarInfo hyDriverCarInfo = driverCarInfoService.selectOne(new EntityWrapper<HyDriverCarInfo>()
+                            .eq("car_number", orderInfo1.getCarNumber()).eq("delete_flag", "0"));
+                    hyFreightSettlementInfo1.setCarNumber(hyDriverCarInfo.getCarNumber());
+                    hyFreightSettlementInfo1.setCarNumberColour(hyDriverCarInfo.getCarNumberColour());
+                    //查询银行key值
+                    HyCommonSysParameter hyCommonSysParameter = commonSysParameterService.selectOne(new EntityWrapper<HyCommonSysParameter>()
+                            .eq("const_id", "BANK1").eq("const_value", orderInfo1.getBankDeposit()));
+                    if (hyCommonSysParameter == null) {
+                        hyFreightSettlementInfo1.setBankKey("9999");
+                    } else {
+                        hyFreightSettlementInfo1.setBankKey(hyCommonSysParameter.getConstKey());
+                    }
+                    //监测系统上报
+//                    new Thread(new Runnable() {
+//                        @Override
+//                        public void run() {
+                            try {
+                                String result = UplodeUtil.uploadSettlement(hyFreightSettlementInfo1);
+                                JSONObject jsonObject = JSONObject.fromObject(result);
+                                //发送成功
+                                if ("00000".equals(jsonObject.getString("code"))) {
+                                    hyFreightSettlementInfo1.setTripartiteStatusKey(StatusEnum.REPORTED_SUCESS.getFlag());
+                                    hyFreightSettlementInfo1.setTripartiteStatus(StatusEnum.REPORTED_SUCESS.getName());
+                                }
+                                //发送失败
+                                else {
+                                    hyFreightSettlementInfo1.setTripartiteStatusKey(StatusEnum.REPORTED_FAIL.getFlag());
+                                    hyFreightSettlementInfo1.setTripartiteStatus(StatusEnum.REPORTED_FAIL.getName());
+                                    hyFreightSettlementInfo1.setTripartiteFailureReason(jsonObject.getString("message"));
+                                }
+                                hyFreightSettlementInfoService.updateById(hyFreightSettlementInfo1);
+                            } catch (Exception e) {
+                                e.printStackTrace();
+                            }
+//                        }
+//                    }).start();
+                }
+            }
+            return "ok";
+        }
+        return "NG";
+    }
 }

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

@@ -17,10 +17,7 @@ import com.yh.saas.plugin.yiliangyiyun.exception.YExceptionEnum;
 import com.yh.saas.plugin.yiliangyiyun.mapper.OrderInfoMapper;
 import com.yh.saas.plugin.yiliangyiyun.service.*;
 import com.baomidou.mybatisplus.service.impl.ServiceImpl;
-import com.yh.saas.plugin.yiliangyiyun.util.EntityAnalyse;
-import com.yh.saas.plugin.yiliangyiyun.util.GeTuiUtils;
-import com.yh.saas.plugin.yiliangyiyun.util.MonitoringSystemReporting;
-import com.yh.saas.plugin.yiliangyiyun.util.PdfUtil;
+import com.yh.saas.plugin.yiliangyiyun.util.*;
 import lombok.Getter;
 import lombok.SneakyThrows;
 import lombok.extern.slf4j.Slf4j;
@@ -1078,6 +1075,8 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
                 * orderInfo.getPageSize());
         //模糊查询
         pageView.put("administrationType", orderInfo.getAdministrationType());
+        //三方上报状态
+        pageView.put("tripartiteStatusKey", orderInfo.getTripartiteStatusKey());
         pageView.put("startDate", orderInfo.getStartDate());
         pageView.put("endDate", orderInfo.getEndDate());
         pageView.put("searchKeyWord", orderInfo.getSearchKeyWord());
@@ -1133,7 +1132,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
         if ("通过".equals(EntityAnalyse.waybillCheck(orderInfo, ENV))) {
             orderInfo.setEscalationStatusKey(StatusEnum.ADOPTED.getFlag());
             orderInfo.setEscalationStatus(StatusEnum.ADOPTED.getName());
-        } else if ("待校验".equals(EntityAnalyse.waybillCheck(orderInfo, ENV))) {
+        } else if ("待校验".equals(EntityAnalyse.waybillCheck(orderInfo, ENV)) || "系统异常".equals(EntityAnalyse.waybillCheck(orderInfo, ENV))) {
             orderInfo.setEscalationStatusKey(StatusEnum.UNDER_REVIEW.getFlag());
             orderInfo.setEscalationStatus(StatusEnum.UNDER_REVIEW.getName());
         } else {
@@ -1182,6 +1181,8 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
                             if (hyCompanyInfo != null) {
                                 orderInfo1.setConsignorID(hyCompanyInfo.getUnifiedSocialCreditCode());
                             }
+                            //查询托运人名称
+                            orderInfo1.setConsignorName(publishTaskInfo.getCargoOwner());
                         }
                     }
                     //2.查询承运表,装卸货时间
@@ -1200,13 +1201,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 +1330,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
                             if (hyCompanyInfo != null) {
                                 orderInfo1.setConsignorID(hyCompanyInfo.getUnifiedSocialCreditCode());
                             }
+                            orderInfo1.setConsignorName(publishTaskInfo.getCargoOwner());
                         }
                     }
                     //2.查询承运表,装卸货时间
@@ -1358,12 +1360,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());
                         }
@@ -1490,6 +1492,127 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
         return "NG";
     }
 
+    @Override
+    public String tripartiteReport(OrderInfo orderInfo) {
+        if ("3".equals(ENV)) {
+            if (CollectionUtils.isNotEmpty(orderInfo.getOrderInfoList())) {
+                for (OrderInfo orderInfo1 : orderInfo.getOrderInfoList()) {
+
+                    //1.查询任务,获取业务类型代码
+                    PublishTaskInfo publishTaskInfo = publishTaskInfoService.selectById(orderInfo1.getTaskId());
+                    if (publishTaskInfo != null) {
+                        orderInfo1.setBusinessTypeCode(publishTaskInfo.getBusinessTypeKey());
+                        orderInfo1.setShipToName(publishTaskInfo.getReceiver());
+                        orderInfo1.setContractUrl(publishTaskInfo.getContractUrl());
+                        if (publishTaskInfo.getReceiverIdcard() == null && publishTaskInfo.getReceiverIdcard().isEmpty()) {
+                            orderInfo1.setShipToID(publishTaskInfo.getReceiverCreditCode());
+                        } else {
+                            orderInfo1.setShipToID(publishTaskInfo.getReceiverIdcard());
+                        }
+                        if (!"个人货主".equals(publishTaskInfo.getCargoOwner()) && publishTaskInfo.getCompId() != null) {
+                            //查询公司社会信用代码
+                            HyCompanyInfo hyCompanyInfo = companyInfoService.selectById(publishTaskInfo.getCompId());
+                            if (hyCompanyInfo != null) {
+                                orderInfo1.setConsignorID(hyCompanyInfo.getUnifiedSocialCreditCode());
+                            }
+                            //查询托运人名称
+                            orderInfo1.setConsignorName(publishTaskInfo.getCargoOwner());
+                        }
+                    }
+                    //2.查询承运表,装卸货时间
+                    HyCarrierInfo hyCarrierInfo = carrierInfoService.selectOne(new EntityWrapper<HyCarrierInfo>().eq("order_id", orderInfo1.getId())
+                            .eq("delete_flag", "0"));
+                    if (hyCarrierInfo != null) {
+                        orderInfo1.setDeliveryTime(hyCarrierInfo.getLoadingDate());
+                        orderInfo1.setReceivingTime(hyCarrierInfo.getUnloadingDate());
+                        orderInfo1.setWeight(hyCarrierInfo.getLoadingWeight());
+                        orderInfo1.setVolume(hyCarrierInfo.getVolume());
+                        orderInfo1.setPackageNumber(hyCarrierInfo.getPackageNumber());
+                        orderInfo1.setLoadingDate(hyCarrierInfo.getLoadingDate());
+                        orderInfo1.setUnloadingDate(hyCarrierInfo.getUnloadingDate());
+                        orderInfo1.setLoadingLonLat(hyCarrierInfo.getLoadingLongitude() + "," + hyCarrierInfo.getLoadingLatitude());
+                        orderInfo1.setUnloadingLonLat(hyCarrierInfo.getUnloadingLongitude() + "," + hyCarrierInfo.getUnloadingLatitude());
+                        orderInfo1.setReceiptImg(hyCarrierInfo.getReceiptImg());
+                    }
+                    //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.setConsignorID(hyCargoOwnerInfo.getCardNumber());
+                            orderInfo1.setConsignorName(hyCargoOwnerInfo.getName());
+                        }
+                    }
+                    //查询发货地区行政区划代码
+                    HyCommonSysParameter hyCommonSysParameter2 = commonSysParameterService.selectOne(new EntityWrapper<HyCommonSysParameter>()
+                            .eq("const_id", "REGION1").eq("const_value", orderInfo1.getSendArea()));
+                    orderInfo1.setNationalCode(hyCommonSysParameter2.getConstKey());
+                    //查询收货地区行政区划代码
+                    HyCommonSysParameter hyCommonSysParameter1 = commonSysParameterService.selectOne(new EntityWrapper<HyCommonSysParameter>()
+                            .eq("const_id", "REGION1").eq("const_value", orderInfo1.getUnloadArea()));
+                    orderInfo1.setShipToNationalCode(hyCommonSysParameter1.getConstKey());
+                    //判断该司机是否有车队长
+                    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());
+                        }
+                    }
+                    try {
+                        //上报运单时上报承运人信息
+                        String result1 = UplodeUtil.uploadCarrier(orderInfo1);
+                        JSONObject jsonObject1 = JSONObject.fromObject(result1);
+                        if (!"00000".equals(jsonObject1.getString("code"))) {
+                            throw new RuntimeException(jsonObject1.getString("message"));
+                        }
+                        String result = UplodeUtil.uploadOrder(orderInfo1);
+                        JSONObject jsonObject = JSONObject.fromObject(result);
+                        if ("00000".equals(jsonObject.getString("code"))) {
+                            //更改上报状态
+                            orderInfo1.setTripartiteStatusKey(StatusEnum.TRIPARTITE_SUCESS.getFlag());
+                            orderInfo1.setTripartiteStatus(StatusEnum.TRIPARTITE_SUCESS.getName());
+                            orderInfoService.updateById(orderInfo1);
+                            //调用装卸sdk
+                            hyCarrierInfo.setLoadingFlag("1");
+                            String result2 = UplodeUtil.uploadLoad(hyCarrierInfo);
+                            JSONObject jsonObject2 = JSONObject.fromObject(result2);
+                            if (!"00000".equals(jsonObject2.getString("code"))) {
+                                throw new RuntimeException(jsonObject2.getString("message"));
+                            }
+                            hyCarrierInfo.setLoadingFlag("2");
+                            String result3 = UplodeUtil.uploadLoad(hyCarrierInfo);
+                            JSONObject jsonObject3 = JSONObject.fromObject(result3);
+                            if (!"00000".equals(jsonObject3.getString("code"))) {
+                                throw new RuntimeException(jsonObject3.getString("message"));
+                            }
+                        } else {
+                            //更改上报状态
+                            orderInfo1.setTripartiteStatusKey(StatusEnum.TRIPARTITE_FAIL.getFlag());
+                            orderInfo1.setTripartiteStatus(StatusEnum.TRIPARTITE_FAIL.getName());
+                            orderInfo1.setTripartiteFailureReason(jsonObject.getString("message"));
+                            orderInfoService.updateById(orderInfo1);
+                        }
+                    } catch (Exception e) {
+                        e.printStackTrace();
+                    }
+                }
+            }
+            return "ok";
+        }
+        return "NG";
+    }
+
 
     /**
      * 审核(平台确认装卸车)

+ 166 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/CarrierUtil.java

@@ -0,0 +1,166 @@
+package com.yh.saas.plugin.yiliangyiyun.util;
+
+public class CarrierUtil {
+    private String name;
+    private String idCard;
+    private String phone;
+    private String idCardFrontFilename;
+    private String idCardBackFilename;
+    private Long idCardBeginTime;
+    private Long idCardEndTime;
+    private String address;
+    private Integer type;
+    private String businessLicenseFilename;
+    private String bankDeposit;
+    private String bankCardNumber;
+    private String branch;
+    private String legalName;
+    private String transportBusinessLicenseFilename;
+    private String transportBusinessLicenseOtherFilename;
+    private String transportBusinessLicense;
+    private String businessHouseholdsName;
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getIdCard() {
+        return idCard;
+    }
+
+    public void setIdCard(String idCard) {
+        this.idCard = idCard;
+    }
+
+    public String getPhone() {
+        return phone;
+    }
+
+    public void setPhone(String phone) {
+        this.phone = phone;
+    }
+
+    public String getIdCardFrontFilename() {
+        return idCardFrontFilename;
+    }
+
+    public void setIdCardFrontFilename(String idCardFrontFilename) {
+        this.idCardFrontFilename = idCardFrontFilename;
+    }
+
+    public String getIdCardBackFilename() {
+        return idCardBackFilename;
+    }
+
+    public void setIdCardBackFilename(String idCardBackFilename) {
+        this.idCardBackFilename = idCardBackFilename;
+    }
+
+    public Long getIdCardBeginTime() {
+        return idCardBeginTime;
+    }
+
+    public void setIdCardBeginTime(Long idCardBeginTime) {
+        this.idCardBeginTime = idCardBeginTime;
+    }
+
+    public Long getIdCardEndTime() {
+        return idCardEndTime;
+    }
+
+    public void setIdCardEndTime(Long idCardEndTime) {
+        this.idCardEndTime = idCardEndTime;
+    }
+
+    public String getAddress() {
+        return address;
+    }
+
+    public void setAddress(String address) {
+        this.address = address;
+    }
+
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    public String getBusinessLicenseFilename() {
+        return businessLicenseFilename;
+    }
+
+    public void setBusinessLicenseFilename(String businessLicenseFilename) {
+        this.businessLicenseFilename = businessLicenseFilename;
+    }
+
+    public String getBankDeposit() {
+        return bankDeposit;
+    }
+
+    public void setBankDeposit(String bankDeposit) {
+        this.bankDeposit = bankDeposit;
+    }
+
+    public String getBankCardNumber() {
+        return bankCardNumber;
+    }
+
+    public void setBankCardNumber(String bankCardNumber) {
+        this.bankCardNumber = bankCardNumber;
+    }
+
+    public String getBranch() {
+        return branch;
+    }
+
+    public void setBranch(String branch) {
+        this.branch = branch;
+    }
+
+    public String getLegalName() {
+        return legalName;
+    }
+
+    public void setLegalName(String legalName) {
+        this.legalName = legalName;
+    }
+
+    public String getTransportBusinessLicenseFilename() {
+        return transportBusinessLicenseFilename;
+    }
+
+    public void setTransportBusinessLicenseFilename(String transportBusinessLicenseFilename) {
+        this.transportBusinessLicenseFilename = transportBusinessLicenseFilename;
+    }
+
+    public String getTransportBusinessLicenseOtherFilename() {
+        return transportBusinessLicenseOtherFilename;
+    }
+
+    public void setTransportBusinessLicenseOtherFilename(String transportBusinessLicenseOtherFilename) {
+        this.transportBusinessLicenseOtherFilename = transportBusinessLicenseOtherFilename;
+    }
+
+    public String getTransportBusinessLicense() {
+        return transportBusinessLicense;
+    }
+
+    public void setTransportBusinessLicense(String transportBusinessLicense) {
+        this.transportBusinessLicense = transportBusinessLicense;
+    }
+
+    public String getBusinessHouseholdsName() {
+        return businessHouseholdsName;
+    }
+
+    public void setBusinessHouseholdsName(String businessHouseholdsName) {
+        this.businessHouseholdsName = businessHouseholdsName;
+    }
+}

+ 229 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/DriverCarUtil.java

@@ -0,0 +1,229 @@
+package com.yh.saas.plugin.yiliangyiyun.util;
+
+public class DriverCarUtil {
+    private String carLicensePlate;
+    private String owner;
+    private String identifyCode;
+    private String drivingLicenseMainFilename;
+    private String drivingLicenseSideFilename;
+    private String transportLicenseMainFilename;
+    private String transportLicenseSideFilename;
+    private String truckTypeCode;
+    private Integer plateColor;
+    private String energyType;
+    private Long registerDate;
+    private Long expireDate;
+    private Long issueDate;
+    private String issueOrganization;
+    private String useNature;
+    private Integer loadWeight;
+    private Integer totalWeight;
+    private String fileNumber;
+    private Integer outlineDimensionLength;
+    private Integer outlineDimensionWidth;
+    private Integer outlineDimensionHeight;
+    private String trailerPlateNumber;
+    private String businessName;
+    private String roadTransportNumber;
+    private String roadTransportPermitNumber;
+
+    public String getCarLicensePlate() {
+        return carLicensePlate;
+    }
+
+    public void setCarLicensePlate(String carLicensePlate) {
+        this.carLicensePlate = carLicensePlate;
+    }
+
+    public String getOwner() {
+        return owner;
+    }
+
+    public void setOwner(String owner) {
+        this.owner = owner;
+    }
+
+    public String getIdentifyCode() {
+        return identifyCode;
+    }
+
+    public void setIdentifyCode(String identifyCode) {
+        this.identifyCode = identifyCode;
+    }
+
+    public String getDrivingLicenseMainFilename() {
+        return drivingLicenseMainFilename;
+    }
+
+    public void setDrivingLicenseMainFilename(String drivingLicenseMainFilename) {
+        this.drivingLicenseMainFilename = drivingLicenseMainFilename;
+    }
+
+    public String getDrivingLicenseSideFilename() {
+        return drivingLicenseSideFilename;
+    }
+
+    public void setDrivingLicenseSideFilename(String drivingLicenseSideFilename) {
+        this.drivingLicenseSideFilename = drivingLicenseSideFilename;
+    }
+
+    public String getTransportLicenseMainFilename() {
+        return transportLicenseMainFilename;
+    }
+
+    public void setTransportLicenseMainFilename(String transportLicenseMainFilename) {
+        this.transportLicenseMainFilename = transportLicenseMainFilename;
+    }
+
+    public String getTransportLicenseSideFilename() {
+        return transportLicenseSideFilename;
+    }
+
+    public void setTransportLicenseSideFilename(String transportLicenseSideFilename) {
+        this.transportLicenseSideFilename = transportLicenseSideFilename;
+    }
+
+    public String getTruckTypeCode() {
+        return truckTypeCode;
+    }
+
+    public void setTruckTypeCode(String truckTypeCode) {
+        this.truckTypeCode = truckTypeCode;
+    }
+
+    public Integer getPlateColor() {
+        return plateColor;
+    }
+
+    public void setPlateColor(Integer plateColor) {
+        this.plateColor = plateColor;
+    }
+
+    public String getEnergyType() {
+        return energyType;
+    }
+
+    public void setEnergyType(String energyType) {
+        this.energyType = energyType;
+    }
+
+    public Long getRegisterDate() {
+        return registerDate;
+    }
+
+    public void setRegisterDate(Long registerDate) {
+        this.registerDate = registerDate;
+    }
+
+    public Long getExpireDate() {
+        return expireDate;
+    }
+
+    public void setExpireDate(Long expireDate) {
+        this.expireDate = expireDate;
+    }
+
+    public Long getIssueDate() {
+        return issueDate;
+    }
+
+    public void setIssueDate(Long issueDate) {
+        this.issueDate = issueDate;
+    }
+
+    public String getIssueOrganization() {
+        return issueOrganization;
+    }
+
+    public void setIssueOrganization(String issueOrganization) {
+        this.issueOrganization = issueOrganization;
+    }
+
+    public String getUseNature() {
+        return useNature;
+    }
+
+    public void setUseNature(String useNature) {
+        this.useNature = useNature;
+    }
+
+    public Integer getLoadWeight() {
+        return loadWeight;
+    }
+
+    public void setLoadWeight(Integer loadWeight) {
+        this.loadWeight = loadWeight;
+    }
+
+    public Integer getTotalWeight() {
+        return totalWeight;
+    }
+
+    public void setTotalWeight(Integer totalWeight) {
+        this.totalWeight = totalWeight;
+    }
+
+    public String getFileNumber() {
+        return fileNumber;
+    }
+
+    public void setFileNumber(String fileNumber) {
+        this.fileNumber = fileNumber;
+    }
+
+    public Integer getOutlineDimensionLength() {
+        return outlineDimensionLength;
+    }
+
+    public void setOutlineDimensionLength(Integer outlineDimensionLength) {
+        this.outlineDimensionLength = outlineDimensionLength;
+    }
+
+    public Integer getOutlineDimensionWidth() {
+        return outlineDimensionWidth;
+    }
+
+    public void setOutlineDimensionWidth(Integer outlineDimensionWidth) {
+        this.outlineDimensionWidth = outlineDimensionWidth;
+    }
+
+    public Integer getOutlineDimensionHeight() {
+        return outlineDimensionHeight;
+    }
+
+    public void setOutlineDimensionHeight(Integer outlineDimensionHeight) {
+        this.outlineDimensionHeight = outlineDimensionHeight;
+    }
+
+    public String getTrailerPlateNumber() {
+        return trailerPlateNumber;
+    }
+
+    public void setTrailerPlateNumber(String trailerPlateNumber) {
+        this.trailerPlateNumber = trailerPlateNumber;
+    }
+
+    public String getBusinessName() {
+        return businessName;
+    }
+
+    public void setBusinessName(String businessName) {
+        this.businessName = businessName;
+    }
+
+    public String getRoadTransportNumber() {
+        return roadTransportNumber;
+    }
+
+    public void setRoadTransportNumber(String roadTransportNumber) {
+        this.roadTransportNumber = roadTransportNumber;
+    }
+
+    public String getRoadTransportPermitNumber() {
+        return roadTransportPermitNumber;
+    }
+
+    public void setRoadTransportPermitNumber(String roadTransportPermitNumber) {
+        this.roadTransportPermitNumber = roadTransportPermitNumber;
+    }
+}

+ 166 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/DriverUtil.java

@@ -0,0 +1,166 @@
+package com.yh.saas.plugin.yiliangyiyun.util;
+
+public class DriverUtil {
+    private String name;
+    private String phone;
+    private String idCard;
+    private String address;
+    private Long idCardStartDate;
+    private Long idCardEndDate;
+    private String driverLicenseNumber;
+    private String driveType;
+    private Long driverLicenseStartDate;
+    private Long driverLicenseEndDate;
+    private String driverLicenseIssueOrganization;
+    private String idCardIssueOrganization;
+    private String qualificationNumber;
+    private String idCardFrontFilename;
+    private String idCardBackFilename;
+    private String licenseFilename;
+    private String qualificationLicenceMainFilename;
+    private String qualificationLicenceSideFilename;
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getPhone() {
+        return phone;
+    }
+
+    public void setPhone(String phone) {
+        this.phone = phone;
+    }
+
+    public String getIdCard() {
+        return idCard;
+    }
+
+    public void setIdCard(String idCard) {
+        this.idCard = idCard;
+    }
+
+    public String getAddress() {
+        return address;
+    }
+
+    public void setAddress(String address) {
+        this.address = address;
+    }
+
+    public String getIdCardFrontFilename() {
+        return idCardFrontFilename;
+    }
+
+    public void setIdCardFrontFilename(String idCardFrontFilename) {
+        this.idCardFrontFilename = idCardFrontFilename;
+    }
+
+    public Long getIdCardStartDate() {
+        return idCardStartDate;
+    }
+
+    public void setIdCardStartDate(Long idCardStartDate) {
+        this.idCardStartDate = idCardStartDate;
+    }
+
+    public Long getIdCardEndDate() {
+        return idCardEndDate;
+    }
+
+    public void setIdCardEndDate(Long idCardEndDate) {
+        this.idCardEndDate = idCardEndDate;
+    }
+
+    public String getDriverLicenseNumber() {
+        return driverLicenseNumber;
+    }
+
+    public void setDriverLicenseNumber(String driverLicenseNumber) {
+        this.driverLicenseNumber = driverLicenseNumber;
+    }
+
+    public String getDriveType() {
+        return driveType;
+    }
+
+    public void setDriveType(String driveType) {
+        this.driveType = driveType;
+    }
+
+    public Long getDriverLicenseStartDate() {
+        return driverLicenseStartDate;
+    }
+
+    public void setDriverLicenseStartDate(Long driverLicenseStartDate) {
+        this.driverLicenseStartDate = driverLicenseStartDate;
+    }
+
+    public Long getDriverLicenseEndDate() {
+        return driverLicenseEndDate;
+    }
+
+    public void setDriverLicenseEndDate(Long driverLicenseEndDate) {
+        this.driverLicenseEndDate = driverLicenseEndDate;
+    }
+
+    public String getDriverLicenseIssueOrganization() {
+        return driverLicenseIssueOrganization;
+    }
+
+    public void setDriverLicenseIssueOrganization(String driverLicenseIssueOrganization) {
+        this.driverLicenseIssueOrganization = driverLicenseIssueOrganization;
+    }
+
+    public String getIdCardIssueOrganization() {
+        return idCardIssueOrganization;
+    }
+
+    public void setIdCardIssueOrganization(String idCardIssueOrganization) {
+        this.idCardIssueOrganization = idCardIssueOrganization;
+    }
+
+    public String getQualificationNumber() {
+        return qualificationNumber;
+    }
+
+    public void setQualificationNumber(String qualificationNumber) {
+        this.qualificationNumber = qualificationNumber;
+    }
+
+    public String getIdCardBackFilename() {
+        return idCardBackFilename;
+    }
+
+    public void setIdCardBackFilename(String idCardBackFilename) {
+        this.idCardBackFilename = idCardBackFilename;
+    }
+
+    public String getLicenseFilename() {
+        return licenseFilename;
+    }
+
+    public void setLicenseFilename(String licenseFilename) {
+        this.licenseFilename = licenseFilename;
+    }
+
+    public String getQualificationLicenceMainFilename() {
+        return qualificationLicenceMainFilename;
+    }
+
+    public void setQualificationLicenceMainFilename(String qualificationLicenceMainFilename) {
+        this.qualificationLicenceMainFilename = qualificationLicenceMainFilename;
+    }
+
+    public String getQualificationLicenceSideFilename() {
+        return qualificationLicenceSideFilename;
+    }
+
+    public void setQualificationLicenceSideFilename(String qualificationLicenceSideFilename) {
+        this.qualificationLicenceSideFilename = qualificationLicenceSideFilename;
+    }
+}

+ 85 - 68
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/EntityAnalyse.java

@@ -138,6 +138,7 @@ public class EntityAnalyse {
             image.delete();
         }
     }
+
     /**
      * 批量上传文件
      *
@@ -147,7 +148,7 @@ public class EntityAnalyse {
      */
     public static String[] uploadImageList(List<File> list, String token, String ENV) throws IOException {
         String[] dataResult = new String[list.size()];
-        for(int i=0;i<list.size();i++){
+        for (int i = 0; i < list.size(); i++) {
             File image = list.get(i);
             String url = "";
             if ("3".equals(ENV)) {
@@ -563,8 +564,8 @@ public class EntityAnalyse {
 
         //保险信息
         JSONObject insuranceInformation = new JSONObject();
-        insuranceInformation.put("policyNumber", orderInfo.getPolicyNo() != null ? orderInfo.getPolicyNo() : "");
-        insuranceInformation.put("insuranceCompanyCode", orderInfo.getInsuranceCompanyCode() != null ? orderInfo.getInsuranceCompanyCode() : "");
+        insuranceInformation.put("policyNumber", orderInfo.getPolicyNo() != null ? orderInfo.getPolicyNo() : "none");
+        insuranceInformation.put("insuranceCompanyCode", orderInfo.getInsuranceCompanyCode() != null ? orderInfo.getInsuranceCompanyCode() : "none");
         params.put("insuranceInformation", insuranceInformation);
 
         params.put("remark", orderInfo.getRemark() != null ? orderInfo.getRemark() : "");
@@ -722,24 +723,28 @@ public class EntityAnalyse {
             // 执行请求操作,并拿到结果(同步阻塞)
             String body = EntityUtils.toString(httpClient.execute(httpPost).getEntity());
             JSONObject jsonObject = JSONObject.parseObject(body);
-            if ("异常".equals(jsonObject.getJSONArray("result").getJSONObject(0).getString("validateStatus"))) {
-                JSONArray jsonArray = jsonObject.getJSONArray("result").getJSONObject(0).getJSONArray("validateResult");
-                String result = "";
-                for (int i = 0; i < jsonArray.size(); i++) {
-                    if ("异常".equals(jsonArray.getJSONObject(i).getString("flag"))) {
-                        result = result + jsonArray.getJSONObject(i).getString("message");
+            if ("1001".equals(jsonObject.getString("status"))) {
+                if ("异常".equals(jsonObject.getJSONArray("result").getJSONObject(0).getString("validateStatus"))) {
+                    JSONArray jsonArray = jsonObject.getJSONArray("result").getJSONObject(0).getJSONArray("validateResult");
+                    String result = "";
+                    for (int i = 0; i < jsonArray.size(); i++) {
+                        if ("异常".equals(jsonArray.getJSONObject(i).getString("flag"))) {
+                            result = result + jsonArray.getJSONObject(i).getString("message");
+                        }
                     }
+                    System.out.println("result = " + result);
+                    return result;
+                } else if ("待校验".equals(jsonObject.getJSONArray("result").getJSONObject(0).getString("validateStatus"))) {
+                    String result = "待校验";
+                    System.out.println("result = " + result);
+                    return result;
+                } else if ("通过".equals(jsonObject.getJSONArray("result").getJSONObject(0).getString("validateStatus"))) {
+                    String result = (jsonObject.getJSONArray("result").getJSONObject(0).getString("validateStatus"));
+                    System.out.println("result = " + result);
+                    return result;
                 }
-                System.out.println("result = " + result);
-                return result;
-            } else if ("待校验".equals(jsonObject.getJSONArray("result").getJSONObject(0).getString("validateStatus"))) {
-                String result = "待校验";
-                System.out.println("result = " + result);
-                return result;
-            } else if ("通过".equals(jsonObject.getJSONArray("result").getJSONObject(0).getString("validateStatus"))) {
-                String result = (jsonObject.getJSONArray("result").getJSONObject(0).getString("validateStatus"));
-                System.out.println("result = " + result);
-                return result;
+            } else {
+                return "系统异常";
             }
         } catch (Exception e) {
             throw e;
@@ -783,24 +788,28 @@ public class EntityAnalyse {
             // 执行请求操作,并拿到结果(同步阻塞)
             String body = EntityUtils.toString(httpClient.execute(httpPost).getEntity());
             JSONObject jsonObject = JSONObject.parseObject(body);
-            if ("异常".equals(jsonObject.getJSONArray("result").getJSONObject(0).getString("validateStatus"))) {
-                JSONArray jsonArray = jsonObject.getJSONArray("result").getJSONObject(0).getJSONArray("validateResult");
-                String result = "";
-                for (int i = 0; i < jsonArray.size(); i++) {
-                    if ("异常".equals(jsonArray.getJSONObject(i).getString("flag"))) {
-                        result = result + jsonArray.getJSONObject(i).getString("message");
+            if ("1001".equals(jsonObject.getString("status"))) {
+                if ("异常".equals(jsonObject.getJSONArray("result").getJSONObject(0).getString("validateStatus"))) {
+                    JSONArray jsonArray = jsonObject.getJSONArray("result").getJSONObject(0).getJSONArray("validateResult");
+                    String result = "";
+                    for (int i = 0; i < jsonArray.size(); i++) {
+                        if ("异常".equals(jsonArray.getJSONObject(i).getString("flag"))) {
+                            result = result + jsonArray.getJSONObject(i).getString("message");
+                        }
                     }
+                    System.out.println("result = " + result);
+                    return result;
+                } else if ("待校验".equals(jsonObject.getJSONArray("result").getJSONObject(0).getString("validateStatus"))) {
+                    String result = "待校验";
+                    System.out.println("result = " + result);
+                    return result;
+                } else if ("通过".equals(jsonObject.getJSONArray("result").getJSONObject(0).getString("validateStatus"))) {
+                    String result = (jsonObject.getJSONArray("result").getJSONObject(0).getString("validateStatus"));
+                    System.out.println("result = " + result);
+                    return result;
                 }
-                System.out.println("result = " + result);
-                return result;
-            } else if ("待校验".equals(jsonObject.getJSONArray("result").getJSONObject(0).getString("validateStatus"))) {
-                String result = "待校验";
-                System.out.println("result = " + result);
-                return result;
-            } else if ("通过".equals(jsonObject.getJSONArray("result").getJSONObject(0).getString("validateStatus"))) {
-                String result = (jsonObject.getJSONArray("result").getJSONObject(0).getString("validateStatus"));
-                System.out.println("result = " + result);
-                return result;
+            } else {
+                return "系统异常";
             }
         } catch (Exception e) {
             throw e;
@@ -840,24 +849,28 @@ public class EntityAnalyse {
             // 执行请求操作,并拿到结果(同步阻塞)
             String body = EntityUtils.toString(httpClient.execute(httpPost).getEntity());
             JSONObject jsonObject = JSONObject.parseObject(body);
-            if ("异常".equals(jsonObject.getJSONArray("result").getJSONObject(0).getString("validateStatus"))) {
-                JSONArray jsonArray = jsonObject.getJSONArray("result").getJSONObject(0).getJSONArray("validateResult");
-                String result = "";
-                for (int i = 0; i < jsonArray.size(); i++) {
-                    if ("异常".equals(jsonArray.getJSONObject(i).getString("flag"))) {
-                        result = result + jsonArray.getJSONObject(i).getString("message");
+            if ("1001".equals(jsonObject.getString("status"))) {
+                if ("异常".equals(jsonObject.getJSONArray("result").getJSONObject(0).getString("validateStatus"))) {
+                    JSONArray jsonArray = jsonObject.getJSONArray("result").getJSONObject(0).getJSONArray("validateResult");
+                    String result = "";
+                    for (int i = 0; i < jsonArray.size(); i++) {
+                        if ("异常".equals(jsonArray.getJSONObject(i).getString("flag"))) {
+                            result = result + jsonArray.getJSONObject(i).getString("message");
+                        }
                     }
+                    System.out.println("result = " + result);
+                    return result;
+                } else if ("待校验".equals(jsonObject.getJSONArray("result").getJSONObject(0).getString("validateStatus"))) {
+                    String result = "待校验";
+                    System.out.println("result = " + result);
+                    return result;
+                } else if ("通过".equals(jsonObject.getJSONArray("result").getJSONObject(0).getString("validateStatus"))) {
+                    String result = (jsonObject.getJSONArray("result").getJSONObject(0).getString("validateStatus"));
+                    System.out.println("result = " + result);
+                    return result;
                 }
-                System.out.println("result = " + result);
-                return result;
-            } else if ("待校验".equals(jsonObject.getJSONArray("result").getJSONObject(0).getString("validateStatus"))) {
-                String result = "待校验";
-                System.out.println("result = " + result);
-                return result;
-            } else if ("通过".equals(jsonObject.getJSONArray("result").getJSONObject(0).getString("validateStatus"))) {
-                String result = (jsonObject.getJSONArray("result").getJSONObject(0).getString("validateStatus"));
-                System.out.println("result = " + result);
-                return result;
+            } else {
+                return "系统异常";
             }
         } catch (Exception e) {
             throw e;
@@ -1398,6 +1411,7 @@ public class EntityAnalyse {
         File file = writeImageToDisk(getImageFromNetByUrl(url));
         return file;
     }
+
     /**
      * url资源转化为file流
      *
@@ -1414,27 +1428,26 @@ public class EntityAnalyse {
             int pageCount = doc.getNumberOfPages();
 
             //pdf转图片后分块
-            int number = pageCount/6 + 1;
+            int number = pageCount / 6 + 1;
             //保存文件标识
             boolean flag = true;
             //管局最多上传6张图片
             for (int i = 0; i < 6; i++) {
                 BufferedImage image = null;
-                for(int j=i*number;j<(i+1)*number;j++){
-                    if(j>=pageCount){
+                for (int j = i * number; j < (i + 1) * number; j++) {
+                    if (j >= pageCount) {
                         flag = false;
                         break;
                     }
-                    if(j == 0){
+                    if (j == 0) {
                         image = renderer.renderImageWithDPI(j, 72);
-                    }
-                    else{
+                    } else {
                         BufferedImage tmpImage = renderer.renderImageWithDPI(j, 72);
-                        image = mergeImage(image,tmpImage,true,true,true,0,null);
+                        image = mergeImage(image, tmpImage, true, true, true, 0, null);
                     }
                 }
-                if(flag){
-                    file = new File("templates" + File.separator + "tmpPdf"+i+".png");
+                if (flag) {
+                    file = new File("templates" + File.separator + "tmpPdf" + i + ".png");
                     ImageIO.write(image, "png", file);
                     list.add(file);
                 }
@@ -1445,6 +1458,7 @@ public class EntityAnalyse {
         }
         return list;
     }
+
     public static byte[] getImageStream(File file) {
         byte[] buffer = null;
         FileInputStream fis;
@@ -1459,12 +1473,12 @@ public class EntityAnalyse {
             fis.close();
             bos.close();
             buffer = bos.toByteArray();
-            if(file.exists()) {
+            if (file.exists()) {
                 file.delete();
             }
         } catch (FileNotFoundException e) {
             e.printStackTrace();
-        }catch (IOException e) {
+        } catch (IOException e) {
             e.printStackTrace();
         }
         return buffer;
@@ -1497,13 +1511,14 @@ public class EntityAnalyse {
 
     /**
      * 合并两个图片
-     * @param first 图片1
-     * @param second 图片2
-     * @param horizontal 等于true,则两个图片水平合并显示, 否则两个图片垂直合并显示
-     * @param center 图片是否水平居中, horizontal 等于 false 垂直合并才有效
+     *
+     * @param first       图片1
+     * @param second      图片2
+     * @param horizontal  等于true,则两个图片水平合并显示, 否则两个图片垂直合并显示
+     * @param center      图片是否水平居中, horizontal 等于 false 垂直合并才有效
      * @param transparent 合并后的图片背景是否透明色
-     * @param gap 图片之间的间距
-     * @param color 图片的背景颜色
+     * @param gap         图片之间的间距
+     * @param color       图片的背景颜色
      * @return 返回合并之后的图片
      */
     public static BufferedImage mergeImage(BufferedImage first, BufferedImage second, boolean horizontal, boolean center, boolean transparent, int gap, Color color) throws IOException {
@@ -1571,6 +1586,7 @@ public class EntityAnalyse {
         // 返回合并后的图片对象
         return target;
     }
+
     /**
      * 将获取的字节数组保存为文件写入硬盘
      *
@@ -1594,6 +1610,7 @@ public class EntityAnalyse {
         }
         return null;
     }
+
     /**
      * 将获取的字节数组保存为文件写入硬盘
      *

+ 76 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/LoadUtil.java

@@ -0,0 +1,76 @@
+package com.yh.saas.plugin.yiliangyiyun.util;
+
+public class LoadUtil {
+    private String shippingNoteNumber;
+    private String serialNumber;
+    private String longitude;
+    private String latitude;
+    private Integer type;
+    private Integer state;
+    private String errorCode;
+    private String errorMsg;
+
+    public String getShippingNoteNumber() {
+        return shippingNoteNumber;
+    }
+
+    public void setShippingNoteNumber(String shippingNoteNumber) {
+        this.shippingNoteNumber = shippingNoteNumber;
+    }
+
+    public String getSerialNumber() {
+        return serialNumber;
+    }
+
+    public void setSerialNumber(String serialNumber) {
+        this.serialNumber = serialNumber;
+    }
+
+    public String getLongitude() {
+        return longitude;
+    }
+
+    public void setLongitude(String longitude) {
+        this.longitude = longitude;
+    }
+
+    public String getLatitude() {
+        return latitude;
+    }
+
+    public void setLatitude(String latitude) {
+        this.latitude = latitude;
+    }
+
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    public Integer getState() {
+        return state;
+    }
+
+    public void setState(Integer state) {
+        this.state = state;
+    }
+
+    public String getErrorCode() {
+        return errorCode;
+    }
+
+    public void setErrorCode(String errorCode) {
+        this.errorCode = errorCode;
+    }
+
+    public String getErrorMsg() {
+        return errorMsg;
+    }
+
+    public void setErrorMsg(String errorMsg) {
+        this.errorMsg = errorMsg;
+    }
+}

+ 135 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/OrderUtil.java

@@ -0,0 +1,135 @@
+package com.yh.saas.plugin.yiliangyiyun.util;
+
+import com.alibaba.fastjson.JSONObject;
+import com.yh.saas.plugin.yiliangyiyun.entity.OrderInfo;
+import com.yh.saas.plugin.yiliangyiyun.entity.view.GoodsInfo;
+
+public class OrderUtil {
+    private Long transportBillTime;
+    private Long loadingDateTimestamp;
+    private Long unloadingDateTimestamp;
+    private String projectName;
+    private String routeName;
+    private String shipperTransportBillNumber;
+    private Integer transportBusinessType;
+    private String insuranceCompany;
+    private String policyNumber;
+    private String remark;
+
+    private JSONObject shipperInfoDTO;
+    private JSONObject addressInfoDTO;
+    private JSONObject goodsInfoDTO;
+    private JSONObject carrierInfoDTO;
+
+    public JSONObject getShipperInfoDTO() {
+        return shipperInfoDTO;
+    }
+
+    public void setShipperInfoDTO(JSONObject shipperInfoDTO) {
+        this.shipperInfoDTO = shipperInfoDTO;
+    }
+
+    public JSONObject getAddressInfoDTO() {
+        return addressInfoDTO;
+    }
+
+    public void setAddressInfoDTO(JSONObject addressInfoDTO) {
+        this.addressInfoDTO = addressInfoDTO;
+    }
+
+    public JSONObject getGoodsInfoDTO() {
+        return goodsInfoDTO;
+    }
+
+    public void setGoodsInfoDTO(JSONObject goodsInfoDTO) {
+        this.goodsInfoDTO = goodsInfoDTO;
+    }
+
+    public JSONObject getCarrierInfoDTO() {
+        return carrierInfoDTO;
+    }
+
+    public void setCarrierInfoDTO(JSONObject carrierInfoDTO) {
+        this.carrierInfoDTO = carrierInfoDTO;
+    }
+
+    public Long getTransportBillTime() {
+        return transportBillTime;
+    }
+
+    public void setTransportBillTime(Long transportBillTime) {
+        this.transportBillTime = transportBillTime;
+    }
+
+    public Long getLoadingDateTimestamp() {
+        return loadingDateTimestamp;
+    }
+
+    public void setLoadingDateTimestamp(Long loadingDateTimestamp) {
+        this.loadingDateTimestamp = loadingDateTimestamp;
+    }
+
+    public Long getUnloadingDateTimestamp() {
+        return unloadingDateTimestamp;
+    }
+
+    public void setUnloadingDateTimestamp(Long unloadingDateTimestamp) {
+        this.unloadingDateTimestamp = unloadingDateTimestamp;
+    }
+
+    public String getProjectName() {
+        return projectName;
+    }
+
+    public void setProjectName(String projectName) {
+        this.projectName = projectName;
+    }
+
+    public String getRouteName() {
+        return routeName;
+    }
+
+    public void setRouteName(String routeName) {
+        this.routeName = routeName;
+    }
+
+    public String getShipperTransportBillNumber() {
+        return shipperTransportBillNumber;
+    }
+
+    public void setShipperTransportBillNumber(String shipperTransportBillNumber) {
+        this.shipperTransportBillNumber = shipperTransportBillNumber;
+    }
+
+    public Integer getTransportBusinessType() {
+        return transportBusinessType;
+    }
+
+    public void setTransportBusinessType(Integer transportBusinessType) {
+        this.transportBusinessType = transportBusinessType;
+    }
+
+    public String getInsuranceCompany() {
+        return insuranceCompany;
+    }
+
+    public void setInsuranceCompany(String insuranceCompany) {
+        this.insuranceCompany = insuranceCompany;
+    }
+
+    public String getPolicyNumber() {
+        return policyNumber;
+    }
+
+    public void setPolicyNumber(String policyNumber) {
+        this.policyNumber = policyNumber;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+}

+ 58 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/util/SettlementUtil.java

@@ -0,0 +1,58 @@
+package com.yh.saas.plugin.yiliangyiyun.util;
+
+public class SettlementUtil {
+    private String name;
+    private String phone;
+    private String idCard;
+    private Integer type;
+    private String bankCardNumber;
+    private String bankDeposit;
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getPhone() {
+        return phone;
+    }
+
+    public void setPhone(String phone) {
+        this.phone = phone;
+    }
+
+    public String getIdCard() {
+        return idCard;
+    }
+
+    public void setIdCard(String idCard) {
+        this.idCard = idCard;
+    }
+
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    public String getBankCardNumber() {
+        return bankCardNumber;
+    }
+
+    public void setBankCardNumber(String bankCardNumber) {
+        this.bankCardNumber = bankCardNumber;
+    }
+
+    public String getBankDeposit() {
+        return bankDeposit;
+    }
+
+    public void setBankDeposit(String bankDeposit) {
+        this.bankDeposit = bankDeposit;
+    }
+}

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

@@ -0,0 +1,667 @@
+package com.yh.saas.plugin.yiliangyiyun.util;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.alibaba.fastjson.TypeReference;
+import com.aliyun.oss.ServiceException;
+import com.baomidou.mybatisplus.mapper.EntityWrapper;
+import com.yh.saas.plugin.yiliangyiyun.entity.*;
+import com.yh.saas.plugin.yiliangyiyun.entity.view.DistinguishView;
+import com.yh.saas.plugin.yiliangyiyun.entity.view.DriverInfo;
+import com.yh.saas.plugin.yiliangyiyun.service.ICommonSysParameterService;
+import com.yh.saas.plugin.yiliangyiyun.service.IDriverInfoService;
+import com.yh.saas.plugin.yiliangyiyun.service.IHyCarCaptainInfoService;
+import org.apache.http.HttpEntity;
+import org.apache.http.HttpResponse;
+import org.apache.http.NameValuePair;
+import org.apache.http.client.entity.UrlEncodedFormEntity;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
+import org.apache.http.entity.ContentType;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.entity.mime.MultipartEntityBuilder;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.message.BasicNameValuePair;
+import org.apache.http.ssl.SSLContexts;
+import org.apache.http.util.EntityUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.PostConstruct;
+import javax.crypto.Mac;
+import javax.crypto.spec.SecretKeySpec;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.TrustManager;
+import javax.net.ssl.X509TrustManager;
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStream;
+import java.nio.charset.StandardCharsets;
+import java.security.SecureRandom;
+import java.security.cert.X509Certificate;
+import java.text.DecimalFormat;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+@Component
+public class UplodeUtil {
+    @Autowired
+    private ICommonSysParameterService commonSysParameterService;
+    @Autowired
+    private IDriverInfoService driverInfoService;
+    @Autowired
+    private IHyCarCaptainInfoService carCaptainInfoService;
+
+    public static UplodeUtil uplodeUtil;
+    @PostConstruct
+    public void init(){
+        uplodeUtil=this;
+    }
+
+    private static String charSet = "UTF-8";
+    private static String appid = "khy21062900750001";
+    private static String secret = "638328d345a04f4f9aa8af6b0c79f536";
+    private static String baseUrl = "https://tosb-gateway.wlhyos.pre.xiaokuaikeji.com/tosb/";
+
+//    public static void main(String[] args) throws Exception {
+//        Driver driver = new Driver();
+//        driver.setName("张三");
+//        driver.setPhone("13500000000");
+//        driver.setIdCard("450902193607014875");
+//        // 身份证照片,先上传然后获取文件名之后再填充
+//        String idCardFrontFilename = postFile(getFileInputStream(), "身份证.jpeg");
+//        driver.setIdCardFrontFilename(idCardFrontFilename);
+//
+//        String driverJson = JSON.toJSONString(driver);
+//
+//        String result = postJson("driver/create", driverJson);
+//
+//        System.out.println(result);
+//    }
+
+
+    /**
+     * 司机信息上报
+     * @param hyDriverInfo
+     * @throws Exception
+     */
+    public static String uploadDriver(HyDriverInfo hyDriverInfo) throws Exception {
+        SimpleDateFormat formatter = new SimpleDateFormat( "yyyy-MM-dd");
+        SimpleDateFormat formatter2 = new SimpleDateFormat( "yyyy.MM.dd");
+        SimpleDateFormat formatter1 = new SimpleDateFormat( "yyyy年MM月dd日");
+        DriverUtil driverUtil = new DriverUtil();
+        driverUtil.setName(hyDriverInfo.getDriverName());
+        driverUtil.setPhone(hyDriverInfo.getDriverPhone());
+        driverUtil.setIdCard(hyDriverInfo.getNumberCard());
+        driverUtil.setAddress(hyDriverInfo.getCardAddress());
+        //身份证截止日期
+        Date date=formatter.parse(hyDriverInfo.getCardValidityDate());
+        String endDate=formatter1.format(date);
+//        //获取有效期止前二十年
+//        Calendar calendar = Calendar.getInstance();
+//        calendar.setTime(date);
+//        calendar.add(Calendar.YEAR,-20);
+//        Date newDate=calendar.getTime();
+//        String startDate=formatter1.format(newDate);
+        DistinguishView distinguishView=UplodeUtil.personShibie(hyDriverInfo.getCardBackAddressUrl(),"2");
+        String time = distinguishView.getIdCardValidity().substring(0, distinguishView.getIdCardValidity().indexOf('-'));
+        Date date2=formatter2.parse(time);
+        //身份证起始日期
+        String startDate=formatter1.format(date2);
+        driverUtil.setIdCardStartDate(formatter1.parse(startDate).getTime());
+        driverUtil.setIdCardEndDate(formatter1.parse(endDate).getTime());
+        driverUtil.setDriverLicenseNumber(hyDriverInfo.getNumberCard());
+        driverUtil.setDriveType(hyDriverInfo.getQuasiDrivingVehicle());
+        driverUtil.setDriverLicenseStartDate(hyDriverInfo.getDriverLicenseValidityStartDate().getTime());
+        Date date1=formatter.parse(hyDriverInfo.getDriverLicenseValidityDate());
+        String now1=formatter1.format(date1);
+        driverUtil.setDriverLicenseEndDate(formatter1.parse(now1).getTime());
+        driverUtil.setDriverLicenseIssueOrganization(hyDriverInfo.getLssuingAuthority());
+        driverUtil.setIdCardIssueOrganization("");
+        driverUtil.setQualificationNumber(hyDriverInfo.getQualificationCertificateNumber());
+        driverUtil.setIdCardFrontFilename(UplodeUtil.postFile(new ByteArrayInputStream(hyDriverInfo.getCardAddressUrl().getBytes()), "身份证正面照.jpeg"));
+        driverUtil.setIdCardBackFilename(UplodeUtil.postFile(new ByteArrayInputStream(hyDriverInfo.getCardBackAddressUrl().getBytes()), "身份证正面照.jpeg"));
+        driverUtil.setLicenseFilename(UplodeUtil.postFile(new ByteArrayInputStream(hyDriverInfo.getDriverLicenseHomePage().getBytes()), "驾驶证主页.jpeg"));
+        driverUtil.setQualificationLicenceMainFilename(UplodeUtil.postFile(new ByteArrayInputStream(hyDriverInfo.getQualificationCertificate().getBytes()), "从业资格证主页.jpeg"));
+        driverUtil.setQualificationLicenceSideFilename("");
+        String driverJson = JSON.toJSONString(driverUtil);
+
+        String result = postJson("driver/create", driverJson);
+
+        System.out.println(result);
+        return result;
+    }
+
+    /**
+     * 车辆信息上报
+     * @param hyDriverCarInfo
+     * @throws Exception
+     */
+    public static String uploadDriverCar(HyDriverCarInfo hyDriverCarInfo) throws Exception {
+        DriverCarUtil driverCarUtil = new DriverCarUtil();
+        driverCarUtil.setCarLicensePlate(hyDriverCarInfo.getCarNumber());
+        driverCarUtil.setOwner(hyDriverCarInfo.getOwner());
+        driverCarUtil.setIdentifyCode(hyDriverCarInfo.getCarCode());
+        driverCarUtil.setDrivingLicenseMainFilename(UplodeUtil.postFile(new ByteArrayInputStream(hyDriverCarInfo.getDrivingLicenseHomePage().getBytes()), "行驶证主页.jpeg"));
+        driverCarUtil.setDrivingLicenseSideFilename(UplodeUtil.postFile(new ByteArrayInputStream(hyDriverCarInfo.getDrivingLicenseBackPage().getBytes()), "行驶证其它页.jpeg"));
+        driverCarUtil.setTransportLicenseMainFilename(UplodeUtil.postFile(new ByteArrayInputStream(hyDriverCarInfo.getOperationCertificate().getBytes()), "运输许可证主页.jpeg"));
+        driverCarUtil.setTransportLicenseSideFilename("");
+        if (hyDriverCarInfo.getVehicleType()!=null){
+            HyCommonSysParameter hyCommonSysParameter = uplodeUtil.commonSysParameterService.selectOne(new EntityWrapper<HyCommonSysParameter>()
+                .eq("const_id", "CAR1").eq("const_value", hyDriverCarInfo.getVehicleType()));
+            if (hyCommonSysParameter!=null) {
+                driverCarUtil.setTruckTypeCode(hyCommonSysParameter.getConstKey());
+            }
+        }
+        if (hyDriverCarInfo.getCarNumberColour()!=null){
+            HyCommonSysParameter hyCommonSysParameter = uplodeUtil.commonSysParameterService.selectOne(new EntityWrapper<HyCommonSysParameter>()
+                    .eq("const_id", "COLOR1").eq("const_value", hyDriverCarInfo.getCarNumberColour()));
+            if (hyCommonSysParameter!=null) {
+                driverCarUtil.setPlateColor(Integer.valueOf(hyCommonSysParameter.getConstKey()));
+            }
+        }
+        if ("汽油".equals(hyDriverCarInfo.getEnergyType())){
+            driverCarUtil.setEnergyType("A");
+        }
+        else if ("柴油".equals(hyDriverCarInfo.getEnergyType())){
+            driverCarUtil.setEnergyType("B");
+        }
+        else if (hyDriverCarInfo.getEnergyType().contains("电")){
+            driverCarUtil.setEnergyType("C");
+        }
+        else{
+            driverCarUtil.setEnergyType("Z");
+        }
+        driverCarUtil.setRegisterDate(hyDriverCarInfo.getDrivingLicenseRegistrationDate().getTime());
+        driverCarUtil.setExpireDate(hyDriverCarInfo.getDrivingLicenseValidityDate().getTime());
+        driverCarUtil.setIssueDate(hyDriverCarInfo.getDrivingLicenseIssueDate().getTime());
+        driverCarUtil.setIssueOrganization(hyDriverCarInfo.getLssuingAuthority());
+        driverCarUtil.setUseNature(hyDriverCarInfo.getUseNature());
+        driverCarUtil.setLoadWeight((int)(hyDriverCarInfo.getCarApprovedWeight()!=null?hyDriverCarInfo.getCarApprovedWeight()*1000:hyDriverCarInfo.getCarTotalWeight()*0.9*1000));
+        driverCarUtil.setTotalWeight((int)(hyDriverCarInfo.getCarTotalWeight()*1000));
+        driverCarUtil.setFileNumber(hyDriverCarInfo.getDrivingLicenseNumber());
+        driverCarUtil.setOutlineDimensionLength((int)Math.round(hyDriverCarInfo.getCarLong()));
+        driverCarUtil.setOutlineDimensionWidth((int)Math.round(hyDriverCarInfo.getCarWidth()));
+        driverCarUtil.setOutlineDimensionHeight((int)Math.round(hyDriverCarInfo.getCarHeight()));
+        driverCarUtil.setTrailerPlateNumber(hyDriverCarInfo.getGuaCarNumber());
+        driverCarUtil.setBusinessName(hyDriverCarInfo.getOwner());
+        driverCarUtil.setRoadTransportNumber(hyDriverCarInfo.getOperationCertificateNumber());
+        driverCarUtil.setRoadTransportPermitNumber(hyDriverCarInfo.getOperationCertificateNumber());
+        String driverCarJson = JSON.toJSONString(driverCarUtil);
+
+        String result = postJson("truck/create", driverCarJson);
+
+        System.out.println(result);
+        return result;
+    }
+
+    /**
+     * 流水单上报
+     * @param hyFreightSettlementInfo
+     * @throws Exception
+     */
+    public static String uploadSettlement(HyFreightSettlementInfo hyFreightSettlementInfo) throws Exception {
+        SettlementUtil settlementUtil = new SettlementUtil();
+        settlementUtil.setName(hyFreightSettlementInfo.getPayeeName());
+        settlementUtil.setPhone("");
+        settlementUtil.setIdCard(hyFreightSettlementInfo.getPayeeIdCard());
+        //默认为1-银行账户
+        settlementUtil.setType(1);
+        settlementUtil.setBankCardNumber(hyFreightSettlementInfo.getBankCard());
+        settlementUtil.setBankDeposit(hyFreightSettlementInfo.getBankDeposit());
+        String settlementJson = JSON.toJSONString(settlementUtil);
+
+        String result = postJson("payee/create", settlementJson);
+
+        System.out.println(result);
+        return result;
+    }
+    /**
+     * 装卸货SDK
+     * @param hyCarrierInfo
+     * @throws Exception
+     */
+    public static String uploadLoad(HyCarrierInfo hyCarrierInfo) throws Exception {
+        LoadUtil loadUtil = new LoadUtil();
+        loadUtil.setShippingNoteNumber(hyCarrierInfo.getOrderNo());
+        loadUtil.setSerialNumber("0000");
+        //装车标识
+        if ("1".equals(hyCarrierInfo.getLoadingFlag())){
+            loadUtil.setLongitude(hyCarrierInfo.getLoadingLongitude());
+            loadUtil.setLatitude(hyCarrierInfo.getLoadingLatitude());
+            loadUtil.setType(1);
+        }
+        //卸车
+        else{
+            loadUtil.setLongitude(hyCarrierInfo.getUnloadingLongitude());
+            loadUtil.setLatitude(hyCarrierInfo.getUnloadingLatitude());
+            loadUtil.setType(2);
+        }
+        loadUtil.setState(3);
+        loadUtil.setErrorCode("");
+        loadUtil.setErrorMsg("");
+        List<LoadUtil> list = new ArrayList<>();
+        list.add(loadUtil);
+        String loadJson = JSON.toJSONString(list);
+
+        String result = postJson("transport/bill/loadAndUnloadSdkPosition", loadJson);
+
+        System.out.println(result);
+        return result;
+    }
+    /**
+     * 承运人上报
+     * @param orderInfo
+     * @throws Exception
+     */
+    public static String uploadCarrier(OrderInfo orderInfo) throws Exception {
+        SimpleDateFormat formatter = new SimpleDateFormat( "yyyy-MM-dd");
+        SimpleDateFormat formatter2 = new SimpleDateFormat( "yyyy.MM.dd");
+        SimpleDateFormat formatter1 = new SimpleDateFormat( "yyyy年MM月dd日");
+        CarrierUtil carrierUtil = new CarrierUtil();
+        //承运人取车队长信息
+        if (orderInfo.getCarCaptainCommonId()!=null){
+            HyCarCaptainInfo carCaptainInfo=uplodeUtil.carCaptainInfoService.selectOne(new EntityWrapper<HyCarCaptainInfo>()
+                    .eq("common_id",orderInfo.getCarCaptainCommonId()));
+            if (carCaptainInfo!=null){
+                carrierUtil.setName(carCaptainInfo.getName());
+                carrierUtil.setIdCard(carCaptainInfo.getIdCard());
+                carrierUtil.setPhone(orderInfo.getContactPersonPhone());
+                carrierUtil.setIdCardFrontFilename(UplodeUtil.postFile(new ByteArrayInputStream(carCaptainInfo.getCardAddressUrl().getBytes()), "身份证正面照.jpeg"));
+                carrierUtil.setIdCardBackFilename(UplodeUtil.postFile(new ByteArrayInputStream(carCaptainInfo.getCardBackAddressUrl().getBytes()), "身份证背面照.jpeg"));
+                //身份证起始日期
+                String startDate=formatter1.format(carCaptainInfo.getCardValidityStartDate());
+                //身份证截止日期
+                Date date=formatter.parse(carCaptainInfo.getCardValidityEndDate());
+                String endDate=formatter1.format(date);
+                carrierUtil.setIdCardBeginTime(formatter1.parse(startDate).getTime());
+                carrierUtil.setIdCardEndTime(formatter1.parse(endDate).getTime());
+                DistinguishView distinguishView=UplodeUtil.personShibie(carCaptainInfo.getCardAddressUrl(),"1");
+                carrierUtil.setAddress(distinguishView.getRecPersonAddr());
+                carrierUtil.setType(20);
+                carrierUtil.setBusinessLicenseFilename("");
+                carrierUtil.setBankDeposit(orderInfo.getBankDeposit());
+                carrierUtil.setBankCardNumber(orderInfo.getBankCard());
+                carrierUtil.setBranch(orderInfo.getBankDepositBranch());
+                carrierUtil.setLegalName("");
+                carrierUtil.setTransportBusinessLicenseFilename(UplodeUtil.postFile(new ByteArrayInputStream(carCaptainInfo.getRoadTransportOperationLicense().getBytes()), "道路运输许可证.jpeg"));
+                carrierUtil.setTransportBusinessLicenseOtherFilename("");
+                carrierUtil.setTransportBusinessLicense(carCaptainInfo.getRoadTransportOperationLicenseNo());
+                carrierUtil.setBusinessHouseholdsName("");
+            }
+        }
+        //承运人取司机信息
+        else{
+            HyDriverInfo hyDriverInfo=uplodeUtil.driverInfoService.selectOne(new EntityWrapper<HyDriverInfo>()
+                    .eq("common_id",orderInfo.getCommonId()));
+            if (hyDriverInfo!=null){
+                carrierUtil.setName(hyDriverInfo.getDriverName());
+                carrierUtil.setIdCard(hyDriverInfo.getNumberCard());
+                carrierUtil.setPhone(orderInfo.getDriverPhone());
+                carrierUtil.setIdCardFrontFilename(UplodeUtil.postFile(new ByteArrayInputStream(hyDriverInfo.getCardAddressUrl().getBytes()), "身份证正面照.jpeg"));
+                carrierUtil.setIdCardBackFilename(UplodeUtil.postFile(new ByteArrayInputStream(hyDriverInfo.getCardBackAddressUrl().getBytes()), "身份证背面照.jpeg"));
+                DistinguishView distinguishView=UplodeUtil.personShibie(hyDriverInfo.getCardBackAddressUrl(),"2");
+                String time = distinguishView.getIdCardValidity().substring(0, distinguishView.getIdCardValidity().indexOf('-'));
+                Date date1=formatter2.parse(time);
+                //身份证起始日期
+                String startDate=formatter1.format(date1);
+                //身份证截止日期
+                Date date=formatter.parse(hyDriverInfo.getCardValidityDate());
+                String endDate=formatter1.format(date);
+                carrierUtil.setIdCardBeginTime(formatter1.parse(startDate).getTime());
+                carrierUtil.setIdCardEndTime(formatter1.parse(endDate).getTime());
+                carrierUtil.setAddress(hyDriverInfo.getCardAddress());
+                carrierUtil.setType(20);
+                carrierUtil.setBusinessLicenseFilename("");
+                carrierUtil.setBankDeposit(orderInfo.getBankDeposit());
+                carrierUtil.setBankCardNumber(orderInfo.getBankCard());
+                carrierUtil.setBranch(orderInfo.getBankDepositBranch());
+                carrierUtil.setLegalName("");
+                carrierUtil.setTransportBusinessLicenseFilename("");
+                carrierUtil.setTransportBusinessLicenseOtherFilename("");
+                carrierUtil.setTransportBusinessLicense(hyDriverInfo.getActualCarrierBusinessLicense());
+                carrierUtil.setBusinessHouseholdsName("");
+            }
+        }
+        String carrierJson = JSON.toJSONString(carrierUtil);
+
+        String result = postJson("open_middleman/create", carrierJson);
+
+        System.out.println(result);
+        return result;
+    }
+
+    /**
+     * 运单上报
+     * @param orderInfo
+     * @throws Exception
+     */
+    public static String uploadOrder(OrderInfo orderInfo) throws Exception {
+        DecimalFormat df = new DecimalFormat("0");
+        DecimalFormat df1 = new DecimalFormat("0");
+
+        OrderUtil orderUtil = new OrderUtil();
+        orderUtil.setTransportBillTime(orderInfo.getCreateDate().getTime());
+        orderUtil.setLoadingDateTimestamp(orderInfo.getTranStartDate().getTime());
+        orderUtil.setUnloadingDateTimestamp(orderInfo.getTranEndDate().getTime());
+        orderUtil.setProjectName("");
+        orderUtil.setRouteName("");
+        orderUtil.setShipperTransportBillNumber(orderInfo.getOrderNo());
+        orderUtil.setTransportBusinessType(1003999);
+        orderUtil.setInsuranceCompany(orderInfo.getInsuranceCompanyCode());
+        orderUtil.setPolicyNumber(orderInfo.getPolicyNo());
+        orderUtil.setRemark(orderInfo.getRemark());
+
+        //货物信息
+        JSONObject goodsInfoDTO = new JSONObject();
+        goodsInfoDTO.put("goodsName", orderInfo.getGoodsName());
+        goodsInfoDTO.put("goodsType", orderInfo.getGoodsTypeKey());
+        goodsInfoDTO.put("weight", Integer.valueOf(df.format(orderInfo.getWeight() * 1000000)));
+        //todo 体积,件数
+        if (orderInfo.getVolume() != null) {
+            goodsInfoDTO.put("volume", Integer.valueOf(df1.format(orderInfo.getVolume() * 10000)));
+        }
+        if (orderInfo.getPackageNumber() != null) {
+            goodsInfoDTO.put("number", Integer.valueOf(orderInfo.getPackageNumber()));
+        }
+        orderUtil.setGoodsInfoDTO(goodsInfoDTO);
+
+        //托运方信息
+        JSONObject shipperInfoDTO = new JSONObject();
+        shipperInfoDTO.put("payType", 0);
+        shipperInfoDTO.put("shipperName", orderInfo.getConsignorName());
+        shipperInfoDTO.put("shipperPhone", orderInfo.getDriverPhone());
+        shipperInfoDTO.put("shipperIdCard", orderInfo.getConsignorID());
+        shipperInfoDTO.put("shipperTransportCost", orderInfo.getFreight());
+        orderUtil.setShipperInfoDTO(shipperInfoDTO);
+
+        //发货方收货方信息
+        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());
+        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());
+        addressInfoDTO.put("receiverLocation", orderInfo.getUnloadDetailedAddress());
+        addressInfoDTO.put("treceiverLng", orderInfo.getUnsendLongitude());
+        addressInfoDTO.put("treceiverLat", orderInfo.getUnsendLatitude());
+        orderUtil.setAddressInfoDTO(addressInfoDTO);
+
+        //承运方信息
+        JSONObject carrierInfoDTO = new JSONObject();
+        carrierInfoDTO.put("carrierName", orderInfo.getDriverName());
+        carrierInfoDTO.put("carrierPhone", orderInfo.getDriverPhone());
+        carrierInfoDTO.put("driverName", orderInfo.getDriverName());
+        carrierInfoDTO.put("driverPhone", orderInfo.getDriverPhone());
+        if (orderInfo.getCommonId()!=null){
+            HyDriverInfo hyDriverInfo=uplodeUtil.driverInfoService.selectOne(new EntityWrapper<HyDriverInfo>()
+                    .eq("common_id",orderInfo.getCommonId()));
+            if (hyDriverInfo!=null){
+                carrierInfoDTO.put("driverIdCard", hyDriverInfo.getNumberCard());
+                carrierInfoDTO.put("carrierIdCard", orderInfo.getSendPrivate());
+            }
+        }
+        carrierInfoDTO.put("carLicensePlate", orderInfo.getCarNumber());
+        carrierInfoDTO.put("carrierTransportCost", orderInfo.getFreight());
+        carrierInfoDTO.put("oilCardPayment", 0);
+        carrierInfoDTO.put("prePayment", orderInfo.getAdvanceCharge());
+        carrierInfoDTO.put("arrivePayment",0);
+        carrierInfoDTO.put("receiptPayment", 0);
+        carrierInfoDTO.put("informationPayment", 0);
+        carrierInfoDTO.put("bankAccountName", orderInfo.getPayeeName());
+        carrierInfoDTO.put("bankCardNumber", orderInfo.getBankCard());
+        carrierInfoDTO.put("bankDeposit", orderInfo.getBankDeposit());
+        carrierInfoDTO.put("payeeIdCard", orderInfo.getPayeeIdCard());
+        carrierInfoDTO.put("bankCardNumberType", 1);
+        carrierInfoDTO.put("informationPaymentBankAccountName","");
+        carrierInfoDTO.put("informationPaymentBankCardNumber", "");
+        carrierInfoDTO.put("informationPaymentBankDeposit", "");
+        carrierInfoDTO.put("informationPaymentPayeeIdCard", "");
+        carrierInfoDTO.put("informationPaymentBankCardNumberType", 1);
+        orderUtil.setCarrierInfoDTO(carrierInfoDTO);
+
+
+        String orderJson = JSON.toJSONString(orderUtil);
+
+        String result = postJson("transport/bill/add", orderJson);
+
+        System.out.println(result);
+        return result;
+    }
+    /**
+     * 上传json数据
+     *
+     * @param method
+     * @param jsonStr
+     * @return
+     * @throws Exception
+     */
+    public static String postJson(String method, String jsonStr) throws Exception {
+        CloseableHttpClient sslClient = sslClient();
+        CloseableHttpResponse response = null;
+        try {
+            HttpPost httpPost = new HttpPost(baseUrl + method);
+            httpPost.setHeader("Content-Type", "application/json");
+            httpPost.setHeader("appid", appid);
+            httpPost.setHeader("sign", getHmacSign(jsonStr, secret));
+
+            StringEntity se = new StringEntity(jsonStr, "UTF-8");
+            httpPost.setEntity(se);
+
+            response = sslClient.execute(httpPost);
+            if (response != null) {
+                HttpEntity resEntity = response.getEntity();
+                if (resEntity != null) {
+                    return EntityUtils.toString(resEntity, charSet);
+                }
+            }
+        } catch (Exception ex) {
+            throw new RuntimeException(ex);
+        } finally {
+            if (sslClient != null) {
+                sslClient.close();
+            }
+            if (response != null) {
+                response.close();
+            }
+        }
+        return null;
+    }
+
+    /**
+     * 上传文件
+     *
+     * @return
+     * @throws Exception
+     */
+    public static String postFile(InputStream fileInputStream, String uploadFilename) throws Exception{
+        HttpPost httpPost = new HttpPost("https://tosb-gateway.wlhyos.pre.xiaokuaikeji.com/tosb/file/uploadFile");
+        CloseableHttpClient httpClient = sslClient();
+
+        MultipartEntityBuilder builder = MultipartEntityBuilder.create();
+        httpPost.addHeader("appid", appid);
+        httpPost.addHeader("sign", getHmacSign("{}", secret));
+
+        builder.addBinaryBody("file", fileInputStream, ContentType.MULTIPART_FORM_DATA, uploadFilename);
+        HttpEntity multipart = builder.build();
+        httpPost.setEntity(multipart);
+
+        CloseableHttpResponse response = httpClient.execute(httpPost);
+
+        String returnStr = EntityUtils.toString(response.getEntity(), "utf-8");
+        response.close();
+        httpClient.close();
+
+        Result<String> result = JSON.parseObject(returnStr, new TypeReference<Result<String>>() {
+        });
+
+        if (!result.getCode().equals("00000")) {
+            throw new RuntimeException("上传失败, 结果:" + returnStr);
+        }
+
+        return result.getData();
+    }
+
+    private static CloseableHttpClient sslClient() {
+        SSLContext ctx = SSLContexts.createDefault();
+        X509TrustManager tm = new X509TrustManager() {
+            @Override
+            public X509Certificate[] getAcceptedIssuers() {
+                return null;
+            }
+
+            @Override
+            public void checkClientTrusted(X509Certificate[] xcs, String str) {
+
+            }
+
+            @Override
+            public void checkServerTrusted(X509Certificate[] xcs, String str) {
+
+            }
+        };
+        try {
+            ctx.init(null, new TrustManager[]{tm}, new SecureRandom());
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        }
+
+        SSLConnectionSocketFactory factory = new SSLConnectionSocketFactory(ctx);
+        return HttpClients.custom().setSSLSocketFactory(factory).build();
+    }
+
+    public static InputStream getFileInputStream() throws Exception {
+
+        // 本地文件
+        File f = new File("/Users/little/Desktop/wecom-temp-fc587837dbaccc339ef249d2765f3749.jpg");
+        return new FileInputStream(f);
+
+        // 网络文件
+        /*
+        HttpClient client = HttpClients.createDefault();
+        HttpGet httpget = new HttpGet("url");
+        HttpResponse response = client.execute(httpget);
+
+        HttpEntity entity = response.getEntity();
+
+        return entity.getContent();*/
+    }
+    /**
+     * 数据签名
+     *
+     * @param content
+     * @param secret
+     * @return
+     */
+    private static String getHmacSign(String content, String secret){
+        byte[] result = null;
+        try {
+            SecretKeySpec signinKey = new SecretKeySpec(secret.getBytes(), "HmacSHA1");
+            Mac mac = Mac.getInstance("HmacSHA1");
+            mac.init(signinKey);
+            byte[] rawHmac;
+            rawHmac = mac.doFinal(content.getBytes(StandardCharsets.UTF_8));
+            result = Base64.getEncoder().encode(rawHmac);
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        }
+        if (null != result) {
+            return new String(result);
+        } else {
+            return null;
+        }
+    }
+
+    public static DistinguishView personShibie(String personImg,String flag) throws ServiceException {
+        String appcode = "2d59bfa794994f5f94d1d98b7b5bd102";
+        //API产品路径
+        String requestUrl = "https://personcard.market.alicloudapi.com/ai_market/ai_ocr_universal/shen_fen_zheng/ch/v1";
+        //阿里云APPCODE
+        CloseableHttpClient httpClient = null;
+        DistinguishView distinguishView=new DistinguishView();
+        try {
+            httpClient = HttpClients.createDefault();
+            List<NameValuePair> params = new ArrayList<NameValuePair>();
+            //启用URL方式进行识别
+            //内容数据类型是图像文件URL链接
+            params.add(new BasicNameValuePair("IMAGE", personImg));
+            params.add(new BasicNameValuePair("IMAGE_TYPE", "1"));
+
+            // 创建一个HttpPost实例
+            HttpPost httpPost = new HttpPost(requestUrl);
+            httpPost.addHeader("Authorization", "APPCODE " + appcode);
+            httpPost.addHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
+
+            // 设置请求参数
+            httpPost.setEntity(new UrlEncodedFormEntity(params, "utf-8"));
+
+            // 发送POST请求
+            HttpResponse execute = httpClient.execute(httpPost);
+
+            // 获取状态码
+            int statusCode = execute.getStatusLine().getStatusCode();
+            System.out.println(statusCode);
+
+            // 获取结果
+            HttpEntity entity = execute.getEntity();
+            String body = EntityUtils.toString(entity);
+            JSONObject jsonObject = JSONObject.parseObject(body);
+            if ("1".equals(flag)) {
+                //身份证正面
+                distinguishView.setRecPersonAddr(jsonObject.getJSONObject("身份证识别实体信息").getJSONObject("身份证人像面实体信息").getString("住址"));
+            } else if ("2".equals(flag)) {
+                //身份证反面
+                distinguishView.setIdCardValidity(jsonObject.getJSONObject("身份证识别实体信息").getJSONObject("身份证国徽面实体信息").getString("有效期限"));
+            }
+            return distinguishView;
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
+    /**
+     * 接口返回结果
+     *
+     * @param <T>
+     */
+    public static class Result<T> {
+        private String code;
+        private T data;
+        private String message;
+
+        public String getCode() {
+            return code;
+        }
+
+        public void setCode(String code) {
+            this.code = code;
+        }
+
+        public T getData() {
+            return data;
+        }
+
+        public void setData(T data) {
+            this.data = data;
+        }
+
+        public String getMessage() {
+            return message;
+        }
+
+        public void setMessage(String message) {
+            this.message = message;
+        }
+    }
+}

+ 24 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/DriverCarInfoMapper.xml

@@ -166,6 +166,17 @@
                 AND c.reported_status_key = '5'
             </if>
         </if>
+        <if test="tripartiteStatusKey != null and tripartiteStatusKey != ''">
+            <if test="tripartiteStatusKey == 1">
+                AND c.tripartite_status_key is null
+            </if>
+            <if test="tripartiteStatusKey == 2">
+                AND c.tripartite_status_key = '3'
+            </if>
+            <if test="tripartiteStatusKey == 3">
+                AND c.tripartite_status_key = '5'
+            </if>
+        </if>
         <if test="searchKeyWord != null and searchKeyWord != ''">
             AND (lower(d.driver_name) like lower(CONCAT('%',#{searchKeyWord},'%'))
             OR lower(d.account_number) like lower(CONCAT('%',#{searchKeyWord},'%')))
@@ -248,6 +259,8 @@
         c.reported_status_key as reportedStatusKey,
         c.reported_status as reportedStatus,
         c.reported_failure_reason as reportedFailureReason,
+        c.tripartite_status as tripartiteStatus,
+        c.tripartite_failure_reason as tripartiteFailureReason,
         c.create_date as createDate,
         c.update_date as updateDate
         FROM hy_driver_car_info c
@@ -278,6 +291,17 @@
                 AND c.reported_status_key = '5'
             </if>
         </if>
+        <if test="tripartiteStatusKey != null and tripartiteStatusKey != ''">
+            <if test="tripartiteStatusKey == 1">
+                AND c.tripartite_status_key is null
+            </if>
+            <if test="tripartiteStatusKey == 2">
+                AND c.tripartite_status_key = '3'
+            </if>
+            <if test="tripartiteStatusKey == 3">
+                AND c.tripartite_status_key = '5'
+            </if>
+        </if>
         <if test="searchKeyWord != null and searchKeyWord != ''">
             AND (lower(d.driver_name) like lower(CONCAT('%',#{searchKeyWord},'%'))
             OR lower(d.account_number) like lower(CONCAT('%',#{searchKeyWord},'%')))

+ 25 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/DriverInfoMapper.xml

@@ -167,6 +167,17 @@
                 AND d.reported_status_key = '5'
             </if>
         </if>
+        <if test="tripartiteStatusKey != null and tripartiteStatusKey != ''">
+            <if test="tripartiteStatusKey == 1">
+                AND d.tripartite_status_key is null
+            </if>
+            <if test="tripartiteStatusKey == 2">
+                AND d.tripartite_status_key = '3'
+            </if>
+            <if test="tripartiteStatusKey == 3">
+                AND d.tripartite_status_key = '5'
+            </if>
+        </if>
         <if test="searchKeyWord != null and searchKeyWord != ''">
             AND (lower(d.driver_name) like lower(CONCAT('%',#{searchKeyWord},'%'))
             OR lower(c.phone) like lower(CONCAT('%',#{searchKeyWord},'%')))
@@ -188,6 +199,7 @@
         d.id,
         case when d.common_id is null then c.id else d.common_id end as commonId,
         d.driver_name as driverName,
+        d.card_address as cardAddress,
         c.phone as driverPhone,
         d.driver_sex as driverSex,
         d.number_card as numberCard,
@@ -225,6 +237,8 @@
         d.reported_status_key as reportedStatusKey,
         d.reported_status as reportedStatus,
         d.reported_failure_reason as reportedFailureReason,
+        d.tripartite_status as tripartiteStatus,
+        d.tripartite_failure_reason as tripartiteFailureReason,
         d.create_date as createDate,
         d.update_date as updateDate
         FROM common_user c
@@ -256,6 +270,17 @@
                 AND d.reported_status_key = '5'
             </if>
         </if>
+        <if test="tripartiteStatusKey != null and tripartiteStatusKey != ''">
+            <if test="tripartiteStatusKey == 1">
+                AND d.tripartite_status_key is null
+            </if>
+            <if test="tripartiteStatusKey == 2">
+                AND d.tripartite_status_key = '3'
+            </if>
+            <if test="tripartiteStatusKey == 3">
+                AND d.tripartite_status_key = '5'
+            </if>
+        </if>
         <if test="searchKeyWord != null and searchKeyWord != ''">
             AND (lower(d.driver_name) like lower(CONCAT('%',#{searchKeyWord},'%'))
             OR lower(c.phone) like lower(CONCAT('%',#{searchKeyWord},'%')))

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

@@ -174,6 +174,8 @@
         f.reported_status_key as reportedStatusKey,
         f.reported_status as reportedStatus,
         f.reported_failure_reason as reportedFailureReason,
+        f.tripartite_status as tripartiteStatus,
+        f.tripartite_failure_reason as tripartiteFailureReason,
         f.serial_number as serialNumber,
         f.arrival_date as arrivalDate,
         f.payment_voucher as paymentVoucher,

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

@@ -511,6 +511,17 @@
                 AND o.reported_status_key = '5'
             </if>
         </if>
+        <if test="tripartiteStatusKey != null and tripartiteStatusKey != ''">
+            <if test="tripartiteStatusKey == 1">
+                AND o.tripartite_status_key is null
+            </if>
+            <if test="tripartiteStatusKey == 2">
+                AND o.tripartite_status_key = '3'
+            </if>
+            <if test="tripartiteStatusKey == 3">
+                AND o.tripartite_status_key = '5'
+            </if>
+        </if>
     </select>
 
     <!-- 获得后台管理运单上报列表 -->
@@ -558,6 +569,8 @@
         o.reported_status_key as reportedStatusKey,
         o.reported_status as reportedStatus,
         o.reported_failure_reason as reportedFailureReason,
+        o.tripartite_status as tripartiteStatus,
+        o.tripartite_failure_reason as tripartiteFailureReason,
         c.car_number_colour as carNumberColour,
         d.number_card as driverIdCard,
         o.car_number as carNumber,
@@ -567,7 +580,12 @@
         o.goods_name as goodsName,
         o.actual_freight as actualFreight,
         o.policy_no as policyNo,
+        o.tran_start_date as tranStartDate,
+        o.tran_end_date as tranEndDate,
         o.insurance_company_code as insuranceCompanyCode,
+        o.bank_card as bankCard,
+        o.bank_deposit as bankDeposit,
+        o.bank_deposit_branch as bankDepositBranch,
         o.create_date as createDate,
         o.update_date as updateDate
         FROM hy_order_info o
@@ -616,6 +634,17 @@
                 AND o.reported_status_key = '5'
             </if>
         </if>
+        <if test="tripartiteStatusKey != null and tripartiteStatusKey != ''">
+            <if test="tripartiteStatusKey == 1">
+                AND o.tripartite_status_key is null
+            </if>
+            <if test="tripartiteStatusKey == 2">
+                AND o.tripartite_status_key = '3'
+            </if>
+            <if test="tripartiteStatusKey == 3">
+                AND o.tripartite_status_key = '5'
+            </if>
+        </if>
         ORDER BY o.order_end_date DESC
         <if test="currentPage != null and currentPage != ''">
             LIMIT ${startRecord}, ${pageSize}