diff --git a/mens-api/src/main/java/kr/xit/other/service/OtherService.java b/mens-api/src/main/java/kr/xit/other/service/OtherService.java index 0f3c811..32e709b 100644 --- a/mens-api/src/main/java/kr/xit/other/service/OtherService.java +++ b/mens-api/src/main/java/kr/xit/other/service/OtherService.java @@ -46,12 +46,13 @@ public class OtherService extends AbstractService implements IOtherService { for(Elecnoticedtl dto: ohterResult){ Elecnoticedtl elecnoticedtl = mapper.selectElecnotice(dto); - if(elecnoticedtl == null - || (elecnoticedtl != null && !Checks.checkVal(dto.getSndngprocesssttus(),"").equals(Checks.checkVal(elecnoticedtl.getSndngprocesssttus(),""))) + if((Checks.isEmpty(elecnoticedtl)) + || (Checks.isEmpty(elecnoticedtl.getSndngprocesssttus())) + || (Checks.isNotEmpty(elecnoticedtl) && !Checks.checkVal(dto.getSndngprocesssttus(),"").equals(Checks.checkVal(elecnoticedtl.getSndngprocesssttus(),""))) ){ mapper.saveElecnoticemst(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); } } 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 bfae205..b1831f1 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 @@ -165,9 +165,7 @@ , 'ens' as upduser , date_format(tcsm.updt_dt, '%Y%m%d%H%i%S') as upddate , tcsm.sndng_dt as sndngdt - , CASE WHEN tcsm.signgu_code = '88328' THEN SUBSTRING(tcsm.tmplat_id, 3,1) /* 교통시설운영처 */ - WHEN tcsm.signgu_code = '88316' THEN fn_get_code_nm('ETI003', SUBSTRING(tcsm.tmplat_id, 3,1)) /* 추모시설운영처 */ - END as sndngsecode + , fn_get_code_nm('ETI005', SUBSTRING(tcsm.tmplat_id, 5,1)) as sndngsecode , tcsm.tmplat_id as tmplatid , date_format(now(), '%Y%m%d%H%i%S') as searchdate , '' as success @@ -186,7 +184,7 @@ FROM tb_cntc_sndng_mastr tcsm 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) - 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) diff --git a/mens-api/src/main/resources/egovframework/mapper/other/other-oracle-mapper.xml b/mens-api/src/main/resources/egovframework/mapper/other/other-oracle-mapper.xml index aceca36..de65315 100644 --- a/mens-api/src/main/resources/egovframework/mapper/other/other-oracle-mapper.xml +++ b/mens-api/src/main/resources/egovframework/mapper/other/other-oracle-mapper.xml @@ -45,8 +45,7 @@ , a.upduser = #{upduser} , a.upddate = sysdate , a.success = #{success} - , a.message = #{message} - WHERE a.sndngprocesssttus != #{sndngprocesssttus} + , a.message = SUBSTRB(#{message}, 1, 100) WHEN NOT MATCHED THEN INSERT (a.unitysndngmastrid , a.sndngco @@ -70,7 +69,7 @@ , #{tmplatid} , TO_DATE(#{searchdate},'YYYYMMDDHH24MISS') , #{success} - , #{message} + , SUBSTRB(#{message}, 1, 100) ) @@ -87,7 +86,6 @@ , b.resultcode = #{resultcode} , b.upduser = #{upduser} , b.upddate = sysdate - WHERE b.resultcode != #{resultcode} WHEN NOT MATCHED THEN INSERT (b.unitysndngmastrid , b.unitysndngdetailid @@ -103,6 +101,8 @@ , b.recvdt , b.readdt , b.resultcode + , b.insuser + , b.insdate ) VALUES (#{unitysndngmastrid} , #{unitysndngdetailid} @@ -118,6 +118,8 @@ , TO_DATE(#{recvdt},'YYYYMMDDHH24MISS') , TO_DATE(#{readdt},'YYYYMMDDHH24MISS') , #{resultcode} + , #{insuser} + , sysdate )