민원 답변 처리 추가

main
이범준 1 year ago
parent a64d891dcf
commit 913b36fcff

@ -121,4 +121,16 @@ public interface CrdnCvlcptMapper extends AbstractMapper {
*/
int updateAnswerContent(CrdnCvlcpt crdnCvlcpt);
/** ID .
* @param crdnIDs ID
* @return
*/
List<DataObject> selectAnswerTargetList(String[] crdnIDs);
/** .
* @param crdnCvlcpt
* @return
*/
int updateAnswerTargetTransmitStatus(CrdnCvlcpt crdnCvlcpt);
}

@ -26,6 +26,7 @@ import cokr.xit.fims.cmmn.dao.CrdnPayerHstryMapper;
import cokr.xit.fims.cmmn.dao.CrdnSttsHstryMapper;
import cokr.xit.fims.cmmn.hwp.AddingParagraphBetweenHWPFile;
import cokr.xit.fims.cmmn.hwp.InsertingImageCell;
import cokr.xit.fims.cmmn.service.bean.CrdnSttsHstryBean;
import cokr.xit.fims.crdn.Crdn;
import cokr.xit.fims.crdn.CrdnQuery;
import cokr.xit.fims.crdn.dao.CrdnInfoMapper;
@ -68,6 +69,9 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv
@Resource(name = "crdnSttsHstryMapper")
private CrdnSttsHstryMapper crdnSttsHstryMapper;
@Resource(name = "crdnSttsHstryBean")
private CrdnSttsHstryBean crdnSttsHstryBean;
@Resource(name = "crdnPayerHstryMapper")
private CrdnPayerHstryMapper crdnPayerHstryMapper;
@ -423,8 +427,6 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv
}
//단속정보변경
saved = crdnCvlcptBean.updateCrdn(nonQueryRequest, crdn);
if(!saved) {
@ -558,14 +560,46 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv
@Override
public boolean updateAnswerTargetProcessStatus(String processType, String[] crdnIDs) {
List<DataObject> targetDataList = crdnCvlcptMapper.selectAnswerTargetList(crdnIDs);
for(int i=0; i < targetDataList.size(); i++) {
CrdnCvlcpt crdnCvlcpt = new CrdnCvlcpt();
crdnCvlcpt.setCvlcptLinkId(targetDataList.get(i).string("CVLCPT_LINK_ID"));
if(processType.equals("answerExecute")) {
// TODO : 답변완료실행
} else if(processType.equals("answerComplete")) {
// TODO : 답변완료
crdnCvlcpt.setCvlcptTrsmCd("04");
if(ifEmpty(targetDataList.get(i).string("CVLCPT_PRCS_RSLT_CN"), () -> "").equals("")) {
String answerWords = crdnCvlcptBean.mappingAnswerWords(targetDataList.get(i).string("CRDN_ID"));
crdnCvlcpt.setCvlcptPrcsRsltCn(answerWords);
}
} else if(processType.equals("answerComplete")){
crdnCvlcpt.setCvlcptTrsmCd("09");
} else {
return false;
}
int effected = crdnCvlcptMapper.updateAnswerTargetTransmitStatus(crdnCvlcpt);
if(effected != 1) {
throw new RuntimeException("민원 전송 상태 변경 중 오류가 발생하였습니다.");
}
if(targetDataList.get(i).string("CRDN_STTS_CD").equals("21")) {
CrdnSttsHstry crdnSttsHstry = new CrdnSttsHstry();
crdnSttsHstry.setCrdnId(targetDataList.get(i).string("CRDN_ID"));
crdnSttsHstry.setBfrSttsCd(targetDataList.get(i).string("CRDN_STTS_CD"));
crdnSttsHstry.setBfrSttsChgDt(targetDataList.get(i).string("CRDN_STTS_CHG_DT"));
crdnSttsHstry.setCrdnSttsCd("22");
crdnSttsHstry.setTaskDtlId(targetDataList.get(i).string("CRDN_ID"));
crdnSttsHstry.setEtcCn("민원답변등록");
boolean retSuccess = crdnSttsHstryBean.createHstryUpdateCrdnSttsCd(crdnSttsHstry);
if (!retSuccess) {
throw new RuntimeException("민원 전송 상태 변경 중 단속상태코드 변경에 실패하였습니다.");
}
}
}
return true;
}

@ -571,6 +571,7 @@ SELECT C.CRDN_ID <!-- 단속 ID -->
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="by != null and by != '' and term != null">
<choose>
<when test="mainOption == 'codeValue' or mainOption == 'match' or mainOption == 'ymd'">
@ -655,4 +656,33 @@ UPDATE TB_CRDN_CVLCPT
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>
, MDFCN_DT = <include refid="utility.now" /> /* 수정일시 */
, MDFR = #{modifiedBy} /* 수정자 */
WHERE CVLCPT_LINK_ID = #{cvlcptLinkId}
</update>
</mapper>

@ -199,13 +199,11 @@ $(document).ready(function(){
$P.crdnControl.save = (processType) => {
var keyArr = $P.crdnControl.dataset.getKeys("selected");
ajax.post({
url : $P.crdnControl.urls.update,
data : {
"processType" : processType,
"crdnIDs" : $P.crdnControl.dataset.getKeys("selected")
"crdnIDs" : $P.crdnControl.dataset.getKeys("selected").join(",")
},
success : resp => {
if(resp.saved){
@ -477,14 +475,14 @@ $(document).ready(function(){
});
}
$P.fnAnswerExcute = () => {
$P.fnAnswerExecute = () => {
var count = $P.crdnControl.dataset.getKeys("selected").length;
dialog.alert({
content : "선택된 "+count+"건의 자료를 답변등록을 실행하시겠습니까?"
, onOK : () => {
$P.crdnControl.save('answerExcute');
$P.crdnControl.save('answerExecute');
}
});
}
@ -540,7 +538,7 @@ $(document).ready(function(){
$('#btnSearch--${pageName}').on('click', () => $P.searchCrdnList());
$("#btnOpenCvlcptOrgnl--${pageName}").on("click", () => $P.fnOpenCvlcptOrgnl());
$("#btnOpenAnswerPreview--${pageName}").on("click", () => $P.fnOpenAnswerPreview());
$("#btnAnswerExecute--${pageName}").on("click", () => $P.fnAnswerExcute());
$("#btnAnswerExecute--${pageName}").on("click", () => $P.fnAnswerExecute());
$("#btnAnswerComplete--${pageName}").on("click", () => $P.fnAnswerComplete());
$("#table-responsive--${pageName}").scroll(function(){ $P.scrollEnd(this); });

Loading…
Cancel
Save