From bb2b0e1189680110bc9c418c26d9bb1aef6dfc37 Mon Sep 17 00:00:00 2001 From: 이민희 <mhlee@maprex.co.kr> Date: 월, 08 11월 2021 16:08:42 +0900 Subject: [PATCH] 업체 관리 프론트 --- src/main/java/kr/wisestone/owl/web/controller/DepartmentManageController.java | 92 ++++++++++++++++++++++++---------------------- 1 files changed, 48 insertions(+), 44 deletions(-) diff --git a/src/main/java/kr/wisestone/owl/web/controller/DepartmentManageController.java b/src/main/java/kr/wisestone/owl/web/controller/DepartmentManageController.java index 374f569..8218a27 100644 --- a/src/main/java/kr/wisestone/owl/web/controller/DepartmentManageController.java +++ b/src/main/java/kr/wisestone/owl/web/controller/DepartmentManageController.java @@ -12,7 +12,10 @@ 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.servlet.ModelAndView; +import org.springframework.ui.Model; +import javax.servlet.http.HttpServletRequest; import java.util.HashMap; import java.util.Map; @@ -37,7 +40,7 @@ return this.setSuccessMessage(resJsonData); } - // �궗�슜�옄�벑湲� 議고쉶 + // 遺��꽌 議고쉶 @RequestMapping(value = "/departmentManage/find", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) public @ResponseBody @@ -49,50 +52,51 @@ return this.setSuccessMessage(resJsonData); } -// -// // �궗�슜�옄�벑湲� �긽�꽭 議고쉶 -// @RequestMapping(value = "/userLevel/detail", produces = MediaType.APPLICATION_JSON_VALUE) -// public -// @ResponseBody -// Map<String, Object> detail(@RequestBody Map<String, Map<String, Object>> params) { -// Map<String, Object> resJsonData = new HashMap<>(); -// this.userLevelService.detailUserLevel(resJsonData, UserLevelCondition.make(params.get(Constants.REQ_KEY_CONTENT))); -// -// return this.setSuccessMessage(resJsonData); -// } -// -// // �궗�슜�옄�벑湲� �닔�젙 -// @RequestMapping(value = "/userLevel/modify", produces = MediaType.APPLICATION_JSON_VALUE) -// public -// @ResponseBody -// Map<String, Object> modify(@RequestBody Map<String, Map<String, Object>> params) { -// Map<String, Object> resJsonData = new HashMap<>(); -// -// this.userLevelService.modifyLevelPermission(UserLevelForm.make(params.get(Constants.REQ_KEY_CONTENT))); -// -// return this.setSuccessMessage(resJsonData); -// } -// -// // �궗�슜�옄�벑湲� �궘�젣 -// @RequestMapping(value = "/userLevel/remove", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) -// public -// @ResponseBody -// Map<String, Object> remove(@RequestBody Map<String, Map<String, Object>> params) { -// Map<String, Object> resJsonData = new HashMap<>(); -// Map<String, Object> content = params.get(Constants.REQ_KEY_CONTENT); -// -// this.userLevelService.removeUserLevel(UserLevelForm.make(content)); -// -// return this.setSuccessMessage(resJsonData); -// } -// -// -// // �궗�슜�옄 �벑湲� �뿊�� �떎�슫濡쒕뱶 -// @RequestMapping(value = "/userLevel/downloadExcel", method = RequestMethod.POST) -// public ModelAndView downloadExcel(HttpServletRequest request, Model model) { -// return this.userLevelService.downloadExcel(request, model); -} + // + // 遺��꽌 �긽�꽭 議고쉶 + @RequestMapping(value = "/departmentManage/detail", produces = MediaType.APPLICATION_JSON_VALUE) + public + @ResponseBody + Map<String, Object> detail(@RequestBody Map<String, Map<String, Object>> params) { + Map<String, Object> resJsonData = new HashMap<>(); + this.departmentManageService.detailDepartment(resJsonData, DepartmentManageCondition.make(params.get(Constants.REQ_KEY_CONTENT))); + + return this.setSuccessMessage(resJsonData); + } + + // 遺��꽌 �닔�젙 + @RequestMapping(value = "/departmentManage/modify", produces = MediaType.APPLICATION_JSON_VALUE) + public + @ResponseBody + Map<String, Object> modify(@RequestBody Map<String, Map<String, Object>> params) { + Map<String, Object> resJsonData = new HashMap<>(); + + this.departmentManageService.modifyDepartment(DepartmentManageForm.make(params.get(Constants.REQ_KEY_CONTENT))); + + return this.setSuccessMessage(resJsonData); + } + + // 遺��꽌 �궘�젣 + @RequestMapping(value = "/departmentManage/remove", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) + public + @ResponseBody + Map<String, Object> remove(@RequestBody Map<String, Map<String, Object>> params) { + Map<String, Object> resJsonData = new HashMap<>(); + Map<String, Object> content = params.get(Constants.REQ_KEY_CONTENT); + + this.departmentManageService.removeDepartment(DepartmentManageForm.make(content)); + + return this.setSuccessMessage(resJsonData); + } + + + // 遺��꽌 �뿊�� �떎�슫濡쒕뱶 + @RequestMapping(value = "/departmentManage/downloadExcel", method = RequestMethod.POST) + public ModelAndView downloadExcel(HttpServletRequest request, Model model) { + return this.departmentManageService.downloadExcel(request, model); + } +} -- Gitblit v1.8.0