| | |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.staff.dto.StaffOnJobDto; |
| | | import com.ruoyi.staff.pojo.StaffJoinLeaveRecord; |
| | | import com.ruoyi.staff.pojo.StaffContract; |
| | | import com.ruoyi.staff.pojo.StaffOnJob; |
| | | import com.ruoyi.staff.service.IStaffJoinLeaveRecordService; |
| | | import com.ruoyi.staff.service.IStaffOnJobService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/listPage") |
| | | @ApiOperation("在职员工台账分页查询") |
| | | public AjaxResult staffOnJobListPage(Page page, StaffOnJob staffOnJob) { |
| | | return AjaxResult.success(staffOnJobService.staffOnJobListPage(page, staffOnJob)); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/list") |
| | | public AjaxResult staffOnJobList() { |
| | | return AjaxResult.success(staffOnJobService.staffOnJobList()); |
| | | @ApiOperation("在职员工下拉(新增离职用)") |
| | | public AjaxResult staffOnJobList(StaffOnJob staffOnJob) { |
| | | return AjaxResult.success(staffOnJobService.staffOnJobList(staffOnJob)); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | @PostMapping("") |
| | | @ApiOperation("新增入职") |
| | | public AjaxResult add(@RequestBody StaffOnJobDto staffOnJob) { |
| | | return AjaxResult.success(staffOnJobService.add(staffOnJob)); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | @PutMapping("/{id}") |
| | | @ApiOperation("更新入职信息") |
| | | public AjaxResult update(@PathVariable("id") Long id, @RequestBody StaffOnJobDto staffOnJobDto) { |
| | | return AjaxResult.success(staffOnJobService.update(id, staffOnJobDto)); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/del") |
| | | @ApiOperation("删除入职") |
| | | public AjaxResult delStaffOnJobs(@RequestBody List<Integer> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | | return AjaxResult.error("请选择至少一条数据"); |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/{id}") |
| | | @ApiOperation("在职员工详情") |
| | | public AjaxResult staffOnJobDetail(@PathVariable("id") Long id) { |
| | | return AjaxResult.success(staffOnJobService.staffOnJobDetail(id)); |
| | | } |
| | | |
| | | /** |
| | | * 续签合同 |
| | | * @param id |
| | | * @param staffContract |
| | | * @return |
| | | */ |
| | | @PostMapping("/renewContract/{id}") |
| | | @ApiOperation("续签合同") |
| | | public AjaxResult renewContract(@PathVariable("id") Long id, @RequestBody StaffContract staffContract) { |
| | | return AjaxResult.success(staffOnJobService.renewContract(id, staffContract)); |
| | | } |
| | | |
| | | /** |
| | | * 在职员工导入 |
| | | */ |
| | | @PostMapping("/import") |
| | | @ApiOperation("在职员工导入") |
| | | @Log(title = "在职员工导入", businessType = BusinessType.IMPORT) |
| | | public AjaxResult importData(@RequestPart("file") MultipartFile file) { |
| | | Boolean b = staffOnJobService.importData(file); |
| | |
| | | * @param staffOnJob |
| | | */ |
| | | @PostMapping("/export") |
| | | @ApiOperation("在职员工导出") |
| | | public void staffOnJobExport(HttpServletResponse response,StaffOnJob staffOnJob) { |
| | | staffOnJobService.staffOnJobExport(response, staffOnJob); |
| | | } |