행위정보 삭제 시, 강제이행금산출 정보 체크 후 삭제 가능하도록변경

dev
박성영 3 months ago
parent b523ad335b
commit 8d1fd0c07c

@ -88,4 +88,6 @@ public interface CrdnActInfoMapper {
List<CrdnActInfoVO> existsActInfoList(List<String> pstnInfoIds);
int existsLevyInfoList(List<String> pstnInfoIds);
}

@ -200,6 +200,13 @@ public class CrdnActInfoServiceImpl extends EgovAbstractServiceImpl implements C
throw new MessageException("행위자 정보 삭제 후 불법행위정보를 삭제 할 수 있습니다.");
}
int checkLevyCount = mapper.existsLevyInfoList(actInfoIds);
if( checkLevyCount > 0 ) {
throw new MessageException("이미 등록된 강제이행금산출 정보가 있습니다. \n부과예고에서 강제이행금산출 정보 삭제 후 불법행위정보를 삭제 할 수 있습니다.");
}
// 중요한 로직 주석: 각 행위정보 ID에 대해 유효성 검증 후 논리 삭제 수행
int deletedCount = 0;
for (String actInfoId : actInfoIds) {

@ -327,4 +327,16 @@
AND DEL_YN = 'N'
</select>
<!-- 삭제 전 count 체크 -->
<select id="existsLevyInfoList" parameterType="List" resultType="int">
/* ActrInfoMapper.existsLevyInfoList 삭제 전 count 체크 */
SELECT count(*)
FROM tb_levy_info
WHERE ACT_INFO_ID IN
<foreach collection="list" item="item" separator="," open="(" close=")">
#{item}
</foreach>
AND DEL_YN = 'N'
</select>
</mapper>
Loading…
Cancel
Save