| | |
| | | import com.ruoyi.compensationperformance.pojo.CompensationPerformance; |
| | | 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.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import com.ruoyi.staff.dto.SaveStaffSchedulingDto; |
| | | import com.ruoyi.staff.dto.StaffSchedulingDto; |
| | | import com.ruoyi.staff.service.StaffSchedulingService; |
| | |
| | | @RestController |
| | | @RequestMapping("/staff/staffScheduling") |
| | | @RequiredArgsConstructor |
| | | public class StaffSchedulingController { |
| | | public class StaffSchedulingController extends BaseController { |
| | | |
| | | private final StaffSchedulingService staffSchedulingService; |
| | | |
| | | @PostMapping("/listPage") |
| | | public AjaxResult listPage(@RequestBody SearchSchedulingVo vo){ |
| | | return AjaxResult.success(staffSchedulingService.listPage(vo)); |
| | | public R<?> listPage(@RequestBody SearchSchedulingVo vo){ |
| | | return R.ok(staffSchedulingService.listPage(vo)); |
| | | } |
| | | |
| | | @PostMapping("/save") |
| | | public AjaxResult save(@RequestBody @Validated SaveStaffSchedulingDto saveStaffSchedulingDto){ |
| | | public R<?> save(@RequestBody @Validated SaveStaffSchedulingDto saveStaffSchedulingDto){ |
| | | staffSchedulingService.saveStaffScheduling(saveStaffSchedulingDto); |
| | | return AjaxResult.success(); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @DeleteMapping("/delByIds") |
| | | public AjaxResult delByIds(@RequestBody List<Integer> ids){ |
| | | public R<?> delByIds(@RequestBody List<Integer> ids){ |
| | | staffSchedulingService.removeByIds(ids); |
| | | return AjaxResult.success(); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @DeleteMapping("/del/{id}") |
| | | public AjaxResult del(@PathVariable("id") Integer id){ |
| | | public R<?> del(@PathVariable("id") Integer id){ |
| | | staffSchedulingService.removeById(id); |
| | | return AjaxResult.success(); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 获取当前用户最新排班记录 |
| | | */ |
| | | @GetMapping("/getCurrentUserLatestScheduling") |
| | | public AjaxResult getCurrentUserLatestScheduling(){ |
| | | return AjaxResult.success(staffSchedulingService.getCurrentUserLatestScheduling()); |
| | | public R<?> getCurrentUserLatestScheduling(){ |
| | | return R.ok(staffSchedulingService.getCurrentUserLatestScheduling()); |
| | | } |
| | | |
| | | @Log(title = "导出人员排班列表", businessType = BusinessType.EXPORT) |