Commit b6e556f5 authored by tangwei's avatar tangwei

修改人员添加户用权限交互优化

parent 4b03dc84
...@@ -127,6 +127,10 @@ public class PersonAccount extends BaseEntity { ...@@ -127,6 +127,10 @@ public class PersonAccount extends BaseEntity {
private String ythPermission; private String ythPermission;
// 内部区域公司 是否全选
@TableField(exist = false)
private String regionalCompaniesSeqFlag;
// 户用内部区域公司 // 户用内部区域公司
@TableField(exist = false) @TableField(exist = false)
private List<String> regionalCompaniesSeq; private List<String> regionalCompaniesSeq;
......
...@@ -194,11 +194,11 @@ public class IPermissionServiceImpl implements IPermissionService { ...@@ -194,11 +194,11 @@ public class IPermissionServiceImpl implements IPermissionService {
areaCompany= areaCompany.stream().filter(e -> e.getLevel().equals("outer_company")).collect(Collectors.toList()); areaCompany= areaCompany.stream().filter(e -> e.getLevel().equals("outer_company")).collect(Collectors.toList());
}else { }else {
areaCompany= areaCompany.stream().filter(e -> !e.getLevel().equals("outer_company")).collect(Collectors.toList()); areaCompany= areaCompany.stream().filter(e -> !e.getLevel().equals("outer_company")).collect(Collectors.toList());
PrivilegeCompany all = new PrivilegeCompany(); // PrivilegeCompany all = new PrivilegeCompany();
all.setCompanyName("全部"); // all.setCompanyName("全部");
all.setOrgCode("all"); // all.setOrgCode("all");
all.setSequenceNbr(0L); // all.setSequenceNbr(0L);
areaCompany.add(0,all); // areaCompany.add(0,all);
} }
......
...@@ -376,8 +376,10 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBa ...@@ -376,8 +376,10 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBa
StdUserEmpower stdUserEmpowerhygf = new StdUserEmpower(); StdUserEmpower stdUserEmpowerhygf = new StdUserEmpower();
List<CompanyModel> co= userEmpowerMapper.getCompanyBoList("region",null,null); List<CompanyModel> co= userEmpowerMapper.getCompanyBoList("region",null,null);
List<String> re= personAccount.getRegionalCompaniesSeq(); List<String> re= personAccount.getRegionalCompaniesSeq();
if(re!=null&&!re.isEmpty()){
if(re.contains("all")){ String flag=personAccount.getRegionalCompaniesSeqFlag();
if(flag!=null&&!flag.isEmpty()){
if(flag.equals("all")){
List<String> all=new ArrayList<>(); List<String> all=new ArrayList<>();
all.add("all"); all.add("all");
stdUserEmpowerhygf.setAmosOrgCode(all); stdUserEmpowerhygf.setAmosOrgCode(all);
...@@ -657,8 +659,9 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBa ...@@ -657,8 +659,9 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBa
stdUserEmpowerhygf=new StdUserEmpower(); stdUserEmpowerhygf=new StdUserEmpower();
List<CompanyModel> co= userEmpowerMapper.getCompanyBoList("region",null,null); List<CompanyModel> co= userEmpowerMapper.getCompanyBoList("region",null,null);
List<String> re= personAccount.getRegionalCompaniesSeq(); List<String> re= personAccount.getRegionalCompaniesSeq();
if(re!=null&&!re.isEmpty()){ String flag=personAccount.getRegionalCompaniesSeqFlag();
if(re.contains("all")){ if(flag!=null&&!flag.isEmpty()){
if(flag.equals("all")){
List<String> all=new ArrayList<>(); List<String> all=new ArrayList<>();
all.add("all"); all.add("all");
stdUserEmpowerhygf.setAmosOrgCode(all); stdUserEmpowerhygf.setAmosOrgCode(all);
...@@ -685,8 +688,9 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBa ...@@ -685,8 +688,9 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBa
}else { }else {
// List<CompanyModel> co= userEmpowerMapper.getCompanyBoList("region",null,null); // List<CompanyModel> co= userEmpowerMapper.getCompanyBoList("region",null,null);
List<String> re= personAccount.getRegionalCompaniesSeq(); List<String> re= personAccount.getRegionalCompaniesSeq();
if(re!=null&&!re.isEmpty()){ String flag=personAccount.getRegionalCompaniesSeqFlag();
if(re.contains("all")){ if(flag!=null&&!flag.isEmpty()){
if(flag.equals("all")){
List<String> all=new ArrayList<>(); List<String> all=new ArrayList<>();
all.add("all"); all.add("all");
stdUserEmpowerhygf.setAmosOrgCode(all); stdUserEmpowerhygf.setAmosOrgCode(all);
...@@ -777,12 +781,19 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBa ...@@ -777,12 +781,19 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBa
StdUserEmpower stdUserEmpowerhygf = userEmpowerMapper.selectOne(new QueryWrapper<StdUserEmpower>().eq("amos_user_id", personAccount.getPuserId()).eq("permission_type", "HYGF")); StdUserEmpower stdUserEmpowerhygf = userEmpowerMapper.selectOne(new QueryWrapper<StdUserEmpower>().eq("amos_user_id", personAccount.getPuserId()).eq("permission_type", "HYGF"));
if(!ObjectUtils.isEmpty(stdUserEmpowerhygf)){ if(!ObjectUtils.isEmpty(stdUserEmpowerhygf)){
if(stdUserEmpowerhygf.getAmosOrgCode()==null){ if(stdUserEmpowerhygf.getAmosOrgCode()==null||stdUserEmpowerhygf.getAmosOrgCode().size()<1){
List<String> list2 = new ArrayList<>(); // List<String> list2 = new ArrayList<>();
list2.add("all"); // list2.add("all");
personAccount.setRegionalCompaniesSeq(list2); personAccount.setRegionalCompaniesSeq(null);
}else if(stdUserEmpowerhygf.getAmosOrgCode().size()==1||stdUserEmpowerhygf.getAmosOrgCode().get(0).equals("all")){
personAccount.setRegionalCompaniesSeqFlag("all");
personAccount.setRegionalCompaniesSeq(null);
}else{ }else{
personAccount.setRegionalCompaniesSeqFlag("no");
personAccount.setRegionalCompaniesSeq(stdUserEmpowerhygf.getAmosOrgCode()); personAccount.setRegionalCompaniesSeq(stdUserEmpowerhygf.getAmosOrgCode());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment