From 1e4b68b7b0631938b685aefd20b04dbd9027d24f Mon Sep 17 00:00:00 2001 From: "LAPTOP-L3VE7KK2\\USER" Date: Thu, 7 Nov 2024 10:54:08 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B2=AC=EC=A0=81=EC=84=9C=20=EC=97=91?= =?UTF-8?q?=EC=85=80=EB=8B=A4=EC=9A=B4=EB=A1=9C=EB=93=9C=20API=20=EB=B0=8F?= =?UTF-8?q?=20=ED=8C=8C=EC=9D=BC=EC=82=AD=EC=A0=9C=20API=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 36 ++++ .../biz/estimate/EstimateController.java | 13 ++ .../qcast/biz/estimate/EstimateMapper.java | 3 + .../qcast/biz/estimate/EstimateService.java | 180 +++++++++++++++++- .../biz/estimate/dto/EstimatePdfResponse.java | 85 --------- .../biz/estimate/dto/EstimateRequest.java | 13 ++ .../biz/estimate/dto/EstimateResponse.java | 38 ++++ .../qcast/biz/estimate/dto/ItemResponse.java | 6 + .../qcast/biz/estimate/dto/NoteRequest.java | 3 + .../qcast/biz/file/FileController.java | 8 + .../interplug/qcast/biz/file/FileService.java | 9 + .../com/interplug/qcast/util/ExcelUtil.java | 55 ++++++ src/main/resources/config/application-dev.yml | 3 +- .../resources/config/application-local.yml | 3 +- src/main/resources/config/application-prd.yml | 3 +- .../mappers/estimate/estimateMapper.xml | 12 +- .../resources/mappers/file/fileMapper.xml | 2 +- 17 files changed, 373 insertions(+), 99 deletions(-) delete mode 100644 src/main/java/com/interplug/qcast/biz/estimate/dto/EstimatePdfResponse.java create mode 100644 src/main/java/com/interplug/qcast/util/ExcelUtil.java diff --git a/pom.xml b/pom.xml index 7cd4ac47..91ffd4b2 100644 --- a/pom.xml +++ b/pom.xml @@ -125,6 +125,42 @@ ini4j 0.5.4 + + + + org.apache.poi + poi + 4.0.1 + + + org.apache.poi + poi-ooxml + 4.0.1 + + + + + org.jxls + jxls + 2.9.0 + + + org.jxls + jxls-poi + 2.9.0 + + + net.sf.jxls + jxls-core + 1.0.6 + + + org.jxls + jxls-jexcel + 1.0.9 + + + diff --git a/src/main/java/com/interplug/qcast/biz/estimate/EstimateController.java b/src/main/java/com/interplug/qcast/biz/estimate/EstimateController.java index 269a23e6..2440cd7d 100644 --- a/src/main/java/com/interplug/qcast/biz/estimate/EstimateController.java +++ b/src/main/java/com/interplug/qcast/biz/estimate/EstimateController.java @@ -3,6 +3,8 @@ package com.interplug.qcast.biz.estimate; import com.interplug.qcast.biz.estimate.dto.*; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import java.util.List; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -61,4 +63,15 @@ public class EstimateController { throws Exception { return estimateService.insertEstimateCopy(estimateRequest); } + + @Operation(description = "견적서를 엑셀로 다운로드한다.") + @PostMapping("/excel-download") + @ResponseStatus(HttpStatus.OK) + public void excelDownload( + HttpServletRequest request, + HttpServletResponse response, + @RequestBody EstimateRequest estimateRequest) + throws Exception { + estimateService.excelDownload(request, response, estimateRequest); + } } diff --git a/src/main/java/com/interplug/qcast/biz/estimate/EstimateMapper.java b/src/main/java/com/interplug/qcast/biz/estimate/EstimateMapper.java index ec70262b..a1ee000d 100644 --- a/src/main/java/com/interplug/qcast/biz/estimate/EstimateMapper.java +++ b/src/main/java/com/interplug/qcast/biz/estimate/EstimateMapper.java @@ -10,6 +10,9 @@ public interface EstimateMapper { // 견적서 상세 확인 public EstimateResponse selectEstimateDetail(EstimateRequest estimateRequest); + // 견적서 PDF 상세 확인 + public EstimateResponse selectEstimatePdfDetail(EstimateRequest estimateRequest); + // 견적서 아이템 목록 조회 public List selectEstimateItemList(EstimateRequest estimateRequest); 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 a34e3aa7..ac89aad2 100644 --- a/src/main/java/com/interplug/qcast/biz/estimate/EstimateService.java +++ b/src/main/java/com/interplug/qcast/biz/estimate/EstimateService.java @@ -12,11 +12,19 @@ import com.interplug.qcast.biz.object.dto.PlanResponse; import com.interplug.qcast.config.Exception.ErrorCode; import com.interplug.qcast.config.Exception.QcastException; import com.interplug.qcast.config.message.Messages; +import com.interplug.qcast.util.ExcelUtil; import com.interplug.qcast.util.InterfaceQsp; import io.micrometer.common.util.StringUtils; +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.File; +import java.lang.reflect.Field; +import java.lang.reflect.Method; import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; +import java.util.*; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; @@ -36,6 +44,9 @@ public class EstimateService { @Value("${qsp.url}") private String QSP_API_URL; + @Value("${file.excel.template.path}") + private String excelTemplateFilePath; + private final ObjectMapper objectMapper; private final EstimateMapper estimateMapper; @@ -157,7 +168,7 @@ public class EstimateService { response.setItemList(estimateItemList); // 총 합산금액 계산 - this.selectTotalPriceInfo(response); + this.selectTotalPriceInfo(response, estimateItemList, ""); // 첨부파일 목록 조회 FileRequest fileDeleteReq = new FileRequest(); @@ -522,7 +533,103 @@ public class EstimateService { return response; } - public void selectTotalPriceInfo(EstimateResponse estimateResponse) throws Exception { + public void excelDownload( + HttpServletRequest request, HttpServletResponse response, EstimateRequest estimateRequest) + throws Exception { + ExcelUtil excelUtil = new ExcelUtil(); + EstimateResponse estimateResponse = new EstimateResponse(); + String splitStr = "、"; + + try { + // 견적서 상세 조회 + estimateResponse = estimateMapper.selectEstimatePdfDetail(estimateRequest); + + if ("1".equals(estimateRequest.getSchDisplayFlg())) { + estimateResponse.setCustSaleStoreName(estimateResponse.getObjectName()); + estimateResponse.setCustOmit(estimateResponse.getObjectNameOmit()); + } else { + estimateResponse.setCustOmit("様邸"); + } + + // 견적서 특이사항 조회 + List noteList = new ArrayList(); + if (!StringUtils.isEmpty(estimateResponse.getEstimateOption())) { + String[] arrSpnAttrCd = + new String[estimateResponse.getEstimateOption().split(splitStr).length]; + int i = 0; + for (String str : estimateResponse.getEstimateOption().split(splitStr)) { + arrSpnAttrCd[i++] = str; + } + + NoteRequest noteRequest = new NoteRequest(); + noteRequest.setArrSpnAttrCd(arrSpnAttrCd); + noteList = estimateMapper.selectEstimateNoteList(noteRequest); + + estimateResponse.setNoteList(noteList); + } + + // 아이템 목록 조회 + List estimateItemList = estimateMapper.selectEstimateItemList(estimateRequest); + + // 총 합산금액 계산 + this.selectTotalPriceInfo( + estimateResponse, estimateItemList, estimateRequest.getSchUnitPriceFlg()); + + int j = 1; + for (ItemResponse itemResponse : estimateItemList) { + itemResponse.setNo(String.valueOf(j++)); + + // 문자열 통화로 변환 처리 + itemResponse.setSalePrice( + String.format("%1$,.0f", Double.parseDouble(itemResponse.getSalePrice()))); + itemResponse.setAmount( + String.format("%1$,.0f", Double.parseDouble(itemResponse.getAmount()))); + itemResponse.setSaleTotPrice( + String.format("%1$,.0f", Double.parseDouble(itemResponse.getSaleTotPrice()))); + + if ("YJSS".equals(estimateResponse.getEstimateType()) + && !"1".equals(itemResponse.getPkgMaterialFlg())) { + itemResponse.setSalePrice(""); + itemResponse.setSaleTotPrice(""); + } + } + + // 합산 문자열 통화로 변환 처리 + estimateResponse.setPkgYn("YJSS".equals(estimateResponse.getEstimateType()) ? "Y" : "N"); + estimateResponse.setPkgNo( + "YJSS".equals(estimateResponse.getEstimateType()) ? String.valueOf(j++) : ""); + estimateResponse.setPkgAsp( + String.format("%1$,.0f", Double.parseDouble(estimateResponse.getPkgAsp()))); + estimateResponse.setTotVol( + String.format("%1$,.0f", Double.parseDouble(estimateResponse.getTotVol()))); + estimateResponse.setPkgTotPrice( + String.format("%1$,.0f", Double.parseDouble(estimateResponse.getPkgTotPrice()))); + estimateResponse.setSupplyPrice( + String.format("%1$,.0f", Double.parseDouble(estimateResponse.getSupplyPrice()))); + estimateResponse.setVatPrice( + String.format("%1$,.0f", Double.parseDouble(estimateResponse.getVatPrice()))); + estimateResponse.setTotPrice( + String.format("%1$,.0f", Double.parseDouble(estimateResponse.getTotPrice()))); + + String excelFileName = "Quation_Detail"; + String excelTemplatePath = + excelTemplateFilePath + File.separator + "excel_download_quotation_detail_template.xlsx"; + + excelUtil.download( + request, + response, + this.convertVoToMap(estimateResponse), + this.convertListToMap(estimateItemList), + excelFileName, + excelTemplatePath); + } catch (Exception e) { + e.printStackTrace(); + } + } + + public void selectTotalPriceInfo( + EstimateResponse estimateResponse, List itemList, String unitPriceFlg) + throws Exception { BigDecimal totAmount = BigDecimal.ZERO; BigDecimal totVol = BigDecimal.ZERO; BigDecimal pkgTotPrice = BigDecimal.ZERO; @@ -531,7 +638,6 @@ public class EstimateService { BigDecimal totPrice = BigDecimal.ZERO; String estimateType = estimateResponse.getEstimateType(); - List itemList = estimateResponse.getItemList(); // 주택패키지 단가 BigDecimal pkgAsp = @@ -544,9 +650,20 @@ public class EstimateService { new BigDecimal( StringUtils.isEmpty(itemResponse.getAmount()) ? "0" : itemResponse.getAmount()); // 판매가 - BigDecimal salePrice = - new BigDecimal( - StringUtils.isEmpty(itemResponse.getSalePrice()) ? "0" : itemResponse.getSalePrice()); + BigDecimal salePrice = BigDecimal.ZERO; + if ("1".equals(unitPriceFlg)) { + salePrice = + new BigDecimal( + StringUtils.isEmpty(itemResponse.getUnitPrice()) + ? "0" + : itemResponse.getUnitPrice()); + } else { + salePrice = + new BigDecimal( + StringUtils.isEmpty(itemResponse.getSalePrice()) + ? "0" + : itemResponse.getSalePrice()); + } // 아이템용량 BigDecimal pnowW = new BigDecimal( @@ -590,10 +707,55 @@ public class EstimateService { estimateResponse.setPkgTotPrice(String.valueOf(pkgTotPrice)); estimateResponse.setTotAmount(String.valueOf(totAmount.setScale(0, BigDecimal.ROUND_HALF_UP))); - estimateResponse.setTotVol(String.valueOf(totVol.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.setVatPrice(String.valueOf(vatPrice.setScale(0, BigDecimal.ROUND_HALF_UP))); estimateResponse.setTotPrice(String.valueOf(totPrice.setScale(0, BigDecimal.ROUND_HALF_UP))); } + + public Map convertVoToMap(Object vo) { + Map result = new HashMap(); + + try { + BeanInfo info = Introspector.getBeanInfo(vo.getClass()); + for (PropertyDescriptor pd : info.getPropertyDescriptors()) { + Method reader = pd.getReadMethod(); + if (reader != null) { + result.put(pd.getName(), reader.invoke(vo)); + } + } + } catch (Exception e) { + log.error("convertVoToMap >>> " + e.getMessage()); + } + return result; + } + + public static List> convertListToMap(Collection target) { + List> resultList = new ArrayList>(); + + for (T element : target) { + Map resultMap = new HashMap(); + Field[] fieldList = element.getClass().getDeclaredFields(); + if (fieldList != null && fieldList.length > 0) { + try { + for (int i = 0; i < fieldList.length; i++) { + String curInsName = fieldList[i].getName(); + Field field = element.getClass().getDeclaredField(curInsName); + field.setAccessible(true); + Object targetValue = field.get(element); + + resultMap.put(curInsName, targetValue); + } + resultList.add(resultMap); + } catch (Exception e) { + log.error("convertListToMap >>> " + e.getMessage()); + } + } + } + return resultList; + } } diff --git a/src/main/java/com/interplug/qcast/biz/estimate/dto/EstimatePdfResponse.java b/src/main/java/com/interplug/qcast/biz/estimate/dto/EstimatePdfResponse.java deleted file mode 100644 index 1bdf5ff3..00000000 --- a/src/main/java/com/interplug/qcast/biz/estimate/dto/EstimatePdfResponse.java +++ /dev/null @@ -1,85 +0,0 @@ -package com.interplug.qcast.biz.estimate.dto; - -import io.swagger.v3.oas.annotations.media.Schema; -import java.util.List; -import lombok.Data; - -@Data -public class EstimatePdfResponse { - @Schema(description = "물건번호") - private String objectNo; - - @Schema(description = "플랜번호") - private String planNo; - - @Schema(description = "판매점ID") - private String saleStoreId; - - @Schema(description = "견적서 유효기간") - private String estimateValidityTerm; - - @Schema(description = "견적갱신일") - private String estimateDate; - - @Schema(description = "PKG 단가") - private String pkgAsp; - - @Schema(description = "비고") - private String remarks; - - // 가격 관련 정보 - @Schema(description = "총 수량") - private String totAmount; - - @Schema(description = "총 용량") - private String totVol; - - @Schema(description = "PKG 총액") - private String pkgTotPrice; - - @Schema(description = "공급가액") - private String supplyPrice; - - @Schema(description = "부가세") - private String vatPrice; - - @Schema(description = "총액") - private String totPrice; - - // 물건정보 정보 - @Schema(description = "물건명") - private String objectName; - - @Schema(description = "경칭") - private String objectNameOmit; - - // 판매점 정보 - @Schema(description = "고객 판매점명") - private String custSaleStoreName; - - @Schema(description = "판매점명") - private String saleStoreName; - - @Schema(description = "우편번호") - private String zipNo; - - @Schema(description = "주소") - private String address; - - @Schema(description = "전화번호") - private String tel; - - @Schema(description = "Fax번호") - private String fax; - - // PKG 정보 - @Schema(description = "주택패키지 여부") - private String pkgYn; - - @Schema(description = "주택패키지 번호") - private String pkgNo; - - // 데이터 목록 관련 정보 - @Schema(description = "아이템 목록") - List itemList; -} diff --git a/src/main/java/com/interplug/qcast/biz/estimate/dto/EstimateRequest.java b/src/main/java/com/interplug/qcast/biz/estimate/dto/EstimateRequest.java index c3d7d2ea..d17675d3 100644 --- a/src/main/java/com/interplug/qcast/biz/estimate/dto/EstimateRequest.java +++ b/src/main/java/com/interplug/qcast/biz/estimate/dto/EstimateRequest.java @@ -156,6 +156,19 @@ public class EstimateRequest { @Schema(description = "아이템번호 목록") private String[] arrItemId; + // 다운로드 관련 조건 + @Schema(description = "다운로드 정가 표시여부") + private String schUnitPriceFlg; + + @Schema(description = "다운로드 표시여부") + private String schDisplayFlg; + + @Schema(description = "가대중량표 포함 여부") + private String schWeightFlg; + + @Schema(description = "도면 포함 여부") + private String schDrawingFlg; + // 데이터 목록 관련 정보 @Schema(description = "지붕재 목록") List roofList; diff --git a/src/main/java/com/interplug/qcast/biz/estimate/dto/EstimateResponse.java b/src/main/java/com/interplug/qcast/biz/estimate/dto/EstimateResponse.java index 28e55fc3..c3ef189f 100644 --- a/src/main/java/com/interplug/qcast/biz/estimate/dto/EstimateResponse.java +++ b/src/main/java/com/interplug/qcast/biz/estimate/dto/EstimateResponse.java @@ -149,6 +149,9 @@ public class EstimateResponse { @Schema(description = "총 용량") private String totVol; + @Schema(description = "총 용량 (Kw)") + private String totVolKw; + @Schema(description = "PKG 총액") private String pkgTotPrice; @@ -180,10 +183,45 @@ public class EstimateResponse { @Schema(description = "판매점 레벨") private String saleStoreLevel; + // 판매점 정보 + @Schema(description = "고객 판매점명") + private String custSaleStoreName; + + @Schema(description = "고객 경칭") + private String custOmit; + + @Schema(description = "판매점명") + private String saleStoreName; + + @Schema(description = "우편번호") + private String zipNo; + + @Schema(description = "주소") + private String address; + + @Schema(description = "전화번호") + private String tel; + + @Schema(description = "Fax번호") + private String fax; + + @Schema(description = "법인번호") + private String bizNo; + + // PKG 정보 + @Schema(description = "주택패키지 여부") + private String pkgYn; + + @Schema(description = "주택패키지 번호") + private String pkgNo; + // 데이터 목록 관련 정보 @Schema(description = "아이템 목록") List itemList; + @Schema(description = "견적서 특이사항 목록") + List noteList; + @Schema(description = "첨부파일 목록") List fileList; } diff --git a/src/main/java/com/interplug/qcast/biz/estimate/dto/ItemResponse.java b/src/main/java/com/interplug/qcast/biz/estimate/dto/ItemResponse.java index d9eafc56..7a44e3df 100644 --- a/src/main/java/com/interplug/qcast/biz/estimate/dto/ItemResponse.java +++ b/src/main/java/com/interplug/qcast/biz/estimate/dto/ItemResponse.java @@ -14,6 +14,9 @@ public class ItemResponse { @Schema(description = "플랜번호") private String planNo; + @Schema(description = "번호") + private String no; + @Schema(description = "아이템 ID") private String itemId; @@ -35,6 +38,9 @@ public class ItemResponse { @Schema(description = "단가") private String salePrice; + @Schema(description = "정가") + private String unitPrice; + @Schema(description = "합산") private String saleTotPrice; diff --git a/src/main/java/com/interplug/qcast/biz/estimate/dto/NoteRequest.java b/src/main/java/com/interplug/qcast/biz/estimate/dto/NoteRequest.java index a9617f42..11dd7381 100644 --- a/src/main/java/com/interplug/qcast/biz/estimate/dto/NoteRequest.java +++ b/src/main/java/com/interplug/qcast/biz/estimate/dto/NoteRequest.java @@ -10,4 +10,7 @@ public class NoteRequest { @Schema(description = "검색 - 특이사항 타입 코드") private String schSpnTypeCd; + + @Schema(description = "검색 - 특이사항 코드 목록") + private String[] arrSpnAttrCd; } diff --git a/src/main/java/com/interplug/qcast/biz/file/FileController.java b/src/main/java/com/interplug/qcast/biz/file/FileController.java index b206bffb..79282ad1 100644 --- a/src/main/java/com/interplug/qcast/biz/file/FileController.java +++ b/src/main/java/com/interplug/qcast/biz/file/FileController.java @@ -55,4 +55,12 @@ public class FileController { Integer resultCnt = fileService.setFile(saveFileList, null); return resultCnt; } + + @Operation(description = "파일을 삭제 한다.") + @PostMapping("/fileDelete") + @ResponseStatus(HttpStatus.NO_CONTENT) + public Integer fileDelete(@RequestBody FileRequest fileRequest) throws Exception { + Integer resultCnt = fileService.deleteFile(fileRequest); + return resultCnt; + } } diff --git a/src/main/java/com/interplug/qcast/biz/file/FileService.java b/src/main/java/com/interplug/qcast/biz/file/FileService.java index 8df58d4e..c59eb25b 100644 --- a/src/main/java/com/interplug/qcast/biz/file/FileService.java +++ b/src/main/java/com/interplug/qcast/biz/file/FileService.java @@ -301,4 +301,13 @@ public class FileService { // zip 파일로 변환 zipFileManager.createZipFile(response, strZipFileName, listFile); } + + public Integer deleteFile(FileRequest fileRequest) throws Exception { + Integer iResult = 0; + + // 첨부파일 논리적 삭제 + iResult = fileMapper.deleteFile(fileRequest); // 파일 삭제 + + return iResult; + } } diff --git a/src/main/java/com/interplug/qcast/util/ExcelUtil.java b/src/main/java/com/interplug/qcast/util/ExcelUtil.java new file mode 100644 index 00000000..66d5b424 --- /dev/null +++ b/src/main/java/com/interplug/qcast/util/ExcelUtil.java @@ -0,0 +1,55 @@ +package com.interplug.qcast.util; + +import com.fasterxml.jackson.databind.exc.InvalidFormatException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import java.io.*; +import java.util.List; +import java.util.Map; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import net.sf.jxls.exception.ParsePropertyException; +import org.jxls.common.Context; +import org.jxls.util.JxlsHelper; +import org.springframework.stereotype.Component; + +@Slf4j +@Component +@RequiredArgsConstructor +public class ExcelUtil { + + /** + * jxls을 이용한 엑셀다운로드 + * + * @param request HttpServletRequest + * @param response HttpServletResponse + * @param map 엑셀 출력데이터 + * @param list 엑셀 출력 목록 데이터 + * @param fileName 다운로드 파일명 + * @param templateFilePath 템플릿 파일경로 + */ + public void download( + HttpServletRequest request, + HttpServletResponse response, + Map map, + List> list, + String fileName, + String templateFilePath) + throws ParsePropertyException, InvalidFormatException { + try { + InputStream is = new BufferedInputStream(new FileInputStream(templateFilePath)); + + response.setHeader("Content-Disposition", "attachment; filename=\"" + fileName + ".xlsx\""); + + try (OutputStream os = response.getOutputStream()) { + Context context = new Context(); + context.putVar("data", map); + context.putVar("list", list); + + JxlsHelper.getInstance().processTemplate(is, os, context); + } + } catch (Exception e) { + log.debug(e.getMessage()); + } + } +} diff --git a/src/main/resources/config/application-dev.yml b/src/main/resources/config/application-dev.yml index 16b82106..f5ff0744 100644 --- a/src/main/resources/config/application-dev.yml +++ b/src/main/resources/config/application-dev.yml @@ -45,4 +45,5 @@ qsp: file: root.path: C:\\ ini.root.path: C:\\NewEstimate - ini.base.filename: 料金シミュレーション.ini \ No newline at end of file + ini.base.filename: 料金シミュレーション.ini + excel.template.path: C:\\qcastjp\template \ No newline at end of file diff --git a/src/main/resources/config/application-local.yml b/src/main/resources/config/application-local.yml index f5e20e51..2c770703 100644 --- a/src/main/resources/config/application-local.yml +++ b/src/main/resources/config/application-local.yml @@ -46,4 +46,5 @@ qsp: file: root.path: C:\\ ini.root.path: C:\\NewEstimate - ini.base.filename: 料金シミュレーション.ini \ No newline at end of file + ini.base.filename: 料金シミュレーション.ini + excel.template.path: C:\\qcastjp\\template \ No newline at end of file diff --git a/src/main/resources/config/application-prd.yml b/src/main/resources/config/application-prd.yml index 24b0ca29..a183134b 100644 --- a/src/main/resources/config/application-prd.yml +++ b/src/main/resources/config/application-prd.yml @@ -46,4 +46,5 @@ qsp: file: root.path: C:\\ ini.root.path: \\10.31.0.21\NewEstimate - ini.base.filename: 料金シミュレーション.ini \ No newline at end of file + ini.base.filename: 料金シミュレーション.ini + excel.template.path: C:\\qcastjp\\template \ No newline at end of file diff --git a/src/main/resources/mappers/estimate/estimateMapper.xml b/src/main/resources/mappers/estimate/estimateMapper.xml index 95df4597..9b17598f 100644 --- a/src/main/resources/mappers/estimate/estimateMapper.xml +++ b/src/main/resources/mappers/estimate/estimateMapper.xml @@ -65,7 +65,7 @@ AND P.DEL_FLG = '0' - /* sqlid : com.interplug.qcast.biz.estimate.selectPdfEstimateDetail */ SELECT T.* @@ -75,12 +75,16 @@ , SS2.ADDRESS , SS2.TEL , SS2.FAX + , SS2.BIZ_NO FROM ( SELECT P.OBJECT_NO , P.PLAN_NO , P.ESTIMATE_VALIDITY_TERM + , P.ESTIMATE_TYPE + , P.ESTIMATE_OPTION + , P.PKG_ASP , P.REMARKS , CONVERT(NVARCHAR(10), P.LAST_EDIT_DATETIME, 121) AS ESTIMATE_DATE , O.SALE_STORE_ID @@ -162,6 +166,12 @@ AND OSN.SPN_TYPE_CD = #{schSpnTypeCd} + + AND CL.CODE IN + + #{code} + +