gongchunyi
5 天以前 e7a970151c40925eefa1fe837ac06e93594fcf82
src/main/java/com/ruoyi/staff/controller/StaffSchedulingController.java
@@ -14,7 +14,7 @@
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.http.HttpServletResponse;
import java.util.List;
/**
@@ -35,24 +35,35 @@
       return AjaxResult.success(staffSchedulingService.listPage(vo));
    }
    @Log(title = "员工排班", businessType = BusinessType.INSERT)
    @PostMapping("/save")
    public AjaxResult save(@RequestBody @Validated SaveStaffSchedulingDto saveStaffSchedulingDto){
        staffSchedulingService.saveStaffScheduling(saveStaffSchedulingDto);
        return AjaxResult.success();
    }
    @Log(title = "员工排班", businessType = BusinessType.DELETE)
    @DeleteMapping("/delByIds")
    public AjaxResult delByIds(@RequestBody List<Integer> ids){
        staffSchedulingService.removeByIds(ids);
        return AjaxResult.success();
    }
    @Log(title = "员工排班", businessType = BusinessType.DELETE)
    @DeleteMapping("/del/{id}")
    public AjaxResult del(@PathVariable("id") Integer id){
        staffSchedulingService.removeById(id);
        return AjaxResult.success();
    }
    /**
     * 获取当前用户最新排班记录
     */
    @GetMapping("/getCurrentUserLatestScheduling")
    public AjaxResult getCurrentUserLatestScheduling(){
        return AjaxResult.success(staffSchedulingService.getCurrentUserLatestScheduling());
    }
    @Log(title = "导出人员排班列表", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response ) {