Commit 1eac97df by 春觉晓

优化员工课程明细,处理是否及格标识逻辑

1 parent 5a447e8d
......@@ -176,7 +176,7 @@ public class LearningCenterCourseService {
departmentMap = departmentList.stream().collect(Collectors.toMap(BeiSenOrganization::getOId, Function.identity()));
}
//查询职务信息
List<String> jobPostIds = staffList.stream().filter(x -> x.getOIdJobPostId() != null).map(BeiSenEmployeeListResonseDTO::getOIdJobPostId).collect(Collectors.toList());
List<String> jobPostIds = staffList.stream().filter(x -> StringUtils.isNotBlank(x.getOIdJobPostId())).map(BeiSenEmployeeListResonseDTO::getOIdJobPostId).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(jobPostIds)) {
List<BeiSenJobPost> jobPostList = beiSenJobPostMapper.selectJobPostByOId(jobPostIds);
//将职务列表转为以职务id为key 的map
......@@ -185,10 +185,13 @@ public class LearningCenterCourseService {
//填充员工信息
for (CourseDetailPageInfo x : list) {
//设置是否及格
if (x.getMaxScore().compareTo(passScore) >= 0) {
x.setPassFlag(1);
} else {
x.setPassFlag(0);
BigDecimal maxScore = x.getMaxScore();
if (maxScore != null) {
if (maxScore.compareTo(passScore) >= 0) {
x.setPassFlag(1);
} else {
x.setPassFlag(0);
}
}
//设置员工信息
BeiSenEmployeeListResonseDTO staff = staffMap.get(x.getUserId());
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!