발전시뮬레이션 데이터가 없는 경우 수정

This commit is contained in:
DESKTOP-6ARNG1Q\dlsgk 2025-02-07 14:09:38 +09:00
parent 2627a5d928
commit ca8b5c90c1

View File

@ -107,9 +107,21 @@ public class PwrGnrSimService {
PwrGnrSimPlanResponse planInfo = pwrGnrSimMapper.selectPlanInfo(pwrGnrSimRequest); PwrGnrSimPlanResponse planInfo = pwrGnrSimMapper.selectPlanInfo(pwrGnrSimRequest);
// 지역이 없으면 계산 불가능 // 지역이 없으면 계산 불가능
if (planInfo == null || planInfo.getAreaId() == 0) { if (planInfo == null) {
log.error("지역값이 없음."); log.error("물건정보 없음.");
return exceptionRes; return exceptionRes;
} else {
exceptionRes.setObjectNo(planInfo.getObjectNo());
exceptionRes.setPlanNo(planInfo.getPlanNo());
exceptionRes.setDrawingEstimateCreateDate(planInfo.getDrawingEstimateCreateDate());
exceptionRes.setPrefName(planInfo.getPrefName());
exceptionRes.setAreaName(planInfo.getAreaName());
exceptionRes.setSnowfall(planInfo.getSnowfall());
exceptionRes.setStandardWindSpeedId(planInfo.getStandardWindSpeedId());
if (planInfo.getAreaId() == 0) {
log.error("지역값이 없음.");
return exceptionRes;
}
} }
// 2. 견적서 지붕재 목록 조회 // 2. 견적서 지붕재 목록 조회
@ -131,6 +143,8 @@ public class PwrGnrSimService {
if (roofGroupModuleList.isEmpty()) { if (roofGroupModuleList.isEmpty()) {
log.error("모듈 아이템이 없음."); log.error("모듈 아이템이 없음.");
return exceptionRes; return exceptionRes;
} else {
exceptionRes.setRoofModuleList(roofGroupModuleList);
} }
// 4. 계산을 위해 order by 변경 (총용량 DESC) -계산용 // 4. 계산을 위해 order by 변경 (총용량 DESC) -계산용
@ -149,6 +163,8 @@ public class PwrGnrSimService {
if (pcsGroupList.isEmpty()) { if (pcsGroupList.isEmpty()) {
log.error("PCS 아이템이 없음."); log.error("PCS 아이템이 없음.");
return exceptionRes; return exceptionRes;
} else {
exceptionRes.setPcsList(pcsGroupList);
} }
// 견적서 정보 기준으로 발전시뮬레이션 계산을 진행한다. // 견적서 정보 기준으로 발전시뮬레이션 계산을 진행한다.