feat: 접수실패(accept-fail) 자료 삭제 기능 추가

main
jhseo 7 months ago
parent 8b0465fc8b
commit 1d67de6931

@ -1265,7 +1265,9 @@ public class BizSisulService extends AbstractService implements IBizSisulService
String rtnMsg = "";
final CntcDTO.SndngMst cntcDto = mapper.selectCntcMst(dto)
.orElseThrow(() -> BizRuntimeException.create("접수 정보를 찾을 수 없습니다."));
if(ApiConstants.SndngProcessStatus.ACCEPT.getCode().equals(cntcDto.getSndngProcessSttus())){
if(ApiConstants.SndngProcessStatus.ACCEPT.getCode().equals(cntcDto.getSndngProcessSttus()) ||
ApiConstants.SndngProcessStatus.ACCEPT_FAIL.getCode().equals(cntcDto.getSndngProcessSttus())
){
if(mapper.insertCntcMst(cntcDto) < 1) throw BizRuntimeException.create("접수 정보 백업(마스터) 실패");
if(mapper.deleteCntcMst(cntcDto) < 1) throw BizRuntimeException.create("접수 원본 삭제(마스터) 실패");
//CI가 없을 경우 오류 안 생기도록 처리

@ -193,7 +193,7 @@
, sndng_process_sttus as sndngProcessSttus
FROM tb_cntc_sndng_mastr
WHERE unity_sndng_mastr_id = #{unitySndngMastrId}
AND sndng_process_sttus = 'accept'
AND sndng_process_sttus in ('accept', 'accept-fail')
</select>
<insert id="insertCntcMst">
@ -227,7 +227,7 @@
tcsm.register
from tb_cntc_sndng_mastr tcsm
WHERE tcsm.unity_sndng_mastr_id = #{unitySndngMastrId}
AND tcsm.sndng_process_sttus = 'accept'
AND tcsm.sndng_process_sttus in ('accept', 'accept-fail')
</insert>
<insert id="insertCntcDetail">
@ -283,7 +283,7 @@
<delete id="deleteCntcMst">
DELETE FROM tb_cntc_sndng_mastr
WHERE unity_sndng_mastr_id = #{unitySndngMastrId}
AND sndng_process_sttus = 'accept'
AND sndng_process_sttus in ('accept', 'accept-fail')
</delete>
<delete id="deleteCntcDetail">

Loading…
Cancel
Save