Commit 87665119 authored by zhuxiang's avatar zhuxiang
Browse files

增加用户名、绩效时间筛选

parent 2e5b6d80
......@@ -35,16 +35,15 @@ public class UserPerformanceController extends BaseController {
private UserPerformanceService userPerformanceService;
@PostMapping("page")
public TableDataInfo page(@RequestBody UserPerformanceDTO userPerformanceDTO){
public TableDataInfo page(@RequestBody UserPerformanceDTO userPerformanceDTO) {
//查看当前登录用户信息
UserEntity user = userService.getById(userPerformanceDTO.getLoginUserId());
if(user.getUserRole().equals(Constant.ADMIN)){
return getDataTable(userPerformanceService.queryList(userPerformanceDTO));
}
if(user.getUserRole().equals(Constant.D_ADMIN)){
if (user.getUserRole().equals(Constant.D_ADMIN)) {
userPerformanceDTO.setDeptId(user.getDeptId());
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));
}
}
......@@ -5,6 +5,8 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* @Author:zhuxiang
* @Package:com.ruzhoukj.sms.model.dto
......@@ -23,4 +25,7 @@ public class UserPerformanceDTO extends UserPerformanceEntity {
@ApiModelProperty(value = "当前登录用户Id")
private String loginUserId;
@ApiModelProperty(value = "用户名")
private String userName;
}
......@@ -24,6 +24,12 @@
<if test="deptId != null and deptId != ''">
and up.dept_id = #{deptId}
</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 != ''">
and up.performance_date = #{performanceDate}
</if>
......
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