|
@@ -764,12 +764,20 @@ public class UserServiceImpl extends BaseServiceImpl<UserMapper, User> implement
|
|
|
|
|
|
Set<String> ids = new HashSet<>();
|
|
|
List<String> strings = null;
|
|
|
- if (StringUtil.isNotBlank(id) && SecureUtil.isAdministrator()) {
|
|
|
+ if (SecureUtil.isAdministrator()) {
|
|
|
//查询当前节点的祖级路径和pkid
|
|
|
- String s = "SELECT concat(ancestors_p_id,',',p_key_id) FROM m_wbs_tree_contract WHERE contract_id = " + contractId + " and id = " + id + " limit 1";
|
|
|
+ String s = "SELECT concat(ancestors_p_id,',',p_key_id) FROM m_wbs_tree_contract WHERE contract_id = " + contractId;
|
|
|
if(StringUtil.isNotBlank(contractIdRelation)){
|
|
|
- s = "SELECT concat(ancestors_p_id,',',p_key_id) FROM m_wbs_tree_contract WHERE contract_id = " + contractIdRelation + " and id = " + id + " limit 1";
|
|
|
+ s = "SELECT concat(ancestors_p_id,',',p_key_id) FROM m_wbs_tree_contract WHERE contract_id = " + contractIdRelation;
|
|
|
}
|
|
|
+
|
|
|
+ if(StringUtil.isNotBlank(id)){
|
|
|
+ s += " and id = " + id;
|
|
|
+ } else {
|
|
|
+ s += " and parent_id = 0";
|
|
|
+ }
|
|
|
+
|
|
|
+ s += " limit 1";
|
|
|
try {
|
|
|
String ancestors = jdbcTemplate.queryForObject(s,String.class);
|
|
|
String contractExtendSql = "select a.ancestors from m_wbs_tree_contract_extend a " +
|