| | |
| | | package com.ruoyi.staff.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | 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.pojo.StaffJoinLeaveRecord; |
| | | import com.ruoyi.staff.dto.StaffOnJobDto; |
| | | import com.ruoyi.staff.pojo.StaffOnJob; |
| | | import com.ruoyi.staff.service.IStaffJoinLeaveRecordService; |
| | | import com.ruoyi.staff.service.IStaffOnJobService; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 员工台账/合同管理 |
| | |
| | | public AjaxResult staffOnJobDetail(String staffNo) { |
| | | return AjaxResult.success(staffOnJobService.staffOnJobDetail(staffNo)); |
| | | } |
| | | /** |
| | | * 在职员工导入 |
| | | */ |
| | | @PostMapping("/import") |
| | | @Log(title = "在职员工导入", businessType = BusinessType.IMPORT) |
| | | public AjaxResult importData(@RequestPart("file") MultipartFile file) { |
| | | Boolean b = staffOnJobService.importData(file); |
| | | if (b) { |
| | | return AjaxResult.success("导入成功"); |
| | | } |
| | | return AjaxResult.error("导入失败"); |
| | | } |
| | | |
| | | /** |
| | | * 在职员工导出 |
| | |
| | | staffOnJobService.staffOnJobExport(response, staffOnJob); |
| | | } |
| | | |
| | | /** |
| | | * 员工转正 |
| | | * @param staffOnJob |
| | | * @return |
| | | */ |
| | | @PostMapping("/regularize") |
| | | public AjaxResult regularize(@RequestBody StaffOnJob staffOnJob) { |
| | | return AjaxResult.success(staffOnJobService.updateById(staffOnJob)); |
| | | } |
| | | |
| | | /** |
| | | * 员工调岗 |
| | | * @param staffOnJobDto |
| | | * @return |
| | | */ |
| | | @PostMapping("/transferPost") |
| | | public AjaxResult transferPost(@RequestBody StaffOnJobDto staffOnJobDto) { |
| | | return AjaxResult.success(staffOnJobService.transferPost(staffOnJobDto)); |
| | | } |
| | | |
| | | |
| | | } |