| | |
| | | import cc.mrbird.febs.server.hr.annotation.ControllerEndpoint; |
| | | import cc.mrbird.febs.server.hr.entity.EmpDimissionLog; |
| | | import cc.mrbird.febs.server.hr.entity.EmpJobChange; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.wuwenze.poi.ExcelKit; |
| | | |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | |
| | | throw new FebsException("已存在此员工编号"); |
| | | } |
| | | try { |
| | | //EmpBaseInfo tempInfo = this.empBaseInfoService. |
| | | this.empBaseInfoService.createEmpBaseInfo(empBaseinfo); |
| | | } catch (Exception e) { |
| | | String message = "新增员工基本信息失败"; |
| | |
| | | throw new FebsException(message); |
| | | } |
| | | } |
| | | |
| | | @GetMapping("options") |
| | | public FebsResponse roles() { |
| | | QueryWrapper<EmpBaseInfo> wrapper=new QueryWrapper(); |
| | | wrapper.eq("empStatus",0); |
| | | wrapper.eq("delFlag",0); |
| | | wrapper.orderByDesc("createTime"); |
| | | List<EmpBaseInfo> allRoles = empBaseInfoService.list(wrapper); |
| | | return new FebsResponse().data(allRoles); |
| | | } |
| | | @ApiOperation(value = "导出员工") |
| | | @RequestMapping(value = "export",method= RequestMethod.POST) |
| | | @ControllerEndpoint(operation = "导出用户数据", exceptionMessage = "导出Excel失败") |
| | |
| | | throw new FebsException(message); |
| | | } |
| | | } |
| | | |
| | | @GetMapping("image/{empId}") |
| | | public void getImage(@PathVariable String empId, HttpServletResponse response) throws FebsException { |
| | | try { |
| | | this.empBaseInfoService.getImage(empId,response); |
| | | } catch (Exception e) { |
| | | String message = "获取员工图片异常"; |
| | | log.error(message, e); |
| | | throw new FebsException(message); |
| | | } |
| | | |
| | | } |
| | | } |