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
7ee2fcc3
Commit
7ee2fcc3
authored
Oct 30, 2025
by
wangqi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
项目权限
parent
5a75ef57
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
5 deletions
+41
-5
src/main/java/com/ruoyi/project/ys/controller/YsqqXmxxController.java
+34
-1
src/main/java/com/ruoyi/project/ys/service/impl/YsqqXmxxServiceImpl.java
+1
-1
src/main/resources/mybatis/ysqqXmxx/YsqqXmxxMapper.xml
+6
-3
No files found.
src/main/java/com/ruoyi/project/ys/controller/YsqqXmxxController.java
View file @
7ee2fcc3
...
...
@@ -2,6 +2,10 @@ package com.ruoyi.project.ys.controller;
import
java.util.List
;
import
javax.servlet.http.HttpServletResponse
;
import
com.ruoyi.common.utils.SecurityUtils
;
import
com.ruoyi.common.utils.StringUtils
;
import
com.ruoyi.project.system.domain.SysRole
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
...
@@ -40,6 +44,21 @@ public class YsqqXmxxController extends BaseController
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
YsqqXmxx
ysqqXmxx
)
{
// 系统管理员:看所有。
// 创建人能看到
// 项目成员能看到
ysqqXmxx
.
setCreatedBy
(
SecurityUtils
.
getUserId
()+
""
);
// 拿到角色如果是管理员 不限制。不是管理员只能看到自己的帮扶组
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
);
}
}
}
startPage
();
List
<
YsqqXmxx
>
list
=
ysqqXmxxService
.
selectYsqqXmxxList
(
ysqqXmxx
);
return
getDataTable
(
list
);
...
...
@@ -195,8 +214,22 @@ public class YsqqXmxxController extends BaseController
@GetMapping
(
"/yscgList"
)
public
TableDataInfo
yscgList
(
YsqqXmxx
ysqqXmxx
)
{
// 系统管理员:看所有。
// 创建人能看到
// 项目成员能看到
ysqqXmxx
.
setCreatedBy
(
SecurityUtils
.
getUserId
()+
""
);
// 拿到角色如果是管理员 不限制。不是管理员只能看到自己的帮扶组
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
);
}
}
}
startPage
();
ysqqXmxx
.
setExt1
(
"待验收、已验收(待归档)、已归档'"
);
//
ysqqXmxx.setExt1("待验收、已验收(待归档)、已归档'");
List
<
YsqqXmxx
>
list
=
ysqqXmxxService
.
yscgList
(
ysqqXmxx
);
return
getDataTable
(
list
);
}
...
...
src/main/java/com/ruoyi/project/ys/service/impl/YsqqXmxxServiceImpl.java
View file @
7ee2fcc3
...
...
@@ -64,7 +64,7 @@ public class YsqqXmxxServiceImpl implements IYsqqXmxxService
@Override
public
int
insertYsqqXmxx
(
YsqqXmxx
ysqqXmxx
)
{
ysqqXmxx
.
setCreateBy
(
getUserId
()+
""
);
ysqqXmxx
.
setCreate
d
By
(
getUserId
()+
""
);
ysqqXmxx
.
setCreatedTime
(
DateUtils
.
getNowDate
());
return
ysqqXmxxMapper
.
insertYsqqXmxx
(
ysqqXmxx
);
}
...
...
src/main/resources/mybatis/ysqqXmxx/YsqqXmxxMapper.xml
View file @
7ee2fcc3
...
...
@@ -27,11 +27,14 @@
</resultMap>
<sql
id=
"selectYsqqXmxxVo"
>
select
id, xmmc, qk, xmjj, jhdw, jfdw, xmin, xmax, ymin, ymax, created_by, created_time, update_by, update_time, ext1, ext2, ext3, xmzt, xmrq from ysqq_xmxx
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 from ysqq_xmxx a
</sql>
<select
id=
"selectYsqqXmxxList"
parameterType=
"YsqqXmxx"
resultMap=
"YsqqXmxxResult"
>
<include
refid=
"selectYsqqXmxxVo"
/>
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
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
<where>
<if
test=
"id != null "
>
and id = #{id}
</if>
<if
test=
"xmmc != null and xmmc != ''"
>
and xmmc like concat('%', #{xmmc}, '%')
</if>
...
...
@@ -43,7 +46,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}
</if>
<if
test=
"createdBy != null and createdBy != ''"
>
and
(created_by = #{createdBy} or FIND_IN_SET(#{createdBy},b.cyid))
</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>
...
...
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