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 0228b70f..57d1f494 100644
--- a/src/main/java/com/interplug/qcast/biz/estimate/EstimateService.java
+++ b/src/main/java/com/interplug/qcast/biz/estimate/EstimateService.java
@@ -1395,6 +1395,12 @@ public class EstimateService {
pwrGnrSimResponse.setFrcPwrGnrList(pwrGnrSimResponse.getHatsudenryouPeakcutAllSnow());
}
+ pwrGnrSimResponse.setIntFrcPwrGnrList(
+ Arrays.stream(pwrGnrSimResponse.getFrcPwrGnrList())
+ .map(s -> s.replace(",", "")) // , 제거
+ .mapToInt(Integer::parseInt) // 문자열을 int로 변환
+ .toArray());
+
if (pwrGnrSimResponse != null) {
try {
// 발전시뮬레이션 안내사항 조회
diff --git a/src/main/java/com/interplug/qcast/biz/pwrGnrSimulation/PwrGnrSimService.java b/src/main/java/com/interplug/qcast/biz/pwrGnrSimulation/PwrGnrSimService.java
index b95dc9c8..48029e5e 100644
--- a/src/main/java/com/interplug/qcast/biz/pwrGnrSimulation/PwrGnrSimService.java
+++ b/src/main/java/com/interplug/qcast/biz/pwrGnrSimulation/PwrGnrSimService.java
@@ -8,6 +8,7 @@ import com.interplug.qcast.config.Exception.QcastException;
import com.interplug.qcast.util.InterfaceQsp;
import java.io.*;
import java.nio.charset.StandardCharsets;
+import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
@@ -147,6 +148,8 @@ public class PwrGnrSimService {
.mapToDouble(response -> response.getTotSpecification())
.sum();
+ totSpecification = totSpecification / 1000;
+
// 합산 결과 설정
setDto.setTotSpecification(totSpecification);
@@ -260,7 +263,7 @@ public class PwrGnrSimService {
int j = 0;
for (PwrGnrSimRoofResponse m : roofModuleList) {
if (data.getRoofNo().equals(m.getRoofNo())) {
- dSpecification += m.getSpecification();
+ dSpecification += m.getTotSpecification();
if (j == 0) {
dModuleInput1[i] = Integer.parseInt(m.getAmount());
} else if (j == 1) {
@@ -290,10 +293,15 @@ public class PwrGnrSimService {
e.printStackTrace();
}
+ // DecimalFormat 객체 생성
+ DecimalFormat decimalFormat = new DecimalFormat("#,##0.000");
+ // 포맷 적용
+ String formatSpecification = decimalFormat.format(dSpecification / 1000);
+
pwrGnrSimRes.setObjectNo(planInfo.getObjectNo());
pwrGnrSimRes.setPlanNo(planInfo.getPlanNo());
pwrGnrSimRes.setDrawingEstimateCreateDate(planInfo.getDrawingEstimateCreateDate());
- pwrGnrSimRes.setCapacity(String.valueOf(dSpecification));
+ pwrGnrSimRes.setCapacity(formatSpecification);
pwrGnrSimRes.setPrefName(planInfo.getPrefName());
pwrGnrSimRes.setAreaName(planInfo.getAreaName());
pwrGnrSimRes.setSnowfall(planInfo.getSnowfall());
@@ -1339,13 +1347,13 @@ public class PwrGnrSimService {
elm.text(StringUtils.defaultString(data.getAreaName()));
elm = doc.getElementById("capacity");
- elm.text(StringUtils.defaultString(data.getCapacity()));
+ elm.text(StringUtils.defaultString(data.getCapacity()) + " kW");
elm = doc.getElementById("anlFrcsGnrt");
elm.text(StringUtils.defaultString(String.valueOf(pwrGnrSimList[12])));
elm = doc.getElementById("snowfall");
- elm.text(StringUtils.defaultString(data.getSnowfall()));
+ elm.text(StringUtils.defaultString(data.getSnowfall()) + " cm");
elm = doc.getElementById("standardWindSpeedId");
elm.text(StringUtils.defaultString(data.getStandardWindSpeedId()));
@@ -1454,11 +1462,7 @@ public class PwrGnrSimService {
PwrGnrSimRoofResponse listItem = data.getRoofModuleList().get(i);
sb.append("
");
sb.append("| " + StringUtils.defaultString(listItem.getRoofSurface()) + " | ");
- sb.append(
- ""
- + StringUtils.defaultString(listItem.getSlopeAngle())
- + (listItem.getClassType() == 0 ? "寸" : "º")
- + " | ");
+ sb.append("" + StringUtils.defaultString(listItem.getSlopeAngleTxt()) + " | ");
sb.append("" + StringUtils.defaultString(listItem.getAzimuth()) + " | ");
sb.append("" + StringUtils.defaultString(listItem.getItemNo()) + " | ");
sb.append("" + StringUtils.defaultString(listItem.getAmount()) + " | ");
diff --git a/src/main/java/com/interplug/qcast/biz/pwrGnrSimulation/dto/PwrGnrSimResponse.java b/src/main/java/com/interplug/qcast/biz/pwrGnrSimulation/dto/PwrGnrSimResponse.java
index 4ede5a74..32ef4edd 100644
--- a/src/main/java/com/interplug/qcast/biz/pwrGnrSimulation/dto/PwrGnrSimResponse.java
+++ b/src/main/java/com/interplug/qcast/biz/pwrGnrSimulation/dto/PwrGnrSimResponse.java
@@ -9,6 +9,9 @@ public class PwrGnrSimResponse {
@Schema(description = "적재율")
private double sekisairitsu;
+ @Schema(description = "엑셀/PDF 다운로드시 LIST(숫자만)")
+ private int[] intFrcPwrGnrList;
+
@Schema(description = "엑셀/PDF 다운로드시 LIST")
private String[] frcPwrGnrList;
diff --git a/src/main/java/com/interplug/qcast/biz/pwrGnrSimulation/dto/PwrGnrSimRoofResponse.java b/src/main/java/com/interplug/qcast/biz/pwrGnrSimulation/dto/PwrGnrSimRoofResponse.java
index 01cf8e3b..c7e2af8f 100644
--- a/src/main/java/com/interplug/qcast/biz/pwrGnrSimulation/dto/PwrGnrSimRoofResponse.java
+++ b/src/main/java/com/interplug/qcast/biz/pwrGnrSimulation/dto/PwrGnrSimRoofResponse.java
@@ -18,6 +18,9 @@ public class PwrGnrSimRoofResponse {
@Schema(description = "경사각")
private String slopeAngle;
+ @Schema(description = "경사각(엑셀용)")
+ private String slopeAngleTxt;
+
@Schema(description = "방위각")
private String azimuth;
@@ -33,6 +36,9 @@ public class PwrGnrSimRoofResponse {
@Schema(description = "총용량")
private double totSpecification;
+ @Schema(description = "총용량")
+ private String totSpecificationTxt;
+
@Schema(description = "용량")
private double specification;
diff --git a/src/main/resources/mappers/pwrGnrSimulation/pwrGnrSimMapper.xml b/src/main/resources/mappers/pwrGnrSimulation/pwrGnrSimMapper.xml
index 50a3b438..67cbc7a9 100644
--- a/src/main/resources/mappers/pwrGnrSimulation/pwrGnrSimMapper.xml
+++ b/src/main/resources/mappers/pwrGnrSimulation/pwrGnrSimMapper.xml
@@ -9,7 +9,7 @@
SELECT
A.OBJECT_NO /* 물건번호 */
, A.PLAN_NO /* 물건번호 */
- , A.DRAWING_ESTIMATE_CREATE_DATE/* 작성일 */
+ , CONVERT(VARCHAR(10), A.DRAWING_ESTIMATE_CREATE_DATE, 121) AS DRAWING_ESTIMATE_CREATE_DATE/* 작성일 */
, A.CAPACITY /* 시스템 용량 */
, A.SNOWFALL/* 적설조건 */
, ISNULL(C1.CODE_NM, '') AS STANDARD_WIND_SPEED_ID/* 풍속조건명 */
@@ -73,7 +73,7 @@
, B.ITEM_ID
, B.AMOUNT
, B.ITEM_NO
- , ((B.AMOUNT * TRY_CAST(B.SPECIFICATION AS FLOAT)) / 1000) AS TOT_SPECIFICATION /* 용량 */
+ , ISNULL((B.AMOUNT * TRY_CAST(B.SPECIFICATION AS FLOAT)), 0) AS TOT_SPECIFICATION /* 용량 */
, C.ITEM_GROUP
/* 추후 지붕재테이블로 봐야함. */
, C.TEMP_LOSS
@@ -85,6 +85,7 @@
, A.CLASS_TYPE
, A.AZIMUTH
, (CASE WHEN A.CLASS_TYPE = 0 THEN A.SLOPE ELSE A.ANGLE END) AS SLOPE_ANGLE
+ , (CASE WHEN A.CLASS_TYPE = 0 THEN CAST(CAST(A.SLOPE AS INT)AS VARCHAR) + '寸' ELSE CAST(CAST(A.ANGLE AS INT)AS VARCHAR) + N'º' END) AS SLOPE_ANGLE_TXT
FROM T_PART_ROOF_ESTIMATE A WITH (NOLOCK)
INNER JOIN T_PART_ROOF_ITEM_ESTIMATE B WITH (NOLOCK)
ON A.OBJECT_NO = B.OBJECT_NO
diff --git a/src/main/resources/template/excel/excel_download_quotation_detail_template.xlsx b/src/main/resources/template/excel/excel_download_quotation_detail_template.xlsx
index 0ae1185b..3012a7e9 100644
Binary files a/src/main/resources/template/excel/excel_download_quotation_detail_template.xlsx and b/src/main/resources/template/excel/excel_download_quotation_detail_template.xlsx differ