feat: 민원신청 답변 구현 진행

main
minuk926 2 years ago
parent 23244653a0
commit 50c850d5e7

@ -39,6 +39,10 @@ public interface IEcCtznSttemntMapper {
void updateStatusAndRegltIdOfEcCtznSttemntDetail(final CtznStmtDTO.Request dto); void updateStatusAndRegltIdOfEcCtznSttemntDetail(final CtznStmtDTO.Request dto);
void saveEcCtznSttemntAnswer(final CtznStmtDTO.CtznStmtAns dto);
int dragAndDropSaveImg(CmmFileDTO.FileDtl vo); int dragAndDropSaveImg(CmmFileDTO.FileDtl vo);
int dragAndDropDeleteImg(CmmFileDTO.FileDtl vo); int dragAndDropDeleteImg(CmmFileDTO.FileDtl vo);

@ -289,6 +289,24 @@ public class CtznStmtDTO implements Serializable { //extends ExtlEsbDataType {
*/ */
private String register; private String register;
public static NatlNewspaperSendXmlDTO getCtznStmtAnsDTO(CtznStmtDTO.CtznStmtAns dto) {
return NatlNewspaperSendXmlDTO.builder()
.interfaceSeqN(dto.getInterfaceSeqN())
.sysGubunC(dto.getSysCode())
.ancCodeV(dto.getInsttCode())
.petiGubunC(dto.getCvplSe())
.petiNoC(dto.getCvplReqstNo())
.civilNoC(dto.getCvplRceptNo())
.civilGistV(dto.getCvplOutline())
.civilAbstractL(dto.getCvplProcessSumry())
.pcdDeptV(dto.getProcessDeptCode())
.pcdDeptNmV(dto.getCvplProcessDeptnm())
.dutyIdV(dto.getChargerNm())
.pcdEmailV(dto.getChargerEmail())
.pcdTelV(dto.getChargerTlphonNo())
.pcdRstContL(dto.getCvplProcessResult())
.build();
}
} }
@Getter @Getter

@ -22,8 +22,6 @@ import kr.xit.fims.biz.ec.model.NatlNewspaperSendXmlDTO;
import kr.xit.framework.biz.cmm.model.CmmFileDTO; import kr.xit.framework.biz.cmm.model.CmmFileDTO;
import kr.xit.framework.biz.cmm.service.ICmmFileService; import kr.xit.framework.biz.cmm.service.ICmmFileService;
import kr.xit.framework.support.exception.BizRuntimeException; import kr.xit.framework.support.exception.BizRuntimeException;
import kr.xit.framework.support.util.Checks;
import kr.xit.framework.support.util.CmmFileUtils;
import kr.xit.framework.support.util.constants.MessageKey; import kr.xit.framework.support.util.constants.MessageKey;
import kr.xit.framework.support.util.xml.XmlParseUtils; import kr.xit.framework.support.util.xml.XmlParseUtils;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
@ -75,7 +73,7 @@ public class EcCtznSttemntService implements IEcCtznSttemntService {
@Override @Override
@Transactional @Transactional
public void modifyEcCtznSttemntDetail(final CtznStmtDTO.CtznStmtDtl dto) { public void modifyEcCtznSttemntDetail(final CtznStmtDTO.CtznStmtDtl dto) {
dto.setUpdusr(getUserUniqId()); dto.setUpdusr(getUserInfo().getUniqId());
mapper.updateEcCtznSttemntDetail(dto); mapper.updateEcCtznSttemntDetail(dto);
} }
@ -101,11 +99,11 @@ public class EcCtznSttemntService implements IEcCtznSttemntService {
@Override @Override
@Transactional @Transactional
public void saveRtReglt(final CtznStmtDTO.Request dto) { public void saveRtReglt(final CtznStmtDTO.Request dto) {
dto.setRegister(getUserUniqId()); dto.setRegister(getUserInfo().getUniqId());
dto.setRegltProcessSttusCode(FimsConst.RegltProcessSttusCode.CRACKDOWN.getCode()); dto.setRegltProcessSttusCode(FimsConst.RegltProcessSttusCode.CRACKDOWN.getCode());
mapper.insertRtRegltFromCtznStmt(dto); mapper.insertRtRegltFromCtznStmt(dto);
dto.setUpdusr(getUserUniqId()); dto.setUpdusr(getUserInfo().getUniqId());
dto.setCtznSttemntStatusCode(FimsConst.CtznSttemntStatusCode.ACCEPTANCE.getCode()); dto.setCtznSttemntStatusCode(FimsConst.CtznSttemntStatusCode.ACCEPTANCE.getCode());
mapper.updateStatusAndRegltIdOfEcCtznSttemntDetail(dto); mapper.updateStatusAndRegltIdOfEcCtznSttemntDetail(dto);
} }
@ -117,7 +115,7 @@ public class EcCtznSttemntService implements IEcCtznSttemntService {
@Transactional @Transactional
public void saveRtErpp(final CtznStmtDTO.Request dto) { public void saveRtErpp(final CtznStmtDTO.Request dto) {
// 단속테이블 // 단속테이블
dto.setRegister(getUserUniqId()); dto.setRegister(getUserInfo().getUniqId());
dto.setRegltProcessSttusCode(FimsConst.RegltProcessSttusCode.DESTRUCTION.getCode()); dto.setRegltProcessSttusCode(FimsConst.RegltProcessSttusCode.DESTRUCTION.getCode());
mapper.insertRtRegltFromCtznStmt(dto); mapper.insertRtRegltFromCtznStmt(dto);
@ -125,7 +123,7 @@ public class EcCtznSttemntService implements IEcCtznSttemntService {
mapper.insertRtErppFromCtznStmt(dto); mapper.insertRtErppFromCtznStmt(dto);
// 상태 변경 // 상태 변경
dto.setUpdusr(getUserUniqId()); dto.setUpdusr(getUserInfo().getUniqId());
dto.setCtznSttemntStatusCode(FimsConst.CtznSttemntStatusCode.NOT_ACCEPTABLE.getCode()); dto.setCtznSttemntStatusCode(FimsConst.CtznSttemntStatusCode.NOT_ACCEPTABLE.getCode());
mapper.updateStatusAndRegltIdOfEcCtznSttemntDetail(dto); mapper.updateStatusAndRegltIdOfEcCtznSttemntDetail(dto);
} }
@ -139,6 +137,81 @@ public class EcCtznSttemntService implements IEcCtznSttemntService {
} }
@Override @Override
@Transactional
public String saveCtznStmtAns(CtznStmtDTO.CtznStmtAns dto) {
// 답변 xml 파일 생성
List<CmmFileDTO.FileDtl> fileDtlList = cmmFileService.findFilesByJobSeCodeAndJobId(
CmmFileDTO.FileMst.builder()
.jobSeCode(FimsConst.FileJobSeCode.NATL_NEWS_PAPER_RCV.getCode())
.fileJobId(dto.getInterfaceSeqN()+"01")
.build());
String tgtPath = uploadResPath + fileDtlList.get(0).getFileCours();
final String fileName = dto.getInterfaceSeqN() + ".xml";
String xmlStr = XmlParseUtils.writeObjectToXml(CtznStmtDTO.CtznStmtAns.getCtznStmtAnsDTO(dto), NatlNewspaperSendXmlDTO.class);
byte[] bytes = xmlStr.getBytes();
Path path = Paths.get(tgtPath + "/" + fileName);
try {
// 대상폴더 미 존재시 생성
File f = FileUtils.getFile(tgtPath);
if(!f.exists()) f.mkdirs();
Files.write(path, bytes);
} catch (IOException e) {
String msg = "시민 신고 답변 파일 생성 오류";
e.printStackTrace();
log.error("{}", msg);
throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, msg);
}
// 답변 테이블 insert(save)
dto.setSysCode(getUserInfo().getOrgnztId());
dto.setInsttCode(getUserInfo().getPstinstCode());
dto.setRegister(getUserInfo().getUniqId());
mapper.saveEcCtznSttemntAnswer(dto);
return tgtPath + "/" + fileName;
}
@Override
@Transactional
public void dragAndDropSaveImg(Map<String, Object> paraMap) {
paraMap.forEach((strKey, obj)->{
//Obj 형변환
List<Object> listaa = new ArrayList<>();
listaa = (List<Object>) obj;
for(int i=0; i<listaa.size(); i++){
//파일 마스터 아이디 셋
CmmFileDTO.FileDtl vo = new CmmFileDTO.FileDtl();
vo.setFileMastrId(strKey);
vo.setFileId((String) listaa.get(i));
log.info("[paramMap Key] : " + vo.getFileMastrId());
log.info("[paramMap Value] : " + vo.getFileId());
//파일디테일 테이블(fileMastr_id, fileId) 조회
List selectExist = mapper.dragAndDropIsExists(vo);
log.info("Result ==> " + selectExist);
if(selectExist.isEmpty()){
vo.setFileMastrId(strKey);
//insert
mapper.dragAndDropSaveImg(vo);
//delete
mapper.dragAndDropDeleteImg(vo);
}
}
});
}
/*
// TODO: zip file create
public String sendCtznSttemntRespons(CtznStmtDTO.CtznStmtDtl dto) { public String sendCtznSttemntRespons(CtznStmtDTO.CtznStmtDtl dto) {
final String fileName = dto.getInterfaceSeqN()+dto.getCtznSttemntDetailSn(); final String fileName = dto.getInterfaceSeqN()+dto.getCtznSttemntDetailSn();
@ -170,7 +243,7 @@ public class EcCtznSttemntService implements IEcCtznSttemntService {
} }
} }
// TODO: format 정의후 반영
NatlNewspaperSendXmlDTO sendDto = NatlNewspaperSendXmlDTO.builder() NatlNewspaperSendXmlDTO sendDto = NatlNewspaperSendXmlDTO.builder()
.interfaceSeqN(dto.getInterfaceSeqN()) .interfaceSeqN(dto.getInterfaceSeqN())
.pcdRstContL("1. 교통질서 확립에 힘써주신 점에 대해 감사드립니다.\n" .pcdRstContL("1. 교통질서 확립에 힘써주신 점에 대해 감사드립니다.\n"
@ -207,38 +280,5 @@ public class EcCtznSttemntService implements IEcCtznSttemntService {
}); });
return zipFullFileName; return zipFullFileName;
} }
*/
@Override
@Transactional
public void dragAndDropSaveImg(Map<String, Object> paraMap) {
paraMap.forEach((strKey, obj)->{
//Obj 형변환
List<Object> listaa = new ArrayList<>();
listaa = (List<Object>) obj;
for(int i=0; i<listaa.size(); i++){
//파일 마스터 아이디 셋
CmmFileDTO.FileDtl vo = new CmmFileDTO.FileDtl();
vo.setFileMastrId(strKey);
vo.setFileId((String) listaa.get(i));
log.info("[paramMap Key] : " + vo.getFileMastrId());
log.info("[paramMap Value] : " + vo.getFileId());
//파일디테일 테이블(fileMastr_id, fileId) 조회
List selectExist = mapper.dragAndDropIsExists(vo);
log.info("Result ==> " + selectExist);
if(selectExist.isEmpty()){
vo.setFileMastrId(strKey);
//insert
mapper.dragAndDropSaveImg(vo);
//delete
mapper.dragAndDropDeleteImg(vo);
}
}
});
}
} }

@ -105,6 +105,8 @@ public class EcNatlNewspaperService implements IEcNatlNewspaperService {
//------------------------------------------------------------- //-------------------------------------------------------------
// interface table save // interface table save
//------------------------------------------------------------- //-------------------------------------------------------------
xmlDto.setPetiNoC(xmlDto.getPetiNoC().replaceAll("[-: ]", ""));
xmlDto.setCivilNoC(xmlDto.getCivilNoC().replaceAll("[-: ]", ""));
xmlDto.setPetiRegD(xmlDto.getPetiRegD().replaceAll("[-: ]", "")); xmlDto.setPetiRegD(xmlDto.getPetiRegD().replaceAll("[-: ]", ""));
xmlDto.setPetiEndD(xmlDto.getPetiEndD().replaceAll("[-: ]", "")); xmlDto.setPetiEndD(xmlDto.getPetiEndD().replaceAll("[-: ]", ""));
xmlDto.setAncRegD(xmlDto.getAncRegD().replaceAll("[-: ]", "")); xmlDto.setAncRegD(xmlDto.getAncRegD().replaceAll("[-: ]", ""));

@ -6,6 +6,7 @@ import java.util.Map;
import org.apache.ibatis.session.RowBounds; import org.apache.ibatis.session.RowBounds;
import kr.xit.fims.biz.ec.model.CtznStmtDTO; import kr.xit.fims.biz.ec.model.CtznStmtDTO;
import kr.xit.framework.biz.cmm.model.XitLoginVO;
import kr.xit.framework.core.utils.XitCmmnUtil; import kr.xit.framework.core.utils.XitCmmnUtil;
public interface IEcCtznSttemntService { public interface IEcCtznSttemntService {
@ -33,11 +34,12 @@ public interface IEcCtznSttemntService {
//시민신고 답변 데이타 생성 기초데이타 조회 //시민신고 답변 데이타 생성 기초데이타 조회
CtznStmtDTO.CtznStmtAns findCtznStmtAnswer(CtznStmtDTO.Request reqDTO); CtznStmtDTO.CtznStmtAns findCtznStmtAnswer(CtznStmtDTO.Request reqDTO);
String sendCtznSttemntRespons(final CtznStmtDTO.CtznStmtDtl dto); //String sendCtznSttemntRespons(final CtznStmtDTO.CtznStmtDtl dto);
String saveCtznStmtAns(final CtznStmtDTO.CtznStmtAns dto);
void dragAndDropSaveImg(final Map<String, Object>paraMap); void dragAndDropSaveImg(final Map<String, Object>paraMap);
default String getUserUniqId(){ default XitLoginVO getUserInfo(){
return XitCmmnUtil.getUserUniqId(); return XitCmmnUtil.getUserInfo();
} }
} }

@ -143,7 +143,7 @@ public class EcCtznSttemntController {
@RequestMapping("/saveImg") @RequestMapping("/saveImg")
public ModelAndView saveImg (@RequestBody Map<String, Object> paraMap) { public ModelAndView saveImg (@RequestBody final Map<String, Object> paraMap) {
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW); ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
service.dragAndDropSaveImg(paraMap); service.dragAndDropSaveImg(paraMap);
@ -152,14 +152,8 @@ public class EcCtznSttemntController {
return mav; return mav;
} }
@RequestMapping("/sendCtznSttemntRespons") @RequestMapping("/saveCtznStmtAns")
public ModelAndView sendCtznSttemntRespons(final CtznStmtDTO.CtznStmtDtl dto) { public ModelAndView saveCtznStmtAns(final CtznStmtDTO.CtznStmtAns dto) {
// ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW); return ResultResponse.of(service.saveCtznStmtAns(dto));
// log.debug(dto.toString());
// String rtnFileFullPath = service.sendCtznSttemntRespons(dto);
// AjaxMessageMapRenderer.success(mav, MessageKey.CMM_SUCCESS);
// return mav;
return ResultResponse.of(service.sendCtznSttemntRespons(dto));
} }
} }

@ -124,19 +124,20 @@ exception.log.trace=true
# k byte # k byte
file.upload.allow.max-size: 2048 file.upload.allow.max-size: 2048
file.upload.allow.ext= file.upload.allow.ext=
file.upload.root=/Users/minuk/data/fims/upload
#file.upload.root=D:/data/fims/upload #file.upload.root=/Users/minuk/data/fims/upload
file.upload.root=D:/data/fims/upload
file.upload.temp.path=/temp file.upload.temp.path=/temp
file.upload.natl-newspaper.path=/natl-newspaper file.upload.natl-newspaper.path=/natl-newspaper
file.upload.busonly-cctv.path=/busonly file.upload.busonly-cctv.path=/busonly
file.upload.cctv-fix.path=/cctv-fix file.upload.cctv-fix.path=/cctv-fix
file.upload.cctv-drv.path=/cctv-drv file.upload.cctv-drv.path=/cctv-drv
file.rcv.root=/Users/minuk/data/fims/extnl/rcv #file.rcv.root=/Users/minuk/data/fims/extnl/rcv
file.rcv.backup.root=/Users/minuk/data/fims/extnl/backup #file.rcv.backup.root=/Users/minuk/data/fims/extnl/backup
file.res.root=/Users/minuk/data/fims/extnl/res #file.res.root=/Users/minuk/data/fims/extnl/res
#file.rcv.root=D:/data/fims/extnl/rcv file.rcv.root=D:/data/fims/extnl/rcv
#file.rcv.backup.root=D:/data/fims/extnl/backup file.rcv.backup.root=D:/data/fims/extnl/backup
#file.res.root=D:/data/fims/extnl/res file.res.root=D:/data/fims/extnl/res
file.rcv.natl-newspaper.path=/natl-newspaper file.rcv.natl-newspaper.path=/natl-newspaper
file.rcv.busonly-cctv.path=/busonly file.rcv.busonly-cctv.path=/busonly

@ -315,18 +315,78 @@
, teei.peti_gubun_c AS cvplSe -- 민원구분 , teei.peti_gubun_c AS cvplSe -- 민원구분
, teei.peti_no_c AS cvplReqstNo -- 민원신청번호 , teei.peti_no_c AS cvplReqstNo -- 민원신청번호
, teei.civil_no_c AS cvplRceptNo -- 민원접수번호 , teei.civil_no_c AS cvplRceptNo -- 민원접수번호
, teei.civil_gist_v AS cvplOutline -- 민원요지 -- , teei.civil_gist_v AS cvplOutline -- 민원요지
, teei.civil_abstract_l AS cvplProcessSumry -- 민원처리요약 , '불법주정차구역위반' AS cvplOutline -- 민원요지
-- , teei.civil_abstract_l AS cvplProcessSumry -- 민원처리요약
, '과태료부과' AS cvplProcessSumry -- 민원처리요약
, teei.pcd_dept_v AS processDeptCode -- 처리부서코드 , teei.pcd_dept_v AS processDeptCode -- 처리부서코드
, teei.pcd_dept_nm_v AS cvplProcessDeptnm -- 민원처리부서명 , teei.pcd_dept_nm_v AS cvplProcessDeptnm -- 민원처리부서명
, teei.duty_id_v AS chargerNm -- 담당자명 , teei.duty_id_v AS chargerNm -- 담당자명
, teei.pcd_email_v AS chargerEmail -- 담당자이메일 , teei.pcd_email_v AS chargerEmail -- 담당자이메일
, teei.pcd_tel_v AS chargerTlphonNo -- 담당자전화번호 , teei.pcd_tel_v AS chargerTlphonNo -- 담당자전화번호
, teei.pcd_rst_cont_l AS cvplProcessResult -- 민원처리결과 -- , teei.pcd_rst_cont_l AS cvplProcessResult -- 민원처리결과
, '1. 교통질서 확립에 힘써주신 점에 대해 감사드립니다.
2. 귀하께서 안전신문고를 통해 신청하신 민원에 대한 검토 결과를 다음과 같이 알려드립니다.
3. 귀하의 민원내용은 불법 주정차 신고에 관한 것으로 판단됩니다.
4. 귀하의 신고에 대해 검토한 결과는 다음과 같습니다.
가. 해당 차량은 도로교통법 제32조, 제33조, 제34조, 제35조에 의거한 불법 주정차 차량으로 판단됩니다.
나. 따라서, 위반 차량에 대해 주정차 위반 과태료 부과 처분이 이루어졌음을 알려드립니다.
5. 안전을 위한 시민 정신에 감사드리며, 답변 내용에 대한 추가 설명이 필요한 경우 군포시청 차량관리과 주차단속팀 박효주 주무관(☏031-390-0291)에게 연락 주시면 친절히 안내해 드리도록 하겠습니다. 감사합니다.' AS cvplProcessResult -- 민원처리결과
FROM tb_ec_esb_interface teei FROM tb_ec_esb_interface teei
WHERE teei.interface_seq_n = #{interfaceSeqN} WHERE teei.interface_seq_n = #{interfaceSeqN}
</select> </select>
<insert id="saveEcCtznSttemntAnswer">
/* ec-ctzn-sttemnt-mysql-mapper|saveEcCtznSttemntAnswer-시민신고답변 생성 및 변경|cjm */
INSERT
INTO tb_ec_ctzn_sttemnt_answer (
interface_seq_n
, instt_code
, sys_code
, cvpl_se
, cvpl_reqst_no
, cvpl_rcept_no
, cvpl_outline
, cvpl_process_sumry
, process_dept_code
, cvpl_process_deptnm
, charger_nm
, charger_email
, charger_tlphon_no
, cvpl_process_result
, cvpl_process_compt_dt
, regist_dt
, register
) VALUES (
#{interfaceSeqN}
, #{insttCode}
, #{sysCode}
, #{cvplSe}
, #{cvplReqstNo}
, #{cvplRceptNo}
, #{cvplOutline}
, #{cvplProcessSumry}
, #{processDeptCode}
, #{cvplProcessDeptnm}
, #{chargerNm}
, #{chargerEmail}
, #{chargerTlphonNo}
, #{cvplProcessResult}
, DATE_FORMAT(NOW(), '%Y%m%d%H%i%s')
, DATE_FORMAT(NOW(), '%Y%m%d%H%i%s')
, #{register}
)
ON DUPLICATE KEY
UPDATE cvpl_outline = #{cvplOutline}
, cvpl_process_sumry = #{cvplProcessSumry}
, cvpl_process_result = #{cvplProcessResult}
</insert>
<select id="dragAndDropIsExists" resultType="kr.xit.framework.biz.cmm.model.CmmFileDTO$FileDtl"> <select id="dragAndDropIsExists" resultType="kr.xit.framework.biz.cmm.model.CmmFileDTO$FileDtl">
/* ec-ctzn-sttemnt-mysql-mapper|isExists-드래그앤 드롭 사진저장 조회|cjm */ /* ec-ctzn-sttemnt-mysql-mapper|isExists-드래그앤 드롭 사진저장 조회|cjm */

@ -96,7 +96,7 @@
AND role_code = #{roleCode} AND role_code = #{roleCode}
</delete> </delete>
<delete id="saveRoleGrant" parameterType="map"> <insert id="saveRoleGrant" parameterType="map">
/* auth-author-mysql-mapper|saveRoleGrant-권한 롤 등록|julim */ /* auth-author-mysql-mapper|saveRoleGrant-권한 롤 등록|julim */
INSERT INTO xit_author_role_relate ( INSERT INTO xit_author_role_relate (
author_code author_code
@ -109,7 +109,7 @@
) )
ON DUPLICATE KEY UPDATE ON DUPLICATE KEY UPDATE
creat_dt = NOW() creat_dt = NOW()
</delete> </insert>
<!-- ************************************************************************************************************* <!-- *************************************************************************************************************
* xit_role_sclsrt_rescue : 역할 계층 정보 * xit_role_sclsrt_rescue : 역할 계층 정보

@ -8,7 +8,7 @@
<p class="pop_title"> <p class="pop_title">
<c:out value="${bizName}"/>(<c:out value="${ansDTO.interfaceSeqN}"/>) <c:out value="${bizName}"/>(<c:out value="${ansDTO.interfaceSeqN}"/>)
</p> </p>
<form name="frmStmt"> <form name="frmStmt" id="frmStmt">
<input type="hidden" name="interfaceSeqN" value='<c:out value="${ansDTO.interfaceSeqN}"/>'> <input type="hidden" name="interfaceSeqN" value='<c:out value="${ansDTO.interfaceSeqN}"/>'>
<table class="tbl03"> <table class="tbl03">
<caption><c:out value="${bizName}"/> 상세</caption> <caption><c:out value="${bizName}"/> 상세</caption>
@ -25,12 +25,12 @@
<tr> <tr>
<th>기관코드</th> <th>기관코드</th>
<td> <td>
<code:select id="insttCode" name="insttCode" codeId="XIT025" defaultSelect="${ansDTO.insttCode}" title="기관코드" cls="selectBoxTotal" alt="기관코드" disabled="true"/> <%-- <code:select id="insttCode" name="insttCode" codeId="XIT025" defaultSelect="${ansDTO.insttCode}" title="기관코드" cls="selectBoxTotal" alt="기관코드" disabled="true"/>--%>
<input type="text" name="insttCode" value='<c:out value="${ansDTO.insttCode}"/>' readonly> <input type="text" name="insttCode" value='<c:out value="${ansDTO.insttCode}"/>' readonly>
</td> </td>
<th>시스템코드</th> <th>시스템코드</th>
<td> <td>
<code:select id="sysCode" name="sysCode" codeId="FIM001" defaultSelect="${ansDTO.sysCode}" title="과태료코드" cls="selectBoxTotal" alt="과태료코드" disabled="true"/> <%-- <code:select id="sysCode" name="sysCode" codeId="FIM001" defaultSelect="${ansDTO.sysCode}" title="과태료코드" cls="selectBoxTotal" alt="과태료코드" disabled="true"/>--%>
<input type="text" name="sysCode" value='<c:out value="${ansDTO.sysCode}"/>' readonly> <input type="text" name="sysCode" value='<c:out value="${ansDTO.sysCode}"/>' readonly>
</td> </td>
<th>처리완료일시</th> <th>처리완료일시</th>
@ -82,19 +82,19 @@
<tr> <tr>
<th>처리결과</th> <th>처리결과</th>
<td colspan="5"> <td colspan="5">
<textarea name="cvplProcessResult" rows="3" value='<c:out value="${ansDTO.cvplProcessResult}"/>'></textarea> <textarea name="cvplProcessResult" col="120" rows="12"><c:out value="${ansDTO.cvplProcessResult}"/></textarea>
</td> </td>
</tr> </tr>
<tr> <tr>
<th>민원요지</th> <th>민원요지</th>
<td colspan="5"> <td colspan="5">
<textarea name="cvplOutline" rows="3" value='<c:out value="${ansDTO.cvplOutline}"/>'></textarea> <textarea name="cvplOutline" rows="2"><c:out value="${ansDTO.cvplOutline}"/></textarea>
</td> </td>
</tr> </tr>
<tr> <tr>
<th>민원처리요약</th> <th>민원처리요약</th>
<td colspan="5"> <td colspan="5">
<textarea name="cvplProcessSumry" rows="3" value='<c:out value="${ansDTO.cvplProcessSumry}"/>'></textarea> <textarea name="cvplProcessSumry" rows="2"><c:out value="${ansDTO.cvplProcessSumry}"/></textarea>
</td> </td>
</tr> </tr>
</tbody> </tbody>
@ -111,11 +111,12 @@
</div> </div>
<!-- //popup --> <!-- //popup -->
<script type="text/javascript" src="${pageContext.request.contextPath}/resources/framework/js/cmm/cmmDownloadImg.js" defer></script>
<script type="text/javascript"> <script type="text/javascript">
/************************************************************************** /**************************************************************************
* Global Variable * Global Variable
**************************************************************************/ **************************************************************************/
let orgDtlDatas = []; let orgData;
/* ******************************* /* *******************************
@ -143,21 +144,28 @@
window.opener.popup = CmmPopup.open(url, params, popOption, popTitle); window.opener.popup = CmmPopup.open(url, params, popOption, popTitle);
//var w = window.open("/imageEditor.do", "", "width=800,height=650,top=0px,left=200px,status=,resizable=false,scrollbars=no"); //var w = window.open("/imageEditor.do", "", "width=800,height=650,top=0px,left=200px,status=,resizable=false,scrollbars=no");
} }
,save: (ctznSttemntDetailSn) => { ,save: () => {
let idx = Number(ctznSttemntDetailSn); const fileName = $('input[name=interfaceSeqN]').val()+'.xml';
if(orgDtlDatas[idx-1] == $('form[name=frmStmtDtl'+ctznSttemntDetailSn+']').serialize()){
alert('변경된 내용이 없습니다.'); <%--fnBiz.validate();--%>
return false; if(!confirm('답변 처리 하시겠습니까?')) return false;
} cmmAjax({
const frm = $('form[name=frmStmtDtl'+ctznSttemntDetailSn+']'); url: '<c:url value="/fims/biz/ec/saveCtznStmtAns.do"/>'
const data = { ,data: $('#frmStmt').serialize()
interfaceSeqN: '${ansDTO.interfaceSeqN}' ,success: (res) => {
,ctznSttemntDetailSn const data = {fileFullPath: res.data?.contents, fileName};
,vhcleNo: frm.find('input[name=vhcleNo]').val().trim()
} fetch('<c:url value="/framework/biz/cmm/file/downloadFromFileFullPath.do"/>'
cmmBizAjax('modify', { ,{
url: '<c:url value="/fims/biz/ec/modifyCtznStmtDtl.do"/>' method: 'post'
,data: $.param(data) ,body: JSON.stringify(data)
}
)
.then(response => response.blob())
.then(blob => {
downloadFile(blob, fileName);
});
}
}) })
} }
,remove: (ctznSttemntDetailSn) => { ,remove: (ctznSttemntDetailSn) => {
@ -172,6 +180,14 @@
,data: $.param(data) ,data: $.param(data)
}) })
} }
,validate: () => {
if(orgData === $('form').serialize()){
alert('변경된 내용이 없습니다.');
return false;
}
return true;
}
}; };
/************************************************************************** /**************************************************************************
@ -187,12 +203,17 @@
window.opener?.unblockUI(); window.opener?.unblockUI();
window.close() window.close()
}); });
$('#btnRegist').on('click', () => {
fnBiz.save();
})
}); });
/************************************************************************** /**************************************************************************
* initialize * initialize
**************************************************************************/ **************************************************************************/
$(document).ready(function () { $(document).ready(function () {
orgData = $('form').serialize();
}); });

@ -91,7 +91,7 @@
break; break;
case "answer": case "answer":
url = '<c:url value="/fims/biz/ec/ecCtznSttemntAnsMgtPopup.do"/>'; url = '<c:url value="/fims/biz/ec/ecCtznSttemntAnsMgtPopup.do"/>';
popOption = {width: 900, height:600}; popOption = {width: 900, height:780};
popTitle = "주민 신고 데이타 답변"; popTitle = "주민 신고 데이타 답변";
break; break;
default: default:

Loading…
Cancel
Save