Browse Source

学生报到计划

dzx 1 month ago
parent
commit
7060edc45f

+ 3 - 4
src/main/java/com/xjrsoft/module/student/controller/StudentReportPlanController.java

@@ -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(

+ 2 - 2
src/main/java/com/xjrsoft/module/student/entity/StudentReportPlan.java

@@ -64,13 +64,13 @@ public class StudentReportPlan implements Serializable {
     @ApiModelProperty("删除标记(0:未删除 1:已删除)")
     @TableField(fill = FieldFill.INSERT)
     @TableLogic
-    private Object deleteMark;
+    private Integer deleteMark;
     /**
     * 有效标记(0:未启用 1:已启用)
     */
     @ApiModelProperty("有效标记(0:未启用 1:已启用)")
     @TableField(fill = FieldFill.INSERT)
-    private Object enabledMark;
+    private Integer enabledMark;
     /**
     * 学期id(base_semester)
     */

+ 5 - 1
src/main/java/com/xjrsoft/module/student/vo/StudentReportPlanPageVo.java

@@ -29,7 +29,7 @@ public class StudentReportPlanPageVo {
     @ContentStyle(dataFormat = 49)
     @ExcelProperty("创建人")
     @ApiModelProperty("创建人")
-    private Long createUserId;
+    private String createUserName;
     /**
     * 创建时间
     */
@@ -72,6 +72,10 @@ public class StudentReportPlanPageVo {
     @ExcelProperty("学期id(base_semester)")
     @ApiModelProperty("学期id(base_semester)")
     private Long semesterId;
+
+    @ApiModelProperty("所属学期")
+    private String semesterName;
+
     /**
     * 计划名称
     */