청구검증 데이터 유효성 체크 추가

This commit is contained in:
Jeon
2023-07-24 09:18:44 +09:00
parent 881decfe37
commit 6544cdd4cf
5 changed files with 31 additions and 6 deletions

View File

@@ -19,6 +19,8 @@ public interface CalculateMapper {
List<CalcList> selectCalculateExcelList(CalcListExcelReqDto calcListExcelReqDto);
int verificationPartitionCnt(VerificationReqDto verificationReqDto);
List<VerificationDto> getVerificationList(VerificationReqDto verificationReqDto);
}

View File

@@ -98,6 +98,10 @@ public class CalculateService {
VerificationRes verificationRes = new VerificationRes();
if(calcMapper.verificationPartitionCnt(verificationReqDto) < 2) {
return new VerificationResDto(ApiResponseCode.CM_NOT_FOUND);
}
List<VerificationDto> verificationDtoList = calcMapper.getVerificationList(verificationReqDto);
verificationRes.setList(verificationDtoList);

View File

@@ -20,13 +20,13 @@ public class VerificationResDto extends ResponseMessage implements Serializable
}
public VerificationResDto(ApiResponseCode returnStr) {
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
this.retCode = returnStr.getResultCode();
this.retMsg = returnStr.getResultMsg();
}
public VerificationResDto(ApiResponseCode returnStr, VerificationRes data) {
this.retCode = ApiResponseCode.SUCCESS.getResultCode();
this.retMsg = ApiResponseCode.SUCCESS.getResultMsg();
this.retCode = returnStr.getResultCode();
this.retMsg = returnStr.getResultMsg();
this.data = data;
}
}

View File

@@ -87,7 +87,6 @@
LIMIT #{page}, #{pagePerRows}
</select>
<select id="selectCalculateExcelList" parameterType="kr.co.uplus.ez.api.calculate.dto.CalcListReqDto" resultType="kr.co.uplus.ez.api.calculate.dto.CalcList">
/* calculate-mapper.xml(selectCalculateExcelList) */
SELECT eud.CUST_NM
@@ -139,6 +138,15 @@
ORDER BY eud.USE_YM DESC, eud.CUST_NM DESC
</select>
<select id="verificationPartitionCnt" parameterType="kr.co.uplus.ez.api.calculate.dto.CalcListReqDto" resultType="int">
SELECT
COUNT(*) AS PARTITION_CNT
FROM INFORMATION_SCHEMA.PARTITIONS
WHERE TABLE_NAME IN ('EZ_SNDDCT_REQ','EZ_MSG_LOG')
AND PARTITION_NAME IN (CONCAT('EZ_SNDDCT_REQ_',#{lmtYm}),CONCAT('PT_EZ_MSG_LOG_',#{lmtYm}));
</select>
<select id="getVerificationList" parameterType="kr.co.uplus.ez.api.calculate.dto.VerificationReqDto" resultType="kr.co.uplus.ez.api.calculate.dto.VerificationDto">
/* calculate-mapper.xml(getVerificationList) 청구 검증 목록 조회 */
SELECT