zx 3 lat temu
rodzic
commit
c15867cef2

+ 5 - 32
src/main/java/com/steerinfo/dil/controller/TmstruckEnfactoryResultController.java

@@ -61,47 +61,20 @@ public class TmstruckEnfactoryResultController extends BaseRESTfulController {
                                        String userId,
                                        String userIds
                                        ){
-        int count=0;
+
+        if(con!=null&&con.equals("undefined")){
+            mapValue.put("con","%"+con+"%");
+        }
         if (userId!=null){
             mapValue.put("userId",userId);
-            count++;
         }
         if (userIds!=null){
             mapValue.put("userIds",userIds);
-            count++;
         }
         if (orderType!=null){
             mapValue.put("orderTypee", orderType);
-            count++;
-        }
-
-        //框计算
-        if(con != null){
-            if(!"undefined".equals(con)){
-                //设置要查询的索引名称
-                String index="get_enfactory_list";
-                //获取查询结果
-                return success(esFeign.getConResult(mapValue,index,apiId,pageNum,pageSize,con));
-            }
-        }
-        List<Map<String, Object>> allEnFactoryResult = null;
-        //如果有条件查询则跳过初始化,和创建索引
-        if(mapValue.size() == count){
-            //将查询结果存入索引中
-            allEnFactoryResult = tmstruckEnfactoryResultService.getAllEnFactoryResult(mapValue);
-            Map<String, Object> map = new HashMap<>();
-            //添加索引
-            map.put("index","get_enfactory_list");
-            //添加id
-            map.put("indexId","enFactoryId");
-            allEnFactoryResult.add(map);
-            //新建索引
-            esFeign.insertIndex(allEnFactoryResult);
-            //删除
-            allEnFactoryResult.remove(allEnFactoryResult.size()-1);
         }
-        if(allEnFactoryResult == null)
-            allEnFactoryResult = tmstruckEnfactoryResultService.getAllEnFactoryResult(mapValue);
+        List<Map<String, Object>>  allEnFactoryResult = tmstruckEnfactoryResultService.getAllEnFactoryResult(mapValue);
         PageHelper.startPage(pageNum,pageSize);
         //分页数据
         List<Map<String, Object>> enFactoryResult = tmstruckEnfactoryResultService.getAllEnFactoryResult(mapValue);

+ 5 - 29
src/main/java/com/steerinfo/dil/controller/TmstruckLeaveFactoryResultController.java

@@ -78,49 +78,25 @@ public class TmstruckLeaveFactoryResultController extends BaseRESTfulController
                                                String carrierSsoId,
                                                String userId,
                                                String userIds){
-        int count=0;
+
         if (userId!=null){
             mapValue.put("userId",userId);
-            count++;
         }
         if (userIds!=null){
             mapValue.put("userIds",userIds);
-            count++;
         }
-        if (orderType!=null){
+        if (orderType!=null) {
             mapValue.put("orderTypee", orderType);
-            count++;
         }
         if(carrierSsoId != null){
             if(!"null".equals(carrierSsoId)){
                 mapValue.put("carrierSsoId", carrierSsoId);
             }
         }
-        //框计算
-        if(con != null){
-            if(!"undefined".equals(con)){
-                String index="get_leavefactory_list";//设置要查询的索引名称
-                return success(esFeign.getConResult(mapValue,index,apiId,pageNum,pageSize,con));//获取查询结果
-            }
-        }
-        List<Map<String, Object>> allLeaveFactoryResult = null;
-        //如果有条件查询则跳过初始化,和创建索引
-        if(mapValue.size() == count){
-            //将查询结果存入索引中
-            allLeaveFactoryResult = tmstruckLeaveFactoryResultService.getLeaveFactoryResult(mapValue);
-            Map<String, Object> map = new HashMap<>();
-            //添加索引
-            map.put("index","get_leavefactory_list");
-            //添加id
-            map.put("indexId","leaveFactoryId");
-            allLeaveFactoryResult.add(map);
-            //新建索引
-            esFeign.insertIndex(allLeaveFactoryResult);
-            //删除
-            allLeaveFactoryResult.remove(allLeaveFactoryResult.size()-1);
+        if(con!=null&&con.equals("undefined")){
+            mapValue.put("con","%"+con+"%");
         }
-        if(allLeaveFactoryResult == null)
-            allLeaveFactoryResult = tmstruckLeaveFactoryResultService.getLeaveFactoryResult(mapValue);
+        List<Map<String, Object>>  allLeaveFactoryResult = tmstruckLeaveFactoryResultService.getLeaveFactoryResult(mapValue);
         PageHelper.startPage(pageNum,pageSize);
         //分页数据
         List<Map<String, Object>> leaveFactoryResult = tmstruckLeaveFactoryResultService.getLeaveFactoryResult(mapValue);

+ 2 - 30
src/main/java/com/steerinfo/dil/controller/TmstruckLoadResultController.java

@@ -129,49 +129,21 @@ public class TmstruckLoadResultController extends BaseRESTfulController {
                                         String con,
                                         String userId,
                                         String userIds){
-        int count=0;
+
         if (status!=null){
             mapValue.put("status", status);
-            count++;
         }
         if (orderType!=null){
             mapValue.put("orderTypee", orderType);
-            count++;
         }
         if (userId!=null){
             mapValue.put("userId",userId);
-            count++;
         }
         if (userIds!=null){
             mapValue.put("userIds",userIds);
-            count++;
-        }
-        //框计算
-        if(con != null){
-            if(!"undefined".equals(con)){
-                String index="get_truck_load_list";//设置要查询的索引名称
-                return success(esFeign.getConResult(mapValue,index,apiId,pageNum,pageSize,con));//获取查询结果
-            }
         }
-        //不分页筛选数据
-        List<Map<String, Object>> allLoadResult = null;
         //如果有条件查询则跳过初始化,和创建索引
-        if(mapValue.size() == count){
-            //将查询结果存入索引中
-            allLoadResult = tmstruckLoadResultService.getAllLoadResult(mapValue);
-            Map<String, Object> map = new HashMap<>();
-            //添加索引
-            map.put("index","get_truck_load_list");
-            //添加id
-            map.put("indexId","truckLoadId");
-            allLoadResult.add(map);
-            //新建索引
-            esFeign.insertIndex(allLoadResult);
-            //删除
-            allLoadResult.remove(allLoadResult.size()-1);
-        }
-        if(allLoadResult == null)
-            allLoadResult = tmstruckLoadResultService.getAllLoadResult(mapValue);
+        List<Map<String, Object>>   allLoadResult = tmstruckLoadResultService.getAllLoadResult(mapValue);
         PageHelper.startPage(pageNum,pageSize);
         //分页数据
         List<Map<String, Object>> loadResult = tmstruckLoadResultService.getAllLoadResult(mapValue);

+ 2 - 29
src/main/java/com/steerinfo/dil/controller/TmstruckUnloadResultController.java

@@ -62,46 +62,19 @@ public class TmstruckUnloadResultController extends BaseRESTfulController {
                                            String userId,
                                            String  userIds
     ){
-        int count=0;
+
         if (orderType!=null){
             mapValue.put("orderTypee", orderType);
-            count++;
         }
         if (userId!=null){
             mapValue.put("userId",userId);
-            count++;
         }
         if (userIds!=null){
             mapValue.put("userIds",userIds);
-            count++;
-        }
-        //框计算
-        if(con != null){
-            if(!"undefined".equals(con)){
-                String index="get_truck_unload_list";//设置要查询的索引名称
-                return success(esFeign.getConResult(mapValue,index,apiId,pageNum,pageSize,con));//获取查询结果
-            }
         }
         //不分页筛选数据
         List<Map<String, Object>> allUnloadResult = null;
-        //如果有条件查询则跳过初始化,和创建索引
-        if(mapValue.size() == count){
-            //将查询结果存入索引中
-            allUnloadResult = tmstruckUnloadResultService.getUnloadResult(mapValue);
-            Map<String, Object> map = new HashMap<>();
-            //添加索引
-            map.put("index","get_truck_unload_list");
-            //添加id
-            map.put("indexId","truckUnloadId");
-            allUnloadResult.add(map);
-            //新建索引
-            esFeign.insertIndex(allUnloadResult);
-            //删除
-            allUnloadResult.remove(allUnloadResult.size()-1);
-        }
-        if(allUnloadResult == null){
-            allUnloadResult = tmstruckUnloadResultService.getUnloadResult(mapValue);
-        }
+        allUnloadResult = tmstruckUnloadResultService.getUnloadResult(mapValue);
         PageHelper.startPage(pageNum,pageSize);
         //分页数据
         List<Map<String, Object>> unloadResult = tmstruckUnloadResultService.getUnloadResult(mapValue);

+ 5 - 58
src/main/java/com/steerinfo/dil/controller/TmstruckWeightResultController.java

@@ -75,45 +75,18 @@ public class TmstruckWeightResultController extends BaseRESTfulController {
                                                String userId,
                                                String usersId
     ){
-        int count=0;
         if (orderType!=null) {
             mapValue.put("orderTypee", orderType);
-            count++;
         }
         if (userId!=null){
             mapValue.put("userId",userId);
-            count++;
         }
         if (usersId!=null){
             mapValue.put("usersId",usersId);
-            count++;
-        }
-        //框计算
-        if(con != null){
-            if(!"undefined".equals(con)){
-                String index="get_jimao_list";//设置要查询的索引名称
-                return success(esFeign.getConResult(mapValue,index,apiId,pageNum,pageSize,con));//获取查询结果
-            }
         }
         List<Map<String, Object>> allJiMaoResult = null;
         //如果有条件查询则跳过初始化,和创建索引
-        if(mapValue.size() == count){
-            //将查询结果存入索引中
-            allJiMaoResult = tmstruckWeightResultService.getAllJiMaoResult(mapValue);
-            Map<String, Object> map = new HashMap<>();
-            //添加索引
-            map.put("index","get_jimao_list");
-            //添加id
-            map.put("indexId","jiMaoId");
-            allJiMaoResult.add(map);
-            //新建索引
-            esFeign.insertIndex(allJiMaoResult);
-            //删除
-            allJiMaoResult.remove(allJiMaoResult.size()-1);
-        }
-        if(allJiMaoResult == null){
-            allJiMaoResult = tmstruckWeightResultService.getAllJiMaoResult(mapValue);
-        }
+        allJiMaoResult = tmstruckWeightResultService.getAllJiMaoResult(mapValue);
         PageHelper.startPage(pageNum,pageSize);
         //分页数据
         List<Map<String, Object>> jiMaoResult = tmstruckWeightResultService.getAllJiMaoResult(mapValue);
@@ -140,46 +113,20 @@ public class TmstruckWeightResultController extends BaseRESTfulController {
                                            String userId,
                                            String userIds
     ){
-        int count=0;
+
         if (orderType!=null) {
             mapValue.put("orderTypee", orderType);
-            count++;
         }
         if (userId!=null) {
             mapValue.put("userId",userId);
-            count++;
         }
-        if (userIds!=null){
-            mapValue.put("usersId",userIds);
-            count++;
-        }
-        //框计算
-        if(con != null){
-            if(!"undefined".equals(con)){
-                String index="get_jipi_list";//设置要查询的索引名称
-                return success(esFeign.getConResult(mapValue,index,apiId,pageNum,pageSize,con));//获取查询结果
-            }
+        if (userIds!=null) {
+            mapValue.put("usersId", userIds);
         }
         //不分页筛选数据
         List<Map<String, Object>> allJiPiResult = null;
         //如果有条件查询则跳过初始化,和创建索引
-        if(mapValue.size() == count){
-            //将查询结果存入索引中
-            allJiPiResult = tmstruckWeightResultService.getAllJiPiResult(mapValue);
-            Map<String, Object> map = new HashMap<>();
-            //添加索引
-            map.put("index","get_jipi_list");
-            //添加id
-            map.put("indexId","jiPiId");
-            allJiPiResult.add(map);
-            //新建索引
-            esFeign.insertIndex(allJiPiResult);
-            //删除
-            allJiPiResult.remove(allJiPiResult.size()-1);
-        }
-        if(allJiPiResult == null){
-            allJiPiResult = tmstruckWeightResultService.getAllJiPiResult(mapValue);
-        }
+        allJiPiResult = tmstruckWeightResultService.getAllJiPiResult(mapValue);
         PageHelper.startPage(pageNum,pageSize);
         //分页数据
         List<Map<String, Object>> jiPiResult = tmstruckWeightResultService.getAllJiPiResult(mapValue);

+ 8 - 4
src/main/resources/com/steerinfo/dil/mapper/TmstruckEnfactoryResultMapper.xml

@@ -1193,12 +1193,16 @@
         left join RMS_CAPACITY RC
         on RC.CAPACITY_ID = OO.CAPACITY_ID
         WHERE OO.ORDER_TYPE = #{orderTypee} and TER.RESULT_ENTRY_GATE_TIME IS NOT NULL
-            <if test="userId">
+            <if test="userId!=null">
                and ASO.INSERT_USERNAME=#{userId}
             </if>
-            <if test="userIds">
+            <if test="userIds!=null">
                and ASO.UPDATE_USERNAME=#{userIds}
             </if>
+            <if test="con!=null">
+                where "orderNumber" like #{con} or "capacityNumber" like #{con}
+                or "gatepostName" like #{con} or  "materialName" like #{con}
+            </if>
         )
         <where>
             <if test="orderNumber != null">
@@ -1245,7 +1249,7 @@
         RC.CAPACITY_NUMBER          "capacityNumber",
         RG.GATEPOST_NAME            "gatepostName",
         TER.RESULT_ENTRY_MODE       "resultEntryMode",
-        to_char(TER.RESULT_ENTRY_GATE_TIME, 'yyyy-mm-dd hh:mm:ss')   "resultEntryGateTime",
+        TER.RESULT_ENTRY_GATE_TIME   "resultEntryGateTime",
         RS.SUPPLIER_NAME            "supplierName",
         TER.INSERT_TIME             "insertTime",
         RCON.CONSIGNEE_COMPANY_NAME "consigneeCompanyName"
@@ -1347,7 +1351,7 @@
        RC.CAPACITY_NUMBER                 "capacityNumber",
        RG.GATEPOST_NAME                   "gatepostName",
        TLFR.RESULT_OUT_MODE               "resultOutMode",
-       to_char(TLFR.RESULT_OUT_GATE_TIME, 'yyyy-mm-dd hh:mm:ss')    "resultOutGateTime",
+       TLFR.RESULT_OUT_GATE_TIME    "resultOutGateTime",
        TLFR.RESULT_TRUCK_SNAPSHOT_PICTURE "resultTruckSnapshotPicture"
   from TMSTRUCK_LEAVE_FACTORY_RESULT TLFR
   left join TMSTRUCK_TOTAL_RESULT TTR

+ 4 - 0
src/main/resources/com/steerinfo/dil/mapper/TmstruckLeaveFactoryResultMapper.xml

@@ -1118,6 +1118,10 @@
             <if test="userIds!=null">
               AND ASO.UPDATE_USERNAME=#{userIds}
             </if>
+            <if test="con!=null">
+                where "orderNumber" like #{con} or "capacityNumber" like #{con}
+                or "gatepostName" like #{con}  or  "materialName" like #{con}
+            </if>
         )
         <where>
             <if test="orderNumber != null">

+ 2 - 2
src/main/resources/com/steerinfo/dil/mapper/TmstruckLoadResultMapper.xml

@@ -1323,9 +1323,9 @@
     RM.MATERIAL_NAME            "materialName",
     OO.ORDER_NUMBER             "orderNumber",
     RC.CAPACITY_NUMBER          "capacityNumber",
-    to_char(TLR.RESULT_LOAD_START_TIME, 'yyyy-mm-dd hh:mm:ss')   "resultLoadStartTime",
+    TLR.RESULT_LOAD_START_TIME   "resultLoadStartTime",
     RW.WAREHOUSE_NAME           "warehouseName",
-    to_char(TLR.RESULT_LOAD_END_TIME, 'yyyy-mm-dd hh:mm:ss')  "resultLoadEndTime",
+    TLR.RESULT_LOAD_END_TIME   "resultLoadEndTime",
     TLR.RESULT_LOAD_DURATION  "loadDuration"
     FROM TMSTRUCK_LOAD_RESULT TLR
     LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR

+ 1 - 1
src/main/resources/com/steerinfo/dil/mapper/TmstruckUnloadResultMapper.xml

@@ -796,7 +796,7 @@
         RC.CAPACITY_NUMBER    "capacityNumber",
         RM.MATERIAL_NAME      "materialName",
         RW.WAREHOUSE_NAME     "warehouseName",
-        to_char(TUR.RESULT_END_TIME, 'yyyy-mm-dd hh:mm:ss')   "resultEndTime"
+        TUR.RESULT_END_TIME   "resultEndTime"
         FROM TMSTRUCK_UNLOAD_RESULT TUR
         LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
         ON TTR.RESULT_TOTAL_ID = TUR.RESULT_TOTAL_ID