Quellcode durchsuchen

报到计划功能调整

dzx vor 8 Monaten
Ursprung
Commit
01361a5d3c

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

@@ -13,6 +13,7 @@ import com.xjrsoft.common.exception.MyException;
 import com.xjrsoft.common.model.result.RT;
 import com.xjrsoft.common.page.ConventPage;
 import com.xjrsoft.common.page.PageOutput;
+import com.xjrsoft.common.utils.LocalDateTimeUtil;
 import com.xjrsoft.common.utils.TreeUtil;
 import com.xjrsoft.common.utils.VoToColumnUtil;
 import com.xjrsoft.module.banding.entity.BandingTask;
@@ -110,9 +111,11 @@ public class StudentReportPlanController {
     @XjrLog(value = "修改学生报到计划")
     public RT<Boolean> update(@Valid @RequestBody UpdateStudentReportPlanDto dto) {
         StudentReportPlan reportPlan = studentReportPlanService.getById(dto.getId());
+        if((reportPlan.getCategory() == 2 || reportPlan.getCategory() == 3) && LocalDateTimeUtil.isDateTimeInRange(LocalDateTime.now(), reportPlan.getStartTime(), reportPlan.getEndTime())){
+            reportPlan.setStatus(1);
+        }
         BeanUtil.copyProperties(dto, reportPlan);
         return RT.ok(studentReportPlanService.update(reportPlan));
-
     }
 
     @DeleteMapping