用户岗位

This commit is contained in:
韩国东 2022-12-09 11:28:25 +08:00
parent d21c2b3b5c
commit 5ab57900c4
5 changed files with 86 additions and 5 deletions

View File

@ -73,7 +73,7 @@ public interface ListPerformMapper {
List<ListPerform> findBySupClassId(@Param("supClassId") String supClassId); List<ListPerform> findBySupClassId(@Param("supClassId") String supClassId);
/*岗位列表*/ /*岗位列表*/
List<ListPerform> findAll(); List<ListPerform> findAll(@Param("superPerformId") String superPerformId);
/*岗位分页*/ /*岗位分页*/
List<ListPerform> performPage(@Param("supClassId") String supClassId, List<ListPerform> performPage(@Param("supClassId") String supClassId,

View File

@ -50,8 +50,15 @@ public class SysUser implements Serializable {
@ApiModelProperty("父级地区名") @ApiModelProperty("父级地区名")
private String areaName; private String areaName;
@ApiModelProperty("部门id")
private String sysunitorentid; private String sysunitorentid;
@ApiModelProperty("部门路径")
private String unitPath;
@ApiModelProperty("部门名")
private String unitPathName;
private String sysdeptid; private String sysdeptid;
private String sysunitorentname; private String sysunitorentname;
@ -107,8 +114,15 @@ public class SysUser implements Serializable {
private Date duration; private Date duration;
@ApiModelProperty("职务id")
private String systitle; private String systitle;
@ApiModelProperty("职务路径")
private String postPath;
@ApiModelProperty("职务名路径")
private String postName;
/*职称名*/ /*职称名*/
@ApiModelProperty("职务名") @ApiModelProperty("职务名")
private String systitlename; private String systitlename;
@ -242,6 +256,38 @@ public class SysUser implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public String getUnitPath() {
return unitPath;
}
public void setUnitPath(String unitPath) {
this.unitPath = unitPath;
}
public String getUnitPathName() {
return unitPathName;
}
public void setUnitPathName(String unitPathName) {
this.unitPathName = unitPathName;
}
public String getPostPath() {
return postPath;
}
public void setPostPath(String postPath) {
this.postPath = postPath;
}
public String getPostName() {
return postName;
}
public void setPostName(String postName) {
this.postName = postName;
}
public String getAreaCode() { public String getAreaCode() {
return areaCode; return areaCode;
} }

View File

@ -589,6 +589,10 @@
<!--岗位列表--> <!--岗位列表-->
<select id="findAll" resultMap="BaseResultMap"> <select id="findAll" resultMap="BaseResultMap">
SELECT lp.* FROM ListPerform lp SELECT lp.* FROM ListPerform lp
where 1 = 1
<if test="null != superPerformId and '' != superPerformId">
and FIND_IN_SET(#{superPerformId},lp.parent_path)
</if>
ORDER BY lp.`SortId` ASC,lp.`PerformClassCode` ASC ORDER BY lp.`SortId` ASC,lp.`PerformClassCode` ASC
</select> </select>

View File

@ -33,6 +33,8 @@
<result column="Marriage" jdbcType="VARCHAR" property="marriage" /> <result column="Marriage" jdbcType="VARCHAR" property="marriage" />
<result column="Duration" jdbcType="TIMESTAMP" property="duration" /> <result column="Duration" jdbcType="TIMESTAMP" property="duration" />
<result column="SysTitle" jdbcType="VARCHAR" property="systitle" /> <result column="SysTitle" jdbcType="VARCHAR" property="systitle" />
<result column="post_path" jdbcType="VARCHAR" property="postPath" />
<result column="post_name" jdbcType="VARCHAR" property="postName" />
<result column="OfficeTel" jdbcType="VARCHAR" property="officetel" /> <result column="OfficeTel" jdbcType="VARCHAR" property="officetel" />
<result column="MobileTel" jdbcType="VARCHAR" property="mobiletel" /> <result column="MobileTel" jdbcType="VARCHAR" property="mobiletel" />
<result column="Email" jdbcType="VARCHAR" property="email" /> <result column="Email" jdbcType="VARCHAR" property="email" />
@ -169,7 +171,10 @@
SysSex, Birthplace, Birthday, SysSex, Birthplace, Birthday,
HealthStatus, SysPhoto, EducationLevel, HealthStatus, SysPhoto, EducationLevel,
SysFamily, Marriage, Duration, SysFamily, Marriage, Duration,
SysTitle, OfficeTel, MobileTel,member_type, SysTitle,
post_path,
post_name,
OfficeTel, MobileTel,member_type,
Email, QQInter, WeixinInter, Email, QQInter, WeixinInter,
ModifiedBy, ModifiedOn, CreatedBy, ModifiedBy, ModifiedOn, CreatedBy,
CreatedOn,State) CreatedOn,State)
@ -189,7 +194,10 @@
#{syssex,jdbcType=VARCHAR}, #{birthplace,jdbcType=VARCHAR}, #{birthday,jdbcType=TIMESTAMP}, #{syssex,jdbcType=VARCHAR}, #{birthplace,jdbcType=VARCHAR}, #{birthday,jdbcType=TIMESTAMP},
#{healthstatus,jdbcType=VARCHAR}, #{sysphoto,jdbcType=VARCHAR}, #{educationlevel,jdbcType=VARCHAR}, #{healthstatus,jdbcType=VARCHAR}, #{sysphoto,jdbcType=VARCHAR}, #{educationlevel,jdbcType=VARCHAR},
#{sysfamily,jdbcType=VARCHAR}, #{marriage,jdbcType=VARCHAR}, #{duration,jdbcType=TIMESTAMP}, #{sysfamily,jdbcType=VARCHAR}, #{marriage,jdbcType=VARCHAR}, #{duration,jdbcType=TIMESTAMP},
#{systitle,jdbcType=VARCHAR}, #{officetel,jdbcType=VARCHAR}, #{systitle,jdbcType=VARCHAR},
#{postPath,jdbcType=VARCHAR},
#{postName,jdbcType=VARCHAR},
#{officetel,jdbcType=VARCHAR},
#{mobiletel,jdbcType=VARCHAR}, #{mobiletel,jdbcType=VARCHAR},
#{memberType,jdbcType=VARCHAR}, #{memberType,jdbcType=VARCHAR},
#{email,jdbcType=VARCHAR}, #{qqinter,jdbcType=VARCHAR}, #{weixininter,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{qqinter,jdbcType=VARCHAR}, #{weixininter,jdbcType=VARCHAR},
@ -975,6 +983,8 @@
Marriage = #{record.marriage,jdbcType=VARCHAR}, Marriage = #{record.marriage,jdbcType=VARCHAR},
Duration = #{record.duration,jdbcType=TIMESTAMP}, Duration = #{record.duration,jdbcType=TIMESTAMP},
SysTitle = #{record.systitle,jdbcType=VARCHAR}, SysTitle = #{record.systitle,jdbcType=VARCHAR},
post_path = #{record.postPath,jdbcType=VARCHAR},
post_name = #{record.postName,jdbcType=VARCHAR},
OfficeTel = #{record.officetel,jdbcType=VARCHAR}, OfficeTel = #{record.officetel,jdbcType=VARCHAR},
MobileTel = #{record.mobiletel,jdbcType=VARCHAR}, MobileTel = #{record.mobiletel,jdbcType=VARCHAR},
Email = #{record.email,jdbcType=VARCHAR}, Email = #{record.email,jdbcType=VARCHAR},

View File

@ -861,7 +861,10 @@ public class PcPersonalController extends com.rzyc.controller.BaseController {
@ResponseBody @ResponseBody
public MultiResult<ListPerform> performTreeUser()throws Exception{ public MultiResult<ListPerform> performTreeUser()throws Exception{
MultiResult<ListPerform> result = new MultiResult<>(); MultiResult<ListPerform> result = new MultiResult<>();
List<ListPerform> listPerforms = listPerformMapper.findAll(); String userId = getUserId();
//获取部门id
String superPerformId = getSuperPerformId(userId);
List<ListPerform> listPerforms = listPerformMapper.findAll(superPerformId);
if(listPerforms.size() > 0){ if(listPerforms.size() > 0){
for(ListPerform listPerform : listPerforms){ for(ListPerform listPerform : listPerforms){
if(StringUtils.isNotBlank(listPerform.getPerformName())){ if(StringUtils.isNotBlank(listPerform.getPerformName())){
@ -942,6 +945,7 @@ public class PcPersonalController extends com.rzyc.controller.BaseController {
if(null == user){ if(null == user){
getUserAreaCode(changeUserDto.getAreaCode(),sysUser); getUserAreaCode(changeUserDto.getAreaCode(),sysUser);
getUserPost(changeUserDto.getSystitle(),sysUser);
sysUserMapper.changeUser(sysUser); sysUserMapper.changeUser(sysUser);
//处理监管地区 //处理监管地区
changeSuperviseArea(sysUser.getSysuserid(),changeUserDto.getSuperviseAreaId(),operator.getChinaname()); changeSuperviseArea(sysUser.getSysuserid(),changeUserDto.getSuperviseAreaId(),operator.getChinaname());
@ -957,7 +961,7 @@ public class PcPersonalController extends com.rzyc.controller.BaseController {
//密码 //密码
String passwd = PasswdFactory.encryptPasswd(sysUser.getSysuserid(), sysUser.getSysusername(), sysUser.getSyspassword()); String passwd = PasswdFactory.encryptPasswd(sysUser.getSysuserid(), sysUser.getSysusername(), sysUser.getSyspassword());
sysUser.setSyspassword(passwd); sysUser.setSyspassword(passwd);
getUserPost(changeUserDto.getSystitle(),sysUser);
getUserAreaCode(changeUserDto.getAreaCode(),sysUser); getUserAreaCode(changeUserDto.getAreaCode(),sysUser);
sysUserMapper.insert(sysUser); sysUserMapper.insert(sysUser);
@ -988,6 +992,23 @@ public class PcPersonalController extends com.rzyc.controller.BaseController {
} }
} }
/**
* 处理企业岗位信息
* @version v1.0
* @author dong
* @date 2022/11/1 14:40
*/
public void getUserPost(String performId,SysUser user)throws Exception{
if(StringUtils.isNotBlank(performId)){
ListPerform listPerform = listPerformMapper.selectByPrimaryKey(performId);
if(null != listPerform){
user.setSystitle(performId);
user.setPostPath(listPerform.getParentPath());
user.setPostName(listPerform.getParentName());
}
}
}
/** /**
* 处理监管地区 * 处理监管地区
* @param userId * @param userId