모바일 고지 관련 소스정리

main
이범준 5 months ago
parent bc4d269952
commit 25d66c8edf

@ -21,13 +21,7 @@ public interface CommCollectServerDao {
public List<Map<String, Object>> selectSendPreRegistCarInfo(Map<String, String> param);
public int updatePreRegistInfoSend(Map<String, Object> param);
public List<Map<String, Object>> selectMobileNotification(Map<String, String> param);
public int updateMobileNotification(Map<String, Object> param);
public int insertMobileNotificationLog(Map<String, Object> param);
public List<Map<String, Object>> selectNoMobileNotification(Map<String, Object> param);

@ -219,193 +219,7 @@ ORDER BY CHANGED_DATA.CHANGED_DT
</update>
<select id="selectMobileNotification" parameterType="hashmap" resultType="hashmap">
select
MOB_NOTI_SEQ,
WORKER_ID,
FARE_OFFICE_ID,
BOOTH_ID,
YEAR,
MONTH,
DAY,
WORK_TIMES,
SEQNO,
NOTI_TYPE,
CAR_NO,
REPLACE(CAR_OWNER_CI,' ','+') AS CAR_OWNER_CI,
nvl(TAX_NO, ' ') as TAX_NO,
TO_CHAR(PASS_DATE, 'YYYYMMDDHH24MISS') as PASS_DATE,
PASS_AMOUNT,
PENALTY,
DELIVERY_DTDM,
EXT_NOTI,
STAT_CD,
NEXT_SEND_DATES
from TB_CFS_MOBI_NOTI
<choose>
<when test="notiType != null and notiType == 0">
where NOTI_TYPE = '0'
and STAT_CD = '0'
</when>
<otherwise>
where NOTI_TYPE = '1' <!-- 카카톡 전송 성공 -->
and STAT_CD = '1' <!-- 카카톡 메시지 확인 -->
and NEXT_SEND_DATES <![CDATA[ <= ]]> to_char(SYSDATE, 'YYYYMMDD')
</otherwise>
</choose>
order by MOB_NOTI_SEQ
</select>
<update id="updateMobileNotification" parameterType="hashmap">
/* 모바일고지내역 수정 */
update TB_CFS_MOBI_NOTI
<set>
NOTI_TYPE = #{NOTI_TYPE, jdbcType=CHAR},
STAT_CD = #{STAT_CD, jdbcType=CHAR},
ELC_DOCU_NO = #{ELC_DOCU_NO, jdbcType=VARCHAR},
EXT_NOTI = #{EXT_NOTI, jdbcType=VARCHAR},
NEXT_SEND_DATES = #{NEXT_SEND_DATES, jdbcType=VARCHAR},
UPDATER = #{WORKER},
UPDATE_DATE = SYSDATE
</set>
where MOB_NOTI_SEQ = #{MOB_NOTI_SEQ}
</update>
<insert id="insertMobileNotificationLog" parameterType="hashmap">
/* 모바일고지이력 추가 */
insert into TB_CFS_MOBI_NOTI_LOG (
CHG_DATE,
MOB_NOTI_SEQ,
WORKER_ID,
FARE_OFFICE_ID,
BOOTH_ID,
YEAR,
MONTH,
DAY,
WORK_TIMES,
SEQNO,
NOTI_TYPE,
CAR_NO,
CAR_OWNER_CI,
TAX_NO,
PASS_DATE,
PASS_AMOUNT,
PENALTY,
DELIVERY_DTDM,
EXT_NOTI,
STAT_CD,
ELC_DOCU_NO,
NEXT_SEND_DATES,
CREATER,
CREATE_DATE,
UPDATER,
UPDATE_DATE
)
values(
SYSDATE,
#{MOB_NOTI_SEQ,jdbcType=CHAR},
#{WORKER_ID, jdbcType=VARCHAR},
#{FARE_OFFICE_ID, jdbcType=VARCHAR},
#{BOOTH_ID, jdbcType=VARCHAR},
#{YEAR, jdbcType=VARCHAR},
#{MONTH, jdbcType=VARCHAR},
#{DAY, jdbcType=VARCHAR},
#{WORK_TIMES, jdbcType=VARCHAR},
#{SEQNO, jdbcType=VARCHAR},
#{NOTI_TYPE,jdbcType=CHAR},
#{CAR_NO, jdbcType=VARCHAR},
REPLACE(#{CAR_OWNER_CI, jdbcType=VARCHAR},' ','+'),
#{TAX_NO, jdbcType=VARCHAR},
to_date(#{PASS_DATE}, 'YYYYMMDDHH24MISS'),
#{PASS_AMOUNT, jdbcType=NUMERIC},
#{PENALTY, jdbcType=NUMERIC},
#{DELIVERY_DTDM, jdbcType=CHAR},
#{EXT_NOTI, jdbcType=VARCHAR},
#{STAT_CD, jdbcType=VARCHAR},
#{ELC_DOCU_NO, jdbcType=VARCHAR},
<choose>
<when test="STAT_CD != null and notiType == 1">
to_char(SYSDATE, 'YYYYMMDD'),
</when>
<otherwise>
to_char(SYSDATE + 1, 'YYYYMMDD'),
</otherwise>
</choose>
#{WORKER},
SYSDATE,
#{WORKER},
SYSDATE
)
</insert>
<select id="selectNoMobileNotification" parameterType="hashmap" resultType="hashmap">
/* 미확인 모바일고지내역 조회 */
select
MOB_NOTI_SEQ,
to_char(SYSDATE, 'YYYYMMDDHH24MISS') as TRAN_DATE,
WORKER_ID,
FARE_OFFICE_ID,
BOOTH_ID,
YEAR,
MONTH,
DAY,
WORK_TIMES,
SEQNO,
NOTI_TYPE,
CAR_NO,
REPLACE(CAR_OWNER_CI,' ','+') AS CAR_OWNER_CI,
nvl(TAX_NO, ' ') as TAX_NO,
TO_CHAR(PASS_DATE, 'YYYYMMDDHH24MISS') as PASS_DATE,
PASS_AMOUNT,
PENALTY,
DELIVERY_DTDM,
EXT_NOTI,
STAT_CD,
ELC_DOCU_NO,
NEXT_SEND_DATES,
nvl(TRANS_ID, ' ') as TRANS_ID,
UPDATER,
to_char(UPDATE_DATE, 'YYYYMMDDHH24MISS') as UPDATE_DATE
from TB_CFS_MOBI_NOTI
where STAT_CD = '0'
and NOTI_TYPE = '0'
and NEXT_SEND_DATES = to_char(SYSDATE, 'YYYYMMDD')
and trans_id is not null
and rownum =1
</select>
<select id="selectSmallCarInfo" parameterType="hashmap" resultType="hashmap">

@ -20,11 +20,7 @@ public interface CommCollectServerService {
public List<Map<String, Object>> selectMobileNotification(Map<String, String> param) throws Exception;
public int updateMobileNotification(Map<String, Object> param) throws Exception;
public int insertMobileNotificationLog(Map<String, Object> param) throws Exception;
public List<Map<String, Object>> selectNoMobileNoti(Map<String, Object> param) throws Exception;
public List<Map<String, Object>> selectSmallCarInfo(Map<String, String> param) throws Exception;

@ -78,26 +78,10 @@ public class CommCollectServerServiceImpl implements CommCollectServerService {
}
}
@Override
public List<Map<String, Object>> selectMobileNotification(Map<String, String> param) throws Exception {
return dao.selectMobileNotification(param);
}
@Override
public int updateMobileNotification(Map<String, Object> param) throws Exception {
return dao.updateMobileNotification(param);
}
@Override
public int insertMobileNotificationLog(Map<String, Object> param) throws Exception {
return dao.insertMobileNotificationLog(param);
}
@Override
public List<Map<String, Object>> selectNoMobileNoti(Map<String, Object> param) throws Exception {
return dao.selectNoMobileNotification(param);
}

Loading…
Cancel
Save