|
@@ -67,27 +67,24 @@ public class TmstrainPleaseApproveResultController extends BaseRESTfulController
|
|
Integer resultType) {
|
|
Integer resultType) {
|
|
//初始化过滤
|
|
//初始化过滤
|
|
List<Map<String, Object>> wagonPleaseList = null;
|
|
List<Map<String, Object>> wagonPleaseList = null;
|
|
|
|
+ mapValue.put("resultType", resultType);
|
|
|
|
+ mapValue.put("status", status);
|
|
//如果有条件查询则跳过初始化,和创建索引
|
|
//如果有条件查询则跳过初始化,和创建索引
|
|
- if (mapValue == null) {
|
|
|
|
- mapValue.put("resultType", resultType);
|
|
|
|
- mapValue.put("status", status);
|
|
|
|
|
|
+ if (mapValue.size() == 2) {
|
|
//将查询结果存入索引中
|
|
//将查询结果存入索引中
|
|
wagonPleaseList = tmstrainPleaseApproveResultService.getAllWagonPlease(mapValue);
|
|
wagonPleaseList = tmstrainPleaseApproveResultService.getAllWagonPlease(mapValue);
|
|
Map<String, Object> map = new HashMap<>();
|
|
Map<String, Object> map = new HashMap<>();
|
|
//添加索引
|
|
//添加索引
|
|
map.put("index", "get_all_wagon_please");
|
|
map.put("index", "get_all_wagon_please");
|
|
//添加id
|
|
//添加id
|
|
- map.put("indexId", "resultId3");
|
|
|
|
|
|
+ map.put("indexId", "wagonPleaseId");
|
|
wagonPleaseList.add(map);
|
|
wagonPleaseList.add(map);
|
|
//新建索引
|
|
//新建索引
|
|
- String s = JSON.toJSONString(wagonPleaseList);
|
|
|
|
esFeign.insertIndex(wagonPleaseList);
|
|
esFeign.insertIndex(wagonPleaseList);
|
|
//删除
|
|
//删除
|
|
wagonPleaseList.remove(wagonPleaseList.size() - 1);
|
|
wagonPleaseList.remove(wagonPleaseList.size() - 1);
|
|
}
|
|
}
|
|
if (wagonPleaseList == null) {
|
|
if (wagonPleaseList == null) {
|
|
- mapValue.put("resultType", resultType);
|
|
|
|
- mapValue.put("status", status);
|
|
|
|
wagonPleaseList = tmstrainPleaseApproveResultService.getAllWagonPlease(mapValue);
|
|
wagonPleaseList = tmstrainPleaseApproveResultService.getAllWagonPlease(mapValue);
|
|
}
|
|
}
|
|
PageHelper.startPage(pageNum, pageSize);
|
|
PageHelper.startPage(pageNum, pageSize);
|
|
@@ -106,9 +103,6 @@ public class TmstrainPleaseApproveResultController extends BaseRESTfulController
|
|
Integer resultType,
|
|
Integer resultType,
|
|
Integer status,
|
|
Integer status,
|
|
String con) {
|
|
String con) {
|
|
- if (mapValue == null) {
|
|
|
|
- mapValue = new HashMap<>();
|
|
|
|
- }
|
|
|
|
mapValue.put("status", status);
|
|
mapValue.put("status", status);
|
|
mapValue.put("resultType", resultType);
|
|
mapValue.put("resultType", resultType);
|
|
//设置要查询的索引名称
|
|
//设置要查询的索引名称
|
|
@@ -224,25 +218,23 @@ public class TmstrainPleaseApproveResultController extends BaseRESTfulController
|
|
Integer resultType) {
|
|
Integer resultType) {
|
|
//初始化过滤
|
|
//初始化过滤
|
|
List<Map<String, Object>> approveWagonPleaseList = null;
|
|
List<Map<String, Object>> approveWagonPleaseList = null;
|
|
|
|
+ mapValue.put("resultType", resultType);
|
|
//如果有条件查询则跳过初始化,和创建索引
|
|
//如果有条件查询则跳过初始化,和创建索引
|
|
- if (mapValue == null) {
|
|
|
|
- mapValue.put("resultType", resultType);
|
|
|
|
|
|
+ if (mapValue.size() == 1 ) {
|
|
//将查询结果存入索引中
|
|
//将查询结果存入索引中
|
|
approveWagonPleaseList = tmstrainPleaseApproveResultService.getAllApproveWagonPlease(mapValue);
|
|
approveWagonPleaseList = tmstrainPleaseApproveResultService.getAllApproveWagonPlease(mapValue);
|
|
Map<String, Object> map = new HashMap<>();
|
|
Map<String, Object> map = new HashMap<>();
|
|
//添加索引
|
|
//添加索引
|
|
map.put("index", "get_approve_wagon_please");
|
|
map.put("index", "get_approve_wagon_please");
|
|
//添加id
|
|
//添加id
|
|
- map.put("indexId", "resultId4");
|
|
|
|
|
|
+ map.put("indexId", "approveWagonPleaseId");
|
|
approveWagonPleaseList.add(map);
|
|
approveWagonPleaseList.add(map);
|
|
//新建索引
|
|
//新建索引
|
|
- String s = JSON.toJSONString(approveWagonPleaseList);
|
|
|
|
esFeign.insertIndex(approveWagonPleaseList);
|
|
esFeign.insertIndex(approveWagonPleaseList);
|
|
//删除
|
|
//删除
|
|
approveWagonPleaseList.remove(approveWagonPleaseList.size() - 1);
|
|
approveWagonPleaseList.remove(approveWagonPleaseList.size() - 1);
|
|
}
|
|
}
|
|
if (approveWagonPleaseList == null) {
|
|
if (approveWagonPleaseList == null) {
|
|
- mapValue.put("resultType", resultType);
|
|
|
|
approveWagonPleaseList = tmstrainPleaseApproveResultService.getAllApproveWagonPlease(mapValue);
|
|
approveWagonPleaseList = tmstrainPleaseApproveResultService.getAllApproveWagonPlease(mapValue);
|
|
}
|
|
}
|
|
PageHelper.startPage(pageNum, pageSize);
|
|
PageHelper.startPage(pageNum, pageSize);
|
|
@@ -260,9 +252,6 @@ public class TmstrainPleaseApproveResultController extends BaseRESTfulController
|
|
Integer pageSize,
|
|
Integer pageSize,
|
|
Integer resultType,
|
|
Integer resultType,
|
|
String con) {
|
|
String con) {
|
|
- if (mapValue == null) {
|
|
|
|
- mapValue = new HashMap<>();
|
|
|
|
- }
|
|
|
|
mapValue.put("resultType", resultType);
|
|
mapValue.put("resultType", resultType);
|
|
//设置要查询的索引名称
|
|
//设置要查询的索引名称
|
|
String index = "get_approve_wagon_please";
|
|
String index = "get_approve_wagon_please";
|