|
@@ -149,7 +149,7 @@ public class ProductionresourceServiceImpl extends SuperCacheServiceImpl<Product
|
|
|
setDesc(list);
|
|
|
//设置采集字段状态
|
|
|
if("1".equals(resourceStatus)){
|
|
|
- list = setGatherStatus(list);
|
|
|
+ list = setGatherStatus(list,map);
|
|
|
}
|
|
|
return list;
|
|
|
}
|
|
@@ -188,14 +188,14 @@ public class ProductionresourceServiceImpl extends SuperCacheServiceImpl<Product
|
|
|
//设置字典表
|
|
|
setDesc(list);
|
|
|
if("1".equals(resourceStatus)){
|
|
|
- list = setGatherStatus(list);
|
|
|
+ list = setGatherStatus(list,map);
|
|
|
}
|
|
|
|
|
|
- int count = productionresourceviewMapper.getCount(map);
|
|
|
+ //int count = productionresourceviewMapper.getCount(map);
|
|
|
|
|
|
Map<String, Object> retMap = new HashMap<String, Object> ();
|
|
|
retMap.put("data",list);
|
|
|
- retMap.put("count",count);
|
|
|
+ retMap.put("count",list.size());
|
|
|
return retMap;
|
|
|
}
|
|
|
|
|
@@ -804,15 +804,19 @@ public class ProductionresourceServiceImpl extends SuperCacheServiceImpl<Product
|
|
|
* @param list
|
|
|
* @return
|
|
|
*/
|
|
|
- private List<Map> setGatherStatus(List<Map>list){
|
|
|
+ private List<Map> setGatherStatus(List<Map>list,Map<String, Object> map){
|
|
|
//数据转换
|
|
|
Map<String, Map<String, DictionaryItem>> dictMap = dictionaryItemService.mapObj(new String[]{DictionaryType.LINK_STATUS, DictionaryType.CONTROL_STATUS, DictionaryType.PRODUCTION_STATUS,DictionaryType.RESOURCES_CATEGORY});
|
|
|
Map<String, DictionaryItem> linkMap = dictMap.get(DictionaryType.LINK_STATUS);
|
|
|
Map<String, DictionaryItem> controlMap = dictMap.get(DictionaryType.CONTROL_STATUS);
|
|
|
Map<String, DictionaryItem> productionMap = dictMap.get(DictionaryType.PRODUCTION_STATUS);
|
|
|
Map<String, DictionaryItem> categoryMap = dictMap.get(DictionaryType.RESOURCES_CATEGORY);
|
|
|
+
|
|
|
+ String searchProductionStatus = map.containsKey("productionStatus")?map.get("productionStatus").toString():"";
|
|
|
+ List<Map>returnList = new ArrayList<>();
|
|
|
try{
|
|
|
Map <String,Map> equipMap = getEquipListByInterface();
|
|
|
+
|
|
|
list.stream().map((item) -> {
|
|
|
//把三种状态,拼对象进去
|
|
|
// String linkStatus = item.get("linkStatus")==null?"0":item.get("linkStatus").toString();
|
|
@@ -824,6 +828,10 @@ public class ProductionresourceServiceImpl extends SuperCacheServiceImpl<Product
|
|
|
|
|
|
//String category = item.get("category")==null?"":item.get("category").toString();
|
|
|
|
|
|
+ if(searchProductionStatus.equals(productionStatus)){
|
|
|
+ returnList.add(item);
|
|
|
+ }
|
|
|
+
|
|
|
String showStatus = item.get("showStatus")==null?"0":item.get("showStatus").toString();
|
|
|
if("1".equals(showStatus)){
|
|
|
// item.put("linkStatus",buildMap(linkMap.get(linkStatus)));
|
|
@@ -846,7 +854,7 @@ public class ProductionresourceServiceImpl extends SuperCacheServiceImpl<Product
|
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
- return list;
|
|
|
+ return returnList;
|
|
|
}
|
|
|
|
|
|
/**
|