private void setNewEquipmentNoMap(List<Equipments> equipmentList) { for (Equipments equipment : equipmentList) { equipment.setInsatll(true); Long equipmentNo = arrangementDao.getMaxEquipmentNo(); equipmentNoCovertMap.put(equipment.getEquipmentNo(), equipmentNo); } }
private Long newEquipmentNo(Equipments equipment) { return equipmentNoCovertMap.get(equipment.getEquipmentNo()); }
private String newlocationNo(Equipments equipment) { return locationConvertMap.get(equipment.getLocationNo()); }
private void arrangeEquipment(List<Equipments> equipmentList, String newLocationNo) { Tenanter tenanter = tenanterMap.get(newLocationNo); for (Equipments equipment : equipmentList) { Long newEquipmentNo = newEquipmentNo(equipment); String locationNo = newlocationNo(equipment); equipment.arrange(newEquipmentNo, locationNo); List<CommunicationLines> lineList = equipment.getCommunicationLineList(); if (lineList == null) continue; for (CommunicationLines line : lineList) { line.arrange(newEquipmentNo, tenanter.getDialNo()); } } // NCU for (Equipments equipment : equipmentList) { if ("10".equals(equipment.getEquipmentDiv())) { equipment.arrangeForNcu(tenanter.getNcuProductNo(), tenanter.getNcuManagementNo()); } } // GasMter for (Equipments equipment : equipmentList) { if ("50".equals(equipment.getEquipmentDiv())) { equipment.arrangeForNormal(equipmentNoCovertMap.get(equipment.getNcuEquipmentNo())); } } // Wire for (Equipments equipment : equipmentList) { String locationNo = newlocationNo(equipment); if ("40".equals(equipment.getEquipmentDiv())) { equipment.arrangeForNormal(equipmentNoCovertMap.get(equipment.getNcuEquipmentNo())); if (newLocationNo.equals(locationNo)) { equipment.arrangeForNcu(tenanter.getWireProductNo1(), tenanter.getWireManagementNo1()); } else { equipment.arrangeForNcu(tenanter.getWireProductNo2(), tenanter.getWireManagementNo2()); } } } }