OaSettingSyncFilter.jsp
1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<%@ page import="com.api.integration.ldap.bean.LdapBaseBean" %>
<%@ page import="com.api.integration.ldap.service.LdapService" %>
<%--
设置LDAP同步条件
Created by IntelliJ IDEA.
User: SJZ
Date: 2017/6/28
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ include file="/systeminfo/init_wev8.jsp" %>
<%@ taglib uri="/WEB-INF/weaver.tld" prefix="wea" %>
<%
String syncFilter = Util.null2String(request.getParameter("syncFilter"));
if(syncFilter.isEmpty()){
String ldapId = Util.null2String(request.getParameter("ldapId"));
//操作类型 org,user 分别设置组织结构、人员的同步条件
String operType = Util.null2String(request.getParameter("operType"));
LdapService ldapService = new LdapService(user);
LdapBaseBean baseBean = ldapService.queryByLdapId(ldapId);
if("ad".equalsIgnoreCase(baseBean.getLdapType())){
if("org".equals(operType)) {
syncFilter = "(&(objectClass=organizationalUnit))";
}else{
syncFilter = "(&(objectClass=user))";
}
}else{
if("org".equals(operType)) {
syncFilter = "(&(objectClass=organizationalUnit))";
}else{
syncFilter = "(&(objectClass=person))";
}
}
}
%>
<html>
<body>
<div class="zDialog_div_content">
<wea:layout>
<wea:group context='<%=SystemEnv.getHtmlLabelName(32299,user.getLanguage())%>'>
<%--同步条件--%>
<wea:item><%=SystemEnv.getHtmlLabelName(32299, user.getLanguage()) %>
</wea:item>
<wea:item>
<textarea class="inputstyle" style='width:280px!important;' rows="5" id="syncFilter" name="syncFilter"><%=syncFilter%></textarea>
</wea:item>
</wea:group>
</wea:layout>
</div>
</body>
</html>