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