diff --git a/mens-api/src/main/java/kr/xit/biz/cmm/mapper/ICmmEnsFileMapper.java b/mens-api/src/main/java/kr/xit/biz/cmm/mapper/ICmmEnsFileMapper.java new file mode 100644 index 0000000..ed3f89b --- /dev/null +++ b/mens-api/src/main/java/kr/xit/biz/cmm/mapper/ICmmEnsFileMapper.java @@ -0,0 +1,27 @@ +package kr.xit.biz.cmm.mapper; + +import kr.xit.biz.ens.model.cmm.CmmEnsFileInfDTO; +import kr.xit.biz.ens.model.cntc.CntcDTO; +import org.egovframe.rte.psl.dataaccess.mapper.Mapper; + +/** + *
+ * description : 전자고지 File mapper + * + * packageName : kr.xit.biz.cmm.mapper + * fileName : ICmmEnsFileMapper + * author : seojh + * date : 2023-10-19 + * ====================================================================== + * 변경일 변경자 변경 내용 + * ---------------------------------------------------------------------- + * 2023-10-19 seojh 최초 생성 + * + *+ */ +@Mapper +public interface ICmmEnsFileMapper { + int insertCntcSndngMst(CntcDTO.SndngMst dto); + int insertCntcSndngDtl(CntcDTO.SndngDtl dto); + int insertCi(CmmEnsFileInfDTO.FmcInfExcelRslt dto); +} diff --git a/mens-api/src/main/java/kr/xit/biz/cmm/service/CmmEnsFileService.java b/mens-api/src/main/java/kr/xit/biz/cmm/service/CmmEnsFileService.java index ee679b7..05af6ad 100644 --- a/mens-api/src/main/java/kr/xit/biz/cmm/service/CmmEnsFileService.java +++ b/mens-api/src/main/java/kr/xit/biz/cmm/service/CmmEnsFileService.java @@ -12,13 +12,18 @@ import javax.transaction.Transactional; import javax.validation.ConstraintViolation; import javax.validation.Validation; import javax.validation.Validator; + +import kr.xit.biz.cmm.mapper.ICmmEnsFileMapper; +import kr.xit.biz.common.ApiConstants; import kr.xit.biz.ens.model.cmm.CmmEnsFileInfDTO.FmcExcelUpload; import kr.xit.biz.ens.model.cmm.CmmEnsFileInfDTO.FmcInfExcel; import kr.xit.biz.ens.model.cmm.CmmEnsFileInfDTO.FmcInfExcelRslt; +import kr.xit.biz.ens.model.cntc.CntcDTO; import kr.xit.biz.ens.model.nice.NiceCiDTO.IpinCiResEncData; import kr.xit.biz.ens.model.nice.NiceCiDTO.NiceCiRequest; import kr.xit.core.exception.BizRuntimeException; import kr.xit.core.spring.util.ApiWebClientUtil; +import kr.xit.core.support.utils.Checks; import kr.xit.core.support.xlsx.StreamingReader; import kr.xit.ens.nice.service.INiceCiService; import lombok.RequiredArgsConstructor; @@ -29,6 +34,9 @@ import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl; import org.springframework.stereotype.Service; import org.springframework.web.multipart.MultipartFile; +import static egovframework.com.cmm.util.EgovDateUtil.formatDate; +import static egovframework.com.cmm.util.EgovDateUtil.formatTime; + /** *
* description : @@ -53,6 +61,8 @@ public class CmmEnsFileService extends EgovAbstractServiceImpl implements ICmmEn private final INiceCiService niceCiService; + private final ICmmEnsFileMapper mapper; + private final ApiWebClientUtil webClient; private static final Validator validator = Validation.buildDefaultValidatorFactory().getValidator(); @@ -75,7 +85,7 @@ public class CmmEnsFileService extends EgovAbstractServiceImpl implements ICmmEn List*/ - private String makeCntc(final Listrslts = getConvertCis(fileReq, fmcExcels); // TODO :: CNTC 테이블 insert - String msg = makeCntc(rslts); + String msg = makeCntc(rslts, fmcExcels, fileReq.getRegister()); @@ -262,17 +272,45 @@ public class CmmEnsFileService extends EgovAbstractServiceImpl implements ICmmEn * @return String *
* description : 전자고지 파일 연계 DTO @@ -46,27 +51,35 @@ public class CmmEnsFileInfDTO { * 시스템구분코드 : 필수 * 공영주차장|장사시설 */ - @Schema(requiredMode = RequiredMode.REQUIRED, title = "시스템구분코드", example = "???", description = "시스템구분코드") - @NotEmpty(message = "시스템 구분은 필수 입니다") - @Size(max = 5) - private String sysSeCode; +// @Schema(requiredMode = RequiredMode.REQUIRED, title = "시스템구분코드", example = "???", description = "시스템구분코드") +// @NotEmpty(message = "시스템 구분은 필수 입니다") +// @Size(max = 5) +// private String sysSeCode; /** * 발송구분코드 : 필수 * KKO-MY-DOC|KT-SMS|E-GREEN */ - @Schema(requiredMode = RequiredMode.REQUIRED, title = "발송구분코드", example = "KKO-MY-DOC", description = "KKO-MY-DOC|KT-SMS|E-GREEN") - @NotEmpty(message = "발송구분은 필수 입니다") - @Size(max = 10) - private String sndngSeCode; +// @Schema(requiredMode = RequiredMode.REQUIRED, title = "발송구분코드", example = "KKO-MY-DOC", description = "KKO-MY-DOC|KT-SMS|E-GREEN") +// @NotEmpty(message = "발송구분은 필수 입니다") +// @Size(max = 10) +// private String sndngSeCode; /** * 발송일시 : 필수 * 전자문서를 발송할 일시 - yyyyMMdd */ - @Schema(requiredMode = RequiredMode.REQUIRED, title = "발송일시", example = "20230905", description = "발송일시") - @Size(min = 8, max = 8, message = "발송일은 필수 입니다") - private String sndngDt; +// @Schema(requiredMode = RequiredMode.REQUIRED, title = "발송일시", example = "20230905", description = "발송일시") +// @Size(min = 8, max = 8, message = "발송일은 필수 입니다") +// private String sndngDt; + + /** + * 등록자 : 필수 + * 전자문서를 발송할 일시 - yyyyMMdd + */ + @Schema(requiredMode = RequiredMode.REQUIRED, title = "등록자", example = "userid", description = "등록자") + @Size(message = "등록자는 필수 입니다") + private String register; /** * excel file : 필수 @@ -511,5 +524,16 @@ public class CmmEnsFileInfDTO { */ @Schema(requiredMode = RequiredMode.REQUIRED, title = "message") private String message; + + /** + * 등록 일시 + */ + @JsonDeserialize(using = LocalDateDeserializer.class) + @JsonFormat(pattern = "yyyy-MM-dd kk:mm:ss") + private LocalDateTime registDt; + /** + * 등록자 + */ + private String register; } } diff --git a/mens-batch/src/main/java/kr/xit/biz/ens/model/CntcDTO.java b/mens-core/src/main/java/kr/xit/biz/ens/model/cntc/CntcDTO.java similarity index 94% rename from mens-batch/src/main/java/kr/xit/biz/ens/model/CntcDTO.java rename to mens-core/src/main/java/kr/xit/biz/ens/model/cntc/CntcDTO.java index 0e000a1..b4f0d3b 100644 --- a/mens-batch/src/main/java/kr/xit/biz/ens/model/CntcDTO.java +++ b/mens-core/src/main/java/kr/xit/biz/ens/model/cntc/CntcDTO.java @@ -1,12 +1,14 @@ -package kr.xit.biz.ens.model; +package kr.xit.biz.ens.model.cntc; -import java.io.Serializable; - -import kr.xit.core.biz.model.AuditFields; -import kr.xit.biz.ens.model.kakao.KkopayDocBulkDTO; -import lombok.*; +import kr.xit.biz.common.AuditFields; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; import lombok.experimental.SuperBuilder; +import java.io.Serializable; + /** ** description : tb_cntc_ Entity DTO @@ -143,6 +145,11 @@ public class CntcDTO { * 외부 문서 식별 번호 */ private String externalDocumentUuid; + + /** + * 템플릿 ID + */ + private String tmplatId; } @Data