fix : 처리상태변경이력 테이블 변경

main
이범준 1 year ago
parent 936eadace7
commit e4a4a728f6

@ -416,15 +416,11 @@ public class RtDTO {
/**
*
*/
private String histSn;
private String sttsHstryId;
/**
*
*/
private String crdnSttsCd;
/**
*
*/
private String changePosblYn;
/**
*
*/

@ -40,7 +40,7 @@ public interface RtCrackdownMgtMapper {
//-----------------------------------------------------
// 상태변경이력 : tb_rt_process_sttus_change_hist
// 상태변경이력 : tb_crdn_stts_hstry
//-----------------------------------------------------
void insertRtProcessSttsChangeHist(final RtDTO.SttusChangeHist dto);

@ -328,11 +328,11 @@
<select id="selectProcessSttusChangeHist" resultType="kr.xit.fims.biz.rt.RtDTO$SttusChangeHist">
/* cmm-fims-crackdown-mysql-mapper|selectProcessSttusChangeHist-단속자료 변경 이력 조회|julim */
SELECT hist_sn
SELECT stts_hstry_id
, crdn_stts_cd
, reg_dt
, etc_cn
FROM tb_rt_process_sttus_change_hist
FROM tb_crdn_stts_hstry
WHERE crdn_id = #{crdnId}
</select>

@ -425,26 +425,24 @@
<!-- *************************************************************************************************************
* tb_rt_process_sttus_change_hist : 처리상태변경이력
* tb_crdn_stts_hstry : 처리상태변경이력
************************************************************************************************************** -->
<insert id="insertRtProcessSttsChangeHist">
/* rt-reglt-and-erpp-mysql-mapper|insertRtProcessSttsChangeHist-처리상태변경이력 등록|julim */
INSERT
INTO tb_rt_process_sttus_change_hist (
INTO tb_crdn_stts_hstry (
crdn_id
, hist_sn
, stts_hstry_id
, crdn_stts_cd
, change_posbl_yn
, etc_cn
, reg_dt
, rgtr
) VALUES (
#{crdnId}
, (SELECT LPAD(IFNULL(MAX(CAST(tgt.hist_sn AS UNSIGNED)) + 1, 1), 2, '0')
FROM tb_rt_process_sttus_change_hist tgt
, (SELECT LPAD(IFNULL(MAX(CAST(tgt.stts_hstry_id AS UNSIGNED)) + 1, 1), 2, '0')
FROM tb_crdn_stts_hstry tgt
WHERE tgt.crdn_id = #{crdnId})
, #{crdnSttsCd}
, #{changePosblYn}
, #{etcCn}
, DATE_FORMAT(NOW(), '%Y%m%d%H%i%s')
, #{rgtr}

Loading…
Cancel
Save