Compare commits

..

5 Commits

2 changed files with 14 additions and 21 deletions

View File

@ -1447,7 +1447,12 @@ public class EstimateService {
roofInfoResponse.setRoofVolList(roofVolList);
// 인증용량 구하기 (지붕면마다 모듈과 각각의 PCS의 용량을 서로 비교해 낮은쪽 용량으로 합산)
roofInfoResponse.setCertVolKw(estimateMapper.selectEstimateRoofCertVolKw(estimateRequest));
// 2026-06-05: SQL W 합만 반환. kW 변환·3자리 절사(FLOOR) 모듈용량(totVolKw) 동일하게 처리 FLOAT 나눗셈 잔여 방지
String certVolW = estimateMapper.selectEstimateRoofCertVolKw(estimateRequest);
roofInfoResponse.setCertVolKw(String.valueOf(
new BigDecimal(StringUtils.isEmpty(certVolW) ? "0" : certVolW)
.multiply(new BigDecimal("0.001"))
.setScale(3, RoundingMode.FLOOR)));
//방위값
CanvasPopupStatus cps = canvasPopupStatusService.selectCanvasPopupStatus(estimateResponse.getObjectNo(), Integer.parseInt(estimateResponse.getPlanNo()), "1");
@ -3194,10 +3199,6 @@ public class EstimateService {
SimulationEstimateListResponse response = new SimulationEstimateListResponse();
if (!"T01".equals(objectRequest.getSaleStoreId())) {
objectRequest.setSchSelSaleStoreId("");
}
// 견적서 목록 조회
List<ObjectResponse> objectList = estimateMapper.selectSimulationEstimateList(objectRequest);

View File

@ -467,9 +467,8 @@
GROUP BY CIRCUIT_NO, CIRCUIT_ITEM_ID, CIRCUIT_CFG, CIRCUIT_SUM, PNOW_W
)
-- 2026-05-22: FLOAT ROUND 결과의 IEEE754 잔여(예: 5.5600000000000005) 차단 위해 DECIMAL 캐스팅
-- 2026-06-02: モジュール容量(totVolKw, setScale(3,FLOOR))과 동일 표시 위해 3자리 절사 + DECIMAL(18,3) 마감 (ROUND 3번째 인자=1 → 절사)
SELECT CAST(ROUND((SUM(MIN_VALUE) / 1000), 3, 1) AS DECIMAL(18,3)) AS CERT_VOL_KW
-- 2026-06-05: SQL 은 W 합만 DECIMAL 로 정확히 반환. kW 변환·3자리 절사(FLOOR)는 모듈용량(totVolKw)과 동일하게 Java BigDecimal 에서 수행 → FLOAT 나눗셈 잔여(5.6899999999999995 / 5.339) 원천 차단
SELECT CAST(SUM(MIN_VALUE) AS DECIMAL(18,3)) AS CERT_VOL_W
FROM CIRCUIT_AGG
]]>
@ -1550,7 +1549,7 @@
<select id="selectSimulationEstimateList" parameterType="com.interplug.qcast.biz.object.dto.ObjectRequest" resultType="com.interplug.qcast.biz.object.dto.ObjectResponse">
/* sqlid : com.interplug.qcast.biz.estimate.selectSimulationEstimateList */
<if test='(saleStoreId != null and saleStoreId != "T01") or (schSelSaleStoreId != null and schSelSaleStoreId != "")'>
<if test='saleStoreId != null and saleStoreId != "T01"'>
/* 계층형 구조에 맞는 SALE_STORE_ID 축출 - 재귀함수 */
WITH SALES_STORE_CTE AS (
SELECT
@ -1560,14 +1559,7 @@
FROM M_SALES_STORE WITH(NOLOCK)
WHERE APPROVE_FLG = '2'
AND DEL_FLG = '0'
<choose>
<when test='schSelSaleStoreId != null and schSelSaleStoreId != ""'>
AND SALE_STORE_ID = #{schSelSaleStoreId}
</when>
<otherwise>
AND SALE_STORE_ID = #{saleStoreId}
</otherwise>
</choose>
AND SALE_STORE_ID = #{saleStoreId}
UNION ALL
SELECT
@ -1603,7 +1595,7 @@
ON O.SALE_STORE_ID = S.SALE_STORE_ID
INNER JOIN T_PLAN P WITH (NOLOCK)
ON O.OBJECT_NO = P.OBJECT_NO
<if test='(saleStoreId != null and saleStoreId != "T01") or (schSelSaleStoreId != null and schSelSaleStoreId != "")'>
<if test='saleStoreId != null and saleStoreId != "T01"'>
INNER JOIN SALES_STORE_CTE T
ON S.SALE_STORE_ID = T.SALE_STORE_ID
</if>
@ -1615,9 +1607,9 @@
<if test='schObjectNo != null and schObjectNo != ""'>
AND O.OBJECT_NO LIKE '%' + #{schObjectNo} + '%'
</if>
<if test='schOtherSelSaleStoreId != null and schOtherSelSaleStoreId != ""'>
/* 2차점까지 고름 */
AND O.SALE_STORE_ID = #{schOtherSelSaleStoreId}
<if test='schSelSaleStoreId != null and schSelSaleStoreId != ""'>
/* 판매점 아이디 선택 */
AND O.SALE_STORE_ID = #{schSelSaleStoreId}
</if>
<if test='schObjectName != null and schObjectName != ""'>
AND O.OBJECT_NAME LIKE '%' + #{schObjectName} + '%'