Commit 41d649a9 by 宋祥

1.组织机构叶子节点延伸

parent 49bca2e0
...@@ -11,6 +11,7 @@ import com.baosight.iplat4j.ef.ui.tree.TreeService; ...@@ -11,6 +11,7 @@ import com.baosight.iplat4j.ef.ui.tree.TreeService;
import com.baosight.xservices.xs.service.ServiceXSTreeNode; import com.baosight.xservices.xs.service.ServiceXSTreeNode;
import com.baosight.xservices.xs.util.LoginUserDetails; import com.baosight.xservices.xs.util.LoginUserDetails;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.springframework.util.CollectionUtils;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
...@@ -65,11 +66,14 @@ public class ServiceXSOG0800 extends TreeService { ...@@ -65,11 +66,14 @@ public class ServiceXSOG0800 extends TreeService {
} }
List result = (List)parentOrgMap.get(parentLabel); List result = (List)parentOrgMap.get(parentLabel);
if(CollectionUtils.isEmpty(result)){
return result;
}
for(int i = 0; i < result.size(); ++i) { for(int i = 0; i < result.size(); ++i) {
orgId = (String)((Map)result.get(i)).get("label"); orgId = (String)((Map)result.get(i)).get("label");
String hasChild = parentOrgMap.get(orgId) != null ? "2" : "1"; String hasChild = parentOrgMap.get(orgId) != null ? "2" : "1";
((Map)result.get(i)).put("leaf", hasChild); // ((Map)result.get(i)).put("leaf", hasChild);
((Map)result.get(i)).put("leaf", "0");
} }
return result; return result;
......
...@@ -91,6 +91,10 @@ public class ServiceXSOG0801 extends ServiceBase { ...@@ -91,6 +91,10 @@ public class ServiceXSOG0801 extends ServiceBase {
hashMap.put("orgEname", inInfo.get("inqu_status-0-orgEname")); hashMap.put("orgEname", inInfo.get("inqu_status-0-orgEname"));
hashMap.put("loginName", inInfo.get("inqu_status-0-loginName")); hashMap.put("loginName", inInfo.get("inqu_status-0-loginName"));
hashMap.put("userName", inInfo.get("inqu_status-0-userName")); hashMap.put("userName", inInfo.get("inqu_status-0-userName"));
// 非管理员仅查询所属企业用户 added by songx at 2024-01-16
if (!LoginUserDetails.isUserAdmin(UserSessionUtils.getLoginName())) {
hashMap.put("companyCode", UserSessionUtils.getCompanyCode());
}
List<Map<String, Object>> totalUser = this.dao.query("XSOG0801.queryUserByOrgIdBack", hashMap); List<Map<String, Object>> totalUser = this.dao.query("XSOG0801.queryUserByOrgIdBack", hashMap);
List<Map<String, Object>> userList = new ArrayList(); List<Map<String, Object>> userList = new ArrayList();
List<String> userIdList = new ArrayList(); List<String> userIdList = new ArrayList();
......
...@@ -142,6 +142,9 @@ ...@@ -142,6 +142,9 @@
INNER JOIN ${platSchema}.xs_user xu ON t2.USER_ID = xu.USER_ID INNER JOIN ${platSchema}.xs_user xu ON t2.USER_ID = xu.USER_ID
WHERE WHERE
xu.LOGIN_NAME != 'admin' xu.LOGIN_NAME != 'admin'
<isNotEmpty prepend="AND" property="companyCode">
t1.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend="AND" property="orgCname"> <isNotEmpty prepend="AND" property="orgCname">
t1.ORG_CNAME LIKE ('%$orgCname$%') t1.ORG_CNAME LIKE ('%$orgCname$%')
</isNotEmpty> </isNotEmpty>
......
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