From 4d555a21eb48a8b08a2e86ef2248a6fbe78acc09 Mon Sep 17 00:00:00 2001 From: JIWOO Date: Tue, 31 Dec 2024 13:45:40 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9D=B4=EC=A7=80=EC=9A=B0=20-=20=EA=B4=80?= =?UTF-8?q?=EB=A6=AC=EC=9E=90=20=EB=B6=84=EC=9F=81=EC=A1=B0=EC=A0=95?= =?UTF-8?q?=EC=B2=98=EB=A6=AC=20=EB=AA=A9=EB=A1=9D=20>=20=EB=8F=99?= =?UTF-8?q?=EC=8B=9C=EA=B8=B0=EC=95=88=20>=20=EC=B2=A8=EB=B6=80=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=20=EC=97=85=EB=A1=9C=EB=93=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../seed/com/gtm/base/BaseController.java | 2 + .../com/gtm/seedfile/SeedFileService.java | 113 ++++++ src/main/webapp/WEB-INF/decorators.xml | 1 + .../trublprocessmng/sameTimeFileAtchPop.jsp | 348 ++++++++++++++++++ .../trublprocessmng/trublprocessmngList.jsp | 57 ++- 5 files changed, 513 insertions(+), 8 deletions(-) create mode 100644 src/main/webapp/WEB-INF/jsp/seed/_extra/gtm/trublprocessmng/sameTimeFileAtchPop.jsp diff --git a/src/main/java/seed/com/gtm/base/BaseController.java b/src/main/java/seed/com/gtm/base/BaseController.java index d1155f04..d1259274 100644 --- a/src/main/java/seed/com/gtm/base/BaseController.java +++ b/src/main/java/seed/com/gtm/base/BaseController.java @@ -226,6 +226,8 @@ public class BaseController { log.warn("nanumCall>>>>"+params.get("nanumCall")); }else if("FILE".equals(type)){ fileService.fileInsertEgov(params, request, session); + }else if("SAMETIME_FILE".equals(type)){ //동시기안 파일 첨부 + fileService.fileInsertSameTime(params, request, session); }else if("TRS_EDIT".equals(type)){ //사건마스터 params.put("sql", pageFolder+".selectRceptms"); diff --git a/src/main/java/seed/com/gtm/seedfile/SeedFileService.java b/src/main/java/seed/com/gtm/seedfile/SeedFileService.java index 89f2a60f..8614a842 100644 --- a/src/main/java/seed/com/gtm/seedfile/SeedFileService.java +++ b/src/main/java/seed/com/gtm/seedfile/SeedFileService.java @@ -278,6 +278,119 @@ public class SeedFileService { throw e; } } + + public void fileInsertSameTime(EgovMap paramMap, HttpServletRequest request, HttpSession session)throws Exception { + System.out.println(">>>>>>>fileInsertEgov<<<<<<<<<"); + try { + + String siteIdx = SeedUtils.setReplaceNull(session.getAttribute("siteIdx")); + if(siteIdx.equals("")){ + siteIdx = SeedUtils.setReplaceNull(request.getParameter("siteIdx")); + } + String fileFuncType = (String)paramMap.get("fileFuncType"); + String fileTarget = (String)paramMap.get("fileTarget"); + + SeedProperties seedProperties = new SeedProperties(); + + /*String rootPath = seedProperties.getConfigValue("file.real.path"); + String tempPath = seedProperties.getConfigValue("file.temp.path");*/ + + /*241216 global 값으로 수정*/ + /*String rootPath = propertyService.getString("file.real.path"); + String tempPath = propertyService.getString("file.temp.path");*/ + String rootPath = globalRealPath; + String tempPath = globalTempPath; + + SeedDateUtil seedDateUtil = new SeedDateUtil(); + String toDate = seedDateUtil.getSimpleDateFormat(new Date(), "yyyyMMdd"); + String renameDate = seedDateUtil.getSimpleDateFormat(new Date(), "yyyyMMddHHmmss"); + + SeedUtils.setSeedMkDirs(rootPath + "/"+siteIdx+ "/" +fileFuncType); + + int fileCnt = 0; + + String[] uploadFileName = request.getParameterValues("uploadFileName"); + String[] uploadFileReName = request.getParameterValues("uploadFileReName"); + String[] copyContractYnList = request.getParameterValues("copyContractYn"); + String[] fileGubun = request.getParameterValues("fileGubun"); + String[] fileMemo = request.getParameterValues("fileMemo"); + + if(uploadFileName!=null && uploadFileName.length > 0){ + + for(int i=0; i 0){ + if(uploadFileName.length == fileMemo.length){ + fileMemoData = fileMemo[i]; + } + } + + + String copyContractYn = ""; + if(copyContractYnList != null){ + copyContractYn = copyContractYnList[i]; + } + + String fileType = uploadFileNameData.substring(uploadFileNameData.lastIndexOf(".")+1, uploadFileNameData.length()); + String reFileName = renameDate + "_" + SeedUtils.getSeedMD5Code(String.valueOf(SeedUtils.getRandom(999,1))); + + File oldFile = new File(tempPath + "/"+siteIdx+"/"+fileFuncType+ "/" + uploadFileReNameData); + System.out.println(">>>>>>>fileInsertEgov0<<<<<<<<<"+tempPath + "/"+siteIdx+"/"+fileFuncType+ "/" + uploadFileReNameData); + if(oldFile.exists()){ + + Long fileSize = oldFile.length(); + + SeedUtils.setSeedFileCopy(tempPath + "/"+siteIdx+"/"+fileFuncType + "/" + uploadFileReNameData, + rootPath + "/"+siteIdx+"/"+fileFuncType+"/"+reFileName+"."+fileType); + + + paramMap.put("uploadFileNameData", uploadFileNameData); + paramMap.put("reFileName", reFileName+"."+fileType); + paramMap.put("fileSize", fileSize); + paramMap.put("fileType", fileType); + paramMap.put("filePath", rootPath + "/"+siteIdx+"/"+fileFuncType+"/"); + paramMap.put("copyContractYn", copyContractYn); + paramMap.put("fileGubun", fileGubunData); + paramMap.put("fileMemo", fileMemoData); + //파일타입에 따라서 sql분기 + /*if(fileFuncType.equals("mediation")){ + dao.caseInsert(paramMap); + }else{ + dao.fileInsert(paramMap); + }*/ + System.out.println(">>>>>>>fileInsertEgov1<<<<<<<<<"); + String[] fileTargets = fileTarget.split("_"); + try { + for(String target : fileTargets) { + String[] targetTwo = target.split("@"); + + String rceptNo = targetTwo[0]; + String caseNo = targetTwo[1]; + + paramMap.put("rceptNo", rceptNo); + paramMap.put("fileAdd1", caseNo); + bservice.insert(paramMap); + } + }catch(Exception e){ + e.printStackTrace(); + } + System.out.println(">>>>>>>fileInsertEgov2<<<<<<<<<"); + + oldFile.delete(); + fileCnt = fileCnt+1; + } + } + } + } catch (Exception e) { + e.printStackTrace(); + throw e; + } + } public List> fileList(Map paramMap){ return dao.fileList(paramMap); diff --git a/src/main/webapp/WEB-INF/decorators.xml b/src/main/webapp/WEB-INF/decorators.xml index 0af6f7b0..3527d3f7 100644 --- a/src/main/webapp/WEB-INF/decorators.xml +++ b/src/main/webapp/WEB-INF/decorators.xml @@ -85,6 +85,7 @@ */gtm/case/trublprocessmng/fileHistoryPop/jsp/Page.do* */gtm/case/trublprocessmng/fileAtchPop/jsp/Page.do* */gtm/case/trublprocessmng/fileAtchPop2/jsp/Page.do* + */gtm/case/trublprocessmng/sameTimeFileAtchPop/jsp/Page.do* */gtm/newcasebase/fileatchPop/rawEdit.do* diff --git a/src/main/webapp/WEB-INF/jsp/seed/_extra/gtm/trublprocessmng/sameTimeFileAtchPop.jsp b/src/main/webapp/WEB-INF/jsp/seed/_extra/gtm/trublprocessmng/sameTimeFileAtchPop.jsp new file mode 100644 index 00000000..260dc94e --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/seed/_extra/gtm/trublprocessmng/sameTimeFileAtchPop.jsp @@ -0,0 +1,348 @@ +<%-- + Class Name : EgovNoticeRegist.jsp + Description : 게시물 생성 화면 + Modification Information + + 수정일 수정자 수정내용 + ------- -------- --------------------------- + 2009.03.24 이삼섭 최초 생성 + 2011.08.31 JJY 경량환경 버전 생성 + + author : 공통서비스 개발팀 이삼섭 + since : 2009.03.24 +--%> +<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%> +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> +<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +기안 파일 첨부하기 + + + +

■ 기안파일첨부하기

+
+ +
+
+ +
+ +
+ + + + + + + + + + + + + + + + +
+

첨부파일

+
+
+
+ +
+
    + +
+ + +
+
+ +
+ + + +
+
+
+
+ + +
+
+ +
+
+
+ + + + + + + + + + + + + +
+ +
+ + +
+ + + diff --git a/src/main/webapp/WEB-INF/jsp/seed/_extra/gtm/trublprocessmng/trublprocessmngList.jsp b/src/main/webapp/WEB-INF/jsp/seed/_extra/gtm/trublprocessmng/trublprocessmngList.jsp index 5ec80a64..4a162ceb 100644 --- a/src/main/webapp/WEB-INF/jsp/seed/_extra/gtm/trublprocessmng/trublprocessmngList.jsp +++ b/src/main/webapp/WEB-INF/jsp/seed/_extra/gtm/trublprocessmng/trublprocessmngList.jsp @@ -241,7 +241,7 @@ function clipCall(crfNm){ - @@ -378,8 +378,9 @@ function clipCall(crfNm){ @@ -437,6 +438,9 @@ function clipCall(crfNm){ //step3.같은 기안의 상태인지? var v_data_state = ''; var v_data_case_no = ''; + var v_data_rcept_no = ''; + var v_data_file_target = ''; + $('input:checkbox[name="chk"]:checked').each(function(idx) { if (v_data_state==''){ @@ -448,6 +452,8 @@ function clipCall(crfNm){ } v_data_case_no = v_data_case_no + $(this).attr("data-caseno") + "_"; + v_data_rcept_no = v_data_rcept_no + $(this).attr("data-rceptno") + "_"; + v_data_file_target = v_data_file_target + $(this).attr("data-rceptno") + "@" + $(this).attr("data-caseno") + "_"; }); @@ -575,11 +581,11 @@ function clipCall(crfNm){ $("#nanumFrmCaseNo").val(v_data_case_no); - nanumApi(jobID, codeNo, v_class); + nanumApi(jobID, codeNo, v_class, v_data_file_target); } //문서 기안작성 및 결제상신 - function nanumApi(jobID, codeNo, v_class){ + function nanumApi(jobID, codeNo, v_class, v_data_file_target){ alert(jobID+":"+codeNo+":"+v_class); @@ -624,20 +630,55 @@ function clipCall(crfNm){ //$("#subjectStrImsi").val(r.title); //그룹웨어로그인아이디 //$("#contentsStrImsi").val(r.contents); //그룹웨어로그인아이디 - var f = document.nanumViewFrm; + + /* var f = document.nanumViewFrm; f.action = $("#nanumViewFrm #gwCallUrlView").val(); f.target = "_blank"; - f.submit(); + f.submit(); */ + /* 첨부파일 업로드 팝업 */ + var fileFuncType = ''; + var fileGubun = ''; + if (jobID=='1-1'||jobID=='2-1' /* 착수보고서 */ + ||jobID=='3-1'||jobID=='4-1' + ||jobID=='5-1'||jobID=='6-1'){ + fileFuncType = 'x-1'; + fileGubun = '4840000000'; + + }else if(jobID=='1-11'||jobID=='2-11' /* 종료보고서 */ + ||jobID=='3-11'||jobID=='4-11' + ||jobID=='5-11'||jobID=='6-11'){ + fileFuncType = 'x-2'; + fileGubun = '4841000000'; + }else if(jobID=='1-12'||jobID=='2-12' /* 조사보고서 */ + ||jobID=='3-12'||jobID=='4-12' + ||jobID=='5-12'||jobID=='6-12'){ + fileFuncType = 'x-3'; + fileGubun = '4842000000'; + } + fileFirstPopOpen(v_data_file_target, r.gwId, fileFuncType,r.data2.docId, fileGubun); } - location.reload(); }); } } + function fileFirstPopOpen(p_fileTarget, p_gwId, p_fileFuncType, p_approKey, fileGubun){ + var popUrl = "/gtm/case/trublprocessmng/sameTimeFileAtchPop/jsp/Page.do?fileTarget="+p_fileTarget+"&loginId=" + p_gwId + "&fileFuncType="+p_fileFuncType+"&approKey="+p_approKey+"&fileGubun="+fileGubun; + var popOption = "width=1024, height=750, resizable=no, scrollbars=no, status=no;"; + window.open(popUrl, "", popOption); + } + + function nanumApiByPopup(fileKey){ + $("#nanumViewFrm #fileKeyView").val(fileKey); + var f = document.nanumViewFrm; + f.action = $("#nanumViewFrm #gwCallUrlView").val(); + f.target = "_blank"; + f.submit(); + } + function goPage(type, param){ if(type == 'view'){ $("#rceptNo").val(param);