Browse Source

修改

zhanglei
dimengzhe 2 years ago
parent
commit
6acc95bb73
  1. 2
      anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysuser/SysUserVo.java
  2. 12
      anrui-portal/anrui-portal-biz/pom.xml
  3. 12
      anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysuser/SysUserService.java

2
anrui-portal/anrui-portal-api/src/main/java/com/yxt/anrui/portal/api/sysuser/SysUserVo.java

@ -88,6 +88,8 @@ public class SysUserVo implements Vo {
@ApiModelProperty("默认的组织机构名称全路径") @ApiModelProperty("默认的组织机构名称全路径")
private String defaultOrgPathName; private String defaultOrgPathName;
private String defaultDeptName;
@ApiModelProperty("是否需要更换密码") @ApiModelProperty("是否需要更换密码")
private Boolean needResetPsd; private Boolean needResetPsd;
@ApiModelProperty("工号") @ApiModelProperty("工号")

12
anrui-portal/anrui-portal-biz/pom.xml

@ -2,11 +2,16 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent> <!-- <parent>
<groupId>com.yxt</groupId> <groupId>com.yxt</groupId>
<artifactId>yxt-parent</artifactId> <artifactId>yxt-parent</artifactId>
<version>0.0.1</version> <version>0.0.1</version>
<relativePath/> <relativePath/>
</parent>-->
<parent>
<groupId>com.yxt.anrui</groupId>
<artifactId>anrui-portal</artifactId>
<version>0.0.1</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
@ -41,6 +46,11 @@
<groupId>com.yxt.anrui.scm</groupId> <groupId>com.yxt.anrui.scm</groupId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
</dependency> </dependency>
<dependency>
<artifactId>anrui-base-api</artifactId>
<groupId>com.yxt.anrui</groupId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency> <dependency>
<artifactId>anrui-crm-api</artifactId> <artifactId>anrui-crm-api</artifactId>
<groupId>com.yxt.anrui</groupId> <groupId>com.yxt.anrui</groupId>

12
anrui-portal/anrui-portal-biz/src/main/java/com/yxt/anrui/portal/biz/sysuser/SysUserService.java

@ -389,6 +389,7 @@ public class SysUserService extends MybatisBaseService<SysUserMapper, SysUser> {
SysUserDefaultOrg sysUserDefaultOrg = sysUserDefaultOrgService.selectByUserSid(user.getSid()); SysUserDefaultOrg sysUserDefaultOrg = sysUserDefaultOrgService.selectByUserSid(user.getSid());
if (sysUserDefaultOrg == null) { if (sysUserDefaultOrg == null) {
String orgNamePath = ""; String orgNamePath = "";
String defaultDeptName = "";
userInfoOneVo.setDefaultOrgPath(sysStaffOrg.getOrgSidPath()); userInfoOneVo.setDefaultOrgPath(sysStaffOrg.getOrgSidPath());
if (StringUtils.isNotBlank(sysStaffOrg.getOrgSidPath())) { if (StringUtils.isNotBlank(sysStaffOrg.getOrgSidPath())) {
List<String> split = Arrays.asList(sysStaffOrg.getOrgSidPath().split("/")); List<String> split = Arrays.asList(sysStaffOrg.getOrgSidPath().split("/"));
@ -397,13 +398,16 @@ public class SysUserService extends MybatisBaseService<SysUserMapper, SysUser> {
SysOrganization sysOrganization = sysOrganizationService.fetchBySid(split.get(split.size() - 2)); SysOrganization sysOrganization = sysOrganizationService.fetchBySid(split.get(split.size() - 2));
SysOrganization sysOrganization1 = sysOrganizationService.fetchBySid(split.get(split.size() - 1)); SysOrganization sysOrganization1 = sysOrganizationService.fetchBySid(split.get(split.size() - 1));
orgNamePath = sysOrganization.getName() + "/" + sysOrganization1.getName(); orgNamePath = sysOrganization.getName() + "/" + sysOrganization1.getName();
defaultDeptName = sysOrganization1.getName();
} else { } else {
SysOrganization sysOrganization = sysOrganizationService.fetchBySid(split.get(0)); SysOrganization sysOrganization = sysOrganizationService.fetchBySid(split.get(0));
orgNamePath = sysOrganization.getName(); orgNamePath = sysOrganization.getName();
defaultDeptName = sysOrganization.getName();
} }
} }
// userInfoOneVo.setDefaultOrgPathName(sysStaffOrg.getOrgNamePath()); // userInfoOneVo.setDefaultOrgPathName(sysStaffOrg.getOrgNamePath());
userInfoOneVo.setDefaultOrgPathName(orgNamePath); userInfoOneVo.setDefaultOrgPathName(orgNamePath);
userInfoOneVo.setDefaultDeptName(defaultDeptName);
} else { } else {
String orgNamePath = ""; String orgNamePath = "";
List<SysStaffOrgVo> sysStaffOrgVos = sysStaffOrgService.selectByStaffS(user.getStaffSid()); List<SysStaffOrgVo> sysStaffOrgVos = sysStaffOrgService.selectByStaffS(user.getStaffSid());
@ -413,6 +417,7 @@ public class SysUserService extends MybatisBaseService<SysUserMapper, SysUser> {
sysUserDefaultOrgService.deleteByUserSid(user.getSid()); sysUserDefaultOrgService.deleteByUserSid(user.getSid());
} }
userInfoOneVo.setDefaultOrgPath(sysUserDefaultOrg.getOrgSidPath()); userInfoOneVo.setDefaultOrgPath(sysUserDefaultOrg.getOrgSidPath());
String defaultDeptName = "";
if (StringUtils.isNotBlank(sysUserDefaultOrg.getOrgSidPath())) { if (StringUtils.isNotBlank(sysUserDefaultOrg.getOrgSidPath())) {
List<String> split = Arrays.asList(sysUserDefaultOrg.getOrgSidPath().split("/")); List<String> split = Arrays.asList(sysUserDefaultOrg.getOrgSidPath().split("/"));
if (split.size() > 1) { if (split.size() > 1) {
@ -420,12 +425,15 @@ public class SysUserService extends MybatisBaseService<SysUserMapper, SysUser> {
SysOrganization sysOrganization = sysOrganizationService.fetchBySid(split.get(split.size() - 2)); SysOrganization sysOrganization = sysOrganizationService.fetchBySid(split.get(split.size() - 2));
SysOrganization sysOrganization1 = sysOrganizationService.fetchBySid(split.get(split.size() - 1)); SysOrganization sysOrganization1 = sysOrganizationService.fetchBySid(split.get(split.size() - 1));
orgNamePath = sysOrganization.getName() + "/" + sysOrganization1.getName(); orgNamePath = sysOrganization.getName() + "/" + sysOrganization1.getName();
defaultDeptName = sysOrganization1.getName();
} else { } else {
SysOrganization sysOrganization = sysOrganizationService.fetchBySid(split.get(0)); SysOrganization sysOrganization = sysOrganizationService.fetchBySid(split.get(0));
orgNamePath = sysOrganization.getName(); orgNamePath = sysOrganization.getName();
defaultDeptName = sysOrganization.getName();
} }
} }
userInfoOneVo.setDefaultOrgPathName(orgNamePath); userInfoOneVo.setDefaultOrgPathName(orgNamePath);
userInfoOneVo.setDefaultDeptName(defaultDeptName);
} }
} }
} }
@ -443,6 +451,7 @@ public class SysUserService extends MybatisBaseService<SysUserMapper, SysUser> {
orgList1.setOrgPath(vv.getOrgSidPath()); orgList1.setOrgPath(vv.getOrgSidPath());
orgList1.setOrgName(vv.getOrgNamePath()); orgList1.setOrgName(vv.getOrgNamePath());
String orgName = ""; String orgName = "";
String deptName = "";
if (StringUtils.isNotBlank(vv.getOrgSidPath())) { if (StringUtils.isNotBlank(vv.getOrgSidPath())) {
List<String> split = Arrays.asList(vv.getOrgSidPath().split("/")); List<String> split = Arrays.asList(vv.getOrgSidPath().split("/"));
if(split.size()>1){ if(split.size()>1){
@ -450,9 +459,11 @@ public class SysUserService extends MybatisBaseService<SysUserMapper, SysUser> {
SysOrganization sysOrganization = sysOrganizationService.fetchBySid(split.get(split.size()-2)); SysOrganization sysOrganization = sysOrganizationService.fetchBySid(split.get(split.size()-2));
SysOrganization sysOrganization1 = sysOrganizationService.fetchBySid(split.get(split.size()-1)); SysOrganization sysOrganization1 = sysOrganizationService.fetchBySid(split.get(split.size()-1));
orgName = sysOrganization.getName()+"/"+sysOrganization1.getName(); orgName = sysOrganization.getName()+"/"+sysOrganization1.getName();
deptName = sysOrganization1.getName();
}else{ }else{
SysOrganization sysOrganization = sysOrganizationService.fetchBySid(split.get(0)); SysOrganization sysOrganization = sysOrganizationService.fetchBySid(split.get(0));
orgName = sysOrganization.getName(); orgName = sysOrganization.getName();
deptName = sysOrganization.getName();
} }
/*String[] split = vv.getOrgSidPath().split("/"); /*String[] split = vv.getOrgSidPath().split("/");
for (int i = 0; i < split.length; i++) { for (int i = 0; i < split.length; i++) {
@ -469,6 +480,7 @@ public class SysUserService extends MybatisBaseService<SysUserMapper, SysUser> {
} }
}*/ }*/
orgList1.setOrgName(orgName); orgList1.setOrgName(orgName);
orgList1.setDeptName(deptName);
} }
orgList.add(orgList1); orgList.add(orgList1);
} }

Loading…
Cancel
Save