|
@@ -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);
|