|
@@ -21,7 +21,6 @@ import com.xjrsoft.module.student.dto.UpdateStudentReportPlanDto;
|
|
|
import com.xjrsoft.module.student.entity.StudentReportPlan;
|
|
|
import com.xjrsoft.module.student.entity.StudentReportPlanClassRelation;
|
|
|
import com.xjrsoft.module.student.service.IStudentReportPlanService;
|
|
|
-import com.xjrsoft.module.student.vo.BaseStudentTreeVo;
|
|
|
import com.xjrsoft.module.student.vo.StudentReportPlanPageVo;
|
|
|
import com.xjrsoft.module.student.vo.StudentReportPlanTreeVo;
|
|
|
import com.xjrsoft.module.student.vo.StudentReportPlanVo;
|
|
@@ -118,13 +117,13 @@ public class StudentReportPlanController {
|
|
|
}
|
|
|
//如果发布,需要先验证计划中的班级是否在其他生效的计划内
|
|
|
if(dto.getStatus() != null && dto.getStatus() == 1){
|
|
|
- if(reportPlan.getStudentReportPlanClassRelationList() == null || !reportPlan.getStudentReportPlanClassRelationList().isEmpty()){
|
|
|
+ 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()){
|
|
|
+ if(!classList.isEmpty()){
|
|
|
Set<String> classNames = classList.stream().map(BaseClass::getName).collect(Collectors.toSet());
|
|
|
return RT.error(classNames.toString().replace("[", "").replace("]", "") + "已在其他计划中,无法发布");
|
|
|
}
|
|
@@ -151,7 +150,7 @@ public class StudentReportPlanController {
|
|
|
@GetMapping(value = "/tree")
|
|
|
@ApiOperation(value="学期计划树")
|
|
|
@SaCheckPermission("studentreportplan:detail")
|
|
|
- public RT<List<StudentReportPlanTreeVo>> tree(@RequestParam Long id){
|
|
|
+ public RT<List<StudentReportPlanTreeVo>> tree(){
|
|
|
List<Integer> statusList = new ArrayList<>();
|
|
|
statusList.add(1);statusList.add(2);
|
|
|
List<StudentReportPlan> list = studentReportPlanService.list(
|