|
@@ -66,6 +66,10 @@ public class CzrkUtils {
|
|
if (dept == null){
|
|
if (dept == null){
|
|
throw new BaseException("对不起,未获相关部门信息");
|
|
throw new BaseException("对不起,未获相关部门信息");
|
|
}
|
|
}
|
|
|
|
+ String areaId = dept.getAreaId();
|
|
|
|
+ if (StringUtils.isBlank(areaId)){
|
|
|
|
+ throw new BaseException(dept.getDeptName() + "当前未获取到部门下行政区域id" );
|
|
|
|
+ }
|
|
//判断该用户是什么角色权限字符
|
|
//判断该用户是什么角色权限字符
|
|
List<SysRole> roles = sysUser.getRoles();
|
|
List<SysRole> roles = sysUser.getRoles();
|
|
if (roles != null && roles.size() > 0){
|
|
if (roles != null && roles.size() > 0){
|
|
@@ -76,39 +80,33 @@ public class CzrkUtils {
|
|
switch (roleKey){
|
|
switch (roleKey){
|
|
case "province":
|
|
case "province":
|
|
if (type.equals(Czrk.HJ)){
|
|
if (type.equals(Czrk.HJ)){
|
|
- //czrk.setProvinceId();
|
|
|
|
|
|
+ czrk.setProvinceId(areaId);
|
|
}else {
|
|
}else {
|
|
- //czrk.setProvinceIdXjd();
|
|
|
|
|
|
+ czrk.setProvinceIdXjd(areaId);
|
|
}
|
|
}
|
|
case "city":
|
|
case "city":
|
|
if (type.equals(Czrk.HJ)){
|
|
if (type.equals(Czrk.HJ)){
|
|
- //czrk.setCityId();
|
|
|
|
|
|
+ czrk.setCityId(areaId);
|
|
}else {
|
|
}else {
|
|
- //czrk.setCityIdXjd();
|
|
|
|
|
|
+ czrk.setCityIdXjd(areaId);
|
|
}
|
|
}
|
|
case "region":
|
|
case "region":
|
|
if (type.equals(Czrk.HJ)){
|
|
if (type.equals(Czrk.HJ)){
|
|
- //czrk.setRegionId();
|
|
|
|
|
|
+ czrk.setRegionId(areaId);
|
|
}else {
|
|
}else {
|
|
- //czrk.setRegionIdXjd();
|
|
|
|
|
|
+ czrk.setRegionIdXjd(areaId);
|
|
}
|
|
}
|
|
case "villageTowns":
|
|
case "villageTowns":
|
|
if (type.equals(Czrk.HJ)){
|
|
if (type.equals(Czrk.HJ)){
|
|
- //czrk.setVillageTownsId();
|
|
|
|
|
|
+ czrk.setVillageTownsId(areaId);
|
|
}else {
|
|
}else {
|
|
- //czrk.setVillageTownsXjd();
|
|
|
|
|
|
+ czrk.setVillageTownsXjd(areaId);
|
|
}
|
|
}
|
|
case "village":
|
|
case "village":
|
|
if (type.equals(Czrk.HJ)){
|
|
if (type.equals(Czrk.HJ)){
|
|
- //czrk.setVillageId();
|
|
|
|
- }else {
|
|
|
|
- //czrk.setVillageIdXjd();
|
|
|
|
- }
|
|
|
|
- case "villagerGroup":
|
|
|
|
- if (type.equals(Czrk.HJ)){
|
|
|
|
- //czrk.setVillagerGroupId();
|
|
|
|
|
|
+ czrk.setVillageId(areaId);
|
|
}else {
|
|
}else {
|
|
- //czrk.setVillagerGroupIdXjd();
|
|
|
|
|
|
+ czrk.setVillageIdXjd(areaId);
|
|
}
|
|
}
|
|
default:
|
|
default:
|
|
}
|
|
}
|
|
@@ -131,6 +129,10 @@ public class CzrkUtils {
|
|
if (dept == null){
|
|
if (dept == null){
|
|
throw new BaseException("对不起,未获相关部门信息");
|
|
throw new BaseException("对不起,未获相关部门信息");
|
|
}
|
|
}
|
|
|
|
+ String areaId = dept.getAreaId();
|
|
|
|
+ if (StringUtils.isBlank(areaId)){
|
|
|
|
+ throw new BaseException(dept.getDeptName() + "当前未获取到部门下行政区域id" );
|
|
|
|
+ }
|
|
//判断该用户是什么角色权限字符
|
|
//判断该用户是什么角色权限字符
|
|
List<SysRole> roles = sysUser.getRoles();
|
|
List<SysRole> roles = sysUser.getRoles();
|
|
if (roles != null && roles.size() > 0){
|
|
if (roles != null && roles.size() > 0){
|
|
@@ -141,34 +143,29 @@ public class CzrkUtils {
|
|
switch (roleKey){
|
|
switch (roleKey){
|
|
case "province":
|
|
case "province":
|
|
String provinceId = czrk.getProvinceId();
|
|
String provinceId = czrk.getProvinceId();
|
|
-/* if (StringUtils.isNotBlank(provinceId) && provinceId.equals()){
|
|
|
|
|
|
+ if (StringUtils.isNotBlank(provinceId) && provinceId.equals(areaId)){
|
|
flag = true;
|
|
flag = true;
|
|
- }*/
|
|
|
|
|
|
+ }
|
|
case "city":
|
|
case "city":
|
|
String cityId = czrk.getCityId();
|
|
String cityId = czrk.getCityId();
|
|
-/* if (StringUtils.isNotBlank(cityId) && cityId.equals()){
|
|
|
|
|
|
+ if (StringUtils.isNotBlank(cityId) && cityId.equals(areaId)){
|
|
flag = true;
|
|
flag = true;
|
|
- }*/
|
|
|
|
|
|
+ }
|
|
case "region":
|
|
case "region":
|
|
String regionId = czrk.getRegionId();
|
|
String regionId = czrk.getRegionId();
|
|
-/* if (StringUtils.isNotBlank(regionId) && regionId.equals()){
|
|
|
|
|
|
+ if (StringUtils.isNotBlank(regionId) && regionId.equals(areaId)){
|
|
flag = true;
|
|
flag = true;
|
|
- }*/
|
|
|
|
|
|
+ }
|
|
case "villageTowns":
|
|
case "villageTowns":
|
|
String villageTownsId = czrk.getVillageTownsId();
|
|
String villageTownsId = czrk.getVillageTownsId();
|
|
-/* if (StringUtils.isNotBlank(villageTownsId) && villageTownsId.equals()){
|
|
|
|
|
|
+ if (StringUtils.isNotBlank(villageTownsId) && villageTownsId.equals(areaId)){
|
|
flag = true;
|
|
flag = true;
|
|
- }*/
|
|
|
|
|
|
+ }
|
|
case "village":
|
|
case "village":
|
|
String village = czrk.getVillage();
|
|
String village = czrk.getVillage();
|
|
-/* if (StringUtils.isNotBlank(village) && village.equals()){
|
|
|
|
- flag = true;
|
|
|
|
- }*/
|
|
|
|
- case "villagerGroup":
|
|
|
|
- String villagerGroup = czrk.getVillagerGroup();
|
|
|
|
-/* if (StringUtils.isNotBlank(villagerGroup) && villagerGroup.equals()){
|
|
|
|
|
|
+ if (StringUtils.isNotBlank(village) && village.equals(areaId)){
|
|
flag = true;
|
|
flag = true;
|
|
- }*/
|
|
|
|
|
|
+ }
|
|
default:
|
|
default:
|
|
}
|
|
}
|
|
}
|
|
}
|