feat: 서울시설공단 DB 컬럼 추가 관련 수정

main
kjh 10 months ago
parent 28f1ccf4f7
commit 56d71880d9

@ -46,12 +46,13 @@ public class OtherService extends AbstractService implements IOtherService {
for(Elecnoticedtl dto: ohterResult){ for(Elecnoticedtl dto: ohterResult){
Elecnoticedtl elecnoticedtl = mapper.selectElecnotice(dto); Elecnoticedtl elecnoticedtl = mapper.selectElecnotice(dto);
if(elecnoticedtl == null if((Checks.isEmpty(elecnoticedtl))
|| (elecnoticedtl != null && !Checks.checkVal(dto.getSndngprocesssttus(),"").equals(Checks.checkVal(elecnoticedtl.getSndngprocesssttus(),""))) || (Checks.isEmpty(elecnoticedtl.getSndngprocesssttus()))
|| (Checks.isNotEmpty(elecnoticedtl) && !Checks.checkVal(dto.getSndngprocesssttus(),"").equals(Checks.checkVal(elecnoticedtl.getSndngprocesssttus(),"")))
){ ){
mapper.saveElecnoticemst(dto); mapper.saveElecnoticemst(dto);
mapper.saveElecnoticedtl(dto); mapper.saveElecnoticedtl(dto);
} else if (!Checks.checkVal(dto.getResultcode(),""). equals(Checks.checkVal(elecnoticedtl.getResultcode(),""))) { } else if ((Checks.isEmpty(elecnoticedtl.getResultcode())) || (!Checks.checkVal(dto.getResultcode(),""). equals(Checks.checkVal(elecnoticedtl.getResultcode(),"")))) {
mapper.saveElecnoticedtl(dto); mapper.saveElecnoticedtl(dto);
} }
} }

@ -165,9 +165,7 @@
, 'ens' as upduser , 'ens' as upduser
, date_format(tcsm.updt_dt, '%Y%m%d%H%i%S') as upddate , date_format(tcsm.updt_dt, '%Y%m%d%H%i%S') as upddate
, tcsm.sndng_dt as sndngdt , tcsm.sndng_dt as sndngdt
, CASE WHEN tcsm.signgu_code = '88328' THEN SUBSTRING(tcsm.tmplat_id, 3,1) /* 교통시설운영처 */ , fn_get_code_nm('ETI005', SUBSTRING(tcsm.tmplat_id, 5,1)) as sndngsecode
WHEN tcsm.signgu_code = '88316' THEN fn_get_code_nm('ETI003', SUBSTRING(tcsm.tmplat_id, 3,1)) /* 추모시설운영처 */
END as sndngsecode
, tcsm.tmplat_id as tmplatid , tcsm.tmplat_id as tmplatid
, date_format(now(), '%Y%m%d%H%i%S') as searchdate , date_format(now(), '%Y%m%d%H%i%S') as searchdate
, '' as success , '' as success
@ -186,7 +184,7 @@
FROM tb_cntc_sndng_mastr tcsm FROM tb_cntc_sndng_mastr tcsm
INNER JOIN tb_cntc_sndng_detail tcsd ON (tcsm.unity_sndng_mastr_id = tcsd.unity_sndng_mastr_id) INNER JOIN tb_cntc_sndng_detail tcsd ON (tcsm.unity_sndng_mastr_id = tcsd.unity_sndng_mastr_id)
LEFT OUTER JOIN tb_cntc_sndng_result tcsr ON (tcsd.unity_sndng_detail_id = tcsr.unity_sndng_detail_id) LEFT OUTER JOIN tb_cntc_sndng_result tcsr ON (tcsd.unity_sndng_detail_id = tcsr.unity_sndng_detail_id)
WHERE (tcsm.sndng_process_sttus != 'close' OR (tcsm.sndng_process_sttus = 'close' AND tcsm.updt_dt > date_add(now(), interval -7 day))) WHERE str_to_date(tcsm.clos_dt, '%Y%m%d%H%i%S') > date_add(now(), interval -7 day)
</select> </select>
</mapper> </mapper>

@ -45,8 +45,7 @@
, a.upduser = #{upduser} , a.upduser = #{upduser}
, a.upddate = sysdate , a.upddate = sysdate
, a.success = #{success} , a.success = #{success}
, a.message = #{message} , a.message = SUBSTRB(#{message}, 1, 100)
WHERE a.sndngprocesssttus != #{sndngprocesssttus}
WHEN NOT MATCHED THEN WHEN NOT MATCHED THEN
INSERT (a.unitysndngmastrid INSERT (a.unitysndngmastrid
, a.sndngco , a.sndngco
@ -70,7 +69,7 @@
, #{tmplatid} , #{tmplatid}
, TO_DATE(#{searchdate},'YYYYMMDDHH24MISS') , TO_DATE(#{searchdate},'YYYYMMDDHH24MISS')
, #{success} , #{success}
, #{message} , SUBSTRB(#{message}, 1, 100)
) )
</insert> </insert>
@ -87,7 +86,6 @@
, b.resultcode = #{resultcode} , b.resultcode = #{resultcode}
, b.upduser = #{upduser} , b.upduser = #{upduser}
, b.upddate = sysdate , b.upddate = sysdate
WHERE b.resultcode != #{resultcode}
WHEN NOT MATCHED THEN WHEN NOT MATCHED THEN
INSERT (b.unitysndngmastrid INSERT (b.unitysndngmastrid
, b.unitysndngdetailid , b.unitysndngdetailid
@ -103,6 +101,8 @@
, b.recvdt , b.recvdt
, b.readdt , b.readdt
, b.resultcode , b.resultcode
, b.insuser
, b.insdate
) )
VALUES (#{unitysndngmastrid} VALUES (#{unitysndngmastrid}
, #{unitysndngdetailid} , #{unitysndngdetailid}
@ -118,6 +118,8 @@
, TO_DATE(#{recvdt},'YYYYMMDDHH24MISS') , TO_DATE(#{recvdt},'YYYYMMDDHH24MISS')
, TO_DATE(#{readdt},'YYYYMMDDHH24MISS') , TO_DATE(#{readdt},'YYYYMMDDHH24MISS')
, #{resultcode} , #{resultcode}
, #{insuser}
, sysdate
) )
</insert> </insert>

Loading…
Cancel
Save