Commit 0a92a114 by huluobin

update

parent 1d85b44a
...@@ -45,10 +45,7 @@ import org.springframework.util.StringUtils; ...@@ -45,10 +45,7 @@ import org.springframework.util.StringUtils;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.ArrayList; import java.util.*;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
...@@ -114,7 +111,11 @@ public abstract class AbstractCostService implements CostService { ...@@ -114,7 +111,11 @@ public abstract class AbstractCostService implements CostService {
List<OaUser> oaUserList = oaUserMapper.selectBatchIds(costDomains.stream().map(CostDomain::getCreateUserid).collect(Collectors.toList())); List<OaUser> oaUserList = oaUserMapper.selectBatchIds(costDomains.stream().map(CostDomain::getCreateUserid).collect(Collectors.toList()));
if (ListUtil.isNotEmpty(oaUserList)) { if (ListUtil.isNotEmpty(oaUserList)) {
Map<Integer, OaDepartment> departmentMap = oaDepartmentMapper.selectBatchIds( Map<Integer, OaDepartment> departmentMap = oaDepartmentMapper.selectBatchIds(
oaUserList.stream().map(OaUser::getPrimaryDepartmentId).collect(Collectors.toList())) oaUserList
.stream()
.map(OaUser::getPrimaryDepartmentId)
.filter(Objects::nonNull)
.collect(Collectors.toList()))
.stream() .stream()
.collect(Collectors.toMap(OaDepartment::getDepartmentId, oaDepartment -> oaDepartment)); .collect(Collectors.toMap(OaDepartment::getDepartmentId, oaDepartment -> oaDepartment));
Map<Integer, OaUser> oaUserMap = oaUserList.stream() Map<Integer, OaUser> oaUserMap = oaUserList.stream()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment