|
|
@@ -2,13 +2,14 @@ package com.izouma.wenlvju.web.performance;
|
|
|
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
import com.izouma.wenlvju.domain.performance.Performance;
|
|
|
+import com.izouma.wenlvju.domain.performance.PerformanceSchedule;
|
|
|
import com.izouma.wenlvju.domain.performance.Programme;
|
|
|
-import com.izouma.wenlvju.repo.PerformanceApplyRepo;
|
|
|
-import com.izouma.wenlvju.repo.performance.ProgrammeRepo;
|
|
|
-import com.izouma.wenlvju.service.performance.PerformanceService;
|
|
|
import com.izouma.wenlvju.dto.PageQuery;
|
|
|
import com.izouma.wenlvju.exception.BusinessException;
|
|
|
import com.izouma.wenlvju.repo.performance.PerformanceRepo;
|
|
|
+import com.izouma.wenlvju.repo.performance.PerformanceScheduleRepo;
|
|
|
+import com.izouma.wenlvju.repo.performance.ProgrammeRepo;
|
|
|
+import com.izouma.wenlvju.service.performance.PerformanceService;
|
|
|
import com.izouma.wenlvju.utils.ObjUtils;
|
|
|
import com.izouma.wenlvju.utils.excel.ExcelUtils;
|
|
|
import com.izouma.wenlvju.web.BaseController;
|
|
|
@@ -20,6 +21,7 @@ import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import java.io.IOException;
|
|
|
+import java.time.LocalDate;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.stream.Collectors;
|
|
|
@@ -28,10 +30,10 @@ import java.util.stream.Collectors;
|
|
|
@RequestMapping("/performance")
|
|
|
@AllArgsConstructor
|
|
|
public class PerformanceController extends BaseController {
|
|
|
- private final PerformanceService performanceService;
|
|
|
- private final PerformanceRepo performanceRepo;
|
|
|
- private final PerformanceApplyRepo performanceApplyRepo;
|
|
|
- private final ProgrammeRepo programmeRepo;
|
|
|
+ private final PerformanceService performanceService;
|
|
|
+ private final PerformanceRepo performanceRepo;
|
|
|
+ private final ProgrammeRepo programmeRepo;
|
|
|
+ private final PerformanceScheduleRepo performanceScheduleRepo;
|
|
|
|
|
|
@PreAuthorize("hasRole('ADMIN')")
|
|
|
@PostMapping("/save")
|
|
|
@@ -86,7 +88,7 @@ public class PerformanceController extends BaseController {
|
|
|
@PostMapping("/del/{id}")
|
|
|
public void del(@PathVariable Long id) {
|
|
|
performanceRepo.softDelete(id);
|
|
|
- performanceApplyRepo.softDeleteByPerformanceId(id);
|
|
|
+ performanceScheduleRepo.softDeleteByPid(id);
|
|
|
}
|
|
|
|
|
|
@GetMapping("/excel")
|
|
|
@@ -107,7 +109,8 @@ public class PerformanceController extends BaseController {
|
|
|
@ApiOperation("获取上一年度")
|
|
|
@PostMapping("/lastYear")
|
|
|
public Performance lastYear() {
|
|
|
- return performanceRepo.findLastYear();
|
|
|
+// return performanceRepo.findLastYear();
|
|
|
+ return performanceRepo.findByYear(String.valueOf(LocalDate.now().getYear() - 1));
|
|
|
}
|
|
|
}
|
|
|
|