private void convertLocationMap(Receptions source, String newLocationNo) { String sourceLocationNo = source.getLocationNo(); Tenanter tenant = tenanterMap.get(newLocationNo); locationConvertMap.put(sourceLocationNo, newLocationNo); List<String> locationNoList = new ArrayList<String>(source.getLocationNoSet()); for (String locationNo : locationNoList) { if (!locationConvertMap.containsKey(locationNo)) { locationConvertMap.put(locationNo, tenant.getLocationNo2()); } } }
private void arrangeCommision(Receptions reception, String maxReceptionNo) { for (Commisions commision : reception.getCommisionList()) { String newLocationNo = newLocation(commision.getLocationNo()); commision.arrange( maxReceptionNo, newLocationNo, equipmentNoCovertMap.get(commision.getConstructionNo()), equipmentNoCovertMap.get(commision.getEquipmentNo())); } for (CompleteCommisions complete : reception.getCompleteCommisionList()) complete.arrange(maxReceptionNo); for (CalcConditionsKey calc : reception.getCalcConditionList()) calc.arrange(maxReceptionNo); for (CostTransfers cost : reception.getCostTransferList()) cost.arrange(maxReceptionNo); for (PaymentsAdjustments pay : reception.getPaymentAdjustmentList()) pay.arrange(maxReceptionNo); }
private void arrangeContactMean(Receptions reception) { if (reception.getCustomerList() == null) return; for (ContactMeans mean : reception.getContactMeansList()) { Cisuser newCisuser = cisuserMap.get(mean.getLocationNo()); String newCustomerNo = String.valueOf(newCisuser.getCustmr().getCstRegNo()); String newLocationNo = newLocation(mean.getLocationNo()); String customerName = newCisuser.getCustmr().getNamKj(); String telno = newCisuser.getTelno().getCstTelNo(); mean.arrangeForMulti(newCustomerNo, newLocationNo, customerName, telno); } for (Customers customer : reception.getCustomerList()) { String newCustomerNo = customerConvertMap.get(customer.getCustomerNo()); customer.arrange(newCustomerNo); } }
public Receptions getReception(Receptions reception, String newLocationNo) { if (logger.isDebugEnabled()) logger.debug("start"); // 設置場所番号 String maxReceptionNo = arrangementDao.getMaxReceptionNo(); convertLocationMap(reception, newLocationNo); convertCisuserMap(reception); reception.arrange(maxReceptionNo, newLocationNo, cisuserMap.get(reception.getLocationNo())); reception.arrangeProcess(maxReceptionNo); arrangeConstruction(reception, maxReceptionNo, newLocationNo); arrangeCommision(reception, maxReceptionNo); arrangeContactMean(reception); arrangeSecall(reception.getSecallList()); if (logger.isDebugEnabled()) logger.debug("end"); return reception; }
private void arrangeConstruction( Receptions reception, String maxReceptionNo, String newLocationNo) { for (Constructions construction : reception.getConstructionList()) { setNewEquipmentNoMap(construction.getEquipmentList()); arrangeEquipment(construction.getEquipmentList(), newLocationNo); Long maxConstructionNo = arrangementDao.getMaxConstructionNo(); construction.arrange( maxConstructionNo, newLocation(construction.getLocationNo()), maxReceptionNo); for (Works work : construction.getWorkList()) arrangeWork(work, maxConstructionNo); for (Materials material : construction.getMaterialList()) arrangeMaterial(construction, maxConstructionNo, material); } }
private void convertCisuserMap(Receptions reception) { List<String> locationNoList = new ArrayList<String>(reception.getLocationNoSet()); for (String sourceLocationNo : locationNoList) { String newLocationNo = locationConvertMap.get(sourceLocationNo); Cisuser sourceCisuser = arrangementDao.getCisuser(Long.valueOf(sourceLocationNo)); Cisuser newCisuser = arrangementDao.getCisuser(Long.valueOf(newLocationNo)); cisuserMap.put(sourceLocationNo, newCisuser); cisuserMap.put(newLocationNo, newCisuser); String sourceCustomerNo = String.valueOf(sourceCisuser.getCustmr().getCstRegNo()); String newCustomerNo = String.valueOf(newCisuser.getCustmr().getCstRegNo()); customerConvertMap.put(sourceCustomerNo, newCustomerNo); String sourceSyabanNo = getSyaban(sourceCisuser.getGasmtr().getSyabanNo()); meterIdMap.put(sourceSyabanNo, newLocationNo); } }