개별총정보 - 단속 사진 보기, 추가 기능 수정.

main
jjh 1 year ago
parent d2534cc1f3
commit 6c85dbc6ed

@ -118,7 +118,7 @@ public class Excl02Controller extends ApplicationController {
} }
/** . /** .
* @param opnnSbmsn * @param opnnSbmsn , uploadFiles
* @return jsonView * @return jsonView
* <pre><code> { * <pre><code> {
* "saved": true, false * "saved": true, false
@ -148,7 +148,7 @@ public class Excl02Controller extends ApplicationController {
} }
/** . /** .
* @param opnnSbmsn * @param opnnSbmsn , uploadFiles
* @return jsonView * @return jsonView
* <pre><code> { * <pre><code> {
* "saved": true, false * "saved": true, false

@ -1,7 +1,10 @@
package cokr.xit.fims.sprt.dao; package cokr.xit.fims.sprt.dao;
import java.util.Map;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper; import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
import cokr.xit.fims.crdn.Crdn;
import cokr.xit.fims.sprt.SprtQuery; import cokr.xit.fims.sprt.SprtQuery;
import cokr.xit.foundation.component.AbstractMapper; import cokr.xit.foundation.component.AbstractMapper;
import cokr.xit.foundation.data.DataObject; import cokr.xit.foundation.data.DataObject;
@ -31,4 +34,24 @@ public interface TotalInfoMapper extends AbstractMapper {
*/ */
DataObject selectCrdnPayerInfo(SprtQuery req); DataObject selectCrdnPayerInfo(SprtQuery req);
/** .
* @param params
* <ul><li>"crdn" - </li>
* <li>"currentUser" - </li>
* </ul>
* @return
*/
int updateCrdnAtchFileCnt(Map<String, Object> params);
/** .
* @param crdn
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
default boolean updateCrdnAtchFileCnt(Crdn crdn) {
return crdn != null && updateCrdnAtchFileCnt(params().set("crdn", crdn)) == 1;
}
} }

@ -1,5 +1,10 @@
package cokr.xit.fims.sprt.service; package cokr.xit.fims.sprt.service;
import java.util.List;
import java.util.Map;
import cokr.xit.base.file.FileInfo;
import cokr.xit.fims.crdn.Crdn;
import cokr.xit.fims.sprt.SprtQuery; import cokr.xit.fims.sprt.SprtQuery;
import cokr.xit.foundation.data.DataObject; import cokr.xit.foundation.data.DataObject;
@ -27,4 +32,10 @@ public interface Sprt02Service {
*/ */
DataObject getCrdnPayerInfo(SprtQuery req); DataObject getCrdnPayerInfo(SprtQuery req);
/** .
* @param nonQueryRequest , crdn , newFileInfoList
* @return
*/
String updateCrdnImageFile(Map<String, Object> nonQueryRequest, Crdn crdn, List<FileInfo> newFileInfoList);
} }

@ -4,6 +4,7 @@ import javax.annotation.Resource;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import cokr.xit.fims.crdn.Crdn;
import cokr.xit.fims.sprt.SprtQuery; import cokr.xit.fims.sprt.SprtQuery;
import cokr.xit.fims.sprt.dao.TotalInfoMapper; import cokr.xit.fims.sprt.dao.TotalInfoMapper;
import cokr.xit.foundation.AbstractComponent; import cokr.xit.foundation.AbstractComponent;
@ -42,4 +43,21 @@ public class Sprt02Bean extends AbstractComponent {
return totalInfoMapper.selectCrdnPayerInfo(req); return totalInfoMapper.selectCrdnPayerInfo(req);
} }
public String updateCrdnAtchFileCnt(Crdn crdn) {
// 변수 선언
boolean retSuccess = false; // DB 처리 결과
String retMessage = ""; // 처리 결과 메시지
// 의견제출 대장을 수정 한다.
retSuccess = totalInfoMapper.updateCrdnAtchFileCnt(crdn);
if (!retSuccess) {
// 예외를 발생시켜서 오류메세지를 보내고 DB Rollback
throw new RuntimeException("단속 첨부 파일 갯수 수정에 실패하였습니다.");
}
retMessage = "[S] 작업이 정상 처리 되었습니다.";
return retMessage;
}
} }

@ -1,9 +1,18 @@
package cokr.xit.fims.sprt.service.bean; package cokr.xit.fims.sprt.service.bean;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource; import javax.annotation.Resource;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import cokr.xit.base.file.FileInfo;
import cokr.xit.base.file.service.FileQuery;
import cokr.xit.base.file.service.bean.FileBean;
import cokr.xit.fims.crdn.Crdn;
import cokr.xit.fims.excl.OpnnSbmsn;
import cokr.xit.fims.sprt.SprtQuery; import cokr.xit.fims.sprt.SprtQuery;
import cokr.xit.fims.sprt.service.Sprt02Service; import cokr.xit.fims.sprt.service.Sprt02Service;
import cokr.xit.foundation.component.AbstractServiceBean; import cokr.xit.foundation.component.AbstractServiceBean;
@ -26,6 +35,10 @@ public class Sprt02ServiceBean extends AbstractServiceBean implements Sprt02Serv
@Resource(name="sprt02Bean") @Resource(name="sprt02Bean")
protected Sprt02Bean sprt02Bean; protected Sprt02Bean sprt02Bean;
/** 파일 Bean */
@Resource(name="fileBean")
private FileBean fileBean;
@Override @Override
public DataObject getCrdnInfo(SprtQuery req) { public DataObject getCrdnInfo(SprtQuery req) {
return sprt02Bean.getCrdnInfo(req); return sprt02Bean.getCrdnInfo(req);
@ -33,7 +46,81 @@ public class Sprt02ServiceBean extends AbstractServiceBean implements Sprt02Serv
@Override @Override
public DataObject getCrdnPayerInfo(SprtQuery req) { public DataObject getCrdnPayerInfo(SprtQuery req) {
return sprt02Bean.getCrdnPayerInfo(req); // 단속, 납부자 조회
DataObject dataObject = sprt02Bean.getCrdnPayerInfo(req);
// 첨부파일 조회
FileQuery fileQuery = new FileQuery();
fileQuery.setInfoType(Crdn.INF_TYPE);
fileQuery.setInfoKeys(req.getCrdnId());
List<DataObject> fileList = fileBean.getFileList(fileQuery);
if (fileList != null && !fileList.isEmpty()) {
dataObject.set("fileList", fileList);
}
// 동영상 존재 여부 확인
// dataObject.set("videoExist", "N");
// String linkTblNm = dataObject.string("LINK_TBL_NM");
//
// if (!linkTblNm.equals("")) {
// if (linkTblNm.equals("TB_ESB_INTERFACE")) {
// fileQuery.setInfoType("010");
// } else if(linkTblNm.equals("TB_SAEOL")) {
// fileQuery.setInfoType("020");
// } else {
// throw new RuntimeException("파일 조회 중 오류가 발생하였습니다.");
// }
//
// fileQuery.setInfoKeys(dataObject.string("LINK_ID"));
//
// List<DataObject> linkFileList = fileBean.getFileList(fileQuery);
//
// if (linkFileList != null && !linkFileList.isEmpty()) {
// for (int iLoop = 0; iLoop < linkFileList.size(); iLoop++) {
// String mimeType = linkFileList.get(iLoop).string("MIME_TYPE");
// if (Arrays.asList(Sprt.VIDEO_MIME_TYPE).contains(mimeType)) {
// dataObject.set("videoExist", "Y");
// }
// }
// }
// }
return dataObject;
}
@Override
public String updateCrdnImageFile(Map<String, Object> nonQueryRequest, Crdn crdn, List<FileInfo> newFileInfoList) {
// 변수 선언
String retMessage = ""; // 처리 결과 메시지
// 첨부파일 등록
if (newFileInfoList != null && !newFileInfoList.isEmpty()) {
// 파일 등록
int fileInsertEffected = fileBean.create(newFileInfoList);
// 단속 ID로 파일(TB_FILE) 정보 조회
List<DataObject> infoFileList = fileBean.getFileList(new FileQuery().setInfoType(Crdn.INF_TYPE)
.setInfoKeys(crdn.getCrdnId()).setOrderBy("FILE_ID"));
if (infoFileList != null && infoFileList.size() > 0) {
String[] fileIDs = new String[infoFileList.size()];
for (int iLoop = 0; iLoop < infoFileList.size(); iLoop++) {
fileIDs[iLoop] = infoFileList.get(iLoop).string("FILE_ID");
}
fileBean.reorder(fileIDs); // 첨부파일 재 정렬
}
crdn.setAtchFileCnt(crdn.getAtchFileCnt() + fileInsertEffected);
retMessage = sprt02Bean.updateCrdnAtchFileCnt(crdn);
}
return retMessage;
} }
} }

@ -1,17 +1,28 @@
package cokr.xit.fims.sprt.web; package cokr.xit.fims.sprt.web;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.stream.Stream;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import cokr.xit.base.file.FileInfo;
import cokr.xit.base.file.FileInfo.Relation;
import cokr.xit.base.file.web.FileInfoFactory;
import cokr.xit.base.web.ApplicationController; import cokr.xit.base.web.ApplicationController;
import cokr.xit.fims.cmmn.CrdnPayerHstryQuery; import cokr.xit.fims.cmmn.CrdnPayerHstryQuery;
import cokr.xit.fims.cmmn.CrdnSttsHstryQuery; import cokr.xit.fims.cmmn.CrdnSttsHstryQuery;
import cokr.xit.fims.cmmn.service.CrdnPayerHstryService; import cokr.xit.fims.cmmn.service.CrdnPayerHstryService;
import cokr.xit.fims.cmmn.service.CrdnSttsHstryService; import cokr.xit.fims.cmmn.service.CrdnSttsHstryService;
import cokr.xit.fims.crdn.Crdn;
import cokr.xit.fims.cvlc.CrdnCvlcpt;
import cokr.xit.fims.excl.ExclQuery; import cokr.xit.fims.excl.ExclQuery;
import cokr.xit.fims.excl.service.Excl01Service; import cokr.xit.fims.excl.service.Excl01Service;
import cokr.xit.fims.excl.service.Excl02Service; import cokr.xit.fims.excl.service.Excl02Service;
@ -119,6 +130,61 @@ public class Sprt02Controller extends ApplicationController {
; ;
} }
/** , .
* @param crdn , newFileList, modifyFileList
* @return jsonView
* <pre><code> {
* "affected":
* "saved": true, false
* }</code></pre>
*/
@RequestMapping(name="단속 이미지 파일 저장", value="/020/update.do")
public ModelAndView updateCrdnImageFile(HttpServletRequest hReq, Crdn crdn, MultipartFile[] newFileList, MultipartFile[] modifyFileList) {
boolean saved = false;
String retMessage = "[F] ";
String[] deleteFileKeyList = hReq.getParameterValues("deleteFileKeyList");
String[] modifyFileKeyList = hReq.getParameterValues("modifyFileKeyList");
List<FileInfo> newFileInfoList = new ArrayList<FileInfo>();
if (newFileList != null || modifyFileList != null) {
Relation relation = new Relation();
relation.setInfoType(Crdn.INF_TYPE);
relation.setInfoKey(crdn.getCrdnId());
if (newFileList != null) {
newFileInfoList = new FileInfoFactory().makeFileInfos(relation, newFileList);
}
if (modifyFileList != null) {
newFileInfoList.addAll(new FileInfoFactory().makeFileInfos(relation, modifyFileList));
if (deleteFileKeyList == null) {
deleteFileKeyList = modifyFileKeyList;
} else {
String[] arr1 = deleteFileKeyList;
String[] arr2 = modifyFileKeyList;
String[] sumArr = Stream.of(arr1, arr2).flatMap(Stream::of).toArray(String[]::new);
deleteFileKeyList = (sumArr);
}
}
}
Map<String, Object> nonQueryRequest = new HashMap<String, Object>();
nonQueryRequest.put("deleteFileKeyList", deleteFileKeyList);
retMessage = sprt02Service.updateCrdnImageFile(nonQueryRequest, crdn, newFileInfoList);
if (retMessage.contains("[S]")) {
saved = true;
} else {
saved = false;
}
return new ModelAndView("jsonView")
.addObject("saved", saved)
.addObject("retMessage", retMessage);
}
/** ID . /** ID .
* @param crdnId ID * @param crdnId ID
* @return fims/sprt/sprt02030-main jsonView * @return fims/sprt/sprt02030-main jsonView
@ -139,6 +205,7 @@ public class Sprt02Controller extends ApplicationController {
exclQuery.setCrdnId(req.getCrdnId()); exclQuery.setCrdnId(req.getCrdnId());
exclQuery.setDelYn(req.getDelYn()); exclQuery.setDelYn(req.getDelYn());
// 의견 제출(TB_OPNN_SBMSN) 대장 조회
DataObject opnnSbmsn = excl02Service.getOpnnSbmsnInfo(exclQuery); DataObject opnnSbmsn = excl02Service.getOpnnSbmsnInfo(exclQuery);
// 단속(TB_CRDN) 대장 조회 // 단속(TB_CRDN) 대장 조회

@ -170,4 +170,13 @@
</if> </if>
</select> </select>
<update id="updateCrdnAtchFileCnt" parameterType="map">/* 단속 첨부 파일갯수 수정 (sprt02Mapper.updateCrdnAtchFileCnt) */
UPDATE TB_CRDN
SET ATCH_FILE_CNT = #{crdn.atchFileCnt} /* 첨부 파일 수 */
, MDFCN_DT = #{crdn.lastModified} /* 수정 일시 */
, MDFR = #{crdn.modifiedBy} /* 수정자 */
WHERE CRDN_ID = #{crdn.crdnId} /* 단속 ID */
AND DEL_YN = 'N' /* 삭제 여부 */
</update>
</mapper> </mapper>

@ -5,7 +5,7 @@
<div class="content-wrapper"> <div class="content-wrapper">
<!-- Content --> <!-- Content -->
<div class="container-xxl flex-grow-1 px-0"> <div class="container-xxl flex-grow-1 px-0">
<c:set var="prefixName" scope="request">부과제외</c:set> <c:set var="prefixName" scope="request">부과제외 관리</c:set>
<!-- Page Body --> <!-- Page Body -->
<div class="card"> <div class="card">

@ -5,7 +5,7 @@
<div class="content-wrapper"> <div class="content-wrapper">
<!-- Content --> <!-- Content -->
<div class="container-xxl flex-grow-1 px-0"> <div class="container-xxl flex-grow-1 px-0">
<c:set var="prefixName" scope="request">의견제출</c:set> <c:set var="prefixName" scope="request">의견제출 관리</c:set>
<!-- Page Body --> <!-- Page Body -->
<div class="card"> <div class="card">
@ -350,9 +350,14 @@
return; return;
} }
let params = {
callControlName : "${pageName}Control"
, crdnId : crdnId
}
ajax.get({ ajax.get({
url : ${pageName}Control.urls.getInfo url : ${pageName}Control.urls.getInfo
, data : { crdnId : crdnId } , data : params
, success : resp => { , success : resp => {
dialog.open({ dialog.open({
id : "totalInfoMainDialog" id : "totalInfoMainDialog"

@ -233,7 +233,7 @@
formData.append("uploadFiles" , $fileListArr[iLoop]); formData.append("uploadFiles" , $fileListArr[iLoop]);
} }
for(let key in info) { for (let key in info) {
let value = info[key]; let value = info[key];
formData.append(key, value); formData.append(key, value);

@ -1,123 +1,136 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%>
<%@ include file="/WEB-INF/jsp/include/taglib.jsp"%> <%@ include file="/WEB-INF/jsp/include/taglib.jsp"%>
<!-- Page Body --> <!-- inner page html -->
<div class="card"> <div class="content-wrapper">
<!-- 입력 영역 --> <!-- Content -->
<form id="frmEdit--${pageName}" name="frmEdit"> <div class="container-xxl flex-grow-1 px-0">
<!-- hidden --> <c:set var="prefixName" scope="request">단속 재등록 관리</c:set>
<input type="hidden" id="crdnId--${pageName}" name="crdnId" data-map="CRDN_ID" />
<input type="hidden" id="sggCd--${pageName}" name="sggCd" data-map="SGG_CD" /> <!-- Page Body -->
<input type="hidden" id="taskSeCd--${pageName}" name="taskSeCd" data-map="TASK_SE_CD" /> <div class="card">
<input type="hidden" id="opnnId--${pageName}" name="opnnId" data-map="OPNN_ID" /> <!-- 입력 영역 -->
<form id="frmEdit--${pageName}" name="frmEdit">
<div class="row g-1"> <!-- hidden -->
<!-- 접수 번호 --> <input type="hidden" id="crdnId--${pageName}" name="crdnId" data-map="CRDN_ID" />
<div class="col-md-6"> <input type="hidden" id="sggCd--${pageName}" name="sggCd" data-map="SGG_CD" />
<label for="rcptNo--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">접수 번호</label> <input type="hidden" id="taskSeCd--${pageName}" name="taskSeCd" data-map="TASK_SE_CD" />
<input type="text" class="form-control w-45" id="rcptNo--${pageName}" name="rcptNo" data-map="RCPT_NO" readonly /> <input type="hidden" id="opnnId--${pageName}" name="opnnId" data-map="OPNN_ID" />
</div>
<!-- 접수 일자 --> <div class="row g-1">
<div class="col-md-6"> <!-- 접수 번호 -->
<label for="rcptYmd--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">접수 일자</label> <div class="col-md-6">
<input type="text" class="form-control w-35" id="rcptYmd--${pageName}" name="rcptYmd" data-map="RCPT_YMD" readonly /> <label for="rcptNo--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">접수 번호</label>
</div> <input type="text" class="form-control w-45" id="rcptNo--${pageName}" name="rcptNo" data-map="RCPT_NO" readonly />
<!-- 진술자 이름 --> </div>
<div class="col-md-6"> <!-- 접수 일자 -->
<label for="sttrNm--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">성명</label> <div class="col-md-6">
<input type="text" class="form-control w-45" id="sttrNm--${pageName}" name="sttrNm" data-map="STTR_NM" readonly /> <label for="rcptYmd--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">접수 일자</label>
</div> <input type="text" class="form-control w-35" id="rcptYmd--${pageName}" name="rcptYmd" data-map="RCPT_YMD" readonly />
<!-- 의견 제출 구분 코드 --> </div>
<div class="col-md-6"> <!-- 진술자 이름 -->
<label for="opnnSbmsnSeNm--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">의견제출 구분</label> <div class="col-md-6">
<input type="text" class="form-control w-60" id="opnnSbmsnSeNm--${pageName}" name="opnnSbmsnSeNm" data-map="OPNN_SBMSN_SE_NM" readonly /> <label for="sttrNm--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">성명</label>
</div> <input type="text" class="form-control w-45" id="sttrNm--${pageName}" name="sttrNm" data-map="STTR_NM" readonly />
<!-- 의견 제출 요지 --> </div>
<div class="col-md-12"> <!-- 의견 제출 구분 코드 -->
<label for="opnnSbmsnGist--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">의견제출 요지</label> <div class="col-md-6">
<textarea class="form-control w-80" id="opnnSbmsnGist--${pageName}" name="opnnSbmsnGist" data-map="OPNN_SBMSN_GIST" rows="2" data-maxlengthb="300" readonly> <label for="opnnSbmsnSeNm--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">의견제출 구분</label>
</textarea> <input type="text" class="form-control w-60" id="opnnSbmsnSeNm--${pageName}" name="opnnSbmsnSeNm" data-map="OPNN_SBMSN_SE_NM" readonly />
</div> </div>
<!-- 담당자 검토 의견 --> <!-- 의견 제출 요지 -->
<div class="col-md-12"> <div class="col-md-12">
<label for="picRvwOpnn--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">검토 의견</label> <label for="opnnSbmsnGist--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">의견제출 요지</label>
<textarea class="form-control w-80" id="picRvwOpnn--${pageName}" name="picRvwOpnn" data-map="PIC_RVW_OPNN" rows="5" data-maxlengthb="1000"> <textarea class="form-control w-80" id="opnnSbmsnGist--${pageName}" name="opnnSbmsnGist" data-map="OPNN_SBMSN_GIST" rows="2" data-maxlengthb="300" readonly>
</textarea> </textarea>
</div> </div>
<!-- 문서 번호 --> <!-- 담당자 검토 의견 -->
<div class="col-md-12"> <div class="col-md-12">
<label for="docNo--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">문서 번호</label> <label for="picRvwOpnn--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">검토 의견</label>
<input type="text" class="form-control w-30" id="docNo--${pageName}" name="docNo" data-map="DOC_NO" /> <textarea class="form-control w-80" id="picRvwOpnn--${pageName}" name="picRvwOpnn" data-map="PIC_RVW_OPNN" rows="5" data-maxlengthb="1000">
</div> </textarea>
<!-- 통보 구분 코드 --> </div>
<div class="col-md-6"> <!-- 문서 번호 -->
<label for="ntfctnSeCd--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">통보 구분</label> <div class="col-md-12">
<select class="form-select" id="ntfctnSeCd--${pageName}" name="ntfctnSeCd" data-map="NTFCTN_SE_CD" required> <label for="docNo--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">문서 번호</label>
<option value="">선택하세요</option> <input type="text" class="form-control w-30" id="docNo--${pageName}" name="docNo" data-map="DOC_NO" />
<c:forEach items="${FIM030List}" var="item"> </div>
<option value="${item.code}">${item.value}</option> <!-- 통보 구분 코드 -->
</c:forEach> <div class="col-md-6">
</select> <label for="ntfctnSeCd--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">통보 구분</label>
</div> <select class="form-select" id="ntfctnSeCd--${pageName}" name="ntfctnSeCd" data-map="NTFCTN_SE_CD" required>
<!-- 의견 제출 상태 코드 --> <option value="">선택하세요</option>
<div class="col-md-6"> <c:forEach items="${FIM030List}" var="item">
<label for="opnnSbmsnSttsCd--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">처리 결과</label> <option value="${item.code}">${item.value}</option>
<select class="form-select" id="opnnSbmsnSttsCd--${pageName}" name="opnnSbmsnSttsCd" data-map="OPNN_SBMSN_STTS_CD" onchange="fnChangeOpnnSbmsnSttsCd(this.value);" required> </c:forEach>
<option value="">선택하세요</option> </select>
<c:forEach items="${FIM031List}" var="item"> </div>
<option value="${item.code}">${item.value}</option> <!-- 의견 제출 상태 코드 -->
</c:forEach> <div class="col-md-6">
</select> <label for="opnnSbmsnSttsCd--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">처리 결과</label>
</div> <select class="form-select" id="opnnSbmsnSttsCd--${pageName}" name="opnnSbmsnSttsCd" data-map="OPNN_SBMSN_STTS_CD" onchange="fnChangeOpnnSbmsnSttsCd(this.value);" required>
<!-- 감경 사유 코드 --> <option value="">선택하세요</option>
<div class="col-md-6" id="divRductRsnCd--${pageName}"> <c:forEach items="${FIM031List}" var="item">
<label for="rductRsnCd--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">감경사유</label> <option value="${item.code}">${item.value}</option>
<select class="form-select" id="rductRsnCd--${pageName}" name="rductRsnCd" data-map="RDUCT_RSN_CD"> </c:forEach>
<c:forEach items="${FIM019List}" var="item"> </select>
<option value="${item.code}">${item.value}</option> </div>
</c:forEach> <!-- 감경 사유 코드 -->
</select> <div class="col-md-6" id="divRductRsnCd--${pageName}">
</div> <label for="rductRsnCd--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">감경사유</label>
<!-- 감경 금액 --> <select class="form-select" id="rductRsnCd--${pageName}" name="rductRsnCd" data-map="RDUCT_RSN_CD">
<div class="col-md-6" id="divRductAmt--${pageName}"> <c:forEach items="${FIM019List}" var="item">
<label for="rductAmt--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">감경금액</label> <option value="${item.code}">${item.value}</option>
<input type="text" class="form-control w-30 text-end" id="rductAmt--${pageName}" name="rductAmt" data-map="RDUCT_AMT" readonly /> </c:forEach>
</div> </select>
<!-- 답변 일자 --> </div>
<div class="col-md-6"> <!-- 감경 금액 -->
<label for="ansYmd--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">답변 일자</label> <div class="col-md-6" id="divRductAmt--${pageName}">
<input type="text" class="form-control form-date" id="ansYmd--${pageName}" name="ansYmd" data-map="ANS_YMD" <label for="rductAmt--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">감경금액</label>
data-fmt-type="day" maxlength="10" required /> <input type="text" class="form-control w-30 text-end" id="rductAmt--${pageName}" name="rductAmt" data-map="RDUCT_AMT" readonly />
<button type="button" class="bx bx-sm bx-calendar bg-white"></button> </div>
</div> <!-- 답변 일자 -->
<!-- 답변 시간 --> <div class="col-md-6">
<div class="col-md-6"> <label for="ansYmd--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">답변 일자</label>
<label for="ansTm--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">답변 시간</label> <input type="text" class="form-control form-date" id="ansYmd--${pageName}" name="ansYmd" data-map="ANS_YMD"
<input type="text" class="form-control form-time" id="ansTm--${pageName}" name="ansTm" data-map="ANS_TM" data-fmt-type="day" maxlength="10" required />
data-fmt-type="time" maxlength="8" placeholder="시:분:초" required /> <button type="button" class="bx bx-sm bx-calendar bg-white"></button>
</div> </div>
<!-- 답변 내용 --> <!-- 답변 시간 -->
<div class="col-md-12"> <div class="col-md-6">
<label for="ansCn--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">답변 내용</label> <label for="ansTm--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end required">답변 시간</label>
<textarea class="form-control w-80" id="ansCn--${pageName}" name="ansCn" data-map="ANS_CN" rows="5" data-maxlengthb="4000"> <input type="text" class="form-control form-time" id="ansTm--${pageName}" name="ansTm" data-map="ANS_TM"
</textarea> data-fmt-type="time" maxlength="8" placeholder="시:분:초" required />
</div> </div>
<!-- 답변 내용 -->
<div class="col-md-12">
<label for="ansCn--${pageName}" class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">답변 내용</label>
<textarea class="form-control w-80" id="ansCn--${pageName}" name="ansCn" data-map="ANS_CN" rows="5" data-maxlengthb="4000">
</textarea>
</div>
</div>
</form>
<!-- /입력 영역 -->
</div> </div>
</form> <!-- <div class="card"> -->
<!-- /입력 영역 --> </div>
</div> <!-- / Content -->
<!-- <div class="card"> -->
<!-- 업무 버튼 표시 -->
<!-- 업무 버튼 표시 --> <div>
<div> <span class="container-page-btn">
<span class="container-page-btn"> <span class="container-window-btn-right">
<span class="container-window-btn-right"> <!-- 업무 버튼 -->
<!-- 업무 버튼 --> <button type="button" class="btn btn-primary" id="btnSave--${pageName}" title="저장" onclick="fnSave${pageName}()">저장</button>
<button type="button" class="btn btn-primary" id="btnSave--${pageName}" title="저장" onclick="fnSave${pageName}()">저장</button> </span>
</span> </span>
</span> </div>
<!-- / 업무 버튼 표시 -->
<jsp:include page="/WEB-INF/jsp/include/bottom.jsp" />
<div class="content-backdrop fade"></div>
</div> </div>
<!-- / 업무 버튼 표시 -->
<script> <script>
/************************************************************************** /**************************************************************************

@ -292,12 +292,17 @@
return; return;
} }
let params = {
callControlName : "${pageName}Control"
, crdnId : crdnId
}
ajax.get({ ajax.get({
url : ${pageName}Control.urls.getInfo url : ${pageName}Control.urls.getInfo
, data : { crdnId : crdnId } , data : params || {}
, success : resp => { , success : resp => {
dialog.open({ dialog.open({
id : ${pageName}Control.prefixed("dialog") id : "totalInfoMainDialog"
, title : "개별총정보" , title : "개별총정보"
, content : resp , content : resp
, size : "xxl" , size : "xxl"

@ -150,7 +150,7 @@
} }
/************************************************************************** /**************************************************************************
* function * 탭 clickEvent
**************************************************************************/ **************************************************************************/
// 건수 표기 // 건수 표기
fnChangeCountStauts = () => { fnChangeCountStauts = () => {
@ -458,7 +458,7 @@
// Dataset 셋팅 // Dataset 셋팅
${pageName}Control.setData([${totalInfo}]); ${pageName}Control.setData([${totalInfo}]);
// // 단속, 납부자 정보
fnCrdnPayerInfo${pageName}(); fnCrdnPayerInfo${pageName}();
}); });

@ -7,6 +7,8 @@
<div class="col-xl-9 mx-1"> <div class="col-xl-9 mx-1">
<!-- 입력 영역 --> <!-- 입력 영역 -->
<form id="frmEdit--${pageName}" name="frmEdit"> <form id="frmEdit--${pageName}" name="frmEdit">
<input type="hidden" id="crdnId--${pageName}" name="crdnId" data-map="CRDN_ID" />
<input type="hidden" id="atchFileCnt--${pageName}" name="atchFileCnt" data-map="ATCH_FILE_CNT" />
<input type="hidden" id="rtpyrId--${pageName}" name="rtpyrId" data-map="RTPYR_ID" /> <input type="hidden" id="rtpyrId--${pageName}" name="rtpyrId" data-map="RTPYR_ID" />
<!-- 단속 정보 --> <!-- 단속 정보 -->
@ -276,31 +278,32 @@
</div> <!-- <div class="col-xl-9 mx-1"> --> </div> <!-- <div class="col-xl-9 mx-1"> -->
<!-- 단속 이미지 --> <!-- 단속 이미지 -->
<div class="col-xl-3 mx-1"> <div class="card" style="width:500px;">
<div class="card"> <form id="frmFile--${pageName}" method="post" enctype="multipart/form-data">
<form id="frmFile--${pageName}" method="post" enctype="multipart/form-data"> <input type="file" id="newFileList--${pageName}" name="newFileList" multiple accept="image/*" hidden />
<input type="file" id="newFileList--${pageName}" name="newFileList" multiple accept="image/*" hidden /> <input type="file" id="modifyFileList--${pageName}" name="modifyFileList" multiple accept="image/*" hidden />
</form> </form>
<form id="frmUploadSet--${pageName}" method="post" enctype="multipart/form-data"> <div class="col-md-12 d-flex justify-content-between">
<input type="file" id="inputUploadSet--${pageName}" name="inputUploadSet" multiple accept="image/*" hidden /> <div>
</form> <button type="button" class="btn btn-primary" id="btnEditPhoto--${pageName}" title="선택 사진 편집">편집</button>
<div class="col-md-12">
<!-- 단속사진 버튼 -->
<div class="container-page-btn">
<!-- 버튼 우측 정렬 -->
<span class="container-window-btn-right">
<button type="button" id="btnAddFile--${pageName}" class="btn btn-primary">이미지 추가</button>
<button type="button" id="btnOpenVideoCapture--${pageName}" class="btn btn-primary">동영상 캡쳐</button>
<button type="button" id="btnCancelAddFile--${pageName}" class="btn btn-primary">선택 사진 삭제</button>
</span>
</div>
</div> </div>
<div id="display--${pageName}" style="overflow-y: scroll;height: 600px;border-style: solid;"> <div>
<button type="button" class="btn btn-primary" id="btnSaveFile--${pageName}" title="저장" onclick="fnSaveFile${pageName}();">저장</button>
<button type="button" class="btn btn-primary" id="btnAddFile--${pageName}" title="사진 추가">추가</button>
<button type="button" class="btn btn-primary" id="btnDeleteFile--${pageName}" title="선택 사진 삭제">삭제</button>
</div> </div>
</div> <!-- <div class="card"> --> </div>
</div> <!-- 단속 이미지 <div class="col-xl-3 mx-1"> --> <div id="displayForExist--${pageName}" style="overflow-y:scroll; min-height:80px; max-height:600px; border-style:solid;">
</div>
<form id="frmUploadSet--${pageName}" method="post" enctype="multipart/form-data">
<input type="file" id="inputUploadSet--${pageName}" name="inputUploadSet" multiple accept="image/*" hidden />
</form>
<div id="displayForNew--${pageName}" style="overflow-y:scroll; min-height:40px; max-height:80px; border-style:solid;">
</div>
</div>
</div> <!-- <div class="d-flex flex-row justify-content-evenly"> --> </div> <!-- <div class="d-flex flex-row justify-content-evenly"> -->
</div> <!-- <div class="content-wrapper"> --> </div> <!-- <div class="content-wrapper"> -->
@ -312,6 +315,16 @@
var ${pageName}PrefixUrl = "/sprt/sprt02"; var ${pageName}PrefixUrl = "/sprt/sprt02";
// FormFields // FormFields
var ${pageName}Fields = new FormFields("#frmEdit--${pageName}"); var ${pageName}Fields = new FormFields("#frmEdit--${pageName}");
// 단속 사진
var uploadSet = uploadSupport("#inputUploadSet--${pageName}");
var existFileArr = [];
var captureFileArr = [];
var localUploadArr = [];
var numberPlateArr = [];
// 파일 리스트
var fileListArr = [];
/************************************************************************** /**************************************************************************
* DatasetControl * DatasetControl
@ -340,11 +353,139 @@
${pageName}Fields.set(item); // Dataset 셋팅 ${pageName}Fields.set(item); // Dataset 셋팅
} }
// 저장
${pageName}Control.onSave = (resp) => {
dialog.alert(resp.retMessage);
if (resp.saved) {
// fnDataRefreshInfo(); // 자료 재조회
}
};
${pageName}Control.save = (info) => {
if (!info) return;
let formData = new FormData(document.getElementById("frmFile--${pageName}"));
for (let key in info) {
let value = info[key];
formData.append(key, value);
}
formData.delete("newFileList");
formData.delete("modifyFileList");
// 추가 파일 등록
if (localUploadArr.length > 0) {
localUploadArr.forEach(item => formData.append("newFileList", item));
}
ajax.post({
url : wctx.url("/sprt/sprt02/020/update.do")
, data : formData
, contentType : false
, processData : false
, success : resp => {
${pageName}Control.onSave(resp);
}
});
}
uploadSet.onDatasetChange = () => {
let files = uploadSet.getDataset();
files.forEach(item => localUploadArr.push(item));
fnImageDisplay(false);
};
uploadSet.onRemove = () => {
};
/************************************************************************** /**************************************************************************
* * function 이미지 관련
**************************************************************************/
fnMakeImgForExistFile = (fileArr) => {
var tagsText = "";
for (var index = 0, j = 0; index < fileArr.length; index++) {
var item = fileArr[index];
if (item.status == "delete") {
continue;
}
tagsText += "<label class='mx-2'>";
tagsText += "<input type='radio' name='existPhoto' class='form-check-input' value='" + item.FILE_ID + "' ";
if (index == 0) {
tagsText += " checked='checked' ";
}
tagsText += " />";
tagsText += "<img src='"+ item.URL +"' width='280' height='150' />";
tagsText += "</label>";
if (j % 2 == 1) {
tagsText += "<br />";
}
j++;
}
return tagsText;
}
fnMakeImgForNewFile = (fileArr) => {
var tagsText = "";
for (var index = 0; index < fileArr.length; index++) {
var item = fileArr[index];
tagsText += "<label class='mx-2'>";
tagsText += "<input type='checkbox' name='newPhoto' class='form-check-input' value='"+item.id +"' ";
tagsText += " />";
tagsText += "<img src='"+ item.url +"' width='280' height='150' />";
tagsText += "</label>";
if (index % 2 == 1) {
tagsText += "<br />";
}
}
return tagsText;
}
fnImageDisplay = (isExist) => {
if (isExist) {
var displayArea = document.querySelector("#displayForExist--${pageName}");
var tagsText = fnMakeImgForExistFile(existFileArr);
if (tagsText == "") {
displayArea.innerHTML = "등록된 사진이 없습니다.";
$("#btnEditPhoto--${pageName}").hide();
} else {
displayArea.innerHTML = tagsText;
$("#btnEditPhoto--${pageName}").show();
}
} else {
var displayArea = document.querySelector("#displayForNew--${pageName}");
var concatArr = localUploadArr.concat(numberPlateArr).concat(captureFileArr);
var tagsText = fnMakeImgForNewFile(concatArr);
displayArea.innerHTML = tagsText;
}
};
/**************************************************************************
* function
**************************************************************************/ **************************************************************************/
// 민원 원본 보기 // 민원 원본 보기
openCvlcptOrgnl${pageName} = (params) => { openCvlcptOrgnl${pageName} = (params) => {
if (!params) return;
let dialogId = "cvlcptOrgnlDialog--${pageName}"; let dialogId = "cvlcptOrgnlDialog--${pageName}";
ajax.get({ ajax.get({
@ -377,6 +518,40 @@
}); });
} }
// 자료 재조회
fnDataRefreshInfo = () => {
let crdnId = $("#crdnId--${pageNameMain}").val();
// 단속 ID 가 없다면.. return
if (crdnId == null || crdnId == "") {
return;
}
let params = {
callPurpose : "view"
, crdnId : crdnId
, delYn : "N"
};
ajax.get({
url : wctx.url("/sprt/sprt02/020/info.do")
, headers: { Accept: "application/json; charset=utf-8" } // json
, data : params || {}
, success : resp => {
if (resp.crdnPayer) {
${pageName}Control.setData([resp.crdnPayer]);
} else {
$("#frmEdit--${pageName}")[0].reset();
}
// 최상단 단속 Data 셋팅
if (resp.crdnPayer) {
${pageNameMain}Control.setData([resp.crdnPayer]);
}
}
});
}
/************************************************************************** /**************************************************************************
* 초기 셋팅 * 초기 셋팅
**************************************************************************/ **************************************************************************/
@ -424,17 +599,77 @@
// 이벤트 설정 // 이벤트 설정
setEvent${pageName} = () => { setEvent${pageName} = () => {
// // 선택 사진 편집
$("#btnEditPhoto--${pageName}").on('click', () => {
let checked = $("#displayForExist--${pageName}").find("[name='existPhoto']:checked");
if (checked.length < 1) {
dialog.alert("선택된 사진이 없습니다.");
return;
}
let fileId = checked.val();
window.open(wctx.url("/sprt/sprt03/020/main.do?openerPageName=${pageName}&fileId=" + fileId)
,"editPhoto"
,"width=1400,height=750"
);
});
// 선택 사진 삭제
$("#btnDeleteExistPhoto--${pageName}").on('click', () => {
let checked = $("#displayForExist--${pageName}").find("[name='existPhoto']:checked");
if (checked.length < 1) {
dialog.alert("선택된 사진이 없습니다.");
return;
}
let target = checked[0].value;
existFileArr.forEach(function(item) {
if (item.FILE_ID == target) {
item.status = "delete";
}
});
fnImageDisplay(true);
});
// 사진 추가
$("#btnAddFile--${pageName}").on("click", () => {
$("#inputUploadSet--${pageName}").trigger("click");
});
// 사진 삭제
$("#btnCancelAddFile--${pageName}").on('click', () => {
let checked = $("#displayForNew--${pageName}").find("[name='newPhoto']:checked");
if (checked.length < 1) {
dialog.alert("선택된 사진이 없습니다.");
return;
}
let checkedArr = [];
for (let iLoop = 0; iLoop < checked.length; iLoop++) {
checkedArr.push(checked[iLoop].value);
}
captureFileArr = captureFileArr.filter(item => checkedArr.indexOf(item.id) == -1);
localUploadArr = localUploadArr.filter(item => checkedArr.indexOf(item.id) == -1);
numberPlateArr = numberPlateArr.filter(item => checkedArr.indexOf(item.id) == -1);
fnImageDisplay(false);
});
} }
/************************************************************************** /**************************************************************************
* function * 버튼 clickEvent
**************************************************************************/ **************************************************************************/
// 민원 원본 보기 // 민원 원본 보기
fnOpenCvlcptOrgnl${pageName} = () => { fnOpenCvlcptOrgnl${pageName} = () => {
let crdnId = ${pageName}Control.dataset.getValue("CRDN_ID"); let crdnId = ${pageName}Control.dataset.getValue("CRDN_ID");
let sggCd = $("#sggCd--${pageNameMain}").val(); let sggCd = ${pageName}Control.dataset.getValue("SGG_CD");
let taskSeCd = $("#taskSeCd--${pageNameMain}").val(); let taskSeCd = ${pageName}Control.dataset.getValue("TASK_SE_CD");
// 단속 ID 가 없다면.. return // 단속 ID 가 없다면.. return
if (crdnId == null || crdnId == "") { if (crdnId == null || crdnId == "") {
@ -503,6 +738,16 @@
console.log("단속 상태 변경"); console.log("단속 상태 변경");
} }
// 사진 변경 저장
fnSaveFile${pageName} = () => {
dialog.alert({
content : "현재 사진 정보를 저장하시겠습니까?"
, onOK : () => {
${pageName}Control.save(${pageName}Fields.get());
}
});
}
/************************************************************************** /**************************************************************************
* script 진입 * script 진입
**************************************************************************/ **************************************************************************/
@ -513,8 +758,20 @@
// 화면 초기 설정 // 화면 초기 설정
initForm${pageName}(); initForm${pageName}();
let crdnPayerInfo = ${crdnPayer};
// Dataset 셋팅 // Dataset 셋팅
${pageName}Control.setData([${crdnPayer}]); ${pageName}Control.setData([crdnPayerInfo]);
// 이미지 셋팅
if (crdnPayerInfo.fileList) {
crdnPayerInfo.fileList.forEach(function(item) {
item.status = "";
existFileArr.push(item);
});
}
fnImageDisplay(true);
}); });
// #sourceURL=sprt02020-info.jsp // #sourceURL=sprt02020-info.jsp

@ -265,10 +265,10 @@
} }
/************************************************************************** /**************************************************************************
* * function
**************************************************************************/ **************************************************************************/
// 심의 dialog // 심의 dialog
${pageName}Control.getInfoOpnnSbmsnDlbrt = (params) => { getInfoOpnnSbmsnDlbrt = (params) => {
ajax.get({ ajax.get({
url : wctx.url("/excl/excl02/030/info.do") url : wctx.url("/excl/excl02/030/info.do")
, data : params || {} , data : params || {}
@ -333,7 +333,7 @@
} }
/************************************************************************** /**************************************************************************
* function * 버튼 clickEvent
**************************************************************************/ **************************************************************************/
// 의견제출 등록 // 의견제출 등록
fnCreateOpnnSbmsn${pageName} = () => { fnCreateOpnnSbmsn${pageName} = () => {
@ -430,7 +430,7 @@
, crdnId : crdnId , crdnId : crdnId
}; };
${pageName}Control.getInfoOpnnSbmsnDlbrt(params); getInfoOpnnSbmsnDlbrt(params);
} }
// 심의의결서 출력 // 심의의결서 출력

Loading…
Cancel
Save