|
|
@@ -78,26 +78,28 @@ public class UserInfoHelperImpl implements UserInfoHelper { |
|
|
|
.collect(Collectors.toList()); |
|
|
|
userFullInfo.setUserRoleList(roleMapper.selectBatchIds(roleIdList)); |
|
|
|
} |
|
|
|
UnitDTO unit = mhUnitCache.getById(userInfo.getMhUnitId()); |
|
|
|
if (unit != null && unit.getType() != null) { |
|
|
|
userFullInfo.setUnitStrip(unit.getType().getStrip().getCode()); |
|
|
|
// 是否市属国有企业下用户 |
|
|
|
List<Long> citySoeUnitIds = mhUnitCache.getViewChildIdsRecursion(MhUnitConst.CITY_SOE_UNIT_ID); |
|
|
|
userFullInfo.setIsCitySoeUser(citySoeUnitIds.contains(userInfo.getMhUnitId())); |
|
|
|
if (Boolean.FALSE.equals(userFullInfo.getIsCitySoeUser())) { |
|
|
|
// 是否关键行业部门下用户 |
|
|
|
List<Long> keyIndustryUnitIds = mhUnitCache.getViewChildIdsRecursion(MhUnitConst.KEY_INDUSTRY_UNIT_ID); |
|
|
|
userFullInfo.setIsKeyIndustryUser(keyIndustryUnitIds.contains(userInfo.getMhUnitId())); |
|
|
|
if (Boolean.FALSE.equals(userFullInfo.getIsKeyIndustryUser())) { |
|
|
|
// 是否区县部门下用户 |
|
|
|
List<Long> countyUnitIds = mhUnitCache.getViewChildIdsRecursion(MhUnitConst.COUNTY_PARENT_UNIT_ID); |
|
|
|
userFullInfo.setIsCountyUser(countyUnitIds.contains(userInfo.getMhUnitId())); |
|
|
|
if (Boolean.FALSE.equals(userFullInfo.getIsCountyUser())) { |
|
|
|
// 是否市本级用户 |
|
|
|
List<Long> cityDistrictUnitIds = mhUnitCache.getViewChildIdsRecursion(MhUnitConst.CITY_DISTRICT_UNIT_ID); |
|
|
|
userFullInfo.setIsCityDistrictUser(cityDistrictUnitIds.contains(userInfo.getMhUnitId())); |
|
|
|
} else { |
|
|
|
userFullInfo.setIsCountyXcbUser(unit.getName().contains(MhUnitConst.UNIT_XCB)); |
|
|
|
if (userInfo.getMhUnitId() != null) { |
|
|
|
UnitDTO unit = mhUnitCache.getById(userInfo.getMhUnitId()); |
|
|
|
if (unit != null && unit.getType() != null) { |
|
|
|
userFullInfo.setUnitStrip(unit.getType().getStrip().getCode()); |
|
|
|
// 是否市属国有企业下用户 |
|
|
|
List<Long> citySoeUnitIds = mhUnitCache.getViewChildIdsRecursion(MhUnitConst.CITY_SOE_UNIT_ID); |
|
|
|
userFullInfo.setIsCitySoeUser(citySoeUnitIds.contains(userInfo.getMhUnitId())); |
|
|
|
if (Boolean.FALSE.equals(userFullInfo.getIsCitySoeUser())) { |
|
|
|
// 是否关键行业部门下用户 |
|
|
|
List<Long> keyIndustryUnitIds = mhUnitCache.getViewChildIdsRecursion(MhUnitConst.KEY_INDUSTRY_UNIT_ID); |
|
|
|
userFullInfo.setIsKeyIndustryUser(keyIndustryUnitIds.contains(userInfo.getMhUnitId())); |
|
|
|
if (Boolean.FALSE.equals(userFullInfo.getIsKeyIndustryUser())) { |
|
|
|
// 是否区县部门下用户 |
|
|
|
List<Long> countyUnitIds = mhUnitCache.getViewChildIdsRecursion(MhUnitConst.COUNTY_PARENT_UNIT_ID); |
|
|
|
userFullInfo.setIsCountyUser(countyUnitIds.contains(userInfo.getMhUnitId())); |
|
|
|
if (Boolean.FALSE.equals(userFullInfo.getIsCountyUser())) { |
|
|
|
// 是否市本级用户 |
|
|
|
List<Long> cityDistrictUnitIds = mhUnitCache.getViewChildIdsRecursion(MhUnitConst.CITY_DISTRICT_UNIT_ID); |
|
|
|
userFullInfo.setIsCityDistrictUser(cityDistrictUnitIds.contains(userInfo.getMhUnitId())); |
|
|
|
} else { |
|
|
|
userFullInfo.setIsCountyXcbUser(unit.getName().contains(MhUnitConst.UNIT_XCB)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|