Merge branch 'dev'
This commit is contained in:
commit
2ffe4948cf
|
@ -33,7 +33,11 @@ public class RejectController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private SysUserService sysUserService;
|
private SysUserService sysUserService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param taskId 驳回到第一节点的当前task
|
||||||
|
* @param params 尝试更新表单
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
@PostMapping("relaunch/{taskId}")
|
@PostMapping("relaunch/{taskId}")
|
||||||
@ApiOperation("携带更新后的表单重新发起流程")
|
@ApiOperation("携带更新后的表单重新发起流程")
|
||||||
@LogOperation("携带更新后的表单重新发起流程")
|
@LogOperation("携带更新后的表单重新发起流程")
|
||||||
|
@ -54,7 +58,7 @@ public class RejectController {
|
||||||
taskService.removeVariable(task.getId(), "parameterContent");
|
taskService.removeVariable(task.getId(), "parameterContent");
|
||||||
taskService.removeVariable(task.getId(), "resourceDTO");
|
taskService.removeVariable(task.getId(), "resourceDTO");
|
||||||
taskService.setVariables(task.getId(), combineResultMap); // 更新
|
taskService.setVariables(task.getId(), combineResultMap); // 更新
|
||||||
logger.error("-----------{}", JSON.toJSONString(combineResultMap));
|
logger.info("携带更新后的表单重新发起流程:{}", JSON.toJSONString(combineResultMap));
|
||||||
taskService.setVariable(task.getId(), "backToFirst", Boolean.FALSE); // 标识驳回标签false
|
taskService.setVariable(task.getId(), "backToFirst", Boolean.FALSE); // 标识驳回标签false
|
||||||
taskService.setVariable(task.getId(), "completeEntry", Boolean.FALSE); // 标志为非首次录入
|
taskService.setVariable(task.getId(), "completeEntry", Boolean.FALSE); // 标志为非首次录入
|
||||||
taskService.setVariable(task.getId(), "reject", Boolean.FALSE); // 标识流程中是否存在拒绝false
|
taskService.setVariable(task.getId(), "reject", Boolean.FALSE); // 标识流程中是否存在拒绝false
|
||||||
|
@ -64,7 +68,7 @@ public class RejectController {
|
||||||
String name = userDTOOptional.isPresent() ? userDTOOptional.get().getRealName() : "";
|
String name = userDTOOptional.isPresent() ? userDTOOptional.get().getRealName() : "";
|
||||||
actTaskService.completeTask(task.getId(), name + "重新发起审核");
|
actTaskService.completeTask(task.getId(), name + "重新发起审核");
|
||||||
result.set(new Result().ok(name + "重新发起审核成功"));
|
result.set(new Result().ok(name + "重新发起审核成功"));
|
||||||
logger.error("{}重新发起审核成功", name);
|
logger.info("{} 重新发起审核成功", name);
|
||||||
});
|
});
|
||||||
return result.get();
|
return result.get();
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,7 +52,8 @@ public class SysAuditTeamController {
|
||||||
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType = "int"),
|
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType = "int"),
|
||||||
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query", required = true, dataType = "int"),
|
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query", required = true, dataType = "int"),
|
||||||
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType = "String"),
|
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType = "String"),
|
||||||
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType = "String")
|
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "name", value = "根据审核组名称模糊查", paramType = "query", dataType = "String")
|
||||||
})
|
})
|
||||||
// @RequiresPermissions("audit_team:sysauditteam:page")
|
// @RequiresPermissions("audit_team:sysauditteam:page")
|
||||||
public Result<PageData<SysAuditTeamDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params) {
|
public Result<PageData<SysAuditTeamDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params) {
|
||||||
|
|
|
@ -32,5 +32,7 @@ public class SysAuditTeamDTO implements Serializable {
|
||||||
private List<Map> member;
|
private List<Map> member;
|
||||||
@ApiModelProperty(value = "审核组索引")
|
@ApiModelProperty(value = "审核组索引")
|
||||||
private String index;
|
private String index;
|
||||||
|
@ApiModelProperty(value = "审核组备注内容")
|
||||||
|
private String description;
|
||||||
|
|
||||||
}
|
}
|
|
@ -39,4 +39,9 @@ public class SysAuditTeamEntity extends BaseEntity implements Serializable {
|
||||||
*/
|
*/
|
||||||
@TableField(value = "`index`")
|
@TableField(value = "`index`")
|
||||||
private String index;
|
private String index;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核组备注内容
|
||||||
|
*/
|
||||||
|
private String description;
|
||||||
}
|
}
|
|
@ -1,6 +1,7 @@
|
||||||
package io.renren.modules.audit_team.service.impl;
|
package io.renren.modules.audit_team.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||||
import io.renren.common.service.impl.CrudServiceImpl;
|
import io.renren.common.service.impl.CrudServiceImpl;
|
||||||
import io.renren.modules.audit_team.dao.SysAuditTeamDao;
|
import io.renren.modules.audit_team.dao.SysAuditTeamDao;
|
||||||
import io.renren.modules.audit_team.dto.SysAuditTeamDTO;
|
import io.renren.modules.audit_team.dto.SysAuditTeamDTO;
|
||||||
|
@ -23,8 +24,15 @@ public class SysAuditTeamServiceImpl extends CrudServiceImpl<SysAuditTeamDao, Sy
|
||||||
@Override
|
@Override
|
||||||
public QueryWrapper<SysAuditTeamEntity> getWrapper(Map<String, Object> params) {
|
public QueryWrapper<SysAuditTeamEntity> getWrapper(Map<String, Object> params) {
|
||||||
QueryWrapper<SysAuditTeamEntity> wrapper = new QueryWrapper<>();
|
QueryWrapper<SysAuditTeamEntity> wrapper = new QueryWrapper<>();
|
||||||
|
params.keySet().stream().filter(index -> null != params.get(index)).forEach(index -> {
|
||||||
|
switch (index) {
|
||||||
|
case "name":
|
||||||
|
wrapper.like(StringUtils.isNotBlank(params.get("name").toString()), "name", params.get("name").toString());
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
});
|
||||||
return wrapper;
|
return wrapper;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,12 +16,10 @@ import io.renren.modules.security.user.SecurityUser;
|
||||||
import io.renren.modules.security.user.UserDetail;
|
import io.renren.modules.security.user.UserDetail;
|
||||||
import io.renren.modules.sys.dto.PasswordDTO;
|
import io.renren.modules.sys.dto.PasswordDTO;
|
||||||
import io.renren.modules.sys.dto.SysDeptDTO;
|
import io.renren.modules.sys.dto.SysDeptDTO;
|
||||||
|
import io.renren.modules.sys.dto.SysRoleDTO;
|
||||||
import io.renren.modules.sys.dto.SysUserDTO;
|
import io.renren.modules.sys.dto.SysUserDTO;
|
||||||
import io.renren.modules.sys.excel.SysUserExcel;
|
import io.renren.modules.sys.excel.SysUserExcel;
|
||||||
import io.renren.modules.sys.service.SysDeptService;
|
import io.renren.modules.sys.service.*;
|
||||||
import io.renren.modules.sys.service.SysRoleUserService;
|
|
||||||
import io.renren.modules.sys.service.SysUserPostService;
|
|
||||||
import io.renren.modules.sys.service.SysUserService;
|
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiImplicitParams;
|
import io.swagger.annotations.ApiImplicitParams;
|
||||||
|
@ -29,10 +27,12 @@ import io.swagger.annotations.ApiOperation;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import springfox.documentation.annotations.ApiIgnore;
|
import springfox.documentation.annotations.ApiIgnore;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -54,6 +54,20 @@ public class SysUserController {
|
||||||
private SysRoleUserService sysRoleUserService;
|
private SysRoleUserService sysRoleUserService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private SysDeptService sysDeptService;
|
private SysDeptService sysDeptService;
|
||||||
|
@Autowired
|
||||||
|
private SysRoleService sysRoleService;
|
||||||
|
|
||||||
|
@Value("${big_date.assignee_role_name}")
|
||||||
|
private String roleName0; // 具备审批的角色名称(普通)
|
||||||
|
|
||||||
|
@Value("${big_date.assignee_district_role_name}")
|
||||||
|
private String roleName1; // 具备审批的角色名称(区县)
|
||||||
|
@Value("${big_date.assignee_city_role_name}")
|
||||||
|
private String roleName2; // 具备审批的角色名称(市区)
|
||||||
|
|
||||||
|
@Value("${big_date.assignee_meet_role_id}")
|
||||||
|
private String defaultAssigneeRoleId; // 会客厅审核人角色
|
||||||
|
|
||||||
|
|
||||||
@GetMapping("page")
|
@GetMapping("page")
|
||||||
@ApiOperation("分页")
|
@ApiOperation("分页")
|
||||||
|
@ -223,4 +237,41 @@ public class SysUserController {
|
||||||
public Result getApproverUnconfiguredRegion(@ApiIgnore @RequestParam Map<String, Object> params) {
|
public Result getApproverUnconfiguredRegion(@ApiIgnore @RequestParam Map<String, Object> params) {
|
||||||
return new Result().ok(sysUserService.getApproverUnconfiguredRegion(params));
|
return new Result().ok(sysUserService.getApproverUnconfiguredRegion(params));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping("auditingUserPage")
|
||||||
|
@ApiOperation("审核权限用户分页")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType = "int"),
|
||||||
|
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query", required = true, dataType = "int")
|
||||||
|
})
|
||||||
|
// @RequiresPermissions("sys:user:page")
|
||||||
|
public Result<PageData<Map>> auditingUserPage(@ApiIgnore @RequestParam Map<String, Object> params) {
|
||||||
|
//分页参数
|
||||||
|
long curPage = 1;
|
||||||
|
long limit = 10;
|
||||||
|
|
||||||
|
if (params.get(Constant.PAGE) != null) {
|
||||||
|
curPage = Long.parseLong((String) params.get(Constant.PAGE));
|
||||||
|
}
|
||||||
|
if (params.get(Constant.LIMIT) != null) {
|
||||||
|
limit = Long.parseLong((String) params.get(Constant.LIMIT));
|
||||||
|
}
|
||||||
|
SysRoleDTO roleDTO0 = sysRoleService.getByName(roleName0);
|
||||||
|
SysRoleDTO roleDTO1 = sysRoleService.getByName(roleName1);
|
||||||
|
SysRoleDTO roleDTO2 = sysRoleService.getByName(roleName2);
|
||||||
|
List<Long> roleId = new ArrayList() {{
|
||||||
|
if (roleDTO0 != null) {
|
||||||
|
add(roleDTO0.getId());
|
||||||
|
}
|
||||||
|
if (roleDTO1 != null) {
|
||||||
|
add(roleDTO1.getId());
|
||||||
|
}
|
||||||
|
if (roleDTO2 != null) {
|
||||||
|
add(roleDTO2.getId());
|
||||||
|
}
|
||||||
|
add(Long.parseLong(defaultAssigneeRoleId));
|
||||||
|
}};
|
||||||
|
return new Result<PageData<Map>>().ok(new PageData<>(sysUserService.getUserByRoleList(roleId, (int) curPage, (int) limit), sysUserService.getUserByRoleListCount(roleId)));
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -5,7 +5,6 @@ import io.renren.modules.sys.entity.SysUserEntity;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
@ -57,4 +56,8 @@ public interface SysUserDao extends BaseDao<SysUserEntity> {
|
||||||
Integer getApproverUnconfiguredDepartmentCount();
|
Integer getApproverUnconfiguredDepartmentCount();
|
||||||
|
|
||||||
Integer getApproverUnconfiguredRegionCount();
|
Integer getApproverUnconfiguredRegionCount();
|
||||||
|
|
||||||
|
List<Map> getUserByRoleList(@Param("roleIds") List<Long> roleIds, @Param("pageNum") int pageNum, @Param("pageSize") int pageSize);
|
||||||
|
|
||||||
|
Long getUserByRoleListCount(@Param("roleIds") List<Long> roleIds);
|
||||||
}
|
}
|
|
@ -65,4 +65,14 @@ public interface SysUserService extends BaseService<SysUserEntity> {
|
||||||
Object getApproverUnconfiguredDepartment(Map<String, Object> params);
|
Object getApproverUnconfiguredDepartment(Map<String, Object> params);
|
||||||
|
|
||||||
Object getApproverUnconfiguredRegion(Map<String, Object> params);
|
Object getApproverUnconfiguredRegion(Map<String, Object> params);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取拥有
|
||||||
|
*
|
||||||
|
* @param roleIds
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<Map> getUserByRoleList(List<Long> roleIds, int pageNum, int pageSize);
|
||||||
|
|
||||||
|
Long getUserByRoleListCount(List<Long> roleIds);
|
||||||
}
|
}
|
||||||
|
|
|
@ -555,4 +555,20 @@ public class SysUserServiceImpl extends BaseServiceImpl<SysUserDao, SysUserEntit
|
||||||
resultList.addAll(sysUserDao.getApproverUnconfiguredRegion());
|
resultList.addAll(sysUserDao.getApproverUnconfiguredRegion());
|
||||||
return resultList;
|
return resultList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取拥有
|
||||||
|
*
|
||||||
|
* @param roleIds
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<Map> getUserByRoleList(List<Long> roleIds, int pageNum, int pageSize) {
|
||||||
|
return baseDao.getUserByRoleList(roleIds, (pageNum - 1) * pageSize, pageSize);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long getUserByRoleListCount(List<Long> roleIds) {
|
||||||
|
return baseDao.getUserByRoleListCount(roleIds);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
alter table `sys_audit_team` ADD COLUMN `description` longtext NULL comment '审核组备注信息';
|
|
@ -11,6 +11,7 @@
|
||||||
<result property="member" column="member"
|
<result property="member" column="member"
|
||||||
typeHandler="com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler"/>
|
typeHandler="com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler"/>
|
||||||
<result property="index" column="`index`"/>
|
<result property="index" column="`index`"/>
|
||||||
|
<result property="description" column="description"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<resultMap id="sysAuditTeamDTO" type="io.renren.modules.audit_team.dto.SysAuditTeamDTO">
|
<resultMap id="sysAuditTeamDTO" type="io.renren.modules.audit_team.dto.SysAuditTeamDTO">
|
||||||
|
@ -21,6 +22,7 @@
|
||||||
<result property="member" column="member"
|
<result property="member" column="member"
|
||||||
typeHandler="com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler"/>
|
typeHandler="com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler"/>
|
||||||
<result property="index" column="`index`"/>
|
<result property="index" column="`index`"/>
|
||||||
|
<result property="description" column="description"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<select id="selectByMemberOne" resultMap="sysAuditTeamDTO">
|
<select id="selectByMemberOne" resultMap="sysAuditTeamDTO">
|
||||||
|
|
|
@ -105,67 +105,67 @@
|
||||||
|
|
||||||
<select id="getApproverUnconfiguredDepartment" resultType="java.util.Map">
|
<select id="getApproverUnconfiguredDepartment" resultType="java.util.Map">
|
||||||
SELECT
|
SELECT
|
||||||
id,
|
id,
|
||||||
name,
|
name,
|
||||||
(CASE type
|
(CASE type
|
||||||
WHEN 1 THEN
|
WHEN 1 THEN
|
||||||
'省'
|
'省'
|
||||||
WHEN 2 THEN
|
WHEN 2 THEN
|
||||||
'市'
|
'市'
|
||||||
WHEN 3 THEN
|
WHEN 3 THEN
|
||||||
'区'
|
'区'
|
||||||
ELSE
|
ELSE
|
||||||
' '
|
' '
|
||||||
END) AS "type",
|
END) AS "type",
|
||||||
sort
|
sort
|
||||||
FROM
|
FROM
|
||||||
sys_dept sd
|
sys_dept sd
|
||||||
WHERE
|
WHERE
|
||||||
id NOT IN (
|
id NOT IN (
|
||||||
SELECT
|
SELECT
|
||||||
sd.id
|
sd.id
|
||||||
FROM
|
FROM
|
||||||
sys_user su,
|
sys_user su,
|
||||||
sys_dept sd,
|
sys_dept sd,
|
||||||
sys_role sr,
|
sys_role sr,
|
||||||
sys_role_user sru
|
sys_role_user sru
|
||||||
WHERE
|
WHERE
|
||||||
su.dept_id = sd.id
|
su.dept_id = sd.id
|
||||||
AND su.id = sru.user_id
|
AND su.id = sru.user_id
|
||||||
AND sru.role_id = sr.id
|
AND sru.role_id = sr.id
|
||||||
AND sru.del_flag = 0
|
AND sru.del_flag = 0
|
||||||
AND sr.`name` = '部门审批人'
|
AND sr.`name` = '部门审批人'
|
||||||
)
|
)
|
||||||
AND sd.type != 4
|
AND sd.type != 4
|
||||||
ORDER BY sd.type, sort
|
ORDER BY sd.type, sort
|
||||||
LIMIT ${pageNum}, ${pageSize}
|
LIMIT ${pageNum}, ${pageSize}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getApproverUnconfiguredRegion" resultType="java.util.Map">
|
<select id="getApproverUnconfiguredRegion" resultType="java.util.Map">
|
||||||
SELECT
|
SELECT
|
||||||
id,
|
id,
|
||||||
NAME,
|
NAME,
|
||||||
sort
|
sort
|
||||||
FROM
|
FROM
|
||||||
sys_region srg
|
sys_region srg
|
||||||
WHERE
|
WHERE
|
||||||
id NOT IN (
|
id NOT IN (
|
||||||
SELECT
|
SELECT
|
||||||
srg.id
|
srg.id
|
||||||
FROM
|
FROM
|
||||||
sys_user su,
|
sys_user su,
|
||||||
sys_dept sd,
|
sys_dept sd,
|
||||||
sys_region srg,
|
sys_region srg,
|
||||||
sys_role sr,
|
sys_role sr,
|
||||||
sys_role_user sru
|
sys_role_user sru
|
||||||
WHERE
|
WHERE
|
||||||
su.dept_id = sd.id
|
su.dept_id = sd.id
|
||||||
AND su.id = sru.user_id
|
AND su.id = sru.user_id
|
||||||
AND sru.role_id = sr.id
|
AND sru.role_id = sr.id
|
||||||
AND sd.district = srg.id
|
AND sd.district = srg.id
|
||||||
AND sru.del_flag = 0
|
AND sru.del_flag = 0
|
||||||
AND sr.`name` = '区审批人'
|
AND sr.`name` = '区审批人'
|
||||||
)
|
)
|
||||||
AND srg.tree_level = 3
|
AND srg.tree_level = 3
|
||||||
AND 9 >= srg.sort
|
AND 9 >= srg.sort
|
||||||
ORDER BY srg.sort
|
ORDER BY srg.sort
|
||||||
|
@ -174,28 +174,69 @@
|
||||||
<select id="getApproverUnconfiguredDepartmentCount" resultType="java.lang.Integer">
|
<select id="getApproverUnconfiguredDepartmentCount" resultType="java.lang.Integer">
|
||||||
SELECT COUNT(1)
|
SELECT COUNT(1)
|
||||||
FROM (
|
FROM (
|
||||||
SELECT
|
SELECT
|
||||||
id
|
id
|
||||||
FROM
|
FROM
|
||||||
sys_dept sd
|
sys_dept sd
|
||||||
WHERE
|
WHERE
|
||||||
id NOT IN (
|
id NOT IN (
|
||||||
SELECT
|
SELECT
|
||||||
sd.id
|
sd.id
|
||||||
FROM
|
FROM
|
||||||
sys_user su,
|
sys_user su,
|
||||||
sys_dept sd,
|
sys_dept sd,
|
||||||
sys_role sr,
|
sys_role sr,
|
||||||
sys_role_user sru
|
sys_role_user sru
|
||||||
WHERE
|
WHERE
|
||||||
su.dept_id = sd.id
|
su.dept_id = sd.id
|
||||||
AND su.id = sru.user_id
|
AND su.id = sru.user_id
|
||||||
AND sru.role_id = sr.id
|
AND sru.role_id = sr.id
|
||||||
AND sru.del_flag = 0
|
AND sru.del_flag = 0
|
||||||
AND sr.`name` = '部门审批人'
|
AND sr.`name` = '部门审批人'
|
||||||
)
|
)
|
||||||
AND sd.type != 4
|
AND sd.type != 4
|
||||||
) temp
|
) temp
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getUserByRoleList" resultType="java.util.Map">
|
||||||
|
SELECT
|
||||||
|
sys_user.id,
|
||||||
|
sys_user.username,
|
||||||
|
sys_user.real_name,
|
||||||
|
sys_dept.`name`
|
||||||
|
FROM
|
||||||
|
sys_role_user
|
||||||
|
LEFT JOIN sys_user ON sys_user.id = sys_role_user.user_id
|
||||||
|
LEFT JOIN sys_dept ON sys_dept.id = sys_user.dept_id
|
||||||
|
WHERE
|
||||||
|
1 = 1
|
||||||
|
AND sys_role_user.del_flag = 0
|
||||||
|
AND sys_user.id IS NOT NULL
|
||||||
|
<if test="null != roleIds">
|
||||||
|
AND sys_role_user.role_id IN
|
||||||
|
<foreach item="roleId" collection="roleIds" open="(" separator="," close=")">
|
||||||
|
#{roleId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
LIMIT ${pageNum}, ${pageSize}
|
||||||
|
</select>
|
||||||
|
<select id="getUserByRoleListCount" resultType="java.lang.Long">
|
||||||
|
SELECT
|
||||||
|
COUNT( sys_user.id )
|
||||||
|
FROM
|
||||||
|
sys_role_user
|
||||||
|
LEFT JOIN sys_user ON sys_user.id = sys_role_user.user_id
|
||||||
|
LEFT JOIN sys_dept ON sys_dept.id = sys_user.dept_id
|
||||||
|
WHERE
|
||||||
|
1 = 1
|
||||||
|
AND sys_role_user.del_flag = 0
|
||||||
|
AND sys_user.id IS NOT NULL
|
||||||
|
<if test="null != roleIds">
|
||||||
|
AND sys_role_user.role_id IN
|
||||||
|
<foreach item="roleId" collection="roleIds" open="(" separator="," close=")">
|
||||||
|
#{roleId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue