Commit 1b970d72 authored by tangwei's avatar tangwei

Merge branch 'develop_ccs' of http://39.98.45.134:8090/moa/amos-boot-biz into develop_ccs

parents 8b7b9e35 901d3ab0
......@@ -54,7 +54,7 @@ public class WaterResourceDto extends BaseDto {
@ApiModelProperty(value = "所在建筑id")
private Long belongBuildingId;
@ExplicitConstraint(indexNum = 3, sourceClass = CommonExplicitConstraint.class, method = "getBuildingList")
@ExplicitConstraint(indexNum = 3, sourceClass = CommonExplicitConstraint.class, method = "getWaterBuildingList")
@ExcelProperty(value = "所在建筑", index = 3)
@ApiModelProperty(value = "所在建筑")
private String belongBuilding;
......
......@@ -112,6 +112,9 @@ public class DataSourcesImpl implements DataSources {
case "getBuildingList":
str = getBuildingList();
break;
case "getWaterBuildingList":
str = getWaterBuildingList();
break;
case "getFireSystemList":
str = getFireSystemList();
break;
......@@ -404,6 +407,20 @@ public class DataSourcesImpl implements DataSources {
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) {
QueryWrapper<DataDictionary> queryWrapper = new QueryWrapper<>();
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