From 88d32ee876f214e79bd5cc39619ae903fe8ca7a7 Mon Sep 17 00:00:00 2001 From: minuk926 Date: Wed, 27 Apr 2022 19:32:54 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EA=B1=B0=EC=A3=BC=EC=9E=90/=EC=9E=A5?= =?UTF-8?q?=EC=95=A0=EC=9D=B8=20=EC=9E=90=EB=A3=8C=EB=B3=80=EA=B2=BD=20?= =?UTF-8?q?=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/ResidentAndDisabledService.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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); }