用户单位角色

This commit is contained in:
韩国东 2022-12-09 17:37:18 +08:00
parent ad57dee52e
commit 5c92503fb8
2 changed files with 23 additions and 4 deletions

View File

@ -593,7 +593,7 @@
<if test="null != superPerformId and '' != superPerformId"> <if test="null != superPerformId and '' != superPerformId">
and FIND_IN_SET(#{superPerformId},lp.parent_path) and FIND_IN_SET(#{superPerformId},lp.parent_path)
</if> </if>
ORDER BY lp.`SortId` ASC,lp.`PerformClassCode` ASC ORDER BY lp.SysLevel ASC, lp.`SortId` ASC
</select> </select>
<!--岗位分页--> <!--岗位分页-->
@ -635,7 +635,7 @@
<if test="null != superPerformId and '' != superPerformId"> <if test="null != superPerformId and '' != superPerformId">
and FIND_IN_SET(#{superPerformId},lp.parent_path) and FIND_IN_SET(#{superPerformId},lp.parent_path)
</if> </if>
ORDER BY lp.`SortId` ASC,lp.`PerformClassCode` ASC ORDER BY lp.SysLevel ASC, lp.`SortId` ASC
</select> </select>
<!--修改岗位信息--> <!--修改岗位信息-->
@ -738,11 +738,11 @@
<!--岗位列表--> <!--岗位列表-->
<select id="findUnit" resultMap="BaseResultMap"> <select id="findUnit" resultMap="BaseResultMap">
SELECT lp.* FROM ListPerform lp SELECT lp.* FROM ListPerform lp
where (lp.PerformName = '' or lp.PerformName is null) where 1 = 1
<if test="null != superPerformId and '' != superPerformId"> <if test="null != superPerformId and '' != superPerformId">
and FIND_IN_SET(#{superPerformId},lp.parent_path) and FIND_IN_SET(#{superPerformId},lp.parent_path)
</if> </if>
ORDER BY lp.`SortId` ASC,lp.`PerformClassCode` ASC ORDER BY lp.SysLevel ASC, lp.`SortId` ASC
</select> </select>

View File

@ -1579,6 +1579,10 @@ public class PcPersonalController extends com.rzyc.controller.BaseController {
listPerform.setCreatedon(new Date()); listPerform.setCreatedon(new Date());
listPerform.setModifiedon(new Date()); listPerform.setModifiedon(new Date());
//查询层级
Integer level = getPerformLevel(changePerformDto.getSupclassid());
listPerform.setSyslevel(level);
ListPerform perform = listPerformMapper.selectByPrimaryKey(listPerform.getListperformid()); ListPerform perform = listPerformMapper.selectByPrimaryKey(listPerform.getListperformid());
if(null != perform){ if(null != perform){
getPerformPath(listPerform.getSupclassid(),listPerform); getPerformPath(listPerform.getSupclassid(),listPerform);
@ -1601,6 +1605,21 @@ public class PcPersonalController extends com.rzyc.controller.BaseController {
return result; return result;
} }
/**
* 查询层级
* @version v1.0
* @author dong
* @date 2022/12/9 15:44
*/
public Integer getPerformLevel(String parentId)throws Exception{
Integer level = 1;
ListPerform listPerform = listPerformMapper.selectByPrimaryKey(parentId);
if(null != listPerform){
level = listPerform.getSyslevel() + 1;
}
return level;
}
/** /**
* *
* @version v1.0 * @version v1.0