|
@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.github.zuihou.authority.service.common.DictionaryItemService;
|
|
|
import com.github.zuihou.business.DemoLine.DemoLineConstant;
|
|
|
+import com.github.zuihou.business.DemoLine.YunjianConstant;
|
|
|
import com.github.zuihou.business.operationManagementCenter.dao.TTaskMapper;
|
|
|
import com.github.zuihou.business.operationManagementCenter.dao.TaskNodeMapper;
|
|
|
import com.github.zuihou.business.operationManagementCenter.dao.WorkpieceMapper;
|
|
@@ -350,11 +351,13 @@ public class ZZoneServiceImpl extends SuperServiceImpl<ZZoneMapper, ZZone> imple
|
|
|
gList.add(lMap);
|
|
|
}
|
|
|
}
|
|
|
- Map m = new HashMap();
|
|
|
- String allResourceSQl = productionresourceService.getGatherSQL();
|
|
|
- m.put("allResourceSQl",allResourceSQl);
|
|
|
- List<Map>resourceStatusList = productionresourceviewMapper.getResourceStatus(m);
|
|
|
- Map statusMap = resourceStatusList.get(0);
|
|
|
+// Map m = new HashMap();
|
|
|
+// String allResourceSQl = productionresourceService.getGatherSQL();
|
|
|
+// m.put("allResourceSQl",allResourceSQl);
|
|
|
+// List<Map>resourceStatusList = productionresourceviewMapper.getResourceStatus(m);
|
|
|
+ Map statusMap = getStatusMap(resourceList);
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
returnMap.put("iconGroupList",gList);
|
|
@@ -372,6 +375,52 @@ public class ZZoneServiceImpl extends SuperServiceImpl<ZZoneMapper, ZZone> imple
|
|
|
}
|
|
|
|
|
|
|
|
|
+ private Map getStatusMap(List<Map> resourceList){
|
|
|
+ Map statusMap = new HashMap();
|
|
|
+ int onlineCount = 0;
|
|
|
+ int offlineCount = 0;
|
|
|
+ int supervisionCount = 0;
|
|
|
+ int independentCount = 0;
|
|
|
+ int workCount = 0;
|
|
|
+ int freeCount = 0;
|
|
|
+ int exceptionCount = 0;
|
|
|
+
|
|
|
+ if(CollectionUtil.isNotEmpty(resourceList)){
|
|
|
+ for(Map map:resourceList){
|
|
|
+ String controlStatusCN = map.get("controlStatusCN")==null?"":map.get("controlStatusCN").toString();
|
|
|
+ String productionStatusCN = map.get("productionStatusCN")==null?"":map.get("productionStatusCN").toString();
|
|
|
+
|
|
|
+ if(YunjianConstant.YUNJIAN_CONTROL_STATUS_1.equals(controlStatusCN)){
|
|
|
+ supervisionCount++;
|
|
|
+ }
|
|
|
+ if(YunjianConstant.YUNJIAN_CONTROL_STATUS_2.equals(controlStatusCN)){
|
|
|
+ independentCount++;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(YunjianConstant.YUNJIAN_PRODUCTION_STATUS_1.equals(productionStatusCN)){
|
|
|
+ workCount++;
|
|
|
+ }
|
|
|
+ if(YunjianConstant.YUNJIAN_PRODUCTION_STATUS_2.equals(productionStatusCN)){
|
|
|
+ offlineCount++;
|
|
|
+ }
|
|
|
+ if(YunjianConstant.YUNJIAN_PRODUCTION_STATUS_3.equals(productionStatusCN)){
|
|
|
+ freeCount++;
|
|
|
+ }
|
|
|
+ if(YunjianConstant.YUNJIAN_PRODUCTION_STATUS_4.equals(productionStatusCN)){
|
|
|
+ exceptionCount++;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ statusMap.put("supervisionCount",supervisionCount);
|
|
|
+ statusMap.put("independentCount",independentCount);
|
|
|
+ statusMap.put("workCount",workCount);
|
|
|
+ statusMap.put("offlineCount",offlineCount);
|
|
|
+ statusMap.put("freeCount",freeCount);
|
|
|
+ statusMap.put("exceptionCount",exceptionCount);
|
|
|
+ }
|
|
|
+ return statusMap;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 把生产资源的数据塞入位置相关的数据
|
|
|
* @param resourceMap
|
|
@@ -540,31 +589,31 @@ public class ZZoneServiceImpl extends SuperServiceImpl<ZZoneMapper, ZZone> imple
|
|
|
|
|
|
@Override
|
|
|
public Map demoLineAllResource() {
|
|
|
- List <String>list = new ArrayList<String>();
|
|
|
+// List <String>list = new ArrayList<String>();
|
|
|
//所有的设备
|
|
|
- list.add(DemoLineConstant.JBW_A);
|
|
|
- list.add(DemoLineConstant.SXLZ1);
|
|
|
- list.add(DemoLineConstant.SXLZ2);
|
|
|
- list.add(DemoLineConstant.JBW_B);
|
|
|
- list.add(DemoLineConstant.JBW_D);
|
|
|
- list.add(DemoLineConstant.JBW_E);
|
|
|
- list.add(DemoLineConstant.Q3ZUOBIAO);
|
|
|
- list.add(DemoLineConstant.JQR1);
|
|
|
- list.add(DemoLineConstant.JBW_F);
|
|
|
- list.add(DemoLineConstant.JQR2);
|
|
|
- list.add(DemoLineConstant.DEMOLINE_SUM50_ZNDY);
|
|
|
- list.add(DemoLineConstant.JBW_H);
|
|
|
- list.add(DemoLineConstant.JBW_I);
|
|
|
- list.add(DemoLineConstant.DEMOLINE_SUM50_RXDY4);
|
|
|
- list.add(DemoLineConstant.JQR3);
|
|
|
- list.add(DemoLineConstant.DEMOLINE_QINGXIJI);
|
|
|
- list.add(DemoLineConstant.DEMOLINE_DABIAOJI);
|
|
|
+// list.add(DemoLineConstant.JBW_A);
|
|
|
+// list.add(DemoLineConstant.SXLZ1);
|
|
|
+// list.add(DemoLineConstant.SXLZ2);
|
|
|
+// list.add(DemoLineConstant.JBW_B);
|
|
|
+// list.add(DemoLineConstant.JBW_D);
|
|
|
+// list.add(DemoLineConstant.JBW_E);
|
|
|
+// list.add(DemoLineConstant.Q3ZUOBIAO);
|
|
|
+// list.add(DemoLineConstant.JQR1);
|
|
|
+// list.add(DemoLineConstant.JBW_F);
|
|
|
+// list.add(DemoLineConstant.JQR2);
|
|
|
+// list.add(DemoLineConstant.DEMOLINE_SUM50_ZNDY);
|
|
|
+// list.add(DemoLineConstant.JBW_H);
|
|
|
+// list.add(DemoLineConstant.JBW_I);
|
|
|
+// list.add(DemoLineConstant.DEMOLINE_SUM50_RXDY4);
|
|
|
+// list.add(DemoLineConstant.JQR3);
|
|
|
+// list.add(DemoLineConstant.DEMOLINE_QINGXIJI);
|
|
|
+// list.add(DemoLineConstant.DEMOLINE_DABIAOJI);
|
|
|
|
|
|
Map returnMap = new HashMap();
|
|
|
//查出所有生产资源
|
|
|
Map queryMap = new HashMap();
|
|
|
queryMap.put("resourceStatus","1");
|
|
|
- queryMap.put("codes",StringUtil.changeIdsListToSubQueryStr(list));
|
|
|
+// queryMap.put("codes",StringUtil.changeIdsListToSubQueryStr(list));
|
|
|
//生产资源的数据
|
|
|
List<Map> resourceList = productionresourceService.getList(queryMap);
|
|
|
//转成map
|