| | |
| | | } |
| | | |
| | | @ApiOperation(value = "月份分页查询") |
| | | @PostMapping("page") |
| | | @GetMapping("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") |
| | | @GetMapping("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") |
| | | @PostMapping("update") |
| | | public Result<?> performanceShiftUpdate(@RequestBody PerformanceShift performanceShift) { |
| | | performanceShiftService.performanceShiftUpdate(performanceShift); |
| | | return Result.success(); |
| | |
| | | @ApiOperation(value = "临时接口-添加7月份8月份的数据") |
| | | @GetMapping("temporaryInterface") |
| | | public void temporaryInterface() { |
| | | System.out.println("开始给每个人进行排班,默认早班======start"); |
| | | // TODO 给每个人都进行排班(默认早班) |
| | | PerformanceShiftAddDto performanceShiftAddDto = new PerformanceShiftAddDto(); |
| | | //班次--早(查询字典) |
| | |
| | | endOfWeek = startOfWeek.plusDays(6); |
| | | LocalDateTime startDateTime = LocalDateTime.of(startOfWeek, LocalTime.MIDNIGHT); |
| | | LocalDateTime endDateTime = LocalDateTime.of(endOfWeek, LocalTime.MIDNIGHT); |
| | | System.out.println("Week starts on " + startDateTime + " and ends on " + endDateTime); |
| | | performanceShiftAddDto.setStartWeek(startDateTime); |
| | | performanceShiftAddDto.setEndWeek(endDateTime); |
| | | performanceShiftService.performanceShiftAdd(performanceShiftAddDto); |
| | | startOfWeek = startOfWeek.plusWeeks(1); |
| | | } |
| | | |
| | | System.out.println("排班结束======end"); |
| | | } |
| | | } |