用户部门处理

This commit is contained in:
韩国东 2022-12-09 14:52:36 +08:00
parent dd1146bf2e
commit ad57dee52e
2 changed files with 44 additions and 5 deletions

View File

@ -10,6 +10,8 @@
<result column="community_code" jdbcType="VARCHAR" property="communityCode" /> <result column="community_code" jdbcType="VARCHAR" property="communityCode" />
<result column="net_code" jdbcType="VARCHAR" property="netCode" /> <result column="net_code" jdbcType="VARCHAR" property="netCode" />
<result column="SysUnitOrEntId" jdbcType="VARCHAR" property="sysunitorentid" /> <result column="SysUnitOrEntId" jdbcType="VARCHAR" property="sysunitorentid" />
<result column="unit_path" jdbcType="VARCHAR" property="unitPath" />
<result column="unit_path_name" jdbcType="VARCHAR" property="unitPathName" />
<result column="SysDeptId" jdbcType="VARCHAR" property="sysdeptid" /> <result column="SysDeptId" jdbcType="VARCHAR" property="sysdeptid" />
<result column="SysUnitOrEntName" jdbcType="VARCHAR" property="sysunitorentname" /> <result column="SysUnitOrEntName" jdbcType="VARCHAR" property="sysunitorentname" />
<result column="SysDeptName" jdbcType="VARCHAR" property="sysdeptname" /> <result column="SysDeptName" jdbcType="VARCHAR" property="sysdeptname" />
@ -110,10 +112,21 @@
</where> </where>
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
SysUserId, UserType, SortId, OrgCode, SysUnitOrEntId, SysDeptId, SysUnitOrEntName, SysUserId, UserType, SortId, OrgCode,
area_code,
area_path,
area_name,
SysUnitOrEntId,
unit_path,
unit_path_name,
SysDeptId, SysUnitOrEntName,
SysDeptName, SysUserName, SysPassword, UserRoles, ChinaName, Description, PinYin, SysDeptName, SysUserName, SysPassword, UserRoles, ChinaName, Description, PinYin,
IDCard, SysSex, Birthplace, Birthday, HealthStatus, SysPhoto, EducationLevel, SysFamily, IDCard, SysSex, Birthplace, Birthday, HealthStatus, SysPhoto, EducationLevel, SysFamily,
Marriage, Duration, SysTitle, OfficeTel, MobileTel, Email, QQInter, WeixinInter, Marriage, Duration,
SysTitle,
post_path,
post_name,
OfficeTel, MobileTel, Email, QQInter, WeixinInter,
ModifiedBy, ModifiedOn, CreatedBy, CreatedOn ModifiedBy, ModifiedOn, CreatedBy, CreatedOn
</sql> </sql>
<select id="selectByExample" parameterType="com.rzyc.model.user.SysUserExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.rzyc.model.user.SysUserExample" resultMap="BaseResultMap">
@ -164,7 +177,10 @@
area_path, area_path,
area_name, area_name,
supervise_area, supervise_area,
SysUnitOrEntId, SysDeptId, SysUnitOrEntId,
unit_path,
unit_path_name,
SysDeptId,
SysUnitOrEntName, SysDeptName, SysUserName, SysUnitOrEntName, SysDeptName, SysUserName,
SysPassword, UserRoles, ChinaName, SysPassword, UserRoles, ChinaName,
Description, PinYin, IDCard, Description, PinYin, IDCard,
@ -187,7 +203,10 @@
#{areaPath,jdbcType=VARCHAR}, #{areaPath,jdbcType=VARCHAR},
#{areaName,jdbcType=VARCHAR}, #{areaName,jdbcType=VARCHAR},
#{superviseArea,jdbcType=VARCHAR}, #{superviseArea,jdbcType=VARCHAR},
#{sysunitorentid,jdbcType=VARCHAR}, #{sysdeptid,jdbcType=VARCHAR}, #{sysunitorentid,jdbcType=VARCHAR},
#{unitPath,jdbcType=VARCHAR},
#{unitPathName,jdbcType=VARCHAR},
#{sysdeptid,jdbcType=VARCHAR},
#{sysunitorentname,jdbcType=VARCHAR}, #{sysdeptname,jdbcType=VARCHAR}, #{sysusername,jdbcType=VARCHAR}, #{sysunitorentname,jdbcType=VARCHAR}, #{sysdeptname,jdbcType=VARCHAR}, #{sysusername,jdbcType=VARCHAR},
#{syspassword,jdbcType=VARCHAR}, #{userroles,jdbcType=VARCHAR}, #{chinaname,jdbcType=VARCHAR}, #{syspassword,jdbcType=VARCHAR}, #{userroles,jdbcType=VARCHAR}, #{chinaname,jdbcType=VARCHAR},
#{description,jdbcType=VARCHAR}, #{pinyin,jdbcType=VARCHAR}, #{idcard,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{pinyin,jdbcType=VARCHAR}, #{idcard,jdbcType=VARCHAR},
@ -963,6 +982,8 @@
area_name = #{record.areaName,jdbcType=VARCHAR}, area_name = #{record.areaName,jdbcType=VARCHAR},
supervise_area = #{record.superviseArea,jdbcType=VARCHAR}, supervise_area = #{record.superviseArea,jdbcType=VARCHAR},
SysUnitOrEntId = #{record.sysunitorentid,jdbcType=VARCHAR}, SysUnitOrEntId = #{record.sysunitorentid,jdbcType=VARCHAR},
unit_path = #{record.unitPath,jdbcType=VARCHAR},
unit_path_name = #{record.unitPathName,jdbcType=VARCHAR},
SysDeptId = #{record.sysdeptid,jdbcType=VARCHAR}, SysDeptId = #{record.sysdeptid,jdbcType=VARCHAR},
SysUnitOrEntName = #{record.sysunitorentname,jdbcType=VARCHAR}, SysUnitOrEntName = #{record.sysunitorentname,jdbcType=VARCHAR},
SysDeptName = #{record.sysdeptname,jdbcType=VARCHAR}, SysDeptName = #{record.sysdeptname,jdbcType=VARCHAR},

View File

@ -950,6 +950,7 @@ public class PcPersonalController extends com.rzyc.controller.BaseController {
getUserAreaCode(changeUserDto.getAreaCode(),sysUser); getUserAreaCode(changeUserDto.getAreaCode(),sysUser);
getUserPost(changeUserDto.getSystitle(),sysUser); getUserPost(changeUserDto.getSystitle(),sysUser);
getUserUnit(sysUser.getSysunitorentid(),sysUser);
sysUserMapper.changeUser(sysUser); sysUserMapper.changeUser(sysUser);
//处理监管地区 //处理监管地区
changeSuperviseArea(sysUser.getSysuserid(),changeUserDto.getSuperviseAreaId(),operator.getChinaname()); changeSuperviseArea(sysUser.getSysuserid(),changeUserDto.getSuperviseAreaId(),operator.getChinaname());
@ -967,7 +968,7 @@ public class PcPersonalController extends com.rzyc.controller.BaseController {
sysUser.setSyspassword(passwd); sysUser.setSyspassword(passwd);
getUserPost(changeUserDto.getSystitle(),sysUser); getUserPost(changeUserDto.getSystitle(),sysUser);
getUserAreaCode(changeUserDto.getAreaCode(),sysUser); getUserAreaCode(changeUserDto.getAreaCode(),sysUser);
getUserUnit(sysUser.getSysunitorentid(),sysUser);
sysUserMapper.insert(sysUser); sysUserMapper.insert(sysUser);
//处理监管地区 //处理监管地区
changeSuperviseArea(sysUser.getSysuserid(),changeUserDto.getSuperviseAreaId(),operator.getChinaname()); changeSuperviseArea(sysUser.getSysuserid(),changeUserDto.getSuperviseAreaId(),operator.getChinaname());
@ -979,6 +980,23 @@ public class PcPersonalController extends com.rzyc.controller.BaseController {
return result; return result;
} }
/**
* 处理用户部门信息
* @version v1.0
* @author dong
* @date 2022/12/9 14:07
*/
public void getUserUnit(String unitId,SysUser user)throws Exception{
if(StringUtils.isNotBlank(unitId)){
SysUnit sysUnit = sysUnitMapper.selectByPrimaryKey(unitId);
if(null != sysUnit){
user.setSysunitorentid(unitId);
user.setUnitPath(sysUnit.getParentPath());
user.setUnitPathName(sysUnit.getParentName());
}
}
}
/** /**
* 处理企业地区信息 * 处理企业地区信息
* @version v1.0 * @version v1.0