소스 정리

main
이범준 1 year ago
parent 31ec4c40ab
commit f461a5b3ff

@ -41,17 +41,17 @@ public interface CrdnCvlcptMapper extends AbstractMapper {
*/ */
DataObject selectCivilComplaintReceiptInitialDataInfo(CrdnQuery query); DataObject selectCivilComplaintReceiptInitialDataInfo(CrdnQuery query);
/** . /** .
* @param crdn * @param crdn
* @return * @return
*/ */
int updateCvlcptPrcsForInitData(CrdnCvlcpt cvlcpt); int updateCvlcptProcessSection(Map<String,Object> param);
/** . /** .
* @param crdn * @param crdn
* @return * @return
*/ */
int updateCvlcptPrcsForAnserTartgetData(CrdnCvlcpt cvlcpt); int updateCvlcptProcessSectionForSendBack(CrdnCvlcpt cvlcpt);
/** . /** .
* @param crdnCvlcpt * @param crdnCvlcpt
@ -59,30 +59,6 @@ public interface CrdnCvlcptMapper extends AbstractMapper {
*/ */
int initCvlcptPrcsRsltCn(CrdnCvlcpt crdnCvlcpt); int initCvlcptPrcsRsltCn(CrdnCvlcpt crdnCvlcpt);
/** .
* @param params
* @return
*/
int updateCrdn(Map<String, Object> params);
/** .
* @param params
* @return
*/
int updateCrdnAddition(Map<String, Object> params);
/** .
* @param params
* @return
*/
int insertCrdnFromSelect(DataObject params);
/** .
* @param params
* @return
*/
int insertCrdnAdditionFromSelect(DataObject params);
/** .<br /> /** .<br />
* {@link cokr.xit.fims.cvlc.service.bean.CrdnCvlcptService#getCivilComplaintList(CrdnQuery)} * {@link cokr.xit.fims.cvlc.service.bean.CrdnCvlcptService#getCivilComplaintList(CrdnQuery)}
* @param query * @param query
@ -127,4 +103,27 @@ public interface CrdnCvlcptMapper extends AbstractMapper {
*/ */
DataObject selectCivilComplaintProcessInfo(String cvlcptLinkId); DataObject selectCivilComplaintProcessInfo(String cvlcptLinkId);
/** .
* @param params
* @return
*/
int updateCrdn(Map<String, Object> params);
/** .
* @param params
* @return
*/
int updateCrdnAddition(Map<String, Object> params);
/** .
* @param params
* @return
*/
int insertCrdnFromSelect(DataObject params);
/** .
* @param params
* @return
*/
int insertCrdnAdditionFromSelect(DataObject params);
} }

@ -75,18 +75,23 @@ public class CrdnCvlcptMainBean extends AbstractComponent {
} }
/** . /** .
* @param initData , crdnCvlcpt * @param editDataExist , crdnCvlcpt
* @return * @return
* <ul><li> true</li> * <ul><li> true</li>
* <li> false</li> * <li> false</li>
* </ul> * </ul>
*/ */
public boolean updateCvlcptPrcsSe(boolean initData,CrdnCvlcpt cvlcpt) { public boolean updateCvlcptPrcsSe(boolean editDataExist, CrdnCvlcpt cvlcpt) {
if(initData) { DataObject params = new DataObject();
return crdnCvlcptMapper.updateCvlcptPrcsForInitData(cvlcpt) == 1 ? true : false; UserInfo userInfo = currentUser();
params.set("currentUser", userInfo);
params.set("crdnCvlcpt", cvlcpt);
if(editDataExist) {
params.set("editDataExist", "Y");
} else { } else {
return crdnCvlcptMapper.updateCvlcptPrcsForAnserTartgetData(cvlcpt) == 1 ? true : false; params.set("editDataExist", "N");
} }
return crdnCvlcptMapper.updateCvlcptProcessSection(params) == 1 ? true : false;
} }
/** . /** .

@ -354,7 +354,7 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv
crdnCvlcpt.setCvlcptLinkId(crdnInfo.string("CVLCPT_LINK_ID")); crdnCvlcpt.setCvlcptLinkId(crdnInfo.string("CVLCPT_LINK_ID"));
crdnCvlcpt.setCvlcptPrcsCd("01"); crdnCvlcpt.setCvlcptPrcsCd("01");
boolean retSuccess = crdnCvlcptMainBean.updateCvlcptPrcsSe(true, crdnCvlcpt); boolean retSuccess = crdnCvlcptMapper.updateCvlcptProcessSectionForSendBack(crdnCvlcpt) == 1 ? true : false;
if (!retSuccess) { if (!retSuccess) {
throw new RuntimeException("반송 처리 중 단속민원답변 수정에 실패하였습니다."); throw new RuntimeException("반송 처리 중 단속민원답변 수정에 실패하였습니다.");

@ -336,46 +336,39 @@ SELECT C.CRDN_ID <!-- 단속 ID -->
AND C.CRDN_ID = #{crdnId} AND C.CRDN_ID = #{crdnId}
</select> </select>
<update id="updateCvlcptPrcsForInitData" parameterType="cokr.xit.fims.cvlc.CrdnCvlcpt"> <update id="updateCvlcptProcessSection" parameterType="map">
/* 초기자료 민원 처리구분 수정(crdnCvlcptMapper.updateCvlcptPrcsForInitData) */ /* 초기자료 민원 처리구분 수정(crdnCvlcptMapper.updateCvlcptProcessSection) */
UPDATE TB_CRDN_CVLCPT UPDATE TB_CRDN_CVLCPT
SET MDFCN_DT = <include refid="utility.now" /> /* 수정일시 */ SET MDFCN_DT = <include refid="utility.now" /> /* 수정일시 */
, MDFR = #{modifiedBy} /* 수정자 */ , MDFR = #{currentUser.id} /* 수정자 */
, CVLCPT_PRCS_PIC = #{modifiedBy} /* 민원 처리 담당자 */ , CVLCPT_PRCS_PIC = #{currentUser.id} /* 민원 처리 담당자 */
, CVLCPT_PRCS_PIC_NM = (SELECT USER_NM FROM TB_USER WHERE USER_ID=#{modifiedBy}) , CVLCPT_PRCS_PIC_NM = (SELECT USER_NM FROM TB_USER WHERE USER_ID=#{currentUser.id})
, CVLCPT_PRCS_CMPTN_DT = <include refid="utility.now" /> , CVLCPT_PRCS_CMPTN_DT = <include refid="utility.now" />
<choose> , CVLCPT_PRCS_CD = #{crdnCvlcpt.cvlcptPrcsCd} /* 민원처리코드 */
<when test="cvlcptPrcsCd != '01'"> , CVLCPT_TRSM_CD = #{crdnCvlcpt.cvlcptTrsmCd} /* 민원전송코드 */
, CVLCPT_PRCS_CD = #{cvlcptPrcsCd} /* 민원처리코드 */ , CVLCPT_PRCS_SUMRY = #{crdnCvlcpt.cvlcptPrcsSumry} /* 민원처리요약 */
, CVLCPT_TRSM_CD = #{cvlcptTrsmCd} /* 민원전송코드 */ <if test='editDataExist == "Y"'>
, CVLCPT_PRCS_SUMRY = #{cvlcptPrcsSumry} /* 민원처리요약 */ , DSTRBNC_YN = NULLIF(#{crdnCvlcpt.dstrbncYn},'N') /* 방해 여부 */
, DSTRBNC_YN = NULLIF(#{dstrbncYn},'N') /* 방해 여부 */ </if>
</when>
<otherwise>
, CVLCPT_PRCS_CD = '01' /* 민원처리코드 */
, CVLCPT_TRSM_CD = '04' /* 민원전송코드 */
, CVLCPT_PRCS_SUMRY = '' /* 민원처리요약 */
, CVLCPT_PRCS_RSLT_CN = '' /* 민원처리결과내용 */
</otherwise>
</choose>
WHERE CVLCPT_LINK_ID = #{cvlcptLinkId} /* 연계 ID */ WHERE CVLCPT_LINK_ID = #{cvlcptLinkId} /* 연계 ID */
</update> </update>
<update id="updateCvlcptPrcsForAnserTartgetData" parameterType="cokr.xit.fims.cvlc.CrdnCvlcpt"> <update id="updateCvlcptProcessSectionForSendBack" parameterType="cokr.xit.fims.cvlc.CrdnCvlcpt">
/* 답변대상 민원 처리구분 수정(crdnCvlcptMapper.updateCvlcptPrcsForAnserTartgetData) */ /* 반송 민원 처리구분 수정(crdnCvlcptMapper.updateCvlcptProcessSectionForSendBack) */
UPDATE TB_CRDN_CVLCPT UPDATE TB_CRDN_CVLCPT
SET MDFCN_DT = <include refid="utility.now" /> /* 수정일시 */ SET MDFCN_DT = <include refid="utility.now" /> /* 수정일시 */
, MDFR = #{modifiedBy} /* 수정자 */ , MDFR = #{modifiedBy} /* 수정자 */
, CVLCPT_PRCS_PIC = #{modifiedBy} /* 민원 처리 담당자 */ , CVLCPT_PRCS_PIC = #{modifiedBy} /* 민원 처리 담당자 */
, CVLCPT_PRCS_PIC_NM = (SELECT USER_NM FROM TB_USER WHERE USER_ID=#{modifiedBy}) , CVLCPT_PRCS_PIC_NM = (SELECT USER_NM FROM TB_USER WHERE USER_ID=#{modifiedBy})
, CVLCPT_PRCS_CMPTN_DT = <include refid="utility.now" /> , CVLCPT_PRCS_CMPTN_DT = <include refid="utility.now" />
, CVLCPT_PRCS_CD = #{cvlcptPrcsCd} /* 민원처리코드 */ , CVLCPT_PRCS_CD = '01' /* 민원처리코드 */
, CVLCPT_TRSM_CD = #{cvlcptTrsmCd} /* 민원전송코드 */ , CVLCPT_TRSM_CD = '04' /* 민원전송코드 */
, CVLCPT_PRCS_SUMRY = #{cvlcptPrcsSumry} /* 민원처리요약 */ , CVLCPT_PRCS_SUMRY = '' /* 민원처리요약 */
, CVLCPT_PRCS_RSLT_CN = NULL , CVLCPT_PRCS_RSLT_CN = '' /* 민원처리결과내용 */
WHERE CVLCPT_LINK_ID = #{cvlcptLinkId} /* 연계 ID */ WHERE CVLCPT_LINK_ID = #{cvlcptLinkId} /* 연계 ID */
</update> </update>
<update id="initCvlcptPrcsRsltCn" parameterType="cokr.xit.fims.cvlc.CrdnCvlcpt"> <update id="initCvlcptPrcsRsltCn" parameterType="cokr.xit.fims.cvlc.CrdnCvlcpt">
/* 단속민원 대장 민원처리결과내용 초기화(crdnCvlcptMapper.initCvlcptPrcsRsltCn) */ /* 단속민원 대장 민원처리결과내용 초기화(crdnCvlcptMapper.initCvlcptPrcsRsltCn) */
UPDATE TB_CRDN_CVLCPT UPDATE TB_CRDN_CVLCPT
@ -387,6 +380,162 @@ SELECT C.CRDN_ID <!-- 단속 ID -->
AND DEL_YN = 'N' AND DEL_YN = 'N'
</update> </update>
<select id="selectCivilComplaintAnswerTargetDataList" parameterType="map" resultType="dataobject">
/* 민원답변대상자료 목록 조회(crdnCvlcptMapper.selectCivilComplaintAnswerTargetDataList) */
<include refid="utility.paging-prefix"/>
SELECT C.CRDN_ID <!-- 단속 ID -->
, C.CRDN_REG_SE_CD <!-- 단속 등록 구분 코드 -->
, (SELECT VLTN_ARTCL
FROM TB_VLTN_INFO
WHERE VLTN_ID = C.VLTN_ID) AS VLTN_ARTCL <!-- 위반내용 -->
, CC.CVLCPT_APLCNT_NM <!-- 민원 신청인 명 -->
, CC.CVLCPT_PRCS_PIC_NM <!-- 민원 처리 담당자 명 -->
, (SELECT TELNO
FROM TB_USER
WHERE USER_ID = CC.CVLCPT_PRCS_PIC
) AS CVLCPT_PRCS_PIC_TELNO <!-- 민원 처리 담당자 전화번호 -->
, CC.CVLCPT_RCPT_YMD <!-- 민원 접수 일자 -->
, CC.CVLCPT_PRCS_PRNMNT_DT <!-- 민원 처리 예정 일시 -->
, CONCAT(C.CRDN_YMD,'',C.CRDN_TM) AS CRDN_YMD_TM <!-- 단속 일시 -->
, CC.CVLCPT_RCPT_NO <!-- 민원 접수 번호 -->
, CC.CVLCPT_LIST_NO <!-- 민원 목록 번호 -->
, C.VHRNO <!-- 차량번호 -->
, LE.LEVY_EXCL_RSN_CD <!-- 부과 제외 사유 코드 -->
, C.ETC_CN <!-- 기타 내용 -->
, (CASE
WHEN C.CRDN_ID IN (SELECT DISTINCT(A.BFR_CRDN_ID) FROM TB_CRDN A WHERE A.DEL_YN = 'N' AND A.CRDN_REG_SE_CD = '04')
THEN 'Y'
ELSE 'N'
END) AS COPY_EXIST_YN <!-- 복사 자료 존재 여부 -->
, CC.CVLCPT_PRCS_CD <!-- 처리 구분 코드 -->
FROM TB_CRDN C
INNER JOIN TB_CRDN_CVLCPT CC ON (C.CVLCPT_LINK_YN = 'Y' AND C.LINK_ID = CC.CVLCPT_LINK_ID)
LEFT OUTER JOIN TB_LEVY_EXCL LE ON (C.CRDN_ID = LE.CRDN_ID AND LE.DEL_YN = 'N')
WHERE C.DEL_YN = 'N'
AND C.TASK_SE_CD = #{taskSeCd}
AND C.CRDN_STTS_CD IN ('21','81','83')
AND C.CRDN_REG_SE_CD = '02'
AND CC.CVLCPT_PRCS_CD IN ('02','03','04')
AND CC.CVLCPT_TRSM_CD = '01'
<if test="schCvlcptRcptYmdFrom != null or schCvlcptRcptYmdTo != null">
<if test="schCvlcptRcptYmdFrom != null">AND CC.CVLCPT_RCPT_YMD <![CDATA[ >= ]]> #{schCvlcptRcptYmdFrom} </if>
<if test="schCvlcptRcptYmdTo != null">AND CC.CVLCPT_RCPT_YMD <![CDATA[ <= ]]> #{schCvlcptRcptYmdTo} </if>
</if>
<if test="cvlcptPrcsCd != null">AND CC.CVLCPT_PRCS_CD = #{cvlcptPrcsCd}</if>
<if test="by != null and by != '' and term != null">
<choose>
<when test="mainOption == 'codeValue' or mainOption == 'match' or mainOption == 'ymd'">
<include refid="dynamicSearch.start" />
<choose>
<when test="by == 'crdnRegSeCd'">C.CRDN_REG_SE_CD</when>
<when test="by == 'cvlcptAplcntNm'">CC.CVLCPT_APLCNT_NM</when>
<when test="by == 'cvlcptPrcsPicNm'">CC.CVLCPT_PRCS_PIC_NM</when>
<when test="by == 'cvlcptPrcsPicTelno'">CC.CVLCPT_PRCS_PIC_TELNO</when>
<when test="by == 'cvlcptRcptYmd'">CC.CVLCPT_RCPT_YMD</when>
<when test="by == 'cvlcptPrcsPrnmntDt'">CC.CVLCPT_PRCS_PRNMNT_DT</when>
<when test="by == 'crdnYmd'">C.CRDN_YMD</when>
<when test="by == 'cvlcptRcptNo'">CC.CVLCPT_RCPT_NO</when>
<when test="by == 'cvlcptListNo'">CC.CVLCPT_LIST_NO</when>
<when test="by == 'vhrno'">C.VHRNO</when>
<when test="by == 'levyExclRsnCd'">LE.LEVY_EXCL_RSN_CD</when>
<when test="by == 'etcCn'">C.ETC_CN</when>
</choose>
<include refid="dynamicSearch.center" />#{term}<include refid="dynamicSearch.end" />
</when>
<otherwise>
<if test="by == 'vltnArtcl'">
AND (SELECT VLTN_ARTCL FROM TB_VLTN_INFO WHERE VLTN_ID = C.VLTN_ID) LIKE CONCAT('%', #{term}, '%')
</if>
</otherwise>
</choose>
</if>
<include refid="utility.sortBy" />
<include refid="utility.paging-suffix"/>
</select>
<select id="selectAnswerPreview" parameterType="string" resultType="dataobject">
/* 민원답변 미리보기(crdnCvlcptMapper.selectAnswerPreview) */
SELECT C.CRDN_ID <!-- 단속 ID -->
, CC.CVLCPT_LINK_ID <!-- 민원 연계 ID -->
, CC.CVLCPT_APLY_CN <!-- 민원 신청 내용 -->
, CC.CVLCPT_PRCS_RSLT_CN <!-- 민원 처리 결과 내용 -->
FROM TB_CRDN C
INNER JOIN TB_CRDN_CVLCPT CC ON (C.CVLCPT_LINK_YN = 'Y' AND C.LINK_ID = CC.CVLCPT_LINK_ID)
WHERE C.DEL_YN = 'N'
AND C.CRDN_ID = #{crdnId}
</select>
<update id="updateAnswerContent" parameterType="cokr.xit.fims.cvlc.CrdnCvlcpt">
/* 답변 내용 변경(crdnCvlcptMapper.updateAnswerContent) */
UPDATE TB_CRDN_CVLCPT
SET CVLCPT_PRCS_RSLT_CN = #{cvlcptPrcsRsltCn}
, MDFCN_DT = <include refid="utility.now" /> /* 수정일시 */
, MDFR = #{modifiedBy} /* 수정자 */
WHERE CVLCPT_LINK_ID = #{cvlcptLinkId};
</update>
<select id="selectAnswerTargetList" parameterType="list" resultType="dataobject">
/* 민원답변대상 정보 목록 조회(crdnCvlcptMapper.selectAnswerTargetList) */
SELECT C.CRDN_ID <!-- 단속 ID -->
, C.CRDN_STTS_CD <!-- 단속 상태 코드 -->
, C.CRDN_STTS_CHG_DT <!-- 단속 상태 변경 일시 -->
, CC.CVLCPT_LINK_ID <!-- 민원 연계 ID -->
, CC.CVLCPT_PRCS_RSLT_CN <!-- 민원 처리 결과 내용 -->
FROM TB_CRDN C
INNER JOIN TB_CRDN_CVLCPT CC ON (C.CVLCPT_LINK_YN = 'Y' AND C.LINK_ID = CC.CVLCPT_LINK_ID)
WHERE C.CRDN_ID IN (<foreach collection="crdnIDs" item="crdnId" separator=",">#{crdnId}</foreach>)
AND C.DEL_YN = 'N'
AND C.CRDN_STTS_CD IN ('21','81','83')
AND C.CRDN_REG_SE_CD = '02'
AND CC.CVLCPT_PRCS_CD IN ('02','03','04')
AND CC.CVLCPT_TRSM_CD = '01'
</select>
<update id="updateAnswerTargetTransmitStatus" parameterType="cokr.xit.fims.cvlc.CrdnCvlcpt">
/* 민원 전송코드 변경(crdnCvlcptMapper.updateAnswerTargetTransmitStatus) */
UPDATE TB_CRDN_CVLCPT
SET CVLCPT_TRSM_CD = #{cvlcptTrsmCd} /* 민원 전송 코드 */
<if test="cvlcptPrcsRsltCn != null and cvlcptPrcsRsltCn != ''">
, CVLCPT_PRCS_RSLT_CN = #{cvlcptPrcsRsltCn} /* 민원 처리 결과 내용 */
</if>
, CVLCPT_PRCS_CMPTN_DT = <include refid="utility.now" />
, CVLCPT_PRCS_PIC_NM = (SELECT USER_NM FROM TB_USER WHERE USER_ID=#{modifiedBy})
, CVLCPT_PRCS_PIC = #{modifiedBy}
, MDFCN_DT = <include refid="utility.now" /> /* 수정일시 */
, MDFR = #{modifiedBy} /* 수정자 */
WHERE CVLCPT_LINK_ID = #{cvlcptLinkId}
</update>
<select id="selectCivilComplaintProcessInfo" parameterType="string" resultType="dataobject">
/* 민원 처리 정보 조회(crdnCvlcptMapper.selectCivilComplaintProcessInfo) */
SELECT CC.CVLCPT_LINK_ID /* 민원 연계 ID */
, CC.CVLCPT_APLY_NO /* 민원 신청 번호 */
, CC.CVLCPT_RCPT_NO /* 민원 접수 번호 */
, CC.CVLCPT_APLY_TTL_NM /* 민원 신청 제목 명 */
, CC.CVLCPT_GIST /* 민원 요지 */
, CC.CVLCPT_PRCS_SUMRY /* 민원 처리 요약 */
, CC.CVLCPT_PRCS_RSLT_CN /* 민원 처리 결과 내용 */
, CC.CVLCPT_PRCS_CMPTN_DT /* 민원 처리 완료 일시 */
, CC.CVLCPT_PRCS_PIC_NM /* 민원 처리 담당자 명 */
, U.EML_ADRS AS CVLCPT_PRCS_PIC_EMAIL /* 민원 처리 담당자 이메일 */
, U.TELNO AS CVLCPT_PRCS_PIC_TELNO /* 민원 처리 담당자 전화번호 */
, U.DEPT_CD AS CVLCPT_PRCS_DEPT_CD /* 민원 처리 부서 코드, 실 처리 기관 코드 */
, (SELECT DEPT_NM
FROM TB_DEPT_INFO DI
WHERE DI.DEPT_CD = U.DEPT_CD
AND DI.SGG_CD = SI.SGG_CD
AND ROWNUM = 1
) AS CVLCPT_PRCS_DEPT_NM /* 민원 처리 부서 명 */
, U.NSTT_CD AS CVLCPT_PRCS_NSTT_CD /* 민원 처리 기관 코드 */
, EI.PETI_ANC_CODE_V /* 민원 기관코드 */
FROM TB_CRDN_CVLCPT CC
INNER JOIN TB_ESB_INTERFACE EI ON (CC.CVLCPT_LINK_ID = EI.INTERFACE_SEQ_N)
LEFT OUTER JOIN TB_USER U ON (CC.CVLCPT_PRCS_PIC = U.USER_ID)
LEFT OUTER JOIN TB_SGG_INFO SI ON (U.NSTT_CD = SI.INST_CD)
WHERE CC.CVLCPT_LINK_ID = #{cvlcptLinkId}
</select>
<update id="updateCrdn" parameterType="map"> <update id="updateCrdn" parameterType="map">
/* 단속정보 수정(crdnCvlcptMapper.updateCrdn) */ /* 단속정보 수정(crdnCvlcptMapper.updateCrdn) */
UPDATE TB_CRDN UPDATE TB_CRDN
@ -595,161 +744,4 @@ SELECT #{newCrdnId}
WHERE CRDN_ID = #{crdnId} WHERE CRDN_ID = #{crdnId}
</insert> </insert>
<select id="selectCivilComplaintAnswerTargetDataList" parameterType="map" resultType="dataobject">
/* 민원답변대상자료 목록 조회(crdnCvlcptMapper.selectCivilComplaintAnswerTargetDataList) */
<include refid="utility.paging-prefix"/>
SELECT C.CRDN_ID <!-- 단속 ID -->
, C.CRDN_REG_SE_CD <!-- 단속 등록 구분 코드 -->
, (SELECT VLTN_ARTCL
FROM TB_VLTN_INFO
WHERE VLTN_ID = C.VLTN_ID) AS VLTN_ARTCL <!-- 위반내용 -->
, CC.CVLCPT_APLCNT_NM <!-- 민원 신청인 명 -->
, CC.CVLCPT_PRCS_PIC_NM <!-- 민원 처리 담당자 명 -->
, (SELECT TELNO
FROM TB_USER
WHERE USER_ID = CC.CVLCPT_PRCS_PIC
) AS CVLCPT_PRCS_PIC_TELNO <!-- 민원 처리 담당자 전화번호 -->
, CC.CVLCPT_RCPT_YMD <!-- 민원 접수 일자 -->
, CC.CVLCPT_PRCS_PRNMNT_DT <!-- 민원 처리 예정 일시 -->
, CONCAT(C.CRDN_YMD,'',C.CRDN_TM) AS CRDN_YMD_TM <!-- 단속 일시 -->
, CC.CVLCPT_RCPT_NO <!-- 민원 접수 번호 -->
, CC.CVLCPT_LIST_NO <!-- 민원 목록 번호 -->
, C.VHRNO <!-- 차량번호 -->
, LE.LEVY_EXCL_RSN_CD <!-- 부과 제외 사유 코드 -->
, C.ETC_CN <!-- 기타 내용 -->
, (CASE
WHEN C.CRDN_ID IN (SELECT DISTINCT(A.BFR_CRDN_ID) FROM TB_CRDN A WHERE A.DEL_YN = 'N' AND A.CRDN_REG_SE_CD = '04')
THEN 'Y'
ELSE 'N'
END) AS COPY_EXIST_YN <!-- 복사 자료 존재 여부 -->
, CC.CVLCPT_PRCS_CD <!-- 처리 구분 코드 -->
FROM TB_CRDN C
INNER JOIN TB_CRDN_CVLCPT CC ON (C.CVLCPT_LINK_YN = 'Y' AND C.LINK_ID = CC.CVLCPT_LINK_ID)
LEFT OUTER JOIN TB_LEVY_EXCL LE ON (C.CRDN_ID = LE.CRDN_ID AND LE.DEL_YN = 'N')
WHERE C.DEL_YN = 'N'
AND C.TASK_SE_CD = #{taskSeCd}
AND C.CRDN_STTS_CD IN ('21','81','83')
AND C.CRDN_REG_SE_CD = '02'
AND CC.CVLCPT_PRCS_CD IN ('02','03','04')
AND CC.CVLCPT_TRSM_CD = '01'
<if test="schCvlcptRcptYmdFrom != null or schCvlcptRcptYmdTo != null">
<if test="schCvlcptRcptYmdFrom != null">AND CC.CVLCPT_RCPT_YMD <![CDATA[ >= ]]> #{schCvlcptRcptYmdFrom} </if>
<if test="schCvlcptRcptYmdTo != null">AND CC.CVLCPT_RCPT_YMD <![CDATA[ <= ]]> #{schCvlcptRcptYmdTo} </if>
</if>
<if test="cvlcptPrcsCd != null">AND CC.CVLCPT_PRCS_CD = #{cvlcptPrcsCd}</if>
<if test="by != null and by != '' and term != null">
<choose>
<when test="mainOption == 'codeValue' or mainOption == 'match' or mainOption == 'ymd'">
<include refid="dynamicSearch.start" />
<choose>
<when test="by == 'crdnRegSeCd'">C.CRDN_REG_SE_CD</when>
<when test="by == 'cvlcptAplcntNm'">CC.CVLCPT_APLCNT_NM</when>
<when test="by == 'cvlcptPrcsPicNm'">CC.CVLCPT_PRCS_PIC_NM</when>
<when test="by == 'cvlcptPrcsPicTelno'">CC.CVLCPT_PRCS_PIC_TELNO</when>
<when test="by == 'cvlcptRcptYmd'">CC.CVLCPT_RCPT_YMD</when>
<when test="by == 'cvlcptPrcsPrnmntDt'">CC.CVLCPT_PRCS_PRNMNT_DT</when>
<when test="by == 'crdnYmd'">C.CRDN_YMD</when>
<when test="by == 'cvlcptRcptNo'">CC.CVLCPT_RCPT_NO</when>
<when test="by == 'cvlcptListNo'">CC.CVLCPT_LIST_NO</when>
<when test="by == 'vhrno'">C.VHRNO</when>
<when test="by == 'levyExclRsnCd'">LE.LEVY_EXCL_RSN_CD</when>
<when test="by == 'etcCn'">C.ETC_CN</when>
</choose>
<include refid="dynamicSearch.center" />#{term}<include refid="dynamicSearch.end" />
</when>
<otherwise>
<if test="by == 'vltnArtcl'">
AND (SELECT VLTN_ARTCL FROM TB_VLTN_INFO WHERE VLTN_ID = C.VLTN_ID) LIKE CONCAT('%', #{term}, '%')
</if>
</otherwise>
</choose>
</if>
<include refid="utility.sortBy" />
<include refid="utility.paging-suffix"/>
</select>
<select id="selectAnswerPreview" parameterType="string" resultType="dataobject">
/* 민원답변 미리보기(crdnCvlcptMapper.selectAnswerPreview) */
SELECT C.CRDN_ID <!-- 단속 ID -->
, CC.CVLCPT_LINK_ID <!-- 민원 연계 ID -->
, CC.CVLCPT_APLY_CN <!-- 민원 신청 내용 -->
, CC.CVLCPT_PRCS_RSLT_CN <!-- 민원 처리 결과 내용 -->
FROM TB_CRDN C
INNER JOIN TB_CRDN_CVLCPT CC ON (C.CVLCPT_LINK_YN = 'Y' AND C.LINK_ID = CC.CVLCPT_LINK_ID)
WHERE C.DEL_YN = 'N'
AND C.CRDN_ID = #{crdnId}
</select>
<update id="updateAnswerContent" parameterType="cokr.xit.fims.cvlc.CrdnCvlcpt">
/* 답변 내용 변경(crdnCvlcptMapper.updateAnswerContent) */
UPDATE TB_CRDN_CVLCPT
SET CVLCPT_PRCS_RSLT_CN = #{cvlcptPrcsRsltCn}
, MDFCN_DT = <include refid="utility.now" /> /* 수정일시 */
, MDFR = #{modifiedBy} /* 수정자 */
WHERE CVLCPT_LINK_ID = #{cvlcptLinkId};
</update>
<select id="selectAnswerTargetList" parameterType="list" resultType="dataobject">
/* 민원답변대상 정보 목록 조회(crdnCvlcptMapper.selectAnswerTargetList) */
SELECT C.CRDN_ID <!-- 단속 ID -->
, C.CRDN_STTS_CD <!-- 단속 상태 코드 -->
, C.CRDN_STTS_CHG_DT <!-- 단속 상태 변경 일시 -->
, CC.CVLCPT_LINK_ID <!-- 민원 연계 ID -->
, CC.CVLCPT_PRCS_RSLT_CN <!-- 민원 처리 결과 내용 -->
FROM TB_CRDN C
INNER JOIN TB_CRDN_CVLCPT CC ON (C.CVLCPT_LINK_YN = 'Y' AND C.LINK_ID = CC.CVLCPT_LINK_ID)
WHERE C.CRDN_ID IN (<foreach collection="crdnIDs" item="crdnId" separator=",">#{crdnId}</foreach>)
AND C.DEL_YN = 'N'
AND C.CRDN_STTS_CD IN ('21','81','83')
AND C.CRDN_REG_SE_CD = '02'
AND CC.CVLCPT_PRCS_CD IN ('02','03','04')
AND CC.CVLCPT_TRSM_CD = '01'
</select>
<update id="updateAnswerTargetTransmitStatus" parameterType="cokr.xit.fims.cvlc.CrdnCvlcpt">
/* 민원 전송코드 변경(crdnCvlcptMapper.updateAnswerTargetTransmitStatus) */
UPDATE TB_CRDN_CVLCPT
SET CVLCPT_TRSM_CD = #{cvlcptTrsmCd} /* 민원 전송 코드 */
<if test="cvlcptPrcsRsltCn != null and cvlcptPrcsRsltCn != ''">
, CVLCPT_PRCS_RSLT_CN = #{cvlcptPrcsRsltCn} /* 민원 처리 결과 내용 */
</if>
, CVLCPT_PRCS_CMPTN_DT = <include refid="utility.now" />
, CVLCPT_PRCS_PIC_NM = (SELECT USER_NM FROM TB_USER WHERE USER_ID=#{modifiedBy})
, CVLCPT_PRCS_PIC = #{modifiedBy}
, MDFCN_DT = <include refid="utility.now" /> /* 수정일시 */
, MDFR = #{modifiedBy} /* 수정자 */
WHERE CVLCPT_LINK_ID = #{cvlcptLinkId}
</update>
<select id="selectCivilComplaintProcessInfo" parameterType="string" resultType="dataobject">
/* 민원 처리 정보 조회(crdnCvlcptMapper.selectCivilComplaintProcessInfo) */
SELECT CC.CVLCPT_LINK_ID /* 민원 연계 ID */
, CC.CVLCPT_APLY_NO /* 민원 신청 번호 */
, CC.CVLCPT_RCPT_NO /* 민원 접수 번호 */
, CC.CVLCPT_APLY_TTL_NM /* 민원 신청 제목 명 */
, CC.CVLCPT_GIST /* 민원 요지 */
, CC.CVLCPT_PRCS_SUMRY /* 민원 처리 요약 */
, CC.CVLCPT_PRCS_RSLT_CN /* 민원 처리 결과 내용 */
, CC.CVLCPT_PRCS_CMPTN_DT /* 민원 처리 완료 일시 */
, CC.CVLCPT_PRCS_PIC_NM /* 민원 처리 담당자 명 */
, U.EML_ADRS AS CVLCPT_PRCS_PIC_EMAIL /* 민원 처리 담당자 이메일 */
, U.TELNO AS CVLCPT_PRCS_PIC_TELNO /* 민원 처리 담당자 전화번호 */
, U.DEPT_CD AS CVLCPT_PRCS_DEPT_CD /* 민원 처리 부서 코드, 실 처리 기관 코드 */
, (SELECT DEPT_NM
FROM TB_DEPT_INFO DI
WHERE DI.DEPT_CD = U.DEPT_CD
AND DI.SGG_CD = SI.SGG_CD
AND ROWNUM = 1
) AS CVLCPT_PRCS_DEPT_NM /* 민원 처리 부서 명 */
, U.NSTT_CD AS CVLCPT_PRCS_NSTT_CD /* 민원 처리 기관 코드 */
, EI.PETI_ANC_CODE_V /* 민원 기관코드 */
FROM TB_CRDN_CVLCPT CC
INNER JOIN TB_ESB_INTERFACE EI ON (CC.CVLCPT_LINK_ID = EI.INTERFACE_SEQ_N)
LEFT OUTER JOIN TB_USER U ON (CC.CVLCPT_PRCS_PIC = U.USER_ID)
LEFT OUTER JOIN TB_SGG_INFO SI ON (U.NSTT_CD = SI.INST_CD)
WHERE CC.CVLCPT_LINK_ID = #{cvlcptLinkId}
</select>
</mapper> </mapper>
Loading…
Cancel
Save