Commit adfbba97 by liuyang

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

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