|
@@ -72,7 +72,7 @@ public class QwSopTempController extends BaseController
|
|
|
// 收集所有需要查询的用户ID
|
|
// 收集所有需要查询的用户ID
|
|
|
Set<Long> userIds = list.stream()
|
|
Set<Long> userIds = list.stream()
|
|
|
.map(QwSopTemp::getCreateBy)
|
|
.map(QwSopTemp::getCreateBy)
|
|
|
- .filter(StringUtil::strIsNullOrEmpty)
|
|
|
|
|
|
|
+ .filter(str -> !StringUtil.strIsNullOrEmpty(str)) // 取反,保留非空值
|
|
|
.map(Long::valueOf)
|
|
.map(Long::valueOf)
|
|
|
.collect(Collectors.toSet());
|
|
.collect(Collectors.toSet());
|
|
|
|
|
|
|
@@ -149,11 +149,20 @@ public class QwSopTempController extends BaseController
|
|
|
Long deptId = loginUser.getUser().getDeptId();
|
|
Long deptId = loginUser.getUser().getDeptId();
|
|
|
if (deptId!=null){
|
|
if (deptId!=null){
|
|
|
combinedDpetList.add(deptId);
|
|
combinedDpetList.add(deptId);
|
|
|
|
|
+
|
|
|
|
|
+ //本部门的上级部门
|
|
|
|
|
+ List<Long> deptList = companyDeptService.selectCompanyDeptByDeptId(deptId);
|
|
|
|
|
+ if (!deptList.isEmpty()){
|
|
|
|
|
+ combinedDpetList.addAll(deptList);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
//本部门的下级部门
|
|
//本部门的下级部门
|
|
|
- List<Long> deptList = companyDeptService.selectCompanyDeptByParentId(deptId);
|
|
|
|
|
- if (!deptList.isEmpty()){
|
|
|
|
|
- combinedDpetList.addAll(deptList);
|
|
|
|
|
|
|
+ List<Long> parentList = companyDeptService.selectCompanyDeptByParentId(deptId);
|
|
|
|
|
+ if (!parentList.isEmpty()){
|
|
|
|
|
+ combinedDpetList.addAll(parentList);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
List<Long> userIds = companyUserService.selectCompanyQwUserByDept(combinedDpetList, loginUser.getUser().getUserType());
|
|
List<Long> userIds = companyUserService.selectCompanyQwUserByDept(combinedDpetList, loginUser.getUser().getUserType());
|
|
@@ -166,6 +175,34 @@ public class QwSopTempController extends BaseController
|
|
|
startPage();
|
|
startPage();
|
|
|
// List<QwSopTemp> list = qwSopTempService.selectQwSopTempList(qwSopTemp);
|
|
// List<QwSopTemp> list = qwSopTempService.selectQwSopTempList(qwSopTemp);
|
|
|
List<QwSopTemp> list = qwSopTempService.selectQwSopTempListNew(qwSopTemp);
|
|
List<QwSopTemp> list = qwSopTempService.selectQwSopTempListNew(qwSopTemp);
|
|
|
|
|
+
|
|
|
|
|
+ // 收集所有需要查询的用户ID
|
|
|
|
|
+ Set<Long> createBys = list.stream()
|
|
|
|
|
+ .map(QwSopTemp::getCreateBy)
|
|
|
|
|
+ .filter(str -> !StringUtil.strIsNullOrEmpty(str)) // 取反,保留非空值
|
|
|
|
|
+ .map(Long::valueOf)
|
|
|
|
|
+ .collect(Collectors.toSet());
|
|
|
|
|
+
|
|
|
|
|
+ if (!userIds.isEmpty()){
|
|
|
|
|
+ // 批量查询用户信息
|
|
|
|
|
+ Map<Long, DocCompanyUserVO> userMap = companyUserService
|
|
|
|
|
+ .selectDocCompanyUserListByUserIds(createBys)
|
|
|
|
|
+ .stream()
|
|
|
|
|
+ .collect(Collectors.toMap(DocCompanyUserVO::getUserId, Function.identity()));
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ list.forEach(item->{
|
|
|
|
|
+
|
|
|
|
|
+ if (!StringUtil.strIsNullOrEmpty(item.getCreateBy())) {
|
|
|
|
|
+ DocCompanyUserVO user = userMap.get(Long.valueOf(item.getCreateBy()));
|
|
|
|
|
+ if (user != null) {
|
|
|
|
|
+ item.setCreateByName(user.getNickName());
|
|
|
|
|
+ item.setCreateByDeptName(user.getDeptName());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
return getDataTable(list);
|
|
return getDataTable(list);
|
|
|
}
|
|
}
|
|
|
|
|
|