|  | @@ -30,7 +30,7 @@ import java.util.*;
 | 
	
		
			
				|  |  |  import java.util.stream.Collectors;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  import static com.ym.mec.biz.dal.enums.ComplaintsStatusEnum.REPEAL;
 | 
	
		
			
				|  |  | -import static com.ym.mec.biz.dal.enums.JobNatureEnum.PART_TIME;
 | 
	
		
			
				|  |  | +import static com.ym.mec.biz.dal.enums.JobNatureEnum.*;
 | 
	
		
			
				|  |  |  import static com.ym.mec.biz.dal.enums.SignInStatusEnum.*;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  @Service
 | 
	
	
		
			
				|  | @@ -753,13 +753,42 @@ public class TeacherAttendanceServiceImpl extends BaseServiceImpl<Long, TeacherA
 | 
	
		
			
				|  |  |  		sysMessageService.batchSendMessage(MessageSender.JIGUANG,MessageTypeEnum.TEACHER_PUSH_EXCEPTION_ATTENDANCE,receivers,null,0,url,"TEACHER",format);
 | 
	
		
			
				|  |  |  	}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -	void checkComplaints(JobNatureEnum jobNatureEnum,Integer tenantId){
 | 
	
		
			
				|  |  | -//		String configValue = sysTenantConfigService.getConfigValue(SysConfigService.parp_teacher_salary, tenantId);
 | 
	
		
			
				|  |  | -//		String configValue1 = sysTenantConfigService.getConfigValue(SysConfigService.parp_teacher_salary_type, tenantId);
 | 
	
		
			
				|  |  | -//		String configValue = sysTenantConfigService.getConfigValue(SysConfigService.full_teacher_salary, tenantId);
 | 
	
		
			
				|  |  | -//		String configValue = sysTenantConfigService.getConfigValue(SysConfigService.full_teacher_salary_type, tenantId);
 | 
	
		
			
				|  |  | -//		String configValue = sysTenantConfigService.getConfigValue(SysConfigService.labour_teacher_salary, tenantId);
 | 
	
		
			
				|  |  | -//		String configValue = sysTenantConfigService.getConfigValue(SysConfigService.labour_teacher_salary_type, tenantId);
 | 
	
		
			
				|  |  | +	//校验考勤申诉
 | 
	
		
			
				|  |  | +	void checkComplaints(JobNatureEnum jobNatureEnum,Integer tenantId,Date classDate){
 | 
	
		
			
				|  |  | +		Map<String, String> tenantConfig = sysTenantConfigService.getTenantConfig(tenantId);
 | 
	
		
			
				|  |  | +		String salary = null;
 | 
	
		
			
				|  |  | +		String type = null;
 | 
	
		
			
				|  |  | +		if(jobNatureEnum == PART_TIME){
 | 
	
		
			
				|  |  | +			salary = tenantConfig.get(SysConfigService.PARP_TEACHER_SALARY);
 | 
	
		
			
				|  |  | +			type = tenantConfig.get(SysConfigService.PARP_TEACHER_SALARY_TYPE);
 | 
	
		
			
				|  |  | +		}else if (jobNatureEnum == FULL_TIME){
 | 
	
		
			
				|  |  | +			salary = tenantConfig.get(SysConfigService.FULL_TEACHER_SALARY);
 | 
	
		
			
				|  |  | +			type = tenantConfig.get(SysConfigService.FULL_TEACHER_SALARY_TYPE);
 | 
	
		
			
				|  |  | +		}else if (jobNatureEnum == LABOUR){
 | 
	
		
			
				|  |  | +			salary = tenantConfig.get(SysConfigService.LABOUR_TEACHER_SALARY);
 | 
	
		
			
				|  |  | +			type = tenantConfig.get(SysConfigService.LABOUR_TEACHER_SALARY_TYPE);
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +		if(StringUtils.isNotEmpty(salary) && StringUtils.isNotEmpty(type)){
 | 
	
		
			
				|  |  | +			Integer day = Integer.parseInt(salary);
 | 
	
		
			
				|  |  | +			if(day <= 0){
 | 
	
		
			
				|  |  | +				return;
 | 
	
		
			
				|  |  | +			}
 | 
	
		
			
				|  |  | +			Date date = new Date();
 | 
	
		
			
				|  |  | +			if(type.equals("2")){
 | 
	
		
			
				|  |  | +				//获取上课时间下个月5号
 | 
	
		
			
				|  |  | +				date = DateUtil.addDays(DateUtil.getFirstDayOfMonth(DateUtil.addMonths(classDate, 1)), day);
 | 
	
		
			
				|  |  | +				int i = DateUtil.daysBetween(date,new Date());
 | 
	
		
			
				|  |  | +				if(i > 0){
 | 
	
		
			
				|  |  | +					throw new BizException("超出可申述时间");
 | 
	
		
			
				|  |  | +				}
 | 
	
		
			
				|  |  | +			}else {
 | 
	
		
			
				|  |  | +				//如果课程时间在两天前
 | 
	
		
			
				|  |  | +				int i = DateUtil.daysBetween(classDate, DateUtil.stringToDate(DateUtil.format(date,DateUtil.DEFAULT_PATTERN),DateUtil.DEFAULT_PATTERN));
 | 
	
		
			
				|  |  | +				if(i > --day){
 | 
	
		
			
				|  |  | +					throw new BizException("超出可申述时间");
 | 
	
		
			
				|  |  | +				}
 | 
	
		
			
				|  |  | +			}
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  |  	}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  	@Override
 | 
	
	
		
			
				|  | @@ -785,21 +814,10 @@ public class TeacherAttendanceServiceImpl extends BaseServiceImpl<Long, TeacherA
 | 
	
		
			
				|  |  |  			throw new BizException("考勤正常,无需提交申诉");
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  		Teacher teacher = teacherDao.get(userId);
 | 
	
		
			
				|  |  | -		Date date = new Date();
 | 
	
		
			
				|  |  | -		if(teacher.getJobNature() == PART_TIME){
 | 
	
		
			
				|  |  | -			//获取上课时间下个月5号
 | 
	
		
			
				|  |  | -			date = DateUtil.addDays(DateUtil.getFirstDayOfMonth(DateUtil.addMonths(courseSchedule.getClassDate(), 1)), 5);
 | 
	
		
			
				|  |  | -			int i = DateUtil.daysBetween(date,new Date());
 | 
	
		
			
				|  |  | -			if(i > 0){
 | 
	
		
			
				|  |  | -				throw new BizException("超出可申述时间");
 | 
	
		
			
				|  |  | -			}
 | 
	
		
			
				|  |  | -		}else {
 | 
	
		
			
				|  |  | -			//如果课程时间在两天前
 | 
	
		
			
				|  |  | -			int i = DateUtil.daysBetween(courseSchedule.getClassDate(), DateUtil.stringToDate(DateUtil.format(date,DateUtil.DEFAULT_PATTERN),DateUtil.DEFAULT_PATTERN));
 | 
	
		
			
				|  |  | -			if(i > 1){
 | 
	
		
			
				|  |  | -				throw new BizException("超出可申述时间");
 | 
	
		
			
				|  |  | -			}
 | 
	
		
			
				|  |  | +		if(teacher.getTenantId() == null){
 | 
	
		
			
				|  |  | +			throw new BizException("用户机构信息异常");
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  | +		checkComplaints(teacher.getJobNature(),teacher.getTenantId(),courseSchedule.getClassDate());
 | 
	
		
			
				|  |  |  		if(complaintsType == null){
 | 
	
		
			
				|  |  |  			complaintsType = UpdateAttendanceEnum.ALL;
 | 
	
		
			
				|  |  |  		}
 |