huminmin
10 天以前 eeeccc7389757ae4a766ab7267fcbc2b008faf9c
src/main/java/com/ruoyi/staff/controller/StaffSchedulingController.java
@@ -10,6 +10,8 @@
import com.ruoyi.staff.dto.StaffSchedulingDto;
import com.ruoyi.staff.service.StaffSchedulingService;
import com.ruoyi.staff.vo.SearchSchedulingVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@@ -26,28 +28,33 @@
@RestController
@RequestMapping("/staff/staffScheduling")
@RequiredArgsConstructor
@Api(tags = "排班")
public class StaffSchedulingController {
    private final StaffSchedulingService staffSchedulingService;
    @PostMapping("/listPage")
    @ApiOperation("分页查询排班")
    public AjaxResult listPage(@RequestBody SearchSchedulingVo vo){
       return AjaxResult.success(staffSchedulingService.listPage(vo));
    }
    @PostMapping("/save")
    @ApiOperation("新增排班")
    public AjaxResult save(@RequestBody @Validated SaveStaffSchedulingDto saveStaffSchedulingDto){
        staffSchedulingService.saveStaffScheduling(saveStaffSchedulingDto);
        return AjaxResult.success();
    }
    @DeleteMapping("/delByIds")
    @ApiOperation("批量删除排班")
    public AjaxResult delByIds(@RequestBody List<Integer> ids){
        staffSchedulingService.removeByIds(ids);
        return AjaxResult.success();
    }
    @DeleteMapping("/del/{id}")
    @ApiOperation("删除排班")
    public AjaxResult del(@PathVariable("id") Integer id){
        staffSchedulingService.removeById(id);
        return AjaxResult.success();