fix: 시민신고 상세 fix

main
minuk926 2 years ago
parent 8c35d61d3a
commit bf8cb58939

@ -216,7 +216,7 @@ public class CtznStmtDTO implements Serializable { //extends ExtlEsbDataType {
@Builder @Builder
@ToString @ToString
public static class Request { public static class Request {
private String ctznSttemntDetailSn;
private String interfaceSeqN; private String interfaceSeqN;
private String ctznSttemntDetailSn;
} }
} }

@ -1,7 +1,5 @@
package kr.xit.fims.biz.ec.web; package kr.xit.fims.biz.ec.web;
import java.util.HashMap;
import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Objects; import java.util.Objects;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -9,10 +7,8 @@ import java.util.stream.Collectors;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.Mapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import kr.xit.fims.biz.FimsConst; import kr.xit.fims.biz.FimsConst;
@ -22,7 +18,6 @@ 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.core.model.ResultResponse; import kr.xit.framework.core.model.ResultResponse;
import kr.xit.framework.support.mybatis.MybatisUtils; import kr.xit.framework.support.mybatis.MybatisUtils;
import kr.xit.framework.support.util.ConvertUtils;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -47,16 +42,15 @@ public class EcCtznSttemntController {
@RequestMapping(value = "/ecCtznSttemntMgtPopup") @RequestMapping(value = "/ecCtznSttemntMgtPopup")
//@ResponseBody //@ResponseBody
public ModelAndView ecCtznSttemntMgtPopup(final String interfaceSeqN){ public ModelAndView ecCtznSttemntMgtPopup(final CtznStmtDTO.Request reqDTO){
ModelAndView mav = new ModelAndView(FimsConst.FIMS_JSP_BASE_PATH +"ec/ecCtznSttemntMgtPopup.popup"); ModelAndView mav = new ModelAndView(FimsConst.FIMS_JSP_BASE_PATH +"ec/ecCtznSttemntMgtPopup.popup");
CtznStmtDTO.Request reqDTO = CtznStmtDTO.Request.builder() CtznStmtDTO.Request newReqDTO = CtznStmtDTO.Request.builder()
.interfaceSeqN(interfaceSeqN) .interfaceSeqN(reqDTO.getInterfaceSeqN())
//.ctznSttemntDetailSn("01")
.build(); .build();
mav.addObject("interfaceSeqN", interfaceSeqN); mav.addObject("reqDTO", reqDTO);
mav.addObject("ctznStmtDTO", service.findCtznStmt(reqDTO)); mav.addObject("ctznStmtDTO", service.findCtznStmt(newReqDTO));
mav.addObject("ctznStmtDtlDTOs", service.findCtznStmtDtls(reqDTO)); mav.addObject("ctznStmtDtlDTOs", service.findCtznStmtDtls(newReqDTO));
return mav; return mav;
} }

@ -91,7 +91,7 @@
} }
,onClickGrid: function(props){ ,onClickGrid: function(props){
const rowData = props.grid.getRow(props.rowKey); const rowData = props.grid.getRow(props.rowKey);
fnBiz.pagePopup('detail', {interfaceSeqN: rowData.interfaceSeqN}); fnBiz.pagePopup('detail', {interfaceSeqN: rowData.interfaceSeqN, ctznSttemntDetailSn: rowData.ctznSttemntDetailSn});
} }
} }

@ -8,7 +8,7 @@
<div class="popup" style="min-width: 100px;"> <div class="popup" style="min-width: 100px;">
<div class="popup_inner" style="max-width: 1000px;"> <div class="popup_inner" style="max-width: 1000px;">
<p class="pop_title"> <p class="pop_title">
<c:out value="${bizName}"/>(<c:out value="${ctznStmtDTO.interfaceSeqN}"/>) 상세 <c:out value="${bizName}"/>(<c:out value="${reqDTO.interfaceSeqN}"/>) 상세
</p> </p>
<form name="frmStmt"> <form name="frmStmt">
@ -232,9 +232,9 @@
cmmAjax({ cmmAjax({
showSuccessMsg: false showSuccessMsg: false
,url: '<c:url value="/fims/biz/ec/findNatlNewspaperAttchFiles.do"/>' ,url: '<c:url value="/fims/biz/ec/findNatlNewspaperAttchFiles.do"/>'
,data: {interfaceSeqN: '${interfaceSeqN}'} ,data: {interfaceSeqN: '${reqDTO.interfaceSeqN}'}
,success: (res) => { ,success: (res) => {
imgDownload(res.data?.contents, '#ctznImg'); imgDownload(res.data?.contents, '#ctznImg', '${reqDTO.ctznSttemntDetailSn}');
} }
}) })
}, },

@ -499,11 +499,14 @@ function serialize (formData) {
} }
/** /**
* <pre>
* 첨부파일 정보 목록으로 부터 이미지 download * 첨부파일 정보 목록으로 부터 이미지 download
* @param {object} cmmFileDtls * @param {object} cmmFileDtls
* @param {string} appendElementId - '#ctznImg' * @param {string} appendElementId - '#ctznImg'
* @param {string} dtlSeq - 시민신고상세순번
* </pre>
*/ */
function imgDownload(cmmFileDtls, appendElementId) { function imgDownload(cmmFileDtls, appendElementId, dtlSeq) {
const downloadUrl = '/framework/biz/cmm/file/download.do'; const downloadUrl = '/framework/biz/cmm/file/download.do';
cmmFileDtls.forEach((dtl, idx) => { cmmFileDtls.forEach((dtl, idx) => {
@ -514,8 +517,9 @@ function imgDownload(cmmFileDtls, appendElementId) {
,body: JSON.stringify(dtl) ,body: JSON.stringify(dtl)
} }
) )
.then((response) => response.blob()) .then(response => response.blob())
.then((blob) => { .then(blob => {
const title = dtlSeq ? dtl.orginlFileNm+'['+dtlSeq+']' : dtl.orginlFileNm;
const url = URL.createObjectURL(blob); const url = URL.createObjectURL(blob);
const x = document.createElement("img"); const x = document.createElement("img");
@ -524,14 +528,13 @@ function imgDownload(cmmFileDtls, appendElementId) {
x.style = 'height:150px;'; x.style = 'height:150px;';
//x.setAttribute("width", "304"); //x.setAttribute("width", "304");
//x.setAttribute("height", "228"); //x.setAttribute("height", "228");
x.setAttribute("title", dtl.orginlFileNm); x.setAttribute("title", title);
x.setAttribute("alt", dtl.orginlFileNm); x.setAttribute("alt", dtl.orginlFileNm);
document.querySelector(appendElementId).appendChild(x); document.querySelector(appendElementId).appendChild(x);
// Revoke Blob URL after DOM updates.. // Revoke Blob URL after DOM updates..
//window.URL.revokeObjectURL(objectURL); //window.URL.revokeObjectURL(objectURL);
} });
);
}) })
} }

Loading…
Cancel
Save