package com.ruoyi.staff.controller;
|
|
import com.ruoyi.framework.web.domain.AjaxResult;
|
import com.ruoyi.staff.dto.SaveStaffSchedulingDto;
|
import com.ruoyi.staff.service.StaffSchedulingService;
|
import com.ruoyi.staff.vo.SearchSchedulingVo;
|
import lombok.RequiredArgsConstructor;
|
import org.springframework.validation.annotation.Validated;
|
import org.springframework.web.bind.annotation.*;
|
|
import java.util.List;
|
|
/**
|
* 排班
|
* @author buhuazhen
|
* @date 2025/9/3
|
* @email 3038525872@qq.com
|
*/
|
@RestController
|
@RequestMapping("/staff/staffScheduling")
|
@RequiredArgsConstructor
|
public class StaffSchedulingController {
|
|
private final StaffSchedulingService staffSchedulingService;
|
|
@PostMapping("/listPage")
|
public AjaxResult listPage(@RequestBody SearchSchedulingVo vo){
|
return AjaxResult.success(staffSchedulingService.listPage(vo));
|
}
|
|
@PostMapping("/save")
|
public AjaxResult save(@RequestBody @Validated SaveStaffSchedulingDto saveStaffSchedulingDto){
|
staffSchedulingService.saveStaffScheduling(saveStaffSchedulingDto);
|
return AjaxResult.success();
|
}
|
|
@DeleteMapping("/delByIds")
|
public AjaxResult delByIds(@RequestBody List<Integer> ids){
|
staffSchedulingService.removeByIds(ids);
|
return AjaxResult.success();
|
}
|
|
@DeleteMapping("/del/{id}")
|
public AjaxResult del(@PathVariable("id") Integer id){
|
staffSchedulingService.removeById(id);
|
return AjaxResult.success();
|
}
|
|
}
|