From 2e32f9d765051dfa1bdd6b543eda401d1387ee65 Mon Sep 17 00:00:00 2001 From: jhseo Date: Tue, 12 Mar 2024 15:36:28 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20cntc=20=EC=82=AD=EC=A0=9C=20=EC=8B=9C=20?= =?UTF-8?q?ci=20=EC=9E=90=EB=A3=8C=20=EC=82=AD=EC=A0=9C=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/kr/xit/biz/sisul/mapper/IBizSisulMapper.java | 1 + .../java/kr/xit/biz/sisul/service/BizSisulService.java | 2 ++ .../egovframework/mapper/biz/ens-sisul-mysql-mapper.xml | 7 +++++++ 3 files changed, 10 insertions(+) diff --git a/mens-api/src/main/java/kr/xit/biz/sisul/mapper/IBizSisulMapper.java b/mens-api/src/main/java/kr/xit/biz/sisul/mapper/IBizSisulMapper.java index de6d205..4755dc6 100644 --- a/mens-api/src/main/java/kr/xit/biz/sisul/mapper/IBizSisulMapper.java +++ b/mens-api/src/main/java/kr/xit/biz/sisul/mapper/IBizSisulMapper.java @@ -42,6 +42,7 @@ public interface IBizSisulMapper { int insertCntcMst(CntcDTO.SndngMst dto); int insertCntcDetail(CntcDTO.SndngMst dto); + int deleteCi(CntcDTO.SndngMst dto); int deleteCntcMst(CntcDTO.SndngMst dto); int deleteCntcDetail(CntcDTO.SndngMst dto); } diff --git a/mens-api/src/main/java/kr/xit/biz/sisul/service/BizSisulService.java b/mens-api/src/main/java/kr/xit/biz/sisul/service/BizSisulService.java index c6411d5..57ce198 100644 --- a/mens-api/src/main/java/kr/xit/biz/sisul/service/BizSisulService.java +++ b/mens-api/src/main/java/kr/xit/biz/sisul/service/BizSisulService.java @@ -1253,6 +1253,8 @@ public class BizSisulService extends AbstractService implements IBizSisulService if(ApiConstants.SndngProcessStatus.ACCEPT.getCode().equals(cntcDto.getSndngProcessSttus())){ if(mapper.insertCntcMst(cntcDto) < 1) throw BizRuntimeException.create("접수 정보 백업(마스터) 실패"); if(mapper.deleteCntcMst(cntcDto) < 1) throw BizRuntimeException.create("접수 원본 삭제(마스터) 실패"); + //CI가 없을 경우 오류 안 생기도록 처리 + mapper.deleteCi(cntcDto); if(mapper.insertCntcDetail(cntcDto) < 1) throw BizRuntimeException.create("접수 정보 백업(상세) 실패"); if(mapper.deleteCntcDetail(cntcDto) < 1) throw BizRuntimeException.create("접수 정보 삭제(상세) 실패"); diff --git a/mens-api/src/main/resources/egovframework/mapper/biz/ens-sisul-mysql-mapper.xml b/mens-api/src/main/resources/egovframework/mapper/biz/ens-sisul-mysql-mapper.xml index dd41479..4781e1c 100644 --- a/mens-api/src/main/resources/egovframework/mapper/biz/ens-sisul-mysql-mapper.xml +++ b/mens-api/src/main/resources/egovframework/mapper/biz/ens-sisul-mysql-mapper.xml @@ -273,6 +273,13 @@ WHERE unity_sndng_mastr_id = #{unitySndngMastrId} + + DELETE FROM tb_ens_ci + WHERE unity_sndng_detail_id in ( + SELECT unity_sndng_detail_id from tb_cntc_sndng_detail WHERE unity_sndng_mastr_id = #{unitySndngMastrId} + ) + + DELETE FROM tb_cntc_sndng_mastr WHERE unity_sndng_mastr_id = #{unitySndngMastrId}