| | |
| | | List<Map<String, Object>> findEvent(); |
| | | |
| | | Long findByLevelId(Long levelId); |
| | | |
| | | Map<String, Object> findByMyLevelAndDepartment(Long id); |
| | | } |
| | |
| | | |
| | | void detailUser(Map<String, Object> resJsonData, UserCondition userCondition); |
| | | |
| | | void findMyLevelAndDepartment(Map<String, Object> resJsonData); |
| | | |
| | | void modifyUser(UserForm userForm, MultipartFile profile); |
| | | |
| | | void modifyPassword(UserForm userForm); |
| | |
| | | import kr.wisestone.owl.util.*; |
| | | import kr.wisestone.owl.vo.*; |
| | | import kr.wisestone.owl.web.condition.UserCondition; |
| | | import kr.wisestone.owl.web.form.DepartmentForm; |
| | | import kr.wisestone.owl.web.form.UserForm; |
| | | import kr.wisestone.owl.web.view.ExcelView; |
| | | import org.apache.commons.validator.routines.EmailValidator; |
| | |
| | | return this.convertUserVoToMap(results, totalUsersCount, pageable, resJsonData); |
| | | } |
| | | |
| | | // 사용자 정보를 가져온다. |
| | | @Override |
| | | @Transactional(readOnly = true) |
| | | public void findMyLevelAndDepartment(Map<String, Object> resJsonData) { |
| | | Long loginId = this.webAppUtil.getLoginId(); |
| | | Map<String, Object> result = this.userMapper.findByMyLevelAndDepartment(loginId); |
| | | resJsonData.put(Constants.RES_KEY_CONTENTS, result); |
| | | } |
| | | |
| | | // 사용자 아이디로 사용자를 조회한다. |
| | | @Override |
| | | @Transactional(readOnly = true) |
| | |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | | |
| | | // 사용자 조회 |
| | | @RequestMapping(value = "/user/findMyLevelAndDepartment", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) |
| | | public |
| | | @ResponseBody |
| | | Map<String, Object> findMyLevelAndDepartment(@RequestBody Map<String, Map<String, Object>> params) { |
| | | Map<String, Object> resJsonData = new HashMap<>(); |
| | | this.userService.findMyLevelAndDepartment(resJsonData); |
| | | return this.setSuccessMessage(resJsonData); |
| | | } |
| | | |
| | | // 사용자 수정 |
| | | @RequestMapping(value = "/user/modify", produces = MediaType.APPLICATION_JSON_VALUE) |
| | | public |
| | |
| | | WHERE u.level_id = #{id} |
| | | </select> |
| | | |
| | | <select id="findByMyLevelAndDepartment" resultType="java.util.HashMap" parameterType="java.lang.Long"> |
| | | SELECT |
| | | DISTINCT u.id as id, |
| | | ul.level_name AS levelName, |
| | | GROUP_CONCAT(d.department_name) AS departmentName, |
| | | u.name as name, |
| | | u.account as account, |
| | | u.profile as profile, |
| | | u.status as STATUS |
| | | FROM user u |
| | | LEFT OUTER JOIN user_level ul ON u.level_id = ul.id |
| | | LEFT OUTER JOIN user_department ud ON ud.user_id = u.id |
| | | LEFT OUTER JOIN department d ON d.id = ud.department_id |
| | | WHERE u.id = #{id} |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | "guidanceTemporaryPassword": "임시 비밀번호 발급 안내", |
| | | "pleaseMakeSureChangeYourPassword": "고객님의 OWL ITS 계정 비밀번호 변경을 위해 임시 비밀번호를 발급해 드립니다.로그인 후 꼭 비밀번호를 변경하시기 바랍니다.", |
| | | "phoneNumber": "연락처", |
| | | "myLevel": "등급", |
| | | "myDepartments": "담당부서", |
| | | "modifyInformation": "정보 수정", |
| | | "updatePassword": "비밀번호 변경", |
| | | "setEmailNotificationTime": "이메일 알림 시간 설정", |
| | |
| | | 'app' |
| | | ], |
| | | function (app) { |
| | | app.controller('userDetailController', ['$scope', '$rootScope', '$log', '$resourceProvider', '$tableProvider', 'IssueHistory', '$uibModal', 'SweetAlert', '$filter', |
| | | function ($scope, $rootScope, $log, $resourceProvider, $tableProvider, IssueHistory, $uibModal, SweetAlert, $filter) { |
| | | app.controller('userDetailController', ['$scope', '$rootScope', '$log', '$resourceProvider', '$tableProvider', 'IssueHistory', '$uibModal', 'SweetAlert', '$filter', 'User', |
| | | function ($scope, $rootScope, $log, $resourceProvider, $tableProvider, IssueHistory, $uibModal, SweetAlert, $filter, User) { |
| | | |
| | | // 함수 |
| | | $scope.fn = { |
| | | getMyInfo : getMyInfo, //나의 정보 조회(등급, 담당부서) |
| | | getIssueHistoryList : getIssueHistoryList, // 이슈 기록 정보 조회 |
| | | modify : modify, // 사용자 수정 |
| | | changeSearchPeriod : changeSearchPeriod, // 이력 조회 검색 조건 변경 |
| | |
| | | startEndDateRange : "" // 이슈 기록 조회 날짜 |
| | | }, |
| | | issueHistoryVos : [], // 이슈 기록 정보 |
| | | issueHistoryDates : [] // 이슈 기록 정보 날짜 |
| | | issueHistoryDates : [], // 이슈 기록 정보 날짜 |
| | | myLevel : "", |
| | | myDepartments : [] |
| | | }; |
| | | |
| | | // 직접 입력에서 날짜 선택시 이슈 기록 정보 조회 |
| | |
| | | id : id |
| | | }; |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | // 나의 정보 조회(등급, 담당부서) |
| | | function getMyInfo() { |
| | | |
| | | User.findMyLevelAndDepartment($resourceProvider.getContent( |
| | | $resourceProvider.getPageContent(0, 0))).then(function (result) { |
| | | |
| | | if (result.data.message.status === "success") { |
| | | $scope.vm.myLevel = result.data.data.levelName; |
| | | $scope.vm.myDepartments = result.data.data.departmentName; |
| | | } |
| | | else { |
| | | SweetAlert.swal($filter("translate")("users.failedToRetrieveIssueHistory"), result.data.message.message, "error"); // "이슈 기록 정보 조회 실패" |
| | | } |
| | | }); |
| | | } |
| | |
| | | |
| | | // 이슈 기록 정보 조회 |
| | | $scope.fn.getIssueHistoryList(); |
| | | |
| | | $scope.fn.getMyInfo(); |
| | | } |
| | | ]); |
| | | } |
| | |
| | | return response; |
| | | }); |
| | | }, |
| | | findMyLevelAndDepartment : function (conditions) { |
| | | return $http.post("user/findMyLevelAndDepartment", conditions).then(function (response) { |
| | | $log.debug("내 정보 데이터 : ", response); |
| | | return response; |
| | | }); |
| | | }, |
| | | modify : function (conditions) { |
| | | conditions.url = "user/modify"; |
| | | return $upload.upload(conditions).then(function (response) { |
| | |
| | | <div class="user-sub" ng-if="$root.isDefined($root.user.phone)"> |
| | | <span translate="users.phoneNumber">연락처</span> : {{$root.user.phone}} |
| | | </div> |
| | | <div class="user-sub" ng-if="vm.myLevel != null"> |
| | | <span translate="users.myLevel">등급</span> : {{vm.myLevel}} |
| | | </div> |
| | | <div class="user-sub" ng-if="vm.myDepartments != null"> |
| | | <span translate="users.myDepartments">담당부서</span> : {{vm.myDepartments}} |
| | | </div> |
| | | <div class="mt-30"> |
| | | <a class="btn btn-primary btn-sm" href="" ng-click="fn.modify($root.user.id)"> |
| | | <i class="os-icon os-icon-edit-1"></i> |