diff --git a/mens-api/src/main/java/kr/xit/biz/ktgbs/web/BizKtGbsController.java b/mens-api/src/main/java/kr/xit/biz/ktgbs/web/BizKtGbsController.java index 3449e80..9616b45 100644 --- a/mens-api/src/main/java/kr/xit/biz/ktgbs/web/BizKtGbsController.java +++ b/mens-api/src/main/java/kr/xit/biz/ktgbs/web/BizKtGbsController.java @@ -40,14 +40,14 @@ import lombok.extern.slf4j.Slf4j; public class BizKtGbsController { private static final String PARAM1 = """ { - "signguCode": "88328", + "signguCode": "44131", "ffnlgCode": "11", "profile": "local" } """; private static final String PARAM2 = """ { - "signguCode": "88316", + "signguCode": "44133", "ffnlgCode": "11", "profile": "local" } @@ -60,10 +60,10 @@ public class BizKtGbsController { mediaType = "application/json", examples = { @ExampleObject( - name = "교통시설운영처", + name = "천안시동남구청", value = PARAM1), @ExampleObject( - name = "승화원", + name = "천안시서북구청", value = PARAM2) }) }) diff --git a/mens-api/src/main/java/kr/xit/biz/mbl/web/MobilePageController.java b/mens-api/src/main/java/kr/xit/biz/mbl/web/MobilePageController.java index 2049f2f..0c5a084 100644 --- a/mens-api/src/main/java/kr/xit/biz/mbl/web/MobilePageController.java +++ b/mens-api/src/main/java/kr/xit/biz/mbl/web/MobilePageController.java @@ -82,14 +82,17 @@ public class MobilePageController { produces = MediaType.APPLICATION_JSON_VALUE) public IApiResponse findKtMblPage(@RequestParam final String token, final HttpServletRequest request) { final String uri = request.getRequestURI(); + //FIXME: KT mblpage 적용 안됨 final KtTokenDTO.KtTokenConfirmRequest cfmReqDTO = KtTokenDTO.KtTokenConfirmRequest.builder() .signguCode(SignguCode.CHUNCHEON.getCode()) .ffnlgCode(ApiConstants.FFNLN_CODE) .accessToken(token) .build(); + //FIXME: KT mblpage 적용 안됨 if(uri.contains("meMblPage")){ - cfmReqDTO.setSignguCode(SignguCode.FUNERAL.getCode()); + cfmReqDTO.setSignguCode(SignguCode.CHEONAN_ES.getCode()); + //cfmReqDTO.setSignguCode(SignguCode.CHEONAN_WN.getCode()); } return service.findKtMblPage(cfmReqDTO); } diff --git a/mens-api/src/main/java/kr/xit/biz/nice/service/BizNiceCiService.java b/mens-api/src/main/java/kr/xit/biz/nice/service/BizNiceCiService.java index 6ac2172..4ccc693 100644 --- a/mens-api/src/main/java/kr/xit/biz/nice/service/BizNiceCiService.java +++ b/mens-api/src/main/java/kr/xit/biz/nice/service/BizNiceCiService.java @@ -106,7 +106,7 @@ public class BizNiceCiService extends AbstractService implements IBizNiceCiServi // 공개키 정보 캐쉬 삭제 cacheService.removeNiceCiInfoCache(niceDTO.getSignguCode(), niceDTO.getFfnlgCode()); - updateNiceCerfInfoSync(niceDTO, reqDTO, NiceCiWrkDiv.TOKEN); + //updateNiceCerfInfoSync(niceDTO, reqDTO, NiceCiWrkDiv.TOKEN); //---------------------------------------------------------------------------------- } @@ -146,7 +146,7 @@ public class BizNiceCiService extends AbstractService implements IBizNiceCiServi // 공개키 정보 캐쉬 삭제 cacheService.removeNiceCiInfoCache(niceDTO.getSignguCode(), niceDTO.getFfnlgCode()); - updateNiceCerfInfoSync(niceDTO, reqDTO, NiceCiWrkDiv.TOKEN); + //updateNiceCerfInfoSync(niceDTO, reqDTO, NiceCiWrkDiv.TOKEN); }else{ throw BizRuntimeException.create("토큰을 폐기하지 못했습니다."); } @@ -184,7 +184,7 @@ public class BizNiceCiService extends AbstractService implements IBizNiceCiServi // 공개키 정보 캐쉬 삭제 cacheService.removeNiceCiInfoCache(niceDTO.getSignguCode(), niceDTO.getFfnlgCode()); - updateNiceCerfInfoSync(niceDTO, reqDTO, NiceCiWrkDiv.PUBLIC_KEY); + //updateNiceCerfInfoSync(niceDTO, reqDTO, NiceCiWrkDiv.PUBLIC_KEY); return dataBody; } @@ -228,7 +228,7 @@ public class BizNiceCiService extends AbstractService implements IBizNiceCiServi // 공개키 정보 캐쉬 삭제 cacheService.removeNiceCiInfoCache(niceDTO.getSignguCode(), niceDTO.getFfnlgCode()); - updateNiceCerfInfoSync(niceDTO, reqDTO, NiceCiWrkDiv.SYM_KEY); + //updateNiceCerfInfoSync(niceDTO, reqDTO, NiceCiWrkDiv.SYM_KEY); return symkeyStatInfo; } @@ -247,21 +247,20 @@ public class BizNiceCiService extends AbstractService implements IBizNiceCiServi /** *
- * 교통시설운영처와 승화원의 Nice CI 정보 sync + * Nice CI 정보 sync가 필요한 경우 호출 * @param niceDTO NiceCiInfo * @param reqDTO NiceCiRequest * @param wrkDiv NiceCiWrkDiv **/ - // FIXME : SignguCode private void updateNiceCerfInfoSync(final NiceCiInfo niceDTO, final NiceCiRequest reqDTO, final NiceCiWrkDiv wrkDiv) { // 교통시설운영처 또는 장사시설인 경우 sync ---------------------------------------- - if(SignguCode.CHUNCHEON.getCode().equals(reqDTO.getSignguCode())){ - niceDTO.setSignguCode(SignguCode.FUNERAL.getCode()); + if(SignguCode.CHEONAN_ES.getCode().equals(reqDTO.getSignguCode())){ + niceDTO.setSignguCode(SignguCode.CHEONAN_WN.getCode()); } - if(SignguCode.FUNERAL.getCode().equals(reqDTO.getSignguCode())){ - niceDTO.setSignguCode(SignguCode.CHUNCHEON.getCode()); + if(SignguCode.CHEONAN_WN.getCode().equals(reqDTO.getSignguCode())){ + niceDTO.setSignguCode(SignguCode.CHEONAN_ES.getCode()); } switch(wrkDiv){ diff --git a/mens-batch/src/main/java/kr/xit/batch/ens/web/BatchJobWebController.java b/mens-batch/src/main/java/kr/xit/batch/ens/web/BatchJobWebController.java index a88fc4b..a48d0c7 100644 --- a/mens-batch/src/main/java/kr/xit/batch/ens/web/BatchJobWebController.java +++ b/mens-batch/src/main/java/kr/xit/batch/ens/web/BatchJobWebController.java @@ -20,6 +20,8 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.ExampleObject; import io.swagger.v3.oas.annotations.tags.Tag; import kr.xit.batch.ens.job.SndngAcceptJobConfig; import kr.xit.batch.ens.job.SndngCloseJobConfig; @@ -66,6 +68,44 @@ public class BatchJobWebController { private final SndngStatusBulksJobConfig statusJobConfig; private final SndngCloseJobConfig closeJobConfig; + private static final String CAN_1 = """ + { + "signguCode": "44131", + "ffnlgCode": "11", + "profile": "local" + } + """; + private static final String CAN_2 = """ + { + "signguCode": "44133", + "ffnlgCode": "11", + "profile": "local" + } + """; + + private static final String CCN = """ + { + "signguCode": "41220", + "ffnlgCode": "11", + "profile": "local" + } + """; + + @io.swagger.v3.oas.annotations.parameters.RequestBody(required = true, content = { + @Content( + mediaType = "application/json", + examples = { + @ExampleObject( + name = "춘천", + value = CCN), + @ExampleObject( + name = "천안시 동남구청", + value = CAN_1), + @ExampleObject( + name = "천안시 서북구청", + value = CAN_2) + }) + }) @Operation(summary = "accept", description = "accept") @PostMapping(value = "/accept", produces = MediaType.APPLICATION_JSON_VALUE) public IApiResponse accept(@RequestBody final CmmEnsRequestDTO reqDTO) { @@ -88,6 +128,21 @@ public class BatchJobWebController { return ApiResponseDTO.success(HttpStatus.OK); } + @io.swagger.v3.oas.annotations.parameters.RequestBody(required = true, content = { + @Content( + mediaType = "application/json", + examples = { + @ExampleObject( + name = "춘천", + value = CCN), + @ExampleObject( + name = "천안시 동남구청", + value = CAN_1), + @ExampleObject( + name = "천안시 서북구청", + value = CAN_2) + }) + }) @Operation(summary = "make", description = "make") @PostMapping(value = "/make", produces = MediaType.APPLICATION_JSON_VALUE) public IApiResponse make(@RequestBody final CmmEnsRequestDTO reqDTO) { @@ -111,6 +166,21 @@ public class BatchJobWebController { return ApiResponseDTO.success(HttpStatus.OK); } + @io.swagger.v3.oas.annotations.parameters.RequestBody(required = true, content = { + @Content( + mediaType = "application/json", + examples = { + @ExampleObject( + name = "춘천", + value = CCN), + @ExampleObject( + name = "천안시 동남구청", + value = CAN_1), + @ExampleObject( + name = "천안시 서북구청", + value = CAN_2) + }) + }) @Operation(summary = "close", description = "close") @PostMapping(value = "/close", produces = MediaType.APPLICATION_JSON_VALUE) public IApiResponse close(@RequestBody final CmmEnsRequestDTO reqDTO) { @@ -134,6 +204,21 @@ public class BatchJobWebController { return ApiResponseDTO.success(HttpStatus.OK); } + @io.swagger.v3.oas.annotations.parameters.RequestBody(required = true, content = { + @Content( + mediaType = "application/json", + examples = { + @ExampleObject( + name = "춘천", + value = CCN), + @ExampleObject( + name = "천안시 동남구청", + value = CAN_1), + @ExampleObject( + name = "천안시 서북구청", + value = CAN_2) + }) + }) @Operation(summary = "sendBulks", description = "sendBulks") @PostMapping(value = "/sendBulks", produces = MediaType.APPLICATION_JSON_VALUE) public IApiResponse sendBulks(@RequestBody final CmmEnsRequestDTO reqDTO) { @@ -157,6 +242,21 @@ public class BatchJobWebController { return ApiResponseDTO.success(HttpStatus.OK); } + @io.swagger.v3.oas.annotations.parameters.RequestBody(required = true, content = { + @Content( + mediaType = "application/json", + examples = { + @ExampleObject( + name = "춘천", + value = CCN), + @ExampleObject( + name = "천안시 동남구청", + value = CAN_1), + @ExampleObject( + name = "천안시 서북구청", + value = CAN_2) + }) + }) @Operation(summary = "statusBulks", description = "statusBulks") @PostMapping(value = "/statusBulks", produces = MediaType.APPLICATION_JSON_VALUE) public IApiResponse statusBulks(@RequestBody final CmmEnsRequestDTO reqDTO) { diff --git a/mens-batch/src/main/java/kr/xit/biz/ens/cmm/CmmEnsBizUtils.java b/mens-batch/src/main/java/kr/xit/biz/ens/cmm/CmmEnsBizUtils.java index 27b5259..3165044 100644 --- a/mens-batch/src/main/java/kr/xit/biz/ens/cmm/CmmEnsBizUtils.java +++ b/mens-batch/src/main/java/kr/xit/biz/ens/cmm/CmmEnsBizUtils.java @@ -55,4 +55,15 @@ public class CmmEnsBizUtils { return ApiConstants.SndngSeCode.getSndngSeCode(seCode); } + + /** + * 춘천 또는 천안 전자결재 발송 진행상태 set + * @param isChuncheon + * @param dto SndngMssageParam + * @param processStatus 발송처리상태 + */ + public static void setMappingProcessStatus(boolean isChuncheon, final SndngMssageParam dto, final String processStatus) { + if(isChuncheon) dto.setNewSndngProcessSttus(ApiConstants.MappingCcnSndngProcessStatus.fromEns(processStatus)); + else dto.setNewSndngProcessSttus(ApiConstants.MappingCanSndngProcessStatus.fromEns(processStatus)); + } } diff --git a/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchAcceptService.java b/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchAcceptService.java index eb0118e..145d61c 100644 --- a/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchAcceptService.java +++ b/mens-batch/src/main/java/kr/xit/biz/ens/service/EnsBatchAcceptService.java @@ -23,7 +23,8 @@ import KISINFO.VNO.VNOInterop; import egovframework.com.cmm.util.EgovDateUtil; import egovframework.com.cmm.util.EgovStringUtil; import kr.xit.biz.common.ApiConstants; -import kr.xit.biz.common.ApiConstants.MappingSndngProcessStatus; +import kr.xit.biz.common.ApiConstants.MappingCanSndngProcessStatus; +import kr.xit.biz.common.ApiConstants.MappingCcnSndngProcessStatus; import kr.xit.biz.common.ApiConstants.SndngProcessStatus; import kr.xit.biz.common.ApiConstants.SndngSeCode; import kr.xit.biz.ens.cmm.CmmEnsBizUtils; @@ -123,7 +124,8 @@ public class EnsBatchAcceptService extends AbstractService implements IEnsBatchA @Override @Transactional(propagation = Propagation.REQUIRES_NEW) public void accept(final EnsDTO.BatchEnsRequest reqDTO) { - reqDTO.setSndngProcessSttus(MappingSndngProcessStatus.fromEns(SndngProcessStatus.ACCEPT.getCode())); + if(IS_CCN) reqDTO.setSndngProcessSttus(MappingCcnSndngProcessStatus.fromEns(SndngProcessStatus.ACCEPT.getCode())); + else reqDTO.setSndngProcessSttus(MappingCanSndngProcessStatus.fromEns(SndngProcessStatus.ACCEPT.getCode())); final List
- * 발송처리상태 : ENS003 매핑 + * 춘천의 발송처리상태 : ENS003 매핑 * 01: 요청, 11: 접수완료, 19: 접수실패 * 22: 제작완료, 29: 제작실패, 08: 발송완료, 09: 마감, 99: 발송실패 **/ @Getter - public enum MappingSndngProcessStatus { + public enum MappingCcnSndngProcessStatus { ACCEPT("accept", "01"), ACCEPT_OK("accept-ok", "11"), ACCEPT_FAIL("accept-fail", "19"), @@ -274,7 +278,7 @@ public class ApiConstants { private final String ensCode; private final String trfCode; - MappingSndngProcessStatus(String ensCode, String trfCode) { + MappingCcnSndngProcessStatus(String ensCode, String trfCode) { this.ensCode = ensCode; this.trfCode = trfCode; } @@ -287,10 +291,10 @@ public class ApiConstants { * */ public static String fromTraffic(final String trfCode){ - return Arrays.stream(MappingSndngProcessStatus.values()) + return Arrays.stream(MappingCcnSndngProcessStatus.values()) .filter(en -> en.getTrfCode().equals(trfCode)) .findFirst() - .map(MappingSndngProcessStatus::getEnsCode) + .map(MappingCcnSndngProcessStatus::getEnsCode) .orElseThrow(() -> BizRuntimeException.create(String.format("미정의된 상태코드가[%s]", trfCode))); } @@ -302,12 +306,76 @@ public class ApiConstants { * */ public static String fromEns(final String ensCode){ - return Arrays.stream(MappingSndngProcessStatus.values()) + return Arrays.stream(MappingCcnSndngProcessStatus.values()) .filter(en -> en.getEnsCode().equals(ensCode)) .findFirst() - .map(MappingSndngProcessStatus::getTrfCode) + .map(MappingCcnSndngProcessStatus::getTrfCode) .orElseThrow(() -> BizRuntimeException.create(String.format("미정의된 상태코드가[%s]", ensCode))); } } + /** + *
+ * 천안의 발송처리상태 : ENS003 매핑 + * 01: 요청, 11: 접수완료, 19: 접수실패 + * 22: 제작완료, 29: 제작실패, 08: 발송완료, 09: 마감, 99: 발송실패 + *+ */ + @Getter + public enum MappingCanSndngProcessStatus { + ACCEPT("accept", "accept"), + ACCEPT_OK("accept-ok", "acptok"), + ACCEPT_FAIL("accept-fail", "acptfail"), + MAKE_OK("make-ok", "ensmake"), + MAKE_FAIL1("make-fail1", "makefail"), + MAKE_FAIL2("make-fail2", "makefail"), + MAKE_FAIL3("make-fail3", "makefail"), + SENDING1("sending1", "ensok"), + SENDING2("sending2", "ensok"), + SEND_OK("send-ok", "ensopen"), + SEND_FAIL1("send-fail1", "ensfail"), + SEND_FAIL2("send-fail2", "ensfail"), + SEND_FAIL3("send-fail3", "ensfail"), + CLOSE("close", "ensclose") + + ; + + private final String ensCode; + private final String trfCode; + + MappingCanSndngProcessStatus(String ensCode, String trfCode) { + this.ensCode = ensCode; + this.trfCode = trfCode; + } + + /** + *
+ * traffic 상태코드를 ens 상태코드로 매핑 + * @param trfCode + * @return traffic 상태코드에 매핑된 ens 상태코드 + *+ */ + public static String fromTraffic(final String trfCode){ + return Arrays.stream(MappingCcnSndngProcessStatus.values()) + .filter(en -> en.getTrfCode().equals(trfCode)) + .findFirst() + .map(MappingCcnSndngProcessStatus::getEnsCode) + .orElseThrow(() -> BizRuntimeException.create(String.format("미정의된 상태코드가[%s]", trfCode))); + } + + /** + *
+ * ens 상태코드를 traffic 상태코드로 매핑 + * @param ensCode + * @return ens 상태코드에 매핑된 traffic 상태코드 + *+ */ + public static String fromEns(final String ensCode){ + return Arrays.stream(MappingCcnSndngProcessStatus.values()) + .filter(en -> en.getEnsCode().equals(ensCode)) + .findFirst() + .map(MappingCcnSndngProcessStatus::getTrfCode) + .orElseThrow(() -> BizRuntimeException.create(String.format("미정의된 상태코드가[%s]", ensCode))); + } + } }