feat: 민원신고답변 생성 반영

main
minuk926 2 years ago
parent 8d572194d0
commit 22c60fdef9

@ -282,20 +282,25 @@ public class FimsCrackdownMgtService implements IFimsCrackdownMgtService {
ecCtznSttemntMapper.updateCvplProcessResultOfEcCtznSttemntAnswer(dto); ecCtznSttemntMapper.updateCvplProcessResultOfEcCtznSttemntAnswer(dto);
} }
@Override
public void addCtznStmtAnswers(List<String> interfaceSeqList) {
interfaceSeqList.forEach(this::addCtznStmtAnswer);
}
@Override @Override
@Transactional @Transactional
public String addCtznStmtAnswer(final CtznStmtDTO.Ans dto) { public String addCtznStmtAnswer(final String interfaceSeqN) {
// 답변 xml 파일 생성 // 답변 xml 파일 생성
List<CmmFileDTO.FileDtl> fileDtlList = cmmFileService.findFilesByJobSeCodeAndJobId( List<CmmFileDTO.FileDtl> fileDtlList = cmmFileService.findFilesByJobSeCodeAndJobId(
CmmFileDTO.FileMst.builder() CmmFileDTO.FileMst.builder()
.jobSeCode(FimsConst.FileJobSeCode.NATL_NEWS_PAPER_RCV.getCode()) .jobSeCode(FimsConst.FileJobSeCode.NATL_NEWS_PAPER_RCV.getCode())
.fileJobId(dto.getInterfaceSeqN()+"01") .fileJobId(interfaceSeqN+"01")
.build()); .build());
String tgtPath = uploadResPath + fileDtlList.get(0).getFileCours(); String tgtPath = uploadResPath + fileDtlList.get(0).getFileCours();
final String fileName = dto.getInterfaceSeqN() + ".xml"; final String fileName = interfaceSeqN + ".xml";
CtznStmtDTO.Ans ansDTO = mapper.selectEcCtznSttemntAnswer(dto.getInterfaceSeqN()); CtznStmtDTO.Ans ansDTO = mapper.selectEcCtznSttemntAnswer(interfaceSeqN);
CtznStmtAnsSendDTO sendDto = CtznStmtDTO.Ans.getCtznStmtAnsDTO(ansDTO); CtznStmtAnsSendDTO sendDto = CtznStmtDTO.Ans.getCtznStmtAnsDTO(ansDTO);
String xmlStr = XmlParseUtils.writeObjectToXml(sendDto, kr.xit.fims.biz.ec.model.CtznStmtAnsSendDTO.class); String xmlStr = XmlParseUtils.writeObjectToXml(sendDto, kr.xit.fims.biz.ec.model.CtznStmtAnsSendDTO.class);
@ -318,9 +323,13 @@ public class FimsCrackdownMgtService implements IFimsCrackdownMgtService {
// //
// 시민신고 상태 - 답변완료 update // 시민신고 상태 - 답변완료 update
dto.setUpdusr(getUserInfo().getUniqId()); ecCtznSttemntMapper.updateStmtProcessStsOfEcCtznSttemnt(
dto.setCtznSttemntStatusCode(FimsConst.CtznStmtStsCode.ANS_COMPLETE.getCode()); CtznStmtDTO.Ans.builder()
ecCtznSttemntMapper.updateStmtProcessStsOfEcCtznSttemnt(dto); .interfaceSeqN(interfaceSeqN)
.ctznSttemntStatusCode(FimsConst.CtznStmtStsCode.ANS_COMPLETE.getCode())
.updusr(getUserInfo().getUniqId())
.build()
);
return tgtPath + "/" + fileName; return tgtPath + "/" + fileName;
} }

@ -27,11 +27,11 @@ public interface IFimsCrackdownMgtService {
CmmAnsTmplDTO.Dtl findCtznAnswerTmplInfo(final FimsCrackdownDTO.AnsRequest dto); CmmAnsTmplDTO.Dtl findCtznAnswerTmplInfo(final FimsCrackdownDTO.AnsRequest dto);
CtznStmtDTO.Ans findCtznStmtAnswer(final FimsCrackdownDTO.AnsRequest dto); CtznStmtDTO.Ans findCtznStmtAnswer(final FimsCrackdownDTO.AnsRequest dto);
void modifyCtznStmtAnswer(final CtznStmtDTO.Ans dto); void modifyCtznStmtAnswer(final CtznStmtDTO.Ans dto);
String addCtznStmtAnswer(final CtznStmtDTO.Ans dto); String addCtznStmtAnswer(final String interfaceSeqN);
void addCtznStmtAnswers(final List<String> interfaceSeqList);
default XitLoginVO getUserInfo(){ default XitLoginVO getUserInfo(){
return XitCmmnUtil.getUserInfo(); return XitCmmnUtil.getUserInfo();
} }
} }

@ -1,5 +1,6 @@
package kr.xit.fims.biz.cmm.web; package kr.xit.fims.biz.cmm.web;
import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Objects; import java.util.Objects;
@ -183,7 +184,6 @@ public class FimsCrackDownMgtController {
return mav; return mav;
} }
@RequestMapping(value = "/findCtznStmtAnswer") @RequestMapping(value = "/findCtznStmtAnswer")
public ModelAndView findCtznStmtAnswer(final FimsCrackdownDTO.AnsRequest dto){ public ModelAndView findCtznStmtAnswer(final FimsCrackdownDTO.AnsRequest dto){
return ResultResponse.of(service.findCtznStmtAnswer(dto)); return ResultResponse.of(service.findCtznStmtAnswer(dto));
@ -199,8 +199,16 @@ public class FimsCrackDownMgtController {
} }
@RequestMapping("/addCtznStmtAnswer") @RequestMapping("/addCtznStmtAnswer")
public ModelAndView addCtznStmtAnswer(final CtznStmtDTO.Ans dto) { public ModelAndView addCtznStmtAnswer(final String interfaceSeqN) {
return ResultResponse.of(service.addCtznStmtAnswer(dto)); return ResultResponse.of(service.addCtznStmtAnswer(interfaceSeqN));
}
@RequestMapping("/addCtznStmtAnswers")
public ModelAndView addCtznStmtAnswers(@RequestBody final List<String> interfaceSeqList) {
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
service.addCtznStmtAnswers(interfaceSeqList);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_SUCCESS);
return mav;
} }
@RequestMapping(value = "/findCtznAnswerTmplInfo") @RequestMapping(value = "/findCtznAnswerTmplInfo")

@ -11,6 +11,7 @@ import org.slf4j.LoggerFactory;
import com.fasterxml.jackson.core.JsonEncoding; import com.fasterxml.jackson.core.JsonEncoding;
import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import kr.xit.framework.support.util.AjaxMessageMapRenderer; import kr.xit.framework.support.util.AjaxMessageMapRenderer;
@ -36,6 +37,8 @@ public abstract class JSONExceptionMessageWriter {
JsonGenerator generator = null; JsonGenerator generator = null;
try { try {
//objectMapper.enable(JsonReadFeature.ALLOW_NON_NUMERIC_NUMBERS);
objectMapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true);
generator = objectMapper.getFactory().createGenerator(response.getOutputStream(), JsonEncoding.UTF8); generator = objectMapper.getFactory().createGenerator(response.getOutputStream(), JsonEncoding.UTF8);
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();

@ -92,10 +92,10 @@ Date Author Description
<a href="#" class="btn blue" id="btnImpose" title="부과(세올연계)">부과처리</a> <a href="#" class="btn blue" id="btnImpose" title="부과(세올연계)">부과처리</a>
</div> </div>
<div id="divAnswer"> <div id="divAnswer">
<a href="#" class="btn blue" id="btnOrgCtznView" title="민원내용원본">민원내용원본</a> <%-- <a href="#" class="btn blue" id="btnOrgCtznView" title="민원내용원본">민원내용원본</a>--%>
<a href="#" class="btn blue" id="btnAnswerPreview" title="답변내용미리보기">답변내용미리보기</a> <a href="#" class="btn blue" id="btnAnswerPreview" title="답변내용미리보기">답변내용미리보기</a>
<a href="#" class="btn blue" id="btnAnswer" title="답변등록">선택자료 답변등록</a> <a href="#" class="btn blue" id="btnAnswer" title="답변등록">선택자료 답변등록</a>
<a href="#" class="btn blue" id="btnAnswerCplt" title="개별답변완료">개별답변완료로 변경</a> <%-- <a href="#" class="btn blue" id="btnAnswerCplt" title="개별답변완료">개별답변완료로 변경</a>--%>
</div> </div>
</span> </span>
</span> </span>
@ -206,14 +206,6 @@ Date Author Description
,onClickGrid: function(props){ ,onClickGrid: function(props){
const selColumn = props.columnInfo.name; const selColumn = props.columnInfo.name;
switch (selColumn){ switch (selColumn){
// case 'vhcleNo':
// const gridDatas = ARR_GRID[CUR_TAB_IDX].store.data.rawData.map(d => {
// return {regltSeCode: d.regltSeCode, regltId: d.regltId, regltProcessSttusCode: d.regltProcessSttusCode}
// })
// ARR_NAV[CUR_TAB_IDX] = new PageNavigation(ARR_GRID[CUR_TAB_IDX], gridDatas, props.rowKey);
// fnBiz.pagePopup('total', ARR_NAV[CUR_TAB_IDX].gridInfo.curRowData);
// break;
case 'cvplRceptNo': case 'cvplRceptNo':
popupDiv = 'edit'; popupDiv = 'edit';
const rowDatas = ARR_GRID[CUR_TAB_IDX].store.data.rawData.map(d => { const rowDatas = ARR_GRID[CUR_TAB_IDX].store.data.rawData.map(d => {
@ -224,7 +216,6 @@ Date Author Description
break; break;
default: default:
popupDiv = '';
break; break;
} }
} }
@ -288,11 +279,6 @@ Date Author Description
} }
return answerSeCode; return answerSeCode;
} }
};
const fnTab0Biz = {
}; };
/************************************************************************** /**************************************************************************
@ -340,9 +326,6 @@ Date Author Description
let rowKey; let rowKey;
if(arrChecks.length > 0){ if(arrChecks.length > 0){
rowKey = arrChecks[0].rowKey; rowKey = arrChecks[0].rowKey;
<%--rowDatas = arrChecks.map(d => {--%>
<%-- return {tmplatId: '${ctznTmplatId}', answerSeCode: fnBiz.getAnswerSeCode(d.regltProcessSttusCode), resnCode: d.erppSeCode, interfaceSeqN: d.interfaceSeqN, vhcleNo: d.vhcleNo}--%>
<%--})--%>
} else { } else {
rowKey = ARR_GRID[CUR_TAB_IDX].store.data.rawData[0]?.rowKey; rowKey = ARR_GRID[CUR_TAB_IDX].store.data.rawData[0]?.rowKey;
} }
@ -367,13 +350,22 @@ Date Author Description
} }
}) })
// 중복제거
const datas = arrData.reduce(function(acc, current) { const datas = arrData.reduce(function(acc, current) {
if (acc.findIndex(({ interfaceSeqN }) => interfaceSeqN === current.interfaceSeqN) === -1) { if (acc.findIndex(({ interfaceSeqN }) => interfaceSeqN === current.interfaceSeqN) === -1) {
acc.push(current); acc.push(current.interfaceSeqN);
} }
return acc; return acc;
}, []); }, []);
alert(JSON.stringify(datas))
cmmAjax({
url: fimsApiUrl.ADD_CTZN_ANS_LIST
,contentType: 'application/json'
,data: JSON.stringify(datas)
,success: (res) => {
}
});
}); });
}); });
@ -612,14 +604,10 @@ Date Author Description
return {regltId: d.regltId, regltSeCode: d.regltSeCode, regltProcessSttusCode: d.regltProcessSttusCode} return {regltId: d.regltId, regltSeCode: d.regltSeCode, regltProcessSttusCode: d.regltProcessSttusCode}
}); });
} }
// const datas = res.data?.contents.map(d => {
// return {regltId: d.regltId, regltSeCode: d.regltSeCode, regltProcessSttusCode: d.regltProcessSttusCode}
// });
ARR_NAV[idx].resetGrid(res, datas, (pagiNavigation)=>{ ARR_NAV[idx].resetGrid(res, datas, (pagiNavigation)=>{
ARR_NAV[idx] = pagiNavigation; ARR_NAV[idx] = pagiNavigation;
fnBiz.pagePopup(popupDiv, ARR_NAV[idx].gridInfo.curRowData); fnBiz.pagePopup(popupDiv, ARR_NAV[idx].gridInfo.curRowData);
//if(popupDiv === 'cvplRceptNo') fnBiz.pagePopup('edit', ARR_NAV[idx].gridInfo.curRowData);
//else fnBiz.pagePopup('total', ARR_NAV[idx].gridInfo.curRowData);
}) })
} }
fnBiz.setDblClickEvent(idx); fnBiz.setDblClickEvent(idx);

@ -12,10 +12,11 @@ const fimsApiUrl = {
,POPUP_CTZN_ANS_PREVIEW: '/fims/biz/cmm/cmmCtznAnswerPreviewPopup.do' //시민신고 답변 미리보기 팝업 //과태료시스템등록 popup ,POPUP_CTZN_ANS_PREVIEW: '/fims/biz/cmm/cmmCtznAnswerPreviewPopup.do' //시민신고 답변 미리보기 팝업 //과태료시스템등록 popup
,FIND_CRACKDOWNS: '/fims/biz/cmm/findCrackdownInfos.do' //단속현황-외부연계자료목록 ,FIND_CRACKDOWNS: '/fims/biz/cmm/findCrackdownInfos.do' //단속현황-외부연계자료목록
,FIND_CRACKDOWN_INFO: '/fims/biz/cmm/findCrackdownInfoAndAttchFiles.do' //단속현황-개별총정보 위반정보탭 조회 ,FIND_CRACKDOWN_INFO: '/fims/biz/cmm/findCrackdownInfoAndAttchFiles.do' //단속현황-개별총정보 위반정보탭 조회
,FIND_CTZN_ANS_INFO: '/fims/biz/cmm/findCtznStmtAnswer.do' //시민신고 답변 정보 조회
,MODIFY_CTZN_ANS_TXT: '/fims/biz/cmm/modifyCtznStmtAnswer.do' //시민신고 답변 내용 변경
,ADD_CTZN_ANS: '/fims/biz/cmm/addCtznStmtAnswer.do' //시민신고 답변 생성
,ADD_CTZN_ANS_LIST: '/fims/biz/cmm/addCtznStmtAnswers.do' //시민신고 목록 답변 생성
,FIND_CTZN_ANS_TMPL_INFO: '/fims/biz/cmm/findCtznAnswerTmplInfo.do' //시민신고 답변 템플릿 조회 ,FIND_CTZN_ANS_TMPL_INFO: '/fims/biz/cmm/findCtznAnswerTmplInfo.do' //시민신고 답변 템플릿 조회
,FIND_CTZN_ANS_INFO: '/fims/biz/cmm/findCtznStmtAnswer.do' //시민신고 답변 템플릿 조회
,MODIFY_CTZN_ANS_TXT: '/fims/biz/cmm/modifyCtznStmtAnswer.do' //시민신고 답변 템플릿 조회
,ADD_CTZN_ANS: '/fims/biz/cmm/addCtznStmtAnswer.do' //시민신고 답변 템플릿 조회
/** /**
* fims API URL * fims API URL

Loading…
Cancel
Save