luobang 7 mesi fa
parent
commit
31bf416b5b

+ 7 - 7
src/main/java/com/steerinfo/dil/controller/TMSController.java

@@ -174,7 +174,7 @@ public class TMSController extends BaseRESTfulController {
     @ApiImplicitParam(name = "map", value = "JSON格式数据", required = true, dataType = "Map<String, Object>")
     @PostMapping(value = "/getTransResult")
     public Map<String, Object> getTransResult(@RequestBody(required = false) Map<String, Object> map) {
-        return tmsFeign.getTransResult(map);
+        return wlTmsFeign.getTransResult(map);
     }
 
     @ApiOperation(value = "同步进厂")
@@ -182,7 +182,7 @@ public class TMSController extends BaseRESTfulController {
     @PostMapping(value = "/syncEnfactoryResult")
     @LogAround(foreignKeys = {"resultId"}, foreignKeyTypes = {"进厂实绩"})
     public Map<String, Object> syncEnfactoryResult(@RequestBody(required = false) Map<String, Object> map) {
-        return tmsFeign.syncEnfactoryResult(map);
+        return wlTmsFeign.syncEnfactoryResult(map);
     }
 
     @ApiOperation(value = "同步出厂")
@@ -190,7 +190,7 @@ public class TMSController extends BaseRESTfulController {
     @PostMapping(value = "/syncOutfactoryResult")
     @LogAround(foreignKeys = {"resultId"}, foreignKeyTypes = {"出厂实绩"})
     public Map<String, Object> syncOutfactoryResult(@RequestBody(required = false) Map<String, Object> map) {
-        return tmsFeign.syncOutfactoryResult(map);
+        return wlTmsFeign.syncOutfactoryResult(map);
     }
 
     @ApiOperation(value = "同步计量")
@@ -198,7 +198,7 @@ public class TMSController extends BaseRESTfulController {
     @PostMapping(value = "/syncWeightResult")
     @LogAround(foreignKeys = {"resultId"}, foreignKeyTypes = {"计量实绩"})
     public Map<String, Object> syncWeightResult(@RequestBody(required = false) Map<String, Object> map) {
-        return tmsFeign.syncWeightResult(map);
+        return wlTmsFeign.syncWeightResult(map);
     }
 
 
@@ -207,7 +207,7 @@ public class TMSController extends BaseRESTfulController {
     @PostMapping(value = "/startend")
     @LogAround(foreignKeys = {"resultId"}, foreignKeyTypes = {"计时"})
     public Map<String, Object> start(@RequestBody(required = false) Map<String, Object> map) {
-        return tmsFeign.startend(map);
+        return wlTmsFeign.startend(map);
     }
 
 
@@ -215,7 +215,7 @@ public class TMSController extends BaseRESTfulController {
     @PostMapping(value = "/updCountResult")
     @LogAround(foreignKeys = {"transOrderId"}, foreignKeyTypes = {"计次"})
     public Map<String, Object> updCountResult(@RequestBody(required = false) Map<String, Object> map) {
-        return tmsFeign.updCountResult(map);
+        return wlTmsFeign.updCountResult(map);
     }
 
     @ApiOperation(value = "审批计时")
@@ -302,7 +302,7 @@ public class TMSController extends BaseRESTfulController {
     @PostMapping(value = "/signIn")
     @LogAround(foreignKeys = {"resultId"}, foreignKeyTypes = {"签到实绩"})
     public Map<String, Object> signIn(@RequestBody(required = false) Map<String, Object> map) {
-        return tmsFeign.signIn(map);
+        return wlTmsFeign.signIn(map);
     }
 
     @ApiOperation(value = "换车头")

+ 8 - 8
src/main/java/com/steerinfo/dil/feign/WlTmsFeign.java

@@ -53,29 +53,29 @@ public interface WlTmsFeign {
                                           @RequestParam Integer pageSize);
 
 
-    @PostMapping("api/v1/tms/omstransorders/changeTransOrder")
+    @PostMapping("api/v1/wltms/omstransorders/changeTransOrder")
     Map<String, Object> changeTransOrder(Map<String, Object> map);
 
     @PostMapping("api/v1/tms/omstransorders/receiptOrder")
     Map<String, Object> receiptOrder(Map<String, Object> map);
 
-    @PostMapping("api/v1/tms/omstransorders/getTransResult")
+    @PostMapping("api/v1/wltms/omstransorders/getTransResult")
     Map<String, Object> getTransResult(Map<String, Object> map);
 
-    @PostMapping("api/v1/tms/tmsenfactoryresults/syncEnfactoryResult")
+    @PostMapping("api/v1/wltms/tmsenfactoryresults/syncEnfactoryResult")
     Map<String, Object> syncEnfactoryResult(Map<String, Object> map);
 
-    @PostMapping("api/v1/tms/tmsoutfactoryresults/syncOutfactoryResult")
+    @PostMapping("api/v1/wltms/tmsoutfactoryresults/syncOutfactoryResult")
     Map<String, Object> syncOutfactoryResult(Map<String, Object> map);
 
-    @PostMapping("api/v1/tms/tmsweightresults/syncWeightResult")
+    @PostMapping("api/v1/wltms/tmsweightresults/syncWeightResult")
     Map<String, Object> syncWeightResult(Map<String, Object> map);
 
 
-    @PostMapping("api/v1/tms/tmstimingresults/startend")
+    @PostMapping("api/v1/wltms/tmstimingresults/startend")
     Map<String, Object> startend(Map<String, Object> map);
 
-    @PostMapping("api/v1/tms/tmstimingresults/updCountResult")
+    @PostMapping("api/v1/wltms/tmstimingresults/updCountResult")
     Map<String, Object> updCountResult(Map<String, Object> map);
 
     @PostMapping("api/v1/tms/tmstimingresults/approveTimeResult")
@@ -118,7 +118,7 @@ public interface WlTmsFeign {
     @PostMapping("api/v1/tms/tmsqualityresults/syncQualityResult")
     Map<String, Object> syncQualityResult(@RequestBody(required = false) Map<String, Object> map);
 
-    @PostMapping("api/v1/tms/tmssigninresults/signIn")
+    @PostMapping("api/v1/wltms/tmssigninresults/signIn")
     Map<String, Object> signIn(Map<String, Object> map);
 
     @PostMapping("api/v1/tms/tmsreplacefrontresults/replaceFront")

+ 2 - 1
src/main/resources/application-prod.yml

@@ -69,7 +69,8 @@ feign:
     config:
       default:  #默认配置,连接时间要短,读取时间要长
         connectTimeout: 1000 #单位毫秒
-        readTimeout: 30000 #单位毫秒
+        readTimeout: 14000 #单位毫秒
+
 
 #熔断器
 hystrix:

+ 15 - 9
src/main/resources/com/steerinfo/dil/mapper/UniversalMapper.xml

@@ -508,7 +508,7 @@
             select * from (
             select * from (
             select * from (
-            SELECT DISTINCT
+            SELECT
             RCA .CAPACITY_ID "capacityId",
             RCA .CAPACITY_ID "id",
             RCA .CAPACITY_ID "value",
@@ -534,7 +534,7 @@
             </if>
             <if test="driverId!=null and driverId!=''">
                 LEFT JOIN (
-                SELECT CAPACITY_ID "capacityId"
+                SELECT distinct CAPACITY_ID "capacityId"
                 FROM OMS_TRANS_ORDER OTO
                 <where>
                     OTO.DRIVER_ID != 0
@@ -573,13 +573,15 @@
             <if test="requirementSerialNumber != null and requirementSerialNumber.contains('DF')">
                 AND RCD.deleted = 5
             </if>
+            <if test="driverId!=null and driverId!=''">
+                ORDER BY T."capacityId" NULLS LAST
+            </if>
             )
             <where>
                 <if test="index!=null and index!=''">
                     AND REGEXP_LIKE("capacityNumber", #{index})
                 </if>
             </where>
-            order by LENGTH("capacityNumber")
             FETCH NEXT 10 ROWS ONLY)
             <if test="id!=null and id.size>0">
                 UNION
@@ -674,9 +676,7 @@
                 AND OTO.BUSINESS_SCENE IN ( '采购', '销售' )
                 AND OTO.DELETED = 2
                 AND OTO.ISSUE_TIME + 5 > SYSDATE
-                <if test="driverId!=null and driverId!=''">
-                    AND DRIVER_ID = #{driverId}
-                </if>
+                AND DRIVER_ID = #{driverId}
             </where>
             ) T ON T."capacityId" = RCA .CAPACITY_ID
         </if>
@@ -698,7 +698,9 @@
         <if test="capacityId!=null and capacityId!=''">
             AND RCA .CAPACITY_ID = #{capacityId}
         </if>
-        order by length("capacityNumber")
+        <if test="driverId!=null and driverId!=''">
+            ORDER BY T."capacityId" NULLS LAST
+        </if>
         )t)t1
         <where>
             <if test="lastIndex!=null">
@@ -1617,7 +1619,6 @@
         select * from (
         select * from (
         select
-        distinct
         RP.PERSONNEL_ID "personnelId",
         RP.PERSONNEL_NAME "personnelName",
         RP.PERSONNEL_POST "personnelPost",
@@ -1659,6 +1660,9 @@
         <if test="isNC!=null">
             AND RP.SOURCE_ID IS NOT NULL
         </if>
+        <if test="capacityId!=null and capacityId!=''">
+            ORDER BY T."driverId" NULLS LAST
+        </if>
         )
         <where>
             <if test="personnelPost!=null and personnelPost!=''">
@@ -1696,7 +1700,9 @@
             RP.PERSONNEL_ID "value",
             RP.PERSONNEL_NAME "label",
             RP.PERSONNEL_NAME "text",
-            null "groupNumber",
+            <if test="driverCapacityId!=null and driverCapacityId!=''">
+                null "groupNumber",
+            </if>
             'personnelName' "prop"
             from RMS_PERSONNEL RP
             WHERE RP.PERSONNEL_ID in