处理参考人数问题

develop
zhouj1203@hotmail.com 4 months ago
parent 33aaf13e9d
commit 39f6e1eb8f

@ -60,8 +60,9 @@ public class ArtServiceImpl implements ArtService {
try {
for (ArtElementsVo artElementsVo : artElementsVos) {
List<String> classes1 = artElementsVo.getClasses();
//int stuInClassCount = 0;
int stuInClassCount = 0;
for(String classId : classes1) {
stuInClassCount += (int) rMembers.stream().filter(rMember -> rMember.getClassId().equals(classId)).count();
//stuInClassCount += studentRepository.countByClassIdAndCode(classId, String.format(PK.STUDENT, artFindDto.getCode()));
ArtElementsVo.ClassInfos classInfos = new ArtElementsVo.ClassInfos();
rGroupList.stream().filter(rGroupList1 -> rGroupList1.getId().equals(classId)).findFirst().ifPresent(rGroupList1 -> {
@ -70,7 +71,7 @@ public class ArtServiceImpl implements ArtService {
});
artElementsVo.addClassesInfos(classInfos);
}
artElementsVo.setCount(rMembers.size());
artElementsVo.setCount(stuInClassCount);
}
} catch (Exception e) {

Loading…
Cancel
Save