瀏覽代碼

feat:服务指标未完成提醒

Joburgess 4 年之前
父節點
當前提交
fb29f4b88c

+ 7 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentExtracurricularExercisesSituationServiceImpl.java

@@ -185,9 +185,9 @@ public class StudentExtracurricularExercisesSituationServiceImpl extends BaseSer
 		PageInfo<TeacherServeDto> pageInfo = new PageInfo<>(queryInfo.getPage(), queryInfo.getRows());
 		Map<String, Object> params = new HashMap<>();
 		MapUtil.populateMap(params, queryInfo);
+		List<Long> rightServeIds = findTeacherRightServeIds(queryInfo.getMonday(), queryInfo.getSunday());
 		if(Objects.nonNull(queryInfo.getUnDone())){
-			List<Long> serveIds = findTeacherRightServeIds(queryInfo.getMonday(), queryInfo.getSunday());
-			params.put("rightServeIds", serveIds);
+			params.put("rightServeIds", rightServeIds);
 		}
 
 		List<TeacherServeDto> dataList = null;
@@ -211,15 +211,20 @@ public class StudentExtracurricularExercisesSituationServiceImpl extends BaseSer
 				if(teacherServeMap.containsKey(teacherServeDto.getTeacherId())){
 					List<StudentExtracurricularExercisesSituation> tss = teacherServeMap.get(teacherServeDto.getTeacherId());
 					Set<Long> courseIds = new HashSet<>();
+					boolean done = true;
 					for (StudentExtracurricularExercisesSituation ts : tss) {
 						if(StringUtils.isBlank(ts.getCourseIds())){
 							continue;
 						}
 						Set<Long> ids = Arrays.stream(ts.getCourseIds().split(",")).map(s -> Long.valueOf(s)).collect(Collectors.toSet());
 						courseIds.addAll(ids);
+						if(!rightServeIds.contains(ts.getId())){
+							done = false;
+						}
 					}
 					teacherServeDto.setHomeworkNum(courseIds.size());
 				}
+				teacherServeDto.setUnDone(1);
 				String mondayStr = DateUtil.dateToString(teacherServeDto.getMonday(), "yyyy-MM-dd");
 				if(!mondayTeacherRemindMap.containsKey(mondayStr)){
 					continue;