diff --git a/inventory-dao/src/main/java/com/rzyc/mapper/user/ListPerformMapper.java b/inventory-dao/src/main/java/com/rzyc/mapper/user/ListPerformMapper.java index ffa7612..aa8305e 100644 --- a/inventory-dao/src/main/java/com/rzyc/mapper/user/ListPerformMapper.java +++ b/inventory-dao/src/main/java/com/rzyc/mapper/user/ListPerformMapper.java @@ -73,7 +73,7 @@ public interface ListPerformMapper { List findBySupClassId(@Param("supClassId") String supClassId); /*岗位列表*/ - List findAll(); + List findAll(@Param("superPerformId") String superPerformId); /*岗位分页*/ List performPage(@Param("supClassId") String supClassId, diff --git a/inventory-dao/src/main/java/com/rzyc/model/user/SysUser.java b/inventory-dao/src/main/java/com/rzyc/model/user/SysUser.java index 2d709d6..087eac9 100644 --- a/inventory-dao/src/main/java/com/rzyc/model/user/SysUser.java +++ b/inventory-dao/src/main/java/com/rzyc/model/user/SysUser.java @@ -50,8 +50,15 @@ public class SysUser implements Serializable { @ApiModelProperty("父级地区名") private String areaName; + @ApiModelProperty("部门id") private String sysunitorentid; + @ApiModelProperty("部门路径") + private String unitPath; + + @ApiModelProperty("部门名") + private String unitPathName; + private String sysdeptid; private String sysunitorentname; @@ -107,8 +114,15 @@ public class SysUser implements Serializable { private Date duration; + @ApiModelProperty("职务id") private String systitle; + @ApiModelProperty("职务路径") + private String postPath; + + @ApiModelProperty("职务名路径") + private String postName; + /*职称名*/ @ApiModelProperty("职务名") private String systitlename; @@ -242,6 +256,38 @@ public class SysUser implements Serializable { 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() { return areaCode; } diff --git a/inventory-dao/src/main/resources/mapper/user/ListPerformMapper.xml b/inventory-dao/src/main/resources/mapper/user/ListPerformMapper.xml index d8a0967..9dac3f2 100644 --- a/inventory-dao/src/main/resources/mapper/user/ListPerformMapper.xml +++ b/inventory-dao/src/main/resources/mapper/user/ListPerformMapper.xml @@ -589,6 +589,10 @@ diff --git a/inventory-dao/src/main/resources/mapper/user/SysUserMapper.xml b/inventory-dao/src/main/resources/mapper/user/SysUserMapper.xml index 1759443..5a0ecad 100644 --- a/inventory-dao/src/main/resources/mapper/user/SysUserMapper.xml +++ b/inventory-dao/src/main/resources/mapper/user/SysUserMapper.xml @@ -33,6 +33,8 @@ + + @@ -169,7 +171,10 @@ SysSex, Birthplace, Birthday, HealthStatus, SysPhoto, EducationLevel, SysFamily, Marriage, Duration, - SysTitle, OfficeTel, MobileTel,member_type, + SysTitle, + post_path, + post_name, + OfficeTel, MobileTel,member_type, Email, QQInter, WeixinInter, ModifiedBy, ModifiedOn, CreatedBy, CreatedOn,State) @@ -189,7 +194,10 @@ #{syssex,jdbcType=VARCHAR}, #{birthplace,jdbcType=VARCHAR}, #{birthday,jdbcType=TIMESTAMP}, #{healthstatus,jdbcType=VARCHAR}, #{sysphoto,jdbcType=VARCHAR}, #{educationlevel,jdbcType=VARCHAR}, #{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}, #{memberType,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{qqinter,jdbcType=VARCHAR}, #{weixininter,jdbcType=VARCHAR}, @@ -975,6 +983,8 @@ Marriage = #{record.marriage,jdbcType=VARCHAR}, Duration = #{record.duration,jdbcType=TIMESTAMP}, SysTitle = #{record.systitle,jdbcType=VARCHAR}, + post_path = #{record.postPath,jdbcType=VARCHAR}, + post_name = #{record.postName,jdbcType=VARCHAR}, OfficeTel = #{record.officetel,jdbcType=VARCHAR}, MobileTel = #{record.mobiletel,jdbcType=VARCHAR}, Email = #{record.email,jdbcType=VARCHAR}, diff --git a/inventory-gov/src/main/java/com/rzyc/controller/PcPersonalController.java b/inventory-gov/src/main/java/com/rzyc/controller/PcPersonalController.java index 4689ddc..f7a961d 100644 --- a/inventory-gov/src/main/java/com/rzyc/controller/PcPersonalController.java +++ b/inventory-gov/src/main/java/com/rzyc/controller/PcPersonalController.java @@ -861,7 +861,10 @@ public class PcPersonalController extends com.rzyc.controller.BaseController { @ResponseBody public MultiResult performTreeUser()throws Exception{ MultiResult result = new MultiResult<>(); - List listPerforms = listPerformMapper.findAll(); + String userId = getUserId(); + //获取部门id + String superPerformId = getSuperPerformId(userId); + List listPerforms = listPerformMapper.findAll(superPerformId); if(listPerforms.size() > 0){ for(ListPerform listPerform : listPerforms){ if(StringUtils.isNotBlank(listPerform.getPerformName())){ @@ -942,6 +945,7 @@ public class PcPersonalController extends com.rzyc.controller.BaseController { if(null == user){ getUserAreaCode(changeUserDto.getAreaCode(),sysUser); + getUserPost(changeUserDto.getSystitle(),sysUser); sysUserMapper.changeUser(sysUser); //处理监管地区 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()); sysUser.setSyspassword(passwd); - + getUserPost(changeUserDto.getSystitle(),sysUser); getUserAreaCode(changeUserDto.getAreaCode(),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