代码提交
parent
3c213a6a8a
commit
b489f15b60
|
|
@ -58,7 +58,7 @@ public class OrganizationServiceImpl extends ServiceImpl<OrganizationMapper, Org
|
|||
organization.setUnitDicts(unitDicts);
|
||||
String name = organization.getName();
|
||||
if (name.contains("市") && name.contains("县")){
|
||||
organization.setAdinfoList(adinfoService.tree(adcd, null));
|
||||
organization.setAdinfoList(adinfoService.tree(adcd, adcd));
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -82,13 +82,16 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
|
|||
if (Objects.nonNull(book)){
|
||||
String adcd = book.getAdcd();
|
||||
if (StringUtils.isNotBlank(adcd)) {
|
||||
out.setAdcd(adcd);
|
||||
if ("00000000000".equals(adcd.substring(4))) { // 市
|
||||
out.setAdlevel(1);
|
||||
|
||||
out.setAdcd(adcd.replace("00000000000",""));
|
||||
} else if ("000000000".equals(adcd.substring(6))) { // 县
|
||||
out.setAdcd(adcd.replace("000000000",""));
|
||||
out.setAdlevel(2);
|
||||
}else{
|
||||
out.setAdcd(adcd);
|
||||
}
|
||||
|
||||
}
|
||||
out.setName(book.getName());
|
||||
}
|
||||
|
|
@ -194,12 +197,14 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
|
|||
BeanUtils.copyProperties(sysUser, out);
|
||||
String adcd = addressBook.getAdcd();
|
||||
if (StringUtils.isNotBlank(adcd)) {
|
||||
out.setAdcd(adcd);
|
||||
if ("00000000000".equals(adcd.substring(4))) { // 市
|
||||
out.setAdlevel(1);
|
||||
|
||||
out.setAdcd(adcd.replace("00000000000",""));
|
||||
} else if ("000000000".equals(adcd.substring(6))) { // 县
|
||||
out.setAdcd(adcd.replace("000000000",""));
|
||||
out.setAdlevel(2);
|
||||
}else{
|
||||
out.setAdcd(adcd);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue