#
Junjie
昨天 08782f91c979be03a8b911fcc0d4d73ec3329488
src/main/java/com/zy/asrs/controller/BasMapController.java
@@ -177,6 +177,7 @@
            HashMap<Integer, List<StationObjModel>> inStationMap = new HashMap<>();
            HashMap<Integer, List<StationObjModel>> outStationMap = new HashMap<>();
            HashMap<Integer, List<StationObjModel>> runBlockReassignStationMap = new HashMap<>();
            HashMap<Integer, List<StationObjModel>> isOutOrderStationMap = new HashMap<>();
            for (Map.Entry<Integer, List<List<HashMap<String, Object>>>> entry : dataMap.entrySet()) {
                Integer lev = entry.getKey();
@@ -192,17 +193,18 @@
                        HashMap<String, Object> nodeData = new HashMap<>();
                        nodeData.put("value", map.get("value"));
                        String nodeType = map.get("bgColor").toString();
                        if (nodeType.equals("RGB(0,176,80)")) {
                        String bgColor = map.get("bgColor").toString();
                        String nodeType = map.get("nodeType").toString();
                        if (nodeType.equals("shelf")) {
                            //货架
                            nodeData.put("type", "shelf");
                        } else if (nodeType.equals("RGB(255,192,0)")) {
                        } else if (nodeType.equals("crn")) {
                            //堆垛机
                            nodeData.put("type", "crn");
                        } else if (nodeType.equals("RGB(255,255,0)")) {
                        } else if (nodeType.equals("dualCrn")) {
                            //双工位堆垛机
                            nodeData.put("type", "dualCrn");
                        } else if (nodeType.equals("RGB(0,112,192)")) {
                        } else if (nodeType.equals("devp")) {
                            //输送线
                            nodeData.put("type", "devp");
@@ -266,7 +268,14 @@
                                runBlockReassignStationList.add(stationObjModel);
                                runBlockReassignStationMap.put(deviceNo, runBlockReassignStationList);
                            }
                        } else if (nodeType.equals("RGB(0,176,240)")) {
                            Integer isOutOrder = value.getInteger("isOutOrder");
                            if (isOutOrder != null && isOutOrder == 1) {
                                List<StationObjModel> isOutOrderStationList = isOutOrderStationMap.getOrDefault(deviceNo, new ArrayList<>());
                                isOutOrderStationList.add(stationObjModel);
                                isOutOrderStationMap.put(deviceNo, isOutOrderStationList);
                            }
                        } else if (nodeType.equals("rgv")) {
                            //RGV
                            nodeData.put("type", "rgv");
                        } else if (nodeType.equals("none")) {
@@ -275,6 +284,7 @@
                        } else if (nodeType.equals("merge")) {
                            //合并区域
                            nodeData.put("type", "merge");
                            nodeData.put("mergeType", map.get("mergeType"));
                        }
                        nodeData.put("cellWidth", map.get("cellWidth"));
@@ -314,6 +324,7 @@
                List<StationObjModel> inStationList = inStationMap.get(deviceNo);
                List<StationObjModel> outStationList = outStationMap.get(deviceNo);
                List<StationObjModel> runBlockReassignStationList = runBlockReassignStationMap.get(deviceNo);
                List<StationObjModel> isOutOrderStationList = isOutOrderStationMap.get(deviceNo);
                if (barcodeStationList != null) {
                    basDevp.setBarcodeStationList(JSON.toJSONString(barcodeStationList, SerializerFeature.DisableCircularReferenceDetect));
@@ -331,6 +342,10 @@
                    basDevp.setRunBlockReassignLocStationList(JSON.toJSONString(runBlockReassignStationList, SerializerFeature.DisableCircularReferenceDetect));
                }
                if (isOutOrderStationList != null) {
                    basDevp.setIsOutOrderList(JSON.toJSONString(isOutOrderStationList, SerializerFeature.DisableCircularReferenceDetect));
                }
                basDevp.setStationList(JSON.toJSONString(stationList, SerializerFeature.DisableCircularReferenceDetect));
                basDevp.setUpdateTime(new Date());
                basDevpService.insertOrUpdate(basDevp);