이슈 - 담당부서 리스트 프로젝트에서 설정한 부서들만 보여지도록 수정
| | |
| | | Long countInDepartment(Long Id); |
| | | |
| | | List<Map<String, Object>> findByDepartmentIds(UserCondition condition); |
| | | |
| | | List<Map<String, Object>> findProjectDepartment(DepartmentCondition departmentCondition); |
| | | } |
| | |
| | | package kr.wisestone.owl.service; |
| | | |
| | | import kr.wisestone.owl.domain.Department; |
| | | import kr.wisestone.owl.domain.Project; |
| | | import kr.wisestone.owl.vo.DepartmentVo; |
| | | import kr.wisestone.owl.web.condition.DepartmentCondition; |
| | | import kr.wisestone.owl.web.condition.UserCondition; |
| | |
| | | boolean countInDepartment(Long id); |
| | | |
| | | List<Map<String, Object>> findByDepartmentIds( UserCondition condition); |
| | | |
| | | void findProjectDepartment(Map<String, Object> resJsonData, DepartmentCondition departmentCondition); |
| | | |
| | | List<Map<String, Object>> findProjectDepartment(Project project); |
| | | } |
| | |
| | | package kr.wisestone.owl.service.impl; |
| | | |
| | | import kr.wisestone.owl.domain.Department; |
| | | import kr.wisestone.owl.domain.UserDepartment; |
| | | import kr.wisestone.owl.domain.UserLevel; |
| | | import kr.wisestone.owl.domain.*; |
| | | import kr.wisestone.owl.mapper.DepartmentMapper; |
| | | import kr.wisestone.owl.service.UserDepartmentService; |
| | | import kr.wisestone.owl.service.UserService; |
| | | import kr.wisestone.owl.service.*; |
| | | import kr.wisestone.owl.util.CommonUtil; |
| | | import kr.wisestone.owl.web.condition.DepartmentCondition; |
| | | import kr.wisestone.owl.web.condition.UserCondition; |
| | | import kr.wisestone.owl.web.form.DepartmentForm; |
| | |
| | | import org.jsoup.Jsoup; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.ui.Model; |
| | | import com.google.common.collect.Lists; |
| | | import kr.wisestone.owl.common.ExcelConditionCheck; |
| | |
| | | import kr.wisestone.owl.constant.MsgConstants; |
| | | import kr.wisestone.owl.exception.OwlRuntimeException; |
| | | import kr.wisestone.owl.repository.DepartmentRepository; |
| | | import kr.wisestone.owl.service.DepartmentService; |
| | | import kr.wisestone.owl.service.WorkspaceService; |
| | | import kr.wisestone.owl.util.ConvertUtil; |
| | | import kr.wisestone.owl.vo.*; |
| | | import kr.wisestone.owl.web.view.ExcelView; |
| | |
| | | |
| | | @Autowired |
| | | private UserDepartmentService userDepartmentService; |
| | | |
| | | @Autowired |
| | | private ProjectRoleDepartmentService projectRoleDepartmentService; |
| | | |
| | | @Autowired |
| | | private ProjectRoleService projectRoleService; |
| | | |
| | | @Autowired |
| | | private WorkspaceService workspaceService; |
| | |
| | | this.departmentRepository.flush(); |
| | | } |
| | | |
| | | // 프로젝트에 참여하는 부서 정보를 조회한다. |
| | | @Override |
| | | @Transactional(readOnly = true) |
| | | public List<Map<String, Object>> findProjectDepartment(Project project) { |
| | | DepartmentCondition departmentCondition = new DepartmentCondition(); |
| | | departmentCondition.setProjectId(project.getId()); |
| | | return this.departmentMapper.findProjectDepartment(departmentCondition); |
| | | } |
| | | |
| | | // 프로젝트에 참여하는 부서 목록을 가져온다. |
| | | @Override |
| | | @Transactional(readOnly = true) |
| | | public void findProjectDepartment(Map<String, Object> resJsonData, DepartmentCondition departmentCondition) { |
| | | ProjectRole projectRole = this.projectRoleService.findByProjectIdAndRoleType(departmentCondition.getProjectId(), ProjectRole.TYPE_DEFAULT); |
| | | List<ProjectRoleDepartment> projectRoleDepartments = this.projectRoleDepartmentService.findByProjectRoleId(projectRole.getId()); |
| | | List<DepartmentVo> departmentVos = Lists.newArrayList(); |
| | | |
| | | for (ProjectRoleDepartment projectRoleDepartment : projectRoleDepartments) { |
| | | DepartmentVo departmentVo = ConvertUtil.copyProperties(projectRoleDepartment.getDepartment(), DepartmentVo.class); |
| | | departmentVo.setByName(departmentVo.getDepartmentName()); |
| | | departmentVos.add(departmentVo); |
| | | } |
| | | |
| | | resJsonData.put(Constants.RES_KEY_CONTENTS, departmentVos); |
| | | } |
| | | |
| | | |
| | | // 부서 목록을 엑셀로 다운로드 한다. |
| | | @Override |
| | |
| | | private UserService userService; |
| | | |
| | | @Autowired |
| | | private DepartmentService departmentService; |
| | | |
| | | @Autowired |
| | | private IssueCommentService issueCommentService; |
| | | |
| | | @Autowired |
| | |
| | | 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, CustomField> customFieldMaps = new HashMap<>(); |
| | | Map<String, IssueStatus> issueStatusReadyMaps = new HashMap<>(); // 상태 속성 '대기'인 이슈 상태 |
| | | Map<Long, Long> issueNumberMaps = new HashMap<>(); // 이슈 번호 모음 |
| | | Map<String, Long> issueTypeCustomFieldMaps = new HashMap<>(); // 이슈 타입 + 사용자 정의 필드 연결 정보 |
| | | Workspace workspace = this.workspaceService.getWorkspace(this.userService.getUser(this.webAppUtil.getLoginId()).getLastWorkspaceId()); // 이슈를 넣으려는 업무 공간 |
| | | // 이슈의 주요 속성을 map 에 저장하여 엑셀 import 에서 지정한 대상(이슈 속성)을 빠르게 찾을 수 있게 한다. |
| | | this.IssueAttributeMapToList(projectMaps, issueTypeMaps, priorityMaps, severityMaps, userMaps, customFieldMaps, issueNumberMaps, issueTypeCustomFieldMaps, issueStatusReadyMaps); |
| | | this.IssueAttributeMapToList(projectMaps, issueTypeMaps, priorityMaps, severityMaps, userMaps, departmentMaps, customFieldMaps, issueNumberMaps, issueTypeCustomFieldMaps, issueStatusReadyMaps); |
| | | // 0.237 - 0.230 |
| | | |
| | | List<IssueForm> issueForms = Lists.newArrayList(); |
| | |
| | | |
| | | // 이슈의 주요 속성을 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, CustomField> customFieldMaps, Map<Long, Long> issueNumberMaps, Map<String, Long> issueTypeCustomFieldMaps, Map<String, IssueStatus> issueStatusReadyMaps) { |
| | | Map<String, Object> userMaps, Map<String, Object> 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(); |
| | |
| | | } |
| | | |
| | | 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")); |
| | | } |
| | | } |
| | | |
| | | // 이슈 유형을 바로 찾을 수 있게 준비 |
| | |
| | | private String departmentName; |
| | | private String departmentDescription; |
| | | private Long departmentCount; |
| | | private Long projectId; |
| | | |
| | | private List<Long> excludeIds = Lists.newArrayList(); |
| | | |
| | |
| | | this.departmentCount = departmentCount; |
| | | } |
| | | |
| | | public Long getProjectId() { |
| | | return projectId; |
| | | } |
| | | |
| | | public void setProjectId(Long projectId) { |
| | | this.projectId = projectId; |
| | | } |
| | | |
| | | public Integer getPage() { |
| | | return Page; |
| | | } |
| | |
| | | import kr.wisestone.owl.constant.Constants; |
| | | import kr.wisestone.owl.service.DepartmentService; |
| | | import kr.wisestone.owl.web.condition.DepartmentCondition; |
| | | import kr.wisestone.owl.web.condition.UserCondition; |
| | | import kr.wisestone.owl.web.form.DepartmentForm; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.domain.Pageable; |
| | |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | | |
| | | // 프로젝트에 참여하는 부서 목록 조회 |
| | | @RequestMapping(value = "/department/findProjectDepartment", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) |
| | | public |
| | | @ResponseBody |
| | | Map<String, Object> findProjectDepartment(@RequestBody Map<String, Map<String, Object>> params) { |
| | | Map<String, Object> resJsonData = new HashMap<>(); |
| | | |
| | | this.departmentService.findProjectDepartment(resJsonData, DepartmentCondition.make(params.get(Constants.REQ_KEY_CONTENT))); |
| | | |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | | |
| | | |
| | | // 부서 엑셀 다운로드 |
| | | @RequestMapping(value = "/department/downloadExcel", method = RequestMethod.POST) |
| | |
| | | </choose> |
| | | </select> |
| | | |
| | | <select id="findProjectDepartment |
| | | " resultType="java.util.HashMap" |
| | | parameterType="kr.wisestone.owl.web.condition.UserCondition"> |
| | | select DISTINCT (d.id) as departmentId, d.department_name as departmentName from department d |
| | | inner join project_role_department prd on prd.department_id = d.id |
| | | inner join project_role pr on pr.id = prd.project_role_id |
| | | inner join project p on p.id = pr.project_id |
| | | where p.id = #{projectId}; |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | |
| | | // 함수 모음 |
| | | $scope.fn = { |
| | | projectMember : projectMember // 프로젝트 팀원 확인 팝업 호출 |
| | | //projectMember : projectMember // 프로젝트 팀원 확인 팝업 호출 |
| | | projectDepartment : projectDepartment // 프로젝트 부서 확인 팝업 호출 |
| | | }; |
| | | |
| | | // 진행 중인 프로젝트 현황 정보가 변경될때 감지한다. |
| | |
| | | }); |
| | | |
| | | // 프로젝트 팀원 확인 팝업 호출 |
| | | function projectMember(id) { |
| | | /*function projectMember(id) { |
| | | $uibModal.open({ |
| | | templateUrl : '../custom_components/widget/project-progress-widget/projectMemberList.html', |
| | | size : "md", |
| | |
| | | } |
| | | } |
| | | }); |
| | | }*/ |
| | | |
| | | function projectDepartment(id) { |
| | | $uibModal.open({ |
| | | templateUrl : '../custom_components/widget/project-progress-widget/projectDepartmentList.html', |
| | | size : "md", |
| | | controller : 'projectDepartmentListController', |
| | | backdrop : 'static', |
| | | resolve : { |
| | | parameter : function () { |
| | | return { |
| | | id : id |
| | | }; |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | link : function (scope, element, attrs) { |
New file |
| | |
| | | /** |
| | | * Created by wisestone on 2018-11-06. |
| | | */ |
| | | /** |
| | | * Created by wisestone on 2017-12-15. |
| | | */ |
| | | 'use strict'; |
| | | |
| | | define([ |
| | | 'app' |
| | | ], |
| | | function (app) { |
| | | app.controller('projectDepartmentListController', ['$scope', '$rootScope', '$log', '$resourceProvider', '$uibModalInstance', 'SweetAlert', '$stateParams', '$q', 'parameter', 'Department', '$filter', |
| | | function ($scope, $rootScope, $log, $resourceProvider, $uibModalInstance, SweetAlert, $stateParams, $q, parameter, Department, $filter) { |
| | | |
| | | $scope.vm = { |
| | | departmentVos : [] // 프로젝트 일반 참여자 |
| | | }; |
| | | |
| | | $scope.fn = { |
| | | cancel : cancel, // 팝업 창 닫기 |
| | | getProjectDepartments : getProjectDepartments // 프로젝트 참여 부서 목록 조회 |
| | | }; |
| | | |
| | | // 팝업 창 닫기 |
| | | function cancel() { |
| | | $rootScope.$broadcast("closeLayer"); // 팝업이 열리고 나서 js-multi, js-single 등에서 body 이벤트가 날아가는 현상 수정 |
| | | $uibModalInstance.dismiss('cancel'); |
| | | } |
| | | |
| | | // 프로젝트 참여 부서 목록 조회 |
| | | function getProjectDepartments() { |
| | | Department.findProjectDepartment($resourceProvider.getContent({ |
| | | projectId : parameter.id |
| | | }, |
| | | $resourceProvider.getPageContent(0, 0))).then(function (result) { |
| | | |
| | | if (result.data.message.status === "success") { |
| | | $scope.vm.departmentVos = result.data.data; |
| | | } |
| | | else { |
| | | SweetAlert.swal($filter("translate")("project.failedToProjectDepartment"), result.data.message.message, "error"); // "프로젝트 멤버 조회 실패" |
| | | } |
| | | }); |
| | | } |
| | | |
| | | // 프로젝트 일반 참여자 목록 조회 |
| | | $scope.fn.getProjectDepartments(); |
| | | |
| | | }]); |
| | | }); |
New file |
| | |
| | | <div class="formModal"> |
| | | <div class="modal-header faded smaller"> |
| | | <div class="modal-title"> |
| | | <strong><span translate="project.projectDepartment">프로젝트 부서</span></strong> |
| | | </div> |
| | | <button aria-label="Close" class="close" type="button" ng-click="fn.cancel()"> |
| | | <span aria-hidden="true"> ×</span> |
| | | </button> |
| | | </div> |
| | | |
| | | <div class="modal-body"> |
| | | <div class="select3-selection__choicediv mt-10"> |
| | | <span class="select3-selection__choice" ng-repeat="departmentVo in vm.departmentVos"> |
| | | <span>{{departmentVo.name}}</span> |
| | | </span> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="modal-footer buttons-on-right"> |
| | | <button type="button" class="btn btn-md btn-grey" ng-click="fn.cancel()"><span translate="common.close">닫기</span></button> |
| | | </div> |
| | | </div> |
| | |
| | | "failedToModifyProject": "프로젝트 수정 실패", |
| | | "failedToProjectDetails": "프로젝트 상세 정보 조회 실패", |
| | | "failedToProjectMember": "프로젝트 멤버 조회 실패", |
| | | "failedToProjectDepartment": "프로젝트 부서 조회 실패", |
| | | "failedToProjectKeyPattern": "프로젝트 키 입력 값이 잘못되었습니다.", |
| | | "limitNameToSpecialCharacters": "프로젝트 명은 특수 문자를 입력할 수 없습니다.", |
| | | "viewSub": "하위 프로젝트 보기", |
| | |
| | | var deferred = $q.defer(); |
| | | require(["widgetDashBoardController", "widgetService", "tableUserImage", "d3", "nvd3", "issueCompleteWidget", "issueStatusWidget", "myAssigneeIssueWidget", "issueTypeWidget", |
| | | "delayIssueWidget", "registerIssueWidget", "riskIssueWidget", "myIssueWidget", "memberProgressWidget", "projectProgressWidget", "issueStatisticsWidget", "severityIssueWidget", |
| | | "workflowWidget", "projectMemberListController", "jsWorkflowDisabled", 'd3', 'formSubmit'], function () { |
| | | "workflowWidget", "projectMemberListController", "projectDepartmentListController", "jsWorkflowDisabled", 'd3', 'formSubmit'], function () { |
| | | deferred.resolve(); |
| | | }); |
| | | |
| | |
| | | return response; |
| | | }); |
| | | }, |
| | | findProjectDepartment : function (conditions) { |
| | | return $http.post("department/findProjectDepartment", conditions).then(function (response) { |
| | | $log.debug("프로젝트에 참여하는 부서 목록 조회 : ", response); |
| | | return response; |
| | | }); |
| | | }, |
| | | |
| | | //사용자 관리 |
| | | find : function (conditions) { |
| | |
| | | var conditions = { |
| | | departmentName : query, |
| | | userId : $rootScope.user.id, |
| | | projectId : (function () { |
| | | var projectId = ""; |
| | | |
| | | if ($rootScope.isDefined($scope.vm.form)) { |
| | | angular.forEach($scope.vm.form.projects, function (project) { |
| | | projectId = project.id; |
| | | }); |
| | | } |
| | | |
| | | return projectId; |
| | | })(), |
| | | excludeIds : (function () { |
| | | var excludeIds = []; |
| | | |
| | |
| | | |
| | | |
| | | |
| | | UserWorkspace.departmentFind($resourceProvider.getContent( // 페이징 업데이트가 필요한 컴포넌트 일경우, page 업데이트가 있을 경우 기본 10개씩 가져오고 아닐경우 25개씩 가져온다. |
| | | UserWorkspace.findProjectDepartment($resourceProvider.getContent( // 페이징 업데이트가 필요한 컴포넌트 일경우, page 업데이트가 있을 경우 기본 10개씩 가져오고 아닐경우 25개씩 가져온다. |
| | | conditions, $resourceProvider.getPageContent($rootScope.isDefined(page) ? page : 0, $rootScope.isDefined(page) ? 10 : 25))).then(function (result) { |
| | | if (result.data.message.status === "success") { |
| | | if ($rootScope.isDefined(callBack)) { |
| | |
| | | 'memberProgressWidget' : '../custom_components/widget/member-progress-widget/member-progress-widget.directive', // 멤버별 진행률 차트를 넣는데 사용한다. |
| | | 'projectProgressWidget' : '../custom_components/widget/project-progress-widget/project-progress-widget.directive', // 진행 중인 프로젝트 현황 차트를 넣는데 사용한다. |
| | | 'projectMemberListController' : '../custom_components/widget/project-progress-widget/projectMemberList.controller', // 진행 중인 프로젝트 현황 차트에서 팀원 확인에 사용한다. |
| | | 'projectDepartmentListController' : '../custom_components/widget/project-progress-widget/projectDepartmentList.controller', |
| | | 'issueStatisticsWidget' : '../custom_components/widget/issue-statistics-widget/issue-statistics-widget.directive', // 전체 이슈 현황 차트를 넣는데 사용한다. |
| | | 'workflowWidget' : '../custom_components/widget/workflow-widget/workflow-widget.directive', // 워크플로우 차트를 넣는데 사용한다. |
| | | 'issueTypeWidget' : '../custom_components/widget/issue-type-widget/issue-type-widget.directive', // 이슈 타입 별 이슈 현황 차트를 넣는데 사용한다. |