|
|
@@ -145,27 +145,27 @@ public class StudentReportPlanController {
|
|
|
}
|
|
|
//如果发布,需要先验证计划中的班级是否在其他生效的计划内
|
|
|
if (dto.getStatus() != null && dto.getStatus() == 1) {
|
|
|
- List<StudentReportPlan> list = studentReportPlanService.list(
|
|
|
- new QueryWrapper<StudentReportPlan>().lambda()
|
|
|
- .ne(StudentReportPlan::getId, reportPlan.getId())
|
|
|
- .eq(StudentReportPlan::getEnabledMark, EnabledMark.ENABLED.getCode())
|
|
|
- .eq(StudentReportPlan::getDeleteMark, DeleteMark.NODELETE.getCode())
|
|
|
- .eq(StudentReportPlan::getStatus, 1)
|
|
|
- .ne(StudentReportPlan::getSemesterId, reportPlan.getSemesterId())
|
|
|
- );
|
|
|
- if (!list.isEmpty()) {
|
|
|
- throw new MyException("已存在正在进行的计划,无法发布");
|
|
|
- }
|
|
|
+// List<StudentReportPlan> list = studentReportPlanService.list(
|
|
|
+// new QueryWrapper<StudentReportPlan>().lambda()
|
|
|
+// .ne(StudentReportPlan::getId, reportPlan.getId())
|
|
|
+// .eq(StudentReportPlan::getEnabledMark, EnabledMark.ENABLED.getCode())
|
|
|
+// .eq(StudentReportPlan::getDeleteMark, DeleteMark.NODELETE.getCode())
|
|
|
+// .eq(StudentReportPlan::getStatus, 1)
|
|
|
+// .ne(StudentReportPlan::getSemesterId, reportPlan.getSemesterId())
|
|
|
+// );
|
|
|
+// if (!list.isEmpty()) {
|
|
|
+// throw new MyException("已存在正在进行的计划,无法发布");
|
|
|
+// }
|
|
|
if (reportPlan.getStudentReportPlanClassRelationList() == null || reportPlan.getStudentReportPlanClassRelationList().isEmpty()) {
|
|
|
return RT.error("未选择班级,无法进行发布");
|
|
|
}
|
|
|
- List<Long> classIds = reportPlan.getStudentReportPlanClassRelationList()
|
|
|
- .stream().map(StudentReportPlanClassRelation::getClassId).collect(Collectors.toList());
|
|
|
- List<BaseClass> classList = studentReportPlanService.validateClass(dto.getId(), classIds);
|
|
|
- if (!classList.isEmpty()) {
|
|
|
- Set<String> classNames = classList.stream().map(BaseClass::getName).collect(Collectors.toSet());
|
|
|
- return RT.error(classNames.toString().replace("[", "").replace("]", "") + "已在其他计划中,无法发布");
|
|
|
- }
|
|
|
+// List<Long> classIds = reportPlan.getStudentReportPlanClassRelationList()
|
|
|
+// .stream().map(StudentReportPlanClassRelation::getClassId).collect(Collectors.toList());
|
|
|
+// List<BaseClass> classList = studentReportPlanService.validateClass(dto.getId(), classIds);
|
|
|
+// if (!classList.isEmpty()) {
|
|
|
+// Set<String> classNames = classList.stream().map(BaseClass::getName).collect(Collectors.toSet());
|
|
|
+// return RT.error(classNames.toString().replace("[", "").replace("]", "") + "已在其他计划中,无法发布");
|
|
|
+// }
|
|
|
|
|
|
if (reportPlan.getStatus() == 1) {
|
|
|
return RT.error("已发布,无法再次发布");
|