Commit cb1f88a0 by 宋祥

Merge branch 'dev-sx' of http://129.211.46.84:8800/platform/hg-smart into dev

parents c02e2c60 4eb3ebd0
...@@ -308,12 +308,12 @@ public class ServiceHGWD001D extends TreeService { ...@@ -308,12 +308,12 @@ public class ServiceHGWD001D extends TreeService {
* @return * @return
*/ */
public List queryChildNode(String projCode, String parentId, String ename) { public List queryChildNode(String projCode, String parentId, String ename) {
List<Map> results = new ArrayList();
String userId = UserSessionUtils.getLoginName(); String userId = UserSessionUtils.getLoginName();
// 查询项目来源 // 查询项目来源
HGSC001 dbSc001 = HGSCTools.Hgsc001.queryByCode(projCode); HGSC001 dbSc001 = HGSCTools.Hgsc001.queryByCode(projCode);
// true:需要权限 // true:需要权限
boolean isSourceAuth = !ProjectSourceEnum.SPARE.getCode().equals(dbSc001.getProjectSource()); boolean isSourceAuth = !ProjectSourceEnum.SPARE.getCode().equals(dbSc001.getProjectSource());
List<Map> results = new ArrayList();
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("parentId", parentId); queryMap.put("parentId", parentId);
queryMap.put("ename", ename); queryMap.put("ename", ename);
...@@ -321,6 +321,8 @@ public class ServiceHGWD001D extends TreeService { ...@@ -321,6 +321,8 @@ public class ServiceHGWD001D extends TreeService {
if (CollectionUtils.isEmpty(dbWd001s)) { if (CollectionUtils.isEmpty(dbWd001s)) {
return results; return results;
} }
// 是否文档管理员
boolean isManager = HgWdUtils.HgWd009.isManager();
List<String> fileIds = dbWd001s.stream().map(HGWD001::getFileId).distinct().collect(Collectors.toList()); List<String> fileIds = dbWd001s.stream().map(HGWD001::getFileId).distinct().collect(Collectors.toList());
// 查询目录授权人数 // 查询目录授权人数
Map<String, List<HGWD003>> dbWd003Map = HGWDTools.HgWd003.map(fileIds); Map<String, List<HGWD003>> dbWd003Map = HGWDTools.HgWd003.map(fileIds);
...@@ -334,7 +336,7 @@ public class ServiceHGWD001D extends TreeService { ...@@ -334,7 +336,7 @@ public class ServiceHGWD001D extends TreeService {
leafMap.put("type", dbWd001.getFileType()); leafMap.put("type", dbWd001.getFileType());
leafMap.put("leafLevel", dbWd001.getLeafLevel()); leafMap.put("leafLevel", dbWd001.getLeafLevel());
leafMap.put("count", dbWd003s == null ? 0 : dbWd003s.size()); leafMap.put("count", dbWd003s == null ? 0 : dbWd003s.size());
if (isSourceAuth) { if (!isManager && isSourceAuth) {
leafMap.put("isAuth", "1"); leafMap.put("isAuth", "1");
// 从已授权的信息中查找出自己 // 从已授权的信息中查找出自己
HGWD003 dbWd003 = dbWd003s == null ? null : dbWd003s.stream().filter(item HGWD003 dbWd003 = dbWd003s == null ? null : dbWd003s.stream().filter(item
......
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