From 6544cdd4cfab819126122d6cdae654634e701c97 Mon Sep 17 00:00:00 2001 From: Jeon Date: Mon, 24 Jul 2023 09:18:44 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B2=AD=EA=B5=AC=EA=B2=80=EC=A6=9D=20?= =?UTF-8?q?=EB=8D=B0=EC=9D=B4=ED=84=B0=20=EC=9C=A0=ED=9A=A8=EC=84=B1=20?= =?UTF-8?q?=EC=B2=B4=ED=81=AC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/calculate/views/Verification.vue | 13 ++++++++++++- .../co/uplus/ez/api/calculate/CalculateMapper.java | 2 ++ .../co/uplus/ez/api/calculate/CalculateService.java | 4 ++++ .../ez/api/calculate/dto/VerificationResDto.java | 8 ++++---- .../mapper/mysql/calculate/calculate-mapper.xml | 10 +++++++++- 5 files changed, 31 insertions(+), 6 deletions(-) diff --git a/frontend/src/modules/calculate/views/Verification.vue b/frontend/src/modules/calculate/views/Verification.vue index 1e8c6e1..712b490 100644 --- a/frontend/src/modules/calculate/views/Verification.vue +++ b/frontend/src/modules/calculate/views/Verification.vue @@ -214,15 +214,26 @@ export default { if (result != null && result.retCode == '0000') { this.list = result.data.list; this.totalCnt = result.data.list.length; + }else{ + this.initData(); + this.row.title = '청구 목록 조회 실패'; + this.row.msg1 = result.retMsg; + this.$refs.commmonModal.alertModalOpen(this.row); + return false; } } catch(err){ + this.initData(); this.row.title = '청구 목록 조회 실패'; this.row.msg1 = err; - this.$parent.$refs.commmonModal.alertModalOpen(this.row); + this.$refs.commmonModal.alertModalOpen(this.row); return false; } }, + initData: function(){ + this.list = []; + this.totalCnt = 0; + }, customFormatter: function (date) { if (this.sDateDiv == 'month') { return moment(date).format('YYYY-MM'); diff --git a/src/main/java/kr/co/uplus/ez/api/calculate/CalculateMapper.java b/src/main/java/kr/co/uplus/ez/api/calculate/CalculateMapper.java index 8b7037b..8691178 100644 --- a/src/main/java/kr/co/uplus/ez/api/calculate/CalculateMapper.java +++ b/src/main/java/kr/co/uplus/ez/api/calculate/CalculateMapper.java @@ -19,6 +19,8 @@ public interface CalculateMapper { List selectCalculateExcelList(CalcListExcelReqDto calcListExcelReqDto); + int verificationPartitionCnt(VerificationReqDto verificationReqDto); + List getVerificationList(VerificationReqDto verificationReqDto); } diff --git a/src/main/java/kr/co/uplus/ez/api/calculate/CalculateService.java b/src/main/java/kr/co/uplus/ez/api/calculate/CalculateService.java index 0f2b911..0ae4f91 100644 --- a/src/main/java/kr/co/uplus/ez/api/calculate/CalculateService.java +++ b/src/main/java/kr/co/uplus/ez/api/calculate/CalculateService.java @@ -98,6 +98,10 @@ public class CalculateService { VerificationRes verificationRes = new VerificationRes(); + if(calcMapper.verificationPartitionCnt(verificationReqDto) < 2) { + return new VerificationResDto(ApiResponseCode.CM_NOT_FOUND); + } + List verificationDtoList = calcMapper.getVerificationList(verificationReqDto); verificationRes.setList(verificationDtoList); diff --git a/src/main/java/kr/co/uplus/ez/api/calculate/dto/VerificationResDto.java b/src/main/java/kr/co/uplus/ez/api/calculate/dto/VerificationResDto.java index c593cef..ded7932 100644 --- a/src/main/java/kr/co/uplus/ez/api/calculate/dto/VerificationResDto.java +++ b/src/main/java/kr/co/uplus/ez/api/calculate/dto/VerificationResDto.java @@ -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; } } diff --git a/src/main/resources/mapper/mysql/calculate/calculate-mapper.xml b/src/main/resources/mapper/mysql/calculate/calculate-mapper.xml index 5ca190d..7c1ecec 100644 --- a/src/main/resources/mapper/mysql/calculate/calculate-mapper.xml +++ b/src/main/resources/mapper/mysql/calculate/calculate-mapper.xml @@ -87,7 +87,6 @@ LIMIT #{page}, #{pagePerRows} - + +