|
|
|
@ -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(),
|
|
|
|
|