|  | @@ -734,7 +734,7 @@ public class TeacherAttendanceServiceImpl extends BaseServiceImpl<Long, TeacherA
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  	@Override
 | 
	
		
			
				|  |  |  	@Transactional(rollbackFor = Exception.class)
 | 
	
		
			
				|  |  | -	public void addComplaints(Long courseScheduleId, String content,String url,Integer userId) {
 | 
	
		
			
				|  |  | +	public void addComplaints(Long courseScheduleId, String content,String url,Integer userId, UpdateAttendanceEnum complaintsType) {
 | 
	
		
			
				|  |  |  		TeacherAttendance teacherAttendance = teacherAttendanceDao.findByTeacherAttendanceInfo(userId.longValue(), courseScheduleId);
 | 
	
		
			
				|  |  |  		CourseSchedule courseSchedule = courseScheduleDao.get(courseScheduleId);
 | 
	
		
			
				|  |  |  		if(courseSchedule == null){
 | 
	
	
		
			
				|  | @@ -751,6 +751,9 @@ public class TeacherAttendanceServiceImpl extends BaseServiceImpl<Long, TeacherA
 | 
	
		
			
				|  |  |  		}else if(teacherAttendance.getComplaintsStatus() != null && teacherAttendance.getComplaintsStatus() != REPEAL){
 | 
	
		
			
				|  |  |              throw new BizException("请勿重复提交考勤申述");
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | +		if(teacherAttendance.getSignInStatus() == YesOrNoEnum.YES && teacherAttendance.getSignOutStatus() == YesOrNoEnum.YES){
 | 
	
		
			
				|  |  | +			throw new BizException("考勤正常,无需提交申诉");
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  |  		Teacher teacher = teacherDao.get(userId);
 | 
	
		
			
				|  |  |  		Date date = new Date();
 | 
	
		
			
				|  |  |  		if(teacher.getJobNature() == PART_TIME){
 | 
	
	
		
			
				|  | @@ -767,6 +770,10 @@ public class TeacherAttendanceServiceImpl extends BaseServiceImpl<Long, TeacherA
 | 
	
		
			
				|  |  |  				throw new BizException("超出可申述时间");
 | 
	
		
			
				|  |  |  			}
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  | +		if(complaintsType == null){
 | 
	
		
			
				|  |  | +			complaintsType = UpdateAttendanceEnum.ALL;
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +		teacherAttendance.setComplaintsType(complaintsType);
 | 
	
		
			
				|  |  |  		teacherAttendance.setIsComplaints(1);
 | 
	
		
			
				|  |  |  		teacherAttendance.setComplaintsStatus(ComplaintsStatusEnum.WAIT);
 | 
	
		
			
				|  |  |  		teacherAttendance.setComplaintsContent(content);
 | 
	
	
		
			
				|  | @@ -784,6 +791,7 @@ public class TeacherAttendanceServiceImpl extends BaseServiceImpl<Long, TeacherA
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  		if(teacherAttendance.getComplaintsStatus() == ComplaintsStatusEnum.WAIT){
 | 
	
		
			
				|  |  |  			teacherAttendance.setComplaintsStatus(REPEAL);
 | 
	
		
			
				|  |  | +			teacherAttendance.setIsComplaints(0);
 | 
	
		
			
				|  |  |  			teacherAttendanceDao.update(teacherAttendance);
 | 
	
		
			
				|  |  |  		}else {
 | 
	
		
			
				|  |  |  			throw new BizException("操作失败: 当前申述状态不允许撤销");
 | 
	
	
		
			
				|  | @@ -811,23 +819,18 @@ public class TeacherAttendanceServiceImpl extends BaseServiceImpl<Long, TeacherA
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  	@Override
 | 
	
		
			
				|  |  |  	@Transactional(rollbackFor = Exception.class)
 | 
	
		
			
				|  |  | -	public void agreeTeacherAttendanceComplaints(Integer signInStatus, Integer signOutStatus, long teacherAttendanceId,String content) {
 | 
	
		
			
				|  |  | +	public void agreeTeacherAttendanceComplaints(long teacherAttendanceId,String content) {
 | 
	
		
			
				|  |  |  		TeacherAttendance teacherAttendance = teacherAttendanceDao.get(teacherAttendanceId);
 | 
	
		
			
				|  |  |  		if(teacherAttendance == null){
 | 
	
		
			
				|  |  |  			throw new BizException("考勤信息不存在");
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  | +		UpdateAttendanceEnum complaintsType = teacherAttendance.getComplaintsType();
 | 
	
		
			
				|  |  |  		if(teacherAttendance.getComplaintsStatus() == ComplaintsStatusEnum.WAIT){
 | 
	
		
			
				|  |  | -			if(signInStatus != null && signOutStatus != null){
 | 
	
		
			
				|  |  | -				teacherAttendance.setUpdateAttendanceEnum(UpdateAttendanceEnum.ALL);
 | 
	
		
			
				|  |  | -			}else if (signInStatus != null){
 | 
	
		
			
				|  |  | -				teacherAttendance.setUpdateAttendanceEnum(UpdateAttendanceEnum.SIGN_IN);
 | 
	
		
			
				|  |  | -			}else if (signOutStatus != null){
 | 
	
		
			
				|  |  | -				teacherAttendance.setUpdateAttendanceEnum(UpdateAttendanceEnum.SIGN_OUT);
 | 
	
		
			
				|  |  | -			}
 | 
	
		
			
				|  |  | +			teacherAttendance.setUpdateAttendanceEnum(complaintsType);
 | 
	
		
			
				|  |  |  			StringBuffer remark = new StringBuffer("同意异常考勤申述");
 | 
	
		
			
				|  |  |  			CourseSchedule courseSchedule = courseScheduleDao.get(teacherAttendance.getCourseScheduleId());
 | 
	
		
			
				|  |  |  			String classDate = DateUtil.format(courseSchedule.getClassDate(), DateUtil.DEFAULT_PATTERN);
 | 
	
		
			
				|  |  | -			if(signInStatus != null && teacherAttendance.getSignInStatus() != YesOrNoEnum.YES){
 | 
	
		
			
				|  |  | +			if(complaintsType != UpdateAttendanceEnum.SIGN_OUT && teacherAttendance.getSignInStatus() != YesOrNoEnum.YES){
 | 
	
		
			
				|  |  |  				if(teacherAttendance.getSignInTime() != null){
 | 
	
		
			
				|  |  |  					remark.append("  原签到时间: ").append(DateUtil.format(teacherAttendance.getSignInTime(),DateUtil.EXPANDED_DATE_TIME_FORMAT));
 | 
	
		
			
				|  |  |  				}
 | 
	
	
		
			
				|  | @@ -836,7 +839,7 @@ public class TeacherAttendanceServiceImpl extends BaseServiceImpl<Long, TeacherA
 | 
	
		
			
				|  |  |  				teacherAttendance.setSignInTime(DateUtil.addMinutes(date,-1));
 | 
	
		
			
				|  |  |  				teacherAttendance.setSignInStatus(YesOrNoEnum.YES);
 | 
	
		
			
				|  |  |  			}
 | 
	
		
			
				|  |  | -			if(signOutStatus != null && teacherAttendance.getSignOutStatus() != YesOrNoEnum.YES){
 | 
	
		
			
				|  |  | +			if(complaintsType != UpdateAttendanceEnum.SIGN_IN && teacherAttendance.getSignOutStatus() != YesOrNoEnum.YES){
 | 
	
		
			
				|  |  |  				if(teacherAttendance.getSignOutTime() != null){
 | 
	
		
			
				|  |  |  					remark.append("  原签退时间: ").append(DateUtil.format(teacherAttendance.getSignOutTime(),DateUtil.EXPANDED_DATE_TIME_FORMAT));
 | 
	
		
			
				|  |  |  				}
 |