package com.yuanchu.mom.controller;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.yuanchu.mom.dto.PerformanceShiftAddDto;
|
import com.yuanchu.mom.pojo.PerformanceShift;
|
import com.yuanchu.mom.service.PerformanceShiftService;
|
import com.yuanchu.mom.vo.Result;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.*;
|
|
|
/**
|
* <p>
|
* 绩效管理-班次 前端控制器
|
* </p>
|
*
|
* @author 江苏鵷雏网络科技有限公司
|
* @since 2024-05-08 09:12:04
|
*/
|
@Api(tags = "绩效管理-班次")
|
@RestController
|
@RequestMapping("/performanceShift")
|
public class PerformanceShiftController {
|
|
@Autowired
|
private PerformanceShiftService performanceShiftService;
|
|
@ApiOperation(value = "绩效管理-班次-排班")
|
@PostMapping("add")
|
public Result<?> performanceShiftAdd(@RequestBody PerformanceShiftAddDto performanceShiftAddDto) {
|
performanceShiftService.performanceShiftAdd(performanceShiftAddDto);
|
return Result.success();
|
}
|
|
@ApiOperation(value = "绩效管理-班次-月份分页查询")
|
@PostMapping("page")
|
public Result<?> performanceShiftPage(Integer size, Integer current, String time, String userName, String laboratory) {
|
return Result.success(performanceShiftService.performanceShiftPage(new Page<>(current, size), time, userName, laboratory));
|
}
|
|
@ApiOperation(value = "绩效管理-班次-年份分页查询")
|
@PostMapping("pageYear")
|
public Result<?> performanceShiftPageYear(Integer size, Integer current, String time, String userName, String laboratory) {
|
return Result.success(performanceShiftService.performanceShiftPageYear(new Page<>(current, size), time, userName, laboratory));
|
}
|
|
@ApiOperation(value = "绩效管理-班次-班次状态修改")
|
@PutMapping("update")
|
public Result<?> performanceShiftUpdate(@RequestBody PerformanceShift performanceShift) {
|
performanceShiftService.performanceShiftUpdate(performanceShift);
|
return Result.success();
|
}
|
|
@ApiOperation(value = "绩效管理-班次-导出")
|
@GetMapping("update")
|
public Result<?> exportToExcel(String time, String userName, String laboratory) {
|
performanceShiftService.exportToExcel(time, userName, laboratory);
|
return Result.success();
|
}
|
}
|