|
@@ -724,12 +724,13 @@ public class TaskServiceImpl extends SuperServiceImpl<TTaskMapper, TTask> implem
|
|
|
Map<String,List<Map>>m = dataList.stream().filter(t->t.get("resourceCode")!=null).collect(Collectors.groupingBy(t->t.get("resourceCode").toString()));
|
|
|
//根据设备编码找到名称
|
|
|
List<Productionresource>productionresourceList = productionresourceBizMapper.selectList(null);
|
|
|
- Map<String,String>productionMap = productionresourceList.stream().collect(Collectors.toMap(Productionresource::getCode, Productionresource::getName));
|
|
|
+ Map<String,Productionresource>productionMap = productionresourceList.stream().collect(Collectors.toMap(Productionresource::getCode, t->t));
|
|
|
|
|
|
for(String key:m.keySet()){
|
|
|
Map returnMap = new HashMap();
|
|
|
returnMap.put("code",key);
|
|
|
- returnMap.put("name",productionMap.get(key));
|
|
|
+ returnMap.put("name",productionMap.get(key).getName());
|
|
|
+ returnMap.put("id",productionMap.get(key).getId());
|
|
|
returnMap.put("children",m.get(key));
|
|
|
returnList.add(returnMap);
|
|
|
}
|