diff --git a/src/main/java/cokr/xit/fims/crdn/service/Crdn05Service.java b/src/main/java/cokr/xit/fims/crdn/service/Crdn05Service.java index 3d7745d3..0ade79bd 100644 --- a/src/main/java/cokr/xit/fims/crdn/service/Crdn05Service.java +++ b/src/main/java/cokr/xit/fims/crdn/service/Crdn05Service.java @@ -21,4 +21,6 @@ public interface Crdn05Service extends CrdnService { */ boolean create(Crdn crdn, List fileInfoList); + boolean create(Crdn crdn); + } diff --git a/src/main/java/cokr/xit/fims/crdn/service/bean/Crdn05ServiceBean.java b/src/main/java/cokr/xit/fims/crdn/service/bean/Crdn05ServiceBean.java index d8557ebf..15caa565 100644 --- a/src/main/java/cokr/xit/fims/crdn/service/bean/Crdn05ServiceBean.java +++ b/src/main/java/cokr/xit/fims/crdn/service/bean/Crdn05ServiceBean.java @@ -33,6 +33,18 @@ public class Crdn05ServiceBean extends AbstractServiceBean implements Crdn05Serv @Override public boolean create(Crdn crdn, List fileInfoList) { + crdn.setAtchFileCnt(fileInfoList.size()); + boolean saved = this.create(crdn); + fileInfoList.forEach(fileInfo -> fileInfo.setInfoType(Crdn.INF_TYPE).setInfoKey(crdn.getCrdnId())); + fileBean.create(fileInfoList); + return saved; + } + + @Override + public boolean create(Crdn crdn) { + if(ifEmpty(crdn.getAtchFileCnt(), () -> 0) == 0) { + crdn.setAtchFileCnt(0); + } if(ifEmpty(crdn.getDoGuidance(), () -> "").equals("on")) { crdn.setCrdnSttsCd("83"); @@ -40,11 +52,7 @@ public class Crdn05ServiceBean extends AbstractServiceBean implements Crdn05Serv crdn.setCrdnSttsCd("01"); } - crdn.setAtchFileCnt(fileInfoList.size()); - boolean saved = crdn05Bean.create(crdn); - fileInfoList.forEach(fileInfo -> fileInfo.setInfoType(Crdn.INF_TYPE).setInfoKey(crdn.getCrdnId())); - fileBean.create(fileInfoList); return saved; } } diff --git a/src/main/java/cokr/xit/fims/crdn/web/Crdn05Controller.java b/src/main/java/cokr/xit/fims/crdn/web/Crdn05Controller.java index 568fec57..3f473b91 100644 --- a/src/main/java/cokr/xit/fims/crdn/web/Crdn05Controller.java +++ b/src/main/java/cokr/xit/fims/crdn/web/Crdn05Controller.java @@ -103,13 +103,17 @@ public class Crdn05Controller extends ApplicationController { */ @PostMapping(name="단속자료 수기 등록", value="/030/create.do") public ModelAndView createCrdnDataByManual(Crdn crdn, MultipartFile[] uploadFileList) { - - List fileInfoList = new FileInfoFactory().makeFileInfos(null, uploadFileList); + boolean saved = false; crdn.setCrdnRegSeCd("01"); crdn.setCrdnInptSeCd("03");//TODO : 사용자 기관의 시청,구청 구분 - boolean saved = crdn05Service.create(crdn, fileInfoList); + if(uploadFileList != null) { + List fileInfoList = new FileInfoFactory().makeFileInfos(null, uploadFileList); + saved = crdn05Service.create(crdn, fileInfoList); + } else { + saved = crdn05Service.create(crdn); + } return new ModelAndView("jsonView") .addObject("saved", saved); diff --git a/src/main/java/cokr/xit/fims/crdn/web/Crdn09Controller.java b/src/main/java/cokr/xit/fims/crdn/web/Crdn09Controller.java new file mode 100644 index 00000000..02e421ce --- /dev/null +++ b/src/main/java/cokr/xit/fims/crdn/web/Crdn09Controller.java @@ -0,0 +1,20 @@ +package cokr.xit.fims.crdn.web; + +import org.springframework.web.servlet.ModelAndView; + +import cokr.xit.base.web.ApplicationController; + +public class Crdn09Controller extends ApplicationController { + + /** 동영상 재생 메인화면을 연다. + * @return fims/crdn/crdn09010-main + */ + public ModelAndView videoMain(String openerPageName) { + ModelAndView mav = new ModelAndView(); + mav.setViewName("fims/crdn/crdn09010-main"); + mav.addObject("openerPageName", openerPageName); + + return mav; + } + +} diff --git a/src/main/java/cokr/xit/fims/task/CmnController.java b/src/main/java/cokr/xit/fims/task/CmnController.java index 7a4c4b2a..16a248f5 100644 --- a/src/main/java/cokr/xit/fims/task/CmnController.java +++ b/src/main/java/cokr/xit/fims/task/CmnController.java @@ -14,6 +14,7 @@ public class CmnController { /** 민원 접수 자료 메인화면을 연다. * @return fims/crdn/crdn01010-main */ + @Override @RequestMapping(name="민원 접수 자료 메인", value="/010/main.do") public ModelAndView civilComplaintReceiptDataMain() { return super.civilComplaintReceiptDataMain(); @@ -22,6 +23,7 @@ public class CmnController { /** 민원 답변 대상 자료 메인화면을 연다. * @return fims/crdn/crdn01030-main */ + @Override @RequestMapping(name="민원 답변 대상 자료 메인", value="/030/main.do") public ModelAndView civilComplaintAnswerTargetDataMain() { return super.civilComplaintAnswerTargetDataMain(); @@ -30,6 +32,7 @@ public class CmnController { /** 민원 관리 메인화면을 연다. * @return fims/crdn/crdn01040-main */ + @Override @RequestMapping(name="민원 관리 메인", value="/040/main.do") public ModelAndView civilComplaintManagementMain() { return super.civilComplaintManagementMain(); @@ -42,6 +45,7 @@ public class CmnController { /** 민원 개별 등록 메인화면을 연다. * @return fims/crdn/crdn02010-main */ + @Override @RequestMapping(name="민원 개별 등록 메인", value="/010/main.do") public ModelAndView civilComplaintIndividualRegistrationMain() { return super.civilComplaintIndividualRegistrationMain(); @@ -54,6 +58,7 @@ public class CmnController { /** 단속 자료 등록 메인화면을 연다. * @return fims/crdn/crdn05010-main */ + @Override @RequestMapping(name="단속 자료 등록 메인", value="/010/main.do") public ModelAndView crackdownDataRegistrationMain() { return super.crackdownDataRegistrationMain(); @@ -66,6 +71,7 @@ public class CmnController { /** 단속 관리 메인화면을 연다. * @return fims/crdn/crdn06010-main */ + @Override @RequestMapping(name="단속 관리 메인", value="/010/main.do") public ModelAndView crackdownManagementMain() { return super.crackdownManagementMain(); @@ -74,6 +80,7 @@ public class CmnController { /** 단속 자료 검사 메인화면을 연다. * @return fims/crdn/crdn06020-main */ + @Override @RequestMapping(name="단속 자료 검사 메인", value="/020/main.do") public ModelAndView crackdownDataInspectionMain() { return super.crackdownDataInspectionMain(); @@ -82,21 +89,27 @@ public class CmnController { /** 표지정보 미확인 자료 메인화면을 연다. * @return fims/crdn/crdn06030-main */ + @Override @RequestMapping(name="표지정보 미확인 자료 메인", value="/030/main.do") public ModelAndView tagInformationUndefinedDataMain() { return super.tagInformationUndefinedDataMain(); } - /** 과태료 감경 자료 메인화면을 연다. - * @return fims/crdn/crdn06040-main + } + + @Controller + @RequestMapping(name="동영상 재생", value="/crdn/crdn09") + class Crdn09Controller extends cokr.xit.fims.crdn.web.Crdn09Controller { + /** 동영상 재생 메인화면을 연다. + * @return fims/crdn/crdn09010-main */ - @RequestMapping(name="과태료 감경 자료 메인", value="/040/main.do") - public ModelAndView fineReductionDataMain() { - return super.fineReductionDataMain(); + @Override + @RequestMapping(name="동영상 재생 메인", value="/010/main.do") + public ModelAndView videoMain(String openerPageName) { + return super.videoMain(openerPageName); } } - @Controller @RequestMapping(name="업무지원", value="/sprt/sprt01") class Sprt01Controller extends cokr.xit.fims.sprt.web.Sprt01Controller { @@ -104,6 +117,7 @@ public class CmnController { /** 통합조회 메인화면을 연다. * @return fims/sprt/sprt01010-main */ + @Override @RequestMapping(name="통합조회 메인", value="/010/main.do") public ModelAndView integratedInquireMain() { return super.integratedInquireMain(); diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05030-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05030-info.jsp index 157678e2..222ff7b8 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05030-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05030-info.jsp @@ -136,14 +136,20 @@
-
- -
- +
-
- +
+ +
+
+ +
+
+ +
+
+
@@ -225,11 +231,12 @@ pageObject["${pageName}"] = {}; - $(document).ready(function(){ var $P = pageObject["${pageName}"]; - + + $P.captureFileArr = []; + /************************************************************************** * DatasetControl, Dataset, FormFields **************************************************************************/ @@ -248,6 +255,7 @@ $(document).ready(function(){ } }); + $P.crdnControl.save = (info) => { if (!info) return; var item = $P.crdnControl.getCurrent("item"), @@ -258,7 +266,14 @@ $(document).ready(function(){ var value = info[key]; formData.append(key,value); } - + + if(formData.get("uploadFileList").size == 0){ + formData.delete("uploadFileList"); + } + if($P.captureFileArr.length > 0){ + $P.captureFileArr.forEach(item => formData.append("uploadFileList",item)); + } + ajax.post({ url:!create ? $P.crdnControl.urls.update : $P.crdnControl.urls.create, data: formData, contentType : false, processData : false, @@ -269,9 +284,15 @@ $(document).ready(function(){ /************************************************************************** * DatasetControl.on, Dataset.on **************************************************************************/ - $P.uploadSet.onDatasetChange = () => { $P.uploadSet.onRemove(); }; + $P.uploadSet.onDatasetChange = () => { $P.fnDisplay(); }; $P.uploadSet.onRemove = () => { $P.fnDisplay(); }; + $P.crdnControl.onSave = (resp) => { + if (resp.saved) { + dialog.alert("저장됐습니다."); + dialog.close("manualdialog"); + } + }; /************************************************************************** * pageObject.function **************************************************************************/ @@ -280,6 +301,15 @@ $(document).ready(function(){ var displayArea = document.querySelector("#display--${pageName}"); var imgTags = $P.uploadSet.inStrings("").join("\n"); displayArea.innerHTML = imgTags; + + var display2Area = document.querySelector("#display2--${pageName}"); + var imgTags2 = ""; + if($P.captureFileArr.length > 0){ + $P.captureFileArr.forEach(function(item, index){ + imgTags2 += ""; + }); + } + display2Area.innerHTML = imgTags2; }; $P.fnSave = () => { @@ -293,11 +323,35 @@ $(document).ready(function(){ }); }; + $P.videoCallback = (snapshots) => { + snapshots.forEach(function(canvas, index, array){ + canvas.toBlob(function(blob){ + var identify = new Date().getTime()+ "-" + index; + var file = new File([blob], "capture-"+identify+".png", {type: "image/png"}); + file.id = "file-" + identify; + file.url = (window.URL || window.webkitURL).createObjectURL(file); + $P.captureFileArr.push(file); + if(index === array.length - 1){ + $P.fnDisplay(); + } + }); + }); + + } /************************************************************************** * element.on **************************************************************************/ + $("#btnInst--${pageName}").on('click', () => $P.fnSave()); - + $("#btnAddFile--${pageName}").on('click', () => { $("#uploadFileList--${pageName}").trigger("click"); }); + $("#btnOpenVideoCapture--${pageName}").on('click', () => { + window.open(wctx.url("/crdn/crdn09/010/main.do?openerPageName=${pageName}") + ,"newVideoCapture" + ,"width=1800,height=950" + ); + }); + + /************************************************************************** * 초기화 **************************************************************************/ diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06010-main.jsp index 62f72a2f..6c8c3d23 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn06010-main.jsp @@ -134,7 +134,7 @@ 업무 처리1 업무 처리2 - +
diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn09010-main.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn09010-main.jsp index fbe51fea..0bc3354e 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn09010-main.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn09010-main.jsp @@ -1,3 +1,185 @@ <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" session="false"%> <%@ include file="/WEB-INF/jsp/include/taglib.jsp"%> -동영상 재생 \ No newline at end of file + +" + data-template="vertical-menu-template-starter"> + + + 과태료통합관리시스템 + + + " /> + + + + + + + + " /> + " /> + " /> + " /> + + " /> + " /> + " /> + " /> + + + " /> + " /> + + "/> + " /> + " /> + + + + +동영상 재생 + + +
+ + + + + + + + +
+ +
+
+
+ +
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/index.jsp b/src/main/webapp/WEB-INF/jsp/index.jsp index 3f349808..35e9ddb4 100644 --- a/src/main/webapp/WEB-INF/jsp/index.jsp +++ b/src/main/webapp/WEB-INF/jsp/index.jsp @@ -40,7 +40,7 @@