|
@@ -60,41 +60,14 @@ public class RmsMaterialController extends BaseRESTfulController {
|
|
if (mapValue==null){
|
|
if (mapValue==null){
|
|
mapValue=new HashMap<>();
|
|
mapValue=new HashMap<>();
|
|
}
|
|
}
|
|
-
|
|
|
|
- //框计算
|
|
|
|
- if (con != null) {
|
|
|
|
- if (!"undefined".equals(con)) {
|
|
|
|
- //设置要查询的索引名称
|
|
|
|
- String index = "get_material_list";
|
|
|
|
- //获取查询结果
|
|
|
|
- return success(esFeign.getConResult(mapValue, index, apiId, pageNum, pageSize, con));
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- //初始化过滤
|
|
|
|
- List<Map<String, Object>> listTotal = null;
|
|
|
|
- //如果有条件查询则跳过初始化,和创建索引
|
|
|
|
- if (mapValue.size() == 0) {
|
|
|
|
- //将查询结果存入索引中
|
|
|
|
- listTotal = rmsMaterialService.getMaterialList(null);
|
|
|
|
- Map<String, Object> map = new HashMap<>();
|
|
|
|
- //添加索引
|
|
|
|
- map.put("index", "get_material_list");
|
|
|
|
- //添加id
|
|
|
|
- map.put("indexId", "materialId");
|
|
|
|
- listTotal.add(map);
|
|
|
|
- //新建索引
|
|
|
|
- String s = JSON.toJSONString(listTotal);
|
|
|
|
- esFeign.insertIndex(listTotal);
|
|
|
|
- //删除
|
|
|
|
- listTotal.remove(listTotal.size() - 1);
|
|
|
|
- }
|
|
|
|
- if (listTotal == null) {
|
|
|
|
- listTotal = rmsMaterialService.getMaterialList(mapValue);
|
|
|
|
|
|
+ if (con!=null&&!con.equals("undefined")){
|
|
|
|
+ mapValue.put("con","%"+con+"%");
|
|
}
|
|
}
|
|
|
|
+ List<Map<String, Object>> listTotal = rmsMaterialService.getMaterialList(mapValue);
|
|
|
|
+
|
|
PageHelper.startPage(pageNum, pageSize);
|
|
PageHelper.startPage(pageNum, pageSize);
|
|
//分页查询数据
|
|
//分页查询数据
|
|
- List<Map<String, Object>> columnList = rmsMaterialService.getMaterialList(mapValue);
|
|
|
|
-
|
|
|
|
|
|
+ List<Map<String, Object>> columnList = rmsMaterialService.getMaterialList(mapValue);
|
|
PageListAdd data = columnDataUtil.tableColumnData(apiId, listTotal, columnList);
|
|
PageListAdd data = columnDataUtil.tableColumnData(apiId, listTotal, columnList);
|
|
return success(data);
|
|
return success(data);
|
|
}
|
|
}
|