diff --git a/src/main/java/com/interplug/qcast/biz/estimate/EstimateService.java b/src/main/java/com/interplug/qcast/biz/estimate/EstimateService.java index f2b13d07..7ba652e8 100644 --- a/src/main/java/com/interplug/qcast/biz/estimate/EstimateService.java +++ b/src/main/java/com/interplug/qcast/biz/estimate/EstimateService.java @@ -1,7 +1,43 @@ package com.interplug.qcast.biz.estimate; +import java.beans.BeanInfo; +import java.beans.Introspector; +import java.beans.PropertyDescriptor; +import java.io.IOException; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.math.BigDecimal; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.apache.commons.lang3.StringUtils; +import org.jsoup.nodes.Document; +import org.jsoup.nodes.Element; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.http.HttpMethod; +import org.springframework.stereotype.Service; +import org.springframework.web.util.UriComponentsBuilder; import com.fasterxml.jackson.databind.DeserializationFeature; -import com.interplug.qcast.biz.estimate.dto.*; +import com.interplug.qcast.biz.estimate.dto.EstimateApiResponse; +import com.interplug.qcast.biz.estimate.dto.EstimateCopyRequest; +import com.interplug.qcast.biz.estimate.dto.EstimateRequest; +import com.interplug.qcast.biz.estimate.dto.EstimateResponse; +import com.interplug.qcast.biz.estimate.dto.EstimateSendRequest; +import com.interplug.qcast.biz.estimate.dto.EstimateSendResponse; +import com.interplug.qcast.biz.estimate.dto.ItemRequest; +import com.interplug.qcast.biz.estimate.dto.ItemResponse; +import com.interplug.qcast.biz.estimate.dto.NoteRequest; +import com.interplug.qcast.biz.estimate.dto.NoteResponse; +import com.interplug.qcast.biz.estimate.dto.PlanSyncResponse; +import com.interplug.qcast.biz.estimate.dto.PriceRequest; +import com.interplug.qcast.biz.estimate.dto.RoofInfoResponse; +import com.interplug.qcast.biz.estimate.dto.RoofRequest; +import com.interplug.qcast.biz.estimate.dto.RoofResponse; import com.interplug.qcast.biz.file.FileMapper; import com.interplug.qcast.biz.file.dto.FileRequest; import com.interplug.qcast.biz.file.dto.FileResponse; @@ -19,26 +55,8 @@ import com.interplug.qcast.util.InterfaceQsp; import com.interplug.qcast.util.PdfUtil; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; -import java.beans.BeanInfo; -import java.beans.Introspector; -import java.beans.PropertyDescriptor; -import java.io.IOException; -import java.lang.reflect.Field; -import java.lang.reflect.Method; -import java.math.BigDecimal; -import java.text.SimpleDateFormat; -import java.util.*; -import java.util.List; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang3.StringUtils; -import org.jsoup.nodes.Document; -import org.jsoup.nodes.Element; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.http.HttpMethod; -import org.springframework.stereotype.Service; -import org.springframework.web.util.UriComponentsBuilder; @Slf4j @Service @@ -46,7 +64,8 @@ import org.springframework.web.util.UriComponentsBuilder; public class EstimateService { private final InterfaceQsp interfaceQsp; - @Autowired Messages message; + @Autowired + Messages message; @Value("${file.ini.root.path}") private String baseDirPath; @@ -63,7 +82,8 @@ public class EstimateService { private final FileMapper fileMapper; - @Autowired private PwrGnrSimService pwrGnrSimService; + @Autowired + private PwrGnrSimService pwrGnrSimService; /** * QSP 1차점 price 관리 목록 조회 @@ -75,31 +95,25 @@ public class EstimateService { public EstimateApiResponse selectStorePriceList(PriceRequest priceRequest) throws Exception { // Validation if (StringUtils.isEmpty(priceRequest.getSaleStoreId())) { - throw new QcastException( - ErrorCode.INVALID_INPUT_VALUE, + throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, message.getMessage("common.message.required.data", "Sale Store ID")); } if (StringUtils.isEmpty(priceRequest.getSapSalesStoreCd())) { - throw new QcastException( - ErrorCode.INVALID_INPUT_VALUE, + throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, message.getMessage("common.message.required.data", "Sap Sale Store Code")); } if (StringUtils.isEmpty(priceRequest.getDocTpCd())) { - throw new QcastException( - ErrorCode.INVALID_INPUT_VALUE, + throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, message.getMessage("common.message.required.data", "Estimate Type")); } EstimateApiResponse response = null; /* [1]. QSP API (url + param) Setting */ String url = QSP_API_URL + "/api/price/storePriceList"; - String apiUrl = - UriComponentsBuilder.fromHttpUrl(url) - .queryParam("saleStoreId", priceRequest.getSaleStoreId()) - .queryParam("sapSalesStoreCd", priceRequest.getSapSalesStoreCd()) - .queryParam("docTpCd", priceRequest.getDocTpCd()) - .build() - .toUriString(); + String apiUrl = UriComponentsBuilder.fromHttpUrl(url) + .queryParam("saleStoreId", priceRequest.getSaleStoreId()) + .queryParam("sapSalesStoreCd", priceRequest.getSapSalesStoreCd()) + .queryParam("docTpCd", priceRequest.getDocTpCd()).build().toUriString(); /* [2]. QSP API CALL -> Response */ String strResponse = interfaceQsp.callApi(HttpMethod.GET, apiUrl, null); @@ -127,26 +141,22 @@ public class EstimateService { public EstimateApiResponse selectItemPriceList(PriceRequest priceRequest) throws Exception { // Validation if (StringUtils.isEmpty(priceRequest.getSaleStoreId())) { - throw new QcastException( - ErrorCode.INVALID_INPUT_VALUE, + throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, message.getMessage("common.message.required.data", "Sale Store ID")); } if (StringUtils.isEmpty(priceRequest.getSapSalesStoreCd())) { - throw new QcastException( - ErrorCode.INVALID_INPUT_VALUE, + throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, message.getMessage("common.message.required.data", "Sap Sale Store Code")); } if (StringUtils.isEmpty(priceRequest.getPriceCd())) { - throw new QcastException( - ErrorCode.INVALID_INPUT_VALUE, + throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, message.getMessage("common.message.required.data", "Price Code")); } EstimateApiResponse response = null; /* [1]. QSP API CALL -> Response */ - String strResponse = - interfaceQsp.callApi( - HttpMethod.POST, QSP_API_URL + "/api//price/storePriceItemList", priceRequest); + String strResponse = interfaceQsp.callApi(HttpMethod.POST, + QSP_API_URL + "/api//price/storePriceItemList", priceRequest); if (!"".equals(strResponse)) { com.fasterxml.jackson.databind.ObjectMapper om = @@ -183,13 +193,11 @@ public class EstimateService { public EstimateResponse selectEstimateDetail(String objectNo, String planNo) throws Exception { // Validation if (StringUtils.isEmpty(objectNo)) { - throw new QcastException( - ErrorCode.INVALID_INPUT_VALUE, + throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, message.getMessage("common.message.required.data", "Object No")); } if (StringUtils.isEmpty(planNo)) { - throw new QcastException( - ErrorCode.INVALID_INPUT_VALUE, + throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, message.getMessage("common.message.required.data", "Plan No")); } @@ -233,23 +241,19 @@ public class EstimateService { public void insertEstimate(EstimateRequest estimateRequest) throws Exception { // Validation if (StringUtils.isEmpty(estimateRequest.getObjectNo())) { - throw new QcastException( - ErrorCode.INVALID_INPUT_VALUE, + throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, message.getMessage("common.message.required.data", "Object No")); } if (StringUtils.isEmpty(estimateRequest.getPlanNo())) { - throw new QcastException( - ErrorCode.INVALID_INPUT_VALUE, + throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, message.getMessage("common.message.required.data", "Plan No")); } if (StringUtils.isEmpty(estimateRequest.getSaleStoreId())) { - throw new QcastException( - ErrorCode.INVALID_INPUT_VALUE, + throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, message.getMessage("common.message.required.data", "Sale Store ID")); } if (StringUtils.isEmpty(estimateRequest.getSapSalesStoreCd())) { - throw new QcastException( - ErrorCode.INVALID_INPUT_VALUE, + throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, message.getMessage("common.message.required.data", "Sap Sale Store Code")); } @@ -268,8 +272,8 @@ public class EstimateService { ObjectResponse objectResponse = objectMapper.selectObjectDetail(estimateRequest.getObjectNo()); if (objectResponse != null) { - estimateRequest.setWeatherPoint( - objectResponse.getPrefName() + " - " + objectResponse.getAreaName()); + estimateRequest + .setWeatherPoint(objectResponse.getPrefName() + " - " + objectResponse.getAreaName()); estimateRequest.setCharger(objectResponse.getReceiveUser()); } @@ -391,10 +395,8 @@ public class EstimateService { bomItem.setUnit(itemResponse.getUnit()); bomItem.setPnowW(itemResponse.getPnowW()); bomItem.setSpecification(itemResponse.getPnowW()); - bomItem.setAmount( - String.valueOf( - Integer.parseInt(itemResponse.getBomAmount()) - * Integer.parseInt(itemRequest.getAmount()))); + bomItem.setAmount(String.valueOf(Integer.parseInt(itemResponse.getBomAmount()) + * Integer.parseInt(itemRequest.getAmount()))); bomItem.setBomAmount(itemResponse.getBomAmount()); bomItem.setUnitPrice(itemResponse.getSalePrice()); bomItem.setSalePrice(itemResponse.getSalePrice()); @@ -485,29 +487,24 @@ public class EstimateService { String pcTypeNo = ""; for (ItemRequest itemRequest : itemList) { if (StringUtils.isEmpty(itemRequest.getDispOrder())) { - throw new QcastException( - ErrorCode.INVALID_INPUT_VALUE, + throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, message.getMessage("common.message.required.data", "Display Order")); } if (StringUtils.isEmpty(itemRequest.getItemId())) { - throw new QcastException( - ErrorCode.INVALID_INPUT_VALUE, + throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, message.getMessage("common.message.required.data", "Item ID")); } if (StringUtils.isEmpty(itemRequest.getAmount())) { - throw new QcastException( - ErrorCode.INVALID_INPUT_VALUE, + throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, message.getMessage("common.message.required.data", "Item Amount")); } // 수량 - BigDecimal amount = - new BigDecimal( - StringUtils.isEmpty(itemRequest.getAmount()) ? "0" : itemRequest.getAmount()); + BigDecimal amount = new BigDecimal( + StringUtils.isEmpty(itemRequest.getAmount()) ? "0" : itemRequest.getAmount()); // 아이템용량 - BigDecimal pnowW = - new BigDecimal( - StringUtils.isEmpty(itemRequest.getPnowW()) ? "0" : itemRequest.getPnowW()); + BigDecimal pnowW = new BigDecimal( + StringUtils.isEmpty(itemRequest.getPnowW()) ? "0" : itemRequest.getPnowW()); // 모듈/PC 체크 if ("MODULE_".equals(itemRequest.getItemGroup())) { @@ -576,8 +573,7 @@ public class EstimateService { itemRequest.setPartAdd( !StringUtils.isEmpty(itemRequest.getPartAdd()) ? itemRequest.getPartAdd() : "0"); itemRequest.setItemChangeFlg( - !StringUtils.isEmpty(itemRequest.getItemChangeFlg()) - ? itemRequest.getItemChangeFlg() + !StringUtils.isEmpty(itemRequest.getItemChangeFlg()) ? itemRequest.getItemChangeFlg() : "0"); itemRequest.setUserId(estimateRequest.getUserId()); @@ -616,13 +612,11 @@ public class EstimateService { throws Exception { // Validation if (StringUtils.isEmpty(estimateCopyRequest.getObjectNo())) { - throw new QcastException( - ErrorCode.INVALID_INPUT_VALUE, + throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, message.getMessage("common.message.required.data", "Object No")); } if (StringUtils.isEmpty(estimateCopyRequest.getPlanNo())) { - throw new QcastException( - ErrorCode.INVALID_INPUT_VALUE, + throw new QcastException(ErrorCode.INVALID_INPUT_VALUE, message.getMessage("common.message.required.data", "Plan No")); } // 응답 객체 @@ -632,8 +626,8 @@ public class EstimateService { ObjectRequest objectRequest = new ObjectRequest(); objectRequest.setSaleStoreId(estimateCopyRequest.getCopySaleStoreId()); - objectRequest.setReceiveUser( - StringUtils.defaultString(estimateCopyRequest.getCopyReceiveUser())); + objectRequest + .setReceiveUser(StringUtils.defaultString(estimateCopyRequest.getCopyReceiveUser())); objectRequest.setDelFlg("0"); objectRequest.setTempFlg("0"); objectRequest.setTempDelFlg("0"); @@ -710,8 +704,7 @@ public class EstimateService { itemRequest.setPartAdd( !StringUtils.isEmpty(itemRequest.getPartAdd()) ? itemRequest.getPartAdd() : "0"); itemRequest.setItemChangeFlg( - !StringUtils.isEmpty(itemRequest.getItemChangeFlg()) - ? itemRequest.getItemChangeFlg() + !StringUtils.isEmpty(itemRequest.getItemChangeFlg()) ? itemRequest.getItemChangeFlg() : "0"); itemRequest.setUserId(estimateCopyRequest.getUserId()); @@ -800,14 +793,13 @@ public class EstimateService { * @param estimateRequest 견적서 엑셀 다운로드 요청 정보 * @throws Exception */ - public void excelDownload( - HttpServletRequest request, HttpServletResponse response, EstimateRequest estimateRequest) - throws Exception { + public void excelDownload(HttpServletRequest request, HttpServletResponse response, + EstimateRequest estimateRequest) throws Exception { // file Name 명이 없는경우 if (estimateRequest.getFileName() == null || "".equals(estimateRequest.getFileName())) { - estimateRequest.setFileName( - "Quation_Detail_" + new SimpleDateFormat("yyyyMMdd").format(new Date())); + estimateRequest + .setFileName("Quation_Detail_" + new SimpleDateFormat("yyyyMMdd").format(new Date())); } EstimateResponse estimateResponse = new EstimateResponse(); @@ -883,8 +875,8 @@ public class EstimateService { List estimateItemList = estimateMapper.selectEstimateItemList(estimateRequest); // 총 합산금액 계산 - this.selectTotalPriceInfo( - estimateResponse, estimateItemList, estimateRequest.getSchUnitPriceFlg()); + this.selectTotalPriceInfo(estimateResponse, estimateItemList, + estimateRequest.getSchUnitPriceFlg()); int j = 1; for (ItemResponse itemResponse : estimateItemList) { @@ -893,8 +885,8 @@ public class EstimateService { // 문자열 통화로 변환 처리 itemResponse.setSalePrice( String.format("%1$,.0f", Double.parseDouble(itemResponse.getSalePrice()))); - itemResponse.setAmount( - String.format("%1$,.0f", Double.parseDouble(itemResponse.getAmount()))); + itemResponse + .setAmount(String.format("%1$,.0f", Double.parseDouble(itemResponse.getAmount()))); itemResponse.setSaleTotPrice( String.format("%1$,.0f", Double.parseDouble(itemResponse.getSaleTotPrice()))); @@ -908,14 +900,14 @@ public class EstimateService { // 합산 문자열 통화로 변환 처리 estimateResponse.setPkgYn("YJSS".equals(estimateResponse.getEstimateType()) ? "Y" : "N"); - estimateResponse.setPkgNo( - "YJSS".equals(estimateResponse.getEstimateType()) ? String.valueOf(j++) : ""); + estimateResponse + .setPkgNo("YJSS".equals(estimateResponse.getEstimateType()) ? String.valueOf(j++) : ""); if ("YJSS".equals(estimateResponse.getEstimateType())) { - estimateResponse.setPkgAsp( - String.format("%1$,.0f", Double.parseDouble(estimateResponse.getPkgAsp()))); + estimateResponse + .setPkgAsp(String.format("%1$,.0f", Double.parseDouble(estimateResponse.getPkgAsp()))); } - estimateResponse.setTotVol( - String.format("%1$,.0f", Double.parseDouble(estimateResponse.getTotVol()))); + estimateResponse + .setTotVol(String.format("%1$,.0f", Double.parseDouble(estimateResponse.getTotVol()))); estimateResponse.setPkgTotPrice( String.format("%1$,.0f", Double.parseDouble(estimateResponse.getPkgTotPrice()))); estimateResponse.setSupplyPrice( @@ -925,7 +917,7 @@ public class EstimateService { estimateResponse.setTotPrice( String.format("%1$,.0f", Double.parseDouble(estimateResponse.getTotPrice()))); - // 발전시뮬레이션 계산 + // 발전시뮬레이션 계산 PwrGnrSimRequest pwrGnrSimRequest = new PwrGnrSimRequest(); pwrGnrSimRequest.setObjectNo(estimateResponse.getObjectNo()); pwrGnrSimRequest.setPlanNo(estimateResponse.getPlanNo()); @@ -937,11 +929,11 @@ public class EstimateService { if (pwrGnrSimResponse != null) { try { // 발전시뮬레이션 안내사항 조회 - // PwrGnrSimGuideResponse pwrGnrSimGuideInfo = - // pwrGnrSimService.selectPwrGnrSimulationGuideInfo(); - // if (pwrGnrSimGuideInfo != null) { - // pwrGnrSimResponse.setGuideInfo(pwrGnrSimGuideInfo.getData()); - // } + // PwrGnrSimGuideResponse pwrGnrSimGuideInfo = + // pwrGnrSimService.selectPwrGnrSimulationGuideInfo(); + // if (pwrGnrSimGuideInfo != null) { + // pwrGnrSimResponse.setGuideInfo(pwrGnrSimGuideInfo.getData()); + // } } catch (Exception e) { } } @@ -949,7 +941,7 @@ public class EstimateService { estimateResponse.setPwrGnrSim(pwrGnrSimResponse); if ("PDF".equals(estimateRequest.getSchDownload())) { // PDF 다운로드 - String[] arrSection = new String[5]; + String[] arrSection = new String[6]; int iSection = 0; String templateFilePath = "pdf_download_quotation_detail_template.html"; @@ -997,12 +989,8 @@ public class EstimateService { String excelTemplateNam = "excel_download_quotation_detail_template.xlsx"; ExcelUtil excelUtil = new ExcelUtil(); - excelUtil.download( - request, - response, - this.convertVoToMap(estimateResponse), - this.convertListToMap(estimateItemList), - estimateRequest.getFileName(), + excelUtil.download(request, response, this.convertVoToMap(estimateResponse), + this.convertListToMap(estimateItemList), estimateRequest.getFileName(), excelTemplateNam); } @@ -1019,9 +1007,8 @@ public class EstimateService { * @param unitPriceFlg 가격 표시 코드 * @throws Exception */ - public void selectTotalPriceInfo( - EstimateResponse estimateResponse, List itemList, String unitPriceFlg) - throws Exception { + public void selectTotalPriceInfo(EstimateResponse estimateResponse, List itemList, + String unitPriceFlg) throws Exception { BigDecimal totAmount = BigDecimal.ZERO; BigDecimal totVol = BigDecimal.ZERO; BigDecimal pkgTotPrice = BigDecimal.ZERO; @@ -1032,34 +1019,25 @@ public class EstimateService { String estimateType = estimateResponse.getEstimateType(); // 주택패키지 단가 - BigDecimal pkgAsp = - new BigDecimal( - StringUtils.isEmpty(estimateResponse.getPkgAsp()) ? "0" : estimateResponse.getPkgAsp()); + BigDecimal pkgAsp = new BigDecimal( + StringUtils.isEmpty(estimateResponse.getPkgAsp()) ? "0" : estimateResponse.getPkgAsp()); for (ItemResponse itemResponse : itemList) { // 수량 - BigDecimal amount = - new BigDecimal( - StringUtils.isEmpty(itemResponse.getAmount()) ? "0" : itemResponse.getAmount()); + BigDecimal amount = new BigDecimal( + StringUtils.isEmpty(itemResponse.getAmount()) ? "0" : itemResponse.getAmount()); // 판매가 BigDecimal salePrice = BigDecimal.ZERO; if ("1".equals(unitPriceFlg)) { - salePrice = - new BigDecimal( - StringUtils.isEmpty(itemResponse.getUnitPrice()) - ? "0" - : itemResponse.getUnitPrice()); + salePrice = new BigDecimal( + StringUtils.isEmpty(itemResponse.getUnitPrice()) ? "0" : itemResponse.getUnitPrice()); } else { - salePrice = - new BigDecimal( - StringUtils.isEmpty(itemResponse.getSalePrice()) - ? "0" - : itemResponse.getSalePrice()); + salePrice = new BigDecimal( + StringUtils.isEmpty(itemResponse.getSalePrice()) ? "0" : itemResponse.getSalePrice()); } // 아이템용량 - BigDecimal pnowW = - new BigDecimal( - StringUtils.isEmpty(itemResponse.getPnowW()) ? "0" : itemResponse.getPnowW()); + BigDecimal pnowW = new BigDecimal( + StringUtils.isEmpty(itemResponse.getPnowW()) ? "0" : itemResponse.getPnowW()); // 아이템 단가 합산 itemResponse.setSaleTotPrice(String.valueOf(salePrice.multiply(amount))); @@ -1103,11 +1081,10 @@ public class EstimateService { estimateResponse.setPkgTotPrice(String.valueOf(pkgTotPrice)); estimateResponse.setTotAmount(String.valueOf(totAmount.setScale(0, BigDecimal.ROUND_HALF_UP))); estimateResponse.setTotVol(String.valueOf(totVol)); - estimateResponse.setTotVolKw( - String.valueOf( - totVol.multiply(new BigDecimal("0.001")).setScale(3, BigDecimal.ROUND_FLOOR))); - estimateResponse.setSupplyPrice( - String.valueOf(supplyPrice.setScale(0, BigDecimal.ROUND_HALF_UP))); + estimateResponse.setTotVolKw(String + .valueOf(totVol.multiply(new BigDecimal("0.001")).setScale(3, BigDecimal.ROUND_FLOOR))); + estimateResponse + .setSupplyPrice(String.valueOf(supplyPrice.setScale(0, BigDecimal.ROUND_HALF_UP))); estimateResponse.setVatPrice(String.valueOf(vatPrice.setScale(0, BigDecimal.ROUND_HALF_UP))); estimateResponse.setTotPrice(String.valueOf(totPrice.setScale(0, BigDecimal.ROUND_HALF_UP))); } @@ -1160,9 +1137,8 @@ public class EstimateService { EstimateApiResponse response = null; /* [1]. QSP API CALL -> Response */ - String strResponse = - interfaceQsp.callApi( - HttpMethod.POST, QSP_API_URL + "/api/order/qcastQuotationSave", estimateSendRequest); + String strResponse = interfaceQsp.callApi(HttpMethod.POST, + QSP_API_URL + "/api/order/qcastQuotationSave", estimateSendRequest); if (!"".equals(strResponse)) { com.fasterxml.jackson.databind.ObjectMapper om = @@ -1256,28 +1232,18 @@ public class EstimateService { sb.append(""); sb.append( "" + StringUtils.defaultString(itemResponse.getNo()) + ""); - sb.append( - "" - + StringUtils.defaultString(itemResponse.getItemName()) - + ""); - sb.append( - "" - + StringUtils.defaultString(itemResponse.getItemNo()) - + ""); - sb.append( - "" - + StringUtils.defaultString(itemResponse.getSalePrice()) - + ""); - sb.append( - "" - + StringUtils.defaultString(itemResponse.getAmount()) - + ""); + sb.append("" + + StringUtils.defaultString(itemResponse.getItemName()) + ""); + sb.append("" + StringUtils.defaultString(itemResponse.getItemNo()) + + ""); + sb.append("" + + StringUtils.defaultString(itemResponse.getSalePrice()) + ""); + sb.append("" + + StringUtils.defaultString(itemResponse.getAmount()) + ""); sb.append( "" + StringUtils.defaultString(itemResponse.getUnit()) + ""); - sb.append( - "" - + StringUtils.defaultString(itemResponse.getSaleTotPrice()) - + ""); + sb.append("" + + StringUtils.defaultString(itemResponse.getSaleTotPrice()) + ""); sb.append(""); } if ("Y".equals(data.getPkgYn())) { @@ -1285,19 +1251,13 @@ public class EstimateService { sb.append("" + StringUtils.defaultString(data.getPkgNo()) + ""); sb.append("住宅 PKG"); sb.append("-"); - sb.append( - "" - + StringUtils.defaultString(data.getPkgAsp()) - + ""); - sb.append( - "" - + StringUtils.defaultString(data.getTotVol()) - + ""); + sb.append("" + + StringUtils.defaultString(data.getPkgAsp()) + ""); + sb.append("" + + StringUtils.defaultString(data.getTotVol()) + ""); sb.append("W"); - sb.append( - "" - + StringUtils.defaultString(data.getPkgTotPrice()) - + ""); + sb.append("" + + StringUtils.defaultString(data.getPkgTotPrice()) + ""); sb.append(""); } elm = doc.getElementById("itemList_detail"); @@ -1320,14 +1280,10 @@ public class EstimateService { sb = new StringBuilder(); for (NoteResponse noteResponse : data.getNoteList()) { sb.append(""); - sb.append( - "" - + StringUtils.defaultString(noteResponse.getCodeNm()) - + ""); - sb.append( - "" - + StringUtils.defaultString(noteResponse.getRemarks()) - + ""); + sb.append("" + + StringUtils.defaultString(noteResponse.getCodeNm()) + ""); + sb.append("" + + StringUtils.defaultString(noteResponse.getRemarks()) + ""); sb.append(""); } elm = doc.getElementById("noteList_detail"); @@ -1336,11 +1292,8 @@ public class EstimateService { // 도면 설정 elm = doc.getElementById("objectNo4"); - elm.text( - StringUtils.defaultString(data.getObjectNo()) - + " (Plan No : " - + StringUtils.defaultString(data.getPlanNo()) - + ")"); + elm.text(StringUtils.defaultString(data.getObjectNo()) + " (Plan No : " + + StringUtils.defaultString(data.getPlanNo()) + ")"); elm = doc.getElementById("objectName"); elm.text(StringUtils.defaultString(data.getObjectName())); @@ -1374,14 +1327,10 @@ public class EstimateService { if (!"STAND_".equals(itemResponse.getItemGroup())) { sb.append(""); sb.append("" + (no++) + ""); - sb.append( - "" - + StringUtils.defaultString(itemResponse.getItemNo()) - + ""); - sb.append( - "" - + StringUtils.defaultString(itemResponse.getAmount()) - + ""); + sb.append("" + + StringUtils.defaultString(itemResponse.getItemNo()) + ""); + sb.append("" + + StringUtils.defaultString(itemResponse.getAmount()) + ""); sb.append(""); } } @@ -1395,12 +1344,8 @@ public class EstimateService { sb.append(""); sb.append("" + (no++) + ""); sb.append( - "" - + StringUtils.defaultString(roofResponse.getItemNo()) - + "[" - + roofResponse.getPcModuleAmount() - + "]" - + ""); + "" + StringUtils.defaultString(roofResponse.getItemNo()) + + "[" + roofResponse.getPcModuleAmount() + "]" + ""); sb.append(""); } elm = doc.getElementById("pcsItemList_detail"); @@ -1414,10 +1359,8 @@ public class EstimateService { sb.append("" + StringUtils.defaultString(roofResponse.getRoofSurface()) + ""); sb.append("" + StringUtils.defaultString(roofResponse.getClassTypeName()) + ""); sb.append("" + StringUtils.defaultString(roofResponse.getAmount()) + ""); - sb.append( - "" - + StringUtils.defaultString(roofResponse.getVolKw()) - + ""); + sb.append("" + + StringUtils.defaultString(roofResponse.getVolKw()) + ""); sb.append(""); } elm = doc.getElementById("surFaceList_detail"); @@ -1435,19 +1378,13 @@ public class EstimateService { for (RoofResponse roofResponse : data.getRoofInfo().getRoofList()) { sb.append(""); sb.append("" + StringUtils.defaultString(roofResponse.getRoofSurface()) + ""); - sb.append( - "" - + StringUtils.defaultString(roofResponse.getRoofMaterialName()) - + ""); + sb.append("" + + StringUtils.defaultString(roofResponse.getRoofMaterialName()) + ""); sb.append("" + StringUtils.defaultString(roofResponse.getSlope()) + "寸"); - sb.append( - "" - + StringUtils.defaultString(roofResponse.getConstructSpecificationName()) - + ""); - sb.append( - "" - + StringUtils.defaultString(roofResponse.getSupportMethodName()) - + ""); + sb.append("" + StringUtils.defaultString(roofResponse.getConstructSpecificationName()) + + ""); + sb.append("" + + StringUtils.defaultString(roofResponse.getSupportMethodName()) + ""); sb.append("" + StringUtils.defaultString(roofResponse.getSurfaceType()) + ""); sb.append("" + StringUtils.defaultString(roofResponse.getSetupHeight()) + ""); sb.append(""); @@ -1457,11 +1394,8 @@ public class EstimateService { } elm = doc.getElementById("objectNo5"); - elm.text( - StringUtils.defaultString(data.getObjectNo()) - + " (Plan No : " - + StringUtils.defaultString(data.getPlanNo()) - + ")"); + elm.text(StringUtils.defaultString(data.getObjectNo()) + " (Plan No : " + + StringUtils.defaultString(data.getPlanNo()) + ")"); elm = doc.getElementById("objectName5"); elm.text(StringUtils.defaultString(data.getObjectName())); @@ -1495,14 +1429,10 @@ public class EstimateService { if ("STAND_".equals(itemResponse.getItemGroup())) { sb.append(""); sb.append("" + (no++) + ""); - sb.append( - "" - + StringUtils.defaultString(itemResponse.getItemNo()) - + ""); - sb.append( - "" - + StringUtils.defaultString(itemResponse.getAmount()) - + ""); + sb.append("" + + StringUtils.defaultString(itemResponse.getItemNo()) + ""); + sb.append("" + + StringUtils.defaultString(itemResponse.getAmount()) + ""); sb.append(""); } } @@ -1514,19 +1444,13 @@ public class EstimateService { for (RoofResponse roofResponse : data.getRoofInfo().getRoofList()) { sb.append(""); sb.append("" + StringUtils.defaultString(roofResponse.getRoofSurface()) + ""); - sb.append( - "" - + StringUtils.defaultString(roofResponse.getRoofMaterialName()) - + ""); + sb.append("" + + StringUtils.defaultString(roofResponse.getRoofMaterialName()) + ""); sb.append("" + StringUtils.defaultString(roofResponse.getSlope()) + "寸"); - sb.append( - "" - + StringUtils.defaultString(roofResponse.getConstructSpecificationName()) - + ""); - sb.append( - "" - + StringUtils.defaultString(roofResponse.getSupportMethodName()) - + ""); + sb.append("" + StringUtils.defaultString(roofResponse.getConstructSpecificationName()) + + ""); + sb.append("" + + StringUtils.defaultString(roofResponse.getSupportMethodName()) + ""); sb.append("" + StringUtils.defaultString(roofResponse.getSurfaceType()) + ""); sb.append("" + StringUtils.defaultString(roofResponse.getSetupHeight()) + ""); sb.append("");