|  | @@ -26,6 +26,7 @@ import org.springframework.util.CollectionUtils;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  import java.util.*;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +import static com.ym.mec.biz.dal.enums.ComplaintsStatusEnum.REPEAL;
 | 
	
		
			
				|  |  |  import static com.ym.mec.biz.dal.enums.SignInStatusEnum.*;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  @Service
 | 
	
	
		
			
				|  | @@ -608,7 +609,7 @@ public class TeacherAttendanceServiceImpl extends BaseServiceImpl<Long, TeacherA
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  	@Override
 | 
	
		
			
				|  |  |  	@Transactional(rollbackFor = Exception.class)
 | 
	
		
			
				|  |  | -	public void addComplaints(Long courseScheduleId, String content) {
 | 
	
		
			
				|  |  | +	public synchronized void addComplaints(Long courseScheduleId, String content) {
 | 
	
		
			
				|  |  |  		SysUser user = sysUserFeignService.queryUserInfo();
 | 
	
		
			
				|  |  |  		if(Objects.isNull(user)){
 | 
	
		
			
				|  |  |  			throw new BizException("请登录");
 | 
	
	
		
			
				|  | @@ -617,13 +618,17 @@ public class TeacherAttendanceServiceImpl extends BaseServiceImpl<Long, TeacherA
 | 
	
		
			
				|  |  |  		if(teacherAttendance == null){
 | 
	
		
			
				|  |  |  			throw new BizException("考勤信息不存在");
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  | +		if(teacherAttendance.getComplaintsStatus() != null && teacherAttendance.getComplaintsStatus() != REPEAL){
 | 
	
		
			
				|  |  | +            throw new BizException("请勿重复提交考勤申述");
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |  		CourseSchedule courseSchedule = courseScheduleDao.get(courseScheduleId);
 | 
	
		
			
				|  |  |  		if(courseSchedule == null){
 | 
	
		
			
				|  |  |  			throw new BizException("课程不存在");
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  		//如果课程时间在两天前
 | 
	
		
			
				|  |  |  		Date date = new Date();
 | 
	
		
			
				|  |  | -		if(DateUtil.daysBetween(courseSchedule.getClassDate(),date) > 1){
 | 
	
		
			
				|  |  | +        int i = DateUtil.daysBetween(courseSchedule.getClassDate(), DateUtil.stringToDate(DateUtil.format(date,DateUtil.DEFAULT_PATTERN),DateUtil.DEFAULT_PATTERN));
 | 
	
		
			
				|  |  | +        if(i > 1){
 | 
	
		
			
				|  |  |  			throw new BizException("超出可申述时间");
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  		teacherAttendance.setIsComplaints(1);
 | 
	
	
		
			
				|  | @@ -645,7 +650,7 @@ public class TeacherAttendanceServiceImpl extends BaseServiceImpl<Long, TeacherA
 | 
	
		
			
				|  |  |  			throw new BizException("考勤信息不存在");
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  		if(teacherAttendance.getComplaintsStatus() == ComplaintsStatusEnum.WAIT){
 | 
	
		
			
				|  |  | -			teacherAttendance.setComplaintsStatus(ComplaintsStatusEnum.REPEAL);
 | 
	
		
			
				|  |  | +			teacherAttendance.setComplaintsStatus(REPEAL);
 | 
	
		
			
				|  |  |  			teacherAttendanceDao.update(teacherAttendance);
 | 
	
		
			
				|  |  |  		}else {
 | 
	
		
			
				|  |  |  			throw new BizException("操作失败: 当前申述状态不允许撤销");
 |