瀏覽代碼

查询上报结果

haungfuli 1 年之前
父節點
當前提交
8cc1a23468

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

@@ -115,6 +115,15 @@ public class DriverCarInfoController {
         return EntityAnalyse.tranLicenseShibie(image);
     }
 
+    /**
+     * 查询车辆园区上报结果
+     */
+    @Log(title = "查询车辆园区上报结果")
+    @PostMapping("/api/queryCarResult")
+    public String queryCarResult(@RequestBody HyDriverCarInfo hyDriverCarInfo) throws IOException {
+        return driverCarInfoService.queryCarResult(hyDriverCarInfo);
+    }
+
     /**
      * 车辆信息园区批量上报
      */

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

@@ -143,6 +143,15 @@ public class DriverInfoController {
         return EntityAnalyse.qualificationLicenseShibie(image);
     }
 
+    /**
+     * 查询司机园区上报结果
+     */
+    @Log(title = "查询司机园区上报结果")
+    @PostMapping("/api/queryDriverResult")
+    public String queryDriverResult(@RequestBody HyDriverInfo hyDriverInfo) throws IOException {
+        return driverInfoService.queryDriverResult(hyDriverInfo);
+    }
+
     /**
      * 司机信息园区批量上报
      */

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

@@ -193,6 +193,18 @@ public class OrderInfoController {
         return orderInfoService.postponeReporting(orderInfo);
     }
 
+    /**
+     * 查询运单园区上报结果
+     *
+     * @param
+     * @return
+     */
+    @Log(title = "查询运单园区上报结果")
+    @PostMapping("/api/queryOrderResult")
+    public String queryOrderResult(@RequestBody OrderInfo orderInfo) throws IOException{
+        return orderInfoService.queryOrderResult(orderInfo);
+    }
+
     /**
      * 运单园区批量上报
      *

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

@@ -537,7 +537,7 @@ public class OrderInfo extends BaseModel<OrderInfo> {
      * 装车净重(吨)
      */
     @TableField(exist = false)
-    private String weight;
+    private Double weight;
     /**
      * 卸车净重(吨)
      */

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

@@ -66,7 +66,14 @@ public interface IDriverCarInfoService extends IService<HyDriverCarInfo> {
     String examine(HyDriverCarInfo hyDriverCarInfo) throws IOException;
 
     /**
-     * 批量上报
+     * 查询车辆园区上报结果
+     * @param hyDriverCarInfo
+     * @return
+     */
+    String queryCarResult(HyDriverCarInfo hyDriverCarInfo) throws IOException;
+
+    /**
+     * 园区上报
      * @param hyDriverCarInfo
      * @return
      */

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

@@ -3,6 +3,7 @@ package com.yh.saas.plugin.yiliangyiyun.service;
 import com.baomidou.mybatisplus.plugins.Page;
 import com.yh.saas.plugin.yiliangyiyun.entity.HyDriverInfo;
 import com.baomidou.mybatisplus.service.IService;
+import com.yh.saas.plugin.yiliangyiyun.entity.OrderInfo;
 import com.yh.saas.plugin.yiliangyiyun.entity.view.DriverInfo;
 import com.yh.saas.plugin.yiliangyiyun.entity.view.Root;
 
@@ -69,7 +70,15 @@ public interface IDriverInfoService extends IService<HyDriverInfo> {
     HyDriverInfo getDriver(HyDriverInfo hyDriverInfo);
 
     /**
-     * 批量上报
+     * 查询司机园区上报结果
+     * @param hyDriverInfo
+     * @return
+     * @throws IOException
+     */
+    String queryDriverResult(HyDriverInfo hyDriverInfo) throws IOException;
+
+    /**
+     * 园区上报
      * @param hyDriverInfo
      * @return
      */

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

@@ -126,6 +126,14 @@ public interface IOrderInfoService extends IService<OrderInfo> {
      */
     String postponeReporting(OrderInfo orderInfo);
 
+    /**
+     * 查询运单园区上报结果
+     * @param orderInfo
+     * @return
+     * @throws IOException
+     */
+    String queryOrderResult(OrderInfo orderInfo) throws IOException;
+
     /**
      * 运单批量上报
      *

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

@@ -277,7 +277,7 @@ public class DriverCarInfoServiceImpl extends ServiceImpl<DriverCarInfoMapper, H
                 newsInfoService.addNewsInfo(newsInfo);
                 //个推
                 geTuiUtils.initGeTui(newsInfo.getReCommonId());
-                geTuiUtils.pushByCid(newsInfo.getNewsTitle(),newsInfo.getNewsContent(),newsInfo.getReCommonId());
+                geTuiUtils.pushByCid(newsInfo.getNewsTitle(), newsInfo.getNewsContent(), newsInfo.getReCommonId());
             }
             //更改车辆状态信息
             this.updateById(hyDriverCarInfo1);
@@ -286,6 +286,31 @@ public class DriverCarInfoServiceImpl extends ServiceImpl<DriverCarInfoMapper, H
         return "NG";
     }
 
+    /**
+     * 查询车辆园区上报结果
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public String queryCarResult(HyDriverCarInfo hyDriverCarInfo) throws IOException {
+        //获取token
+        String token = EntityAnalyse.GetJTToken(ENV);
+        //上报车辆信息校验结果查询
+        hyDriverCarInfo.setToken(token);
+        if ("通过".equals(EntityAnalyse.driverCarInfoCheck(hyDriverCarInfo, ENV))) {
+            hyDriverCarInfo.setEscalationStatusKey(StatusEnum.PASSED.getFlag());
+            hyDriverCarInfo.setEscalationStatus(StatusEnum.PASSED.getName());
+        } else if ("待校验".equals(EntityAnalyse.driverCarInfoCheck(hyDriverCarInfo, ENV))) {
+            hyDriverCarInfo.setEscalationStatusKey(StatusEnum.PARK_UNDER_REVIEW.getFlag());
+            hyDriverCarInfo.setEscalationStatus(StatusEnum.PARK_UNDER_REVIEW.getName());
+        } else {
+            hyDriverCarInfo.setEscalationStatusKey(StatusEnum.FAIL.getFlag());
+            hyDriverCarInfo.setEscalationStatus(StatusEnum.FAIL.getName());
+            hyDriverCarInfo.setEscalationFailureReason(EntityAnalyse.driverCarInfoCheck(hyDriverCarInfo, ENV));
+        }
+        this.updateById(hyDriverCarInfo);
+        return "ok";
+    }
+
     /**
      * 园区批量上报
      *
@@ -318,14 +343,14 @@ public class DriverCarInfoServiceImpl extends ServiceImpl<DriverCarInfoMapper, H
                         @Override
                         public void run() {
                             try {
-                                String result = EntityAnalyse.uploadDriverCarInfo(hyDriverCarInfo1,ENV);
-                                if ("1001".equals(result)){
+                                String result = EntityAnalyse.uploadDriverCarInfo(hyDriverCarInfo1, ENV);
+                                if ("1001".equals(result)) {
                                     //更改上报状态
                                     hyDriverCarInfo1.setEscalationDate(new Date());
                                     hyDriverCarInfo1.setEscalationStatusKey(StatusEnum.PARK_UNDER_REVIEW.getFlag());
                                     hyDriverCarInfo1.setEscalationStatus(StatusEnum.PARK_UNDER_REVIEW.getName());
                                     driverCarInfoService.updateById(hyDriverCarInfo1);
-                                }else {
+                                } else {
                                     hyDriverCarInfo1.setEscalationDate(new Date());
                                     hyDriverCarInfo1.setEscalationStatusKey(StatusEnum.FAIL.getFlag());
                                     hyDriverCarInfo1.setEscalationStatus(StatusEnum.FAIL.getName());
@@ -335,17 +360,17 @@ public class DriverCarInfoServiceImpl extends ServiceImpl<DriverCarInfoMapper, H
                             } catch (Exception e) {
                                 e.printStackTrace();
                             }
-                            if(hyDriverCarInfo1.getTrailerVehicleType() != null && !hyDriverCarInfo1.getTrailerVehicleType().isEmpty()){
+                            if (hyDriverCarInfo1.getTrailerVehicleType() != null && !hyDriverCarInfo1.getTrailerVehicleType().isEmpty()) {
                                 //挂车园区上报
                                 try {
-                                    String result = EntityAnalyse.uploadTrailerCarInfo(hyDriverCarInfo1,ENV);
+                                    String result = EntityAnalyse.uploadTrailerCarInfo(hyDriverCarInfo1, ENV);
                                     //发送成功
-                                    if ("1001".equals(result)){
+                                    if ("1001".equals(result)) {
                                         //更改上报状态
                                         hyDriverCarInfo1.setEscalationDate(new Date());
                                         hyDriverCarInfo1.setEscalationStatusKey(StatusEnum.PARK_UNDER_REVIEW.getFlag());
                                         hyDriverCarInfo1.setEscalationStatus(StatusEnum.PARK_UNDER_REVIEW.getName());
-                                    }else {
+                                    } else {
                                         hyDriverCarInfo1.setEscalationDate(new Date());
                                         hyDriverCarInfo1.setEscalationStatusKey(StatusEnum.FAIL.getFlag());
                                         hyDriverCarInfo1.setEscalationStatus(StatusEnum.FAIL.getName());
@@ -412,7 +437,7 @@ public class DriverCarInfoServiceImpl extends ServiceImpl<DriverCarInfoMapper, H
                             } catch (Exception e) {
                                 e.printStackTrace();
                             }
-                            if(hyDriverCarInfo1.getTrailerVehicleType() != null && !hyDriverCarInfo1.getTrailerVehicleType().isEmpty()){
+                            if (hyDriverCarInfo1.getTrailerVehicleType() != null && !hyDriverCarInfo1.getTrailerVehicleType().isEmpty()) {
                                 //挂车车辆交管监测系统上报
                                 try {
                                     String result = MonitoringSystemReporting.testTrailerVehicleRoot(hyDriverCarInfo1);

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

@@ -24,6 +24,7 @@ import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.CollectionUtils;
+import org.springframework.web.bind.annotation.RequestBody;
 
 import java.io.IOException;
 import java.text.ParseException;
@@ -59,81 +60,28 @@ public class DriverInfoServiceImpl extends ServiceImpl<DriverInfoMapper, HyDrive
     private String ENV;
 
     /**
-     * 查询上报结果(每分钟执行一次)
+     * 查询司机园区上报结果
      */
+    @Override
     @Transactional(rollbackFor = Exception.class)
-    @Scheduled(cron = "0 */1 * * * ?")
-    public void queryResults() throws IOException {
-
-        //查询司机上报结果
-        List<HyDriverInfo> hyDriverInfoList = this.selectList(new EntityWrapper<HyDriverInfo>()
-                .eq("escalation_status_key", "5").eq("delete_flag", "0"));
-        if (!CollectionUtils.isEmpty(hyDriverInfoList)) {
-            //获取token
-            String token = EntityAnalyse.GetJTToken(ENV);
-            for (HyDriverInfo hyDriverInfo : hyDriverInfoList) {
-                //上报司机信息校验结果查询
-                hyDriverInfo.setToken(token);
-                if ("通过".equals(EntityAnalyse.driverInfoCheck(hyDriverInfo,ENV))) {
-                    hyDriverInfo.setEscalationStatusKey(StatusEnum.PASSED.getFlag());
-                    hyDriverInfo.setEscalationStatus(StatusEnum.PASSED.getName());
-                } else if ("待校验".equals(EntityAnalyse.driverInfoCheck(hyDriverInfo,ENV))) {
-                    hyDriverInfo.setEscalationStatusKey(StatusEnum.PARK_UNDER_REVIEW.getFlag());
-                    hyDriverInfo.setEscalationStatus(StatusEnum.PARK_UNDER_REVIEW.getName());
-                } else {
-                    hyDriverInfo.setEscalationStatusKey(StatusEnum.FAIL.getFlag());
-                    hyDriverInfo.setEscalationStatus(StatusEnum.FAIL.getName());
-                    hyDriverInfo.setEscalationFailureReason(EntityAnalyse.driverInfoCheck(hyDriverInfo,ENV));
-                }
-                this.updateById(hyDriverInfo);
-            }
-        }
-        //查询车辆上报结果
-        List<HyDriverCarInfo> hyDriverCarInfoList = driverCarInfoService.selectList(new EntityWrapper<HyDriverCarInfo>()
-                .eq("escalation_status_key", "5").eq("delete_flag", "0"));
-        if (!CollectionUtils.isEmpty(hyDriverCarInfoList)) {
-            //获取token
-            String token = EntityAnalyse.GetJTToken(ENV);
-            for (HyDriverCarInfo hyDriverCarInfo : hyDriverCarInfoList) {
-                //上报车辆信息校验结果查询
-                hyDriverCarInfo.setToken(token);
-                if ("通过".equals(EntityAnalyse.driverCarInfoCheck(hyDriverCarInfo,ENV))) {
-                    hyDriverCarInfo.setEscalationStatusKey(StatusEnum.PASSED.getFlag());
-                    hyDriverCarInfo.setEscalationStatus(StatusEnum.PASSED.getName());
-                } else if ("待校验".equals(EntityAnalyse.driverCarInfoCheck(hyDriverCarInfo,ENV))) {
-                    hyDriverCarInfo.setEscalationStatusKey(StatusEnum.PARK_UNDER_REVIEW.getFlag());
-                    hyDriverCarInfo.setEscalationStatus(StatusEnum.PARK_UNDER_REVIEW.getName());
-                } else {
-                    hyDriverCarInfo.setEscalationStatusKey(StatusEnum.FAIL.getFlag());
-                    hyDriverCarInfo.setEscalationStatus(StatusEnum.FAIL.getName());
-                    hyDriverCarInfo.setEscalationFailureReason(EntityAnalyse.driverCarInfoCheck(hyDriverCarInfo,ENV));
-                }
-                driverCarInfoService.updateById(hyDriverCarInfo);
-            }
-        }
-        //查询运单上报结果
-        List<OrderInfo> orderInfoList = orderInfoService.selectList(new EntityWrapper<OrderInfo>()
-                .eq("escalation_status_key", "5").eq("delete_flag", "0"));
-        if (!CollectionUtils.isEmpty(orderInfoList)) {
-            //获取token
-            String token = EntityAnalyse.GetJTToken(ENV);
-            for (OrderInfo orderInfo : orderInfoList) {
-                //上报运单信息校验结果查询
-                orderInfo.setToken(token);
-                if ("通过".equals(EntityAnalyse.waybillCheck(orderInfo,ENV))) {
-                    orderInfo.setEscalationStatusKey(StatusEnum.ADOPTED.getFlag());
-                    orderInfo.setEscalationStatus(StatusEnum.ADOPTED.getName());
-                } else if ("待校验".equals(EntityAnalyse.waybillCheck(orderInfo,ENV))) {
-                    orderInfo.setEscalationStatusKey(StatusEnum.UNDER_REVIEW.getFlag());
-                    orderInfo.setEscalationStatus(StatusEnum.UNDER_REVIEW.getName());
-                } else {
-                    orderInfo.setEscalationStatusKey(StatusEnum.NOT_ADOPT.getFlag());
-                    orderInfo.setEscalationStatus(StatusEnum.NOT_ADOPT.getName());
-                    orderInfo.setEscalationFailureReason(EntityAnalyse.waybillCheck(orderInfo,ENV));
-                }
-                orderInfoService.updateById(orderInfo);
-            }
+    public String queryDriverResult(HyDriverInfo hyDriverInfo) throws IOException {
+        //获取token
+        String token = EntityAnalyse.GetJTToken(ENV);
+        //上报司机信息校验结果查询
+        hyDriverInfo.setToken(token);
+        if ("通过".equals(EntityAnalyse.driverInfoCheck(hyDriverInfo, ENV))) {
+            hyDriverInfo.setEscalationStatusKey(StatusEnum.PASSED.getFlag());
+            hyDriverInfo.setEscalationStatus(StatusEnum.PASSED.getName());
+        } else if ("待校验".equals(EntityAnalyse.driverInfoCheck(hyDriverInfo, ENV))) {
+            hyDriverInfo.setEscalationStatusKey(StatusEnum.PARK_UNDER_REVIEW.getFlag());
+            hyDriverInfo.setEscalationStatus(StatusEnum.PARK_UNDER_REVIEW.getName());
+        } else {
+            hyDriverInfo.setEscalationStatusKey(StatusEnum.FAIL.getFlag());
+            hyDriverInfo.setEscalationStatus(StatusEnum.FAIL.getName());
+            hyDriverInfo.setEscalationFailureReason(EntityAnalyse.driverInfoCheck(hyDriverInfo, ENV));
         }
+        this.updateById(hyDriverInfo);
+        return "ok";
     }
 
 
@@ -426,7 +374,7 @@ public class DriverInfoServiceImpl extends ServiceImpl<DriverInfoMapper, HyDrive
                 newsInfoService.addNewsInfo(newsInfo);
                 //个推
                 geTuiUtils.initGeTui(newsInfo.getReCommonId());
-                geTuiUtils.pushByCid(newsInfo.getNewsTitle(),newsInfo.getNewsContent(),newsInfo.getReCommonId());
+                geTuiUtils.pushByCid(newsInfo.getNewsTitle(), newsInfo.getNewsContent(), newsInfo.getReCommonId());
             }
             //驳回
             else if ("2".equals(hyDriverInfo.getFlag())) {
@@ -445,7 +393,7 @@ public class DriverInfoServiceImpl extends ServiceImpl<DriverInfoMapper, HyDrive
                 newsInfoService.addNewsInfo(newsInfo);
                 //个推
                 geTuiUtils.initGeTui(newsInfo.getReCommonId());
-                geTuiUtils.pushByCid(newsInfo.getNewsTitle(),newsInfo.getNewsContent(),newsInfo.getReCommonId());
+                geTuiUtils.pushByCid(newsInfo.getNewsTitle(), newsInfo.getNewsContent(), newsInfo.getReCommonId());
             }
             // 禁用
 //            else if("3".equals(hyDriverInfo.getFlag())){
@@ -529,14 +477,14 @@ public class DriverInfoServiceImpl extends ServiceImpl<DriverInfoMapper, HyDrive
                         @Override
                         public void run() {
                             try {
-                                String result = EntityAnalyse.uploadDriverInfo(hyDriverInfo1,ENV);
-                                if ("1001".equals(result)){
+                                String result = EntityAnalyse.uploadDriverInfo(hyDriverInfo1, ENV);
+                                if ("1001".equals(result)) {
                                     //更改上报状态
                                     hyDriverInfo1.setEscalationDate(new Date());
                                     hyDriverInfo1.setEscalationStatusKey(StatusEnum.PARK_UNDER_REVIEW.getFlag());
                                     hyDriverInfo1.setEscalationStatus(StatusEnum.PARK_UNDER_REVIEW.getName());
                                     driverInfoService.updateById(hyDriverInfo1);
-                                }else {
+                                } else {
                                     hyDriverInfo1.setEscalationDate(new Date());
                                     hyDriverInfo1.setEscalationStatusKey(StatusEnum.FAIL.getFlag());
                                     hyDriverInfo1.setEscalationStatus(StatusEnum.FAIL.getName());

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

@@ -167,7 +167,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
                         newsInfoService.addNewsInfo(newsInfo);
                         //个推
                         geTuiUtils.initGeTui(newsInfo.getReCommonId());
-                        geTuiUtils.pushByCid(newsInfo.getNewsTitle(),newsInfo.getNewsContent(),newsInfo.getReCommonId());
+                        geTuiUtils.pushByCid(newsInfo.getNewsTitle(), newsInfo.getNewsContent(), newsInfo.getReCommonId());
                         //给平台发送消息
                         NewsInfo newsInfo1 = new NewsInfo();
                         newsInfo1.setReCommonId("84f62127b7384dcdbaeaddfe460329fc");
@@ -188,7 +188,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
                         newsInfoService.addNewsInfo(newsInfo2);
                         //个推
                         geTuiUtils.initGeTui(newsInfo2.getReCommonId());
-                        geTuiUtils.pushByCid(newsInfo2.getNewsTitle(),newsInfo2.getNewsContent(),newsInfo2.getReCommonId());
+                        geTuiUtils.pushByCid(newsInfo2.getNewsTitle(), newsInfo2.getNewsContent(), newsInfo2.getReCommonId());
                     }
                 }
             });
@@ -533,7 +533,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
                 newsInfoService.addNewsInfo(newsInfo);
                 //个推
                 geTuiUtils.initGeTui(newsInfo.getReCommonId());
-                geTuiUtils.pushByCid(newsInfo.getNewsTitle(),newsInfo.getNewsContent(),newsInfo.getReCommonId());
+                geTuiUtils.pushByCid(newsInfo.getNewsTitle(), newsInfo.getNewsContent(), newsInfo.getReCommonId());
             }
             //货主终止
             else if ("2".equals(orderInfo.getTerminator())) {
@@ -554,7 +554,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
                 newsInfoService.addNewsInfo(newsInfo);
                 //个推
                 geTuiUtils.initGeTui(newsInfo.getReCommonId());
-                geTuiUtils.pushByCid(newsInfo.getNewsTitle(),newsInfo.getNewsContent(),newsInfo.getReCommonId());
+                geTuiUtils.pushByCid(newsInfo.getNewsTitle(), newsInfo.getNewsContent(), newsInfo.getReCommonId());
             }
             //平台终止
             else {
@@ -573,7 +573,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
                 newsInfoService.addNewsInfo(newsInfo);
                 //个推
                 geTuiUtils.initGeTui(newsInfo.getReCommonId());
-                geTuiUtils.pushByCid(newsInfo.getNewsTitle(),newsInfo.getNewsContent(),newsInfo.getReCommonId());
+                geTuiUtils.pushByCid(newsInfo.getNewsTitle(), newsInfo.getNewsContent(), newsInfo.getReCommonId());
 
                 // 向货主发送信息
                 NewsInfo newsInfo1 = new NewsInfo();
@@ -587,7 +587,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
                 newsInfoService.addNewsInfo(newsInfo1);
                 //个推
                 geTuiUtils.initGeTui(newsInfo1.getReCommonId());
-                geTuiUtils.pushByCid(newsInfo1.getNewsTitle(),newsInfo1.getNewsContent(),newsInfo1.getReCommonId());
+                geTuiUtils.pushByCid(newsInfo1.getNewsTitle(), newsInfo1.getNewsContent(), newsInfo1.getReCommonId());
             }
             orderInfo1.setOrderStatusKey(StatusEnum.DRIVER_ORDER_END.getFlag());
             orderInfo1.setOrderStatus(StatusEnum.DRIVER_ORDER_END.getName());
@@ -1006,7 +1006,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
                 newsInfoService.addNewsInfo(newsInfo);
                 //个推
                 geTuiUtils.initGeTui(newsInfo.getReCommonId());
-                geTuiUtils.pushByCid(newsInfo.getNewsTitle(),newsInfo.getNewsContent(),newsInfo.getReCommonId());
+                geTuiUtils.pushByCid(newsInfo.getNewsTitle(), newsInfo.getNewsContent(), newsInfo.getReCommonId());
             }
             //驳回
             else {
@@ -1028,7 +1028,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
                 newsInfoService.addNewsInfo(newsInfo);
                 //个推
                 geTuiUtils.initGeTui(newsInfo.getReCommonId());
-                geTuiUtils.pushByCid(newsInfo.getNewsTitle(),newsInfo.getNewsContent(),newsInfo.getReCommonId());
+                geTuiUtils.pushByCid(newsInfo.getNewsTitle(), newsInfo.getNewsContent(), newsInfo.getReCommonId());
             }
             this.updateById(orderInfo1);
         }
@@ -1117,6 +1117,34 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
         return "ng";
     }
 
+    /**
+     * 查询运单园区上报结果
+     *
+     * @param orderInfo
+     * @return
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public String queryOrderResult(OrderInfo orderInfo) throws IOException {
+        //获取token
+        String token = EntityAnalyse.GetJTToken(ENV);
+        //上报运单信息校验结果查询
+        orderInfo.setToken(token);
+        if ("通过".equals(EntityAnalyse.waybillCheck(orderInfo, ENV))) {
+            orderInfo.setEscalationStatusKey(StatusEnum.ADOPTED.getFlag());
+            orderInfo.setEscalationStatus(StatusEnum.ADOPTED.getName());
+        } else if ("待校验".equals(EntityAnalyse.waybillCheck(orderInfo, ENV))) {
+            orderInfo.setEscalationStatusKey(StatusEnum.UNDER_REVIEW.getFlag());
+            orderInfo.setEscalationStatus(StatusEnum.UNDER_REVIEW.getName());
+        } else {
+            orderInfo.setEscalationStatusKey(StatusEnum.NOT_ADOPT.getFlag());
+            orderInfo.setEscalationStatus(StatusEnum.NOT_ADOPT.getName());
+            orderInfo.setEscalationFailureReason(EntityAnalyse.waybillCheck(orderInfo, ENV));
+        }
+        this.updateById(orderInfo);
+        return "ok";
+    }
+
     /**
      * 运单园区批量上报
      *
@@ -1162,7 +1190,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
                     if (hyCarrierInfo != null) {
                         orderInfo1.setDeliveryTime(hyCarrierInfo.getLoadingDate());
                         orderInfo1.setReceivingTime(hyCarrierInfo.getUnloadingDate());
-                        orderInfo1.setGrossWeight(hyCarrierInfo.getLoadingGrossWeight());
+                        orderInfo1.setWeight(hyCarrierInfo.getLoadingWeight());
                         orderInfo1.setVolume(hyCarrierInfo.getVolume());
                         orderInfo1.setPackageNumber(hyCarrierInfo.getPackageNumber());
                         orderInfo1.setLoadingDate(hyCarrierInfo.getLoadingDate());
@@ -1229,8 +1257,8 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
 //                            }
 //                        }
 //                    }).start();
-                     try {
-                        String result = EntityAnalyse.uploadWaybill(orderInfo1,ENV);
+                    try {
+                        String result = EntityAnalyse.uploadWaybill(orderInfo1, ENV);
                         if ("1001".equals(result)) {
                             //更改上报状态
                             orderInfo1.setEscalationStatusKey(StatusEnum.UNDER_REVIEW.getFlag());
@@ -1922,7 +1950,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
                 hyCarrierInfo.setContractNo(orderInfo1.getContractNo());
                 hyCarrierInfo.setEstimatedFreight(orderInfo1.getFreight());
                 hyCarrierInfo.setLoadingDate(orderInfo.getTranStartDate());
-                hyCarrierInfo.setLoadingWeight(Double.valueOf(orderInfo.getWeight()));
+                hyCarrierInfo.setLoadingWeight(orderInfo.getWeight());
                 hyCarrierInfo.setLoadingGrossWeight(Double.valueOf(orderInfo.getGrossWeight()));
                 //更新签名图片
                 commonUser.setSignImg(orderInfo.getDriverAutograph());

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

@@ -543,7 +543,7 @@ public class EntityAnalyse {
         JSONObject goodsInfo = new JSONObject();
         goodsInfo.put("descriptionOfGoods", orderInfo.getGoodsName());
         goodsInfo.put("cargoTypeClassificationCode", orderInfo.getGoodsTypeKey());
-        goodsInfo.put("goodsItemGrossWeight", Integer.valueOf(df.format(orderInfo.getGrossWeight() * 1000000)));
+        goodsInfo.put("goodsItemGrossWeight", Integer.valueOf(df.format(orderInfo.getWeight() * 1000000)));
         //todo 体积,件数
         if (orderInfo.getVolume() != null) {
             goodsInfo.put("cube", Integer.valueOf(df1.format(orderInfo.getVolume() * 10000)));