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 66efdc1..43a641f 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 @@ -8,7 +8,6 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Set; -import java.util.UUID; import javax.transaction.Transactional; import javax.validation.ConstraintViolation; import javax.validation.Validation; @@ -96,12 +95,7 @@ public class CmmEnsFileService extends EgovAbstractServiceImpl implements ICmmEn List rslts = getConvertCis(fileReq, fmcExcels); // CNTC 테이블 insert - String msg = makeCntc(rslts, fmcExcels, fileReq); - - fileReq.setSndngCo(fmcExcels.size()); - fileReq.setUnitySndngMastrId(UUID.randomUUID().toString().replaceAll("-", "")); - - return msg; + return makeCntc(rslts, fmcExcels, fileReq); } private List parsingFmcExcel(MultipartFile mf) { @@ -266,6 +260,8 @@ public class CmmEnsFileService extends EgovAbstractServiceImpl implements ICmmEn ); } } + fileReq.setSndngCo(fmcExcels.size()); + if(fmcExcels.size() != rslts.size()) throw BizRuntimeException.create( String.format( "CI 전환 오류 %s[변환대상-%d건, 변환완료-%d건, 변환오류-%d건]", @@ -304,6 +300,7 @@ public class CmmEnsFileService extends EgovAbstractServiceImpl implements ICmmEn //최초 1회 CNTC master 생성 if(StringUtils.isNotEmpty(dto.getUnitySndngMastrId()) && mst == 0){ unitySndngMastrId = dto.getUnitySndngMastrId(); + fileReq.setUnitySndngMastrId(unitySndngMastrId); mapper.insertCntcSndngMst( CntcDTO.SndngMst.builder() .unitySndngMastrId(dto.getUnitySndngMastrId())