Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
37255a26
Commit
37255a26
authored
Sep 06, 2020
by
季圣华
Browse files
给用户列表增加角色的显示
parent
957583e5
Changes
3
Hide whitespace changes
Inline
Side-by-side
erp_web/pages/manage/user.html
View file @
37255a26
...
@@ -66,7 +66,7 @@
...
@@ -66,7 +66,7 @@
</td>
</td>
</tr>
</tr>
<tr>
<tr>
<td>
部门
</td>
<td>
机构
</td>
<td
style=
"padding:5px"
>
<td
style=
"padding:5px"
>
<input
name=
"orgAbr"
id=
"orgAbr"
class=
"easyui-textbox"
readonly
style=
"width: 120px;"
/>
<input
name=
"orgAbr"
id=
"orgAbr"
class=
"easyui-textbox"
readonly
style=
"width: 120px;"
/>
<a
href=
"javascript:void(0)"
class=
"l-btn l-btn-plain"
group=
""
id=
"lookForSelectOrganization"
>
<a
href=
"javascript:void(0)"
class=
"l-btn l-btn-plain"
group=
""
id=
"lookForSelectOrganization"
>
...
@@ -188,7 +188,6 @@
...
@@ -188,7 +188,6 @@
return
str
;
return
str
;
}
}
},
},
{
title
:
'
登录名称
'
,
field
:
'
loginName
'
,
width
:
80
,
align
:
"
center
"
},
{
{
title
:
'
用户类型
'
,
field
:
'
userType
'
,
width
:
80
,
formatter
:
function
(
value
,
rec
,
index
)
{
title
:
'
用户类型
'
,
field
:
'
userType
'
,
width
:
80
,
formatter
:
function
(
value
,
rec
,
index
)
{
var
str
=
''
;
var
str
=
''
;
...
@@ -202,9 +201,11 @@
...
@@ -202,9 +201,11 @@
return
str
;
return
str
;
}
}
},
},
{
title
:
'
登录名称
'
,
field
:
'
loginName
'
,
width
:
80
,
align
:
"
center
"
},
{
title
:
'
用户姓名
'
,
field
:
'
username
'
,
width
:
80
,
align
:
"
center
"
},
{
title
:
'
用户姓名
'
,
field
:
'
username
'
,
width
:
80
,
align
:
"
center
"
},
{
title
:
'
角色
'
,
field
:
'
roleName
'
,
width
:
80
,
align
:
"
center
"
},
{
title
:
'
职位
'
,
field
:
'
position
'
,
width
:
115
,
align
:
"
center
"
},
{
title
:
'
职位
'
,
field
:
'
position
'
,
width
:
115
,
align
:
"
center
"
},
{
title
:
'
部门
'
,
field
:
'
orgAbr
'
,
width
:
115
,
align
:
"
center
"
},
{
title
:
'
机构
'
,
field
:
'
orgAbr
'
,
width
:
115
,
align
:
"
center
"
},
{
title
:
'
电子邮箱
'
,
field
:
'
email
'
,
width
:
150
,
align
:
"
center
"
},
{
title
:
'
电子邮箱
'
,
field
:
'
email
'
,
width
:
150
,
align
:
"
center
"
},
{
title
:
'
电话号码
'
,
field
:
'
phonenum
'
,
width
:
150
,
align
:
"
center
"
},
{
title
:
'
电话号码
'
,
field
:
'
phonenum
'
,
width
:
150
,
align
:
"
center
"
},
{
title
:
'
用户排序
'
,
field
:
'
userBlngOrgaDsplSeq
'
,
width
:
80
,
align
:
"
center
"
},
{
title
:
'
用户排序
'
,
field
:
'
userBlngOrgaDsplSeq
'
,
width
:
80
,
align
:
"
center
"
},
...
@@ -567,7 +568,7 @@
...
@@ -567,7 +568,7 @@
}
}
});
});
//分配
部门
//分配
仓库
$
(
'
#btnSetDepart
'
).
click
(
function
()
{
$
(
'
#btnSetDepart
'
).
click
(
function
()
{
var
currentRow
=
$
(
"
#tableData
"
).
datagrid
(
"
getSelected
"
);
var
currentRow
=
$
(
"
#tableData
"
).
datagrid
(
"
getSelected
"
);
if
(
currentRow
==
null
)
{
if
(
currentRow
==
null
)
{
...
...
src/main/java/com/jsh/erp/datasource/entities/UserEx.java
View file @
37255a26
...
@@ -16,6 +16,8 @@ public class UserEx extends User{
...
@@ -16,6 +16,8 @@ public class UserEx extends User{
//机构用户关联关系id
//机构用户关联关系id
private
Long
orgaUserRelId
;
private
Long
orgaUserRelId
;
private
String
roleName
;
public
String
getOrgAbr
()
{
public
String
getOrgAbr
()
{
return
orgAbr
;
return
orgAbr
;
}
}
...
@@ -47,4 +49,12 @@ public class UserEx extends User{
...
@@ -47,4 +49,12 @@ public class UserEx extends User{
public
void
setOrgaUserRelId
(
Long
orgaUserRelId
)
{
public
void
setOrgaUserRelId
(
Long
orgaUserRelId
)
{
this
.
orgaUserRelId
=
orgaUserRelId
;
this
.
orgaUserRelId
=
orgaUserRelId
;
}
}
public
String
getRoleName
()
{
return
roleName
;
}
public
void
setRoleName
(
String
roleName
)
{
this
.
roleName
=
roleName
;
}
}
}
src/main/resources/mapper_xml/UserMapperEx.xml
View file @
37255a26
...
@@ -6,12 +6,19 @@
...
@@ -6,12 +6,19 @@
<result
column=
"org_abr"
jdbcType=
"VARCHAR"
property=
"orgAbr"
/>
<result
column=
"org_abr"
jdbcType=
"VARCHAR"
property=
"orgAbr"
/>
<result
column=
"user_blng_orga_dspl_seq"
jdbcType=
"VARCHAR"
property=
"userBlngOrgaDsplSeq"
/>
<result
column=
"user_blng_orga_dspl_seq"
jdbcType=
"VARCHAR"
property=
"userBlngOrgaDsplSeq"
/>
<result
column=
"orgaUserRelId"
jdbcType=
"BIGINT"
property=
"orgaUserRelId"
/>
<result
column=
"orgaUserRelId"
jdbcType=
"BIGINT"
property=
"orgaUserRelId"
/>
<result
column=
"roleName"
jdbcType=
"VARCHAR"
property=
"roleName"
/>
</resultMap>
</resultMap>
<select
id=
"selectByConditionUser"
parameterType=
"com.jsh.erp.datasource.entities.UserExample"
resultMap=
"ResultMapEx"
>
<select
id=
"selectByConditionUser"
parameterType=
"com.jsh.erp.datasource.entities.UserExample"
resultMap=
"ResultMapEx"
>
select user.id, user.username, user.login_name, user.position, user.email, user.phonenum,
select user.id, user.username, user.login_name, user.position, user.email, user.phonenum,
user.description, user.remark,user.isystem,org.id as orgaId,user.tenant_id,org.org_abr,rel.user_blng_orga_dspl_seq,
user.description, user.remark,user.isystem,org.id as orgaId,user.tenant_id,org.org_abr,rel.user_blng_orga_dspl_seq,
rel.id as orgaUserRelId
rel.id as orgaUserRelId
, tb.roleName
FROM jsh_user user
FROM jsh_user user
left join
(
select ub.*,r.name roleName from jsh_user_business ub
inner join jsh_role r on ub.value=concat("[",r.id,"]") and ifnull(r.delete_flag,'0') !='1'
where ub.type='UserRole'
) tb on tb.key_id=user.id
left join jsh_orga_user_rel rel on user.id=rel.user_id and ifnull(rel.delete_flag,'0') !='1'
left join jsh_orga_user_rel rel on user.id=rel.user_id and ifnull(rel.delete_flag,'0') !='1'
left join jsh_organization org on rel.orga_id=org.id and ifnull(org.org_stcd,'0') !='5'
left join jsh_organization org on rel.orga_id=org.id and ifnull(org.org_stcd,'0') !='5'
where 1=1
where 1=1
...
@@ -30,10 +37,13 @@
...
@@ -30,10 +37,13 @@
<select
id=
"countsByUser"
resultType=
"java.lang.Long"
>
<select
id=
"countsByUser"
resultType=
"java.lang.Long"
>
select count(user.id)
select count(user.id)
FROM jsh_user user
FROM jsh_user user
left join jsh_user_business ub on user.id=ub.key_id
left join jsh_role r on ub.value=concat("[",r.id,"]") and ifnull(r.delete_flag,'0') !='1'
left join jsh_orga_user_rel rel on user.id=rel.user_id and ifnull(rel.delete_flag,'0') !='1'
left join jsh_orga_user_rel rel on user.id=rel.user_id and ifnull(rel.delete_flag,'0') !='1'
left join jsh_organization org on rel.orga_id=org.id and ifnull(org.org_stcd,'0') !='5'
left join jsh_organization org on rel.orga_id=org.id and ifnull(org.org_stcd,'0') !='5'
where 1=1
where 1=1
and ifnull(user.status,'0') not in('1','2')
and ifnull(user.status,'0') not in('1','2')
and ub.type='UserRole'
<if
test=
"userName != null"
>
<if
test=
"userName != null"
>
and user.username like '%${userName}%'
and user.username like '%${userName}%'
</if>
</if>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment