|
|
|
@ -63,8 +63,17 @@ public class ProjectServiceImpl implements ProjectService { |
|
|
|
// // 存在角色编码为1的 即存在超级管理员 |
|
|
|
// inData.setRoleId(1); |
|
|
|
// } |
|
|
|
String superFlag = sysRoleDao.getSuperFlag(inData.getUserId()); |
|
|
|
boolean shouldApplySuperFlagCondition = inData.getUserName() != null && !inData.getUserName().isEmpty() && !"Y".equals(superFlag); |
|
|
|
List<String> list = sysRoleDao.getSuperFlag(inData.getUserId()); |
|
|
|
boolean superFlag = false; |
|
|
|
if (list != null) { |
|
|
|
for (String s : list) { |
|
|
|
if ("Y".equals(s)) { |
|
|
|
superFlag = true; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
boolean shouldApplySuperFlagCondition = inData.getUserName() != null && !inData.getUserName().isEmpty() && !superFlag; |
|
|
|
IPage<PlmProjectInfoData> resultList = this.projectDao.projectInfoSearch( |
|
|
|
new Page<PlmProjectInfoData>(inData.getPage(), inData.getLimit()), inData, shouldApplySuperFlagCondition); |
|
|
|
|
|
|
|
@ -435,13 +444,23 @@ public class ProjectServiceImpl implements ProjectService { |
|
|
|
String orderClause = conditionMap.get("order"); |
|
|
|
whereClause = (whereClause.isEmpty() ? "site = '" + data.getSite() + "'" : whereClause + " AND site = '" + data.getSite() + "'").trim(); |
|
|
|
orderClause = orderClause.trim(); |
|
|
|
String superFlag = sysRoleDao.getSuperFlag(data.getUserId()); |
|
|
|
Map<String, String> params = new HashMap<>(); |
|
|
|
List<String> list = sysRoleDao.getSuperFlag(data.getUserId()); |
|
|
|
boolean superFlag = false; |
|
|
|
if (list != null) { |
|
|
|
for (String s : list) { |
|
|
|
if ("Y".equals(s)) { |
|
|
|
superFlag = true; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
boolean shouldApplySuperFlagCondition = data.getUserName() != null && !data.getUserName().isEmpty() && !superFlag; |
|
|
|
Map<String, Object> params = new HashMap<>(); |
|
|
|
params.put("whereClause", whereClause); |
|
|
|
params.put("orderClause", orderClause); |
|
|
|
params.put("userName", data.getUserName()); |
|
|
|
params.put("site", data.getSite()); |
|
|
|
params.put("superFlag", superFlag); |
|
|
|
params.put("flag", shouldApplySuperFlagCondition); |
|
|
|
IPage<PlmProjectInfoData> resultList = this.projectDao.projectInfoSearchByAnyField(new Page<PlmProjectInfoData>(data.getNo(), data.getSize()), params); |
|
|
|
return new PageUtils(resultList); |
|
|
|
} |
|
|
|
|