| | |
| | | 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"); |
| | | |
| | |
| | | runBlockReassignStationList.add(stationObjModel); |
| | | runBlockReassignStationMap.put(deviceNo, runBlockReassignStationList); |
| | | } |
| | | } else if (nodeType.equals("RGB(0,176,240)")) { |
| | | } else if (nodeType.equals("rgv")) { |
| | | //RGV |
| | | nodeData.put("type", "rgv"); |
| | | } else if (nodeType.equals("none")) { |
| | |
| | | } else if (nodeType.equals("merge")) { |
| | | //合并区域 |
| | | nodeData.put("type", "merge"); |
| | | nodeData.put("mergeType", map.get("mergeType")); |
| | | } |
| | | |
| | | nodeData.put("cellWidth", map.get("cellWidth")); |
| | |
| | | } |
| | | |
| | | HashMap<String, Object> mapData = data.get(k - 2).get(l - 2); |
| | | mapData.put("bgColor", "merge"); |
| | | Object devp = map.get("nodeType"); |
| | | mapData.put("nodeType", "merge"); |
| | | mapData.put("mergeType", devp); |
| | | mapData.put("value", map.get("value")); |
| | | } |
| | | } |
| | |
| | | if (cell == null) { |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | map.put("bgColor", "none"); |
| | | map.put("nodeType", "none"); |
| | | map.put("cellWidth", ""); |
| | | map.put("cellHeight", ""); |
| | | map.put("value", ""); |
| | |
| | | |
| | | String bgColor = getCellBackgroundColor(cell); |
| | | map.put("bgColor", bgColor); |
| | | if(bgColor.equals("RGB(0,176,80)")) { |
| | | //货架 |
| | | map.put("nodeType", "shelf"); |
| | | } else if (bgColor.equals("RGB(255,192,0)")) { |
| | | //堆垛机 |
| | | map.put("nodeType", "crn"); |
| | | } else if (bgColor.equals("RGB(255,255,0)")) { |
| | | //双工位堆垛机 |
| | | map.put("nodeType", "dualCrn"); |
| | | } else if (bgColor.equals("RGB(0,112,192)")) { |
| | | //输送线 |
| | | map.put("nodeType", "devp"); |
| | | } else if (bgColor.equals("RGB(0,176,240)")) { |
| | | //RGV |
| | | map.put("nodeType", "rgv"); |
| | | }else { |
| | | //空白区域 |
| | | map.put("nodeType", "none"); |
| | | } |
| | | |
| | | int columnIndex = cell.getColumnIndex(); |
| | | int columnWidth = sheet.getColumnWidth(columnIndex);//获取列宽 |
| | |
| | | JSONObject map = row.get(j); |
| | | NavigateNode navigateNode = new NavigateNode(i, j); |
| | | |
| | | String mergeType = map.getString("mergeType"); |
| | | String nodeType = map.getString("type"); |
| | | String nodeValue = map.getString("value"); |
| | | if(nodeType == null) { |
| | | navigateNode.setValue(MapNodeType.DISABLE.id); |
| | | }else if(nodeType.equals("devp") || nodeType.equals("merge")){ |
| | | }else if(nodeType.equals("devp") || (nodeType.equals("merge") && mergeType.equals("devp"))) { |
| | | navigateNode.setValue(MapNodeType.NORMAL_PATH.id); |
| | | |
| | | JSONObject valueObj = JSON.parseObject(map.getString("value")); |