Quellcode durchsuchen

'修改框计算'

HUJIANGUO vor 3 Jahren
Ursprung
Commit
918440fcc5

+ 25 - 41
src/main/java/com/steerinfo/dil/controller/TmstrainLoadingResultController.java

@@ -61,12 +61,21 @@ public class TmstrainLoadingResultController extends BaseRESTfulController {
                                               Integer apiId,
                                               Integer pageNum,
                                               Integer pageSize,
-                                              Integer resultType) {
+                                              Integer resultType,
+                                              String con) {
+        if (con != null) {
+            if (!"undefined".equals(con)) {
+                //设置要查询的索引名称
+                String index = "get_tmstrain_wagon_load";
+                //获取查询结果
+                return success(esFeign.getConResult(mapValue, index, apiId, pageNum, pageSize, con));
+            }
+        }
+        mapValue.put("resultType", resultType);
         //初始化过滤
         List<Map<String, Object>> wagonLoadList = null;
         //如果有条件查询则跳过初始化,和创建索引
-        if (mapValue.size() == 0) {
-            mapValue.put("resultType", resultType);
+        if (mapValue.size() == 1) {
             //将查询结果存入索引中
             wagonLoadList = tmstrainLoadingResultService.getTmstrainWagonLoad(mapValue);
             Map<String, Object> map = new HashMap<>();
@@ -82,7 +91,6 @@ public class TmstrainLoadingResultController extends BaseRESTfulController {
             wagonLoadList.remove(wagonLoadList.size() - 1);
         }
         if (wagonLoadList == null) {
-            mapValue.put("resultType", resultType);
             wagonLoadList = tmstrainLoadingResultService.getTmstrainWagonLoad(mapValue);
         }
         PageHelper.startPage(pageNum, pageSize);
@@ -91,22 +99,6 @@ public class TmstrainLoadingResultController extends BaseRESTfulController {
         return success(pageList);
     }
 
-    @PostMapping("/getTmstrainWagonLoad/{apiId}")
-    public RESTfulResult getTmstrainWagonLoadByCon(@PathVariable("apiId") Integer apiId,
-                                                   @RequestBody(required = false) Map<String, Object> mapValue,
-                                                   Integer pageNum,
-                                                   Integer pageSize,
-                                                   Integer resultType,
-                                                   String con) {
-
-        mapValue.put("resultType", resultType);
-        //设置要查询的索引名称
-        String index = "get_tmstrain_wagon_load";
-        //获取查询结果
-        PageListAdd list = esFeign.getConResult(mapValue, index, apiId, pageNum, pageSize, con);
-        return success(list);
-    }
-
     /**
      * 新增车皮装车作业实绩
      *
@@ -231,10 +223,10 @@ public class TmstrainLoadingResultController extends BaseRESTfulController {
         mapValue.put("resultType", resultType);
         //不分页筛选数据
         List<Map<String, Object>> allWagonNo = tmstrainLoadingResultService.getWagonNo(mapValue);
-        PageHelper.startPage(pageNum,pageSize);
+        PageHelper.startPage(pageNum, pageSize);
         //分页数据
         List<Map<String, Object>> wagonNo = tmstrainLoadingResultService.getWagonNo(mapValue);
-        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, allWagonNo,wagonNo);
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, allWagonNo, wagonNo);
         return success(pageList);
     }
 
@@ -275,16 +267,24 @@ public class TmstrainLoadingResultController extends BaseRESTfulController {
     public RESTfulResult getTmstrainWagonLoadForConverted(@RequestBody(required = false) Map<String, Object> mapValue,
                                                           Integer apiId,
                                                           Integer pageNum,
-                                                          Integer pageSize) {
+                                                          Integer pageSize,
+                                                          String con) {
+        if (con != null) {
+            if (!"undefined".equals(con)) {
+                //设置要查询的索引名称
+                String index = "get_wagon_load_converted";
+                //获取查询结果
+                return success(esFeign.getConResult(mapValue, index, apiId, pageNum, pageSize, con));
+            }
+        }
         //初始化过滤
         List<Map<String, Object>> wagonLoadForConverted = null;
         //如果有条件查询则跳过初始化,和创建索引
-        if (mapValue == null) {
+        if (mapValue.size() == 0) {
             //将查询结果存入索引中
             wagonLoadForConverted = tmstrainLoadingResultService.selectLoadedForConverted(null);
             Map<String, Object> map = new HashMap<>();
             //添加索引
-
             map.put("index", "get_wagon_load_converted");
             //添加id
             map.put("indexId", "result2");
@@ -303,20 +303,4 @@ public class TmstrainLoadingResultController extends BaseRESTfulController {
         PageListAdd pageList = columnDataUtil.tableColumnData(apiId, wagonLoadForConverted, tmstrainWagonLoad1);
         return success(pageList);
     }
-
-    @PostMapping("/getTmstrainWagonLoadForConverted/{apiId}")
-    public RESTfulResult getWagonLoadForConvertedByCon(@PathVariable("apiId") Integer apiId,
-                                            @RequestBody(required = false) Map<String, Object> mapValue,
-                                            Integer pageNum,
-                                            Integer pageSize,
-                                            String con) {
-        if (mapValue == null) {
-            mapValue = new HashMap<>();
-        }
-        //设置要查询的索引名称
-        String index = "get_wagon_load_converted";
-        //获取查询结果
-        PageListAdd list = esFeign.getConResult(mapValue, index, apiId, pageNum, pageSize, con);
-        return success(list);
-    }
 }

+ 32 - 55
src/main/java/com/steerinfo/dil/controller/TmstrainPleaseApproveResultController.java

@@ -64,7 +64,16 @@ public class TmstrainPleaseApproveResultController extends BaseRESTfulController
                                            Integer pageNum,
                                            Integer pageSize,
                                            Integer status,
-                                           Integer resultType) {
+                                           Integer resultType,
+                                           String con) {
+        if (con != null) {
+            if (!"undefined".equals(con)) {
+                //设置要查询的索引名称
+                String index = "get_all_wagon_please";
+                //获取查询结果
+                return success(esFeign.getConResult(mapValue, index, apiId, pageNum, pageSize, con));
+            }
+        }
         //初始化过滤
         List<Map<String, Object>> wagonPleaseList = null;
         mapValue.put("resultType", resultType);
@@ -95,23 +104,6 @@ public class TmstrainPleaseApproveResultController extends BaseRESTfulController
         return success(pageList);
     }
 
-    @PostMapping("/getAllWagonPlease/{apiId}")
-    public RESTfulResult getAllWagonPleaseByCon(@PathVariable("apiId") Integer apiId,
-                                                @RequestBody(required = false) Map<String, Object> mapValue,
-                                                Integer pageNum,
-                                                Integer pageSize,
-                                                Integer resultType,
-                                                Integer status,
-                                                String con) {
-        mapValue.put("status", status);
-        mapValue.put("resultType", resultType);
-        //设置要查询的索引名称
-        String index = "get_all_wagon_please";
-        //获取查询结果
-        PageListAdd list = esFeign.getConResult(mapValue, index, apiId, pageNum, pageSize, con);
-        return success(list);
-    }
-
     @ApiOperation(value = "通过Id查询请车作业")
     @PostMapping("/getWagonPleaseById/{resultId}")
     public RESTfulResult getWagonPleaseById(@PathVariable("resultId") Integer resultId) {
@@ -215,7 +207,16 @@ public class TmstrainPleaseApproveResultController extends BaseRESTfulController
                                                   Integer apiId,
                                                   Integer pageNum,
                                                   Integer pageSize,
-                                                  Integer resultType) {
+                                                  Integer resultType,
+                                                  String con) {
+        if (con != null) {
+            if (!"undefined".equals(con)) {
+                //设置要查询的索引名称
+                String index = "get_approve_wagon_please";
+                //获取查询结果
+                return success(esFeign.getConResult(mapValue, index, apiId, pageNum, pageSize, con));
+            }
+        }
         //初始化过滤
         List<Map<String, Object>> approveWagonPleaseList = null;
         mapValue.put("resultType", resultType);
@@ -245,20 +246,6 @@ public class TmstrainPleaseApproveResultController extends BaseRESTfulController
         return success(pageList);
     }
 
-    @PostMapping("/getApproveAllWagonPlease/{apiId}")
-    public RESTfulResult getApproveAllWagonPleaseByCon(@PathVariable("apiId") Integer apiId,
-                                                       @RequestBody(required = false) Map<String, Object> mapValue,
-                                                       Integer pageNum,
-                                                       Integer pageSize,
-                                                       Integer resultType,
-                                                       String con) {
-        mapValue.put("resultType", resultType);
-        //设置要查询的索引名称
-        String index = "get_approve_wagon_please";
-        //获取查询结果
-        PageListAdd list = esFeign.getConResult(mapValue, index, apiId, pageNum, pageSize, con);
-        return success(list);
-    }
 
     @ApiOperation(value = "通过Id查询批车作业")
     @PostMapping("/getApproveWagonPleaseById/{resultId}")
@@ -340,12 +327,21 @@ public class TmstrainPleaseApproveResultController extends BaseRESTfulController
                                                        Integer apiId,
                                                        Integer pageNum,
                                                        Integer pageSize,
-                                                       Integer status) {
+                                                       Integer status,
+                                                       String con) {
+        if (con != null) {
+            if (!"undefined".equals(con)) {
+                //设置要查询的索引名称
+                String index = "get_tmstrain_wagon_load";
+                //获取查询结果
+                return success(esFeign.getConResult(mapValue, index, apiId, pageNum, pageSize, con));
+            }
+        }
+        mapValue.put("status", status);
         //初始化过滤
         List<Map<String, Object>> wagonPleaseConvertedList = null;
         //如果有条件查询则跳过初始化,和创建索引
-        if (mapValue == null) {
-            mapValue.put("status", status);
+        if (mapValue.size() == 1) {
             //将查询结果存入索引中
             wagonPleaseConvertedList = tmstrainPleaseApproveResultService.selectPleaseApprovePlanForConverted(mapValue);
             Map<String, Object> map = new HashMap<>();
@@ -361,7 +357,6 @@ public class TmstrainPleaseApproveResultController extends BaseRESTfulController
             wagonPleaseConvertedList.remove(wagonPleaseConvertedList.size() - 1);
         }
         if (wagonPleaseConvertedList == null) {
-            mapValue.put("status", status);
             wagonPleaseConvertedList = tmstrainPleaseApproveResultService.selectPleaseApprovePlanForConverted(mapValue);
         }
         PageHelper.startPage(pageNum, pageSize);
@@ -372,24 +367,6 @@ public class TmstrainPleaseApproveResultController extends BaseRESTfulController
         return success(pageList);
     }
 
-    @PostMapping("/getAllWagonPleaseForConverted/{apiId}")
-    public RESTfulResult getAllWagonPleaseForConverted(@PathVariable("apiId") Integer apiId,
-                                                       @RequestBody(required = false) Map<String, Object> mapValue,
-                                                       Integer pageNum,
-                                                       Integer pageSize,
-                                                       Integer status,
-                                                       String con) {
-        if (mapValue == null) {
-            mapValue = new HashMap<>();
-        }
-        mapValue.put("status", status);
-        //设置要查询的索引名称
-        String index = "get_wagon_please_converted";
-        //获取查询结果
-        PageListAdd list = esFeign.getConResult(mapValue, index, apiId, pageNum, pageSize, con);
-        return success(list);
-    }
-
     /**
      * 通过id查询请车作业
      *

+ 44 - 76
src/main/java/com/steerinfo/dil/controller/TmstrainWagonUnloadResultController.java

@@ -63,13 +63,21 @@ public class TmstrainWagonUnloadResultController extends BaseRESTfulController {
                                                 Integer apiId,
                                                 Integer pageNum,
                                                 Integer pageSize,
-                                                Integer resultType) {
-
+                                                Integer resultType,
+                                                String con) {
+        if (con != null) {
+            if (!"undefined".equals(con)) {
+                //设置要查询的索引名称
+                String index = "get_tmstrain_wagon_unload";
+                //获取查询结果
+                return success(esFeign.getConResult(mapValue, index, apiId, pageNum, pageSize, con));
+            }
+        }
         //初始化过滤
         List<Map<String, Object>> wagonUnloadList = null;
+        mapValue.put("resultType", resultType);
         //如果有条件查询则跳过初始化,和创建索引
-        if (mapValue == null) {
-            mapValue.put("resultType", resultType);
+        if (mapValue.size() == 0) {
             //将查询结果存入索引中
             wagonUnloadList = tmstrainWagonUnloadResultService.getTmstrainWagonUnLoad(mapValue);
             Map<String, Object> map = new HashMap<>();
@@ -85,7 +93,6 @@ public class TmstrainWagonUnloadResultController extends BaseRESTfulController {
             wagonUnloadList.remove(wagonUnloadList.size() - 1);
         }
         if (wagonUnloadList == null) {
-            mapValue.put("resultType", resultType);
             wagonUnloadList = tmstrainWagonUnloadResultService.getTmstrainWagonUnLoad(mapValue);
         }
         PageHelper.startPage(pageNum, pageSize);
@@ -94,24 +101,6 @@ public class TmstrainWagonUnloadResultController extends BaseRESTfulController {
         return success(pageList);
     }
 
-    @PostMapping("/getTmstrainWagonUnLoad/{apiId}")
-    public RESTfulResult getTmstrainWagonUnLoadByCon(@PathVariable("apiId") Integer apiId,
-                                                     @RequestBody(required = false) Map<String, Object> mapValue,
-                                                     Integer pageNum,
-                                                     Integer pageSize,
-                                                     Integer resultType,
-                                                     String con) {
-        if (mapValue == null) {
-            mapValue = new HashMap<>();
-        }
-        mapValue.put("resultType", resultType);
-        //设置要查询的索引名称
-        String index = "get_tmstrain_wagon_unload";
-        //获取查询结果
-        PageListAdd list = esFeign.getConResult(mapValue, index, apiId, pageNum, pageSize, con);
-        return success(list);
-    }
-
     /**
      * 通过主键删除车皮卸车作业实绩
      *
@@ -169,7 +158,16 @@ public class TmstrainWagonUnloadResultController extends BaseRESTfulController {
     public RESTfulResult getTmstrainresult(@RequestBody(required = false) Map<String, Object> mapValue,
                                            Integer apiId,
                                            Integer pageNum,
-                                           Integer pageSize) {
+                                           Integer pageSize,
+                                           String con) {
+        if (con != null) {
+            if (!"undefined".equals(con)) {
+                //设置要查询的索引名称
+                String index = "get_tmstrain_result";
+                //获取查询结果
+                return success(esFeign.getConResult(mapValue, index, apiId, pageNum, pageSize, con));
+            }
+        }
         //初始化过滤
         List<Map<String, Object>> tmstrainList = null;
         //如果有条件查询则跳过初始化,和创建索引
@@ -197,22 +195,6 @@ public class TmstrainWagonUnloadResultController extends BaseRESTfulController {
         return success(pageList);
     }
 
-    @PostMapping("/getTmstrainresult/{apiId}")
-    public RESTfulResult getTmstrainresultByCon(@PathVariable("apiId") Integer apiId,
-                                                @RequestBody(required = false) Map<String, Object> mapValue,
-                                                Integer pageNum,
-                                                Integer pageSize,
-                                                String con) {
-        if (mapValue == null) {
-            mapValue = new HashMap<>();
-        }
-        //设置要查询的索引名称
-        String index = "get_tmstrain_result";
-        //获取查询结果
-        PageListAdd list = esFeign.getConResult(mapValue, index, apiId, pageNum, pageSize, con);
-        return success(list);
-    }
-
     /**
      * 获取卸车地点名称
      *
@@ -267,11 +249,20 @@ public class TmstrainWagonUnloadResultController extends BaseRESTfulController {
     public RESTfulResult selectWagonUnLoadResultForConverted(@RequestBody(required = false) Map<String, Object> mapValue,
                                                              Integer apiId,
                                                              Integer pageNum,
-                                                             Integer pageSize) {
+                                                             Integer pageSize,
+                                                             String con) {
+        if (con != null) {
+            if (!"undefined".equals(con)) {
+                //设置要查询的索引名称
+                String index = "wagon_unload_result";
+                //获取查询结果
+                return success(esFeign.getConResult(mapValue, index, apiId, pageNum, pageSize, con));
+            }
+        }
         //初始化过滤
         List<Map<String, Object>> wagonUnLoadResult = null;
         //如果有条件查询则跳过初始化,和创建索引
-        if (mapValue.size()==0) {
+        if (mapValue.size() == 0) {
             //将查询结果存入索引中
             wagonUnLoadResult = tmstrainWagonUnloadResultService.selectWagonUnLoadResult(mapValue);
             Map<String, Object> map = new HashMap<>();
@@ -294,22 +285,6 @@ public class TmstrainWagonUnloadResultController extends BaseRESTfulController {
         return success(pageList);
     }
 
-    @PostMapping("/selectWagonUnLoadResultForConverted/{apiId}")
-    public RESTfulResult selectWagonUnLoadResultForConvertedByCon(@PathVariable("apiId") Integer apiId,
-                                                       @RequestBody(required = false) Map<String, Object> mapValue,
-                                                       Integer pageNum,
-                                                       Integer pageSize,
-                                                       String con) {
-        if (mapValue == null) {
-            mapValue = new HashMap<>();
-        }
-        //设置要查询的索引名称
-        String index = "wagon_unload_result";
-        //获取查询结果
-        PageListAdd list = esFeign.getConResult(mapValue, index, apiId, pageNum, pageSize, con);
-        return success(list);
-    }
-
     //*********内转物流查询火车卸车实绩************************************
     @ApiOperation(value = "查询火车卸车信息")
     @ApiImplicitParams({
@@ -319,11 +294,20 @@ public class TmstrainWagonUnloadResultController extends BaseRESTfulController {
     public RESTfulResult selectTrainUnLoadResultForConverted(@RequestBody(required = false) Map<String, Object> mapValue,
                                                              Integer apiId,
                                                              Integer pageNum,
-                                                             Integer pageSize) {
+                                                             Integer pageSize,
+                                                             String con) {
+        if (con != null) {
+            if (!"undefined".equals(con)) {
+                //设置要查询的索引名称
+                String index = "wagon_unload_result";
+                //获取查询结果
+                return success(esFeign.getConResult(mapValue, index, apiId, pageNum, pageSize, con));
+            }
+        }
         //初始化过滤
         List<Map<String, Object>> trainUnLoadResult = null;
         //如果有条件查询则跳过初始化,和创建索引
-        if (mapValue == null) {
+        if (mapValue.size() == 0) {
             //将查询结果存入索引中
             trainUnLoadResult = tmstrainWagonUnloadResultService.getTmstrainResult(null);
             Map<String, Object> map = new HashMap<>();
@@ -347,21 +331,5 @@ public class TmstrainWagonUnloadResultController extends BaseRESTfulController {
         return success(pageList);
     }
 
-    @PostMapping("/selectTrainUnLoadResultForConverted/{apiId}")
-    public RESTfulResult selectTrainUnLoadResultForConvertedByCon(@PathVariable("apiId") Integer apiId,
-                                                       @RequestBody(required = false) Map<String, Object> mapValue,
-                                                       Integer pageNum,
-                                                       Integer pageSize,
-                                                       String con) {
-        if (mapValue == null) {
-            mapValue = new HashMap<>();
-        }
-        //设置要查询的索引名称
-        String index = "unload_result_converted";
-        //获取查询结果
-        PageListAdd list = esFeign.getConResult(mapValue, index, apiId, pageNum, pageSize, con);
-        return success(list);
-    }
-
 
 }