Commit adfbba97 by liuyang

2024-09-23 文档库增加项目过滤

parent 3a2c1556
...@@ -112,6 +112,8 @@ public class CommonConstant { ...@@ -112,6 +112,8 @@ public class CommonConstant {
public static final String COMPANY_MANAGE = "companyManage"; public static final String COMPANY_MANAGE = "companyManage";
// ADMIN // ADMIN
public static final String ADMIN = "ADMIN"; public static final String ADMIN = "ADMIN";
public static final String ENAME = "ename";
} }
/** /**
......
...@@ -62,6 +62,9 @@ ...@@ -62,6 +62,9 @@
<isNotEmpty prepend=" AND " property="projType"> <isNotEmpty prepend=" AND " property="projType">
proj_type = #projType# proj_type = #projType#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="ename">
proj_name like concat('%', #ename#, '%') or proj_code like concat('%', #ename#, '%')
</isNotEmpty>
</sql> </sql>
<sql id="customCondition"> <sql id="customCondition">
......
...@@ -208,10 +208,11 @@ public class ServiceHGWD001D extends TreeService { ...@@ -208,10 +208,11 @@ public class ServiceHGWD001D extends TreeService {
try { try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo); Map queryMap = EiInfoUtils.getFirstRow(inInfo);
String node = MapUtils.getString(queryMap, CommonConstant.Field.NODE); String node = MapUtils.getString(queryMap, CommonConstant.Field.NODE);
String ename = MapUtils.getString(queryMap, CommonConstant.Field.ENAME);
if (CommonConstant.Field.ROOT.equals(node) || CommonConstant.Field.ROOT2.equals(node)) { if (CommonConstant.Field.ROOT.equals(node) || CommonConstant.Field.ROOT2.equals(node)) {
inInfo.addBlock(node).setRows(queryTopNode(node)); inInfo.addBlock(node).setRows(queryTopNode(node, ename));
} else { } else {
inInfo.addBlock(node).setRows(queryChildNode(node)); inInfo.addBlock(node).setRows(queryChildNode(node,ename));
} }
} catch (Exception e) { } catch (Exception e) {
LogUtils.setMsg(inInfo, e, "查询节点失败"); LogUtils.setMsg(inInfo, e, "查询节点失败");
...@@ -224,9 +225,10 @@ public class ServiceHGWD001D extends TreeService { ...@@ -224,9 +225,10 @@ public class ServiceHGWD001D extends TreeService {
* *
* @return * @return
*/ */
public List queryTopNode(String parentId) { public List queryTopNode(String parentId,String ename) {
List<Map> results = new ArrayList(); List<Map> results = new ArrayList();
Map queryMap = new HashMap<>(); Map queryMap = new HashMap<>();
queryMap.put("ename", ename);
// 非管理员仅查询自己有权限的项目 // 非管理员仅查询自己有权限的项目
String userId = UserSessionUtils.getLoginName(); String userId = UserSessionUtils.getLoginName();
if (!HgWdUtils.HgWd009.isManager(userId)) { if (!HgWdUtils.HgWd009.isManager(userId)) {
...@@ -257,10 +259,11 @@ public class ServiceHGWD001D extends TreeService { ...@@ -257,10 +259,11 @@ public class ServiceHGWD001D extends TreeService {
* @param parentId * @param parentId
* @return * @return
*/ */
public List queryChildNode(String parentId) { public List queryChildNode(String parentId,String ename) {
List<Map> results = new ArrayList(); 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);
List<HGWD001> dbWd001s = dao.query(HGWD001.QUERY, queryMap); List<HGWD001> dbWd001s = dao.query(HGWD001.QUERY, queryMap);
if (CollectionUtils.isEmpty(dbWd001s)) { if (CollectionUtils.isEmpty(dbWd001s)) {
return results; return results;
......
...@@ -97,6 +97,9 @@ ...@@ -97,6 +97,9 @@
<isNotEmpty prepend=" AND " property="releaseDate"> <isNotEmpty prepend=" AND " property="releaseDate">
RELEASE_DATE = #releaseDate# RELEASE_DATE = #releaseDate#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="ename">
PROJ_NAME like concat('%', #ename#, '%') or PROJ_CODE like concat('%', #ename#, '%')
</isNotEmpty>
</sql> </sql>
<sql id="customCondition"> <sql id="customCondition">
......
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