履职清单 和 用户调整

This commit is contained in:
mythxb 2023-08-23 17:09:27 +08:00
parent 248166ea2d
commit d96077532f
7 changed files with 113 additions and 32 deletions

View File

@ -655,7 +655,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.SysLevel ASC, lp.`SortId` ASC ORDER BY lp.SysLevel ASC, lp.`SortId` ASC,lp.ListPerformId ASC
</select> </select>
<!--修改岗位信息--> <!--修改岗位信息-->

View File

@ -528,7 +528,21 @@
<!--部门列表--> <!--部门列表-->
<select id="findUnit" resultMap="BaseResultMap"> <select id="findUnit" resultMap="BaseResultMap">
SELECT * FROM SysUnit su SELECT lf.`ListPerformId` sysunitid,
lf.`PerformClassName` unitname,
lf.`SupClassId` superiorunitid
FROM `listperform` lf
WHERE lf.`position_type` = 1
<if test="null != parentUnitId and '' != parentUnitId">
AND FIND_IN_SET(#{parentUnitId},lf.`parent_path`)
</if>
ORDER BY lf.`SysLevel` ASC,lf.`SortId` ASC;
</select>
<!--部门列表-->
<select id="findUnitV1" resultMap="BaseResultMap">
SELECT su.SysUnitId,su.SuperiorUnitId,su.UnitName
FROM SysUnit su
where 1 = 1 where 1 = 1
<if test="null != parentUnitId and '' != parentUnitId"> <if test="null != parentUnitId and '' != parentUnitId">
and FIND_IN_SET(#{parentUnitId},su.parent_path) and FIND_IN_SET(#{parentUnitId},su.parent_path)

View File

@ -941,27 +941,24 @@
<!--政府用户列表--> <!--政府用户列表-->
<select id="govUserList" resultMap="UserResultMap"> <select id="govUserList" resultMap="UserResultMap">
SELECT ut.`UnitName`,sp.`PerformClassName` superName,lf.`PerformClassName` performclassname,su.* SELECT sp.`PerformClassName` superName,lf.`PerformClassName` performclassname,su.*
FROM SysUser su FROM SysUser su
LEFT JOIN SysUnit ut ON su.`SysUnitOrEntId` = ut.`SysUnitId`
LEFT JOIN ListPerform lf ON su.`SysTitle` = lf.`ListPerformId` LEFT JOIN ListPerform lf ON su.`SysTitle` = lf.`ListPerformId`
LEFT JOIN ListPerform sp ON sp.`ListPerformId` = lf.`SupClassId` LEFT JOIN ListPerform sp ON sp.`ListPerformId` = lf.`SupClassId`
WHERE su.`UserType` = '政府用户' WHERE su.`UserType` = '政府用户'
and FIND_IN_SET(#{areaCode},su.area_path) and FIND_IN_SET(#{areaCode},su.area_path)
<if test="null != unitId and '' != unitId">
and FIND_IN_SET(#{unitId},su.post_path)
</if>
<if test="State!=null and State!=''"> <if test="State!=null and State!=''">
and su.State = #{State} and su.State = #{State}
</if> </if>
AND (su.`ChinaName` LIKE #{condition} OR su.`SysUserName` LIKE #{condition}) AND (su.`ChinaName` LIKE #{condition} OR su.`SysUserName` LIKE #{condition})
<if test="null != unitId and '' != unitId">
AND su.SysUnitOrEntId = #{unitId}
</if>
<if test="null != performId and '' != performId"> <if test="null != performId and '' != performId">
AND sp.`ListPerformId` = #{performId} AND sp.`ListPerformId` = #{performId}
</if> </if>
ORDER BY su.State ASC,su.ModifiedOn DESC ORDER BY su.State ASC,su.ModifiedOn DESC,su.SysUserId ASC
/*ORDER BY lf.`SortId` ASC,lf.`PerformClassCode` ASC*/ /*ORDER BY lf.`SortId` ASC,lf.`PerformClassCode` ASC*/
</select> </select>

View File

@ -2359,11 +2359,17 @@ public class BaseController {
protected void handleUser(List<SysUser> sysUsers)throws Exception{ protected void handleUser(List<SysUser> sysUsers)throws Exception{
for (SysUser sysUser : sysUsers){ for (SysUser sysUser : sysUsers){
if(StringUtils.isNotBlank(sysUser.getPerformclassname()) && StringUtils.isNotBlank(sysUser.getSuperName())){ if(StringUtils.isNotBlank(sysUser.getPerformclassname()) && StringUtils.isNotBlank(sysUser.getSuperName())){
String postName = sysUser.getPerformClassName(); // String postName = sysUser.getPerformClassName();
// String deptName = sysUser.getSuperName();
// postName = postName.replace(deptName,"");
// postName = deptName + postName;
// sysUser.setPerformclassname(postName);
// String postName = sysUser.getPerformClassName();
String deptName = sysUser.getSuperName(); String deptName = sysUser.getSuperName();
postName = postName.replace(deptName,""); // postName = postName.replace(deptName,"");
postName = deptName + postName; // postName = deptName + postName;
sysUser.setPerformclassname(postName); sysUser.setUnitName(deptName);
} }
} }
} }
@ -2406,6 +2412,21 @@ public class BaseController {
return userId; return userId;
} }
/**
* 获取用户部门id
* @version v1.0
* @author dong
* @date 2023/8/23 14:23
*/
protected String getUnitId(String userId)throws Exception{
String unitId = "";
ListPerform listPerform = listPerformMapper.findBuUserId(userId);
if(null != listPerform){
unitId = listPerform.getSupclassid();
}
return unitId;
}
/** /**
* 修改任务状态 * 修改任务状态
* @param oaTask * @param oaTask
@ -3728,6 +3749,9 @@ public class BaseController {
if(StringUtils.isNotBlank(sysAuth.getUnitRoleId())){ if(StringUtils.isNotBlank(sysAuth.getUnitRoleId())){
authState = 1; authState = 1;
} }
//都选择
authState = 1;
sysAuth.setAuthState(authState+""); sysAuth.setAuthState(authState+"");
} }
} }

View File

@ -9,6 +9,8 @@ import com.common.utils.encryption.PasswdFactory;
import com.common.utils.model.SingleResult; import com.common.utils.model.SingleResult;
import com.rzyc.enums.DelState; import com.rzyc.enums.DelState;
import com.rzyc.enums.ListTargerType; import com.rzyc.enums.ListTargerType;
import com.rzyc.enums.PositionTypeEnum;
import com.rzyc.enums.PostListType;
import com.rzyc.model.*; import com.rzyc.model.*;
import com.rzyc.model.check.ChkBillDetailWithBLOBs; import com.rzyc.model.check.ChkBillDetailWithBLOBs;
import com.rzyc.model.ent.SysEnterprise; import com.rzyc.model.ent.SysEnterprise;
@ -1187,4 +1189,33 @@ public class DataController extends com.rzyc.controller.BaseController {
return result; return result;
} }
/**
* 处理岗位类型
* @version v1.0
* @author dong
* @date 2023/8/23 14:39
*/
@ApiOperation(value = "处理岗位类型", notes = "处理履职记录")
@RequestMapping(value = "/handlePerform", method = RequestMethod.GET)
@ResponseBody
public SingleResult<String> handlePerform()throws Exception{
SingleResult<String> result = new SingleResult<>();
List<ListPerform> performs = listPerformMapper.findAll("");
for (ListPerform listPerform : performs){
Integer postType = PositionTypeEnum.POST.getType();
Integer postNum = listPerformMapper.countPost(listPerform.getListperformid());
if(postNum > 0){
postType = PositionTypeEnum.UNIT.getType();
}
listPerformMapper.changePositionType(listPerform.getListperformid(),postType);
}
return result;
}
} }

View File

@ -763,37 +763,25 @@ public class PcPersonalController extends com.rzyc.controller.BaseController {
String condition = TypeConversion.getCondition(userPageDto.getCondition()); String condition = TypeConversion.getCondition(userPageDto.getCondition());
String userId = getUserId(); String userId = getUserId();
//判断查看用户类别 userPageDto.setPerformId(userPageDto.getUnitId());
String unitType = UnitType.AREA.getType()+"";
SysUser sysUser = sysUserMapper.findById(userId);
if(null != sysUser){
SysUnit sysUnit = sysUnitMapper.selectByPrimaryKey(sysUser.getSysunitorentid());
if(null != sysUnit){
unitType = sysUnit.getUnittype();
}
}
//部门id //部门id
String unitId = sysUser.getSysunitorentid(); String unitId = getUnitId(userId);
String areaCode = getUserArea(userId); String areaCode = getUserArea(userId);
//分页 //分页
PageHelper.startPage(userPageDto.getPage(), userPageDto.getPageSize()); PageHelper.startPage(userPageDto.getPage(), userPageDto.getPageSize());
Page<SysUser> page = null; Page<SysUser> page = (Page<SysUser>)sysUserMapper.govUserList(condition,unitId,userPageDto.getPerformId(),areaCode,userPageDto.getState());
//属地类型
String unitEnumType = UnitType.AREA.getType()+"";
/*
//判断是属地还是部门 //判断是属地还是部门
if(unitEnumType.equals(unitType)){ if(unitEnumType.equals(unitType)){
page = (Page<SysUser>)sysUserMapper.govUserList(condition,userPageDto.getUnitId(),userPageDto.getPerformId(),areaCode,userPageDto.getState()); page = (Page<SysUser>)sysUserMapper.govUserList(condition,userPageDto.getUnitId(),userPageDto.getPerformId(),areaCode,userPageDto.getState());
}else{ }else{
page = (Page<SysUser>)sysUserMapper.unitUserList(condition,unitId,userPageDto.getState()); page = (Page<SysUser>)sysUserMapper.unitUserList(condition,unitId,userPageDto.getState());
} }
*/
Pager<SysUser> pager = new Pager<>(); Pager<SysUser> pager = new Pager<>();
getDatePage(pager,page); getDatePage(pager,page);
@ -814,6 +802,33 @@ public class PcPersonalController extends com.rzyc.controller.BaseController {
public MultiResult<SysUnit> unitTree()throws Exception{ public MultiResult<SysUnit> unitTree()throws Exception{
MultiResult<SysUnit> result = new MultiResult<>(); MultiResult<SysUnit> result = new MultiResult<>();
String userId = getUserId();
String parentUnitId = getUnitId(userId);
List<SysUnit> units = sysUnitMapper.findUnit(parentUnitId);
if(units.size() > 0){
JSONArray unitJson = handleUnitTree(units);
List<SysUnit> sysUnits = JSONArray.parseArray(JSONArray.toJSONString(unitJson),SysUnit.class);
result.setData(sysUnits);
}else{
result.setCode(Code.NO_DATA.getCode());
result.setMessage(Message.NO_DATA);
}
return result;
}
/**
* 部门树形结构
* @return
* @throws Exception
*/
@ApiOperation(value = "部门树形结构", notes = "部门树形结构")
@PostMapping(value = "unitTreeV1")
@ResponseBody
public MultiResult<SysUnit> unitTreeV1()throws Exception{
MultiResult<SysUnit> result = new MultiResult<>();
String userId = getUserId(); String userId = getUserId();
String parentUnitId = getSuperUnitId(userId); String parentUnitId = getSuperUnitId(userId);

View File

@ -1,6 +1,6 @@
spring: spring:
profiles: profiles:
active: test #设定打包配置文件 active: yun #设定打包配置文件