Commit 57181876 by sunxin

人员管理修改区域二级显示

parent 855bc277
......@@ -518,22 +518,22 @@ public class ReportController extends BaseController {
}*/
/*封装拼接移交集团信息*/
String transferGroup = reportEntity.getTransferGroup();
String transferGroup = reportEntity1.getTransferGroup();
if(StringUtils.isNoneBlank(transferGroup)){
if("3437402691677202102".equals(transferGroup)){
reportEntity.setTransferGroup("集团本部");
reportEntity1.setTransferGroup("集团本部");
}else if("3510129313047280678".equals(transferGroup)){
reportEntity.setTransferGroup("区域集团");
reportEntity1.setTransferGroup("区域集团");
}else if("3565898923067676254".equals(transferGroup)){
reportEntity.setTransferGroup("服务集团");
reportEntity1.setTransferGroup("服务集团");
}else if("3806696792996264972".equals(transferGroup)){
reportEntity.setTransferGroup("文化集团");
reportEntity1.setTransferGroup("文化集团");
}else if("3770618512934949260".equals(transferGroup)){
reportEntity.setTransferGroup("文旅集团");
reportEntity1.setTransferGroup("文旅集团");
}
}else{
reportEntity.setTransferGroup("--");
reportEntity1.setTransferGroup("--");
}
if (isAdmin.equals("1") || isAdmin.equals("2")) {
......
......@@ -52,6 +52,16 @@ public class User extends DataEntity<User> {
private String roleId;
private Role role; // 根据角色查询用户条件
private String areaName; //用户所属区域组织名字
public String getAreaName() {
return areaName;
}
public void setAreaName(String areaName) {
this.areaName = areaName;
}
private List<Role> roleList = Lists.newArrayList(); // 拥有角色列表
public String getSupplementGroup() {
......
......@@ -81,6 +81,7 @@
a.update_by AS "updateBy.id",
a.update_date,
a.del_flag,
a.supplement_group AS supplementGroup,
c.name AS "company.name",
c.parent_id AS "company.parent.id",
c.parent_ids AS "company.parentIds",
......@@ -102,7 +103,10 @@
ou.id AS "office.primaryPerson.id",
ou.name AS "office.primaryPerson.name",
ou2.id AS "office.deputyPerson.id",
ou2.name AS "office.deputyPerson.name"<!-- ,
ou2.name AS "office.deputyPerson.name"
<!-- ,
r.id AS "roleList.id",
r.office_id AS "roleList.office.id",
r.name AS "roleList.name",
......@@ -119,9 +123,13 @@
LEFT JOIN ct_bbtc_sys_user cu ON cu.id = c.primary_person
LEFT JOIN ct_bbtc_sys_user cu2 ON cu2.id = c.deputy_person
LEFT JOIN ct_bbtc_sys_user ou ON ou.id = o.primary_person
LEFT JOIN ct_bbtc_sys_user ou2 ON ou2.id = o.deputy_person<!--
LEFT JOIN ct_bbtc_sys_user ou2 ON ou2.id = o.deputy_person
<!--
LEFT JOIN ct_bbtc_sys_user2role ur ON ur.user_id = a.id
LEFT JOIN ct_bbtc_sys_role r ON r.id = ur.role_id -->
LEFT JOIN ct_bbtc_sys_role r ON r.id = ur.role_id
-->
</sql>
<!-- 根据编号获得用户 -->
......@@ -148,9 +156,12 @@
<select id="findList" resultType="User">
SELECT
role.id AS roleId,
cr.name AS areaName,
<include refid="userColumns"/>
FROM ct_bbtc_sys_user a
<include refid="userJoins"/>
LEFT JOIN ct_bbtc_region CR ON a.area = CR.id
<if test="role != null and role.id != null and role.id != ''">
JOIN ct_bbtc_sys_user2role ur ON ur.user_id = a.id AND ur.role_id = #{role.id}
</if>
......@@ -210,9 +221,12 @@
<!-- 查询全部用户 -->
<select id="findAllList" resultType="User">
SELECT
cr.name AS areaName,
<include refid="userColumns"/>
FROM ct_bbtc_sys_user a
<include refid="userJoins"/>
LEFT JOIN ct_bbtc_region CR ON a.area = CR.id
WHERE a.del_flag = #{DEL_FLAG_NORMAL}
ORDER BY c.code, o.code, a.name
</select>
......
......@@ -147,7 +147,7 @@
<label class="control-label">所属区域:</label>
<div class="controls">
<form:select id="supplementArea" path="area" class="input-small required">
<form:option value=" "></form:option>
<form:option value="">请选择</form:option>
<%-- <form:options items="${fns:getDictList('supplement_area')}" itemLabel="label" itemValue="value"
htmlEscape="false"/>--%>
</form:select>
......
......@@ -62,7 +62,7 @@
</form:form>
<sys:message content="${message}"/>
<table id="contentTable" class="table table-striped table-bordered table-condensed">
<thead><tr><%--<th>归属公司</th><th>归属部门</th>--%><th class="sort-column login_name">登录名</th><th class="sort-column name">姓名</th><th>电话</th><th>手机</th><%--<th>角色</th> --%><shiro:hasPermission name="sys:user:edit"><th>操作</th></shiro:hasPermission></tr></thead>
<thead><tr><%--<th>归属公司</th><th>归属部门</th>--%><th class="sort-column login_name">登录名</th><th class="sort-column name">姓名</th><th>所属集团</th><th>所属区域</th><th>电话</th><th>手机</th><%--<th>角色</th> --%><shiro:hasPermission name="sys:user:edit"><th>操作</th></shiro:hasPermission></tr></thead>
<tbody>
<c:forEach items="${page.list}" var="user">
<tr>
......@@ -70,6 +70,15 @@
<td>${user.office.name}</td>--%>
<td><a href="${ctx}/sys/user/form?id=${user.id}">${user.loginName}</a></td>
<td>${user.name}</td>
<td align="center">
<c:if test="${user.supplementGroup eq '3437402691677202102'}">集团本部</c:if>
<c:if test="${user.supplementGroup eq '3510129313047280678'}">区域集团</c:if>
<c:if test="${user.supplementGroup eq '3565898923067676254'}">服务集团</c:if>
<c:if test="${user.supplementGroup eq '3806696792996264972'}">文化集团</c:if>
<c:if test="${user.supplementGroup eq '3770618512934949260'}">文旅集团</c:if>
<c:if test="${user.supplementGroup eq null}">--</c:if>
</td>
<td>${user.areaName}</td>
<td>${user.phone}</td>
<td>${user.mobile}</td><%--
<td>${user.roleNames}</td> --%>
......
No preview for this file type
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