From 70e3ad43e441d07d16c7e4e1af0e093befd62c01 Mon Sep 17 00:00:00 2001
From: 이민희 <mhlee@maprex.co.kr>
Date: 월, 27 12월 2021 19:36:11 +0900
Subject: [PATCH] Merge branch 'master' of http://192.168.0.25:9001/r/owl-kisa

---
 src/main/java/kr/wisestone/owl/web/controller/IssueController.java |  121 ++++++++++++++++++++++++++-------------
 1 files changed, 80 insertions(+), 41 deletions(-)

diff --git a/src/main/java/kr/wisestone/owl/web/controller/IssueController.java b/src/main/java/kr/wisestone/owl/web/controller/IssueController.java
index 0cbcbda..28c74b5 100644
--- a/src/main/java/kr/wisestone/owl/web/controller/IssueController.java
+++ b/src/main/java/kr/wisestone/owl/web/controller/IssueController.java
@@ -3,9 +3,11 @@
 import kr.wisestone.owl.constant.Constants;
 import kr.wisestone.owl.domain.Issue;
 import kr.wisestone.owl.service.IssueService;
-import kr.wisestone.owl.service.impl.IssueServiceImpl;
 import kr.wisestone.owl.util.ConvertUtil;
+import kr.wisestone.owl.web.condition.ApiMonitorCondition;
+import kr.wisestone.owl.web.condition.DepartmentCondition;
 import kr.wisestone.owl.web.condition.IssueCondition;
+import kr.wisestone.owl.web.form.EmailTemplateForm;
 import kr.wisestone.owl.web.form.IssueForm;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -50,6 +52,36 @@
         return this.setSuccessMessage(resJsonData);
     }
 
+    //  �뿰愿��씠�뒋 �깮�꽦
+    @RequestMapping(value = "/issue/relIssueAdd", method = RequestMethod.POST)
+    public
+    @ResponseBody
+    Map<String, Object> relIssueAdd(MultipartHttpServletRequest request) {
+        Map<String, Object> resJsonData = new HashMap<>();
+        //  �씠�뒋 �깮�꽦
+        Issue issue = this.issueService.addRelIssue(IssueForm.make(ConvertUtil.convertJsonToMap(request.getParameter(Constants.REQ_KEY_CONTENT))), request.getFiles("file"));
+        //  踰꾩쟾 �깮�꽦
+        this.issueService.addIssueVersion(issue.getId());
+
+        resJsonData.put(Constants.RES_KEY_CONTENTS, issue.getId()); //�뿰愿��씠�뒋 ID
+        return this.setSuccessMessage(resJsonData);
+    }
+
+    //  �븯�쐞�씠�뒋 �깮�꽦
+    @RequestMapping(value = "/issue/downIssueAdd", method = RequestMethod.POST)
+    public
+    @ResponseBody
+    Map<String, Object> downIssueAdd(MultipartHttpServletRequest request) {
+        Map<String, Object> resJsonData = new HashMap<>();
+        //  �씠�뒋 �깮�꽦
+        Issue issue = this.issueService.addDownIssue(IssueForm.make(ConvertUtil.convertJsonToMap(request.getParameter(Constants.REQ_KEY_CONTENT))), request.getFiles("file"));
+        //  踰꾩쟾 �깮�꽦
+        this.issueService.addIssueVersion(issue.getId());
+
+        resJsonData.put(Constants.RES_KEY_CONTENTS, issue.getId()); //�븯�쐞�씠�뒋 ID
+        return this.setSuccessMessage(resJsonData);
+    }
+
     //  �씠�뒋 議고쉶
     @RequestMapping(value = "/issue/find", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
     public
@@ -71,6 +103,19 @@
         Map<String, Object> resJsonData = new HashMap<>();
 
         this.issueService.findPartner(resJsonData, params.get(Constants.REQ_KEY_CONTENT));
+
+        return this.setSuccessMessage(resJsonData);
+    }
+
+    //  �뙆�듃�꼫 紐⑸줉 議고쉶
+    @RequestMapping(value = "/issue/findReadyDepartments", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
+    public
+    @ResponseBody
+    Map<String, Object> findReadyDepartments(@RequestBody Map<String, Map<String, Object>> params) {
+        Map<String, Object> resJsonData = new HashMap<>();
+        Pageable pageable = this.pageUtil.convertPageable(this.getPageVo(params));
+
+        this.issueService.findReadyDepartments(resJsonData, DepartmentCondition.make(params.get(Constants.REQ_KEY_CONTENT)), pageable);
 
         return this.setSuccessMessage(resJsonData);
     }
@@ -122,6 +167,30 @@
         return this.setSuccessMessage(resJsonData);
     }
 
+    //  �븯�쐞�씠�뒋 �궘�젣
+    @RequestMapping(value = "/issue/removeAll", produces = MediaType.APPLICATION_JSON_VALUE)
+    public
+    @ResponseBody
+    Map<String, Object> removesAll(@RequestBody Map<String, Map<String, Object>> params) {
+        Map<String, Object> resJsonData = new HashMap<>();
+
+        this.issueService.removeAllIssues(IssueForm.make(params.get(Constants.REQ_KEY_CONTENT)));
+
+        return this.setSuccessMessage(resJsonData);
+    }
+
+    //  �븯�쐞�씠�뒋 �궘�젣
+    /*@RequestMapping(value = "/issue/removeDown", produces = MediaType.APPLICATION_JSON_VALUE)
+    public
+    @ResponseBody
+    Map<String, Object> removesDown(@RequestBody Map<String, Map<String, Object>> params) {
+        Map<String, Object> resJsonData = new HashMap<>();
+
+        this.issueService.removeDownIssues(IssueForm.make(params.get(Constants.REQ_KEY_CONTENT)));
+
+        return this.setSuccessMessage(resJsonData);
+    }*/
+
     //  �씠�뒋 �떎以� �긽�깭 蹂�寃�
     @RequestMapping(value = "/issue/modifyMultiIssueStatus", produces = MediaType.APPLICATION_JSON_VALUE)
     public
@@ -149,7 +218,7 @@
     public @ResponseBody Map<String, Object> importExcel(MultipartHttpServletRequest request) throws Exception {
         Map<String, Object> resJsonData = new HashMap<>();
 
-        this.issueService.importExcel(request.getFile("file"));
+        this.issueService.importExcel(IssueForm.make(ConvertUtil.convertJsonToMap(request.getParameter(Constants.REQ_KEY_CONTENT))), request.getFile("file"));
 
         return this.setSuccessMessage(resJsonData);
     }
@@ -164,55 +233,25 @@
         return this.setSuccessMessage(resJsonData);
     }
 
-    //  硫붿씪 諛쒖넚 ���긽�옄 紐⑸줉 議고쉶
-    @RequestMapping(value = "/issue/findMailTargetAll", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
+    //  �씠�뒋 硫붿씪 �뙆�듃�꼫 �떞�떦�옄�뿉寃� 諛쒖넚 (�뀥�뵆由� 異붽�)
+    @RequestMapping(value = "/issue/sendEmailPartners", produces = MediaType.APPLICATION_JSON_VALUE)
     public
     @ResponseBody
-    Map<String, Object> findMailTargetAll(@RequestBody Map<String, Map<String, Object>> params) {
+    Map<String, Object> sendEmailPartners(@RequestBody Map<String, Map<String, Object>> params) {
         Map<String, Object> resJsonData = new HashMap<>();
-        Pageable pageable = this.pageUtil.convertPageable(this.getPageVo(params));
-
-//        this.issueService.findMailTargetAll(resJsonData, IssueCondition.make(params.get(Constants.REQ_KEY_CONTENT)), pageable);
-
+        this.issueService.sendIssueEmailPartners(EmailTemplateForm.make(params.get(Constants.REQ_KEY_CONTENT)));
+//        this.issueService.sendIssueEmailPartners(IssueForm.make(params.get(Constants.REQ_KEY_CONTENT)));
         return this.setSuccessMessage(resJsonData);
     }
 
 
-    /*//  �뾽泥� �떞�떦�옄 硫붿씪 紐⑸줉 議고쉶
-    @RequestMapping(value = "/issue/findMailTargetCompany", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
+    //  api 湲곕줉 議고쉶
+    @RequestMapping(value = "/api/findHistory", produces = MediaType.APPLICATION_JSON_VALUE)
     public
     @ResponseBody
-    Map<String, Object> findMailTargetCompany(@RequestBody Map<String, Map<String, Object>> params) {
+    Map<String, Object> findApiHistory(@RequestBody Map<String, Map<String, Object>> params) {
         Map<String, Object> resJsonData = new HashMap<>();
-
-        this.issueService.findMailTargetCompany(resJsonData, params.get(Constants.REQ_KEY_CONTENT));
-
+        this.issueService.findApiIssue(ApiMonitorCondition.make(params.get(Constants.REQ_KEY_CONTENT)), resJsonData);
         return this.setSuccessMessage(resJsonData);
     }
-
-    //  ISP �떞�떦�옄 硫붿씪 紐⑸줉 議고쉶
-    @RequestMapping(value = "/issue/findMailTargetIsp", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
-    public
-    @ResponseBody
-    Map<String, Object> findMailTargetIsp(@RequestBody Map<String, Map<String, Object>> params) {
-        Map<String, Object> resJsonData = new HashMap<>();
-
-        this.issueService.findMailTargetIsp(resJsonData, params.get(Constants.REQ_KEY_CONTENT));
-
-        return this.setSuccessMessage(resJsonData);
-    }
-
-    //  �샇�뒪�똿 �떞�떦�옄 硫붿씪 紐⑸줉 議고쉶
-    @RequestMapping(value = "/issue/findMailTargetHosting", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
-    public
-    @ResponseBody
-    Map<String, Object> findMailTargetHosting(@RequestBody Map<String, Map<String, Object>> params) {
-        Map<String, Object> resJsonData = new HashMap<>();
-
-        this.issueService.findMailTargetHosting(resJsonData, params.get(Constants.REQ_KEY_CONTENT));
-
-        return this.setSuccessMessage(resJsonData);
-    }*/
-
-
 }

--
Gitblit v1.8.0