| | |
| | | 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; |
| | |
| | | import com.ruoyi.staff.service.PersonalShiftService; |
| | | import com.ruoyi.staff.utils.StyleMonthUtils; |
| | | import com.ruoyi.staff.utils.StyleYearUtils; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/personalShift") |
| | | @Api(tags = "人员排班") |
| | | @Tag(name = "人员排班") |
| | | @AllArgsConstructor |
| | | public class PersonalShiftController { |
| | | |
| | | private PersonalShiftService personalShiftService; |
| | | |
| | | @ApiOperation("人员排班") |
| | | @Operation(summary = "人员排班") |
| | | @Log(title = "新增人员排班", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public R add(@RequestBody PerformanceShiftAddDto performanceShiftAddDto){ |
| | | return R.ok(personalShiftService.performanceShiftAdd(performanceShiftAddDto)); |
| | | } |
| | | |
| | | @ApiOperation(value = "月份分页查询") |
| | | @Operation(summary = "月份分页查询") |
| | | @GetMapping("page") |
| | | 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 = "年份分页查询") |
| | | @Operation(summary = "年份分页查询") |
| | | @GetMapping("pageYear") |
| | | 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 = "班次状态修改") |
| | | @Operation(summary = "班次状态修改") |
| | | @Log(title = "修改班次状态", businessType = BusinessType.UPDATE) |
| | | @PostMapping("update") |
| | | public R performanceShiftUpdate(@RequestBody PersonalShift personalShift) { |
| | | personalShiftService.performanceShiftUpdate(personalShift); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @ApiOperation(value = "导出") |
| | | @Operation(summary = "导出") |
| | | @Log(title = "导出人员排班", businessType = BusinessType.EXPORT) |
| | | @GetMapping("export") |
| | | public void exportToExcel(@NotNull(message = "时间不能为空!") String time, String userName, Integer sysDeptId, Boolean isMonth, HttpServletResponse response) throws Exception { |
| | | ServletOutputStream out = response.getOutputStream(); |