| | |
| | | public List<UserWorkspaceVo> findUserWorkspace(Map<String, Object> resJsonData, |
| | | UserWorkspaceCondition condition, Pageable pageable) { |
| | | |
| | | UserWorkspace userWorkspace = this.findMyWorkspace(this.webAppUtil.getLoginId()); |
| | | UserWorkspace userWorkspace = this.findMyWorkspace(this.webAppUtil.getLoginId()); //로그인한 아이디 |
| | | Workspace myWorkspace = userWorkspace.getWorkspace(); |
| | | condition.setPage(pageable.getPageNumber() * pageable.getPageSize()); |
| | | condition.setPageSize(pageable.getPageSize()); |
| | |
| | | @Autowired |
| | | private UserWorkspaceService userWorkspaceService; |
| | | |
| | | // 사용자 등급 조회 |
| | | @RequestMapping(value = "/userWorkspace/levelFind", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) |
| | | public |
| | | @ResponseBody |
| | | Map<String, Object> levelFind(@RequestBody Map<String, Map<String, Object>> params) { |
| | | Map<String, Object> resJsonData = new HashMap<>(); |
| | | Pageable pageable = this.pageUtil.convertPageable(this.getPageVo(params)); |
| | | |
| | | this.userWorkspaceService.findUserWorkspace(resJsonData, UserWorkspaceCondition.make(params.get(Constants.REQ_KEY_CONTENT)), pageable); |
| | | //this.userWorkspaceService.levelFind(resJsonData, UserWorkspaceCondition.make(params.get(Constants.REQ_KEY_CONTENT)), pageable); |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | | |
| | | // 부서 조회 |
| | | @RequestMapping(value = "/userWorkspace/departmentFind", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) |
| | | public |
| | | @ResponseBody |
| | | Map<String, Object> departmentFind(@RequestBody Map<String, Map<String, Object>> params) { |
| | | Map<String, Object> resJsonData = new HashMap<>(); |
| | | Pageable pageable = this.pageUtil.convertPageable(this.getPageVo(params)); |
| | | |
| | | this.userWorkspaceService.findUserWorkspace(resJsonData, UserWorkspaceCondition.make(params.get(Constants.REQ_KEY_CONTENT)), pageable); |
| | | //this.userWorkspaceService.departmentFind(resJsonData, UserWorkspaceCondition.make(params.get(Constants.REQ_KEY_CONTENT)), pageable); |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | | |
| | | // 업무공간에 참여하는 사용자 조회 |
| | | @RequestMapping(value = "/userWorkspace/find", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) |
| | | public |
| | |
| | | @Autowired |
| | | private WorkspaceService workspaceService; |
| | | |
| | | // 사용자 등급 조회 |
| | | @RequestMapping(value = "/workspace/levelFind", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) |
| | | public |
| | | @ResponseBody |
| | | Map<String, Object> levelFind() { |
| | | Map<String, Object> resJsonData = new HashMap<>(); |
| | | this.workspaceService.find(resJsonData); |
| | | //this.workspaceService.levelFind(resJsonData); |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | | |
| | | // 부서 조회 |
| | | @RequestMapping(value = "/workspace/departmentFind", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) |
| | | public |
| | | @ResponseBody |
| | | Map<String, Object> departmentFind() { |
| | | Map<String, Object> resJsonData = new HashMap<>(); |
| | | this.workspaceService.find(resJsonData); |
| | | //this.workspaceService.departmentFind(resJsonData); |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | | |
| | | // 사용자 관리 조회 |
| | | @RequestMapping(value = "/workspace/find", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) |
| | |
| | | $scope.fn = { |
| | | changeTab : changeTab, // 탭 변경 |
| | | findMyWorkspace : findMyWorkspace, // 내가 관리하는 업무 공간 정보 |
| | | findUserLevel : findUserLevel, // 사용자 등급 |
| | | findDepartment : findDepartment // 부서 |
| | | }; |
| | | |
| | | $scope.vm = { |
| | |
| | | $scope.fn.findMyWorkspace(); |
| | | }); |
| | | |
| | | // 사용자 등급 정보 갱신 |
| | | $scope.$on("findUserLevel", function () { |
| | | $scope.fn.findUserLevel(); |
| | | }); |
| | | |
| | | // 부서 정보 갱신 |
| | | $scope.$on("findDepartment", function () { |
| | | $scope.fn.findDepartment(); |
| | | }); |
| | | |
| | | // 탭 변경 |
| | | function changeTab(tab) { |
| | | $scope.vm.tab = tab; |
| | |
| | | $scope.fn.findMyWorkspace(); |
| | | $scope.$broadcast("getUserWorkspaceList"); |
| | | }else if (tab === "USER_LEVEL_CONFIG") { |
| | | //$scope.fn.findMyWorkspace(); |
| | | $scope.fn.findUserLevel(); |
| | | $scope.$broadcast("getUserLevelList"); |
| | | }else if (tab === "DEPARTMENT_CONFIG") { |
| | | //$scope.fn.findMyWorkspace(); |
| | | $scope.fn.findDepartment(); |
| | | $scope.$broadcast("getDepartmentList"); |
| | | } |
| | | } |
| | |
| | | }); |
| | | } |
| | | $scope.fn.findMyWorkspace(); |
| | | |
| | | // 사용자 등급을 조회한다. |
| | | function findUserLevel() { |
| | | Workspace.findUserLevel($resourceProvider.getContent( |
| | | {}, |
| | | $resourceProvider.getPageContent(0, 0))).then(function (result) { |
| | | if (result.data.message.status === "success") { |
| | | if (result.data.data != null) { |
| | | /*$scope.vm.workspaceVo = result.data.data; |
| | | // 참여 가능 사용자 수 |
| | | $scope.vm.workspaceVo.includeUserCount = $scope.vm.workspaceVo.maxUser - $scope.vm.workspaceVo.activeUser;*/ |
| | | |
| | | /*if ($scope.vm.workspaceVo.includeUserCount < 0) { |
| | | $scope.vm.workspaceVo.includeUserCount = 0; |
| | | }*/ |
| | | } |
| | | } |
| | | else { |
| | | SweetAlert.error($filter("translate")("managementWorkspace.failedToSelectWorkspaceInformation"), result.data.message.message); // "자신이 관리하는 업무 공간 정보 조회 실패" |
| | | } |
| | | }); |
| | | } |
| | | $scope.fn.findUserLevel(); |
| | | |
| | | // 부서를 조회한다. |
| | | function findDepartment() { |
| | | Workspace.findDepartment($resourceProvider.getContent( |
| | | {}, |
| | | $resourceProvider.getPageContent(0, 0))).then(function (result) { |
| | | if (result.data.message.status === "success") { |
| | | if (result.data.data != null) { |
| | | /*$scope.vm.workspaceVo = result.data.data; |
| | | // 참여 가능 사용자 수 |
| | | $scope.vm.workspaceVo.includeUserCount = $scope.vm.workspaceVo.maxUser - $scope.vm.workspaceVo.activeUser;*/ |
| | | |
| | | /*if ($scope.vm.workspaceVo.includeUserCount < 0) { |
| | | $scope.vm.workspaceVo.includeUserCount = 0; |
| | | }*/ |
| | | } |
| | | } |
| | | else { |
| | | SweetAlert.error($filter("translate")("managementWorkspace.failedToSelectWorkspaceInformation"), result.data.message.message); // "자신이 관리하는 업무 공간 정보 조회 실패" |
| | | } |
| | | }); |
| | | } |
| | | $scope.fn.findDepartment(); |
| | | } |
| | | ]); |
| | | } |
| | |
| | | description : $rootScope.preventXss($scope.vm.form.description) |
| | | }; |
| | | |
| | | Workspace.departmentAdd($resourceProvider.getContent( |
| | | UserWorkspace.departmentAdd($resourceProvider.getContent( |
| | | content, |
| | | $resourceProvider.getPageContent(0, 10))).then(function (result) { |
| | | |
| | |
| | | // 테이블 이벤트 |
| | | $scope.vm.tableEvent = { |
| | | // modifyUserWorkspace : modifyUserWorkspace // 업무 공간 참여하는 사용자의 참여 상태 변경 |
| | | view : view |
| | | }; |
| | | |
| | | // 부서 관리 리스트 불러오기 |
| | |
| | | }; |
| | | |
| | | //테이블 리스트 데이터 컨트롤러 요청 |
| | | //UserWorkspace.findDepartment($resourceProvider.getContent(conditions, |
| | | UserWorkspace.departmentFind($resourceProvider.getContent(conditions, |
| | | $resourceProvider.getPageContent(currentPage, $scope.vm.page.selectedPageRowCount))).then(function (result) { |
| | | |
| | |
| | | description : $rootScope.preventXss($scope.vm.form.description) |
| | | }; |
| | | |
| | | Workspace.levelAdd($resourceProvider.getContent( |
| | | UserWorkspace.levelAdd($resourceProvider.getContent( |
| | | content, |
| | | $resourceProvider.getPageContent(0, 10))).then(function (result) { |
| | | |
| | |
| | | // 테이블 이벤트 |
| | | $scope.vm.tableEvent = { |
| | | // modifyUserWorkspace : modifyUserWorkspace // 업무 공간 참여하는 사용자의 참여 상태 변경 |
| | | view : view |
| | | }; |
| | | |
| | | // 사용자 등급 리스트 불러오기 |
| | |
| | | }; |
| | | |
| | | //테이블 리스트 데이터 컨트롤러 요청 |
| | | //UserWorkspace.findLevel($resourceProvider.getContent(conditions, |
| | | Workspace.levelFind($resourceProvider.getContent(conditions, |
| | | UserWorkspace.levelFind($resourceProvider.getContent(conditions, |
| | | $resourceProvider.getPageContent(currentPage, $scope.vm.page.selectedPageRowCount))).then(function (result) { |
| | | |
| | | if (result.data.message.status === "success") { |
| | |
| | | define(['app'], function (app) { |
| | | app.factory("UserWorkspace", ['$http', '$log', function ($http, $log) { |
| | | return { |
| | | levelFind : function (conditions) { |
| | | return $http.post("userWorkspace/levelFind", conditions).then(function (response) { |
| | | $log.debug("사용자 등급 목록 : ", response); |
| | | return response; |
| | | }); |
| | | }, |
| | | departmentFind : function (conditions) { |
| | | return $http.post("userWorkspace/departmentFind", conditions).then(function (response) { |
| | | $log.debug("부서 목록 : ", response); |
| | | return response; |
| | | }); |
| | | }, |
| | | levelAdd : function (conditions) { |
| | | return $http.post("userWorkspace/levelAdd", conditions).then(function (response) { |
| | | $log.debug("사용자 등급 생성 결과 : ", response); |
| | | return response; |
| | | }); |
| | | }, |
| | | departmentAdd : function (conditions) { |
| | | return $http.post("userWorkspace/departmentAdd", conditions).then(function (response) { |
| | | $log.debug("부서 생성 결과 : ", response); |
| | | return response; |
| | | }); |
| | | }, |
| | | find : function (conditions) { |
| | | return $http.post("userWorkspace/find", conditions).then(function (response) { |
| | | $log.debug("워크스페이스에 참여하는 전체 사용자 목록 : ", response); |
| | |
| | | ], function (app) { |
| | | app.factory("Workspace", ['$http', '$log', function ($http, $log) { |
| | | return { |
| | | levelFind : function (conditions) { |
| | | return $http.post("workspace/levelFind", conditions).then(function (response) { |
| | | $log.debug("사용자 등급 목록 : ", response); |
| | | return response; |
| | | }); |
| | | }, |
| | | departmentFind : function (conditions) { |
| | | return $http.post("workspace/departmentFind", conditions).then(function (response) { |
| | | $log.debug("부서 목록 : ", response); |
| | | return response; |
| | | }); |
| | | }, |
| | | find : function (conditions) { |
| | | return $http.post("workspace/find", conditions).then(function (response) { |
| | | $log.debug("업무공간 목록 데이터 : ", response); |
| | | return response; |
| | | }); |
| | | }, |
| | | levelAdd : function (conditions) { |
| | | return $http.post("workspace/levelAdd", conditions).then(function (response) { |
| | | $log.debug("사용자 등급 생성 결과 : ", response); |
| | | return response; |
| | | }); |
| | | }, |
| | | departmentAdd : function (conditions) { |
| | | return $http.post("workspace/departmentAdd", conditions).then(function (response) { |
| | | $log.debug("부서 생성 결과 : ", response); |
| | | return response; |
| | | }); |
| | | }, |
| | |
| | | findMyWorkspace : function (conditions) { |
| | | return $http.post("workspace/findMyWorkspace", conditions).then(function (response) { |
| | | $log.debug("자신이 관리하는 업무공간 정보 결과 : ", response); |
| | | return response; |
| | | }); |
| | | }, |
| | | findUserLevel : function (conditions) { //사용자 등급 |
| | | return $http.post("workspace/levelFind", conditions).then(function (response) { |
| | | $log.debug("사용자 등급 정보 결과 : ", response); |
| | | return response; |
| | | }); |
| | | }, |
| | | findDepartment : function (conditions) { //부서 |
| | | return $http.post("workspace/departmentFind", conditions).then(function (response) { |
| | | $log.debug("사용자 등급 정보 결과 : ", response); |
| | | return response; |
| | | }); |
| | | }, |