diff --git a/src/main/java/com/xit/biz/ctgy/service/impl/ResidentAndDisabledService.java b/src/main/java/com/xit/biz/ctgy/service/impl/ResidentAndDisabledService.java index 2a3b212..33fe2d0 100644 --- a/src/main/java/com/xit/biz/ctgy/service/impl/ResidentAndDisabledService.java +++ b/src/main/java/com/xit/biz/ctgy/service/impl/ResidentAndDisabledService.java @@ -96,9 +96,15 @@ public class ResidentAndDisabledService implements IResidentAndDisabledService { setFileInfoAndFileUpload(dto, dto.getContadFiles(), "setScContad"); } - // 접수번호 채번 : 년도 + seq 10자리 - dto.setScSeq(gnReacallRepository.getGnRecallScMaxScSeq(String.valueOf(DateUtil.getCurrentYear()), CtgyConstants.Judge.DATAGB_RESIDENT.getCode())); - GnRecallSc entity = mapstruct.toEntity(dto); + GnRecallSc entity = null; + // 신규 + if (Checks.isEmpty(dto.getScCode()) || dto.getScCode() == 0L) { + // 접수번호 채번 : 년도 + seq 10자리 + dto.setScSeq(gnReacallRepository.getGnRecallScMaxScSeq(String.valueOf(DateUtil.getCurrentYear()), CtgyConstants.Judge.DATAGB_RESIDENT.getCode())); + entity = mapstruct.toEntity(dto); + }else{ + entity = mapstruct.toEntity(dto); + } gnReacallRepository.save(entity); }