|
@@ -9,6 +9,9 @@ import com.gyee.common.model.PointData;
|
|
|
import com.gyee.common.vo.monitor.AgcVo;
|
|
|
import com.gyee.runeconomy.init.CacheContext;
|
|
|
import com.gyee.runeconomy.model.auto.*;
|
|
|
+import com.gyee.runeconomy.model.vo.LineTreeVo;
|
|
|
+import com.gyee.runeconomy.model.vo.ProTreeVo;
|
|
|
+import com.gyee.runeconomy.model.vo.TreeVo;
|
|
|
import com.gyee.runeconomy.service.auto.IProEconTestingPointService;
|
|
|
import com.gyee.runeconomy.util.StringUtils;
|
|
|
import com.gyee.runeconomy.util.realtimesource.IEdosUtil;
|
|
@@ -28,22 +31,33 @@ public class DeviceDetailsService {
|
|
|
@Resource
|
|
|
private IProEconTestingPointService proEconTestingPointService;
|
|
|
|
|
|
- public Map<String,Object> tree(String wpid) {
|
|
|
+ public List<ProTreeVo> tree(String wpid) {
|
|
|
Map<String,Object> proMap = new HashMap<>();
|
|
|
Map<String, List<ProBasicProject>> wppromap = CacheContext.wppromap;
|
|
|
Map<String, List<ProBasicLine>> prolinemap = CacheContext.prolinemap;
|
|
|
Map<String, List<ProBasicEquipment>> lnwtmap = CacheContext.lnwtmap;
|
|
|
List<ProBasicProject> projects = wppromap.get(wpid);
|
|
|
+ TreeVo vo = new TreeVo();
|
|
|
+ List<ProTreeVo> pjvos = new ArrayList<>();
|
|
|
projects.stream().forEach(p->{
|
|
|
List<ProBasicLine> lines = prolinemap.get(p.getId());
|
|
|
Map<String,Object> lineMap = new HashMap<>();
|
|
|
+ List<LineTreeVo> lnvos = new ArrayList<>();
|
|
|
+ ProTreeVo pjvo = new ProTreeVo();
|
|
|
+ pjvo.setPjid(p.getId());
|
|
|
+ pjvo.setPjname(p.getAname());
|
|
|
lines.stream().forEach(line->{
|
|
|
+ LineTreeVo lnvo = new LineTreeVo();
|
|
|
+ lnvo.setLnid(line.getId());
|
|
|
+ lnvo.setLnname(line.getAname());
|
|
|
List<ProBasicEquipment> equipments = lnwtmap.get(line.getId());
|
|
|
- lineMap.put(line.getAname(),equipments);
|
|
|
+ lnvo.setWts(equipments);
|
|
|
+ lnvos.add(lnvo);
|
|
|
});
|
|
|
- proMap.put(p.getAname(),lineMap);
|
|
|
+ pjvo.setLns(lnvos);
|
|
|
+ pjvos.add(pjvo);
|
|
|
});
|
|
|
- return proMap;
|
|
|
+ return pjvos;
|
|
|
}
|
|
|
|
|
|
public Map<String, Double> info(String wtid) throws Exception {
|