|
@@ -279,26 +279,23 @@ public class DegreeRegistrationServiceImpl extends BaseServiceImpl<Integer, Degr
|
|
|
}
|
|
|
// 设置声部
|
|
|
Set<Integer> subjectIdSet = dataList.stream().map(o -> o.getSubjectId()).filter(Objects::nonNull).collect(Collectors.toSet());
|
|
|
-
|
|
|
- List<Subject> subjectList = subjectDao.findBySubjectIds(new ArrayList<>(subjectIdSet));
|
|
|
-
|
|
|
- // id 分组
|
|
|
- Map<Integer, Subject> subjectMap = subjectList.stream().collect(Collectors.toMap(Subject::getId, Function.identity()));
|
|
|
- for (DegreeRegistration degreeRegistration : dataList) {
|
|
|
- if (degreeRegistration.getSubjectId() == null) {
|
|
|
- continue;
|
|
|
- }
|
|
|
- Subject subject = subjectMap.get(degreeRegistration.getSubjectId());
|
|
|
- if (subject != null) {
|
|
|
- degreeRegistration.setSubjectName(subject.getName());
|
|
|
+ if(!CollectionUtils.isEmpty(subjectIdSet)){
|
|
|
+ List<Subject> subjectList = subjectDao.findBySubjectIds(new ArrayList<>(subjectIdSet));
|
|
|
+ Map<Integer, Subject> subjectMap = subjectList.stream().collect(Collectors.toMap(Subject::getId, Function.identity()));
|
|
|
+ for (DegreeRegistration degreeRegistration : dataList) {
|
|
|
+ if (degreeRegistration.getSubjectId() == null) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ Subject subject = subjectMap.get(degreeRegistration.getSubjectId());
|
|
|
+ if (subject != null) {
|
|
|
+ degreeRegistration.setSubjectName(subject.getName());
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
// 设置分部
|
|
|
List<Integer> organIdSet = dataList.stream().map(o -> o.getOrganId()).filter(Objects::nonNull).collect(Collectors.toList());
|
|
|
Integer tenantId = TenantContextHolder.getTenantId();
|
|
|
|
|
|
-
|
|
|
List<Organization> organs = organizationService.findOrgans(organIdSet, tenantId);
|
|
|
|
|
|
if (!CollectionUtils.isEmpty(organs)) {
|
|
@@ -307,8 +304,6 @@ public class DegreeRegistrationServiceImpl extends BaseServiceImpl<Integer, Degr
|
|
|
dataList.forEach(o -> o.setOrganName(organMap.get(o.getOrganId())));
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
DegreeRegistration degree = degreeRegistrationDao.getTotalAmount(params);
|
|
|
pageInfo.setApplyNum(degreeRegistrationDao.countApplyNum(params));
|
|
|
pageInfo.setTotalAmount(degree.getMoney());
|