Commit b6e556f5 authored by tangwei's avatar tangwei

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

parent 4b03dc84
......@@ -127,6 +127,10 @@ public class PersonAccount extends BaseEntity {
private String ythPermission;
// 内部区域公司 是否全选
@TableField(exist = false)
private String regionalCompaniesSeqFlag;
// 户用内部区域公司
@TableField(exist = false)
private List<String> regionalCompaniesSeq;
......
......@@ -194,11 +194,11 @@ public class IPermissionServiceImpl implements IPermissionService {
areaCompany= areaCompany.stream().filter(e -> e.getLevel().equals("outer_company")).collect(Collectors.toList());
}else {
areaCompany= areaCompany.stream().filter(e -> !e.getLevel().equals("outer_company")).collect(Collectors.toList());
PrivilegeCompany all = new PrivilegeCompany();
all.setCompanyName("全部");
all.setOrgCode("all");
all.setSequenceNbr(0L);
areaCompany.add(0,all);
// PrivilegeCompany all = new PrivilegeCompany();
// all.setCompanyName("全部");
// all.setOrgCode("all");
// all.setSequenceNbr(0L);
// areaCompany.add(0,all);
}
......
......@@ -376,8 +376,10 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBa
StdUserEmpower stdUserEmpowerhygf = new StdUserEmpower();
List<CompanyModel> co= userEmpowerMapper.getCompanyBoList("region",null,null);
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<>();
all.add("all");
stdUserEmpowerhygf.setAmosOrgCode(all);
......@@ -657,8 +659,9 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBa
stdUserEmpowerhygf=new StdUserEmpower();
List<CompanyModel> co= userEmpowerMapper.getCompanyBoList("region",null,null);
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<>();
all.add("all");
stdUserEmpowerhygf.setAmosOrgCode(all);
......@@ -685,8 +688,9 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBa
}else {
// List<CompanyModel> co= userEmpowerMapper.getCompanyBoList("region",null,null);
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<>();
all.add("all");
stdUserEmpowerhygf.setAmosOrgCode(all);
......@@ -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"));
if(!ObjectUtils.isEmpty(stdUserEmpowerhygf)){
if(stdUserEmpowerhygf.getAmosOrgCode()==null){
List<String> list2 = new ArrayList<>();
list2.add("all");
personAccount.setRegionalCompaniesSeq(list2);
if(stdUserEmpowerhygf.getAmosOrgCode()==null||stdUserEmpowerhygf.getAmosOrgCode().size()<1){
// List<String> list2 = new ArrayList<>();
// list2.add("all");
personAccount.setRegionalCompaniesSeq(null);
}else if(stdUserEmpowerhygf.getAmosOrgCode().size()==1||stdUserEmpowerhygf.getAmosOrgCode().get(0).equals("all")){
personAccount.setRegionalCompaniesSeqFlag("all");
personAccount.setRegionalCompaniesSeq(null);
}else{
personAccount.setRegionalCompaniesSeqFlag("no");
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