엑셀/PDF 다운로드시 구분값 추가

This commit is contained in:
DESKTOP-6ARNG1Q\dlsgk 2024-11-21 09:54:20 +09:00
parent 11c9cbe49a
commit 9cf28ad5f5
2 changed files with 32 additions and 24 deletions

View File

@ -9,7 +9,6 @@ import com.interplug.qcast.biz.object.ObjectMapper;
import com.interplug.qcast.biz.object.dto.ObjectRequest; import com.interplug.qcast.biz.object.dto.ObjectRequest;
import com.interplug.qcast.biz.object.dto.ObjectResponse; import com.interplug.qcast.biz.object.dto.ObjectResponse;
import com.interplug.qcast.biz.pwrGnrSimulation.PwrGnrSimService; import com.interplug.qcast.biz.pwrGnrSimulation.PwrGnrSimService;
import com.interplug.qcast.biz.pwrGnrSimulation.dto.PwrGnrSimGuideResponse;
import com.interplug.qcast.biz.pwrGnrSimulation.dto.PwrGnrSimRequest; import com.interplug.qcast.biz.pwrGnrSimulation.dto.PwrGnrSimRequest;
import com.interplug.qcast.biz.pwrGnrSimulation.dto.PwrGnrSimResponse; import com.interplug.qcast.biz.pwrGnrSimulation.dto.PwrGnrSimResponse;
import com.interplug.qcast.config.Exception.ErrorCode; import com.interplug.qcast.config.Exception.ErrorCode;
@ -938,11 +937,11 @@ public class EstimateService {
if (pwrGnrSimResponse != null) { if (pwrGnrSimResponse != null) {
try { try {
// 발전시뮬레이션 안내사항 조회 // 발전시뮬레이션 안내사항 조회
PwrGnrSimGuideResponse pwrGnrSimGuideInfo = // PwrGnrSimGuideResponse pwrGnrSimGuideInfo =
pwrGnrSimService.selectPwrGnrSimulationGuideInfo(); // pwrGnrSimService.selectPwrGnrSimulationGuideInfo();
if (pwrGnrSimGuideInfo != null) { // if (pwrGnrSimGuideInfo != null) {
pwrGnrSimResponse.setGuideInfo(pwrGnrSimGuideInfo.getData()); // pwrGnrSimResponse.setGuideInfo(pwrGnrSimGuideInfo.getData());
} // }
} catch (Exception e) { } catch (Exception e) {
} }
} }
@ -958,26 +957,36 @@ public class EstimateService {
// 템플릿 html 조회 // 템플릿 html 조회
Document doc = PdfUtil.getPdfDoc(request, templateFilePath); Document doc = PdfUtil.getPdfDoc(request, templateFilePath);
// 삭제하려는 element // 견적서 상세 pdf Html 생성
Element elm; doc = this.estimatePdfHtml(doc, estimateResponse, estimateItemList);
// 발전시뮬레이션 pdf Html 생성
doc = pwrGnrSimService.pwrGnrSimPdfHtml(doc, pwrGnrSimResponse);
// SchDrawingFlg 1 : 전체 , 2 : 견적서, 3 : 발전시뮬레이션, 4 : 도면
if ("1".equals(estimateRequest.getSchDrawingFlg())) {
arrSection[iSection] = "div.section1"; arrSection[iSection] = "div.section1";
iSection++; iSection++;
arrSection[iSection] = "div.section2"; arrSection[iSection] = "div.section2";
iSection++; iSection++;
arrSection[iSection] = "div.section3"; // 발전시뮬레이션
// 견적서 상세 pdf Html 생성
doc = this.estimatePdfHtml(doc, estimateResponse, estimateItemList);
if ("1".equals(estimateRequest.getSchDrawingFlg())) {
arrSection[iSection] = "div.section3";
iSection++; iSection++;
arrSection[iSection] = "div.section4"; arrSection[iSection] = "div.section4"; // 도면
iSection++; iSection++;
arrSection[iSection] = "div.section5"; arrSection[iSection] = "div.section5"; // 도면
} else if ("2".equals(estimateRequest.getSchDrawingFlg())) {
// 발전시뮬레이션 pdf Html 생성 arrSection[iSection] = "div.section1";
doc = pwrGnrSimService.pwrGnrSimPdfHtml(doc, pwrGnrSimResponse); iSection++;
arrSection[iSection] = "div.section2";
} else if ("3".equals(estimateRequest.getSchDrawingFlg())) {
arrSection[iSection] = "div.section3"; // 발전시뮬레이션
} else if ("4".equals(estimateRequest.getSchDrawingFlg())) {
arrSection[iSection] = "div.section4"; // 도면
iSection++;
arrSection[iSection] = "div.section5"; // 도면
} else {
throw new QcastException(
ErrorCode.NOT_FOUND, message.getMessage("common.message.no.data"));
} }
// pdf 다운로드 // pdf 다운로드

View File

@ -1513,8 +1513,7 @@ public class PwrGnrSimService {
// 예측발전량 // 예측발전량
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
for (int i = 0; i < 13; i++) { for (int i = 0; i < 13; i++) {
sb.append( sb.append("<td>" + StringUtils.defaultString(pwrGnrSimList[i]) + "</td>");
"<td>" + StringUtils.defaultString(String.format("%,d", pwrGnrSimList[i])) + "</td>");
} }
elm = doc.getElementById("frcPwrGnrList_detail"); elm = doc.getElementById("frcPwrGnrList_detail");