From e335c1e8a1417dff563fe3e5254fbc351bcc9e0f Mon Sep 17 00:00:00 2001 From: jhjang <jhjang@maprex.co.kr> Date: 금, 24 12월 2021 13:16:13 +0900 Subject: [PATCH] - api 수정시 issue 못찾는 문제 수정 - api 수정시 타이틀 오류 문제 수정 --- src/main/java/kr/wisestone/owl/service/impl/IssueServiceImpl.java | 447 +++++++++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 381 insertions(+), 66 deletions(-) diff --git a/src/main/java/kr/wisestone/owl/service/impl/IssueServiceImpl.java b/src/main/java/kr/wisestone/owl/service/impl/IssueServiceImpl.java index f5641ed..f059be1 100644 --- a/src/main/java/kr/wisestone/owl/service/impl/IssueServiceImpl.java +++ b/src/main/java/kr/wisestone/owl/service/impl/IssueServiceImpl.java @@ -12,6 +12,7 @@ import kr.wisestone.owl.domain.enumType.IssueHistoryType; import kr.wisestone.owl.domain.enumType.IssueStatusType; import kr.wisestone.owl.exception.OwlRuntimeException; +import kr.wisestone.owl.mapper.DepartmentMapper; import kr.wisestone.owl.mapper.IssueMapper; import kr.wisestone.owl.mapper.ProjectMapper; import kr.wisestone.owl.repository.IssueRelationRepository; @@ -79,6 +80,15 @@ @Autowired private ApiTokenService apiTokenService; + + @Autowired + private CompanyFieldService companyFieldService; + + @Autowired + private IspFieldService ispFieldService; + + @Autowired + private HostingFieldService hostingFieldService; @Autowired private CommonConfiguration configuration; @@ -174,7 +184,13 @@ private SimpMessagingTemplate simpMessagingTemplate; @Autowired + private UserDepartmentService userDepartmentService; + + @Autowired private UserDepartmentRepository userDepartmentRepository; + + @Autowired + private DepartmentMapper departmentMapper; @Autowired private WorkflowDepartmentRepository workflowDepartmentRepository; @@ -193,6 +209,15 @@ Issue issue = this.getIssue(id); // �씠�뒋 踰꾩쟾 �깮�꽦 this.issueVersionService.addIssueVersion(issue); + } + + @Override + @Transactional + public void addIssueVersion(Long id, Long userId) { + Issue issue = this.getIssue(id); + User user = this.userService.getUser(userId); + // �씠�뒋 踰꾩쟾 �깮�꽦 + this.issueVersionService.addIssueVersion(issue, user); } @@ -275,6 +300,8 @@ // �궗�슜�옄 �젙�쓽 �븘�뱶 �꽕�젙 issueForm.setIssueCustomFields(issueApiForm.getCustomFieldValues()); + // 媛숈� �룄硫붿씤 �뾽泥� 李얘린 + this.findCompanyField(issueForm); // api �엯�젰媛� �쟻�슜 ConvertUtil.copyProperties(issueApiForm, issueForm); @@ -283,6 +310,51 @@ } else { throw new OwlRuntimeException(this.messageAccessor.getMessage(MsgConstants.API_USER_ERROR)); + } + } + + private void findCompanyField(IssueForm issueForm) { + if(issueForm.getIssueCustomFields() != null && issueForm.getIssueCustomFields().size() > 0) { + CompanyFieldCondition condition = new CompanyFieldCondition(); + List<Map<String, Object>> companyFields = this.companyFieldService.find(condition); + List<Map<String, Object>> issueCompanyFields = Lists.newArrayList(); + List<Map<String, Object>> issueIspFields = Lists.newArrayList(); + List<Map<String, Object>> issueHostingFields = Lists.newArrayList(); + + for (Map<String, Object> issueCustomField : issueForm.getIssueCustomFields()) { + int customFieldId = (Integer) issueCustomField.get("customFieldId"); + Long customId = (long) customFieldId; + CustomField customField = this.customFieldService.getCustomField(customId); + if(customField != null && customField.getCustomFieldType().toString().equals("SITE") && customField.getName().equals("�룄硫붿씤")) { + String useValue = issueCustomField.get("useValue").toString(); + if(companyFields != null && companyFields.size() > 0) { + for (Map<String, Object> companyField : companyFields) { + CompanyFieldVo companyFieldVo = ConvertUtil.convertMapToClass(companyField, CompanyFieldVo.class); + if(useValue.equals(companyFieldVo.getUrl())) { + companyField.put("companyId", companyField.get("id")); + issueCompanyFields.add(companyField); + if(companyFieldVo.getIspId() != null) { + Map<String, Object> ispField = this.ispFieldService.find(companyFieldVo.getIspId()); + if (ispField != null) { + ispField.put("ispId", ispField.get("id")); + issueIspFields.add(ispField); + } + } + if(companyFieldVo.getHostingId() != null) { + Map<String, Object> hostingField = this.hostingFieldService.find(companyFieldVo.getHostingId()); + if (hostingField != null) { + hostingField.put("hostingId", hostingField.get("id")); + issueHostingFields.add(hostingField); + } + } + } + } + } + } + issueForm.setIssueCompanyFields(issueCompanyFields); + issueForm.setIssueIspFields(issueIspFields); + issueForm.setIssueHostingFields(issueHostingFields); + } } } @@ -303,10 +375,11 @@ IssueForm issueForm = this.convertToIssueForm(issueApiForm, user); List<Issue> issues = Lists.newArrayList(); - if (issueForm.getParentIssueId() != null) { + if (issueForm.getParentIssueId() != null // 湲곗〈 異붽��맂 �긽�쐞 �씪媛먯씠 �뾾嫄곕굹 �꽕�젙�맂 以묐났 �씠�뒋 id媛� �뾾�쓣�븣 + || issueApiForm.getUseIssueCustomFieldIds().size() == 0) { issues.add(addIssue(user, issueForm, issueApiForm.getMultipartFiles())); } else { - // �긽�쐞 �씠�뒋 異붽� + // 媛��긽 �긽�쐞 �씠�뒋 異붽� IssueForm parentIssueForm = issueForm.clone(); parentIssueForm.setUseIssueCustomFields(issueApiForm.getUseIssueCustomFieldIds()); Issue issue = addIssue(user, parentIssueForm, null); @@ -458,6 +531,91 @@ public Issue addRelIssue(IssueForm issueForm, List<MultipartFile> multipartFiles) { User user = this.webAppUtil.getLoginUserObject(); return addRelIssue(user, issueForm, multipartFiles); + } + + // �븯�쐞�씠�뒋瑜� �깮�꽦�븳�떎. + @Override + @Transactional + public Issue addDownIssue(IssueForm issueForm, List<MultipartFile> multipartFiles) { + User user = this.webAppUtil.getLoginUserObject(); + return addDownIssue(user, issueForm, multipartFiles); + } + + // �븯�쐞�씠�뒋瑜� �깮�꽦�븳�떎. + @Override + @Transactional + public Issue addDownIssue(User user, IssueForm issueForm, List<MultipartFile> multipartFiles) { + // �궗�슜�븯怨� �엳�뒗 �뾽臾� 怨듦컙�씠 �솢�꽦 �긽�깭�씤吏� �솗�씤�븳�떎. �궗�슜 怨듦컙�뿉�꽌 濡쒓렇�씤�븳 �궗�슜�옄媛� 鍮꾪솢�꽦�씤吏� �솗�씤�븳�떎. + Workspace workspace = this.workspaceService.checkUseWorkspace(user, user.getLastWorkspaceId()); + // �봽濡쒖젥�듃 �쑀�슚�꽦 泥댄겕 + Project project = this.projectService.getProject(issueForm.getProjectId()); + // �씠�뒋 �쑀�삎 �쑀�슚�꽦 泥댄겕 + IssueType issueType = this.issueTypeService.getIssueType(issueForm.getIssueTypeId()); + // �슦�꽑�닚�쐞 �쑀�슚�꽦 泥댄겕 + Priority priority = this.priorityService.getPriority(issueForm.getPriorityId()); + // 以묒슂�룄 �쑀�슚�꽦 泥댄겕 + Severity severity = this.severityService.getSeverity(issueForm.getSeverityId()); + + // �젣紐� �쑀�슚�꽦 泥댄겕 + this.verifyTitle(issueForm.getTitle()); + // �궇吏� �쑀�슚�꽦 泥댄겕 + this.checkStartCompleteDate(issueForm.getStartDate(), issueForm.getCompleteDate()); + // �떞�떦 遺��꽌 �쑀�슚�꽦 泥댄겕 + //this.verifyIssueDepartment(project, issueForm); + + // �씠�뒋 �긽�깭 �쑀�삎�씠 '��湲�' �씤 �씠�뒋 �긽�깭 媛��졇�삤湲� + IssueStatus issueStatus = this.issueStatusService.findByIssueStatusTypeIsReady(issueType.getWorkflow()); + + Issue issue = ConvertUtil.copyProperties(issueForm, Issue.class); + issue.setProject(project); + issue.setIssueStatus(issueStatus); + issue.setIssueType(issueType); + issue.setPriority(priority); + issue.setSeverity(severity); + if (issueForm.getParentIssueId() != null){ + Issue parentIssue = this.getIssue(issueForm.getParentIssueId()); + issue.setParentIssue(parentIssue); + } + + issue.setIssueNumber(this.issueNumberGeneratorService.generateIssueNumber(project)); // 媛� �봽濡쒖젥�듃�쓽 怨좎쑀 �씠�뒋 踰덊샇 �깮�꽦 + + issue = this.issueRepository.saveAndFlush(issue); + + issue.setReverseIndex(issue.getId() * -1); // 荑쇰━ �냽�룄 媛쒖꽑�쓣 �쐞�빐 由щ쾭�뒪 �씤�뜳�뒪 �깮�꽦 + // �떞�떦�옄 吏��젙 + //this.issueUserService.modifyIssueUser(issue, project.getWorkspace(), issueForm.getUserIds()); + // �떞�떦遺��꽌 吏��젙 + this.issueDepartmentService.modifyIssueDepartment(issue, user, project.getWorkspace(), issueForm.getDepartmentIds()); + // �뾽泥� �젙蹂� ���옣 + this.issueCompanyService.modifyIssueCompanyField(issue, issueForm.getIssueCompanyFields()); + // ISP �젙蹂� ���옣 + this.issueIspService.modifyIssueIspField(issue, issueForm.getIssueIspFields()); + // HOSTING �젙蹂� ���옣 + this.issueHostingService.modifyIssueHostingField(issue, issueForm.getIssueHostingFields()); + + // 泥⑤� �뙆�씪 ���옣 + // multipartFile �쓣 file Map List 媛앹껜濡� 蹂�寃쏀븳�떎. + List<Map<String, Object>> convertFileMaps = this.convertMultipartFileToFile(multipartFiles); + this.attachedFileService.addAttachedFile(convertFileMaps, issue, user.getAccount()); + + // �뀓�뒪�듃 �뿉�뵒�꽣�뿉 泥⑤��븳 �뙆�씪�쓣 �씠�뒋�� �뿰寃� + this.checkNotHaveIssueIdAttachedFile(issue, issueForm); + // �궗�슜�옄 �젙�쓽 �븘�뱶 ���옣 + this.issueCustomFieldValueService.modifyIssueCustomFieldValue(issue, issueForm.getIssueCustomFields()); + // �씠�뒋 �씠�젰 �깮�꽦 + this.issueHistoryService.addIssueHistory(issue, user, IssueHistoryType.ADD, null); + // �씠�뒋 �쐞�뿕 愿�由� �깮�꽦 + this.issueRiskService.addIssueRisk(issue, project.getWorkspace()); + // �쁺�냽�꽦 而⑦뀓�뒪�듃 鍮꾩슦湲� + this.clear(); + // �씠�뒋 �깮�꽦, �궘�젣�떆 �삁�빟 �씠硫붿씪�뿉 �벑濡앺빐�넃�뒗�떎. + this.reservationIssueEmail(issue, EmailType.ISSUE_ADD); + // �궗�슜�옄 �떆�뒪�뀥 湲곕뒫 �궗�슜 �젙蹂� �닔吏� + + UserVo userVo = ConvertUtil.copyProperties(user, UserVo.class); + log.info(ElasticSearchUtil.makeUserActiveHistoryMessage(userVo, ElasticSearchConstants.ISSUE_ADD)); + + return issue; } // �뿰愿��씠�뒋瑜� �깮�꽦�븳�떎. @@ -694,8 +852,22 @@ for(UserDepartment myDepartment : myDepartments){ myDepartmentIds.add(myDepartment.getDepartmentId()); } + } else { + myDepartmentIds.add(-1L); } issueCondition.setMyDepartmentIds(myDepartmentIds); + } + + void SetAllDepartmentId(IssueCondition issueCondition){ + List<Long> departmentIds = Lists.newArrayList(); + List<Map<String, Object>> departmentList = this.departmentMapper.find(null); + + if(departmentList != null && departmentList.size() > 0){ + for(Map<String, Object> department : departmentList){ + departmentIds.add((Long) department.get("id")); + } + } + issueCondition.setMyDepartmentIds(departmentIds); } void SetWorkflowDepartment(List<IssueVo> issueVos){ @@ -720,7 +892,6 @@ @Override @Transactional(readOnly = true) public List<IssueVo> findIssue(Map<String, Object> resJsonData, IssueCondition issueCondition, Pageable pageable) { - // 寃��깋 議곌굔�쓣 留뚮뱺�떎 if (!this.makeIssueSearchCondition(issueCondition, Lists.newArrayList("01", "02", "03"), pageable)) { // �씠�뒋 紐⑸줉�쓣 李얠� 紐삵븷 寃쎌슦 湲곕낯 �젙蹂대줈 由ы꽩�븳�떎. @@ -754,16 +925,16 @@ Long totalCount = 0L; UserLevel userLevel = this.userLevelService.getUserLevel(user.getUserLevel().getId()); -// if (this.userWorkspaceService.checkWorkspaceManager(user) -// || MngPermission.checkMngPermission(userLevel.getPermission(), MngPermission.USER_PERMISSION_MNG_ISSUE_PROJECT_ALL)) { - results = this.issueMapper.find(issueCondition); - totalCount = this.issueMapper.count(issueCondition); -// } -// } else{ +// if (!this.userWorkspaceService.checkWorkspaceManager(user) +// && !MngPermission.checkMngPermission(userLevel.getPermission(), MngPermission.USER_PERMISSION_MNG_ISSUE)) { //理쒓퀬愿�由ъ옄 & �봽濡쒖젥�듃,�씠�뒋 愿�由ъ옄 �씪 寃쎌슦 紐⑤뱺 �씠�뒋 蹂닿린 // this.SetMyDepartmentId(issueCondition); + //this.SetAllDepartmentId(issueCondition); +// } /*else{ // results = this.issueMapper.findByDepartment(issueCondition); // totalCount = this.issueMapper.countByDepartment(issueCondition); -// } +// }*/ + results = this.issueMapper.find(issueCondition); + totalCount = this.issueMapper.count(issueCondition); // �뒠�떇 �쟾 - 0.8, 0.9, 0.9, 0.9, 0.9 @@ -784,6 +955,7 @@ this.setMapToIssueVo(results, issueVos, issueCondition, user); if (issueCondition.getTree()) { + this.setParentIssue(issueVos); this.setDownIssues(user, issueVos); this.setRelationIssues(issueVos); } @@ -813,9 +985,9 @@ IssueVo addIssueVo = ConvertUtil.copyProperties(downIssue, IssueVo.class); addIssueVo.setIssueTypeId(downIssue.getIssueType().getId()); downIssueVos.add(addIssueVo); - } issueVo.setIssueDownVos(downIssueVos); + if (downIssueVos.size() > 0) { this.setDownIssues(user, downIssueVos); } @@ -825,11 +997,10 @@ this.setIssueDepartmentList(issueVos, issueCondition, user); // �벑濡앹옄 �젙蹂� 異붽� this.setRegister(issueVos); // �떞�떦�옄 �젙蹂� �뀑�똿 - // �궗�슜�옄 �젙�쓽 �븘�뱶 �젙蹂� 異붽� this.setIssueCustomFieldValue(issueVos, issueCondition); - - this.SetWorkflowDepartment(issueVos); //�썙�겕�뵆濡쒖슦�뿉 �꽕�젙�븳 �떞�떦遺��꽌 媛��졇�삤湲� + //�썙�겕�뵆濡쒖슦�뿉 �꽕�젙�븳 �떞�떦遺��꽌 媛��졇�삤湲� + this.SetWorkflowDepartment(issueVos); } } @@ -839,6 +1010,20 @@ List<IssueVo> relationIssues = this.issueRelationService.findRelationIssue(issueVo.getId()); for(IssueVo relationIssue : relationIssues){ issueVo.addRelationIssueVo(ConvertUtil.copyProperties(relationIssue, IssueVo.class)); + } + } + } + + // �긽�쐞 �씠�뒋 泥댄겕 + private void setParentIssue(List<IssueVo> issueVos) { + for(IssueVo issueVo : issueVos) { + if(issueVo.getParentIssueId() != null) { + Issue parentIssue = this.getIssue(issueVo.getParentIssueId()); + //issueVo.setParentIssueVo(ConvertUtil.copyProperties(parentIssue, IssueVo.class)); + if(parentIssue.getIssueCustomFieldValues() == null || parentIssue.getIssueCustomFieldValues().size() == 0){ + issueVo.setIssueCustomFieldValueVos(null); + } + ConvertUtil.copyProperties(parentIssue, issueVo); } } } @@ -880,15 +1065,19 @@ public void findApiIssue(ApiMonitorCondition apiMonitorCondition, Map<String, Object> resJsonData) { IssueTypeCondition issueTypeCondition = new IssueTypeCondition(); + issueTypeCondition.setIsApi(Issue.IS_API_YES); List<IssueTypeVo> issueTypes = this.issueTypeService.findIssueType(issueTypeCondition); - // 媛믪씠 �뾾�쓣 寃쎌슦 珥덇린媛� �엯�젰 - if (StringUtils.isEmpty(apiMonitorCondition.getSearchPeriod())) { - apiMonitorCondition.setSearchPeriod(DateUtil.LAST_SEVEN_DAYS); - } - // 寃��깋 �씪�옄瑜� 援ы븳�떎. - List<Date> searchDates = CommonUtil.findSearchPeriod(apiMonitorCondition.getSearchPeriod()); + List<Date> searchDates = Lists.newArrayList(); + if (apiMonitorCondition.getSearchPeriod().equals(DateUtil.CUSTOM_INPUT)) { + Date startDate = DateUtil.convertStrToDate(apiMonitorCondition.getSearchStartDate(), "yyyy-MM-dd"); + Date endDate = DateUtil.addDays(DateUtil.convertStrToDate(apiMonitorCondition.getSearchEndDate(), "yyyy-MM-dd"), 1); + + searchDates = CommonUtil.findSearchPeriod(startDate, endDate); + } else { + searchDates = CommonUtil.findSearchPeriod(apiMonitorCondition.getSearchPeriod()); + } // �궇吏쒓� 寃��깋�릺吏� �븡�븯�쑝硫� �삤瑜� if (searchDates.size() < 1) { @@ -1050,6 +1239,9 @@ condition.setLoginUserId(this.webAppUtil.getLoginId()); condition.setWorkspaceId(this.userService.getUser(this.webAppUtil.getLoginId()).getLastWorkspaceId()); + User user = this.webAppUtil.getLoginUserObject(); + UserLevel userLevel = this.userLevelService.getUserLevel(user.getUserLevel().getId()); + // �봽濡쒖젥�듃 �궎媛� 議댁옱�븷 寃쎌슦 �봽濡쒖젥�듃 �궎�뿉 �빐�떦�븯�뒗 �봽濡쒖젥�듃瑜� 議고쉶�븯怨� 寃��깋 議곌굔�뿉 �뀑�똿�븳�떎. if (!this.getProjectByProjectKey(condition.getProjectKey(), condition)) { return false; @@ -1057,9 +1249,17 @@ // �봽濡쒖젥�듃瑜� �꽑�깮�븯吏� �븡�븯�쑝硫� �빐�떦 �뾽臾� 怨듦컙�뿉�꽌 李몄뿬�븯怨� �엳�뒗 �봽濡쒖젥�듃瑜� 李얜뒗�떎. if (condition.getProjectIds().size() < 1) { - List<Map<String, Object>> projects = this.projectService.findByWorkspaceIdAndIncludeProjectAll(projectStatues, condition.getProjectType()); - List<Long> projectIds = Lists.newArrayList(); + List<Map<String, Object>> projects = Lists.newArrayList(); + if (this.userWorkspaceService.checkWorkspaceManager(user) || MngPermission.checkMngPermission(userLevel.getPermission(), MngPermission.USER_PERMISSION_MNG_PROJECT)){ + return true; + }/*else if (MngPermission.checkMngPermission(userLevel.getPermission(), MngPermission.USER_PERMISSION_MNG_ISSUE)){ + projects = this.projectService.findByWorkspaceIdAndIncludeProjectAll(projectStatues, condition.getProjectType()); + }*/ + else { + projects = this.projectService.findByWorkspaceIdAndIncludeProject(projectStatues, condition.getProjectType()); + } + List<Long> projectIds = Lists.newArrayList(); for (Map<String, Object> result : projects) { Long projectId = MapUtil.getLong(result, "id"); @@ -1097,7 +1297,10 @@ // �봽濡쒖젥�듃瑜� �꽑�깮�븯吏� �븡�븯�쑝硫� �빐�떦 �뾽臾� 怨듦컙�뿉�꽌 李몄뿬�븯怨� �엳�뒗 �봽濡쒖젥�듃瑜� 李얜뒗�떎. if (condition.getProjectIds().size() < 1) { List<Map<String, Object>> projects = null; - if (this.userWorkspaceService.checkWorkspaceManager(user)) { + UserLevel userLevel = this.userLevelService.getUserLevel(user.getUserLevel().getId()); + if (this.userWorkspaceService.checkWorkspaceManager(user) + || (MngPermission.checkMngPermission(userLevel.getPermission(), MngPermission.USER_PERMISSION_MNG_PROJECT) && + MngPermission.checkMngPermission(userLevel.getPermission(), MngPermission.USER_PERMISSION_MNG_ISSUE))) { projects = this.projectMapper.findByWorkspaceManagerAll(projectCondition); } else { projects = this.projectService.findByWorkspaceIdAndIncludeProjectAll(projectCondition); @@ -1206,7 +1409,7 @@ } // �씠�뒋 �닔�젙 沅뚰븳�쓣 媛뽮퀬 �엳�뒗吏� �솗�씤 - if (this.checkHasPermission(issueVo, issueVo.getUserVos(), user)) { + if (this.checkHasPermission(issueVo, issueVo.getUserVos(), user, null)) { issueVo.setModifyPermissionCheck(Boolean.TRUE); } } @@ -1243,7 +1446,7 @@ } // �씠�뒋 �닔�젙 沅뚰븳�쓣 媛뽮퀬 �엳�뒗吏� �솗�씤 - if (this.checkHasPermission(issueVo, issueVo.getUserVos(), user)) { + if (this.checkHasPermission(issueVo, issueVo.getUserVos(), user, issueVo.getDepartmentVos())) { issueVo.setModifyPermissionCheck(Boolean.TRUE); } } @@ -1258,6 +1461,7 @@ if (issueCondition.getId() != null) { Issue issue = this.getIssue(issueCondition.getId()); issueVo = ConvertUtil.copyProperties(issue, IssueVo.class); + User user = this.webAppUtil.getLoginUserObject(); switch (issueCondition.getDeep()) { case "01": // �봽濡쒖젥�듃, �씠�뒋 �쑀�삎, �씠�뒋 �긽�깭, �슦�꽑�닚�쐞, 以묒슂�룄, �떞�떦遺��꽌, 泥⑤��뙆�씪, �궗�슜�옄 �젙�쓽 �븘�뱶 �젙蹂대�� �뀑�똿�븳�떎. @@ -1278,7 +1482,7 @@ break; case "02": // �봽濡쒖젥�듃, �씠�뒋 �쑀�삎, �씠�뒋 �긽�깭, �슦�꽑�닚�쐞, 以묒슂�룄, �떞�떦�옄, 泥⑤��뙆�씪, �궗�슜�옄 �젙�쓽 �븘�뱶 �젙蹂�, �뙎湲�, 湲곕줉�쓣 �뀑�똿�븳�떎. - this.setIssueDetail(issueVo, issue); // �씠�뒋 �긽�꽭 �젙蹂대�� �뀑�똿�븳�떎. + this.setIssueDetail(issueVo, issue, user); // �씠�뒋 �긽�꽭 �젙蹂대�� �뀑�똿�븳�떎. this.setIssueTableConfigs(issue, issueVo); issueVo.setProjectVo(ConvertUtil.copyProperties(issue.getProject(), ProjectVo.class)); break; @@ -1329,6 +1533,8 @@ this.setRegister(downIssue, downIssueVo); // �벑濡앹옄 this.setIssueDepartment(downIssue, downIssueVo); // �떞�떦遺��꽌 �젙蹂� �뀑�똿 this.setIssueCustomFields(downIssue, downIssueVo); // �궗�슜�옄�젙�쓽�븘�뱶 �젙蹂� �꽭�똿 + this.setIssueHistory(downIssue, downIssueVo); // �씠�뒋 湲곕줉 �젙蹂� �뀑�똿 + this.setIssueComments(downIssue, downIssueVo); // �뙎湲� �젙蹂� �뀑�똿 resultList.add(downIssueVo); } @@ -1339,7 +1545,7 @@ // �씠�뒋 �긽�꽭 �젙蹂대�� �뀑�똿�븳�떎. @Override @Transactional(readOnly = true) - public void setIssueDetail(IssueVo issueVo, Issue issue) { + public void setIssueDetail(IssueVo issueVo, Issue issue, User user) { issueVo.setProjectVo(ConvertUtil.copyProperties(issue.getProject(), ProjectVo.class)); issueVo.setIssueTypeVo(ConvertUtil.copyProperties(issue.getIssueType(), IssueTypeVo.class)); IssueStatusVo issueStatusVo = ConvertUtil.copyProperties(issue.getIssueStatus(), IssueStatusVo.class, "issueStatusType"); @@ -1352,10 +1558,10 @@ this.setIssueDepartment(issue, issueVo); // �떞�떦遺��꽌 �젙蹂� �뀑�똿 this.setAttachedFiles(issue, issueVo); // 泥⑤� �뙆�씪 �젙蹂� �뀑�똿 this.setIssueCustomFields(issue, issueVo); // �궗�슜�옄 �젙�쓽 �븘�뱶 媛� �젙蹂� �뀑�똿 - this.setIssueComments(issue, issueVo); // �뙎湲� �젙蹂� �뀑�똿 - this.setIssueHistory(issue, issueVo); // �씠�뒋 湲곕줉 �젙蹂� �뀑�똿 this.setRelationIssue(issue, issueVo); //�뿰愿� �씪媛� �뀑�똿 this.setDownIssues(issue, issueVo); //�븯�쐞 �씪媛� �꽭�똿 + this.setIssueComments(issue, issueVo); // �뙎湲� �젙蹂� �뀑�똿 + this.setIssueHistory(issue, issueVo); // �씠�뒋 湲곕줉 �젙蹂� �뀑�똿 IssueType issueType = this.issueTypeService.getIssueType(issueVo.getIssueTypeVo().getId()); // �씠�뒋�쓽 �씠�뒋�쑀�삎 媛앹껜 Integer using = issueType.getUsePartner() != null ? issueType.getUsePartner().intValue() : 0; // �씠�뒋�쑀�삎蹂꾨줈 �궗�슜以묒씤 �뾽泥�/ISP/�샇�뒪�똿 媛� @@ -1374,8 +1580,12 @@ this.setIssueCompanyField(issue, issueVo); //�뾽泥� �젙蹂� �꽭�똿 this.setIssueIspField(issue, issueVo); //ISP �젙蹂� �꽭�똿 this.setIssueHostingField(issue, issueVo); //HOSTING �젙蹂� �꽭�똿 - this.setParentIssue(issue,issueVo); //�긽�쐞 �씠�뒋 �젙蹂� �꽭�똿 + + // �씠�뒋 �닔�젙 沅뚰븳�쓣 媛뽮퀬 �엳�뒗吏� �솗�씤 + if (this.checkHasPermission(issueVo, issueVo.getUserVos(), user, issueVo.getDepartmentVos())) { + issueVo.setModifyPermissionCheck(Boolean.TRUE); + } } // �긽�쐞�씪媛� �젙蹂� 異붽� @@ -1483,6 +1693,15 @@ DepartmentVo departmentVo = ConvertUtil.copyProperties(issueDepartment.getDepartment(), DepartmentVo.class); departmentVo.setByName(departmentVo.getDepartmentName()); departmentVos.add(departmentVo); + + List<UserDepartment> userDepartments = this.userDepartmentRepository.findByDepartmentId(departmentVo.getId()); + if (userDepartments != null && userDepartments.size() > 0) { + for (UserDepartment userDepartment : userDepartments) { + if (userDepartment.getUserId().equals(this.webAppUtil.getLoginId())){ + issueVo.setModifyPermissionCheck(Boolean.TRUE); + } + } + } } issueVo.setDepartmentVos(departmentVos); } @@ -1524,7 +1743,7 @@ // �씠�뒋 湲곕줉 �젙蹂대�� �뀑�똿�븳�떎. private void setIssueHistory(Issue issue, IssueVo issueVo) { - issueVo.setIssueHistoryVos(this.issueHistoryService.findIssueHistory(issue.getId())); + issueVo.setIssueHistoryVos(this.issueHistoryService.findIssueHistory(issue)); } // �궗�슜�옄 �젙�쓽 �븘�뱶 媛믪씠 媛숈� �씠�뒋 李얘린 @@ -1537,6 +1756,9 @@ String comma = ","; if (issueCustomFieldValueForms.size() > 0) { + IssueCustomFieldValueFormComparator comp = new IssueCustomFieldValueFormComparator(); + Collections.sort(issueCustomFieldValueForms, comp); + String concatUseValue = ""; for (int i = 0; i < issueCustomFieldValueForms.size(); i++) { IssueCustomFieldValueForm issueCustomFieldValueForm = issueCustomFieldValueForms.get(i); @@ -1583,21 +1805,28 @@ List<Issue> issues = Lists.newArrayList(); for (Issue issueVo : issue) { issueForm.setId(issueVo.getId()); + issueForm.setTitle(issueVo.getTitle()); // �옄�룞 醫낅즺 �긽�깭 �꽕�젙�씠 �릺�뼱 �엳吏� �븡�쑝硫� �삤瑜섎컻�깮 Issue modifyIssue = this.modifyIssueForApi(user, issueForm, files); Issue parentIssue = modifyIssue.getParentIssue(); IssueType issueType = modifyIssue.getIssueType(); - IssueStatus issueStatus = issueType.getIssueStatus(); + + Set<IssueTypeApiEndStatus> issueTypeApiEndStatuses = issueType.getIssueTypeApiEndStatuses(); + IssueTypeApiEndStatus issueStatus = null; + if (issueTypeApiEndStatuses != null && issueTypeApiEndStatuses.size() > 0) { + issueStatus = issueTypeApiEndStatuses.iterator().next(); + } else { + throw new OwlRuntimeException(this.messageAccessor.getMessage(MsgConstants.API_COMPLETE_ISSUE_STATUS_NOT_EXIST)); + } + if (parentIssue != null) { - if (issueStatus == null) { - throw new OwlRuntimeException(this.messageAccessor.getMessage(MsgConstants.API_COMPLETE_ISSUE_STATUS_NOT_EXIST)); - } + IssueCondition issueCondition = new IssueCondition(issueVo.getId(), parentIssue.getId()); List<Map<String, Object>> results = this.issueMapper.findNotCompleteByParentIssueId(issueCondition); // �븯�쐞 �씪媛먯씠 紐⑤몢 醫낅즺 �긽�깭�씪�븣 �긽�쐞 �씪媛먮룄 醫낅즺 泥섎━ if (results == null || results.size() == 0) { - parentIssue.setIssueStatus(issueType.getIssueStatus()); + parentIssue.setIssueStatus(issueStatus.getIssueStatus()); this.issueRepository.saveAndFlush(parentIssue); } } @@ -1889,7 +2118,7 @@ // �씠�뒋 �닔�젙 沅뚰븳 泥댄겕 private void verifyIssueModifyPermission(Issue issue, User user) { // �씠�뒋 �닔�젙 沅뚰븳�쓣 媛뽮퀬 �엳�뒗吏� �솗�씤 - if (!this.checkHasPermission(ConvertUtil.copyProperties(issue, IssueVo.class), this.getIssueUserVos(issue), user)) { + if (!this.checkHasPermission(ConvertUtil.copyProperties(issue, IssueVo.class), this.getIssueUserVos(issue), user, this.getIssueDepartmentVos(issue))) { throw new OwlRuntimeException( this.messageAccessor.getMessage(MsgConstants.ISSUE_NOT_MODIFY_PERMISSION)); } @@ -1914,18 +2143,41 @@ return userVos; } + // �씠�뒋�뿉�꽌 �떞�떦�옄 �젙蹂대�� 異붿텧�븳�떎. + private List<DepartmentVo> getIssueDepartmentVos(Issue issue) { + List<DepartmentVo> departmentVos = Lists.newArrayList(); + + Set<IssueDepartment> issueDepartments = issue.getIssueDepartments(); + + try { + for (IssueDepartment issueDepartment : issueDepartments) { + Department department = issueDepartment.getDepartment(); + DepartmentVo departmentVo = ConvertUtil.copyProperties(department, DepartmentVo.class); + departmentVos.add(departmentVo); + } + } catch (Exception ex) { + + } + + return departmentVos; + } + // �씠�뒋 �닔�젙 沅뚰븳�쓣 媛뽮퀬 �엳�뒗吏� �솗�씤 - private boolean checkHasPermission(IssueVo issueVo, List<UserVo> issueUserVos, User user) { + private boolean checkHasPermission(IssueVo issueVo, List<UserVo> issueUserVos, User user, List<DepartmentVo> departmentVos) { boolean hasPermission = false; // �뾽臾� 怨듦컙 愿�由ъ옄�씪 寃쎌슦 �닔�젙 沅뚰븳�쓣 媛뽯뒗�떎. hasPermission = this.checkIssueModifyPermission(hasPermission, Issue.WORKSPACE_MANAGER, issueVo, null, null, user); // �봽濡쒖젥�듃 愿�由ъ옄�씪 寃쎌슦 �빐�떦 �봽濡쒖젥�듃�뿉 �벑濡앸맂 �씠�뒋�뒗 �닔�젙 沅뚰븳�쓣 媛뽯뒗�떎. hasPermission = this.checkIssueModifyPermission(hasPermission, Issue.PROJECT_MANAGER, issueVo, null, null, user); + // �씠�뒋 愿�由ъ옄�씪 寃쎌슦 �닔�젙 沅뚰븳�쓣 媛뽯뒗�떎. + hasPermission = this.checkIssueModifyPermission(hasPermission, Issue.ISSUE_MANAGER, issueVo, null, null, user); // �씠�뒋 �벑濡앹옄�씪 寃쎌슦 �닔�젙 沅뚰븳�쓣 媛뽯뒗�떎. hasPermission = this.checkIssueModifyPermission(hasPermission, Issue.REGISTER, issueVo, null, null, user); - // �씠�뒋 �떞�떦�옄�씪 寃쎌슦 �닔�젙 沅뚰븳�쓣 媛뽯뒗�떎. => �떞�떦遺��꽌濡� �닔�젙 - 泥댄겕 + // �씠�뒋 �떞�떦�옄�씪 寃쎌슦 �닔�젙 沅뚰븳�쓣 媛뽯뒗�떎. //hasPermission = this.checkIssueModifyPermission(hasPermission, Issue.ASSIGNEE, issueVo, issueUserVos); + // �씠�뒋 �떞�떦遺��꽌�씪 寃쎌슦 �닔�젙 沅뚰븳�쓣 媛뽯뒗�떎. + hasPermission = this.checkIssueModifyPermission(hasPermission, Issue.DEPARTMENT, issueVo, null, departmentVos, user); // �떞�떦�옄媛� �뾾�쑝硫� 紐⑤뱺 �궗�슜�옄媛� �닔�젙 沅뚰븳�쓣 媛뽯뒗�떎. //hasPermission = this.checkIssueModifyPermission(hasPermission, Issue.ALL_ISSUE_MANAGER, issueVo, null, null, user); @@ -1935,7 +2187,7 @@ } // �씠�뒋 �닔�젙 沅뚰븳�쓣 �솗�씤�븳�떎. - private boolean checkIssueModifyPermission(Boolean hasPermission, String checkType, IssueVo issueVo, List<UserVo> issueUserVos, List<DepartmentVo> issueDepartmentVos, User user) { + private boolean checkIssueModifyPermission(Boolean hasPermission, String checkType, IssueVo issueVo, List<UserVo> issueUserVos, List<DepartmentVo> departmentVos, User user) { if (!hasPermission) { switch (checkType) { case Issue.WORKSPACE_MANAGER: // �뾽臾� 怨듦컙 愿�由ъ옄 @@ -1947,6 +2199,11 @@ Issue issue = this.getIssue(issueVo.getId()); // �봽濡쒖젥�듃 愿�由ъ옄�씪 寃쎌슦 �빐�떦 �봽濡쒖젥�듃�뿉 �벑濡앸맂 �씠�뒋�뒗 �닔�젙 沅뚰븳�쓣 媛뽯뒗�떎. hasPermission = this.projectRoleUserService.checkProjectManager(issue.getProject(), user); + break; + + case Issue.ISSUE_MANAGER: // �씠�뒋 愿�由ъ옄 + UserLevel userLevel = this.userLevelService.getUserLevel(user.getUserLevel().getId()); + hasPermission = MngPermission.checkMngPermission(userLevel.getPermission(), MngPermission.USER_PERMISSION_MNG_ISSUE); break; case Issue.REGISTER: // �씠�뒋 �벑濡앹옄 @@ -1970,17 +2227,22 @@ case Issue.DEPARTMENT: // �떞�떦遺��꽌媛� �뾾�쑝硫� 紐⑤뱺 �궗�슜�옄媛� �닔�젙 沅뚰븳�쓣 媛뽯뒗�떎. - if (issueDepartmentVos.size() < 1) { + /*if (userDepartmentVos.size() < 1) { hasPermission = true; break; - } - // �씠�뒋 �떞�떦遺��꽌 �뿬遺� �솗�씤 - /*for (DepartmentVo issueDepartmentVo : issueDepartmentVos) { - if (issueDepartmentVo.getId().equals()) { - hasPermission = true; - break; - } }*/ + // �씠�뒋 �떞�떦遺��꽌 �뿬遺� �솗�씤 + for (DepartmentVo departmentVo : departmentVos) { + List<UserDepartment> userDepartments = this.userDepartmentService.findByDepartmentId(departmentVo.getId()); + if(userDepartments != null && userDepartments.size() > 0) { + for (UserDepartment userDepartment : userDepartments) { + if (userDepartment.getUserId().equals(user.getId())){ + hasPermission = true; + break; + } + } + } + } break; } } @@ -2003,6 +2265,19 @@ this.verifyIssueModifyPermission(issue, user); IssueStatus issueStatus = this.issueStatusService.getIssueStatus(issueForm.getIssueStatusId()); + + if (issueStatus.getIssueStatusType().toString().equals("CLOSE")) { + List<String> downIssuesStatus = issueForm.getDownIssuesStatus(); + if (downIssuesStatus != null && downIssuesStatus.size() > 0) { + for (String downIssueStatus : downIssuesStatus) { + if (!downIssueStatus.equals("CLOSE")) { + throw new OwlRuntimeException( + this.messageAccessor.getMessage(MsgConstants.ISSUE_NOT_MODIFY_STATUS)); + } + } + } + } + // �씠�뒋 �긽�깭瑜� 蹂�寃쏀븷 �븣 �꽑�깮�븳 �씠�뒋 �긽�깭濡� 蹂�寃쏀븷 �닔 �엳�뒗吏� �솗�씤�븳�떎. this.issueStatusService.checkNextIssueStatus(issue, issueStatus); // 蹂�寃� �씠�젰 �젙蹂� 異붿텧 @@ -2640,7 +2915,7 @@ Map<String, Priority> priorityMaps = new HashMap<>(); // �슦�꽑 �닚�쐞 紐⑥쓬 Map<String, Severity> severityMaps = new HashMap<>(); // 以묒슂�룄 紐⑥쓬 Map<String, Object> userMaps = new HashMap<>(); // �궗�슜�옄 紐⑥쓬 - Map<String, Object> departmentMaps = new HashMap<>(); // 遺��꽌 紐⑥쓬 + Map<String, DepartmentVo> departmentMaps = new HashMap<>(); // 遺��꽌 紐⑥쓬 Map<String, CustomField> customFieldMaps = new HashMap<>(); Map<String, IssueStatus> issueStatusReadyMaps = new HashMap<>(); // �긽�깭 �냽�꽦 '��湲�'�씤 �씠�뒋 �긽�깭 Map<Long, Long> issueNumberMaps = new HashMap<>(); // �씠�뒋 踰덊샇 紐⑥쓬 @@ -2690,7 +2965,7 @@ // 1踰� �뿤�뜑遺��꽣 �뜲�씠�꽣 �쁺�뿭 if (rowIndex > 1) { // �씠�뒋濡� �벑濡앺븯湲� �쐞�빐 IssueForm �뿉 �뜲�씠�꽣瑜� �뀑�똿�븳�떎. - issueForms.add(this.setIssueFormToExcelField(row, (rowIndex + 1), issueStatusReadyMaps, projectMaps, issueTypeMaps, priorityMaps, severityMaps, userMaps, customFieldMaps, issueNumberMaps, headers)); + issueForms.add(this.setIssueFormToExcelField(row, (rowIndex + 1), issueStatusReadyMaps, projectMaps, issueTypeMaps, priorityMaps, severityMaps, userMaps, departmentMaps, customFieldMaps, issueNumberMaps, headers)); } } @@ -2841,7 +3116,7 @@ // �씠�뒋�쓽 二쇱슂 �냽�꽦�쓣 map �뿉 ���옣�븯�뿬 �뿊�� import �뿉�꽌 吏��젙�븳 ���긽(�씠�뒋 �냽�꽦)�쓣 鍮좊Ⅴ寃� 李얠쓣 �닔 �엳寃� �븳�떎. private void IssueAttributeMapToList(Map<String, Project> projectMaps, Map<String, IssueType> issueTypeMaps, Map<String, Priority> priorityMaps, Map<String, Severity> severityMaps, - Map<String, Object> userMaps, Map<String, Object> departmentMaps, Map<String, CustomField> customFieldMaps, Map<Long, Long> issueNumberMaps, Map<String, Long> issueTypeCustomFieldMaps, Map<String, IssueStatus> issueStatusReadyMaps) { + Map<String, Object> userMaps, Map<String, DepartmentVo> departmentMaps, Map<String, CustomField> customFieldMaps, Map<Long, Long> issueNumberMaps, Map<String, Long> issueTypeCustomFieldMaps, Map<String, IssueStatus> issueStatusReadyMaps) { // �봽濡쒖젥�듃 �궎濡� 諛붾줈 李얠쓣 �닔 �엳寃� 以�鍮� List<Project> projects = this.projectService.findByWorkspaceId(); List<Long> projectIds = Lists.newArrayList(); @@ -2865,16 +3140,7 @@ for (Map<String, Object> user : users) { userMap.put(CommonUtil.decryptAES128(MapUtil.getString(user, "account")), MapUtil.getLong(user, "userId")); } - userMaps.put(project.getProjectKey(), userMap); - - // �봽濡쒖젥�듃�뿉 李몄뿬�븯�뒗 遺��꽌 �젙蹂� - List<Map<String, Object>> departments = this.departmentService.findProjectDepartment(project); - List<Long> departmentList = Lists.newArrayList(); - // 遺��꽌 �젙蹂대�� ���옣 - for (Map<String, Object> department : departments) { - departmentList.add(MapUtil.getLong(department, "departmentId")); - } } // �씠�뒋 �쑀�삎�쓣 諛붾줈 李얠쓣 �닔 �엳寃� 以�鍮� @@ -2884,6 +3150,13 @@ IssueStatus issueStatus = this.issueStatusService.findByIssueStatusTypeIsReady(issueType.getWorkflow()); issueStatusReadyMaps.put(issueType.getId().toString(), issueStatus); + + // �썙�겕�뵆濡쒖슦�뿉 �냽�빐�엳�뒗 遺��꽌 �젙蹂� + List<DepartmentVo> departments = this.departmentService.findWorkflowDepartment(issueType.getId()); + // 遺��꽌 �젙蹂대�� ���옣 + for (DepartmentVo department : departments) { + departmentMaps.put(department.getDepartmentName(), department); + } } // �슦�꽑�닚�쐞瑜� 諛붾줈 李얠쓣 �닔 �엳寃� 以�鍮� @@ -2907,7 +3180,7 @@ // �뿊�� �븘�뱶�뿉 �엳�뒗 �젙蹂대�� �씠�뒋 form �쑝濡� �삷湲대떎. private IssueForm setIssueFormToExcelField(Row row, int rowIndex, Map<String, IssueStatus> issueStatusReadyMaps, Map<String, Project> projectMaps, Map<String, IssueType> issueTypeMaps, Map<String, - Priority> priorityMaps, Map<String, Severity> severityMaps, Map<String, Object> userMaps, Map<String, CustomField> customFieldMaps, Map<Long, Long> issueNumberMaps, List<String> headers) { + Priority> priorityMaps, Map<String, Severity> severityMaps, Map<String, Object> userMaps, Map<String, DepartmentVo> departmentMaps, Map<String, CustomField> customFieldMaps, Map<Long, Long> issueNumberMaps, List<String> headers) { IssueForm issueForm = new IssueForm(); issueForm.setRegisterId(this.webAppUtil.getLoginId()); Project project = null; @@ -2951,9 +3224,13 @@ // 以묒슂�룄瑜� IssueForm �뿉 ���옣�븳�떎. this.setIssueFormSeverity(cell, severityMaps, issueForm, rowIndex); break; + /*case 6: + // �떞�떦�옄瑜� IssueForm �뿉 ���옣�븳�떎. + this.setIssueFormAssignee(cell, userMaps, issueForm, project); + break;*/ case 6: // �떞�떦遺��꽌瑜� IssueForm �뿉 ���옣�븳�떎. - this.setIssueFormAssignee(cell, userMaps, issueForm, project); + this.setIssueFormDepartment(cell, departmentMaps, issueForm, project); break; case 7: // �떆�옉�씪�쓣 IssueForm �뿉 ���옣�븳�떎. @@ -2964,7 +3241,7 @@ this.setIssueFormPeriod(cell, issueForm, false, rowIndex); break; default: - // 8踰� �씠�긽遺��꽣�뒗 �궗�슜�옄 �젙�쓽 �븘�뱶. �궗�슜�옄 �젙�쓽 �븘�뱶 �젙蹂대�� IssueForm �뿉 ���옣�븳�떎. + // 9踰� 遺��꽣�뒗 �궗�슜�옄 �젙�쓽 �븘�뱶. �궗�슜�옄 �젙�쓽 �븘�뱶 �젙蹂대�� IssueForm �뿉 ���옣�븳�떎. this.setIssueFormCustomFieldValue(cell, customFieldMaps, issueForm, headers.get(cellIndex), rowIndex); } } @@ -3093,20 +3370,39 @@ issueForm.setSeverityId(severity.getId()); } - // �떞�떦遺��꽌瑜� IssueForm �뿉 ���옣�븳�떎. private void setIssueFormAssignee(Cell cell, Map<String, Object> userMaps, IssueForm issueForm, Project project) { if (cell != null) { String[] splitAssignee = CommonUtil.convertExcelStringToCell(cell).split("#"); Map<String, Object> userMap = (Map<String, Object>) MapUtil.getObject(userMaps, project.getProjectKey()); - List<Long> departmentIds = Lists.newArrayList(); + List<Long> userIds = Lists.newArrayList(); for (String account : splitAssignee) { if (MapUtil.getLong(userMap, account) != null) { - departmentIds.add(MapUtil.getLong(userMap, account)); + userIds.add(MapUtil.getLong(userMap, account)); } } + issueForm.setUserIds(userIds); + } + } + // �떞�떦遺��꽌瑜� IssueForm �뿉 ���옣�븳�떎. + private void setIssueFormDepartment(Cell cell, Map<String, DepartmentVo> departmentMaps, IssueForm issueForm, Project project) { + if (cell != null) { + String[] splitDepartment = CommonUtil.convertExcelStringToCell(cell).split("#"); + + // 媛믪씠 怨듬갚�씠硫� 以묒� + String cellValue = CommonUtil.convertExcelStringToCell(cell); + if (StringUtils.isEmpty(cellValue)) { + return; + } + + List<Long> departmentIds = Lists.newArrayList(); + + for (String department : splitDepartment) { + DepartmentVo departmentVo = departmentMaps.get(department); + departmentIds.add(departmentVo.getId()); + } issueForm.setDepartmentIds(departmentIds); } } @@ -3114,6 +3410,12 @@ // �떆�옉�씪, 醫낅즺�씪�쓣 IssueForm �뿉 ���옣�븳�떎. private void setIssueFormPeriod(Cell cell, IssueForm issueForm, Boolean checkStartDate, int rowIndex) { if (cell != null && !cell.toString().equals("")) { + + // 媛믪씠 怨듬갚�씠硫� 以묒� + String cellValue = CommonUtil.convertExcelStringToCell(cell); + if (StringUtils.isEmpty(cellValue)) { + return; + } Date startDate; @@ -3516,4 +3818,17 @@ resJsonData.put(Constants.RES_KEY_CONTENTS, usePartnerVos); } } + + @Override + public void findReadyDepartments(Map<String, Object> resJsonData, DepartmentCondition condition, Pageable pageable) { + IssueType issueType = this.issueTypeService.getIssueType(condition.getIssueTypeId()); + if (issueType != null) { + // �씠�뒋 �긽�깭 �쑀�삎�씠 '��湲�' �씤 �씠�뒋 �긽�깭 媛��졇�삤湲� + IssueStatus issueStatus = this.issueStatusService.findByIssueStatusTypeIsReady(issueType.getWorkflow()); + condition.setIssueStatusId(issueStatus.getId()); + condition.setWorkflowId(issueType.getWorkflow().getId()); + } + List<Map<String, Object>> departmentVos = this.departmentMapper.findByIssueStatusId(condition); + resJsonData.put(Constants.RES_KEY_CONTENTS, departmentVos); + } } \ No newline at end of file -- Gitblit v1.8.0