Commit 4eb3ebd0 by 宋祥

1.文档浏览,管理员可以直接下载

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