| | |
| | | import javax.validation.Valid; |
| | | import javax.validation.constraints.NotBlank; |
| | | |
| | | import cc.mrbird.febs.common.core.annotation.FieldInfo; |
| | | import cc.mrbird.febs.common.core.entity.system.SystemUser; |
| | | 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 cn.hutool.core.annotation.AnnotationUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.wuwenze.poi.ExcelKit; |
| | | |
| | |
| | | @PreAuthorize("hasAuthority('empBaseinfo:add')") |
| | | public void addEmpBaseInfo(@Valid EmpBaseInfo empBaseinfo) throws FebsException { |
| | | if(this.empBaseInfoService.verifyEmpNumb(empBaseinfo)){ |
| | | throw new FebsException("已存在此员工编号"); |
| | | throw new FebsException("已存在此员工编号:" + empBaseinfo.getEmpNumb()); |
| | | } |
| | | try { |
| | | this.empBaseInfoService.createEmpBaseInfo(empBaseinfo); |
| | |
| | | boolean result = PoiExportExcel.exportCommonExcel(response, fileName + dateStr, fileName, allList); |
| | | } |
| | | |
| | | @ApiOperation(value = "导出员工") |
| | | @RequestMapping(value = "exportEmpAll",method= RequestMethod.POST) |
| | | @ControllerEndpoint(operation = "导出用户数据", exceptionMessage = "导出Excel失败") |
| | | public void exportEmpAll(HttpServletResponse response,EmpBaseInfo empBaseinfo) throws IOException { |
| | | this.empBaseInfoService.exportEmpAll(response,empBaseinfo); |
| | | } |
| | | |
| | | @ApiOperation(value = "导入员工") |
| | | @PostMapping("importEmp") |
| | | public FebsResponse importEmp(MultipartFile file) { |