시스템용량/ 그래프 수정
This commit is contained in:
parent
8d2a5d1d23
commit
d5b21f5873
@ -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 {
|
||||
// 발전시뮬레이션 안내사항 조회
|
||||
|
||||
@ -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("<tr>");
|
||||
sb.append("<td>" + StringUtils.defaultString(listItem.getRoofSurface()) + "</td>");
|
||||
sb.append(
|
||||
"<td>"
|
||||
+ StringUtils.defaultString(listItem.getSlopeAngle())
|
||||
+ (listItem.getClassType() == 0 ? "寸" : "º")
|
||||
+ "</td>");
|
||||
sb.append("<td>" + StringUtils.defaultString(listItem.getSlopeAngleTxt()) + "</td>");
|
||||
sb.append("<td>" + StringUtils.defaultString(listItem.getAzimuth()) + "</td>");
|
||||
sb.append("<td>" + StringUtils.defaultString(listItem.getItemNo()) + "</td>");
|
||||
sb.append("<td>" + StringUtils.defaultString(listItem.getAmount()) + "</td>");
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user