Commit 901d3ab0 authored by chenzhao's avatar chenzhao

修改bug 水源建筑不再根据单位过滤

parent c1c1714b
...@@ -54,7 +54,7 @@ public class WaterResourceDto extends BaseDto { ...@@ -54,7 +54,7 @@ public class WaterResourceDto extends BaseDto {
@ApiModelProperty(value = "所在建筑id") @ApiModelProperty(value = "所在建筑id")
private Long belongBuildingId; private Long belongBuildingId;
@ExplicitConstraint(indexNum = 3, sourceClass = CommonExplicitConstraint.class, method = "getBuildingList") @ExplicitConstraint(indexNum = 3, sourceClass = CommonExplicitConstraint.class, method = "getWaterBuildingList")
@ExcelProperty(value = "所在建筑", index = 3) @ExcelProperty(value = "所在建筑", index = 3)
@ApiModelProperty(value = "所在建筑") @ApiModelProperty(value = "所在建筑")
private String belongBuilding; private String belongBuilding;
......
...@@ -112,6 +112,9 @@ public class DataSourcesImpl implements DataSources { ...@@ -112,6 +112,9 @@ public class DataSourcesImpl implements DataSources {
case "getBuildingList": case "getBuildingList":
str = getBuildingList(); str = getBuildingList();
break; break;
case "getWaterBuildingList":
str = getWaterBuildingList();
break;
case "getFireSystemList": case "getFireSystemList":
str = getFireSystemList(); str = getFireSystemList();
break; break;
...@@ -404,6 +407,20 @@ public class DataSourcesImpl implements DataSources { ...@@ -404,6 +407,20 @@ public class DataSourcesImpl implements DataSources {
return str; return str;
} }
private String[] getWaterBuildingList() {
ResponseModel<Object> response = equipFeignClient.getBuildingTree();
List<Map<String, Object>> buildingMapList = (List<Map<String, Object>>) response.getResult();
List<Map<String, Object>> children = (List<Map<String, Object>>) buildingMapList.get(0).get("children");
List<String> collect = children.stream().map(itme -> {
return itme.get("name") + "@" + itme.get("id");
}).collect(Collectors.toList());
String[] str = collect.toArray(new String[collect.size()]);
return str;
}
private String[] getDataDictionary(String type) { private String[] getDataDictionary(String type) {
QueryWrapper<DataDictionary> queryWrapper = new QueryWrapper<>(); QueryWrapper<DataDictionary> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("type", type); queryWrapper.eq("type", type);
......
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