| | |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | 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.StaffOnJob; |
| | | import com.ruoyi.staff.service.IStaffJoinLeaveRecordService; |
| | |
| | | } |
| | | |
| | | /** |
| | | * 在职员工详情 |
| | | * @param staffNo |
| | | * 新增入职 |
| | | * @param staffOnJob |
| | | * @return |
| | | */ |
| | | @GetMapping("/staffNo") |
| | | public AjaxResult staffOnJobDetail(String staffNo) { |
| | | return AjaxResult.success(staffOnJobService.staffOnJobDetail(staffNo)); |
| | | @PostMapping("") |
| | | public AjaxResult add(@RequestBody StaffOnJobDto staffOnJob) { |
| | | return AjaxResult.success(staffOnJobService.add(staffOnJob)); |
| | | } |
| | | |
| | | /** |
| | | * 更新入职信息 |
| | | * @param staffOnJobDto |
| | | * @return |
| | | */ |
| | | @PutMapping("/{id}") |
| | | public AjaxResult update(@PathVariable("id") Long id, @RequestBody StaffOnJobDto staffOnJobDto) { |
| | | return AjaxResult.success(staffOnJobService.update(id, staffOnJobDto)); |
| | | } |
| | | |
| | | /** |
| | | * 删除入职 |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/del") |
| | | public AjaxResult delStaffOnJobs(@RequestBody List<Integer> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | | return AjaxResult.error("请选择至少一条数据"); |
| | | } |
| | | return AjaxResult.success(staffOnJobService.delStaffOnJobs(ids)); |
| | | } |
| | | |
| | | /** |
| | | * 在职员工详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/{id}") |
| | | public AjaxResult staffJoinLeaveRecordDetail(@PathVariable("id") Long id) { |
| | | return AjaxResult.success(staffOnJobService.staffOnJobDetail(id)); |
| | | } |
| | | |
| | | /** |
| | | * 在职员工导入 |
| | | */ |