feat: 외부연계-CCTV고정형/이동형 parsing 반영

main
minuk926 2 years ago
parent 6163d33fb2
commit 327c2c06fc

@ -18,11 +18,11 @@ import lombok.ToString;
@EqualsAndHashCode
@Builder
@ToString
public class NatlNewspaperRcvReqDTO implements Serializable {
public class FolderReqDTO implements Serializable {
private static final long serialVersionUID = 1L;
private String filePath;
private List<XmlFileInfo> xmlFileInfoList;
private List<FileInfo> fileInfoList;
@Setter
@Getter
@ -30,7 +30,7 @@ public class NatlNewspaperRcvReqDTO implements Serializable {
@AllArgsConstructor
@EqualsAndHashCode
@ToString
public static class XmlFileInfo implements Serializable {
public static class FileInfo implements Serializable {
private static final long serialVersionUID = 1L;
private String fileNm;

@ -7,6 +7,7 @@ import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
import org.apache.commons.collections4.ListUtils;
@ -21,6 +22,7 @@ import kr.xit.fims.biz.FimsConst;
import kr.xit.fims.biz.ec.mapper.IEcCctvCrackdownMapper;
import kr.xit.fims.biz.ec.mapper.IEcCtznSttemntMapper;
import kr.xit.fims.biz.ec.model.CctvCrackdownDTO;
import kr.xit.fims.biz.ec.model.FolderReqDTO;
import kr.xit.framework.biz.cmm.model.CmmFileDTO;
import kr.xit.framework.biz.cmm.service.ICmmFileService;
import kr.xit.framework.support.exception.BizRuntimeException;
@ -141,6 +143,81 @@ public class EcCctvCrackdownService implements IEcCctvCrackdownService {
}
@Override
@Transactional
public void saveBusCctvCrackdownDatas(final FolderReqDTO dto) {
String filePath = dto.getFilePath();
AtomicInteger index = new AtomicInteger();
dto.getFileInfoList().forEach((fi) -> {
// // Receive XML File Parsing
// NatlNewspaperRcvXmlDTO xmlDto = XmlParseUtils.readXmlToObject(NatlNewspaperRcvXmlDTO.class, filePath+"/"+fi.getFileNm());
// // XML 첨부파일 정보
// NatlNewspaperRcvXmlDTO.ApndFileInfo appendFileDto = xmlDto.getAppendFileInfo();
// // XML 첨부파일 수 : 위도 경도 .png 파일 포함(첨부파일중 가장 마지막 index)
// int fileCnt = Integer.parseInt(appendFileDto.getApndfilcount());
// if(fileCnt == 1) throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, "첨부된 파일이 부정확 합니다(위경도 파일은 필수 요소 입니다)");
//
// //-------------------------------------------------------------
// // interface table save
// //-------------------------------------------------------------
// xmlDto.setPetiRegD(xmlDto.getPetiRegD().replaceAll("[-: ]", ""));
// xmlDto.setPetiEndD(xmlDto.getPetiEndD().replaceAll("[-: ]", ""));
// xmlDto.setAncRegD(xmlDto.getAncRegD().replaceAll("[-: ]", ""));
// xmlDto.setRegD(xmlDto.getRegD().replaceAll("[-: ]", ""));
// xmlDto.setRegister(getUserUniqId());
// mapper.insertEcEsbInterface(xmlDto);
//
// //-------------------------------------------------------------
// //시민 신고 테이블 save
// //-------------------------------------------------------------
// CtznStmtDTO ctznStmtDTO = setCtznSttemntDTOFromRcvXml(xmlDto);
// ctznSttemntMapper.insertEcCtznSttemnt(ctznStmtDTO);
//
// index.set(0);
// CmmFileDTO.FileMst fstMstDTO = null;
// CmmFileDTO.FileDtl pngDtlDTO = null;
// for(CtznStmtDTO.CtznStmtDtl dtl : ctznStmtDTO.getStmtDtlDTOs()){
// ctznSttemntMapper.insertEcCtznSttemntDetail(dtl);
//
// // 단속건수가 1건인 경우 파일 전체 저장
// if(ctznStmtDTO.isSingle()) {
// saveAllAppendFiles(xmlDto, appendFileDto, dtl, fileCnt);
// return;
// }
//
// CtznStmtDTO.DupData dupDataDTO = ctznStmtDTO.getDupDataList().stream()
// .filter(d -> Objects.equals(d.getSttemntDetailDTO().getVhcleNo(), dtl.getVhcleNo()))
// .findFirst()
// .get();
//
// dtl.getIndexs().addAll(dupDataDTO.getIndexs());
//
// //-------------------------------------------------------------
// // 첨부파일 저장
// //-------------------------------------------------------------
// // 첨부파일이 있고, 단속사진 업로드가 끝나지 않은경우(단속사진중 마지막 1장은 위도/경도 파일(.png 필수)로 제외)
// if(index.get() == 0) {
// fstMstDTO = saveAppendFiles(appendFileDto, dtl, index.get(), fileCnt);
// }else {
// if(Checks.isEmpty(pngDtlDTO)) {
// if (fstMstDTO == null || fstMstDTO.getCmmFileDtls().size() == 0)
// throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, "시민신고 첨부 파일 처리중 오류가 발생하였습니다.");
//
// for (CmmFileDTO.FileDtl dtlDto : fstMstDTO.getCmmFileDtls()) {
// if (Objects.equals(dtlDto.getFileExtsn(), "png")) {
// pngDtlDTO = dtlDto;
// break;
// }
// };
// }
// saveFstOverAppendFiles(appendFileDto, dtl, pngDtlDTO, index.get());
// }
// index.addAndGet(1);
// };
});
}
// metaFileName : 20101224121055000_014_001_0
// yyyyMMddHHmmssTTT_업체코드_장비코드

@ -1,14 +1,8 @@
package kr.xit.fims.biz.ec.service;
import java.util.*;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import com.ctc.wstx.util.DataUtil;
import kr.xit.fims.biz.ec.model.NatlNewspaperRcvReqDTO;
import org.apache.ibatis.session.RowBounds;
import org.apache.tiles.request.collection.CollectionUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -20,7 +14,6 @@ import kr.xit.framework.biz.cmm.model.CmmFileDTO;
import kr.xit.framework.biz.cmm.service.ICmmFileService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestBody;
@Slf4j
@RequiredArgsConstructor

@ -25,7 +25,7 @@ import kr.xit.fims.biz.ec.mapper.IEcCtznSttemntMapper;
import kr.xit.fims.biz.ec.mapper.IEcNatlNewspaperMapper;
import kr.xit.fims.biz.ec.model.CtznStmtDTO;
import kr.xit.fims.biz.ec.model.NatlNewspaperRcvDTO;
import kr.xit.fims.biz.ec.model.NatlNewspaperRcvReqDTO;
import kr.xit.fims.biz.ec.model.FolderReqDTO;
import kr.xit.fims.biz.ec.model.NatlNewspaperRcvXmlDTO;
import kr.xit.framework.biz.cmm.model.CmmFileDTO;
import kr.xit.framework.biz.cmm.service.ICmmFileService;
@ -87,11 +87,11 @@ public class EcNatlNewspaperService implements IEcNatlNewspaperService {
@SuppressWarnings("ConstantConditions")
@Override
@Transactional
public void saveEsbRvcParse(final NatlNewspaperRcvReqDTO dto) {
public void saveEsbRvcParse(final FolderReqDTO dto) {
String filePath = dto.getFilePath();
AtomicInteger index = new AtomicInteger();
dto.getXmlFileInfoList().forEach((fi) -> {
dto.getFileInfoList().forEach((fi) -> {
// Receive XML File Parsing
NatlNewspaperRcvXmlDTO xmlDto = XmlParseUtils.readXmlToObject(NatlNewspaperRcvXmlDTO.class, filePath+"/"+fi.getFileNm());
// XML 첨부파일 정보

@ -6,6 +6,7 @@ import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import kr.xit.fims.biz.ec.model.CctvCrackdownDTO;
import kr.xit.fims.biz.ec.model.FolderReqDTO;
import kr.xit.framework.core.utils.XitCmmnUtil;
public interface IEcCctvCrackdownService {
@ -14,7 +15,7 @@ public interface IEcCctvCrackdownService {
CctvCrackdownDTO.ExtrlRegltCntc findExtrlRegltCntc(final String extrlRegltCntcId);
void saveCctvCrackdownDatas(final CctvCrackdownDTO.Request dto);
void saveBusCctvCrackdownDatas(FolderReqDTO dto);

@ -5,7 +5,7 @@ import java.util.Map;
import org.apache.ibatis.session.RowBounds;
import kr.xit.fims.biz.ec.model.NatlNewspaperRcvReqDTO;
import kr.xit.fims.biz.ec.model.FolderReqDTO;
import kr.xit.fims.biz.ec.model.NatlNewspaperRcvDTO;
import kr.xit.framework.core.utils.XitCmmnUtil;
@ -14,7 +14,7 @@ public interface IEcNatlNewspaperService {
List<NatlNewspaperRcvDTO> findEsbInterfaces(final Map<String, Object> paraMap, final RowBounds rowBounds);
NatlNewspaperRcvDTO findEsbInterface(final String interfaceSeqN);
void saveEsbRvcParse(final NatlNewspaperRcvReqDTO dto);
void saveEsbRvcParse(final FolderReqDTO dto);

@ -8,12 +8,14 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;
import kr.xit.fims.biz.FimsConst;
import kr.xit.fims.biz.ec.model.CctvCrackdownDTO;
import kr.xit.fims.biz.ec.model.FolderReqDTO;
import kr.xit.fims.biz.ec.service.IEcCctvCrackdownService;
import kr.xit.framework.biz.cmm.model.CmmFileDTO;
import kr.xit.framework.biz.cmm.service.ICmmFileService;
@ -50,7 +52,7 @@ public class EcCctvCrackdownController {
@RequestMapping(value = "/ecCctvCrackdownFileSelPopup")
public ModelAndView ecCctvCrackdownFileSelPopup(){
ModelAndView mav = new ModelAndView(FimsConst.FIMS_JSP_BASE_PATH +"ec/ecCctvCrackdownFileSelPopup.popup");
//mav.addObject("dirPath", fileRcvRoot + rcvBusonlyCctvPath);
mav.addObject("dirPath", fileRcvRoot + rcvBusonlyCctvPath);
return mav;
}
@ -88,6 +90,15 @@ public class EcCctvCrackdownController {
return mav;
}
@PostMapping(value = "/saveBusCctvCrackdownDatas")
public ModelAndView saveBusCctvCrackdownDatas(@RequestBody final FolderReqDTO dto) {
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
service.saveBusCctvCrackdownDatas(dto);
AjaxMessageMapRenderer.success(mav, MessageKey.CMM_SUCCESS);
return mav;
}
@GetMapping(value = "/findExtrlRegltCntcs")
public ModelAndView findExtrlRegltCntcs(@RequestParam final Map<String,Object> paraMap) {
return ResultResponse.of(service.findExtrlRegltCntcs(paraMap, MybatisUtils.getPagingInfo(paraMap)));

@ -4,8 +4,6 @@ import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
@ -16,7 +14,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;
import kr.xit.fims.biz.FimsConst;
import kr.xit.fims.biz.ec.model.NatlNewspaperRcvReqDTO;
import kr.xit.fims.biz.ec.model.FolderReqDTO;
import kr.xit.fims.biz.ec.service.IEcNatlNewspaperService;
import kr.xit.framework.biz.cmm.model.CmmFileDTO;
import kr.xit.framework.biz.cmm.service.ICmmFileService;
@ -81,7 +79,7 @@ public class EcNatlNewspaperController {
}
@PostMapping(value = "/saveNatlNewspaers")
public ModelAndView saveNatlNewspaer(@RequestBody final NatlNewspaperRcvReqDTO dto) {
public ModelAndView saveNatlNewspaer(@RequestBody final FolderReqDTO dto) {
ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW);
service.saveEsbRvcParse(dto);

@ -68,6 +68,48 @@
AND use_at = 'Y'
</when>
<when test='type != null and type == "CMM_ETC1"'>
/* 공통 코드 etc1 */
SELECT etc_1 AS code
, code_nm
FROM xit_cmmn_detail_code
WHERE code_id = #{codeId}
AND use_at = 'Y'
AND etc_1 = CASE WHEN etc_1 IS NULL THEN 'NONE'
WHEN etc_1 = '' THEN 'NONE'
ELSE etc_1
END
ORDER BY ordr
</when>
<when test='type != null and type == "CMM_ETC2"'>
/* 공통 코드 etc2 */
SELECT etc_2 AS code
, code_nm
FROM xit_cmmn_detail_code
WHERE code_id = #{codeId}
AND use_at = 'Y'
AND etc_2 = CASE WHEN etc_2 IS NULL THEN 'NONE'
WHEN etc_2 = '' THEN 'NONE'
ELSE etc_2
END
ORDER BY ordr
</when>
<when test='type != null and type == "CMM_ETC3"'>
/* 공통 코드 etc3 */
SELECT etc_3 AS code
, code_nm
FROM xit_cmmn_detail_code
WHERE code_id = #{codeId}
AND use_at = 'Y'
AND etc_3 = CASE WHEN etc_3 IS NULL THEN 'NONE'
WHEN etc_3 = '' THEN 'NONE'
ELSE etc_3
END
ORDER BY ordr
</when>
<otherwise>
/* 공통 코드 */
SELECT code

@ -9,7 +9,7 @@
<table>
<caption>검색조건</caption>
<colgroup>
<col style="width: 600px;"/>
<col style="width: 100%;"/>
<col>
<col/>
<col/>
@ -20,14 +20,11 @@
<tbody>
<tr>
<td>
<label for="folder">파일 경로 선택</label>
<%-- <input id="dirPath" name="dirPath" type="text" size="200" value="<c:out value='${dirPath}'/>" title="검색" class="w_fix04"/>--%>
<code:select type="CMM_ETC2" id="regltSeCode" name="regltSeCode" codeId="FIM002" defaultSelect="01" onchange="fnBiz.onComboChange()" title="단속구분코드" cls="selectBoxTotal" alt="단속구분코드" />
<%-- <label name="lbTxt">폴더 선택</label>--%>
<input id="folder" type="file" webkitdirectory directory multiple="false"/>
<input id="dirPath" name="dirPath" type="text" size="400" value="<c:out value='${dirPath}'/>" title="버스전용차로데이타경로" style="display: none; width: 80%" readonly/>
<input id="folder" type="file" webkitdirectory directory multiple="false" style="display:none" />
<h2>Selected Files</h2>
<ul>
</ul>
</td>
<%-- <td colspan="6">--%>
<%-- <input type="button" id="btnSearch" class="btn_search" title="검색" value="검색" />--%>
@ -66,14 +63,14 @@
******************************* */
const fnBiz = {
fileSelect: (e) => {
const output = document.querySelector("ul");
//const output = document.querySelector("ul");
const files = e.target.files;
const arrFile = [];
for (let i=0; i<files.length; i++) {
const item = document.createElement("li");
item.innerHTML = files[i].webkitRelativePath;
output.appendChild(item);
// const item = document.createElement("li");
// item.innerHTML = files[i].webkitRelativePath;
// output.appendChild(item);
arrFile.push({
filePath: '',
fileNm: files[i].name,
@ -90,53 +87,85 @@
GRID.reloadData();
//FIXME : onGridUpdated
GRID.on('onGridUpdated', (ev) => {
console.log('%%%%%%%%%%%%%>>>>>>>',ev)
//console.log('%%%%%%%%%%%%%>>>>>>>',ev)
}) // 그리드 레이아웃 새로고침 (로드가 다 되지 않는 경우 그리드가 흰색 화면으로 출력될 때가 있다.))
}
,add: () => {
const arrChecks = GRID.getCheckedRows();
const arrChecks = GRID.getData();
if(arrChecks.length===0) {
alert("등록[변경]할 목록을 선택하세요.");
alert("등록[변경]할 데이타가 없습니다.");
return false;
}
const data = {
filePath: $('#dirPath').val()
,xmlFileInfoList: arrChecks.map((row) => {
return {fileNm: row.fileNm, fileType: row.fileType, fileSize: row.fileSize}
})
}
const formData = new FormData();
arrFiles.forEach((f)=> {
formData.append("files", f)
})
//formData.append("files", arrFiles)
if(confirm("등록 하시겠습니까?")) {
if($('#regltSeCode').val() !== '07') {
const formData = new FormData();
arrFiles.forEach((f)=> {
formData.append("files", f)
})
$.ajax({
type: 'post'
, enctype: "multipart/form-data"
, url: '<c:url value="/fims/biz/ec/saveCctvCrackdownDatas.do"/>'
, data: formData
, processData: false
, contentType: false
, success: (res) => {
if (res) {
alert(res.message);
fnBiz.search();
}
//fnBiz.search();
}
, error: (xhr, status, err) => {
if(confirm("등록 하시겠습니까?")) {
$.ajax({
type: 'post'
,enctype: "multipart/form-data"
,url: '<c:url value="/fims/biz/ec/saveCctvCrackdownDatas.do"/>'
,data: formData
,processData: false
,contentType: false
,success: (res) => {
if(res){
alert(res.message);
fnBiz.search();
}
//fnBiz.search();
}
,error: (xhr, status, err) => {
})
}else {
const data = {
filePath: $('#dirPath').val()
,fileInfoList: arrChecks.map((row) => {
return {fileNm: row.fileNm, fileType: row.fileType, fileSize: row.fileSize}
})
}
})
cmmAjax({
url: '<c:url value="/fims/biz/ec/saveBusCctvCrackdownDatas.do"/>'
, data: JSON.stringify(data)
, contentType: 'application/json; charset=utf-8'
, success: () => {
fnBiz.search();
}
})
}
}
}
,onComboChange: () => {
console.log($('#regltSeCode').val());
let labelTxt = '폴더 선택';
if($('#regltSeCode').val() === '07'){
$('#folder')
.css('display', 'none')
.attr('disabled', true);
$('#dirPath')
.css('display', 'inline-block')
.attr('disabled', false);
GRID.reloadData();
}else{
$('#folder')
.css('display', 'inline-block')
.attr('disabled', false);
$('#dirPath')
.css('display', 'none')
.attr('disabled', true);
labelTxt = '파일 경로';
GRID.resetData([]);
}
//$('label[name="lbTxt"]').text(labelTxt);
}
}
/**************************************************************************
@ -206,7 +235,7 @@
const gridOptions = {
el: 'grid',
rowHeaders: ['rowNum', 'checkbox'],
rowHeaders: ['rowNum'],
columns: gridColumns,
//FIXME : 페이징 미사용시
//페이지처리 hide
@ -223,7 +252,14 @@
};
const gridDatasource = { //DataSource
initialRequest: false
initialRequest: false,
api: {
readData: {
url: '<c:url value="/fims/biz/ec/findCctvCrackdownFiles.do"/>'
//,initParams: {dirPath: $('#dirPath').val()}
,serializer: (params) => getPageParam({dirPath: $('#dirPath').val()}, params)
}
}
};
GRID = TuiGrid.of(gridOptions, gridDatasource, (ev) => {

@ -1,390 +0,0 @@
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/framework/taglibs.jsp" %>
<style>
div.draggable {
float: left;
padding: 10px 0 0 20px;
width: 160px;
height: 160px;
/*background:url(/resources/framework/images/common/clip.png) no-repeat 0 0;*/
background-color: red;
}
div.invert {
/*background:url(/resources/framework/images/common/noImage.png) no-repeat 0 0;*/
background-color: blue;
}
</style>
<c:set var="bizName" value="주민 신고 데이타"/>
<div class="popup" style="min-width: 100px;">
<div class="popup_inner" style="max-width: 1000px;">
<p class="pop_title">
<c:out value="${bizName}"/>(<c:out value="${reqDTO.interfaceSeqN}"/>) 상세
</p>
<form name="frmStmt">
<table class="tbl03">
<caption><c:out value="${bizName}"/> 상세</caption>
<colgroup>
<col style="width: 13%;"/>
<col style="width: 20%;"/>
<col style="width: 13%;"/>
<col style="width: 20%;"/>
<col style="width: 13%;"/>
<col style="width: 20%;"/>
</colgroup>
<tbody>
<tr>
<th>기관코드</th>
<td>
<input type="text" name="insttCode" value='<c:out value="${ctznStmtDTO.insttCode}"/>' readonly>
</td>
<th>시스템코드</th>
<td>
<input type="text" name="sysCode" value='<c:out value="${ctznStmtDTO.sysCode}"/>' readonly>
</td>
<th>민원구분</th>
<td>
<input type="text" name="cvplSe" value='<c:out value="${ctznStmtDTO.cvplSe}"/>' readonly>
</td>
</tr>
<tr>
<th>민원신청번호</th>
<td>
<input type="text" name="petiAncCodeV" value='<c:out value="${ctznStmtDTO.cvplReqstNo}"/>' readonly>
</td>
<th>민원접수번호</th>
<td>
<input type="text" name="petiNoC" value='<c:out value="${ctznStmtDTO.cvplRceptNo}"/>' readonly>
</td>
<th>민원신청인명</th>
<td>
<input type="text" name="civilNoC" value='<c:out value="${ctznStmtDTO.cvplApplcntNm}"/>' readonly>
</td>
</tr>
<tr>
<th>신청인이메일</th>
<td>
<input type="text" name="peterNameV" value='<c:out value="${ctznStmtDTO.cvplApplcntEmailAdres}"/>' readonly>
</td>
<th>신청인우편번호</th>
<td>
<input type="text" name="zipCodeC" value='<c:out value="${ctznStmtDTO.cvplApplcntZip}"/>' readonly>
</td>
<th>신청인주소</th>
<td>
<input type="text" name="addressV" value='<c:out value="${ctznStmtDTO.cvplApplcntAdres}"/>' readonly>
</td>
</tr>
<tr>
<th>신청인핸드폰</th>
<td>
<input type="text" name="celNoV" value='<c:out value="${ctznStmtDTO.cvplApplcntMoblphonNo}"/>' readonly>
</td>
<th>신청인전화</th>
<td>
<input type="text" name="telNoV" value='<c:out value="${ctznStmtDTO.cvplApplcntTlphonNo}"/>' readonly>
</td>
<th>처리상태</th>
<td>
<input type="text" name="telNoV" value='<c:out value="${ctznStmtDTO.ctznSttemntProcessSttus}"/>' readonly>
</td>
</tr>
<tr>
<th>민원신청제목</th>
<td colspan="5">
<input type="text" name="petiTitleV" value='<c:out value="${ctznStmtDTO.cvplReqstSj}"/>' readonly>
</td>
</tr>
<tr>
<th>민원신청내용</th>
<td colspan="5">
<textarea name="petiReasonL" rows="10" readonly><c:out value="${ctznStmtDTO.cvplReqstCn}" /></textarea>
</td>
</tr>
<tr>
<th>민원신청일시</th>
<td>
<fmt:parseDate value="${ctznStmtDTO.cvplRceptDt}" var="cvplRceptDt" pattern="yyyyMMddHHmmss"/>
<input type="text" name="cvplRceptDt" value='<fmt:formatDate value="${cvplRceptDt}" pattern="yyyy-MM-dd HH:mm:ss"/>' readonly>
</td>
<th>민원처리기간</th>
<td>
<fmt:parseDate value="${ctznStmtDTO.cvplProcessPd}" var="cvplProcessPd" pattern="yyyyMMddHHmmss"/>
<input type="text" name="cvplProcessPd" value='<fmt:formatDate value="${cvplProcessPd}" pattern="yyyy-MM-dd HH:mm:ss"/>' readonly>
</td>
<th>민원등록일시</th>
<td>
<fmt:parseDate value="${ctznStmtDTO.cvplRegistDt}" var="cvplRegistDt" pattern="yyyyMMddHHmmss"/>
<input type="text" name="cvplRegistDt" value='<fmt:formatDate value="${cvplRegistDt}" pattern="yyyy-MM-dd HH:mm:ss"/>' readonly>
</td>
</tr>
<%-- <tr>--%>
<%-- <th>등록일시</th>--%>
<%-- <td>--%>
<%-- <fmt:parseDate value="${ctznStmtDTO.registDt}" var="registDt" pattern="yyyyMMddHHmmss"/>--%>
<%-- <input type="text" name="registDt" value="<fmt:formatDate value="${registDt}" pattern="yyyy-MM-dd HH:mm:ss"/>' readonly>--%>
<%-- </td>--%>
<%-- <th>등록인</th>--%>
<%-- <td>--%>
<%-- <input type="text" name="sendYnC" value='<c:out value="${ctznStmtDTO.register}"/>' readonly>--%>
<%-- </td>--%>
<%-- </tr>--%>
</tbody>
</table>
</form>
<form name="frmStmtDtl">
<c:forEach var="dtlDTO" items="${ctznStmtDtlDTOs}" varStatus="status">
<table class="tbl03">
<caption><c:out value="${bizName}"/> 상세</caption>
<colgroup>
<col style="width: 13%;"/>
<col style="width: 20%;"/>
<col style="width: 13%;"/>
<col style="width: 20%;"/>
<col style="width: 13%;"/>
<col style="width: 20%;"/>
</colgroup>
<tbody>
<tr>
<th>순번</th>
<td>
<input type="text" name="ctznSttemntDetailSn" value='<c:out value="${dtlDTO.ctznSttemntDetailSn}"/>' readonly>
</td>
<th>차량번호</th>
<td>
<input type="text" name="vhcleNo" value='<c:out value="${dtlDTO.vhcleNo}"/>' readonly>
</td>
<th>단속ID</th>
<td>
<input type="text" name="cvplSe" value='<c:out value="${dtlDTO.regltId}"/>' readonly>
</td>
</tr>
<tr>
<th>단속일시</th>
<td>
<fmt:parseDate value="${dtlDTO.regltDeTime}" var="regltDeTimet" pattern="yyyyMMddHHmmss"/>
<input type="text" name="regltDeTime" value='<fmt:formatDate value="${regltDeTime}" pattern="yyyy-MM-dd HH:mm:ss"/>' readonly>
</td>
<th>단속장소</th>
<td>
<input type="text" name="petiNoC" value='<c:out value="${dtlDTO.regltPlace}"/>' readonly>
</td>
<th>위반내역</th>
<td>
<input type="text" name="civilNoC" value='<c:out value="${dtlDTO.violtDtlsNm}"/>' readonly>
</td>
</tr>
<tr>
<th>GPS위도</th>
<td>
<input type="text" name="peterNameV" value='<c:out value="${dtlDTO.gpsX}"/>' readonly>
</td>
<th>GPS경도</th>
<td>
<input type="text" name="zipCodeC" value='<c:out value="${dtlDTO.gpsY}"/>' readonly>
</td>
<th>기관코드</th>
<td>
<input type="text" name="addressV" value='<c:out value="${dtlDTO.insttCode}"/>' readonly>
</td>
</tr>
<tr>
<th>과태료코드</th>
<td>
<input type="text" name="celNoV" value='<c:out value="${dtlDTO.sysCode}"/>' readonly>
</td>
<th>처리상태</th>
<td>
<input type="text" name="telNoV" value='<c:out value="${dtlDTO.ctznSttemntDetailProcessSttus}"/>' readonly>
</td>
<th>등록일시</th>
<td>
<fmt:parseDate value="${dtlDTO.registDt}" var="registDt" pattern="yyyyMMddHHmmss"/>
<input type="text" name="registDt" value='<fmt:formatDate value="${registDt}" pattern="yyyy-MM-dd HH:mm:ss"/>' readonly>
</td>
</tr>
</tbody>
</table>
</c:forEach>
</form>
<div class="draggable">
<p>title</p>
</div>
<div class="draggable">
<p>
Lorem ipsum dolor<br>
sit amet, consecte<br>turlit.
Aenean
</p>
</div>
<div class="draggable">
<p>Drag me around</p>
</div>
<%-- FIXME: id 고정(변경불가)--%>
<div id="imgList" class="draggable">
<%-- <c:forEach var="dtlDTO" items="${ctznStmtDtlDTOs}" varStatus="status">--%>
<%-- <div id="${dtlDTO.insterfaceSeqN}0${status.index+1}">--%>
<%-- </div>--%>
<%-- </c:forEach>--%>
</div>
<div style="min-height: 260px">
<img id="uploadImage"/>
</div>
<div class="popup_btn">
<span class="flr p_flr">
<a href="#" class="btn lightgray" onclick="window.close()">닫기</a>
</span>
</div>
<!-- //등록버튼 -->
</div>
</div>
<!-- //popup -->
<script type="text/javascript" src="${pageContext.request.contextPath}/resources/framework/js/cmm/cmmDownloadImg.js" defer></script>
<script type="text/javascript">
/**************************************************************************
* Global Variable
**************************************************************************/
// let orgData;
var imageEditorPopup = (flag, params) => fnBiz.pagePopup(flag, params);
var callbackReloadImage = () => fnBiz.downloadImg();
/* *******************************
* Biz function
******************************* */
const fnBiz = {
downloadImg: () => {
//ctznStmtDtlDTO
cmmAjax({
showSuccessMsg: false
,url: '<c:url value="/fims/biz/ec/findNatlNewspaperAttchFiles.do"/>'
,data: {interfaceSeqN: '${reqDTO.interfaceSeqN}'}
,success: (res) => {
// 이미지 클릭시 image editor open
const pr = {
interfaceSeqN: '${reqDTO.interfaceSeqN}',
ctznSttemntDetailSn: '${reqDTO.ctznSttemntDetailSn}'
}
<%-- FIXME: id 고정(#ctznImg - 변경불가)--%>
sttemntImgDownload(res.data?.contents, '#ctznImg', pr, true);
}
})
}
,pagePopup: function(flag, params) {
let url;
let popTitle;
let popOption;
switch (flag) {
case "imageEditor":
url = '<c:url value="/framework/biz/cmm/file/cmmPaintwebImageEditorPopup.do"/>';
popOption = {width: 1000, height: 800, resizable:false,scrollbars:'no'};
popTitle = "이미지 에디터";
break;
case "imageView":
url = '<c:url value="/framework/biz/cmm/file/cmmImageViewPopup.do"/>';
popOption = {width: 1000, height: 800, resizable:false,scrollbars:'no'};
popTitle = "이미지 보기";
break;
default:
break;
}
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");
}
,viewImg: () => {
}
};
/**************************************************************************
* event
**************************************************************************/
$(() => {
$('img').on('click', () => {
fnBiz.viewImg()
});
});
/**************************************************************************
* initialize
**************************************************************************/
$(document).ready(function () {
// orgData = $('form').serialize();
fnBiz.downloadImg();
// $( '#imgList' ).draggable({
// scroll : false,
// containment : 'parent', //부모 요소 안에서만 이동 범위 제한
// handle : '.header' // drag 대상 안 특정 요소에 제한 (여러개 사용 가능)
// });
//$( "#imgList" ).draggable({ revert: true });
//$( "#imgList" ).draggable({ revert: true, helper: "clone" });
$(".draggable").draggable({
//이동영역 제한
// drag 가로 세로 이동 제한
//,axis: "x" // 가로로만 이동 가능
//,axis: "y" // 세로로만 이동 가능
//containment:"#imgList"
cursor:"move"
,stack:".draggable"
,opacity:0.7
,create : function(event, ui) { //생성시 발생하는 이벤트
console.log("dragcreat event!");
console.log("index:"+$(this).index());
}
,start: function(event, ui ) {
//드래그를 시작했을때 이벤트 발생
const currentObj = $(".ui-draggable-dragging"); //현재 드래그 중인 엘리먼트 가져오기
console.log(currentObj)
}
,drop : function( event, ui ){
//droppable 영역안으로 드롭했을 때 이벤트 발생
}
});
//$( ".drag1" ).draggable("destroy"); // drag1 더이상 드래그 못하도록 하기
$(".draggable").bind("dragstart", function(event, ui) {
console.log("dragstart event!");
$(this).addClass("invert"); //클래스 추가
});
$(".draggable").bind("dragstop", function(event, ui) {
console.log("dragstop event!");
$(this).removeClass("invert"); //클래스 제거
});
$(".draggable").bind("drag", function(event, ui) {
console.log("drags event!");
});
});
</script>

@ -69,13 +69,13 @@
const arrChecks = GRID.getCheckedRows();
if(arrChecks.length===0) {
alert("등록[변경]할 목록을 선택하세요.");
alert("등록[변경]할 데이타를 선택하세요.");
return false;
}
const data = {
filePath: $('#dirPath').val()
,xmlFileInfoList: arrChecks.map((row) => {
,fileInfoList: arrChecks.map((row) => {
return {fileNm: row.fileNm, fileType: row.fileType, fileSize: row.fileSize}
})
}

Loading…
Cancel
Save