1. 민원Bean(CrdnCvlcptBean)파일 수정(MainBean, SubBean으로 분할)

2. 답변문구관리mapper추가, 계도문문구관리mapper추가
3. 답변문구설정 조회 쿼리 추가
main
이범준 1 year ago
parent bb266513c4
commit f22861f65f

@ -26,7 +26,7 @@ import cokr.xit.fims.crdn.dao.CrdnUpdtMapper;
import cokr.xit.fims.crdn.dao.GlobalStngMapper; import cokr.xit.fims.crdn.dao.GlobalStngMapper;
import cokr.xit.fims.crdn.service.CrdnService; import cokr.xit.fims.crdn.service.CrdnService;
import cokr.xit.fims.cvlc.dao.CrdnCvlcptMapper; import cokr.xit.fims.cvlc.dao.CrdnCvlcptMapper;
import cokr.xit.fims.cvlc.service.bean.CrdnCvlcptBean; import cokr.xit.fims.cvlc.service.bean.CrdnCvlcptMainBean;
import cokr.xit.fims.excl.LevyExcl; import cokr.xit.fims.excl.LevyExcl;
import cokr.xit.fims.excl.service.bean.Excl01Bean; import cokr.xit.fims.excl.service.bean.Excl01Bean;
import cokr.xit.foundation.component.AbstractServiceBean; import cokr.xit.foundation.component.AbstractServiceBean;
@ -59,8 +59,8 @@ public class CrdnServiceBean extends AbstractServiceBean implements CrdnService
@Resource(name="crdnStngBean") @Resource(name="crdnStngBean")
protected CrdnStngBean crdnStngBean; protected CrdnStngBean crdnStngBean;
@Resource(name="crdnCvlcptBean") @Resource(name="crdnCvlcptMainBean")
protected CrdnCvlcptBean crdnCvlcptBean; protected CrdnCvlcptMainBean crdnCvlcptMainBean;
@Resource(name="crdnBean") @Resource(name="crdnBean")
protected CrdnBean crdnBean; protected CrdnBean crdnBean;

@ -0,0 +1,47 @@
package cokr.xit.fims.cvlc.dao;
import java.util.List;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import cokr.xit.fims.crdn.CrdnQuery;
import cokr.xit.foundation.component.AbstractMapper;
import cokr.xit.foundation.data.DataObject;
/** DAO
* @author leebj
*/
@Mapper("answerWordsMapper")
public interface AnswerWordsMapper extends AbstractMapper {
/** .
* @param crdnQuery
* @return
*/
DataObject selectCvlcptAnswerBasicWordsInfo(CrdnQuery crdnQuery);
/** .
* @param crdnQuery
* @return
*/
DataObject selectCvlcptAnswerWordsInfo(CrdnQuery crdnQuery);
/** .
* @param crdnQuery
* @return
*/
List<DataObject> selectLevyCaseWordsList(CrdnQuery crdnQuery);
/** .
* @param crdnQuery
* @return
*/
List<DataObject> selectWarningCaseWordsList(CrdnQuery crdnQuery);
/** .
* @param crdnQuery
* @return
*/
List<DataObject> selectNonlevyCaseWordsList(CrdnQuery crdnQuery);
}

@ -97,23 +97,11 @@ public interface CrdnCvlcptMapper extends AbstractMapper {
*/ */
List<DataObject> selectCivilComplaintList(CrdnQuery query); List<DataObject> selectCivilComplaintList(CrdnQuery query);
/** . /** .
* @param query * @param crdnId ID
* @return * @return
*/ */
DataObject selectAnswerPreview(CrdnQuery query); DataObject selectAnswerPreview(String crdnId);
/** .
* @param params
* @return
*/
DataObject selectCvlcptAnswerWordsInfo(CrdnQuery crdnQuery);
/** .
* @param params
* @return
*/
DataObject selectCvlcptAnswerBasicWordsInfo(CrdnQuery crdnQuery);
/** . /** .
* @param crdnCvlcpt * @param crdnCvlcpt

@ -0,0 +1,23 @@
package cokr.xit.fims.cvlc.dao;
import java.util.List;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import cokr.xit.fims.crdn.CrdnQuery;
import cokr.xit.foundation.component.AbstractMapper;
import cokr.xit.foundation.data.DataObject;
/** DAO
* @author leebj
*/
@Mapper("warningWordsMapper")
public interface WarningWordsMapper extends AbstractMapper {
/** .
* @param crdnQuery
* @return
*/
List<DataObject> selectWarningWordsInfo(CrdnQuery crdnQuery);
}

@ -23,13 +23,13 @@ public interface CrdnCvlcptService {
*/ */
DataObject getCivilComplaintReceiptInitialDataInfo(CrdnQuery query); DataObject getCivilComplaintReceiptInitialDataInfo(CrdnQuery query);
/** . /** .
* @param query * @param query
* @return * @return
*/ */
DataObject getCivilComplaintOriginalInfo(CrdnQuery query); DataObject getCivilComplaintOriginalInfo(CrdnQuery query);
/** . /** .
* @param query * @param query
* @return * @return
*/ */
@ -44,13 +44,13 @@ public interface CrdnCvlcptService {
*/ */
Map<String, String> makeFileFromHwpFormat(CrdnQuery query); Map<String, String> makeFileFromHwpFormat(CrdnQuery query);
/** (). /** ().
* @param crdnID ID * @param crdnID ID
* @return * @return
*/ */
boolean sendBackCivilComplaintInfo(String crdnId); boolean sendBackCivilComplaintInfo(String crdnId);
/** . /** .
* @param nonQueryRequest , crdnCvlcpt , crdn , newFileInfoList * @param nonQueryRequest , crdnCvlcpt , crdn , newFileInfoList
* @return * @return
*/ */
@ -74,4 +74,21 @@ public interface CrdnCvlcptService {
*/ */
boolean updateAnswerTargetProcessStatus(String processType, String[] crdnIDs); boolean updateAnswerTargetProcessStatus(String processType, String[] crdnIDs);
/** .
* @param crdnQuery
* @return map
* <ul><li>basic: </li>
* <li>levyCaseList: </li>
* <li>warningCaseList: </li>
* <li>nonlevyCaseList: </li>
* </ul>
*/
Map<String, Object> getCvlcptAnswerWordsInfo(CrdnQuery crdnQuery);
/** .
* @param crdnQuery
* @return
*/
List<DataObject> getWarningWordsInfo(CrdnQuery crdnQuery);
} }

@ -2,7 +2,7 @@ package cokr.xit.fims.cvlc.service.bean;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;
import java.util.Map; import java.util.List;
import javax.annotation.Resource; import javax.annotation.Resource;
@ -10,13 +10,13 @@ import org.springframework.stereotype.Component;
import cokr.xit.base.user.ManagedUser; import cokr.xit.base.user.ManagedUser;
import cokr.xit.base.user.dao.UserMapper; import cokr.xit.base.user.dao.UserMapper;
import cokr.xit.fims.crdn.Crdn;
import cokr.xit.fims.crdn.CrdnQuery; import cokr.xit.fims.crdn.CrdnQuery;
import cokr.xit.fims.crdn.dao.CrdnInfoMapper; import cokr.xit.fims.crdn.dao.CrdnInfoMapper;
import cokr.xit.fims.crdn.dao.CrdnInstMapper; import cokr.xit.fims.crdn.dao.CrdnInstMapper;
import cokr.xit.fims.crdn.dao.CrdnUpdtMapper; import cokr.xit.fims.crdn.dao.CrdnUpdtMapper;
import cokr.xit.fims.crdn.dao.GlobalStngMapper; import cokr.xit.fims.crdn.dao.GlobalStngMapper;
import cokr.xit.fims.cvlc.CrdnCvlcpt; import cokr.xit.fims.cvlc.CrdnCvlcpt;
import cokr.xit.fims.cvlc.dao.AnswerWordsMapper;
import cokr.xit.fims.cvlc.dao.CrdnCvlcptMapper; import cokr.xit.fims.cvlc.dao.CrdnCvlcptMapper;
import cokr.xit.foundation.AbstractComponent; import cokr.xit.foundation.AbstractComponent;
import cokr.xit.foundation.UserInfo; import cokr.xit.foundation.UserInfo;
@ -24,15 +24,18 @@ import cokr.xit.foundation.data.DataObject;
import cokr.xit.interfaces.smg.Petition; import cokr.xit.interfaces.smg.Petition;
import cokr.xit.interfaces.smg.service.bean.SmgSenderBean; import cokr.xit.interfaces.smg.service.bean.SmgSenderBean;
/** Bean /** Bean
* @author leebj * @author leebj
*/ */
@Component("crdnCvlcptBean") @Component("crdnCvlcptMainBean")
public class CrdnCvlcptBean extends AbstractComponent { public class CrdnCvlcptMainBean extends AbstractComponent {
@Resource(name="smgSenderBean") @Resource(name="smgSenderBean")
protected SmgSenderBean smgSenderBean; protected SmgSenderBean smgSenderBean;
@Resource(name = "answerWordsMapper")
private AnswerWordsMapper answerWordsMapper;
@Resource(name = "crdnCvlcptMapper") @Resource(name = "crdnCvlcptMapper")
private CrdnCvlcptMapper crdnCvlcptMapper; private CrdnCvlcptMapper crdnCvlcptMapper;
@ -73,28 +76,6 @@ public class CrdnCvlcptBean extends AbstractComponent {
return crdnCvlcptMapper.updateCvlcptPrcsSe(cvlcpt) == 1 ? true : false; return crdnCvlcptMapper.updateCvlcptPrcsSe(cvlcpt) == 1 ? true : false;
} }
/** .
* @param nonQueryRequest , crdn
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
public boolean updateCrdn(Map<String, Object> nonQueryRequest, Crdn crdn) {
DataObject params = new DataObject();
UserInfo userInfo = currentUser();
params.set("currentUser", userInfo);
params.set("crdn", crdn);
for(String key : nonQueryRequest.keySet()){
params.set(key, nonQueryRequest.get(key));
}
if(crdnCvlcptMapper.updateCrdn(params) != 1) {
return false;
}
return crdnCvlcptMapper.updateCrdnAddition(params) == 1 ? true : false;
}
/** . /** .
* @param cvlcptLinkId * @param cvlcptLinkId
* @return * @return
@ -109,28 +90,6 @@ public class CrdnCvlcptBean extends AbstractComponent {
return crdnCvlcptMapper.initCvlcptPrcsRsltCn(crdnCvlcpt) == 1 ? true : false; return crdnCvlcptMapper.initCvlcptPrcsRsltCn(crdnCvlcpt) == 1 ? true : false;
} }
/** .
* @param crdnId ID
* @return ID
*/
public String insertCrdnFromSelect(String crdnId) {
DataObject params = new DataObject();
UserInfo userInfo = currentUser();
params.set("currentUser", userInfo);
params.set("crdnId", crdnId);
if(crdnCvlcptMapper.insertCrdnFromSelect(params) != 1) {
throw new RuntimeException("단속민원 복사 등록 중 단속대장 등록에 실패하였습니다.");
}
if(crdnCvlcptMapper.insertCrdnAdditionFromSelect(params) != 1) {
throw new RuntimeException("단속민원 복사 등록 중 단속대장 등록에 실패하였습니다.");
}
return (String)params.get("newCrdnId");
}
/** . /** .
* @param crdnId ID * @param crdnId ID
* @return * @return
@ -159,8 +118,8 @@ public class CrdnCvlcptBean extends AbstractComponent {
return ""; return "";
} }
DataObject bodyWordsInfo = crdnCvlcptMapper.selectCvlcptAnswerWordsInfo(crdnQuery); DataObject bodyWordsInfo = answerWordsMapper.selectCvlcptAnswerWordsInfo(crdnQuery);
DataObject basicWordsInfo = crdnCvlcptMapper.selectCvlcptAnswerBasicWordsInfo(crdnQuery); DataObject basicWordsInfo = answerWordsMapper.selectCvlcptAnswerBasicWordsInfo(crdnQuery);
String body = bodyWordsInfo.string("PRCS_RSLT_CN"); String body = bodyWordsInfo.string("PRCS_RSLT_CN");
String head = basicWordsInfo.string("HEADER_CN"); String head = basicWordsInfo.string("HEADER_CN");
@ -255,4 +214,30 @@ public class CrdnCvlcptBean extends AbstractComponent {
return smgSenderBean.createReply(petition); return smgSenderBean.createReply(petition);
} }
/** .
* @param query
* @return
*/
public DataObject selectCvlcptAnswerBasicWordsInfo(CrdnQuery crdnQuery) {
return answerWordsMapper.selectCvlcptAnswerBasicWordsInfo(crdnQuery);
}
/** .
* @param query , ansSeCd
* @return
*/
public List<DataObject> selectAnswerBodyWordsList(CrdnQuery crdnQuery, String ansSeCd) {
if("3".equals(ansSeCd)) {
return answerWordsMapper.selectLevyCaseWordsList(crdnQuery);
} else if("2".equals(ansSeCd)) {
return answerWordsMapper.selectWarningCaseWordsList(crdnQuery);
} else if("1".equals(ansSeCd)) {
return answerWordsMapper.selectNonlevyCaseWordsList(crdnQuery);
} else {
return null;
}
}
} }

@ -5,6 +5,7 @@ import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Date; import java.util.Date;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -35,6 +36,7 @@ import cokr.xit.fims.crdn.dao.CrdnUpdtMapper;
import cokr.xit.fims.crdn.dao.GlobalStngMapper; import cokr.xit.fims.crdn.dao.GlobalStngMapper;
import cokr.xit.fims.crdn.service.bean.CrdnStngBean; import cokr.xit.fims.crdn.service.bean.CrdnStngBean;
import cokr.xit.fims.cvlc.CrdnCvlcpt; import cokr.xit.fims.cvlc.CrdnCvlcpt;
import cokr.xit.fims.cvlc.dao.AnswerWordsMapper;
import cokr.xit.fims.cvlc.dao.CrdnCvlcptMapper; import cokr.xit.fims.cvlc.dao.CrdnCvlcptMapper;
import cokr.xit.fims.cvlc.service.CrdnCvlcptService; import cokr.xit.fims.cvlc.service.CrdnCvlcptService;
import cokr.xit.fims.excl.LevyExcl; import cokr.xit.fims.excl.LevyExcl;
@ -53,8 +55,11 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv
@Resource(name="fileBean") @Resource(name="fileBean")
private FileBean fileBean; private FileBean fileBean;
@Resource(name="crdnCvlcptBean") @Resource(name="crdnCvlcptMainBean")
protected CrdnCvlcptBean crdnCvlcptBean; protected CrdnCvlcptMainBean crdnCvlcptMainBean;
@Resource(name="crdnCvlcptSubBean")
protected CrdnCvlcptSubBean crdnCvlcptSubBean;
@Resource(name="crdnStngBean") @Resource(name="crdnStngBean")
private CrdnStngBean crdnStngBean; private CrdnStngBean crdnStngBean;
@ -62,6 +67,9 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv
@Resource(name="excl01Bean") @Resource(name="excl01Bean")
private Excl01Bean excl01Bean; private Excl01Bean excl01Bean;
@Resource(name = "answerWordsMapper")
private AnswerWordsMapper answerWordsMapper;
@Resource(name = "crdnCvlcptMapper") @Resource(name = "crdnCvlcptMapper")
private CrdnCvlcptMapper crdnCvlcptMapper; private CrdnCvlcptMapper crdnCvlcptMapper;
@ -111,7 +119,7 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv
String attachFormatFilePath = ("classpath:format/cvlcptOrgnl_photo.hwp"); String attachFormatFilePath = ("classpath:format/cvlcptOrgnl_photo.hwp");
query.setViewType("hwp"); query.setViewType("hwp");
DataObject dataObject = crdnCvlcptBean.getCivilComplaintOriginalInfo(query); DataObject dataObject = crdnCvlcptMainBean.getCivilComplaintOriginalInfo(query);
SimpleDateFormat ymdhmsFormat = new SimpleDateFormat("yyyyMMddHHmmss"); SimpleDateFormat ymdhmsFormat = new SimpleDateFormat("yyyyMMddHHmmss");
SimpleDateFormat ymdFormat = new SimpleDateFormat("yyyyMMdd"); SimpleDateFormat ymdFormat = new SimpleDateFormat("yyyyMMdd");
SimpleDateFormat ymdHypenFormat = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat ymdHypenFormat = new SimpleDateFormat("yyyy-MM-dd");
@ -225,16 +233,16 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv
@Override @Override
public DataObject getCivilComplaintOriginalInfo(CrdnQuery query) { public DataObject getCivilComplaintOriginalInfo(CrdnQuery query) {
return crdnCvlcptBean.getCivilComplaintOriginalInfo(query); return crdnCvlcptMainBean.getCivilComplaintOriginalInfo(query);
} }
@Override @Override
public DataObject getAnswerPreview(CrdnQuery query) { public DataObject getAnswerPreview(CrdnQuery query) {
DataObject dataObject = crdnCvlcptMapper.selectAnswerPreview(query); DataObject dataObject = crdnCvlcptMapper.selectAnswerPreview(query.getCrdnId());
//저장된 답변이 없으면 //저장된 답변이 없으면
if(ifEmpty(dataObject.string("CVLCPT_PRCS_RSLT_CN"), () -> "").equals("")) { if(ifEmpty(dataObject.string("CVLCPT_PRCS_RSLT_CN"), () -> "").equals("")) {
String resultWords = crdnCvlcptBean.mappingAnswerWords(query.getCrdnId()); String resultWords = crdnCvlcptMainBean.mappingAnswerWords(query.getCrdnId());
dataObject.set("CVLCPT_PRCS_RSLT_CN", resultWords); dataObject.set("CVLCPT_PRCS_RSLT_CN", resultWords);
} }
@ -298,13 +306,13 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv
CrdnCvlcpt crdnCvlcpt = new CrdnCvlcpt(); CrdnCvlcpt crdnCvlcpt = new CrdnCvlcpt();
crdnCvlcpt.setCvlcptLinkId(crdnInfo.string("CVLCPT_LINK_ID")); crdnCvlcpt.setCvlcptLinkId(crdnInfo.string("CVLCPT_LINK_ID"));
crdnCvlcpt.setCvlcptPrcsCd("01"); crdnCvlcpt.setCvlcptPrcsCd("01");
boolean retSuccess = crdnCvlcptBean.updateCvlcptPrcsSe(crdnCvlcpt); boolean retSuccess = crdnCvlcptMainBean.updateCvlcptPrcsSe(crdnCvlcpt);
if (!retSuccess) { if (!retSuccess) {
throw new RuntimeException("반송 처리 중 단속민원답변 수정에 실패하였습니다."); throw new RuntimeException("반송 처리 중 단속민원답변 수정에 실패하였습니다.");
} }
boolean result = crdnCvlcptBean.insertTransmitInfo(true, crdnInfo.string("CVLCPT_LINK_ID")); boolean result = crdnCvlcptMainBean.insertTransmitInfo(true, crdnInfo.string("CVLCPT_LINK_ID"));
if (!result) { if (!result) {
throw new RuntimeException("반송 처리 중 전송자료 등록에 실패하였습니다."); throw new RuntimeException("반송 처리 중 전송자료 등록에 실패하였습니다.");
} }
@ -370,7 +378,7 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv
boolean retSuccess = false; boolean retSuccess = false;
// 답변내용 초기화 // 답변내용 초기화
retSuccess = crdnCvlcptBean.initCvlcptPrcsRsltCn(crdnCvlcpt.getCvlcptLinkId()); retSuccess = crdnCvlcptMainBean.initCvlcptPrcsRsltCn(crdnCvlcpt.getCvlcptLinkId());
if (!retSuccess) { if (!retSuccess) {
throw new RuntimeException("민원자료 저장 중 단속민원 대장의 민원처리결과내용 초기화에 실패하였습니다."); throw new RuntimeException("민원자료 저장 중 단속민원 대장의 민원처리결과내용 초기화에 실패하였습니다.");
} }
@ -394,7 +402,7 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv
} }
// 민원 답변 문구(TB_CVLCPT_ANS_WORDS) 대장 조회 // 민원 답변 문구(TB_CVLCPT_ANS_WORDS) 대장 조회
DataObject infoCvlcptAnsWords = crdnCvlcptMapper.selectCvlcptAnswerWordsInfo(crdnQuery); DataObject infoCvlcptAnsWords = answerWordsMapper.selectCvlcptAnswerWordsInfo(crdnQuery);
if(acceptType.equals("someAccept") || acceptType.equals("nonAccept")) { //일부수용,불수용 if(acceptType.equals("someAccept") || acceptType.equals("nonAccept")) { //일부수용,불수용
// 비부과(서손)사유가 민원 답변대상인가? 민원 답변 문구(TB_CVLCPT_ANS_WORDS) 대장에 답변 사유 코드가 존재한다면.. // 비부과(서손)사유가 민원 답변대상인가? 민원 답변 문구(TB_CVLCPT_ANS_WORDS) 대장에 답변 사유 코드가 존재한다면..
@ -423,7 +431,7 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv
crdnCvlcpt.setCvlcptTrsmCd(newCvlcptTrsmCd); // 민원 전송 코드 crdnCvlcpt.setCvlcptTrsmCd(newCvlcptTrsmCd); // 민원 전송 코드
//민원처리정보 변경 //민원처리정보 변경
retSuccess = crdnCvlcptBean.updateCvlcptPrcsSe(crdnCvlcpt); retSuccess = crdnCvlcptMainBean.updateCvlcptPrcsSe(crdnCvlcpt);
if (!retSuccess) { if (!retSuccess) {
throw new RuntimeException("민원자료 저장 중 단속민원답변 수정에 실패하였습니다."); throw new RuntimeException("민원자료 저장 중 단속민원답변 수정에 실패하였습니다.");
@ -487,7 +495,7 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv
//단속정보변경 //단속정보변경
saved = crdnCvlcptBean.updateCrdn(nonQueryRequest, crdn); saved = crdnCvlcptSubBean.updateCrdn(nonQueryRequest, crdn);
if(!saved) { if(!saved) {
throw new RuntimeException("단속민원답변 수정 중 단속정보변경에 실패하였습니다."); throw new RuntimeException("단속민원답변 수정 중 단속정보변경에 실패하였습니다.");
} }
@ -574,7 +582,7 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv
List<DataObject> orgnlCrdnFileList = fileBean.getFileList(fileQuery); List<DataObject> orgnlCrdnFileList = fileBean.getFileList(fileQuery);
String newCrdnId = crdnCvlcptBean.insertCrdnFromSelect(crdnId); String newCrdnId = crdnCvlcptSubBean.insertCrdnFromSelect(crdnId);
if(ifEmpty(newCrdnId, () -> "").equals("")) { if(ifEmpty(newCrdnId, () -> "").equals("")) {
throw new RuntimeException("단속민원 복사 등록 중 단속대장 등록에 실패하였습니다."); throw new RuntimeException("단속민원 복사 등록 중 단속대장 등록에 실패하였습니다.");
} }
@ -628,7 +636,7 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv
if(processType.equals("answerExecute")) { if(processType.equals("answerExecute")) {
crdnCvlcpt.setCvlcptTrsmCd("04"); crdnCvlcpt.setCvlcptTrsmCd("04");
if(ifEmpty(targetDataList.get(i).string("CVLCPT_PRCS_RSLT_CN"), () -> "").equals("")) { if(ifEmpty(targetDataList.get(i).string("CVLCPT_PRCS_RSLT_CN"), () -> "").equals("")) {
String answerWords = crdnCvlcptBean.mappingAnswerWords(targetDataList.get(i).string("CRDN_ID")); String answerWords = crdnCvlcptMainBean.mappingAnswerWords(targetDataList.get(i).string("CRDN_ID"));
crdnCvlcpt.setCvlcptPrcsRsltCn(answerWords); crdnCvlcpt.setCvlcptPrcsRsltCn(answerWords);
} }
} else if(processType.equals("answerComplete")){ } else if(processType.equals("answerComplete")){
@ -659,7 +667,7 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv
if(processType.equals("answerExecute")) { if(processType.equals("answerExecute")) {
boolean result = crdnCvlcptBean.insertTransmitInfo(false, targetDataList.get(i).string("CVLCPT_LINK_ID")); boolean result = crdnCvlcptMainBean.insertTransmitInfo(false, targetDataList.get(i).string("CVLCPT_LINK_ID"));
if (!result) { if (!result) {
throw new RuntimeException("민원 전송 상태 변경 중 전송자료 등록에 실패하였습니다."); throw new RuntimeException("민원 전송 상태 변경 중 전송자료 등록에 실패하였습니다.");
} }
@ -669,5 +677,26 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv
return true; return true;
} }
@Override
public Map<String, Object> getCvlcptAnswerWordsInfo(CrdnQuery crdnQuery) {
Map<String,Object> wordsStngInfo = new HashMap<String, Object>();
DataObject basic = crdnCvlcptMainBean.selectCvlcptAnswerBasicWordsInfo(crdnQuery);
List<DataObject> levyCaseList = crdnCvlcptMainBean.selectAnswerBodyWordsList(crdnQuery,"3");
List<DataObject> warningCaseList = crdnCvlcptMainBean.selectAnswerBodyWordsList(crdnQuery,"2");
List<DataObject> nonlevyCaseList = crdnCvlcptMainBean.selectAnswerBodyWordsList(crdnQuery,"1");
wordsStngInfo.put("basic", basic);
wordsStngInfo.put("levyCaseList", levyCaseList);
wordsStngInfo.put("warningCaseList", warningCaseList);
wordsStngInfo.put("nonlevyCaseList", nonlevyCaseList);
return wordsStngInfo;
}
@Override
public List<DataObject> getWarningWordsInfo(CrdnQuery crdnQuery) {
return crdnCvlcptSubBean.selectWarningWordsInfo(crdnQuery);
}
} }

@ -0,0 +1,82 @@
package cokr.xit.fims.cvlc.service.bean;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import org.springframework.stereotype.Component;
import cokr.xit.fims.crdn.Crdn;
import cokr.xit.fims.crdn.CrdnQuery;
import cokr.xit.fims.cvlc.dao.CrdnCvlcptMapper;
import cokr.xit.fims.cvlc.dao.WarningWordsMapper;
import cokr.xit.foundation.AbstractComponent;
import cokr.xit.foundation.UserInfo;
import cokr.xit.foundation.data.DataObject;
/** Bean
* @author leebj
*/
@Component("crdnCvlcptSubBean")
public class CrdnCvlcptSubBean extends AbstractComponent {
@Resource(name = "crdnCvlcptMapper")
private CrdnCvlcptMapper crdnCvlcptMapper;
@Resource(name = "warningWordsMapper")
private WarningWordsMapper warningWordsMapper;
/** .
* @param nonQueryRequest , crdn
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
public boolean updateCrdn(Map<String, Object> nonQueryRequest, Crdn crdn) {
DataObject params = new DataObject();
UserInfo userInfo = currentUser();
params.set("currentUser", userInfo);
params.set("crdn", crdn);
for(String key : nonQueryRequest.keySet()){
params.set(key, nonQueryRequest.get(key));
}
if(crdnCvlcptMapper.updateCrdn(params) != 1) {
return false;
}
return crdnCvlcptMapper.updateCrdnAddition(params) == 1 ? true : false;
}
/** .
* @param crdnId ID
* @return ID
*/
public String insertCrdnFromSelect(String crdnId) {
DataObject params = new DataObject();
UserInfo userInfo = currentUser();
params.set("currentUser", userInfo);
params.set("crdnId", crdnId);
if(crdnCvlcptMapper.insertCrdnFromSelect(params) != 1) {
throw new RuntimeException("단속자료 복사 등록 중 단속대장 등록에 실패하였습니다.");
}
if(crdnCvlcptMapper.insertCrdnAdditionFromSelect(params) != 1) {
throw new RuntimeException("단속자료 복사 등록 중 단속대장 등록에 실패하였습니다.");
}
return (String)params.get("newCrdnId");
}
/** .
* @param crdnQuery
* @return
*/
public List<DataObject> selectWarningWordsInfo(CrdnQuery crdnQuery) {
//TODO : warningWordsMapper.selectWarningWordsInfo(crdnQuery)
return null;
}
}

@ -5,11 +5,15 @@ import java.util.Map;
import javax.annotation.Resource; import javax.annotation.Resource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import cokr.xit.base.code.CommonCode; import cokr.xit.base.code.CommonCode;
import cokr.xit.base.web.ApplicationController; import cokr.xit.base.web.ApplicationController;
import cokr.xit.fims.crdn.CrdnQuery;
import cokr.xit.fims.crdn.dao.GlobalStngMapper;
import cokr.xit.fims.cvlc.service.CrdnCvlcptService; import cokr.xit.fims.cvlc.service.CrdnCvlcptService;
import cokr.xit.foundation.data.DataObject;
/** .<br /> /** .<br />
* { }/cvlc/cvlc05 . * { }/cvlc/cvlc05 .
@ -20,6 +24,9 @@ public class Cvlc05Controller extends ApplicationController {
@Resource(name="crdnCvlcptService") @Resource(name="crdnCvlcptService")
private CrdnCvlcptService crdnCvlcptService; private CrdnCvlcptService crdnCvlcptService;
@Resource(name="globalStngMapper")
private GlobalStngMapper globalStngMapper;
/** . /** .
* @return fims/cvlc/cvlc05010-main * @return fims/cvlc/cvlc05010-main
*/ */
@ -27,6 +34,7 @@ public class Cvlc05Controller extends ApplicationController {
ModelAndView mav = new ModelAndView(); ModelAndView mav = new ModelAndView();
mav.setViewName("fims/cvlc/cvlc05010-main"); mav.setViewName("fims/cvlc/cvlc05010-main");
mav.addObject("pageName", "cvlc05010-main"); mav.addObject("pageName", "cvlc05010-main");
mav.addObject("module", "type='module'");
Map<String, List<CommonCode>> commonCodes = getCodesOf("FIM054"); Map<String, List<CommonCode>> commonCodes = getCodesOf("FIM054");
mav.addObject("FIM054List", commonCodes.get("FIM054")); mav.addObject("FIM054List", commonCodes.get("FIM054"));
@ -34,4 +42,36 @@ public class Cvlc05Controller extends ApplicationController {
return mav; return mav;
} }
/** .
* @return fims/cvlc/cvlc05010-info
*/
@RequestMapping(name="민원신고 답변 문구 설정 조회", value="/010/info.do")
public ModelAndView getCvlcptAnswerWordsInfo(CrdnQuery crdnQuery) {
ModelAndView mav = new ModelAndView();
mav.setViewName("jsonView");
String currentSggCd = globalStngMapper.selectSggCdForCurrentUser();
crdnQuery.setSggCd(currentSggCd);
Map<String, Object> info = crdnCvlcptService.getCvlcptAnswerWordsInfo(crdnQuery);
DataObject basicInfo = (DataObject) info.get("basic");
List<DataObject> levyCaseList = (List<DataObject>) info.get("levyCaseList");
List<DataObject> warningCaseList = (List<DataObject>) info.get("warningCaseList");
List<DataObject> nonlevyCaseList = (List<DataObject>) info.get("nonlevyCaseList");
if(basicInfo == null){
mav.addObject("headerCn", "");
mav.addObject("footerCn", "");
} else {
mav.addObject("headerCn", basicInfo.string("HEADER_CN"));
mav.addObject("footerCn", basicInfo.string("FOOTER_CN"));
}
mav.addObject("levyCaseList", levyCaseList);
mav.addObject("warningCaseList", warningCaseList);
mav.addObject("nonlevyCaseList", nonlevyCaseList);
return mav;
}
} }

@ -0,0 +1,99 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cokr.xit.fims.cvlc.dao.AnswerWordsMapper">
<select id="selectCvlcptAnswerBasicWordsInfo" parameterType="cokr.xit.fims.crdn.CrdnQuery" resultType="dataobject">
/* 민원답변기본문구 대장 객체 가져오기(answerWordsMapper.selectCvlcptAnswerBasicWordsInfo) */
SELECT A.HEADER_CN
, A.FOOTER_CN
FROM TB_CVLCPT_BSC_WORDS A
WHERE A.SGG_CD = #{sggCd} /* 시군구 코드 */
AND A.TASK_SE_CD = #{taskSeCd} /* 업무 구분 코드 */
</select>
<select id="selectCvlcptAnswerWordsInfo" parameterType="cokr.xit.fims.crdn.CrdnQuery" resultType="dataobject">
/* 민원답변문구 대장 객체 가져오기(answerWordsMapper.selectCvlcptAnswerWordsInfo) */
SELECT A.ANS_WORDS_ID /* 답변 문구 ID */
, A.PRCS_RSLT_CN /* 처리 결과 내용 */
FROM TB_CVLCPT_ANS_WORDS A
WHERE A.SGG_CD = #{sggCd} /* 시군구 코드 */
AND A.TASK_SE_CD = #{taskSeCd} /* 업무 구분 코드 */
AND A.ANS_RSN_CD = #{ansRsnCd} /* 답변 사유 코드 */
<if test="taskSeCd == 'DPV' and ansRsnCd == '01' ">
<choose>
<when test='dstrbncYn == "Y"'>
AND A.DSTRBNC_YN = 'Y' /* 방해 여부 */
</when>
<otherwise>
AND A.DSTRBNC_YN = 'N' /* 방해 여부 */
</otherwise>
</choose>
</if>
AND A.USE_YN = 'Y' /* 사용 여부 */
</select>
<select id="selectLevyCaseWordsList" parameterType="cokr.xit.fims.crdn.CrdnQuery" resultType="dataobject">
/* 부과처리건 답변문구 목록 조회(answerWordsMapper.selectLevyCaseWordsList) */
SELECT (CASE
WHEN B.DSTRBNC_YN = 'Y'
THEN CONCAT(A.VLTN_CD,'D')
ELSE A.VLTN_CD
END) AS VLTN_CASE_ID
, (CASE
WHEN B.DSTRBNC_YN = 'Y'
THEN CONCAT(A.VLTN_ARTCL,'(1면방해)')
ELSE A.VLTN_ARTCL
END) AS VLTN_CASE_NM
, B.ANS_WORDS_ID
, B.PRCS_RSLT_CN
FROM TB_VLTN_INFO A
LEFT OUTER JOIN TB_CVLCPT_ANS_WORDS B
ON (A.SGG_CD = B.SGG_CD
AND A.TASK_SE_CD = B.TASK_SE_CD
AND CONCAT('3',A.VLTN_CD) = B.ANS_RSN_CD
AND B.USE_YN = 'Y'
AND B.ANS_SE_CD = '3')
WHERE A.SGG_CD = #{sggCd} /* 시군구 코드 */
AND A.TASK_SE_CD = #{taskSeCd} /* 업무 구분 코드 */
ORDER BY A.VLTN_CD
</select>
<select id="selectWarningCaseWordsList" parameterType="cokr.xit.fims.crdn.CrdnQuery" resultType="dataobject">
/* 계도처리건 답변문구 목록 조회(answerWordsMapper.selectWarningCaseWordsList) */
SELECT A.CODE AS LEVY_EXCL_RSN_CD
, A.CODE_VAL AS LEVY_EXCL_RSN_NM
, B.ANS_WORDS_ID
, B.PRCS_RSLT_CN
FROM TB_CMN_CODE A
LEFT OUTER JOIN TB_CVLCPT_ANS_WORDS B
ON (A.CODE = B.ANS_RSN_CD
AND B.USE_YN = 'Y'
AND B.ANS_SE_CD = '2'
AND B.SGG_CD = #{sggCd}
AND B.TASK_SE_CD = #{taskSeCd}
)
WHERE A.GRP_ID = 'FIM022'
AND A.CODE LIKE '2%'
ORDER BY A.CODE
</select>
<select id="selectNonlevyCaseWordsList" parameterType="cokr.xit.fims.crdn.CrdnQuery" resultType="dataobject">
/* 미부과처리건 답변문구 목록 조회(answerWordsMapper.selectNonlevyCaseWordsList) */
SELECT A.CODE AS LEVY_EXCL_RSN_CD
, A.CODE_VAL AS LEVY_EXCL_RSN_NM
, B.ANS_WORDS_ID
, B.PRCS_RSLT_CN
FROM TB_CMN_CODE A
LEFT OUTER JOIN TB_CVLCPT_ANS_WORDS B
ON (A.CODE = B.ANS_RSN_CD
AND B.USE_YN = 'Y'
AND B.ANS_SE_CD = '1'
AND B.SGG_CD = #{sggCd}
AND B.TASK_SE_CD = #{taskSeCd}
)
WHERE A.GRP_ID = 'FIM022'
AND A.CODE LIKE '1%'
ORDER BY A.CODE
</select>
</mapper>

@ -618,37 +618,8 @@ AND (SELECT VLTN_ARTCL FROM TB_VLTN_INFO WHERE VLTN_ID = C.VLTN_ID) LIKE CONCAT(
<include refid="utility.paging-suffix"/> <include refid="utility.paging-suffix"/>
</select> </select>
<select id="selectCvlcptAnswerWordsInfo" parameterType="cokr.xit.fims.crdn.CrdnQuery" resultType="dataobject">
/* 민원답변문구 대장 객체 가져오기(crdnCvlcptMapper.selectCvlcptAnswerWordsInfo) */
SELECT A.ANS_WORDS_ID /* 답변 문구 ID */
, A.PRCS_RSLT_CN /* 처리 결과 내용 */
FROM TB_CVLCPT_ANS_WORDS A
WHERE A.SGG_CD = #{sggCd} /* 시군구 코드 */
AND A.TASK_SE_CD = #{taskSeCd} /* 업무 구분 코드 */
AND A.ANS_RSN_CD = #{ansRsnCd} /* 답변 사유 코드 */
<if test="taskSeCd == 'DPV' and ansRsnCd == '01' ">
<choose>
<when test='dstrbncYn == "Y"'>
AND A.DSTRBNC_YN = 'Y' /* 방해 여부 */
</when>
<otherwise>
AND A.DSTRBNC_YN = 'N' /* 방해 여부 */
</otherwise>
</choose>
</if>
AND A.USE_YN = 'Y' /* 사용 여부 */
</select>
<select id="selectCvlcptAnswerBasicWordsInfo" parameterType="cokr.xit.fims.crdn.CrdnQuery" resultType="dataobject">
/* 민원답변기본문구 대장 객체 가져오기(crdnCvlcptMapper.selectCvlcptAnswerBasicWordsInfo) */
SELECT A.HEADER_CN
, A.FOOTER_CN
FROM TB_CVLCPT_BSC_WORDS A
WHERE A.SGG_CD = #{sggCd} /* 시군구 코드 */
AND A.TASK_SE_CD = #{taskSeCd} /* 업무 구분 코드 */
</select>
<select id="selectAnswerPreview" parameterType="map" resultType="dataobject"> <select id="selectAnswerPreview" parameterType="string" resultType="dataobject">
/* 민원답변 미리보기(crdnCvlcptMapper.selectAnswerPreview) */ /* 민원답변 미리보기(crdnCvlcptMapper.selectAnswerPreview) */
SELECT C.CRDN_ID <!-- 단속 ID --> SELECT C.CRDN_ID <!-- 단속 ID -->
, CC.CVLCPT_LINK_ID <!-- 민원 연계 ID --> , CC.CVLCPT_LINK_ID <!-- 민원 연계 ID -->

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cokr.xit.fims.cvlc.dao.WarningWordsMapper">
</mapper>
Loading…
Cancel
Save