Commit 232a8b8a authored by lixuan's avatar lixuan

feat: 房源

parent a5a3b71e
Pipeline #143828 failed with stages
in 29 minutes and 23 seconds
......@@ -38,7 +38,8 @@ public class HouseEnums {
// 房源类型
ZY(0, "在营"),
KZ(1, "闲置"),
GK(2, "挂靠");
GK(2, "挂靠"),
SBC(3, "设备层");
private final int code;
private final String desc;
......
......@@ -12,9 +12,12 @@ public class HouseResourceProfileGraph {
private String wgName;
private BigDecimal jzArea;
private BigDecimal jyArea;
private BigDecimal kzArea;
@Deprecated
private BigDecimal jzArea;
private List<HouseResourcePage> houseResources;
}
......@@ -171,11 +171,8 @@ public class HouseResourceServiceImpl implements HouseResourceService {
if (StringUtils.hasText(wgName)) {
houseResourceProfileGraph.setWgName(wgName);
}
String jzAreaByCode = gridRegionMapper.getJzAreaByCode(k);
if (StringUtils.hasText(jzAreaByCode)) {
houseResourceProfileGraph.setJzArea(new BigDecimal(jzAreaByCode));
}
houseResourceProfileGraph.setJyArea(v.stream().map(HouseResourcePage::getHouseArea).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add));
houseResourceProfileGraph.setKzArea(v.stream().filter(x -> x.getHouseResourceType() == HouseEnums.HouseResourceTypeEnum.KZ.getCode()).map(HouseResourcePage::getHouseArea).reduce(BigDecimal.ZERO, BigDecimal::add));
List<HouseResourcePage> houseResourcePages = handleHouseList(v);
houseResourceProfileGraph.setHouseResources(houseResourcePages.stream().sorted(Comparator.comparing(HouseResourcePage::getHouseNumber)).collect(Collectors.toList()));
resourceProfileGraphList.add(houseResourceProfileGraph);
......
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