| | |
| | | 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(); |
| | |
| | | runBlockReassignStationList.add(stationObjModel); |
| | | runBlockReassignStationMap.put(deviceNo, runBlockReassignStationList); |
| | | } |
| | | |
| | | 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"); |
| | |
| | | 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)); |
| | |
| | | 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); |