|
@@ -65,39 +65,9 @@ public class TmstrainWagonUnloadResultController extends BaseRESTfulController {
|
|
|
Integer pageSize,
|
|
|
Integer resultType,
|
|
|
String con) {
|
|
|
- if (con != null) {
|
|
|
- if (!"undefined".equals(con)) {
|
|
|
- //设置要查询的索引名称
|
|
|
- String index = "get_train_wagon_unload";
|
|
|
- //获取查询结果
|
|
|
- return success(esFeign.getConResult(mapValue, index, apiId, pageNum, pageSize, con));
|
|
|
- }
|
|
|
- }
|
|
|
- //初始化过滤
|
|
|
- List<Map<String, Object>> wagonUnloadList = null;
|
|
|
- mapValue.put("resultType", resultType);
|
|
|
- //如果有条件查询则跳过初始化,和创建索引
|
|
|
- if (mapValue.size() == 1) {
|
|
|
- //将查询结果存入索引中
|
|
|
- wagonUnloadList = tmstrainWagonUnloadResultService.getTmstrainWagonUnLoad(mapValue);
|
|
|
- Map<String, Object> map = new HashMap<>();
|
|
|
- //添加索引
|
|
|
- map.put("index", "get_train_wagon_unload");
|
|
|
- //添加id
|
|
|
- map.put("indexId", "resultId6");
|
|
|
- wagonUnloadList.add(map);
|
|
|
- //新建索引
|
|
|
- String s = JSON.toJSONString(wagonUnloadList);
|
|
|
- esFeign.insertIndex(wagonUnloadList);
|
|
|
- //删除
|
|
|
- wagonUnloadList.remove(wagonUnloadList.size() - 1);
|
|
|
- }
|
|
|
- if (wagonUnloadList == null) {
|
|
|
- wagonUnloadList = tmstrainWagonUnloadResultService.getTmstrainWagonUnLoad(mapValue);
|
|
|
- }
|
|
|
PageHelper.startPage(pageNum, pageSize);
|
|
|
List<Map<String, Object>> tmstrainWagonUnLoad1 = tmstrainWagonUnloadResultService.getTmstrainWagonUnLoad(mapValue);
|
|
|
- PageListAdd pageList = columnDataUtil.tableColumnData(apiId, wagonUnloadList, tmstrainWagonUnLoad1);
|
|
|
+ PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null, tmstrainWagonUnLoad1);
|
|
|
return success(pageList);
|
|
|
}
|
|
|
|
|
@@ -160,38 +130,10 @@ public class TmstrainWagonUnloadResultController extends BaseRESTfulController {
|
|
|
Integer pageNum,
|
|
|
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;
|
|
|
- //如果有条件查询则跳过初始化,和创建索引
|
|
|
- if (mapValue == null) {
|
|
|
- //将查询结果存入索引中
|
|
|
- tmstrainList = tmstrainWagonUnloadResultService.getTmstrainResult(null);
|
|
|
- Map<String, Object> map = new HashMap<>();
|
|
|
- //添加索引
|
|
|
- map.put("index", "get_tmstrain_result");
|
|
|
- //添加id
|
|
|
- map.put("indexId", "result7");
|
|
|
- tmstrainList.add(map);
|
|
|
- //新建索引
|
|
|
- String s = JSON.toJSONString(tmstrainList);
|
|
|
- esFeign.insertIndex(tmstrainList);
|
|
|
- //删除
|
|
|
- tmstrainList.remove(tmstrainList.size() - 1);
|
|
|
- }
|
|
|
- if (tmstrainList == null) {
|
|
|
- tmstrainList = tmstrainWagonUnloadResultService.getTmstrainResult(mapValue);
|
|
|
- }
|
|
|
+
|
|
|
PageHelper.startPage(pageNum, pageSize);
|
|
|
List<Map<String, Object>> tmstrainResult1 = tmstrainWagonUnloadResultService.getTmstrainResult(mapValue);
|
|
|
- PageListAdd pageList = columnDataUtil.tableColumnData(apiId, tmstrainList, tmstrainResult1);
|
|
|
+ PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null, tmstrainResult1);
|
|
|
return success(pageList);
|
|
|
}
|
|
|
|
|
@@ -262,38 +204,10 @@ public class TmstrainWagonUnloadResultController extends BaseRESTfulController {
|
|
|
Integer pageNum,
|
|
|
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.size() == 0) {
|
|
|
- //将查询结果存入索引中
|
|
|
- trainUnLoadResult = tmstrainWagonUnloadResultService.getTmstrainResult(null);
|
|
|
- Map<String, Object> map = new HashMap<>();
|
|
|
- //添加索引
|
|
|
- map.put("index", "wagon_unload_result");
|
|
|
- //添加id
|
|
|
- map.put("indexId", "result8");
|
|
|
- trainUnLoadResult.add(map);
|
|
|
- //新建索引
|
|
|
- String s = JSON.toJSONString(trainUnLoadResult);
|
|
|
- esFeign.insertIndex(trainUnLoadResult);
|
|
|
- //删除
|
|
|
- trainUnLoadResult.remove(trainUnLoadResult.size() - 1);
|
|
|
- }
|
|
|
- if (trainUnLoadResult == null) {
|
|
|
- trainUnLoadResult = tmstrainWagonUnloadResultService.getTmstrainResult(mapValue);
|
|
|
- }
|
|
|
+
|
|
|
PageHelper.startPage(pageNum, pageSize);
|
|
|
List<Map<String, Object>> tmstrainWagonUnLoad1 = tmstrainWagonUnloadResultService.getTmstrainResult(mapValue);
|
|
|
- PageListAdd pageList = columnDataUtil.tableColumnData(apiId, trainUnLoadResult, tmstrainWagonUnLoad1);
|
|
|
+ PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null, tmstrainWagonUnLoad1);
|
|
|
return success(pageList);
|
|
|
}
|
|
|
|