Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
邬吉朋
ops
Commits
87665119
Commit
87665119
authored
May 07, 2025
by
zhuxiang
Browse files
增加用户名、绩效时间筛选
parent
2e5b6d80
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/main/java/com/ruzhoukj/sms/controller/UserPerformanceController.java
View file @
87665119
...
@@ -35,16 +35,15 @@ public class UserPerformanceController extends BaseController {
...
@@ -35,16 +35,15 @@ public class UserPerformanceController extends BaseController {
private
UserPerformanceService
userPerformanceService
;
private
UserPerformanceService
userPerformanceService
;
@PostMapping
(
"page"
)
@PostMapping
(
"page"
)
public
TableDataInfo
page
(
@RequestBody
UserPerformanceDTO
userPerformanceDTO
){
public
TableDataInfo
page
(
@RequestBody
UserPerformanceDTO
userPerformanceDTO
)
{
//查看当前登录用户信息
//查看当前登录用户信息
UserEntity
user
=
userService
.
getById
(
userPerformanceDTO
.
getLoginUserId
());
UserEntity
user
=
userService
.
getById
(
userPerformanceDTO
.
getLoginUserId
());
if
(
user
.
getUserRole
().
equals
(
Constant
.
ADMIN
)){
if
(
user
.
getUserRole
().
equals
(
Constant
.
D_ADMIN
))
{
return
getDataTable
(
userPerformanceService
.
queryList
(
userPerformanceDTO
));
}
if
(
user
.
getUserRole
().
equals
(
Constant
.
D_ADMIN
)){
userPerformanceDTO
.
setDeptId
(
user
.
getDeptId
());
userPerformanceDTO
.
setDeptId
(
user
.
getDeptId
());
return
getDataTable
(
userPerformanceService
.
queryList
(
userPerformanceDTO
));
return
getDataTable
(
userPerformanceService
.
queryList
(
userPerformanceDTO
));
}
else
if
(!
user
.
getUserRole
().
equals
(
Constant
.
ADMIN
))
{
userPerformanceDTO
.
setUserId
(
user
.
getId
());
}
}
return
getDataTable
(
Lists
.
newArrayList
(
));
return
getDataTable
(
userPerformanceService
.
queryList
(
userPerformanceDTO
));
}
}
}
}
src/main/java/com/ruzhoukj/sms/model/dto/UserPerformanceDTO.java
View file @
87665119
...
@@ -5,6 +5,8 @@ import io.swagger.annotations.ApiModelProperty;
...
@@ -5,6 +5,8 @@ import io.swagger.annotations.ApiModelProperty;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
/**
/**
* @Author:zhuxiang
* @Author:zhuxiang
* @Package:com.ruzhoukj.sms.model.dto
* @Package:com.ruzhoukj.sms.model.dto
...
@@ -23,4 +25,7 @@ public class UserPerformanceDTO extends UserPerformanceEntity {
...
@@ -23,4 +25,7 @@ public class UserPerformanceDTO extends UserPerformanceEntity {
@ApiModelProperty
(
value
=
"当前登录用户Id"
)
@ApiModelProperty
(
value
=
"当前登录用户Id"
)
private
String
loginUserId
;
private
String
loginUserId
;
@ApiModelProperty
(
value
=
"用户名"
)
private
String
userName
;
}
}
src/main/resources/com/ruzhoukj/sms/dao/UserPerformanceDao.xml
View file @
87665119
...
@@ -24,6 +24,12 @@
...
@@ -24,6 +24,12 @@
<if
test=
"deptId != null and deptId != ''"
>
<if
test=
"deptId != null and deptId != ''"
>
and up.dept_id = #{deptId}
and up.dept_id = #{deptId}
</if>
</if>
<if
test=
"userId != null and userId != ''"
>
and up.user_id = #{userId}
</if>
<if
test=
"userName != null and userName != ''"
>
and u.name like concat('%',#{userName},'%')
</if>
<if
test=
"performanceDate != null and performanceDate != ''"
>
<if
test=
"performanceDate != null and performanceDate != ''"
>
and up.performance_date = #{performanceDate}
and up.performance_date = #{performanceDate}
</if>
</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