From c7f15d213406ad162cc9c87160da76f2557a8c12 Mon Sep 17 00:00:00 2001 From: minuk926 Date: Fri, 9 Dec 2022 19:53:46 +0900 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=EC=9D=B4=EB=AF=B8=EC=A7=80?= =?UTF-8?q?=EC=97=90=EB=94=94=ED=84=B0=20=EC=A7=84=ED=96=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../framework/biz/cmm/model/CmmFileDTO.java | 29 ++++ .../biz/cmm/web/CmmFileMgtController.java | 15 ++ src/main/resources/logback-local.xml | 4 +- .../cmm/file/cmmPaintwebImageEditorPopup.jsp | 129 +++++++++++++++- .../resources/3rd-party/paintweb/paintweb.js | 122 +++++++++++++-- .../resources/framework/js/cmm/cmmUtil.js | 143 +++++++++++++++++- 6 files changed, 419 insertions(+), 23 deletions(-) diff --git a/src/main/java/kr/xit/framework/biz/cmm/model/CmmFileDTO.java b/src/main/java/kr/xit/framework/biz/cmm/model/CmmFileDTO.java index cf2c6f95..28cc85eb 100644 --- a/src/main/java/kr/xit/framework/biz/cmm/model/CmmFileDTO.java +++ b/src/main/java/kr/xit/framework/biz/cmm/model/CmmFileDTO.java @@ -145,4 +145,33 @@ public class CmmFileDTO { private MultipartFile[] files; //private List files; } + + @Getter + @Setter + @NoArgsConstructor + @AllArgsConstructor + @EqualsAndHashCode + @Builder + @ToString + public static class PaintwebReq implements Serializable { + private static final long SerialVersionUID = 1L; + + private String interfaceSeqN; + private String ctznSttemntDetailSn; + private String fileMastrId; + + private String jobSeCode; + + private String fileJobId; + private String fileId; + + private String orginlFileNm; + private String fileCours; + private String downloadUrl; + + private String register; + + private MultipartFile file; + //private List files; + } } diff --git a/src/main/java/kr/xit/framework/biz/cmm/web/CmmFileMgtController.java b/src/main/java/kr/xit/framework/biz/cmm/web/CmmFileMgtController.java index be6a7949..0627f793 100644 --- a/src/main/java/kr/xit/framework/biz/cmm/web/CmmFileMgtController.java +++ b/src/main/java/kr/xit/framework/biz/cmm/web/CmmFileMgtController.java @@ -60,6 +60,21 @@ public class CmmFileMgtController { return mav; } + + @PostMapping(value = "/uploadPaintweb", consumes = "multipart/form-data") + public ModelAndView uploadPaintweb(final CmmFileDTO.PaintwebReq dto) { + + ModelAndView mav = new ModelAndView(FrameworkConstants.JSON_VIEW); + // CmmFileDTO.FileMst cmmFileMst = CmmFileDTO.FileMst.builder() + // .fileMastrId(cmmFileDto.getFileMastrId()) + // .jobSeCode(cmmFileDto.getJobSeCode()) + // .fileJobId(cmmFileDto.getFileJobId()) + // .build(); + // cmmFileService.saveFiles(cmmFileMst, Arrays.asList(cmmFileDto.getFiles())); + AjaxMessageMapRenderer.success(mav, MessageKey.CMM_INSERT_SUCCESS); + return mav; + } + @GetMapping("/{fileMstId}") public ModelAndView findFiles(@PathVariable("fileMstId") final String fileMstId) { if(Checks.isEmpty(fileMstId)) throw BizRuntimeException.create(MessageKey.CUSTOM_MSG, "대상 파일[fileMstId]을 선택해 주세요."); diff --git a/src/main/resources/logback-local.xml b/src/main/resources/logback-local.xml index d4e7f2bf..f1157003 100644 --- a/src/main/resources/logback-local.xml +++ b/src/main/resources/logback-local.xml @@ -3,7 +3,7 @@ - + @@ -201,7 +201,7 @@ - + diff --git a/src/main/webapp/WEB-INF/jsp/framework/biz/cmm/file/cmmPaintwebImageEditorPopup.jsp b/src/main/webapp/WEB-INF/jsp/framework/biz/cmm/file/cmmPaintwebImageEditorPopup.jsp index 16c685fe..af9bd4be 100644 --- a/src/main/webapp/WEB-INF/jsp/framework/biz/cmm/file/cmmPaintwebImageEditorPopup.jsp +++ b/src/main/webapp/WEB-INF/jsp/framework/biz/cmm/file/cmmPaintwebImageEditorPopup.jsp @@ -1,5 +1,5 @@ <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ include file="/WEB-INF/jsp/framework/taglibs.jsp" %> @@ -11,6 +11,7 @@ + @@ -19,6 +20,7 @@