Browse Source

【图层】可视化-左侧菜单增加menu控制

master
wangxianzhang 3 years ago
parent
commit
452b6d75f5
  1. 34
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/CoverageServiceImpl.java

34
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/impl/CoverageServiceImpl.java

@ -83,21 +83,6 @@ public class CoverageServiceImpl implements CoverageService {
@Autowired
private IcResiCategoryWarnService icResiCategoryWarnService;
/**
* 场所类型常量
*/
public static final String PLACE_TYPE_RESI = "resi";
public static final String PLACE_TYPE_SPECIAL_RESI = "special_resi";
public static final String PLACE_TYPE_EVENT= "event";
public static final String PLACE_TYPE_CITY_MANAGEMENT= "city_management";
public static final String PLACE_TYPE_COMUNITY_ORG= "community_org";
public static final String PLACE_TYPE_DANGEROUS_CHEMICALS= "dangerous_chemicals";
public static final String PLACE_TYPE_ENTERPRISE_PARTROL= "enterprise_patrol";
public static final String PLACE_TYPE_GROUP_RENT= "group_rent";
public static final String PLACE_TYPE_PUBLIC_SERVICE= "public_service";
public static final String PLACE_TYPE_SUPERIOR_RESOURCE= "superior_resource";
public static final String PLACE_TYPE_PARTY_UNIT= "party_unit";
// 1:出租 0:自住 2:闲置 3:未售出
public static final Integer HOUSE_RENT_FLAG_RENT = 1;
@ -736,6 +721,13 @@ public class CoverageServiceImpl implements CoverageService {
@Override
public List<AnalysisGovernedTargetsResult> listGovernedTargetCategories() {
List<String> menuUrls = new ArrayList<>(128);
List<GovMenuDTO> menus = govCustomerMenuRedis.getCustomerMenuList(EpmetRequestHolder.getLoginUserCustomerId(), 0, "gov_menu");
if (CollectionUtils.isNotEmpty(menus)) {
menus.stream().forEach(m -> menuUrls.add(m.getUrl()));
}
// 1.从表中取数据出来
List<IcCoverageCategoryDictEntity> targetCategories = govOrgCoverageService.listGovernedTargetCategoryEntities();
@ -750,8 +742,10 @@ public class CoverageServiceImpl implements CoverageService {
String placeTypeInAnalysis = rc.getPlaceTypeInAnalysis();
if (StringUtils.isEmpty(placeTypeInAnalysis)) {
// 只有一层,没有子级
results.add(new AnalysisGovernedTargetsResult(rc.getCategoryKey(), rc.getCategoryName(), rc.getCoverageType(),
rc.getPlaceType(), CoveragePlaceTypeEnum.getEnum(rc.getPlaceType()).getName(), rc.getQuantity(), new ArrayList<>()));
if (menuUrls.contains(rc.getMenuUrl()) || "all".equals(rc.getMenuUrl())) {
results.add(new AnalysisGovernedTargetsResult(rc.getCategoryKey(), rc.getCategoryName(), rc.getCoverageType(),
rc.getPlaceType(), CoveragePlaceTypeEnum.getEnum(rc.getPlaceType()).getName(), rc.getQuantity(), new ArrayList<>()));
}
} else {
// 有子级,需要使用placeTypeInAnalysis分组
List<AnalysisGovernedTargetsResult> targets = placeTypeMap.get(placeTypeInAnalysis);
@ -759,8 +753,10 @@ public class CoverageServiceImpl implements CoverageService {
targets = new ArrayList<>();
placeTypeMap.put(placeTypeInAnalysis, targets);
}
targets.add(new AnalysisGovernedTargetsResult(rc.getCategoryKey(), rc.getCategoryName(), rc.getCoverageType(),
rc.getPlaceType(), CoveragePlaceTypeEnum.getEnum(rc.getPlaceType()).getName(), rc.getQuantity(), new ArrayList<>()));
if (menuUrls.contains(rc.getMenuUrl()) || "all".equals(rc.getMenuUrl())) {
targets.add(new AnalysisGovernedTargetsResult(rc.getCategoryKey(), rc.getCategoryName(), rc.getCoverageType(),
rc.getPlaceType(), CoveragePlaceTypeEnum.getEnum(rc.getPlaceType()).getName(), rc.getQuantity(), new ArrayList<>()));
}
}
});

Loading…
Cancel
Save