| | |
| | | employee = employeeService.getEmployee(employeeId); |
| | | } |
| | | if (employee == null && userId != null) { |
| | | // 约定 user_id 存 system_users.id;但历史上前端也有把「员工主键」塞进 userId 的情况,两种都兼容 |
| | | employee = employeeService.getEmployeeByUserId(userId); |
| | | if (employee == null) { |
| | | employee = employeeService.getEmployee(userId); |
| | | } |
| | | } |
| | | if (userId == null && employee != null) { |
| | | userId = employee.getUserId(); |
| | |
| | | } |
| | | HrmTransferApplicationRespVO respVO = BeanUtils.toBean(application, HrmTransferApplicationRespVO.class); |
| | | if (application.getUserId() != null) { |
| | | // 注意:hrm_transfer_application.user_id 存的是 system_users.id, |
| | | // 必须用 getEmployeeByUserId 查档案;用 getEmployee(userId) 会按员工主键查,属于 id 混用 |
| | | // user_id 正常存 system_users.id;历史数据也有存「员工主键」的,两种都兼容 |
| | | HrmEmployeeDO employee = employeeService.getEmployeeByUserId(application.getUserId()); |
| | | if (employee == null) { |
| | | employee = employeeService.getEmployee(application.getUserId()); |
| | | } |
| | | if (employee != null) { |
| | | respVO.setUserName(employee.getName()); |
| | | respVO.setEmployeeId(employee.getId()); |