Compare commits
5 Commits
07df8c10f1
...
c888b564be
| Author | SHA1 | Date | |
|---|---|---|---|
| c888b564be | |||
| 73f0005f86 | |||
| a658221259 | |||
| 27ff8fac55 | |||
| 260f9ee2c1 |
@ -1447,7 +1447,12 @@ public class EstimateService {
|
|||||||
roofInfoResponse.setRoofVolList(roofVolList);
|
roofInfoResponse.setRoofVolList(roofVolList);
|
||||||
|
|
||||||
// 인증용량 구하기 (지붕면마다 모듈과 각각의 PCS의 총 용량을 서로 비교해 낮은쪽 용량으로 합산)
|
// 인증용량 구하기 (지붕면마다 모듈과 각각의 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");
|
CanvasPopupStatus cps = canvasPopupStatusService.selectCanvasPopupStatus(estimateResponse.getObjectNo(), Integer.parseInt(estimateResponse.getPlanNo()), "1");
|
||||||
@ -3194,10 +3199,6 @@ public class EstimateService {
|
|||||||
|
|
||||||
SimulationEstimateListResponse response = new SimulationEstimateListResponse();
|
SimulationEstimateListResponse response = new SimulationEstimateListResponse();
|
||||||
|
|
||||||
if (!"T01".equals(objectRequest.getSaleStoreId())) {
|
|
||||||
objectRequest.setSchSelSaleStoreId("");
|
|
||||||
}
|
|
||||||
|
|
||||||
// 견적서 목록 조회
|
// 견적서 목록 조회
|
||||||
List<ObjectResponse> objectList = estimateMapper.selectSimulationEstimateList(objectRequest);
|
List<ObjectResponse> objectList = estimateMapper.selectSimulationEstimateList(objectRequest);
|
||||||
|
|
||||||
|
|||||||
@ -467,9 +467,8 @@
|
|||||||
GROUP BY CIRCUIT_NO, CIRCUIT_ITEM_ID, CIRCUIT_CFG, CIRCUIT_SUM, PNOW_W
|
GROUP BY CIRCUIT_NO, CIRCUIT_ITEM_ID, CIRCUIT_CFG, CIRCUIT_SUM, PNOW_W
|
||||||
)
|
)
|
||||||
|
|
||||||
-- 2026-05-22: FLOAT ROUND 결과의 IEEE754 잔여(예: 5.5600000000000005) 차단 위해 DECIMAL 캐스팅
|
-- 2026-06-05: SQL 은 W 합만 DECIMAL 로 정확히 반환. kW 변환·3자리 절사(FLOOR)는 모듈용량(totVolKw)과 동일하게 Java BigDecimal 에서 수행 → FLOAT 나눗셈 잔여(5.6899999999999995 / 5.339) 원천 차단
|
||||||
-- 2026-06-02: モジュール容量(totVolKw, setScale(3,FLOOR))과 동일 표시 위해 3자리 절사 + DECIMAL(18,3) 마감 (ROUND 3번째 인자=1 → 절사)
|
SELECT CAST(SUM(MIN_VALUE) AS DECIMAL(18,3)) AS CERT_VOL_W
|
||||||
SELECT CAST(ROUND((SUM(MIN_VALUE) / 1000), 3, 1) AS DECIMAL(18,3)) AS CERT_VOL_KW
|
|
||||||
FROM CIRCUIT_AGG
|
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">
|
<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 */
|
/* 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 축출 - 재귀함수 */
|
/* 계층형 구조에 맞는 SALE_STORE_ID 축출 - 재귀함수 */
|
||||||
WITH SALES_STORE_CTE AS (
|
WITH SALES_STORE_CTE AS (
|
||||||
SELECT
|
SELECT
|
||||||
@ -1560,14 +1559,7 @@
|
|||||||
FROM M_SALES_STORE WITH(NOLOCK)
|
FROM M_SALES_STORE WITH(NOLOCK)
|
||||||
WHERE APPROVE_FLG = '2'
|
WHERE APPROVE_FLG = '2'
|
||||||
AND DEL_FLG = '0'
|
AND DEL_FLG = '0'
|
||||||
<choose>
|
AND SALE_STORE_ID = #{saleStoreId}
|
||||||
<when test='schSelSaleStoreId != null and schSelSaleStoreId != ""'>
|
|
||||||
AND SALE_STORE_ID = #{schSelSaleStoreId}
|
|
||||||
</when>
|
|
||||||
<otherwise>
|
|
||||||
AND SALE_STORE_ID = #{saleStoreId}
|
|
||||||
</otherwise>
|
|
||||||
</choose>
|
|
||||||
|
|
||||||
UNION ALL
|
UNION ALL
|
||||||
SELECT
|
SELECT
|
||||||
@ -1603,7 +1595,7 @@
|
|||||||
ON O.SALE_STORE_ID = S.SALE_STORE_ID
|
ON O.SALE_STORE_ID = S.SALE_STORE_ID
|
||||||
INNER JOIN T_PLAN P WITH (NOLOCK)
|
INNER JOIN T_PLAN P WITH (NOLOCK)
|
||||||
ON O.OBJECT_NO = P.OBJECT_NO
|
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
|
INNER JOIN SALES_STORE_CTE T
|
||||||
ON S.SALE_STORE_ID = T.SALE_STORE_ID
|
ON S.SALE_STORE_ID = T.SALE_STORE_ID
|
||||||
</if>
|
</if>
|
||||||
@ -1615,9 +1607,9 @@
|
|||||||
<if test='schObjectNo != null and schObjectNo != ""'>
|
<if test='schObjectNo != null and schObjectNo != ""'>
|
||||||
AND O.OBJECT_NO LIKE '%' + #{schObjectNo} + '%'
|
AND O.OBJECT_NO LIKE '%' + #{schObjectNo} + '%'
|
||||||
</if>
|
</if>
|
||||||
<if test='schOtherSelSaleStoreId != null and schOtherSelSaleStoreId != ""'>
|
<if test='schSelSaleStoreId != null and schSelSaleStoreId != ""'>
|
||||||
/* 2차점까지 고름 */
|
/* 판매점 아이디 선택 */
|
||||||
AND O.SALE_STORE_ID = #{schOtherSelSaleStoreId}
|
AND O.SALE_STORE_ID = #{schSelSaleStoreId}
|
||||||
</if>
|
</if>
|
||||||
<if test='schObjectName != null and schObjectName != ""'>
|
<if test='schObjectName != null and schObjectName != ""'>
|
||||||
AND O.OBJECT_NAME LIKE '%' + #{schObjectName} + '%'
|
AND O.OBJECT_NAME LIKE '%' + #{schObjectName} + '%'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user