feat: profile config 반영

dev
gitea-관리자 1 year ago
parent 113170e357
commit 841c08dc48

@ -1,6 +1,8 @@
package kr.xit.biz.cmm.mapper;
import java.util.Optional;
import kr.xit.biz.ens.model.cmm.CmmEnsFileInfDTO;
import kr.xit.biz.ens.model.cmm.CmmEnsRequestDTO;
import kr.xit.biz.ens.model.cntc.CntcDTO;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
@ -21,6 +23,7 @@ import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
*/
@Mapper
public interface ICmmEnsFileMapper {
Optional<CmmEnsRequestDTO> findDeptInfoByTmplId(final String tmplatId);
int insertCntcSndngMst(CntcDTO.SndngMst dto);
int insertCntcSndngDtl(CntcDTO.SndngDtl dto);
int insertCi(CmmEnsFileInfDTO.FmcInfExcelRslt dto);

@ -19,6 +19,7 @@ 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.cmm.CmmEnsRequestDTO;
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;
@ -82,8 +83,13 @@ public class CmmEnsFileService extends EgovAbstractServiceImpl implements ICmmEn
final List<FmcInfExcel> fmcExcels = parsingFmcExcel(fileReq.getFiles()[0]);
CmmEnsRequestDTO tmpDTO = mapper.findDeptInfoByTmplId(
fmcExcels.get(0).getTmplatId())
.orElseThrow(() -> BizRuntimeException.create("템플릿 정보를 찾을 수 없습니다."));
// TODO :: CI 변환
// Ci 변환
fileReq.setSignguCode(tmpDTO.getSignguCode());
fileReq.setFfnlgCode(tmpDTO.getFfnlgCode());
List<FmcInfExcelRslt> rslts = getConvertCis(fileReq, fmcExcels);
// TODO :: CNTC 테이블 insert
@ -279,6 +285,14 @@ public class CmmEnsFileService extends EgovAbstractServiceImpl implements ICmmEn
int errCnt = 0;
final int excelCnt = fmcExcels.size();
String unitySndngMastrId = "";
for(FmcInfExcelRslt dto : rslts){
if(StringUtils.isEmpty(String.join("", dto.getCi1(), dto.getCi2()))){
errCnt++;
}
mapper.insertCi(dto);
}
for(FmcInfExcel dto : fmcExcels){
//최초 1회 CNTC master 생성
if(StringUtils.isNotEmpty(dto.getUnitySndngMastrId()) && mst == 0){
@ -310,13 +324,6 @@ public class CmmEnsFileService extends EgovAbstractServiceImpl implements ICmmEn
);
}
for(FmcInfExcelRslt dto : rslts){
if(StringUtils.isNotEmpty(dto.getCode())){
errCnt++;
}
mapper.insertCi(dto);
}
return String.format(
"전자고지 대상 %d건 Upload[완료-%d건, 오류-%d건]",
rslts.size(),

@ -81,7 +81,7 @@ public class MobilePageController {
.accessToken(token)
.build();
if(uri.contains("me_mblPage")){
if(uri.contains("meMblPage")){
cfmReqDTO.setSignguCode(SignguCode.FUNERAL.getCode());
}
return ApiResponseDTO.success(service.findKtMblPage(cfmReqDTO));

@ -2,6 +2,13 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="kr.xit.biz.cmm.mapper.ICmmEnsFileMapper">
<select id="findDeptInfoByTmplId" resultType="kr.xit.biz.ens.model.cmm.CmmEnsRequestDTO">
/** ens-cmm-file-mysql-mapper|findDeptInfoByTmplId-템플릿ID로 부서정보 조회|seojh */
SELECT tetm.signgu_code
, tetm.ffnlg_code
FROM tb_ens_tmplat_manage tetm
WHERE tmplat_id = #{tmplatId}
</select>
<insert id="insertCntcSndngMst">
/** ens-cmm-file-mysql-mapper|insertCntcSndngMst-연계발송마스터 생성|seojh */

@ -106,6 +106,7 @@ public class CmmEnsFileInfDTO {
*/
@Schema(requiredMode = RequiredMode.AUTO, title = "통합발송마스터ID", example = "0", description = "통합발송마스터ID")
private String unitySndngMastrId;
}
@Schema(name = "FmcInfExcel", description = "시설관리공단 전자문서 발송대상 엑셀 파일 interface DTO")

@ -32,8 +32,8 @@ public class ErrorParse {
String message = Checks.isNotNull(e) ? e.getLocalizedMessage() : StringUtils.EMPTY;
HttpStatus httpStatus = null;
if(e instanceof BizRuntimeException) {
BizRuntimeException be = (BizRuntimeException)e;
if(e instanceof BizRuntimeException be) {
//BizRuntimeException be = (BizRuntimeException)e;
return ApiResponseDTO.error(be.getCode(), be.getMessage(), HttpStatus.BAD_REQUEST);
}

Loading…
Cancel
Save