From f8d35ef0bfc812494f7d30dff1d075a3327209f1 Mon Sep 17 00:00:00 2001
From: minhee <alsdldlfrl@gmail.com>
Date: 금, 11 2월 2022 18:30:04 +0900
Subject: [PATCH] - 사용자 정의 필드 필드 유형 변경시 기본값 항목 표시 오류 수정 폼에도 적용 - 입력 폼에서 탭키 안먹는 현상 수정

---
 src/main/java/kr/wisestone/owl/web/controller/HostingFieldController.java |   30 +++++++++++++++++++++++-------
 1 files changed, 23 insertions(+), 7 deletions(-)

diff --git a/src/main/java/kr/wisestone/owl/web/controller/HostingFieldController.java b/src/main/java/kr/wisestone/owl/web/controller/HostingFieldController.java
index 51f8a3b..bcd8df0 100644
--- a/src/main/java/kr/wisestone/owl/web/controller/HostingFieldController.java
+++ b/src/main/java/kr/wisestone/owl/web/controller/HostingFieldController.java
@@ -14,6 +14,7 @@
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
 
 import javax.servlet.http.HttpServletRequest;
@@ -26,7 +27,7 @@
     @Autowired
     private HostingFieldService HostingFieldService;
 
-    // �뾽泥� �깮�꽦
+    // �샇�뒪�똿 �깮�꽦
     @RequestMapping(value = "/hostingField/add", method = RequestMethod.POST)
     public
     @ResponseBody
@@ -38,7 +39,7 @@
         return this.setSuccessMessage(resJsonData);
     }
 
-    // �뾽泥� 議고쉶
+    // �샇�뒪�똿 議고쉶
     @RequestMapping(value = "/hostingField/find", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
     public
     @ResponseBody
@@ -51,7 +52,7 @@
         return this.setSuccessMessage(resJsonData);
     }
 
-    // �뾽泥� �긽�꽭 議고쉶
+    // �샇�뒪�똿 �긽�꽭 議고쉶
     @RequestMapping(value = "/hostingField/detail", produces = MediaType.APPLICATION_JSON_VALUE)
     public
     @ResponseBody
@@ -62,7 +63,7 @@
         return this.setSuccessMessage(resJsonData);
     }
 
-    // �뾽泥� �닔�젙
+    // �샇�뒪�똿 �닔�젙
     @RequestMapping(value = "/hostingField/modify", produces = MediaType.APPLICATION_JSON_VALUE)
     public
     @ResponseBody
@@ -74,7 +75,7 @@
         return this.setSuccessMessage(resJsonData);
     }
 
-    // �뾽泥� �궘�젣
+    // �샇�뒪�똿 �궘�젣
     @RequestMapping(value = "/hostingField/remove", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
     public
     @ResponseBody
@@ -98,11 +99,26 @@
         return this.setSuccessMessage(resJsonData);
     }
 
-
-    // �뾽泥� �뿊�� �떎�슫濡쒕뱶
+    // �샇�뒪�똿 �뿊�� �떎�슫濡쒕뱶
     @RequestMapping(value = "/hostingField/downloadExcel", method = RequestMethod.POST)
     public ModelAndView downloadExcel(HttpServletRequest request, Model model) {
         return this.HostingFieldService.downloadExcel(request, model);
     }
+
+    //  �샇�뒪�똿 Import �슜 �뿊�� �뀥�뵆由� �떎�슫濡쒕뱶
+    @RequestMapping(value = "/hostingField/downloadExcelTemplate", method = RequestMethod.POST)
+    public ModelAndView downloadExcelImport(HttpServletRequest request, Model model) {
+        return this.HostingFieldService.downloadExcelTemplate(request, model);
+    }
+
+    //  �샇�뒪�똿 �뿊�� �벑濡�
+    @RequestMapping(value = "/hostingField/importExcel", method = RequestMethod.POST)
+    public @ResponseBody Map<String, Object> importExcel(MultipartHttpServletRequest request) throws Exception {
+        Map<String, Object> resJsonData = new HashMap<>();
+
+        this.HostingFieldService.importExcel(request.getFile("file"));
+
+        return this.setSuccessMessage(resJsonData);
+    }
 }
 

--
Gitblit v1.8.0