注释板块,改造城市均价
This commit is contained in:
+20
-11
@@ -669,6 +669,7 @@ public class TrendController {
|
|||||||
|
|
||||||
private List<JSONObject> buildStatJson(String city, String region, String block, int weeks) {
|
private List<JSONObject> buildStatJson(String city, String region, String block, int weeks) {
|
||||||
List<RegionStat> regionStatList = null;
|
List<RegionStat> regionStatList = null;
|
||||||
|
List<CitySellStat> citySellStatList = null;
|
||||||
Map<String, String> oprions = new HashMap<String, String>();
|
Map<String, String> oprions = new HashMap<String, String>();
|
||||||
Date currentDate = new Date();
|
Date currentDate = new Date();
|
||||||
if (city != null && region != null && block != null) {
|
if (city != null && region != null && block != null) {
|
||||||
@@ -678,22 +679,30 @@ public class TrendController {
|
|||||||
regionStatList = regionStatService.findRegionStat(city, region, null, currentDate, weeks);
|
regionStatList = regionStatService.findRegionStat(city, region, null, currentDate, weeks);
|
||||||
oprions.put("name", region);
|
oprions.put("name", region);
|
||||||
} else if (city != null) {
|
} else if (city != null) {
|
||||||
regionStatList = regionStatService.findRegionStat(city, null, null, currentDate, weeks);
|
//regionStatList = regionStatService.findRegionStat(city, null, null, currentDate, weeks);
|
||||||
|
int month = weeks / 4;
|
||||||
|
citySellStatList = citySellStatService.getAllWithMonths(city, month);
|
||||||
oprions.put("name", city);
|
oprions.put("name", city);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<JSONObject> ret = new ArrayList<JSONObject>();
|
List<JSONObject> ret = new ArrayList<JSONObject>();
|
||||||
if (regionStatList == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
JSONArray splineJa = new JSONArray();
|
JSONArray splineJa = new JSONArray();
|
||||||
|
|
||||||
for (RegionStat re : regionStatList) {
|
if (CollectionUtils.isNotEmpty(regionStatList)) {
|
||||||
JSONArray ja = new JSONArray();
|
for (RegionStat re : regionStatList) {
|
||||||
ja.put(DateUtil.getBeforeDay(re.getWeekend(), -1).getTime());
|
JSONArray ja = new JSONArray();
|
||||||
ja.put(re.getAvgPrice());
|
ja.put(DateUtil.getBeforeDay(re.getWeekend(), -1).getTime());
|
||||||
splineJa.put(ja);
|
ja.put(re.getAvgPrice());
|
||||||
|
splineJa.put(ja);
|
||||||
|
}
|
||||||
|
} else if (CollectionUtils.isNotEmpty(citySellStatList)) {
|
||||||
|
for (int i = citySellStatList.size() - 1; i >= 0; i--) {
|
||||||
|
CitySellStat re = citySellStatList.get(i);
|
||||||
|
JSONArray ja = new JSONArray();
|
||||||
|
ja.put(DateUtil.getBeforeDay(DateUtil.parseDate(re.getDate().toString(), "yyyyMM"), -1).getTime());
|
||||||
|
ja.put(re.getAvgPrice());
|
||||||
|
splineJa.put(ja);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (splineJa.length() > 0) {
|
if (splineJa.length() > 0) {
|
||||||
@@ -822,7 +831,7 @@ public class TrendController {
|
|||||||
private CitySellStatBo getNearestCitySellStat(String city) {
|
private CitySellStatBo getNearestCitySellStat(String city) {
|
||||||
CitySellStatBo ret = null;
|
CitySellStatBo ret = null;
|
||||||
List<CitySellStat> citySellStats = null;
|
List<CitySellStat> citySellStats = null;
|
||||||
Integer startDate = Integer.valueOf(DateUtil.formatToTightYYYYMMDD(DateUtils.addMonths(new Date(), -3)));
|
Integer startDate = Integer.valueOf(DateUtil.formatByPattern(DateUtils.addMonths(new Date(), -3), "yyyyMM"));
|
||||||
citySellStats = citySellStatService.findNearCityStat(city, startDate, 2);
|
citySellStats = citySellStatService.findNearCityStat(city, startDate, 2);
|
||||||
if(citySellStats!=null && citySellStats.size()>0){
|
if(citySellStats!=null && citySellStats.size()>0){
|
||||||
CitySellStatBo bo = new CitySellStatBo();
|
CitySellStatBo bo = new CitySellStatBo();
|
||||||
|
|||||||
@@ -113,12 +113,16 @@
|
|||||||
</#if>
|
</#if>
|
||||||
|
|
||||||
<div class="trend01b">
|
<div class="trend01b">
|
||||||
<#if districtStatBo?? || regionStatBo??>
|
<#if districtStatBo?? || regionStatBo?? || citySellStatBo??>
|
||||||
<#if count??><div><em>${count!}</em><label>楼盘总量</label></div></#if>
|
<#if count??><div><em>${count!}</em><label>楼盘总量</label></div></#if>
|
||||||
<#if districtStatBo??>
|
<#if districtStatBo??>
|
||||||
<div><em><#if districtStatBo.lastTimeDistrictStat??>${districtStatBo.lastTimeDistrictStat.avgPrice}<#else>暂无</#if></em><label>上周均价(元/㎡)</label></div>
|
<div><em><#if districtStatBo.lastTimeDistrictStat??>${districtStatBo.lastTimeDistrictStat.avgPrice}<#else>暂无</#if></em><label>上周均价(元/㎡)</label></div>
|
||||||
<div><em><#if districtStatBo.districtStat??>${districtStatBo.districtStat.avgPrice}<#else>暂无</#if></em><label>本周均价(元/㎡)</label></div>
|
<div><em><#if districtStatBo.districtStat??>${districtStatBo.districtStat.avgPrice}<#else>暂无</#if></em><label>本周均价(元/㎡)</label></div>
|
||||||
<div><em class="<#if districtStatBo.districtStat.weekendMarkup/100 gte 0>up<#else>down</#if>"><i></i>${(districtStatBo.districtStat.weekendMarkup/100)?string('0.00')}%</em><label>涨跌幅</label></div>
|
<div><em class="<#if districtStatBo.districtStat.weekendMarkup/100 gte 0>up<#else>down</#if>"><i></i>${(districtStatBo.districtStat.weekendMarkup/100)?string('0.00')}%</em><label>涨跌幅</label></div>
|
||||||
|
<#elseif citySellStatBo??>
|
||||||
|
<div><em>${citySellStatBo.lastTimeAvgPrice!}</em><label>上月均价(元/㎡)</label></div>
|
||||||
|
<div><em>${citySellStatBo.avgPrice!}</em><label>本月均价(元/㎡)</label></div>
|
||||||
|
<div style="margin-right:0;"><em class="<#if citySellStatBo.monthMarkup gte 0>up<#else>down</#if>"><i></i>${(citySellStatBo.monthMarkup/100)?string('0.00')}%</em><label>涨跌幅</label></div>
|
||||||
<#elseif regionStatBo??>
|
<#elseif regionStatBo??>
|
||||||
<div><em>${regionStatBo.lastTimeAvgPrice!}</em><label>上周均价(元/㎡)</label></div>
|
<div><em>${regionStatBo.lastTimeAvgPrice!}</em><label>上周均价(元/㎡)</label></div>
|
||||||
<div><em>${regionStatBo.avgPrice!}</em><label>本周均价(元/㎡)</label></div>
|
<div><em>${regionStatBo.avgPrice!}</em><label>本周均价(元/㎡)</label></div>
|
||||||
@@ -145,21 +149,21 @@
|
|||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<#if blockItems?? && blockItems?size gt 0>
|
<#-- <#if blockItems?? && blockItems?size gt 0>-->
|
||||||
<span><a><#if block??>${block!}<#else>板块</#if></a><i></i>
|
<#-- <span><a><#if block??>${block!}<#else>板块</#if></a><i></i>-->
|
||||||
<div class="noteText dn" id="blockDiv">
|
<#-- <div class="noteText dn" id="blockDiv">-->
|
||||||
<font></font>
|
<#-- <font></font>-->
|
||||||
<a <#if !(block??)>class="cur"</#if> href="<@d_url schema="${citySchema}" uri="/${controllerName}/${actionName}"><@d_param name="region" value="${region!}" /><@d_param name="block" value="" /><@d_param name="type" value="${type!}" /></@d_url>">不限</a>
|
<#-- <a <#if !(block??)>class="cur"</#if> href="<@d_url schema="${citySchema}" uri="/${controllerName}/${actionName}"><@d_param name="region" value="${region!}" /><@d_param name="block" value="" /><@d_param name="type" value="${type!}" /></@d_url>">不限</a>-->
|
||||||
<#list blockItems as item>
|
<#-- <#list blockItems as item>-->
|
||||||
<a href="<@d_url schema="${citySchema}" uri="/${controllerName}/${actionName}"><@d_param name="region" value="${item.name!}" /><@d_param name="type" value="${type!}" /></@d_url>" title="最新${item.caption}房价走势">${item.caption}</a>
|
<#-- <a href="<@d_url schema="${citySchema}" uri="/${controllerName}/${actionName}"><@d_param name="region" value="${item.name!}" /><@d_param name="type" value="${type!}" /></@d_url>" title="最新${item.caption}房价走势">${item.caption}</a>-->
|
||||||
</#list>
|
<#-- </#list>-->
|
||||||
</div>
|
<#-- </div>-->
|
||||||
</span>
|
<#-- </span>-->
|
||||||
</#if>
|
<#-- </#if>-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="trend_content">
|
<div class="trend_content">
|
||||||
<#if districtStatBo?? || regionStatBo??>
|
<#if districtStatBo?? || regionStatBo?? || citySellStatBo??>
|
||||||
<ul class="chartTools01">
|
<ul class="chartTools01">
|
||||||
<li><a id="exportButton">下载</a></li>
|
<li><a id="exportButton">下载</a></li>
|
||||||
<li><a id="printButton">打印</a></li>
|
<li><a id="printButton">打印</a></li>
|
||||||
@@ -181,7 +185,7 @@
|
|||||||
</#if>
|
</#if>
|
||||||
<div class="chart" style="padding:20px;">
|
<div class="chart" style="padding:20px;">
|
||||||
<div id="container">
|
<div id="container">
|
||||||
<#if districtStatBo?? || regionStatBo??>
|
<#if districtStatBo?? || regionStatBo?? || citySellStatBo??>
|
||||||
<img class="loading" src="${staticUrl}/images/bgtu/fangjia/trend-loading.gif?v=${version}">
|
<img class="loading" src="${staticUrl}/images/bgtu/fangjia/trend-loading.gif?v=${version}">
|
||||||
<#else>
|
<#else>
|
||||||
<div class="nofound">
|
<div class="nofound">
|
||||||
@@ -478,7 +482,7 @@
|
|||||||
var down_pic_temp = 0;
|
var down_pic_temp = 0;
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
//走势图
|
//走势图
|
||||||
<#if districtStatBo?? || regionStatBo??>
|
<#if districtStatBo?? || regionStatBo?? || citySellStatBo??>
|
||||||
<#if type??>
|
<#if type??>
|
||||||
<#if type == '4' || type == 'quarter'>
|
<#if type == '4' || type == 'quarter'>
|
||||||
var url = Constants.cityUrl + '/trend/quarterData?defaultCityName=${cityName}&districtName=${districtName!}®ion=${region!}&block=${block!}&keyword=${keyword!}';
|
var url = Constants.cityUrl + '/trend/quarterData?defaultCityName=${cityName}&districtName=${districtName!}®ion=${region!}&block=${block!}&keyword=${keyword!}';
|
||||||
|
|||||||
Reference in New Issue
Block a user