huminmin
10 天以前 d2038a623e02c2d7bb6b95a908832c0432adf2f0
src/main/java/com/ruoyi/staff/controller/PersonalShiftController.java
@@ -4,6 +4,8 @@
import com.alibaba.excel.write.style.HorizontalCellStyleStrategy;
import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.framework.web.domain.R;
import com.ruoyi.staff.dto.PerformanceShiftAddDto;
import com.ruoyi.staff.pojo.PersonalAttendanceLocationConfig;
@@ -41,24 +43,28 @@
    @ApiOperation("人员排班")
    @PostMapping("/add")
    @Log(title = "人员排班", businessType = BusinessType.INSERT)
    public R add(@RequestBody PerformanceShiftAddDto performanceShiftAddDto){
        return R.ok(personalShiftService.performanceShiftAdd(performanceShiftAddDto));
    }
    @ApiOperation(value = "月份分页查询")
    @GetMapping("page")
    @Log(title = "月份分页查询", businessType = BusinessType.OTHER)
    public R performanceShiftPage(Integer size, Integer current, String time, String userName, Integer sysDeptId) {
        return R.ok(personalShiftService.performanceShiftPage(new Page<>(current, size), time, userName, sysDeptId));
    }
    @ApiOperation(value = "年份分页查询")
    @GetMapping("pageYear")
    @Log(title = "年份分页查询", businessType = BusinessType.OTHER)
    public R performanceShiftPageYear(Integer size, Integer current, String time, String userName, Integer sysDeptId) {
        return R.ok(personalShiftService.performanceShiftPageYear(new Page<>(current, size), time, userName, sysDeptId));
    }
    @ApiOperation(value = "班次状态修改")
    @PostMapping("update")
    @Log(title = "班次状态修改", businessType = BusinessType.UPDATE)
    public R performanceShiftUpdate(@RequestBody PersonalShift personalShift) {
        personalShiftService.performanceShiftUpdate(personalShift);
        return R.ok();
@@ -66,6 +72,7 @@
    @ApiOperation(value = "导出")
    @GetMapping("export")
    @Log(title = "导出", businessType = BusinessType.EXPORT)
    public void exportToExcel(@NotNull(message = "时间不能为空!") String time, String userName, Integer sysDeptId, Boolean isMonth, HttpServletResponse response) throws Exception {
        Map<Object, Object> data;
        response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");