diff --git a/src/main/java/cokr/xit/ens/modules/nice/mapper/INiceCiMapper.java b/src/main/java/cokr/xit/ens/modules/nice/mapper/INiceCiMapper.java index 0217d2d..0d905fa 100644 --- a/src/main/java/cokr/xit/ens/modules/nice/mapper/INiceCiMapper.java +++ b/src/main/java/cokr/xit/ens/modules/nice/mapper/INiceCiMapper.java @@ -23,30 +23,139 @@ import cokr.xit.ens.modules.nice.model.*; */ @Mapper public interface INiceCiMapper { + //---------------------------------------------------------------------- + // 공통 + //---------------------------------------------------------------------- + /** + * tb_input_xit 목록 조회 + * + * @param niceCiParam NiceCiDTO.NiceCiParam + * @return List InputXit 객체 목록. + */ List selectInputXits(final NiceCiDTO.NiceCiParam niceCiParam); + + /** + * tb_input_data_xit 목록 조회 + * + * @param niceCiParam NiceCiDTO.NiceCiParam + * @return List InputDataXit 객체 목록. + */ List selectInputDataXits(final NiceCiDTO.NiceCiParam niceCiParam); + //---------------------------------------------------------------------- + // 공통 + //---------------------------------------------------------------------- + + //---------------------------------------------------------------------- + // accept + //---------------------------------------------------------------------- + + /** + * 청구서(결제) 데이타 생성 + * + * @param billDTO NiceCiDTO.BillDTO + */ + void insertBill(final NiceCiDTO.BillDTO billDTO); + /** + * 청구서(결제) 데이타 변경 + * + * @param billDTO NiceCiDTO.BillDTO + */ + void updateBill(final NiceCiDTO.BillDTO billDTO); - // accept ////////////////////////////////////////////////////////// - int insertBill(final NiceCiDTO.BillDTO billDTO); - int updateBill(final NiceCiDTO.BillDTO billDTO); + /** + * 카카오 청구서(결제) 데이타 저장 - 생성 및 변경 + * + * @param billKkoDTO NiceCiDTO.BillKkoDTO + */ + void mergeBillKko(final NiceCiDTO.BillKkoDTO billKkoDTO); - int mergeBillKko(final NiceCiDTO.BillKkoDTO billKkoDTO); - int updatePayUrlOfDataInput(final NiceCiDTO.InputDataXit inputDataXit); - int updatePrcsCdAndErrorOfInputXit(final NiceCiDTO.InputXit inputXit); + /** + * NICE CI API 호출 결과의 결재URL 반영 - tb_input_data_xit + * @param inputDataXit NiceCiDTO.InputDataXit + */ + void updatePayUrlOfDataInput(final NiceCiDTO.InputDataXit inputDataXit); + + /** + * 전자고지 상태 및 에러 메세지 반영 - tb_input_xit + * @param inputXit + */ + void updatePrcsCdAndErrorOfInputXit(final NiceCiDTO.InputXit inputXit); + + /** + * 조직 관리 테이블에서 카카오 API 인증 관련 정보 조회 + * @param orgCd 조직코드 + * @return Optional + */ Optional selectKkoBpApiUrlFromEnsOrgMng(final String orgCd); + //---------------------------------------------------------------------- + // accept + //---------------------------------------------------------------------- + //---------------------------------------------------------------------- + // send + //---------------------------------------------------------------------- - // send /////////////////////////////////////////////////////// + /** + * GET NICE CI request unique PK - sequence + * @return Optional leftPad "0", 10자리 String + */ Optional selectNiceCiRequestId(); + + /** + * 템플릿 정보 조회 + * @param tmpltId 템플릿 ID + * @return Optional + */ Optional selectTmpltMsg(final String tmpltId); - int insertNiceSmsSndngRequest(final NiceCiApiSendDTO.Request requestDTO); - int insertNiceSmsSndngResponse(final NiceCiApiSendDTO.Response responseDTO); + /** + * SMS 전송 요청 전문 저장 + * @param requestDTO NiceCiApiSendDTO.Request + */ + void insertNiceSmsSndngRequest(final NiceCiApiSendDTO.Request requestDTO); - // status ///////////////////////////////////////////////////////////////////////////// + /** + * SMS 전송 결과 저장 + * @param responseDTO NiceCiApiSendDTO.Response + */ + void insertNiceSmsSndngResponse(final NiceCiApiSendDTO.Response responseDTO); + //---------------------------------------------------------------------- + // send + //---------------------------------------------------------------------- + + //---------------------------------------------------------------------- + // status + //---------------------------------------------------------------------- + + /** + *
+     * GET NICE CI 상태 조회를 위한 전문의 조회 일시(from ~ to)
+     * -> tb_input_xit 의 run_dt MIN(run_dt) ~ MAX(run_dt) + 1
+     * @param niceCiParam NiceCiDTO.NiceCiParam
+     * @return Optional
+     * 
+ */ Optional selectFromAndToOfStatusParam(final NiceCiDTO.NiceCiParam niceCiParam); + + /** + * GET NICE CI inquire unique PK - sequence + * @return Optional leftPad "0", 10자리 String + */ Optional selectNiceCiInqireId(); - int insertNiceSmsSndngInquireRequest(final NiceCiApiStatusDTO.Request requestDTO); - int insertNiceSmsSndngInquireResponse(final NiceCiApiStatusDTO.Response responseDTO); + + /** + * SMS 전송 상태 조회 요청 전문 저장 + * @param requestDTO NiceCiApiStatusDTO.Request + */ + void insertNiceSmsSndngInquireRequest(final NiceCiApiStatusDTO.Request requestDTO); + + /** + * SMS 전송 상태 조회 결과 저장 + * @param responseDTO NiceCiApiStatusDTO.Response + */ + void insertNiceSmsSndngInquireResponse(final NiceCiApiStatusDTO.Response responseDTO); + //---------------------------------------------------------------------- + // status + //---------------------------------------------------------------------- } diff --git a/src/main/java/cokr/xit/ens/modules/nice/mapper/INiceCiNewTransactionMapper.java b/src/main/java/cokr/xit/ens/modules/nice/mapper/INiceCiNewTransactionMapper.java index 4844539..6e3818f 100644 --- a/src/main/java/cokr/xit/ens/modules/nice/mapper/INiceCiNewTransactionMapper.java +++ b/src/main/java/cokr/xit/ens/modules/nice/mapper/INiceCiNewTransactionMapper.java @@ -22,12 +22,51 @@ import cokr.xit.ens.modules.nice.model.*; */ @Mapper public interface INiceCiNewTransactionMapper { + //---------------------------------------------------------------------- // accept - int insertBillHistory(final NiceCiDTO.BillHistDTO billHistDTO); - int updateBillHistory(final NiceCiDTO.BillHistDTO billHistDTO); + //---------------------------------------------------------------------- + /** + * 청구서 이력 생성 + * @param billHistDTO NiceCiDTO.BillHistDTO + */ + void insertBillHistory(final NiceCiDTO.BillHistDTO billHistDTO); + + /** + * 청구서 이력 변경 + * @param billHistDTO NiceCiDTO.BillHistDTO + */ + void updateBillHistory(final NiceCiDTO.BillHistDTO billHistDTO); + //---------------------------------------------------------------------- + // accept + //---------------------------------------------------------------------- + + //---------------------------------------------------------------------- // status - int insertNiceSmsSndngInquireResponseRepeats(final List resultList); + //---------------------------------------------------------------------- + + /** + * NICE CI SMS 전송 상태 결과 반복부 생성 + * @param resultList List + */ + void insertNiceSmsSndngInquireResponseRepeats(final List resultList); + + /** + *
+     * 전송결과를 생성하기 위한 DATA ID 조회
+     * NICE CI SMS 전송 상태 결과의 메세지와 NICE CI SMS 전송 요청 전문의 주민번호로 DATA ID GET
+     * @param result NiceCiApiResult
+     * @return Optional
+     * 
+ */ Optional selectDataIdFromSendResult(final NiceCiApiResult result); - int insertSendResults(final List sendResults); + + /** + * SMS 전송 결과 생성 + * @param sendResults NiceCiDTO.SendResult + */ + void insertSendResults(final List sendResults); + //---------------------------------------------------------------------- + // status + //---------------------------------------------------------------------- } diff --git a/src/main/java/cokr/xit/ens/modules/nice/model/NiceCiApiCommon.java b/src/main/java/cokr/xit/ens/modules/nice/model/NiceCiApiCommon.java index 118a0eb..52a4d78 100644 --- a/src/main/java/cokr/xit/ens/modules/nice/model/NiceCiApiCommon.java +++ b/src/main/java/cokr/xit/ens/modules/nice/model/NiceCiApiCommon.java @@ -11,7 +11,7 @@ import lombok.extern.slf4j.*; /** *
- * description :
+ * description : NICE CI API 전문 공통 DTO
  * packageName : cokr.xit.ens.modules.nice.model
  * fileName    : NiceCiCommon
  * author      : limju
@@ -199,6 +199,11 @@ public class NiceCiApiCommon {
     @Size(min = 1, max = 1, message = "조회동의사유는 1자리 입니다")
     private String inqireAgreResn = "4";
 
+    /**
+     * NICE CI API 공통 전문 생성 - 한글 2, 그외 1 자리로 생성
+     * @param isSend send 공통 전문 여부
+     * @return String NICE CI 공통 전문
+     */
     public String ofString(boolean isSend) {
         StringBuilder sb = new StringBuilder();
         sb.append(spcltyGroupcode);
@@ -217,6 +222,11 @@ public class NiceCiApiCommon {
         return sb.toString();
     }
 
+    /**
+     * NICE CI API 공통 전문 파싱 - 한글 2, 그외 1 자리로 생성
+     * @param tgtString 전문
+     * @return NiceCiApiCommon NICE CI 공통 전문 DTO
+     */
     public static NiceCiApiCommon parse(String tgtString) {
         final int[] parseLength = {
             9, // 전문그룹코드
diff --git a/src/main/java/cokr/xit/ens/modules/nice/model/NiceCiApiResult.java b/src/main/java/cokr/xit/ens/modules/nice/model/NiceCiApiResult.java
index 39c6b4d..55219e5 100644
--- a/src/main/java/cokr/xit/ens/modules/nice/model/NiceCiApiResult.java
+++ b/src/main/java/cokr/xit/ens/modules/nice/model/NiceCiApiResult.java
@@ -8,7 +8,7 @@ import lombok.*;
 
 /**
  * 
- * description :
+ * description : NICE CI API 호출 결과 DTO
  * packageName : cokr.xit.ens.modules.nice.model
  * fileName    : NiceCiApiResult
  * author      : limju
@@ -241,6 +241,11 @@ public class NiceCiApiResult {
         this.rspnsReptitBlnk = StringUtils.trim(rspnsReptitBlnk);
     }
 
+    /**
+     * NICE CI API 호출 결과 전문 파싱 - 한글 2, 그외 1 자리로 생성
+     * @param tgtString 전문
+     * @return NiceCiApiResult NICE CI 호출결과 전문 DTO
+     */
     public static NiceCiApiResult parse(String tgtString) {
         // 110 자리
         final int[] parseLength = {
diff --git a/src/main/java/cokr/xit/ens/modules/nice/model/NiceCiApiSendDTO.java b/src/main/java/cokr/xit/ens/modules/nice/model/NiceCiApiSendDTO.java
index 30985b4..f33bb4a 100644
--- a/src/main/java/cokr/xit/ens/modules/nice/model/NiceCiApiSendDTO.java
+++ b/src/main/java/cokr/xit/ens/modules/nice/model/NiceCiApiSendDTO.java
@@ -15,7 +15,7 @@ import lombok.*;
 
 /**
  * 
- * description : Nice CI 전문 DTO
+ * description : Nice CI 전송 요청 전문 DTO
  *               Builder 패턴 사용 X
  *               -> setter를 사용 필드 길이 고정 필요
  * packageName : cokr.xit.ens.modules.nice.model
@@ -220,6 +220,10 @@ public class NiceCiApiSendDTO {
         // 버튼요청부 반복: 3000 자리
         //----------------------------------------------------------------------------------------------
 
+        /**
+         * NICE CI API 전송 요청 전문 생성 - 한글 2, 그외 1 자리로 생성
+         * @return String NICE CI send 전문
+         */
         public String ofString() {
             StringBuilder sb = new StringBuilder();
             //sb.append(trCode);
diff --git a/src/main/java/cokr/xit/ens/modules/nice/model/NiceCiApiStatusDTO.java b/src/main/java/cokr/xit/ens/modules/nice/model/NiceCiApiStatusDTO.java
index 0ed8e98..84bce0b 100644
--- a/src/main/java/cokr/xit/ens/modules/nice/model/NiceCiApiStatusDTO.java
+++ b/src/main/java/cokr/xit/ens/modules/nice/model/NiceCiApiStatusDTO.java
@@ -16,7 +16,7 @@ import lombok.*;
 
 /**
  * 
- * description : Nice CI 이력 전문 DTO
+ * description : Nice CI 상태 조회 전문 DTO
  *               Builder 패턴 사용 X
  *               -> setter를 사용 필드 길이 고정 필요
  * packageName : cokr.xit.ens.modules.nice.model
@@ -196,6 +196,10 @@ public class NiceCiApiStatusDTO {
         // 개별요청부 : 100 자리
         //----------------------------------------------------------------------------------------------
 
+        /**
+         * NICE CI API 상태 조회 전문 생성 - 한글 2, 그외 1 자리로 생성
+         * @return String NICE CI 상태 조회 전문
+         */
         public String ofString() {
             StringBuilder sb = new StringBuilder();
             sb.append(trnscId);
diff --git a/src/main/java/cokr/xit/ens/modules/nice/model/NiceCiDTO.java b/src/main/java/cokr/xit/ens/modules/nice/model/NiceCiDTO.java
index eac3adb..4312ed1 100644
--- a/src/main/java/cokr/xit/ens/modules/nice/model/NiceCiDTO.java
+++ b/src/main/java/cokr/xit/ens/modules/nice/model/NiceCiDTO.java
@@ -10,7 +10,7 @@ import lombok.*;
 
 /**
  * 
- * description :
+ * description : NICE CI 인증 업무 DTO
  * packageName : cokr.xit.ens.modules.nice.model
  * fileName    : NiceCiDTO
  * author      : limju
diff --git a/src/main/java/cokr/xit/ens/modules/nice/presentation/NiceCiController.java b/src/main/java/cokr/xit/ens/modules/nice/presentation/NiceCiController.java
index 46573f7..bdad992 100644
--- a/src/main/java/cokr/xit/ens/modules/nice/presentation/NiceCiController.java
+++ b/src/main/java/cokr/xit/ens/modules/nice/presentation/NiceCiController.java
@@ -32,24 +32,40 @@ public class NiceCiController {
     private final NiceCiStatBulkService niceCiStatBulkService;
     private final NiceCiCloseService niceCiCloseService;
 
+    /**
+     * NICE CI 전자 고지 접수
+     * @return ResponseEntity
+     */
     @Operation(summary = "접수")
     @PostMapping(value = "/accept/all", produces = MediaType.APPLICATION_JSON_VALUE)
     public ResponseEntity accept() {
         return new ResponseEntity<>(niceCiAcceptService.accept(), HttpStatus.OK);
     }
 
+    /**
+     * NICE CI 전자 고지 전송 요청
+     * @return ResponseEntity
+     */
     @Operation(summary = "(대량)전송요청")
     @PostMapping(value = "/send/bulk/all", produces = MediaType.APPLICATION_JSON_VALUE)
     public ResponseEntity sendBulk() {
         return new ResponseEntity<>(niceCiSendService.requestSendBulk(), HttpStatus.OK);
     }
 
+    /**
+     * NICE CI 전자 고지 전송 상태 조회
+     * @return ResponseEntity
+     */
     @Operation(summary = "(대량)상태조회")
     @PostMapping(value = "/stat/bulk/all", produces = MediaType.APPLICATION_JSON_VALUE)
     public ResponseEntity findBulkStatus() {
         return new ResponseEntity<>(niceCiStatBulkService.findBulkStatus(), HttpStatus.OK);
     }
 
+    /**
+     * NICE CI 전자 고지 마감
+     * @return ResponseEntity
+     */
     @Operation(summary = "마감(종료)")
     @PostMapping(value = "/stat/closed", produces = MediaType.APPLICATION_JSON_VALUE)
     public ResponseEntity cloased() {
diff --git a/src/main/java/cokr/xit/ens/modules/nice/service/NiceCiNewTransactionService.java b/src/main/java/cokr/xit/ens/modules/nice/service/NiceCiNewTransactionService.java
index 5a6b555..955ea0f 100644
--- a/src/main/java/cokr/xit/ens/modules/nice/service/NiceCiNewTransactionService.java
+++ b/src/main/java/cokr/xit/ens/modules/nice/service/NiceCiNewTransactionService.java
@@ -49,13 +49,13 @@ public class NiceCiNewTransactionService {
     }
 
     @Transactional(propagation = Propagation.REQUIRES_NEW)
-    public int insertNiceSmsSndngInquireResponseRepeats(final List resultList){
-        return mapper.insertNiceSmsSndngInquireResponseRepeats(resultList);
+    public void insertNiceSmsSndngInquireResponseRepeats(final List resultList){
+        mapper.insertNiceSmsSndngInquireResponseRepeats(resultList);
     }
 
     @Transactional(propagation = Propagation.REQUIRES_NEW)
-    public int insertSendResults(final List sendResults){
-        return mapper.insertSendResults(sendResults);
+    public void insertSendResults(final List sendResults){
+        mapper.insertSendResults(sendResults);
     }
     // status /////////////////////////////////////////////////////
 }
diff --git a/src/main/java/cokr/xit/ens/modules/nice/service/support/NiceCiApiService.java b/src/main/java/cokr/xit/ens/modules/nice/service/support/NiceCiApiService.java
index a1066d9..01ac020 100644
--- a/src/main/java/cokr/xit/ens/modules/nice/service/support/NiceCiApiService.java
+++ b/src/main/java/cokr/xit/ens/modules/nice/service/support/NiceCiApiService.java
@@ -50,6 +50,11 @@ public class NiceCiApiService {
 
     private static final Validator validator = Validation.buildDefaultValidatorFactory().getValidator();
 
+    /**
+     * NICE CI SMS 전송 요청 API
+     * @param reqDTO NiceCiApiSendDTO.Request
+     * @return EnsResponseVO
+     */
     public EnsResponseVO requestSendBulk(final NiceCiApiSendDTO.Request reqDTO) {
         List errors = new ArrayList<>();
         final Set> list = validator.validate(reqDTO);
@@ -90,6 +95,11 @@ public class NiceCiApiService {
             .build();
     }
 
+    /**
+     * NICE CI SMS 전송 상태 조회 API
+     * @param reqDTO NiceCiApiStatusDTO.Request
+     * @return EnsResponseVO
+     */
     public EnsResponseVO findBulkStatus(final NiceCiApiStatusDTO.Request reqDTO) {
         List errors = new ArrayList<>();
         final Set> list = validator.validate(reqDTO);