Commit d365cf3f authored by lisong's avatar lisong

修改bug

parent a71002f4
......@@ -18,4 +18,7 @@ public class CompanyTreeDto {
private String level;
private List<CompanyTreeDto> children;
private boolean disabled;
}
......@@ -43,6 +43,7 @@ public class HouseholdPvDistrictServiceImpl extends BaseService<HouseholdPvDistr
@Autowired
HouseholdPvDistrictMapper householdPvDistrictMapper;
static final String STATION_LEVEL = "level";
/**
* 分页查询
*/
......@@ -161,7 +162,12 @@ public class HouseholdPvDistrictServiceImpl extends BaseService<HouseholdPvDistr
BeanUtils.copyProperties(item, dto, "children");
Map<String, Object> detail = (Map<String, Object>) item.getObject();
if (!ObjectUtils.isEmpty(detail)) {
dto.setLevel(detail.getOrDefault("level", "").toString());
if (!ObjectUtils.isEmpty(detail.get(STATION_LEVEL)) && "station".equals(detail.get(STATION_LEVEL))){
dto.setLevel(detail.get(STATION_LEVEL).toString());
dto.setDisabled(false);
}else {
dto.setDisabled(true);
}
}
result.add(dto);
if (!ObjectUtils.isEmpty(item.getChildren())) {
......
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