|
|
|
@@ -234,6 +234,7 @@ public class WxChartServiceImpl implements WxChartDataService { |
|
|
|
String tenantId = paramsMap.get("tenantId"); |
|
|
|
String parentTenantId = paramsMap.get("parentTenantId"); |
|
|
|
Integer chart = Integer.valueOf(paramsMap.get("chart")); |
|
|
|
Integer chartByArea = Integer.valueOf(paramsMap.get("chartByArea")); |
|
|
|
String startdate = paramsMap.get("startdate"); |
|
|
|
String enddate = paramsMap.get("enddate"); |
|
|
|
|
|
|
|
@@ -258,7 +259,11 @@ public class WxChartServiceImpl implements WxChartDataService { |
|
|
|
|
|
|
|
//出租率 |
|
|
|
if (chart.equals(EnumChart.CZL.getCode())) { |
|
|
|
return getRentRate(tenantEntity); |
|
|
|
if (null != chartByArea) { |
|
|
|
return getRentRate(tenantEntity,false); |
|
|
|
}else { |
|
|
|
return getRentRate(tenantEntity,true); |
|
|
|
} |
|
|
|
} |
|
|
|
//租金收缴率 |
|
|
|
if (chart.equals(EnumChart.ZJSJL.getCode())) { |
|
|
|
@@ -2683,17 +2688,29 @@ public class WxChartServiceImpl implements WxChartDataService { |
|
|
|
* 出租率 |
|
|
|
* @param tenantEntity |
|
|
|
*/ |
|
|
|
private ResultData getRentRate(TenantEntity tenantEntity) { |
|
|
|
private ResultData getRentRate(TenantEntity tenantEntity,boolean byArea) { |
|
|
|
HashMap<String, Object> datamap = new HashMap<>(); |
|
|
|
WxShop wxShop = new WxShop(); |
|
|
|
wxShop.updateTenantInfo(tenantEntity); |
|
|
|
wxShop.setStatus(EnumShopStatus.RENT.getCode()); |
|
|
|
List<WxShop> yczlist = wxShopMapper.findList(wxShop); |
|
|
|
wxShop.setStatus(EnumShopStatus.NOT_RENT.getCode()); |
|
|
|
List<WxShop> wczlist = wxShopMapper.findList(wxShop); |
|
|
|
//出租与未出租 |
|
|
|
int yczsize = yczlist.size(); |
|
|
|
int wczsize = wczlist.size(); |
|
|
|
int yczsize = 0; |
|
|
|
int wczsize = 0; |
|
|
|
if (byArea) { |
|
|
|
WxShop wxShop = new WxShop(); |
|
|
|
wxShop.updateTenantInfo(tenantEntity); |
|
|
|
wxShop.setStatus(EnumShopStatus.RENT.getCode()); |
|
|
|
yczsize = wxShopMapper.findAreaSum(wxShop).intValue(); |
|
|
|
wxShop.setStatus(EnumShopStatus.NOT_RENT.getCode()); |
|
|
|
wczsize = wxShopMapper.findAreaSum(wxShop).intValue(); |
|
|
|
}else { |
|
|
|
WxShop wxShop = new WxShop(); |
|
|
|
wxShop.updateTenantInfo(tenantEntity); |
|
|
|
wxShop.setStatus(EnumShopStatus.RENT.getCode()); |
|
|
|
List<WxShop> yczlist = wxShopMapper.findList(wxShop); |
|
|
|
wxShop.setStatus(EnumShopStatus.NOT_RENT.getCode()); |
|
|
|
List<WxShop> wczlist = wxShopMapper.findList(wxShop); |
|
|
|
yczsize = yczlist.size(); |
|
|
|
wczsize = wczlist.size(); |
|
|
|
} |
|
|
|
|
|
|
|
int size = yczsize + wczsize; |
|
|
|
if (size == 0) { |
|
|
|
datamap.put("yczsl", 0); |
|
|
|
|