|
|
@@ -16,6 +16,7 @@ import com.xjrsoft.common.enums.RoleEnum;
|
|
|
import com.xjrsoft.common.enums.StudentChangeTypeEnum;
|
|
|
import com.xjrsoft.common.enums.StudyStatusEnum;
|
|
|
import com.xjrsoft.common.exception.MyException;
|
|
|
+import com.xjrsoft.common.utils.LocalDateTimeUtil;
|
|
|
import com.xjrsoft.common.utils.LocalDateUtil;
|
|
|
import com.xjrsoft.common.utils.RedisUtil;
|
|
|
import com.xjrsoft.common.utils.VoToColumnUtil;
|
|
|
@@ -310,6 +311,12 @@ public class StudentReportRecordServiceImpl extends MPJBaseServiceImpl<StudentRe
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public Boolean tryReadingSign(StudentReportSignDto dto) {
|
|
|
StudentReportRecord record = this.getById(dto.getId());
|
|
|
+ LocalDateTime now = LocalDateTime.now();
|
|
|
+ StudentReportPlan reportPlan = planMapper.selectById(record.getStudentReportPlanId());
|
|
|
+ if(!LocalDateTimeUtil.isDateTimeInRange(now, reportPlan.getStartTime(), reportPlan.getEndTime())){
|
|
|
+ throw new MyException("不在修改时间内,无法修改");
|
|
|
+ }
|
|
|
+
|
|
|
BaseNewStudent student = newStudentMapper.selectById(record.getUserId());
|
|
|
if(record.getReportTime() == null){
|
|
|
record.setReportTime(new Date());
|
|
|
@@ -343,7 +350,6 @@ public class StudentReportRecordServiceImpl extends MPJBaseServiceImpl<StudentRe
|
|
|
rollService.activateStudent(user.getId());
|
|
|
}else{
|
|
|
LocalDate birthDate = getBirthDate(student.getCredentialNumber());
|
|
|
- LocalDateTime now = LocalDateTime.now();
|
|
|
User xjrUser = new User() {{
|
|
|
setCreateDate(now);
|
|
|
setPassword(BCrypt.hashpw(propertiesConfig.getDefaultPassword(), BCrypt.gensalt()));
|