| | |
| | | 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.EmailCommonForm; |
| | | import kr.wisestone.owl.web.form.EmailTemplateForm; |
| | | import kr.wisestone.owl.web.form.IssueForm; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | |
| | | 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, produces = MediaType.APPLICATION_JSON_VALUE) |
| | | public |
| | | @ResponseBody |
| | | Map<String, Object> downIssueAdd(MultipartHttpServletRequest request) { |
| | | Map<String, Object> resJsonData = new HashMap<>(); |
| | | // 이슈 생성 |
| | | Issue issue = this.issueService.addDownIssue(resJsonData, IssueForm.make(ConvertUtil.convertJsonToMap(request.getParameter(Constants.REQ_KEY_CONTENT))), request.getFiles("file")); |
| | | // 버전 생성 |
| | | this.issueService.addIssueVersion(issue.getId()); |
| | | |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | | |
| | | // 이슈 조회 |
| | | @RequestMapping(value = "/issue/find", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) |
| | | public |
| | |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | | |
| | | // 파트너 목록 조회 |
| | | @RequestMapping(value = "/issue/findPartner", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) |
| | | public |
| | | @ResponseBody |
| | | Map<String, Object> findPartner(@RequestBody Map<String, Map<String, Object>> params) { |
| | | 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); |
| | | } |
| | | |
| | | // 이슈 상세 조회 |
| | | @RequestMapping(value = "/issue/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.issueService.detailIssue(resJsonData, IssueCondition.make(params.get(Constants.REQ_KEY_CONTENT))); |
| | | |
| | | return this.setSuccessMessage(resJsonData); |
| | |
| | | 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 |
| | |
| | | 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); |
| | | } |
| | |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | | |
| | | // 이슈 메일 파트너 담당자에게 발송 (템플릿 추가) |
| | | @RequestMapping(value = "/issue/sendEmailPartners", method = RequestMethod.POST) |
| | | public |
| | | @ResponseBody |
| | | Map<String, Object> sendEmailPartners(MultipartHttpServletRequest request) { |
| | | Map<String, Object> resJsonData = new HashMap<>(); |
| | | this.issueService.sendIssueEmailPartners(EmailTemplateForm.make(ConvertUtil.convertJsonToMap(request.getParameter(Constants.REQ_KEY_CONTENT))), request.getFiles("file")); |
| | | // this.issueService.sendIssueEmailPartners(IssueForm.make(params.get(Constants.REQ_KEY_CONTENT))); |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | | |
| | | |
| | | // 일반 메일 발송 (사용자 직접 작성) |
| | | @RequestMapping(value = "/issue/sendCommonEmail", method = RequestMethod.POST) |
| | | public |
| | | @ResponseBody |
| | | Map<String, Object> sendCommonEmail(MultipartHttpServletRequest request) { |
| | | Map<String, Object> resJsonData = new HashMap<>(); |
| | | this.issueService.sendCommonEmail(EmailCommonForm.make(ConvertUtil.convertJsonToMap(request.getParameter(Constants.REQ_KEY_CONTENT))), request.getFiles("file")); |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | | |
| | | // api 기록 조회 |
| | | @RequestMapping(value = "/api/findHistory", produces = MediaType.APPLICATION_JSON_VALUE) |
| | | public |
| | | @ResponseBody |
| | | Map<String, Object> findApiHistory(@RequestBody Map<String, Map<String, Object>> params) { |
| | | Map<String, Object> resJsonData = new HashMap<>(); |
| | | this.issueService.findApiIssue(ApiMonitorCondition.make(params.get(Constants.REQ_KEY_CONTENT)), resJsonData); |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | | } |