Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dizhen
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jiangyun
dizhen
Commits
b6e381d9
Commit
b6e381d9
authored
Oct 31, 2025
by
wangqi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
项目成员
parent
7ee2fcc3
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
68 additions
and
24 deletions
+68
-24
src/main/java/com/ruoyi/project/ys/controller/YsqqXmxxController.java
+14
-4
src/main/java/com/ruoyi/project/ys/domain/YsqqXmxx.java
+32
-0
src/main/java/com/ruoyi/project/ys/domain/YsqqXmxxXmcy.java
+11
-11
src/main/resources/mybatis/ysqqXmxx/YsqqXmxxMapper.xml
+5
-3
src/main/resources/mybatis/ysqqXmxxXmcy/YsqqXmxxXmcyMapper.xml
+6
-6
No files found.
src/main/java/com/ruoyi/project/ys/controller/YsqqXmxxController.java
View file @
b6e381d9
...
...
@@ -47,20 +47,30 @@ public class YsqqXmxxController extends BaseController
// 系统管理员:看所有。
// 创建人能看到
// 项目成员能看到
ysqqXmxx
.
setCreatedBy
(
SecurityUtils
.
getUserId
()+
""
);
// 拿到角色如果是管理员 不限制。不是管理员只能看到自己的帮扶组
boolean
is_admin
=
false
;
// 拿到角色如果是管理员 不限制。不是管理员只能看到自己创建的,或者自己是成员的
List
<
SysRole
>
rolelist
=
SecurityUtils
.
getLoginUser
().
getUser
().
getRoles
();
if
(
StringUtils
.
isNotEmpty
(
rolelist
)){
for
(
SysRole
role
:
rolelist
){
Long
roleid
=
role
.
getRoleId
();
if
(
roleid
==
1
||
roleid
==
3
){
ysqqXmxx
.
setCreatedBy
(
null
)
;
is_admin
=
true
;
}
}
}
if
(
is_admin
){
ysqqXmxx
.
setCreatedBy
(
null
);
}
else
{
ysqqXmxx
.
setCreatedBy
(
SecurityUtils
.
getUserId
()+
""
);
}
startPage
();
List
<
YsqqXmxx
>
list
=
ysqqXmxxService
.
selectYsqqXmxxList
(
ysqqXmxx
);
if
(
is_admin
){
}
else
{
}
return
getDataTable
(
list
);
}
...
...
src/main/java/com/ruoyi/project/ys/domain/YsqqXmxx.java
View file @
b6e381d9
...
...
@@ -345,4 +345,36 @@ public class YsqqXmxx extends BaseEntity
public
void
setZlsl
(
Integer
zlsl
)
{
this
.
zlsl
=
zlsl
;
}
// group by 的成员id
private
String
cyids
;
// group by 的项目角色
private
String
xmjss
;
// 当前登录人的角色
private
String
xmjs
;
public
String
getCyids
()
{
return
cyids
;
}
public
void
setCyids
(
String
cyids
)
{
this
.
cyids
=
cyids
;
}
public
String
getXmjss
()
{
return
xmjss
;
}
public
void
setXmjss
(
String
xmjss
)
{
this
.
xmjss
=
xmjss
;
}
public
String
getXmjs
()
{
return
xmjs
;
}
public
void
setXmjs
(
String
xmjs
)
{
this
.
xmjs
=
xmjs
;
}
}
src/main/java/com/ruoyi/project/ys/domain/YsqqXmxxXmcy.java
View file @
b6e381d9
...
...
@@ -29,8 +29,8 @@ public class YsqqXmxxXmcy extends BaseEntity
private
Long
userId
;
/** 用户账号 */
@Excel
(
name
=
"用户
账号
"
)
private
String
user
Name
;
@Excel
(
name
=
"用户
姓名
"
)
private
String
nick
Name
;
/** 项目角色 */
@Excel
(
name
=
"项目角色"
)
...
...
@@ -87,15 +87,7 @@ public class YsqqXmxxXmcy extends BaseEntity
return
userId
;
}
public
void
setUserName
(
String
userName
)
{
this
.
userName
=
userName
;
}
public
String
getUserName
()
{
return
userName
;
}
public
void
setXmjs
(
String
xmjs
)
{
...
...
@@ -163,7 +155,7 @@ public class YsqqXmxxXmcy extends BaseEntity
.
append
(
"cyid"
,
getCyid
())
.
append
(
"zbid"
,
getZbid
())
.
append
(
"userId"
,
getUserId
())
.
append
(
"
userName"
,
getUser
Name
())
.
append
(
"
nickName"
,
getNick
Name
())
.
append
(
"xmjs"
,
getXmjs
())
.
append
(
"createdBy"
,
getCreatedBy
())
.
append
(
"createdTime"
,
getCreatedTime
())
...
...
@@ -174,4 +166,12 @@ public class YsqqXmxxXmcy extends BaseEntity
.
append
(
"ext3"
,
getExt3
())
.
toString
();
}
public
String
getNickName
()
{
return
nickName
;
}
public
void
setNickName
(
String
nickName
)
{
this
.
nickName
=
nickName
;
}
}
src/main/resources/mybatis/ysqqXmxx/YsqqXmxxMapper.xml
View file @
b6e381d9
...
...
@@ -24,6 +24,8 @@
<result
property=
"ext3"
column=
"ext3"
/>
<result
property=
"xmzt"
column=
"xmzt"
/>
<result
property=
"xmrq"
column=
"xmrq"
/>
<result
property=
"cyids"
column=
"cyids"
/>
<result
property=
"xmjss"
column=
"xmjss"
/>
</resultMap>
<sql
id=
"selectYsqqXmxxVo"
>
...
...
@@ -32,9 +34,9 @@
<select
id=
"selectYsqqXmxxList"
parameterType=
"YsqqXmxx"
resultMap=
"YsqqXmxxResult"
>
select a.id, a.xmmc, a.qk, a.xmjj, a.jhdw, a.jfdw, a.xmin, a.xmax, a.ymin, a.ymax,
a.created_by, a.created_time, a.update_by, a.update_time, a.ext1, a.ext2, a.ext3, a.xmzt, a.xmrq,b.cyid
a.created_by, a.created_time, a.update_by, a.update_time, a.ext1, a.ext2, a.ext3, a.xmzt, a.xmrq,b.cyid
s,b.xmjss
from ysqq_xmxx a
left join (select zbid,GROUP_CONCAT(user_id) cyid from ysqq_xmxx_xmcy group by zbid) b on a.id = b.zbid
left join (select zbid,GROUP_CONCAT(user_id) cyid
s ,GROUP_CONCAT(xmjs) xmjss
from ysqq_xmxx_xmcy group by zbid) b on a.id = b.zbid
<where>
<if
test=
"id != null "
>
and id = #{id}
</if>
<if
test=
"xmmc != null and xmmc != ''"
>
and xmmc like concat('%', #{xmmc}, '%')
</if>
...
...
@@ -46,7 +48,7 @@
<if
test=
"xmax != null "
>
and xmax = #{xmax}
</if>
<if
test=
"ymin != null "
>
and ymin = #{ymin}
</if>
<if
test=
"ymax != null "
>
and ymax = #{ymax}
</if>
<if
test=
"createdBy != null and createdBy != ''"
>
and (created_by = #{createdBy} or FIND_IN_SET(#{createdBy},b.cyid))
</if>
<if
test=
"createdBy != null and createdBy != ''"
>
and (created_by = #{createdBy} or FIND_IN_SET(#{createdBy},b.cyid
s
))
</if>
<if
test=
"createdTime != null "
>
and created_time = #{createdTime}
</if>
<if
test=
"ext1 != null and ext1 != ''"
>
and xmzt in ('待验收','已验收(待归档)','已归档')
</if>
<if
test=
"ext2 != null and ext2 != ''"
>
and xmzt in ('已验收(待归档)','已归档')
</if>
...
...
src/main/resources/mybatis/ysqqXmxxXmcy/YsqqXmxxXmcyMapper.xml
View file @
b6e381d9
...
...
@@ -8,7 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"cyid"
column=
"cyid"
/>
<result
property=
"zbid"
column=
"zbid"
/>
<result
property=
"userId"
column=
"user_id"
/>
<result
property=
"
userName"
column=
"user
_name"
/>
<result
property=
"
nickName"
column=
"nick
_name"
/>
<result
property=
"xmjs"
column=
"xmjs"
/>
<result
property=
"createdBy"
column=
"created_by"
/>
<result
property=
"createdTime"
column=
"created_time"
/>
...
...
@@ -20,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql
id=
"selectYsqqXmxxXmcyVo"
>
select cyid, zbid, user_id,
user
_name, xmjs, created_by, created_time, update_by, update_time, ext1, ext2, ext3 from ysqq_xmxx_xmcy
select cyid, zbid, user_id,
nick
_name, xmjs, created_by, created_time, update_by, update_time, ext1, ext2, ext3 from ysqq_xmxx_xmcy
</sql>
<select
id=
"selectYsqqXmxxXmcyList"
parameterType=
"YsqqXmxxXmcy"
resultMap=
"YsqqXmxxXmcyResult"
>
...
...
@@ -28,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where>
<if
test=
"zbid != null "
>
and zbid = #{zbid}
</if>
<if
test=
"userId != null "
>
and user_id = #{userId}
</if>
<if
test=
"
userName != null and userName != ''"
>
and user_name like concat('%', #{user
Name}, '%')
</if>
<if
test=
"
nickName != null and nickName != ''"
>
and nick_name like concat('%', #{nick
Name}, '%')
</if>
<if
test=
"xmjs != null and xmjs != ''"
>
and xmjs = #{xmjs}
</if>
<if
test=
"createdBy != null and createdBy != ''"
>
and created_by = #{createdBy}
</if>
<if
test=
"createdTime != null "
>
and created_time = #{createdTime}
</if>
...
...
@@ -48,7 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"zbid != null"
>
zbid,
</if>
<if
test=
"userId != null"
>
user_id,
</if>
<if
test=
"
userName != null"
>
user
_name,
</if>
<if
test=
"
nickName != null"
>
nick
_name,
</if>
<if
test=
"xmjs != null"
>
xmjs,
</if>
<if
test=
"createdBy != null"
>
created_by,
</if>
<if
test=
"createdTime != null"
>
created_time,
</if>
...
...
@@ -61,7 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"zbid != null"
>
#{zbid},
</if>
<if
test=
"userId != null"
>
#{userId},
</if>
<if
test=
"
userName != null"
>
#{user
Name},
</if>
<if
test=
"
nickName != null"
>
#{nick
Name},
</if>
<if
test=
"xmjs != null"
>
#{xmjs},
</if>
<if
test=
"createdBy != null"
>
#{createdBy},
</if>
<if
test=
"createdTime != null"
>
#{createdTime},
</if>
...
...
@@ -78,7 +78,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"zbid != null"
>
zbid = #{zbid},
</if>
<if
test=
"userId != null"
>
user_id = #{userId},
</if>
<if
test=
"
userName != null"
>
user_name = #{user
Name},
</if>
<if
test=
"
nickName != null"
>
nick_name = #{nick
Name},
</if>
<if
test=
"xmjs != null"
>
xmjs = #{xmjs},
</if>
<if
test=
"createdBy != null"
>
created_by = #{createdBy},
</if>
<if
test=
"createdTime != null"
>
created_time = #{createdTime},
</if>
...
...
Write
Preview
Markdown
is supported
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