| | |
| | | import kr.wisestone.owl.mapper.ProjectMapper; |
| | | import kr.wisestone.owl.repository.IssueRepository; |
| | | import kr.wisestone.owl.repository.UserDepartmentRepository; |
| | | import kr.wisestone.owl.repository.WorkflowDepartmentRepository; |
| | | import kr.wisestone.owl.service.*; |
| | | import kr.wisestone.owl.util.*; |
| | | import kr.wisestone.owl.util.DateUtil; |
| | |
| | | |
| | | @Autowired |
| | | private UserDepartmentRepository userDepartmentRepository; |
| | | |
| | | @Autowired |
| | | private WorkflowDepartmentRepository workflowDepartmentRepository; |
| | | |
| | | @Override |
| | | protected JpaRepository<Issue, Long> getRepository() { |
| | |
| | | issueCondition.setMyDepartmentIds(myDepartmentIds); |
| | | } |
| | | |
| | | void SetWorkflowDepartment(List<IssueVo> issueVos){ |
| | | for(IssueVo issueVo : issueVos){ |
| | | Long issueTypeId = issueVo.getIssueTypeId(); |
| | | IssueType issueType = this.issueTypeService.getIssueType(issueTypeId); |
| | | Long workflowId = issueType.getWorkflow().getId(); |
| | | List<WorkflowDepartment> workflowDepartmentList = this.workflowDepartmentRepository.findByWorkflowId(workflowId); |
| | | List<Long> workflowDepartmentIds = Lists.newArrayList(); |
| | | if(workflowDepartmentList != null && workflowDepartmentList.size()>0){ |
| | | for(WorkflowDepartment workflowDepartment : workflowDepartmentList){ |
| | | workflowDepartmentIds.add(workflowDepartment.getDepartment().getId()); |
| | | } |
| | | } |
| | | if(issueVo.getIssueTypeId().equals(issueTypeId)){ |
| | | issueVo.setWorkflowDepartmentIds(workflowDepartmentIds); |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 이슈 목록을 조회한다. |
| | | @Override |
| | | @Transactional(readOnly = true) |
| | | public List<IssueVo> findIssue(Map<String, Object> resJsonData, |
| | | IssueCondition issueCondition, Pageable pageable) { |
| | | public List<IssueVo> findIssue(Map<String, Object> resJsonData, IssueCondition issueCondition, Pageable pageable) { |
| | | |
| | | // 검색 조건을 만든다 |
| | | if (!this.makeIssueSearchCondition(issueCondition, Lists.newArrayList("01", "02", "03"), pageable)) { |
| | |
| | | totalCount = this.issueMapper.countByDepartment(issueCondition); |
| | | } |
| | | |
| | | |
| | | // 튜닝 전 - 0.8, 0.9, 0.9, 0.9, 0.9 |
| | | /*StopWatch serviceStart = new StopWatch(); |
| | | serviceStart.start();*/ |
| | |
| | | this.setMapToIssueVo(results, issueVos, issueCondition, user); |
| | | |
| | | this.setCountDownIssues(results, issueVos); |
| | | this.SetWorkflowDepartment(issueVos); //워크플로우에 설정한 담당부서 가져오기 |
| | | |
| | | resJsonData.put(Constants.RES_KEY_CONTENTS, issueVos); |
| | | resJsonData.put(Constants.REQ_KEY_PAGE_VO, new ResPage(pageable.getPageNumber(), pageable.getPageSize(), |