huminmin
10 天以前 eeeccc7389757ae4a766ab7267fcbc2b008faf9c
src/main/java/com/ruoyi/staff/controller/StaffLeaveController.java
@@ -5,6 +5,7 @@
import com.ruoyi.staff.dto.StaffLeaveDto;
import com.ruoyi.staff.service.StaffLeaveService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.*;
@@ -27,6 +28,7 @@
     * @param staffLeaveDto
     * @return
     */
    @ApiOperation("新增离职分页查询")
    @GetMapping("/listPage")
    public AjaxResult staffLeaveListPage(Page page, StaffLeaveDto staffLeaveDto) {
        return AjaxResult.success(staffLeaveService.staffLeaveListPage(page, staffLeaveDto));
@@ -38,6 +40,7 @@
     * @return
     */
    @PostMapping("")
    @ApiOperation("新增离职")
    public AjaxResult add(@RequestBody StaffLeaveDto staffLeaveDto) {
        return AjaxResult.success(staffLeaveService.add(staffLeaveDto));
    }
@@ -49,6 +52,7 @@
     * @return
     */
    @PutMapping("/{id}")
    @ApiOperation("更新离职信息")
    public AjaxResult update(@PathVariable("id") Long id, @RequestBody StaffLeaveDto staffLeaveDto) {
        return AjaxResult.success(staffLeaveService.update(id, staffLeaveDto));
    }
@@ -59,6 +63,7 @@
     * @return
     */
    @DeleteMapping("/del")
    @ApiOperation("删除入职")
    public AjaxResult del(@RequestBody List<Integer> ids) {
        if(CollectionUtils.isEmpty(ids)){
            return AjaxResult.error("请选择至少一条数据");
@@ -70,6 +75,7 @@
     * 离职导出
     * @param staffLeaveDto
     */
    @ApiOperation("离职导出")
    @PostMapping("/export")
    public void export(HttpServletResponse response, StaffLeaveDto staffLeaveDto) {
        staffLeaveService.export(response, staffLeaveDto);