feat: 카카오톡 반영 - send

main
Jonguk. Lim 2 months ago
parent c549fa53b1
commit ceb64e682a

@ -75,3 +75,65 @@ create table ENS_TMPLT_MNG_KKO_TALK
constraint FK_TMPLT_MNG_KKO_TALK constraint FK_TMPLT_MNG_KKO_TALK
foreign key (ORG_CD, TMPLT_CD) references ENS_TMPLT_MNG foreign key (ORG_CD, TMPLT_CD) references ENS_TMPLT_MNG
); );
create table ENS_SND_DTL_KKO_TALK_REQ_HIS
(
ID NUMBER(19) not null
primary key,
ENVELOPE_ID VARCHAR2(255 char),
EXTERNAL_ID VARCHAR2(255 char),
RESP_RAW_MSG VARCHAR2(1000 char),
SEND_DETAIL_ID NUMBER(19),
SEND_RAW_MSG VARCHAR2(4000 char) not null,
ERROR_CODE VARCHAR2(255 char),
ERROR_MESSAGE CLOB,
REGIST_DT TIMESTAMP(6)
);
create index IDX_SND_DTL_KKO_TALK_REQ_HIS_01
on ENS_SND_DTL_KKO_TALK_REQ_HIS (REGIST_DT);
create table ENS_SND_DTL_KKO_TALK_STAT_HIS
(
ID NUMBER(19) not null
primary key,
ENVELOPE_ID VARCHAR2(255 char),
EXTERNAL_ID VARCHAR2(255 char),
AUTHENTICATED_AT VARCHAR2(19),
READ_AT VARCHAR2(19),
RECEIVED_AT VARCHAR2(19),
SENT_AT VARCHAR2(19),
STATUS VARCHAR2(255 char),
DISTRIBUTION_RECEIVED_AT VARCHAR2(19),
PAYLOAD VARCHAR2(255 char),
SEND_DETAIL_ID NUMBER(19) not null,
TOKEN_USED_AT NUMBER(19),
USER_NOTIFIED_AT NUMBER(19),
ERROR_CODE VARCHAR2(255 char),
ERROR_MESSAGE CLOB,
REGIST_DT TIMESTAMP(6)
);
create index IDX_SND_DTL_KKO_TALK_STAT_HIS_01
on ENS_SND_DTL_KKO_TALK_STAT_HIS (REGIST_DT);
create table ENS_SND_DTL_KKO_TALK_OTT_HIS
(
ID NUMBER(19) not null
primary key,
ENVELOPE_ID VARCHAR2(255 char),
EXTERNAL_ID VARCHAR2(255 char),
AUTHENTICATED_AT VARCHAR2(19),
RECEIVED_AT VARCHAR2(19),
SENT_AT VARCHAR2(19),
PAYLOAD VARCHAR2(255 char),
SIGNED_AT VARCHAR2(255 char),
TOKEN VARCHAR2(255 char),
TOKEN_EXPIRES_AT VARCHAR2(19),
TOKEN_STATUS VARCHAR2(255 char),
TOKEN_USED_AT VARCHAR2(19),
USER_NOTIFIED_AT VARCHAR2(19),
ERROR_CODE VARCHAR2(255 char),
ERROR_MESSAGE CLOB,
REGIST_DT TIMESTAMP(6)
);
create index IDX_SND_DTL_KKO_TALK_OTT_HIS_01
on ENS_SND_DTL_KKO_TALK_OTT_HIS (REGIST_DT);

@ -1,26 +1,26 @@
package cokr.xit.ens.modules.common.code; package cokr.xit.ens.modules.common.code;
import cokr.xit.ens.core.code.CodeMapperType; import cokr.xit.ens.core.code.*;
import lombok.Getter; import lombok.*;
import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor @RequiredArgsConstructor
public enum PostSeCd implements CodeMapperType { public enum PostSeCd implements CodeMapperType {
testMblPage("모바일페이지 테스트") testMblPage("모바일페이지 테스트")
,intgrnNoti("통합 전자고지") ,intgrnNoti("통합 전자고지")
,kkoMydoc("카카오페이 내문서함(인증톡)") ,kkoMydoc("카카오페이 내문서함(인증톡)")
// FIXME: 카카오톡 추가
,kkoTalk("카카오톡 인증톡")
,kkoAlimtalk("카카오페이 알림톡") ,kkoAlimtalk("카카오페이 알림톡")
,nvSigntalk("네이버 고지서(인증톡)") ,nvSigntalk("네이버 고지서(인증톡)")
,ktSigntalk("KT 인증톡") ,ktSigntalk("KT 인증톡")
,ktGibis("KT 인증톡(지비스)") ,ktGibis("KT 인증톡(지비스)")
,kkoTalk("카카오톡 인증톡")
; ;
@Getter @Getter
private final String codeNm; private final String codeNm;
@Override @Override
public String getCode() { public String getCode() {
return this.name(); return this.name();

@ -1,7 +1,6 @@
package cokr.xit.ens.modules.common.code; package cokr.xit.ens.modules.common.code;
import lombok.Getter; import lombok.*;
import lombok.RequiredArgsConstructor;
/** /**
* Native Query . * Native Query .
@ -10,6 +9,8 @@ import lombok.RequiredArgsConstructor;
public enum UseNativeQuery { public enum UseNativeQuery {
IntgrnSendDetail("ens_intgrn_snd_dtl") IntgrnSendDetail("ens_intgrn_snd_dtl")
,SendDetailKkoMydoc("ens_snd_dtl_kko_md") ,SendDetailKkoMydoc("ens_snd_dtl_kko_md")
// FIXME: 카카오톡 추가
,SendDetailKkoTalk("ens_snd_dtl_kko_talk")
,SendDetailNvSigntalk("ens_snd_dtl_nv_st") ,SendDetailNvSigntalk("ens_snd_dtl_nv_st")
,SendDetailKtSigntalk("ens_snd_dtl_kt_st") ,SendDetailKtSigntalk("ens_snd_dtl_kt_st")
,SendDetailKtGibis("ens_snd_dtl_kt_gbs") ,SendDetailKtGibis("ens_snd_dtl_kt_gbs")
@ -17,19 +18,24 @@ public enum UseNativeQuery {
,SendDetailKkoAlimtalkReqHist("ens_snd_dtl_kko_at_req_his") ,SendDetailKkoAlimtalkReqHist("ens_snd_dtl_kko_at_req_his")
,SendDetailKkoAlimtalkRsltHist("ens_snd_dtl_kko_at_rslt_his") ,SendDetailKkoAlimtalkRsltHist("ens_snd_dtl_kko_at_rslt_his")
,SendDetailKkoMydocReqHist("ens_snd_dtl_kko_md_req_his") ,SendDetailKkoMydocReqHist("ens_snd_dtl_kko_md_req_his")
,SendDetailKkoMydocStatHist("ens_snd_dtl_kko_md_stat_his") ,SendDetailKkoMydocStatHist("ens_snd_dtl_kko_md_stat_his")
,SendDetailKkoMydocTokenHist("ens_snd_dtl_kko_md_ott_his") ,SendDetailKkoMydocTokenHist("ens_snd_dtl_kko_md_ott_his")
// FIXME: 카카오톡 추가
,SendDetailKkoTalkReqHist("ens_snd_dtl_kko_talk_req_his")
,SendDetailKkoTalkStatHist("ens_snd_dtl_kko_talk_stat_his")
,SendDetailKkoTalkTokenHist("ens_snd_dtl_kko_talk_ott_his")
,SendDetailNvSigntalkReqHist("ens_snd_dtl_nv_st_req_his") ,SendDetailNvSigntalkReqHist("ens_snd_dtl_nv_st_req_his")
,SendDetailNvSigntalkStatHist("ens_snd_dtl_nv_st_stat_his") ,SendDetailNvSigntalkStatHist("ens_snd_dtl_nv_st_stat_his")
,SendDetailNvSigntalkTokenHist("ens_snd_dtl_nv_st_ott_his") ,SendDetailNvSigntalkTokenHist("ens_snd_dtl_nv_st_ott_his")
,SendDetailKtSigntalkReqHist("ens_snd_dtl_kt_st_req_his") ,SendDetailKtSigntalkReqHist("ens_snd_dtl_kt_st_req_his")
,SendDetailKtSigntalkStatHist("ens_snd_dtl_kt_st_stat_his") ,SendDetailKtSigntalkStatHist("ens_snd_dtl_kt_st_stat_his")
,SendDetailKtSigntalkTokenHist("ens_snd_dtl_kt_st_ott_his") ,SendDetailKtSigntalkTokenHist("ens_snd_dtl_kt_st_ott_his")
,SendDetailKtGibisReqHist("ens_snd_dtl_kt_gbs_req_his") ,SendDetailKtGibisReqHist("ens_snd_dtl_kt_gbs_req_his")
,SendDetailKtGibisStatHist("ens_snd_dtl_kt_gbs_stat_his") ,SendDetailKtGibisStatHist("ens_snd_dtl_kt_gbs_stat_his")
,SendDetailKtGibisTokenHist("ens_snd_dtl_kt_gbs_ott_his") ,SendDetailKtGibisTokenHist("ens_snd_dtl_kt_gbs_ott_his")

@ -0,0 +1,25 @@
package cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.repository;
import org.apache.ibatis.annotations.*;
import cokr.xit.ens.core.repository.*;
import cokr.xit.ens.modules.common.ctgy.sys.mng.domain.ids.*;
import cokr.xit.ens.modules.kkotalk.domain.*;
/**
* <pre>
* description :
* packageName : cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.repository
* fileName : TmpltMngKkoTalkMapper
* author : limju
* date : 2024 9 09
* ======================================================================
*
* ----------------------------------------------------------------------
* 2024 9 09 limju
*
* </pre>
*/
@Mapper
public interface TmpltMngKkoTalkMapper extends MybatisCrudSupport<TmpltMngKkoTalk, TmpltMngKkoTalk, TmpltMngIds> {
}

@ -1,22 +1,22 @@
package cokr.xit.ens.modules.common.ctgy.intgrnnoti.model; package cokr.xit.ens.modules.common.ctgy.intgrnnoti.model;
import cokr.xit.ens.modules.common.code.PostSeCd; import java.io.*;
import cokr.xit.ens.modules.common.ctgy.sys.mng.model.TmpltMngDTO;
import cokr.xit.ens.modules.kkoalimtalk.model.TmpltMngKkoAlimtalkDTO; import javax.persistence.*;
import cokr.xit.ens.modules.kkomydoc.model.TmpltMngKkoMydocDTO; import javax.validation.*;
import cokr.xit.ens.modules.ktsigntalk.direct.model.TmpltMngKtSigntalkDTO; import javax.validation.constraints.*;
import cokr.xit.ens.modules.ktsigntalk.gibis.model.TmpltMngKtGibisDTO;
import cokr.xit.ens.modules.nvsigntalk.model.TmpltMngNvSigntalkDTO; import cokr.xit.ens.modules.common.code.*;
import io.swagger.v3.oas.annotations.media.Schema; import cokr.xit.ens.modules.common.ctgy.sys.mng.model.*;
import lombok.Data; import cokr.xit.ens.modules.kkoalimtalk.model.*;
import lombok.NoArgsConstructor; import cokr.xit.ens.modules.kkomydoc.model.*;
import lombok.experimental.SuperBuilder; import cokr.xit.ens.modules.kkotalk.model.*;
import cokr.xit.ens.modules.ktsigntalk.direct.model.*;
import javax.persistence.EnumType; import cokr.xit.ens.modules.ktsigntalk.gibis.model.*;
import javax.persistence.Enumerated; import cokr.xit.ens.modules.nvsigntalk.model.*;
import javax.validation.Valid; import io.swagger.v3.oas.annotations.media.*;
import javax.validation.constraints.NotNull; import lombok.*;
import java.io.Serializable; import lombok.experimental.*;
@Data @Data
@SuperBuilder @SuperBuilder
@ -43,6 +43,11 @@ public class TmpltMngIntgrnDTO extends TmpltMngDTO implements Serializable {
@Valid @Valid
private TmpltMngKkoMydocDTO kkoMydoc; private TmpltMngKkoMydocDTO kkoMydoc;
// FIXME: 카카오톡 추가
@Schema(required = false, title = "카카오톡 인증톡", example = " ")
@Valid
private TmpltMngKkoTalkDTO kkoTalk;
@Schema(required = false, title = "네이버 고지서(인증톡)", example = " ") @Schema(required = false, title = "네이버 고지서(인증톡)", example = " ")
@Valid @Valid
private TmpltMngNvSigntalkDTO nvSigntalk; private TmpltMngNvSigntalkDTO nvSigntalk;

@ -1,20 +1,20 @@
package cokr.xit.ens.modules.common.ctgy.intgrnnoti.presentation; package cokr.xit.ens.modules.common.ctgy.intgrnnoti.presentation;
import cokr.xit.ens.core.exception.EnsException; import java.util.*;
import cokr.xit.ens.core.exception.code.EnsErrCd;
import cokr.xit.ens.core.utils.CmmnUtil;
import cokr.xit.ens.modules.common.code.PostSeCd;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.repository.IntgrnSendDetailRepository;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.*;
import org.springframework.ui.ModelMap; import org.springframework.ui.*;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.Map; import cokr.xit.ens.core.exception.*;
import cokr.xit.ens.core.exception.code.*;
import cokr.xit.ens.core.utils.*;
import cokr.xit.ens.modules.common.code.*;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.repository.*;
import io.swagger.v3.oas.annotations.tags.*;
import lombok.*;
import lombok.extern.slf4j.*;
@Tag(name = "IntgrnNotiMblPageController") @Tag(name = "IntgrnNotiMblPageController")
@Slf4j @Slf4j
@ -26,6 +26,9 @@ public class IntgrnNotiMblPageController {
@Value("${xit.mblpage.postse.kkomd.path}") @Value("${xit.mblpage.postse.kkomd.path}")
private String KKOMD_MBL_PATH; private String KKOMD_MBL_PATH;
// FIXME: 카카오톡 추가
@Value("${xit.mblpage.postse.kkotalk.path}")
private String KKOTALK_MBL_PATH;
@Value("${xit.mblpage.postse.nvst.path}") @Value("${xit.mblpage.postse.nvst.path}")
private String NVST_MBL_PATH; private String NVST_MBL_PATH;
@Value("${xit.mblpage.postse.ktst.path}") @Value("${xit.mblpage.postse.ktst.path}")
@ -38,10 +41,10 @@ public class IntgrnNotiMblPageController {
public String mblPagePrnt(@RequestParam Map<String, String> mParam, ModelMap model) { public String mblPagePrnt(@RequestParam Map<String, String> mParam, ModelMap model) {
String docUuid = null; String docUuid = null;
String linkedUuid = null; String linkedUuid = null;
if (docUuid == null) docUuid = mParam.get("document_binder_uuid"); if (docUuid == null) docUuid = mParam.get("document_binder_uuid");
if (linkedUuid == null) linkedUuid = mParam.get("external_document_uuid"); if (linkedUuid == null) linkedUuid = mParam.get("external_document_uuid");
if (docUuid == null) docUuid = mParam.get("docId"); if (docUuid == null) docUuid = mParam.get("docId");
if (linkedUuid == null) linkedUuid = mParam.get("clientDocId"); if (linkedUuid == null) linkedUuid = mParam.get("clientDocId");
if (docUuid == null) { if (docUuid == null) {
docUuid = CmmnUtil.isEmpty(mParam.get("src_key")) ? null : mParam.get("src_key").replaceAll("[\\\"\\,\\[\\]]", ""); docUuid = CmmnUtil.isEmpty(mParam.get("src_key")) ? null : mParam.get("src_key").replaceAll("[\\\"\\,\\[\\]]", "");
@ -64,6 +67,8 @@ public class IntgrnNotiMblPageController {
String url = null; String url = null;
if (PostSeCd.kkoMydoc.equals(postSeCd)) url = KKOMD_MBL_PATH; if (PostSeCd.kkoMydoc.equals(postSeCd)) url = KKOMD_MBL_PATH;
// FIXME: 카카오톡 추가
else if (PostSeCd.kkoTalk.equals(postSeCd)) url = KKOTALK_MBL_PATH;
else if (PostSeCd.nvSigntalk.equals(postSeCd)) url = NVST_MBL_PATH; else if (PostSeCd.nvSigntalk.equals(postSeCd)) url = NVST_MBL_PATH;
else if (PostSeCd.ktSigntalk.equals(postSeCd)) url = KTST_MBL_PATH; else if (PostSeCd.ktSigntalk.equals(postSeCd)) url = KTST_MBL_PATH;
else if (PostSeCd.ktGibis.equals(postSeCd)) url = KTGBS_MBL_PATH; else if (PostSeCd.ktGibis.equals(postSeCd)) url = KTGBS_MBL_PATH;

@ -1,37 +1,36 @@
package cokr.xit.ens.modules.common.ctgy.intgrnnoti.service.strategy; package cokr.xit.ens.modules.common.ctgy.intgrnnoti.service.strategy;
import cokr.xit.ens.core.exception.EnsException; import java.util.*;
import cokr.xit.ens.core.exception.code.EnsErrCd; import java.util.stream.*;
import cokr.xit.ens.core.utils.CmmnUtil;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.TmpltMngIntgrn; import javax.validation.*;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.repository.TmpltMngIntgrnRepository;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.model.TmpltMngIntgrnDTO; import org.mapstruct.factory.*;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.model.struct.TmpltMngIntgrnMapper; import org.springframework.stereotype.*;
import cokr.xit.ens.modules.common.ctgy.sys.mng.domain.OrgMng;
import cokr.xit.ens.modules.common.ctgy.sys.mng.domain.ids.TmpltMngIds; import com.fasterxml.jackson.core.*;
import cokr.xit.ens.modules.common.ctgy.sys.mng.domain.repository.OrgMngRepository;
import cokr.xit.ens.modules.common.ctgy.sys.mng.domain.repository.TmpltMngRepository; import cokr.xit.ens.core.exception.*;
import cokr.xit.ens.modules.common.ctgy.sys.mng.model.TmpltMngDTO; import cokr.xit.ens.core.exception.code.*;
import cokr.xit.ens.modules.common.ctgy.sys.mng.model.TmpltMngSearchDTO; import cokr.xit.ens.core.utils.*;
import cokr.xit.ens.modules.common.ctgy.sys.mng.service.strategy.TmpltMngStrategyTemplate; import cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.*;
import cokr.xit.ens.modules.kkoalimtalk.domain.TmpltMngKkoAlimtalk; import cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.repository.*;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.model.*;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.model.struct.*;
import cokr.xit.ens.modules.common.ctgy.sys.mng.domain.*;
import cokr.xit.ens.modules.common.ctgy.sys.mng.domain.ids.*;
import cokr.xit.ens.modules.common.ctgy.sys.mng.domain.repository.*;
import cokr.xit.ens.modules.common.ctgy.sys.mng.model.*;
import cokr.xit.ens.modules.common.ctgy.sys.mng.service.strategy.*;
import cokr.xit.ens.modules.kkoalimtalk.domain.*;
import cokr.xit.ens.modules.kkoalimtalk.model.struct.TmpltMngKkoAlimtalkMapper; import cokr.xit.ens.modules.kkoalimtalk.model.struct.TmpltMngKkoAlimtalkMapper;
import cokr.xit.ens.modules.kkomydoc.domain.TmpltMngKkoMydoc; import cokr.xit.ens.modules.kkomydoc.domain.*;
import cokr.xit.ens.modules.kkomydoc.model.struct.TmpltMngKkoMydocMapper; import cokr.xit.ens.modules.kkomydoc.model.struct.TmpltMngKkoMydocMapper;
import cokr.xit.ens.modules.nvsigntalk.domain.TmpltMngNvSigntalk; import cokr.xit.ens.modules.kkotalk.domain.*;
import cokr.xit.ens.modules.kkotalk.model.struct.TmpltMngKkoTalkMapper;
import cokr.xit.ens.modules.nvsigntalk.domain.*;
import cokr.xit.ens.modules.nvsigntalk.model.struct.TmpltMngNvSigntalkMapper; import cokr.xit.ens.modules.nvsigntalk.model.struct.TmpltMngNvSigntalkMapper;
import com.fasterxml.jackson.core.JsonProcessingException; import lombok.*;
import lombok.RequiredArgsConstructor;
import org.mapstruct.factory.Mappers;
import org.springframework.data.redis.core.HashOperations;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;
import javax.validation.ConstraintViolation;
import javax.validation.Validation;
import javax.validation.Validator;
import java.util.*;
import java.util.stream.Collectors;
@Component("tmpltMngStrategy_intgrn") @Component("tmpltMngStrategy_intgrn")
@RequiredArgsConstructor @RequiredArgsConstructor
@ -42,6 +41,7 @@ public class TmpltMngStrategyIntegration extends TmpltMngStrategyTemplate<Map<St
private final TmpltMngIntgrnRepository tmpltMngIntgrnRepository; private final TmpltMngIntgrnRepository tmpltMngIntgrnRepository;
private final cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.repository.TmpltMngKkoAlimtalkMapper tmpltMngKkoAlimtalkMapper; private final cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.repository.TmpltMngKkoAlimtalkMapper tmpltMngKkoAlimtalkMapper;
private final cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.repository.TmpltMngKkoMydocMapper tmpltMngKkoMydocMapper; private final cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.repository.TmpltMngKkoMydocMapper tmpltMngKkoMydocMapper;
private final cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.repository.TmpltMngKkoTalkMapper tmpltMngKkoTalkMapper;
private final cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.repository.TmpltMngNvSigntalkMapper tmpltMngNvSigntalkMapper; private final cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.repository.TmpltMngNvSigntalkMapper tmpltMngNvSigntalkMapper;
// private final RedisTemplate redisTemplate; // private final RedisTemplate redisTemplate;
@ -120,6 +120,12 @@ public class TmpltMngStrategyIntegration extends TmpltMngStrategyTemplate<Map<St
TmpltMngKkoMydoc tmpltChild = mapper.toEntity(dto.getKkoMydoc()); TmpltMngKkoMydoc tmpltChild = mapper.toEntity(dto.getKkoMydoc());
tmpltMngKkoMydocMapper.add(tmpltChild); tmpltMngKkoMydocMapper.add(tmpltChild);
} }
// FIXME: 카카오톡 추가
if (!CmmnUtil.isEmpty(dto.getKkoTalk())) {
TmpltMngKkoTalkMapper mapper = Mappers.getMapper(TmpltMngKkoTalkMapper.class);
TmpltMngKkoTalk tmpltChild = mapper.toEntity(dto.getKkoTalk());
tmpltMngKkoTalkMapper.add(tmpltChild);
}
if (!CmmnUtil.isEmpty(dto.getNvSigntalk())) { if (!CmmnUtil.isEmpty(dto.getNvSigntalk())) {
TmpltMngNvSigntalkMapper mapper = Mappers.getMapper(TmpltMngNvSigntalkMapper.class); TmpltMngNvSigntalkMapper mapper = Mappers.getMapper(TmpltMngNvSigntalkMapper.class);
TmpltMngNvSigntalk tmpltChild = mapper.toEntity(dto.getNvSigntalk()); TmpltMngNvSigntalk tmpltChild = mapper.toEntity(dto.getNvSigntalk());

@ -1,17 +1,16 @@
package cokr.xit.ens.modules.common.ctgy.intgrnnoti.service.support; package cokr.xit.ens.modules.common.ctgy.intgrnnoti.service.support;
import java.util.List; import java.util.*;
import cokr.xit.ens.modules.common.code.PostSeCd; import cokr.xit.ens.modules.common.code.*;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.IntgrnSendDetail; import cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.*;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.domain.IntgrnSendMast; import cokr.xit.ens.modules.common.ctgy.intgrnnoti.service.support.kkoalimtalk.*;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.service.support.kkoalimtalk.AcceptDataByKkoAlimtalk; import cokr.xit.ens.modules.common.ctgy.intgrnnoti.service.support.kkomydoc.*;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.service.support.kkomydoc.AcceptDataByKkoMydoc; import cokr.xit.ens.modules.common.ctgy.intgrnnoti.service.support.kkotalk.*;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.service.support.kkotalk.AcceptDataByKkoTalk; import cokr.xit.ens.modules.common.ctgy.intgrnnoti.service.support.ktGibis.*;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.service.support.ktGibis.AcceptDataByKtGibis; import cokr.xit.ens.modules.common.ctgy.intgrnnoti.service.support.ktSigntalk.*;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.service.support.ktSigntalk.AcceptDataByKtSigntalk; import cokr.xit.ens.modules.common.ctgy.intgrnnoti.service.support.nvsigntalk.*;
import cokr.xit.ens.modules.common.ctgy.intgrnnoti.service.support.nvsigntalk.AcceptDataByNvSigntalk; import lombok.*;
import lombok.RequiredArgsConstructor;
// TODO: Sender에서 call // TODO: Sender에서 call
@RequiredArgsConstructor @RequiredArgsConstructor
@ -28,15 +27,15 @@ public class AcceptDataMakerFactory extends AcceptDataFactory<AcceptData<?>> {
return new AcceptDataByKkoAlimtalk(sendMast, sendDetails, isReserveSend); return new AcceptDataByKkoAlimtalk(sendMast, sendDetails, isReserveSend);
case kkoMydoc: case kkoMydoc:
return new AcceptDataByKkoMydoc(sendMast, sendDetails, isReserveSend); return new AcceptDataByKkoMydoc(sendMast, sendDetails, isReserveSend);
// FIXME: 카카오톡 추가
case kkoTalk:
return new AcceptDataByKkoTalk(sendMast, sendDetails, isReserveSend);
case nvSigntalk: case nvSigntalk:
return new AcceptDataByNvSigntalk(sendMast, sendDetails, isReserveSend); return new AcceptDataByNvSigntalk(sendMast, sendDetails, isReserveSend);
case ktSigntalk: case ktSigntalk:
return new AcceptDataByKtSigntalk(sendMast, sendDetails, isReserveSend); return new AcceptDataByKtSigntalk(sendMast, sendDetails, isReserveSend);
case ktGibis: case ktGibis:
return new AcceptDataByKtGibis(sendMast, sendDetails, isReserveSend); return new AcceptDataByKtGibis(sendMast, sendDetails, isReserveSend);
// FIXME: kkotalk 추가
case kkoTalk:
return new AcceptDataByKkoTalk(sendMast, sendDetails, isReserveSend);
default: default:
throw new IllegalAccessError(postSeCd.getCode() + "에 대한 전자고지 접수 Class가 정의되지 않았습니다."); throw new IllegalAccessError(postSeCd.getCode() + "에 대한 전자고지 접수 Class가 정의되지 않았습니다.");
} }

@ -1,30 +1,27 @@
package cokr.xit.ens.modules.common.ctgy.sys.mng.service.strategy; package cokr.xit.ens.modules.common.ctgy.sys.mng.service.strategy;
import cokr.xit.ens.core.exception.EnsException;
import cokr.xit.ens.core.exception.code.EnsErrCd;
import cokr.xit.ens.modules.common.ctgy.sys.mng.domain.OrgMng;
import cokr.xit.ens.modules.common.ctgy.sys.mng.domain.TmpltMng;
import cokr.xit.ens.modules.common.ctgy.sys.mng.domain.repository.OrgMngRepository;
import cokr.xit.ens.modules.common.ctgy.sys.mng.domain.repository.TmpltMngRepository;
import cokr.xit.ens.modules.common.ctgy.sys.mng.model.TmpltMngDTO;
import cokr.xit.ens.modules.common.ctgy.sys.mng.model.TmpltMngSearchDTO;
import cokr.xit.ens.modules.common.ctgy.sys.mng.model.struct.TmpltMngMapper;
import lombok.RequiredArgsConstructor;
import org.mapstruct.factory.Mappers;
import org.springframework.stereotype.Component;
import javax.validation.ConstraintViolation;
import javax.validation.Validation;
import javax.validation.Validator;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.*;
import javax.validation.*;
import org.mapstruct.factory.*;
import org.springframework.stereotype.*;
import cokr.xit.ens.core.exception.*;
import cokr.xit.ens.core.exception.code.*;
import cokr.xit.ens.modules.common.ctgy.sys.mng.domain.*;
import cokr.xit.ens.modules.common.ctgy.sys.mng.domain.repository.*;
import cokr.xit.ens.modules.common.ctgy.sys.mng.model.*;
import cokr.xit.ens.modules.common.ctgy.sys.mng.model.struct.*;
import lombok.*;
@Component("tmpltMngStrategy_basic") @Component("tmpltMngStrategy_basic")
@RequiredArgsConstructor @RequiredArgsConstructor
public class TmpltMngStrategyBasic extends TmpltMngStrategyTemplate<Map<String, Object>, TmpltMngDTO> { public class TmpltMngStrategyBasic extends TmpltMngStrategyTemplate<Map<String, Object>, TmpltMngDTO> {
private final OrgMngRepository orgMngRepository; private final OrgMngRepository orgMngRepository;
private final TmpltMngRepository tmpltMngRepository; private final TmpltMngRepository tmpltMngRepository;
private TmpltMngMapper kkoMydocMapper = Mappers.getMapper(TmpltMngMapper.class); private TmpltMngMapper tmpltMngMapper = Mappers.getMapper(TmpltMngMapper.class);
// private final RedisTemplate redisTemplate; // private final RedisTemplate redisTemplate;
public List<TmpltMngDTO> findAll(TmpltMngSearchDTO tmpltMngSearchDTO) { public List<TmpltMngDTO> findAll(TmpltMngSearchDTO tmpltMngSearchDTO) {
@ -67,7 +64,7 @@ public class TmpltMngStrategyBasic extends TmpltMngStrategyTemplate<Map<String,
throw new EnsException(EnsErrCd.ERR540, String.format("이미 등록된 템플릿코드[기관코드 %s 템플릿코드 %s] 입니다.", tmpltMng.getOrgMng().getOrgCd(), tmpltMng.getTmpltCd())); throw new EnsException(EnsErrCd.ERR540, String.format("이미 등록된 템플릿코드[기관코드 %s 템플릿코드 %s] 입니다.", tmpltMng.getOrgMng().getOrgCd(), tmpltMng.getTmpltCd()));
}); });
TmpltMng tmpltMng = kkoMydocMapper.toEntity(dto); TmpltMng tmpltMng = tmpltMngMapper.toEntity(dto);
tmpltMng.setOrgMng(orgMng); tmpltMng.setOrgMng(orgMng);
tmpltMng.setRegistId("ENS_SYS"); tmpltMng.setRegistId("ENS_SYS");
tmpltMngRepository.save(tmpltMng); tmpltMngRepository.save(tmpltMng);
@ -77,7 +74,7 @@ public class TmpltMngStrategyBasic extends TmpltMngStrategyTemplate<Map<String,
protected void modifyProc(TmpltMngDTO tmpltMngDTO) { protected void modifyProc(TmpltMngDTO tmpltMngDTO) {
TmpltMng tmpltMng = tmpltMngRepository.findFetchByOrgCdAndTmpltCd((tmpltMngDTO).getOrgCd(), (tmpltMngDTO).getTmpltCd()) TmpltMng tmpltMng = tmpltMngRepository.findFetchByOrgCdAndTmpltCd((tmpltMngDTO).getOrgCd(), (tmpltMngDTO).getTmpltCd())
.orElseThrow(() -> new EnsException(EnsErrCd.ERR404, String.format("기관코드(%s) 및 템플릿코드(%s)가 일치하는 자료가 없습니다.", tmpltMngDTO.getOrgCd(), tmpltMngDTO.getTmpltCd()))); .orElseThrow(() -> new EnsException(EnsErrCd.ERR404, String.format("기관코드(%s) 및 템플릿코드(%s)가 일치하는 자료가 없습니다.", tmpltMngDTO.getOrgCd(), tmpltMngDTO.getTmpltCd())));
kkoMydocMapper.updateFromDto(tmpltMngDTO, tmpltMng); tmpltMngMapper.updateFromDto(tmpltMngDTO, tmpltMng);
tmpltMng.setUpdId("ENS_SYS"); tmpltMng.setUpdId("ENS_SYS");
// super.deleteCache(redisTemplate, tmpltMngDTO.getOrgCd(), tmpltMngDTO.getTmpltCd()); // super.deleteCache(redisTemplate, tmpltMngDTO.getOrgCd(), tmpltMngDTO.getTmpltCd());

@ -19,7 +19,6 @@ import cokr.xit.ens.modules.common.domain.*;
import cokr.xit.ens.modules.common.domain.repository.*; import cokr.xit.ens.modules.common.domain.repository.*;
import cokr.xit.ens.modules.common.domain.support.*; import cokr.xit.ens.modules.common.domain.support.*;
import cokr.xit.ens.modules.kkomydoc.domain.*; import cokr.xit.ens.modules.kkomydoc.domain.*;
import cokr.xit.ens.modules.kkomydoc.domain.repository.*;
import cokr.xit.ens.modules.kkotalk.model.*; import cokr.xit.ens.modules.kkotalk.model.*;
import cokr.xit.ens.modules.kkotalk.service.support.*; import cokr.xit.ens.modules.kkotalk.service.support.*;
import lombok.*; import lombok.*;
@ -40,7 +39,7 @@ public class KkoTalkService {
private final KkoTalkApiService kkoTalkApi; private final KkoTalkApiService kkoTalkApi;
private final SendMastRepository sendMastRepository; private final SendMastRepository sendMastRepository;
private final SendDetailKkoMydocTokenHistRepository sendDetailKkoMydocTokenHistRepository; private final SendDetailKkoTalkTokenHistRepository sendDetailKkoTalkTokenHistRepository;
private final OrgMngService orgMngService; private final OrgMngService orgMngService;
@ -241,8 +240,8 @@ public class KkoTalkService {
try { try {
SendMast sendMast = sendMastRepository.findById(sendMastId) SendMast sendMast = sendMastRepository.findById(sendMastId)
.orElseThrow(() -> new EnsException(EnsErrCd.RSLT404, "일치하는 자료가 없습니다.")); .orElseThrow(() -> new EnsException(EnsErrCd.RSLT404, "일치하는 자료가 없습니다."));
if (!PostSeCd.kkoMydoc.equals(sendMast.getPostSe())) if (!PostSeCd.kkoTalk.equals(sendMast.getPostSe()))
throw new EnsException(EnsErrCd.RSLT404, String.format("%s 자료가 아닙니다.", PostSeCd.kkoMydoc.getCodeNm())); throw new EnsException(EnsErrCd.RSLT404, String.format("%s 자료가 아닙니다.", PostSeCd.kkoTalk.getCodeNm()));
if (!Arrays.asList(StatCd.sendok, StatCd.sendcmplt, StatCd.open).stream() if (!Arrays.asList(StatCd.sendok, StatCd.sendcmplt, StatCd.open).stream()
.anyMatch(statCd -> statCd.equals(sendMast.getStatCd()))) .anyMatch(statCd -> statCd.equals(sendMast.getStatCd())))
throw new EnsException(EnsErrCd.RSLT404, "전송성공/전송완료/열람중(sendok/sendcmplt/open) 단계가 아닙니다."); throw new EnsException(EnsErrCd.RSLT404, "전송성공/전송완료/열람중(sendok/sendcmplt/open) 단계가 아닙니다.");
@ -263,7 +262,7 @@ public class KkoTalkService {
*/ */
@Transactional(propagation = Propagation.SUPPORTS) @Transactional(propagation = Propagation.SUPPORTS)
public EnsResponseVO<?> statBulkAll() { public EnsResponseVO<?> statBulkAll() {
List<Long> sendMastIds = sendMastRepository.findAllByPostSeAndStatCdIn(PostSeCd.kkoMydoc, Arrays.asList(StatCd.sendok, StatCd.sendcmplt, StatCd.open)) List<Long> sendMastIds = sendMastRepository.findAllByPostSeAndStatCdIn(PostSeCd.kkoTalk, Arrays.asList(StatCd.sendok, StatCd.sendcmplt, StatCd.open))
.stream() .stream()
.map(row -> row.getSendMastId()) .map(row -> row.getSendMastId())
.collect(Collectors.toList()); .collect(Collectors.toList());
@ -367,7 +366,7 @@ public class KkoTalkService {
} finally { } finally {
if (EnsErrCd.OK.equals(responseVO.getErrCode())) { if (EnsErrCd.OK.equals(responseVO.getErrCode())) {
Map<String, Object> resultInfo = (Map<String, Object>) responseVO.getResultInfo(); Map<String, Object> resultInfo = (Map<String, Object>) responseVO.getResultInfo();
sendDetailKkoMydocTokenHistRepository.save(SendDetailKkoMydocTokenHist.builder() sendDetailKkoTalkTokenHistRepository.save(SendDetailKkoMydocTokenHist.builder()
.externalDocumentUuid(externalDocumentUuid) .externalDocumentUuid(externalDocumentUuid)
.documentBinderUuid(envelopId) .documentBinderUuid(envelopId)
.token(token) .token(token)
@ -381,7 +380,7 @@ public class KkoTalkService {
.signedAt((String) resultInfo.get("signed_at")) .signedAt((String) resultInfo.get("signed_at"))
.build()); .build());
} else { } else {
sendDetailKkoMydocTokenHistRepository.save(SendDetailKkoMydocTokenHist.builder() sendDetailKkoTalkTokenHistRepository.save(SendDetailKkoTalkTokenHist.builder()
.externalDocumentUuid(externalDocumentUuid) .externalDocumentUuid(externalDocumentUuid)
.documentBinderUuid(envelopId) .documentBinderUuid(envelopId)
.token(token) .token(token)

@ -129,6 +129,10 @@ xit:
kkomd: kkomd:
url: ${xit.app.url}${xit.app.ctx} url: ${xit.app.url}${xit.app.ctx}
path: /kko/mydoc/page/prnt path: /kko/mydoc/page/prnt
# //FIXME: 카카오톡 추가
kkotalk:
url: ${xit.app.url}${xit.app.ctx}
path: /kko/mydoc/page/prnt
nvst: nvst:
url: ${xit.app.url}${xit.app.ctx} url: ${xit.app.url}${xit.app.ctx}
path: /nv/signtalk/page/prnt path: /nv/signtalk/page/prnt
@ -172,10 +176,3 @@ springdoc:
# group-configs[2]: # group-configs[2]:
# group: 카카오페이-청구서 # group: 카카오페이-청구서
# paths-to-match: /kakao/** # paths-to-match: /kakao/**

Loading…
Cancel
Save