新增租金查看

This commit is contained in:
Jian Shen
2022-08-08 15:30:33 +08:00
parent f1525cbce0
commit 0dad9ea218
19 changed files with 4458 additions and 59 deletions
@@ -102,7 +102,7 @@ public class SqMetreRentController {
JSONObject row = new JSONObject();
row.put("x",DateUtil.add(rent.getWeekend(), 1).getTime());
row.put("y",rent.getAvgPrice());
row.put("sampleEnum",rent.getSampleEnum());
row.put("sampleEnum",rent.getValueType());
datas.add(row);
}
@@ -136,7 +136,7 @@ public class SqMetreRentController {
Date statDate = DateUtil.parseFormatDate(model.getStatDate());
SqmetreRent stat = sqmetreRentService.findSqmetreRent(model.getCityDisplay(), model.getRegion(), model.getDistrictName(), model.getCat(), statDate);
if(null != stat){
stat.setAvgPrice(model.getValue());
stat.setAvgPrice(model.getValue().intValue());
stat.setModificationDate(new Date());
sqmetreRentService.updateSqmetreRent(stat);
}
@@ -204,7 +204,7 @@ public class SqMetreRentController {
rent.setDistrictName(model.getDistrictName());
rent.setWeekend(statDate);
rent.setCat(model.getCat());
rent.setAvgPrice(model.getValue());
rent.setAvgPrice(model.getValue().intValue());
rent.setCreationDate(new Date());
rent.setModificationDate(new Date());
sqmetreRentService.save(rent);
@@ -0,0 +1,341 @@
package com.fangjia.bkoff.model;
import com.fangjia.dal.mongo.model.*;
import com.fangjia.dal.mongo.model.bkoff.CalcCommand;
import com.fangjia.dal.mongo.model.bkoff.CalcConfig;
import com.fangjia.dal.mongo.model.bkoff.GuidingPrice;
import com.fangjia.dal.seaweed.model.District;
import com.fangjia.service.bo.AvgUpdateBo;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
import java.util.List;
import java.util.Map;
public class RentPriceUpdateModel extends BaseModel {
/**
*
*/
private static final long serialVersionUID = 1L;
private List<AvgUpdateBo> avgUpdateBos;
private Map<String, List<AvgUpdateBo>> avgUpdateBoMap;
private String region;
private String block;
private String cityDisplay;
private String id;
private int avgPrice;
private Double minCredit;
private Double maxCredit;
private Integer valueType;
private String name;
private District district;
private List<AverageStatistics> averageStatistics;
private List<AvgBase> avgBases;
private CalcDistrictStat calcDistrictStat;
private DistrictStat districtStat;
private SqmetreRent sqmetreRent;
private long dealPriceCount;
private List<GuidingPrice> guidingPrices;
private Map<String, Long> distribution;
private CalcConfig calcConfig;
private String stype;
private String keyword;
private Integer status;
private List<CalcCommand> calcCommands;
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date startDate;
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date endDate;
private String estateType;
private String sort;
private Date weekend;
private int sdateStart;
private int sdateEnd;
private String series;
private String vts;
private String category;
public List<AvgUpdateBo> getAvgUpdateBos() {
return avgUpdateBos;
}
public void setAvgUpdateBos(List<AvgUpdateBo> avgUpdateBos) {
this.avgUpdateBos = avgUpdateBos;
}
public String getRegion() {
return region;
}
public void setRegion(String region) {
this.region = region;
}
public String getBlock() {
return block;
}
public void setBlock(String block) {
this.block = block;
}
public String getCityDisplay() {
return cityDisplay;
}
public void setCityDisplay(String cityDisplay) {
this.cityDisplay = cityDisplay;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public int getAvgPrice() {
return avgPrice;
}
public void setAvgPrice(int avgPrice) {
this.avgPrice = avgPrice;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public District getDistrict() {
return district;
}
public void setDistrict(District district) {
this.district = district;
}
public List<AverageStatistics> getAverageStatistics() {
return averageStatistics;
}
public void setAverageStatistics(List<AverageStatistics> averageStatistics) {
this.averageStatistics = averageStatistics;
}
public long getDealPriceCount() {
return dealPriceCount;
}
public void setDealPriceCount(long dealPriceCount) {
this.dealPriceCount = dealPriceCount;
}
public List<GuidingPrice> getGuidingPrices() {
return guidingPrices;
}
public void setGuidingPrices(List<GuidingPrice> guidingPrices) {
this.guidingPrices = guidingPrices;
}
public Map<String, Long> getDistribution() {
return distribution;
}
public void setDistribution(Map<String, Long> distribution) {
this.distribution = distribution;
}
public CalcConfig getCalcConfig() {
return calcConfig;
}
public void setCalcConfig(CalcConfig calcConfig) {
this.calcConfig = calcConfig;
}
public String getStype() {
return stype;
}
public void setStype(String stype) {
this.stype = stype;
}
public String getKeyword() {
return keyword;
}
public void setKeyword(String keyword) {
this.keyword = keyword;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Date getStartDate() {
return startDate;
}
public void setStartDate(Date startDate) {
this.startDate = startDate;
}
public Date getEndDate() {
return endDate;
}
public void setEndDate(Date endDate) {
this.endDate = endDate;
}
public List<CalcCommand> getCalcCommands() {
return calcCommands;
}
public void setCalcCommands(List<CalcCommand> calcCommands) {
this.calcCommands = calcCommands;
}
public String getEstateType() {
return estateType;
}
public void setEstateType(String estateType) {
this.estateType = estateType;
}
public Map<String, List<AvgUpdateBo>> getAvgUpdateBoMap() {
return avgUpdateBoMap;
}
public void setAvgUpdateBoMap(Map<String, List<AvgUpdateBo>> avgUpdateBoMap) {
this.avgUpdateBoMap = avgUpdateBoMap;
}
public String getSort() {
return sort;
}
public void setSort(String sort) {
this.sort = sort;
}
public Double getMinCredit() {
return minCredit;
}
public void setMinCredit(Double minCredit) {
this.minCredit = minCredit;
}
public Double getMaxCredit() {
return maxCredit;
}
public void setMaxCredit(Double maxCredit) {
this.maxCredit = maxCredit;
}
public Integer getValueType() {
return valueType;
}
public void setValueType(Integer valueType) {
this.valueType = valueType;
}
public CalcDistrictStat getCalcDistrictStat() {
return calcDistrictStat;
}
public void setCalcDistrictStat(CalcDistrictStat calcDistrictStat) {
this.calcDistrictStat = calcDistrictStat;
}
public DistrictStat getDistrictStat() {
return districtStat;
}
public void setDistrictStat(DistrictStat districtStat) {
this.districtStat = districtStat;
}
public Date getWeekend() {
return weekend;
}
public void setWeekend(Date weekend) {
this.weekend = weekend;
}
public int getSdateStart() {
return sdateStart;
}
public void setSdateStart(int sdateStart) {
this.sdateStart = sdateStart;
}
public int getSdateEnd() {
return sdateEnd;
}
public void setSdateEnd(int sdateEnd) {
this.sdateEnd = sdateEnd;
}
public String getSeries() {
return series;
}
public void setSeries(String series) {
this.series = series;
}
public String getVts() {
return vts;
}
public void setVts(String vts) {
this.vts = vts;
}
public String getCategory() {
return category;
}
public void setCategory(String category) {
this.category = category;
}
public List<AvgBase> getAvgBases() {
return avgBases;
}
public void setAvgBases(List<AvgBase> avgBases) {
this.avgBases = avgBases;
}
public SqmetreRent getSqmetreRent() {
return sqmetreRent;
}
public void setSqmetreRent(SqmetreRent sqmetreRent) {
this.sqmetreRent = sqmetreRent;
}
}
@@ -686,6 +686,7 @@
<a target="_blank" href="../district/districtNearby?id=${district.id}&cityDisplay=${cityDisplay!}">配套</a>
</#if>
<a target="_blank" href="../avgPriceUpdate/districtDetail?id=${district.id}">均价</a>
<a target="_blank" href="../rentPriceUpdate/districtDetail?id=${district.id}">租金</a>
<a target="_blank" href="../seawater/houseList?cityDisplay=${district.city!}&region=${district.region!}&districtName=${district.name!}">样本</a>
<a target="_blank" href="http://192.168.0.65/fangjia-coredata-bkoff/analy/analyDistrictDetailList?city=${district.city!}&region=${district.region!}&districtName=${district.name!}">数据对比</a>
<a target="_blank" href="../district/add?id=${district.id}">复制</a>
@@ -0,0 +1,470 @@
<#ftl attributes={"content_type":"text/html; charset=UTF-8"}>
<#compress>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>${cityDisplay}<#if region?? && region!=''>-${region}<#if block?? && block!=''>-${block}</#if></#if> 城市租金详细信息</title>
<link rel="stylesheet" type="text/css" href="../bootstrap/css/bootstrap.min.css?v=${version}" />
<link rel="stylesheet" type="text/css" href="../style/main_simple.css?v=${version}" />
<link rel="stylesheet" type="text/css" href="../style/pagination.css?v=${version}" />
<link rel="stylesheet" type="text/css" href="../style/jnotify/jNotify.jquery.css?v=${version}" />
<script type="text/javascript" src="../js/My97DatePicker/WdatePicker.js"></script>
<#include "/common_js.ftl" />
<script type="text/javascript" src="../js/jquery-1.9.1.js"></script>
<script type="text/javascript" src="../js/jquery.pagination.js?v=${version}"></script>
<script type="text/javascript" src="../js/highcharts/highcharts-3.0.7.js"></script>
<script type="text/javascript" src="../js/highcharts/exporting-3.0.7.js"></script>
<script type="text/javascript" src="../bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="../js/jNotify.jquery.min.js?v=${version}"></script>
<style>
.con {
border-radius:0px;
}
label{display:inline-block}
.input-small{
margin:0px;
}
</style>
</head>
<body>
<#include "/layout/header.ftl" />
<div class="main-content" style="padding:0px 10px;">
<form action="detail">
<table class="table table-bordered table-condensed con" style="margin-top: 4px">
<tr>
<th colspan="2">查询条件</th><th colspan="2">租金更新</th><th colspan="2">租金新增</th>
</tr>
<tr>
<td>
<label for="region">城市:</label>
</td>
<td>
<@d_city defaultValue="${cityDisplay!}" callback="changeCity" callbackField="display" name="cityDisplay"/>
</td>
<td>
日期:
</td>
<td>
<label id="dateLabel"></label>
</td>
<td>
新增日期:
</td>
<td>
<input id="shortDate" style="width:80px;" name="shortDate" value="${shortDate!}" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" readonly="readonly" />
</td>
</tr>
<tr>
<td>
<label for="region">区域:</label>
</td>
<td>
<select id="region" name="region" class="form-control" onchange="changeRegion()">
<option value="">不限</option>
</select>
</td>
<td>
覆盖率:
</td>
<td>
<label id="coverageLabel"></label>
</td>
<td>
覆盖率:
</td>
<td>
<label>0</label>
</td>
</tr>
<tr>
<td>
<label for="region">板块:</label>
</td>
<td>
<select id="block" name="block" class="form-control">
<option value="">不限</option>
</select>
</td>
<td>
可信度:
</td>
<td>
<label id="creditLabel"></label>
</td>
<td>
可信度:
</td>
<td>
<label id="creditLabel2"></label>
</td>
</tr>
<tr>
<td colspan="2"></td>
<td><label for="avgPrice">租金/计算租金:</label></td>
<td>
<input type="hidden" id="_id">
<input type="text" id="avgPrice" class=".span1" style="margin-bottom: 0px;"> /
<span id="calcValueLabel" style="width:100px;display:inline-block;"></span>
</td>
<td><label for="avgPrice">租金:</label></td>
<td>
<input type="hidden" id="_region" value="${region!}">
<input type="hidden" id="_city" value="${cityDisplay!}">
<input type="hidden" id="_block" value="${block!}">
<input type="text" id="avgPrice2" class=".span1" style="margin-bottom: 0px;">
<span id="calcValueLabel2" style="width:100px;display:inline-block;"></span>
</td>
</tr>
<tr>
<td colspan="2"><input id="queryBtn" class ="btn btn-primary" type="submit" value="查询" /></td>
<td colspan="2">
<a href="#myModal" role="button" class="btn btn-primary" onclick="updateAvgPriveOpener()" >更新租金</a>
<a href="javascript:;" role="button" class="btn btn-primary" onclick="javascript:if(confirm('确认删除?')){$.get('../rentPriceUpdate/delete?id=' + $('#_id').val(), function(){location.reload();})}" >删除</a>
</td>
<td colspan="2">
<a href="#myModal2" role="button" class="btn btn-primary" onclick="confirmAddAvgPrice()" >新增价格</a>
</td>
</tr>
</table>
</form>
<div id="myModal" class="modal hide fade">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h3>提示</h3>
</div>
<div class="modal-body">
<p>确定要更新租金?</p>
</div>
<div class="modal-footer">
<a href="#" class="btn" data-dismiss="modal">关闭</a>
<a href="#" class="btn btn-warning" onclick="updateAvgPrice()">更新</a>
</div>
</div>
<div id="myModal2" class="modal hide fade">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h3>提示</h3>
</div>
<div class="modal-body">
<p>确定要新增租金?</p>
</div>
<div class="modal-footer">
<a href="#" class="btn" data-dismiss="modal">关闭</a>
<a href="#" class="btn btn-warning" onclick="addAvgPrice()">确定</a>
</div>
</div>
<ul class="nav nav-tabs" id="myTab" style="height: 30px;">
<li class="active" data-toggle="tab"><a href="#container">走势图</a></li>
<li data-toggle="tab"><a href="#DataTab">数据表</a></li>
</ul>
<div class="tab-content">
<div id="container" class="tab-pane active"></div>
<div id="DataTab" class="tab-pane">
<table class="table table-bordered table-hover">
<thead>
<tr>
<td>日期</td><td>租金</td><td>计算租金</td><td>周同比</td><td>可信度</td><td>覆盖率</td>
</tr>
</thead>
<tbody id="Searchresult">
</tbody>
<tfoot >
<tr>
<td colspan="6"><div id="Pagination" class="pagination"></div></td>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</body>
</html>
<script type="text/javascript">
var selectCity = '${cityDisplay!}';
var selectRegion = '${region!}'
var selectBlock = '${block!}'
function changeCity(display){
selectCity = display;
if (display) {
$("#display").val(display);
}
jQuery.ajax({
type: 'POST',
url: '../district/getRegions',
data: encodeURI("cityDisplay=" + display),
dataType: 'json',
timeout: 100000,
success: function(model) {
$("#region").empty();
if (model.regionList.length > 0) {
$("<option value=''>不限</option>").appendTo($("#region"));
$.each(model.regionList, function(i, region){
if(selectRegion == region){
$("<option value='" + region + "' selected>" + region + "</option>").appendTo($("#region"));
}else{
$("<option value='" + region + "' >" + region + "</option>").appendTo($("#region"));
}
});
}
},
error : function() {
}
});
}
function changeRegion(r){
var selectRegion = $("#region option:selected").text();
if(r!=undefined){
selectRegion = r;
}
$("#block").empty();
if(region==="不限"){
$("<option value=''>不限</option>").appendTo($("#block"));
}
jQuery.ajax({
type: 'POST',
url: '../district/getBlocks',
data: {cityDisplay:selectCity,region:selectRegion},
dataType: 'json',
timeout: 100000,
success: function(model) {
$("#block").empty();
if (model.blockList.length > 0) {
$("<option value=''>不限</option>").appendTo($("#block"));
$.each(model.blockList, function(i, block){
if(selectBlock == block){
$("<option value='" + block + "' selected>" + block + "</option>").appendTo($("#block"));
}else{
$("<option value='" + block + "' >" + block + "</option>").appendTo($("#block"));
}
});
}
},
error : function() {
}
});
}
changeCity('${cityDisplay!}');
if(selectRegion !==''){
changeRegion(selectRegion);
}
function pageselectCallback(page_index, opts){
var pageNum = page_index + 1;
$.ajax({
type: 'GET',
url: '../rentPriceUpdate/loadAllAvgPrice',
data: {"cityName":selectCity,region:selectRegion,block:selectBlock,"pager.currentPage":pageNum,"pager.pageSize":10,"pager.totalRows":opts.items_total},
dataType: 'json',
timeout: 100000,
async:false,
success: function(model) {
var newcontent = ''
opts.items_total = model.pager.totalRows;
$(model.data).each(function(i,item){
newcontent += '<tr data-id=='+item.id+'><td>'+item.weekend+'</td>'
+ '<td>'+item.avgPrice+'</td>'
+ '<td>'+item.calcValue+'</td>'
+ '<td>' + item.weekendMarkup + '</td>'
+ '<td>' + item.credit + '</td>'
+ '<td>'+item.coverage+'</td></tr>'
});
$('#Searchresult').html(newcontent);
$('#Searchresult tr').click(function(){
var tds = $(this).children()
$("#dateLabel").text(tds[0].innerText);
$("#coverageLabel").text(tds[5].innerText);
$("#creditLabel").text(tds[4].innerText);
$("#calcValueLabel").text(tds[2].innerText);
$("#avgPrice").val(tds[1].innerText);
$("#_id").val($(this).attr("data-id"));
});
}
});
return false;
}
function updateAvgPriveOpener(){
if($("#_id").val()==undefined||$("#_id").val()===""){
alert("请选择要更新的时间点");
return;
}
$('#myModal').modal('show')
}
function confirmAddAvgPrice(){
$('#myModal2').modal('show')
}
function updateAvgPrice(){
$.ajax({
type: 'GET',
url: '../rentPriceUpdate/updateAvgPrice',
data: {"id":$("#_id").val(),avgPrice:$("#avgPrice").val()},
dataType: 'json',
timeout: 100000,
success: function(model) {
$('#myModal').modal('hide')
showSuccessMsg("更新成功");
initChart();
}
});
}
function addAvgPrice(){
$.ajax({
type: 'GET',
url: '../rentPriceUpdate/addAvgPrice',
data: {"cityDisplay":$("#_city").val(), "region" : $("#_region").val(), "block" : $("#_block").val(), "weekend" : $("#shortDate").val(), avgPrice:$("#avgPrice2").val()},
dataType: 'json',
timeout: 100000,
success: function(model) {
alert(model.msg);
location.reload();
}
});
}
function initChart(){
var data
$.ajax({
type: 'GET',
url: '../rentPriceUpdate/loadAllAvgPriceForChart',
data: {"cityName":selectCity,region:selectRegion,block:selectBlock},
dataType: 'json',
timeout: 100000,
async:false,
success: function(model) {
data = model.data;
}
});
var series = new Array();
series[0] = {
name:"租金",
data:new Array(),
//color:"#660099",
events:{
click:function(event){
var item = event.point.data;
$("#dateLabel").text(item.weekend);
$("#coverageLabel").text(item.coverage);
$("#creditLabel").text(item.credit);
$("#calcValueLabel").text(item.calcValue);
$("#avgPrice").val(item.avgPrice);
$("#_id").val(item.id);
}
}
}
series[1] = {
name:"计算租金",
data:new Array(),
color:"#55AC8C",
visible: false,
events:{
click:function(event){
var item = event.point.data;
$("#dateLabel").text(item.weekend);
$("#coverageLabel").text(item.coverage);
$("#creditLabel").text(item.credit);
$("#calcValueLabel").text(item.calcValue);
$("#avgPrice").val(item.avgPrice);
$("#_id").val(item.id);
}
}
}
$(data).each(function(i,item){
var y = item.weekend.split("-")[0]
var m = item.weekend.split("-")[1] -1
var d = item.weekend.split("-")[2]
series[0].data.push({
x:Date.UTC(y, m, d),
y:item.avgPrice,
data:item
})
if(item.calcValue!=0){
series[1].data.push({
x:Date.UTC(y, m, d),
y:item.calcValue,
data:item
})
}
});
$('#container').highcharts({
chart: {
zoomType:"xy",
height: 700,
},
title: {
text: '${cityDisplay!}<#if region??>-${region!}</#if><#if block??>-${block!}</#if> 租金走势图'
},
xAxis: {
type: 'datetime',
dateTimeLabelFormats: { // don't display the dummy year
month: '%y-%m-%e',
year: '%b'
}
},
yAxis: {
title: {
text: '租金(元/平米)'
},
min: 0
},
tooltip: {
crosshairs: true,
formatter: function() {
return '<b>'+ this.series.name +'</b><br/>'+
Highcharts.dateFormat('%y-%m-%e', this.x) +': '+ this.y +' 元/平米';
}
},
series:series
});
}
function showSuccessMsg(msg){
jNotify(
msg,
{
autoHide : true,
clickOverlay : false,
MinWidth : 250,
TimeShown : 2000,
ShowTimeEffect : 1000,
HideTimeEffect : 1000,
LongTrip :20,
HorizontalPosition : 'right',
VerticalPosition : 'top',
ShowOverlay : true,
ColorOverlay : '#000',
OpacityOverlay : 0.3,
onClosed : function(){
},
onCompleted : function(){
}
});
}
$(function(){
$("#Pagination").pagination({
callback:pageselectCallback,
prev_text:"上一页",
next_text:"下一页",
items_per_page:10,
num_display_entries:5,
num_edge_entries:5,
items_total:-1
});
initChart();
$('#myTab a').click(function (e) {
e.preventDefault();
$(this).tab('show');
});
});
</script>
</#compress>
@@ -0,0 +1,946 @@
<#ftl attributes={"content_type":"text/html; charset=UTF-8"}>
<#compress>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title><#if district??>${district.name!}</#if> 租金详细信息</title>
<link rel="stylesheet" type="text/css" href="../bootstrap/css/bootstrap.min.css?v=${version}" />
<link rel="stylesheet" type="text/css" href="../style/main_simple.css?v=${version}" />
<link rel="stylesheet" type="text/css" href="../style/pagination.css?v=${version}" />
<link rel="stylesheet" type="text/css" href="../style/jnotify/jNotify.jquery.css?v=${version}" />
<#include "/common_js.ftl" />
<script type="text/javascript" src="../js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="../js/jquery-1.9.1.js"></script>
<script type="text/javascript" src="../js/jquery.pagination.js?v=${version}"></script>
<script type="text/javascript" src="../js/highcharts/highcharts-3.0.7.js"></script>
<script type="text/javascript" src="../js/highcharts/exporting-3.0.7.js"></script>
<script type="text/javascript" src="../bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="../js/jNotify.jquery.min.js?v=${version}"></script>
<style>
.con {
border-radius:0px;
}
label{display:inline-block}
.input-small{
margin:0px;
}
.prettyprint {
padding: 8px;
background-color: #f7f7f9;
border: 1px solid #e1e1e8;
}
i:hover{
cursor:pointer;
}
.ac td{
text-align:center;
vertical-align: middle;
}
.ac th{
text-align:center;
vertical-align: middle;
}
</style>
</head>
<body>
<#include "/layout/header.ftl" />
<div class="main-content" style="padding:10px 10px;">
<p class="prettyprint" style="text-align: center;">
<strong style="font-size:18px;">
<a href="../rentPriceUpdate/districtList?cityDisplay=${district.city!}">${district.city!}</a>-
<a href="../rentPriceUpdate/districtList?cityDisplay=${district.city!}&region=${district.region!}">${district.region!}</a>-
${district.name!}(${district.estateType2!})
</strong>租金详细信息
<span style="float:right;font-size: 12px;"><a onclick="javascript:$('#myReCompModal').modal('show')" href="javascript:;">重算租金</a></span>
</p>
<br>
<p class="prettyprint" style="text-align: left;">
<#if sqmetreRent??>
最新(<b>${t_util.formatDate(sqmetreRent.weekend!)}</b>)
租金:<b style="color:red;">${sqmetreRent.avgPrice!}</b>元/平米&nbsp;
<#-- 2B租金:<b style="color:red;">${districtStat.avg_price_2b!}</b>元/平米&nbsp;-->
计算方式:
<#if (sqmetreRent.valueType)??>
<#if sqmetreRent.valueType=='own'>
自身样本
</#if>
<#if sqmetreRent.valueType=='around'>
周边
</#if>
</#if>
可信度:${(sqmetreRent.credit!)?string("#.#######")}
<#if sqmetreRent.markup??>
&nbsp;环比上月:<#if sqmetreRent.markup gt 0><b style="color:red">↑</b><#elseif sqmetreRent.markup lt 0><b style="color:green">↓</b></#if><b>${(sqmetreRent.markup!/100.0)?string("#.##")}%</b>
</#if>
<#else>
本月租金暂无
</#if>
</p>
<br>
<p class="prettyprint"><strong>${district.name!}-价格走势图</strong></p>
<div id="myModal" class="modal hide fade">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h3>提示</h3>
</div>
<div class="modal-body">
<p>确定要更新租金?</p>
</div>
<div class="modal-footer">
<a href="#" class="btn" data-dismiss="modal">关闭</a>
<a href="#" class="btn btn-warning" onclick="updateAvgPrice()">更新</a>
</div>
</div>
<div id="container"></div>
<#-- <div style="width:19%;float:left;">-->
<#-- <p class="prettyprint"><strong><a name="guiding"></a>${district.name!}-指导价</strong></p>-->
<#-- <div style="border: 1px solid #e1e1e8;margin-bottom: 3px;margin-top: 2px;padding-left:1px;padding-top: 3px;">-->
<#-- <table class="table table-bordered" style="width:<#if 120 * (guidingPrices?size+1) lt 300>300<#else>>${120 * (guidingPrices?size+1)}</#if>px">-->
<#-- <tr>-->
<#-- <td colspan="${(guidingPrices?size+1)}">-->
<#-- <form class="form-inline" style="padding:4px;">-->
<#-- <input placeholder="指导日期" id="guidingDate" name="guidingDate" readonly="true" type="text" class="input-small" onfocus="WdatePicker({dateFmt:'yyyyMMdd',maxDate:'%y-%M-%d'})">-->
<#-- <input placeholder="指导价格" id="guidingPrice" name="value" type="number" class="input-small">-->
<#-- <button type="button" id="saveGuidPrice" class="btn btn-primary" >添加</button>-->
<#-- </form>-->
<#-- </td>-->
<#-- </tr>-->
<#-- <tr>-->
<#-- <td style="width:120px;">日期 </td>-->
<#-- <#list guidingPrices as it>-->
<#-- <td style="width:120px;">${it.guidingDate?string("yyyy-MM-dd")} <i class="icon-trash" data-id="${it.id}" title="删除"></i>-->
<#-- </td>-->
<#-- </#list>-->
<#-- </tr>-->
<#-- <tr>-->
<#-- <td style="width:120px;">价格</td>-->
<#-- <#list guidingPrices as it><td style="width:100px;">${it.guidingValue!}</td></#list>-->
<#-- </tr>-->
<#-- <tr>-->
<#-- <td style="width:120px;">添加人</td>-->
<#-- <#list guidingPrices as it><td style="width:100px;">${it.guidingPerson!}</td></#list>-->
<#-- </tr>-->
<#-- </table>-->
<#-- </div>-->
<#-- </div>-->
<#-- <div style="width: 80%;float:left;padding-left: 10px;">-->
<#-- <p class="prettyprint"><strong><a name="guiding"></a>${district.name!}-参考价</strong></p>-->
<#-- <table class="table table-bordered table-condensed ac">-->
<#-- <thead>-->
<#-- <tr>-->
<#-- <th style="width:10%;">价格</th>-->
<#-- -->
<#-- <th style="width:10%;">调查时间</th>-->
<#-- <th style="width:10%;">调查人</th>-->
<#-- </tr>-->
<#-- </thead>-->
<#-- <tbody>-->
<#-- <#if (avgBases??&&avgBases?size>0)>-->
<#-- <#list avgBases as it>-->
<#-- <tr>-->
<#-- <td align="center">-->
<#-- ${it.price}-->
<#-- </td>-->
<#-- -->
<#-- <td align="center">-->
<#-- ${it.creationDate?string("yyyy-MM-dd")}-->
<#-- </td>-->
<#-- <td align="center">-->
<#-- <#if it.userName??>-->
<#-- ${it.userName}-->
<#-- </#if>-->
<#-- </td> -->
<#-- </tr>-->
<#-- </#list>-->
<#-- </#if>-->
<#-- </tbody>-->
<#-- <#if avgBases?size == 0>-->
<#-- <tr><td colspan="3" style="text-align:center;">暂无数据</td></tr>-->
<#-- </#if>-->
<#-- -->
<#-- </table>-->
<#-- </div>-->
<#-- <div style="clear:both;"></div>-->
<#-- -->
<#-- <p class="prettyprint"><strong>${district.name!}-第三方价格对比</strong></p>-->
<#-- <table class="table table-condensed ac" id="dsfjj">-->
<#-- <#list averageStatistics as it>-->
<#-- <tr>-->
<#-- <td style="vertical-align: middle;width:100px;" rowspan="2"><b>日期</b></td>-->
<#-- <td style="vertical-align: middle;" rowspan="2"><b>房价网</b></td>-->
<#-- <#if (it.xiaozijiaNewPrice)?? || (it.xiaozijiaEsfPrice)??> -->
<#-- <td colspan="2"><b>小资家</b></td>-->
<#-- </#if>-->
<#-- <#if (it.lianjiaNewPrice)?? || (it.lianjiaEsfPrice)??>-->
<#-- <td colspan="2"><b>链家</b></td>-->
<#-- </#if>-->
<#-- -->
<#-- <#if (it.anjukeNewPrice)?? || (it.anjukeEsfPrice)??>-->
<#-- <td colspan="2"><b>安居客</b></td>-->
<#-- </#if>-->
<#-- -->
<#-- <#if (it.zhugezhaofangNewPrice)?? || (it.zhugezhaofangEsfPrice)??>-->
<#-- <td colspan="2"><b>诸葛</b></td>-->
<#-- </#if>-->
<#-- <#if (it.beikeNewPrice)?? || (it.beikeEsfPrice)??>-->
<#-- <td colspan="2"><b>贝壳</b></td>-->
<#-- </#if>-->
<#-- <#if (it.fangguguNewPrice)?? || (it.fangguguEsfPrice)??>-->
<#-- <td colspan="2"><b>房估估</b></td>-->
<#-- </#if>-->
<#-- <#if (it.fangdoudouNewPrice)?? || (it.fangdoudouEsfPrice)??>-->
<#-- <td colspan="2"><b>房兜兜</b></td> -->
<#-- </#if>-->
<#-- -->
<#-- <#if (it.soufangNewPrice)?? || (it.soufangEsfPrice)??>-->
<#-- <td colspan="2"><b>搜房</b></td>-->
<#-- </#if>-->
<#-- <#if (it.cityhouseNewPrice)?? || (it.cityhouseEsfPrice)??>-->
<#-- <td colspan="2"><b>cityhouse</b></td>-->
<#-- </#if>-->
<#-- -->
<#-- <#if (it.fangtanNewPrice)?? || (it.fangtanEsfPrice)??>-->
<#-- <td colspan="2"><b>房探</b></td>-->
<#-- </#if>-->
<#-- <#if (it.tuboshiNewPrice)?? || (it.tuboshiEsfPrice)??>-->
<#-- <td colspan="2"><b>兔博士</b></td>-->
<#-- </#if>-->
<#-- -->
<#-- <#if (it.centanetNewPrice)?? || (it.centanetEsfPrice)??>-->
<#-- <td colspan="2"><b>中原地产</b></td>-->
<#-- </#if>-->
<#-- <#if (it.leyoujiaNewPrice)?? || (it.leyoujiaEsfPrice)??>-->
<#-- <td colspan="2"><b>乐有家</b></td>-->
<#-- </#if>-->
<#-- <#if (it.qfangNewPrice)?? || (it.qfangEsfPrice)??>-->
<#-- <td colspan="2"><b>Q房</b></td>-->
<#-- </#if>-->
<#-- <#if (it.sinaNewPrice)?? || (it.sinaEsfPrice)??>-->
<#-- <td colspan="2"><b>新浪</b></td>-->
<#-- </#if>-->
<#-- <#if (it.cricNewPrice)?? || (it.cricEsfPrice)??>-->
<#-- <td colspan="2"><b>克尔瑞</b></td>-->
<#-- </#if>-->
<#-- <#if (it.ganjiNewPrice)?? || (it.ganjiEsfPrice)??>-->
<#-- <td colspan="2"><b>赶集网</b></td>-->
<#-- </#if>-->
<#-- <#if (it.yungujiaNewPrice)?? || (it.yungujiaEsfPrice)??>-->
<#-- <td colspan="2"><b>云估价</b></td>-->
<#-- </#if> -->
<#-- </tr>-->
<#-- -->
<#-- <tr>-->
<#-- <#if (it.xiaozijiaNewPrice)?? || (it.xiaozijiaEsfPrice)??>-->
<#-- <td style="width:80px;color:#0C88C7">新房</td>-->
<#-- <td style="width:80px;color:#D3750A">二手房</td>-->
<#-- </#if>-->
<#-- -->
<#-- <#if (it.lianjiaNewPrice)?? || (it.lianjiaEsfPrice)??>-->
<#-- <td style="width:80px;color:#0C88C7">新房</td>-->
<#-- <td style="width:80px;color:#D3750A">二手房</td>-->
<#-- </#if>-->
<#-- -->
<#-- <#if (it.anjukeNewPrice)?? || (it.anjukeEsfPrice)??>-->
<#-- <td style="width:80px;color:#0C88C7">新房</td>-->
<#-- <td style="width:80px;color:#D3750A">二手房</td>-->
<#-- </#if>-->
<#-- <#if (it.zhugezhaofangNewPrice)?? || (it.zhugezhaofangEsfPrice)??>-->
<#-- <td style="width:80px;color:#0C88C7">新房</td>-->
<#-- <td style="width:80px;color:#D3750A">二手房</td>-->
<#-- </#if>-->
<#-- <#if (it.beikeNewPrice)?? || (it.beikeEsfPrice)??>-->
<#-- <td style="width:80px;color:#0C88C7">新房</td>-->
<#-- <td style="width:80px;color:#D3750A">二手房</td>-->
<#-- </#if>-->
<#-- <#if (it.fangguguNewPrice)?? || (it.fangguguEsfPrice)??>-->
<#-- <td style="width:80px;color:#0C88C7">新房</td>-->
<#-- <td style="width:80px;color:#D3750A">二手房</td>-->
<#-- </#if>-->
<#-- -->
<#-- <#if (it.fangdoudouNewPrice)?? || (it.fangdoudouEsfPrice)??>-->
<#-- <td style="width:80px;color:#0C88C7">新房</td>-->
<#-- <td style="width:80px;color:#D3750A">二手房</td>-->
<#-- </#if>-->
<#-- <#if (it.soufangNewPrice)?? || (it.soufangEsfPrice)??>-->
<#-- <td style="width:80px;color:#0C88C7">新房</td>-->
<#-- <td style="width:80px;color:#D3750A">二手房</td>-->
<#-- </#if>-->
<#-- <#if (it.cityhouseNewPrice)?? || (it.cityhouseEsfPrice)??>-->
<#-- <td style="width:70px;color:#0C88C7">新房</td>-->
<#-- <td style="width:70px;color:#D3750A">二手房</td>-->
<#-- </#if>-->
<#-- <#if (it.fangtanNewPrice)?? || (it.fangtanEsfPrice)??>-->
<#-- <td style="width:70px;color:#0C88C7">新房</td>-->
<#-- <td style="width:70px;color:#D3750A">二手房</td>-->
<#-- </#if>-->
<#-- -->
<#-- <#if (it.tuboshiNewPrice)?? || (it.tuboshiEsfPrice)??>-->
<#-- <td style="width:70px;color:#0C88C7">新房</td>-->
<#-- <td style="width:70px;color:#D3750A">二手房</td>-->
<#-- </#if>-->
<#-- -->
<#-- <#if (it.centanetNewPrice)?? || (it.centanetEsfPrice)??> -->
<#-- <td style="width:70px;color:#0C88C7">新房</td>-->
<#-- <td style="width:70px;color:#D3750A">二手房</td>-->
<#-- </#if>-->
<#-- -->
<#-- <#if (it.leyoujiaNewPrice)?? || (it.leyoujiaEsfPrice)??>-->
<#-- <td style="width:70px;color:#0C88C7">新房</td>-->
<#-- <td style="width:70px;color:#D3750A">二手房</td> -->
<#-- </#if>-->
<#-- <#if (it.qfangNewPrice)?? || (it.qfangEsfPrice)??>-->
<#-- <td style="width:70px;color:#0C88C7">新房</td>-->
<#-- <td style="width:70px;color:#D3750A">二手房</td> -->
<#-- </#if>-->
<#-- <#if (it.sinaNewPrice)?? || (it.sinaEsfPrice)??>-->
<#-- <td style="width:70px;color:#0C88C7">新房</td>-->
<#-- <td style="width:70px;color:#D3750A">二手房</td> -->
<#-- </#if>-->
<#-- -->
<#-- <#if (it.cricNewPrice)?? || (it.cricEsfPrice)??>-->
<#-- <td style="width:70px;color:#0C88C7">新房</td>-->
<#-- <td style="width:70px;color:#D3750A">二手房</td> -->
<#-- </#if>-->
<#-- -->
<#-- <#if (it.ganjiNewPrice)?? || (it.ganjiEsfPrice)??>-->
<#-- <td style="width:70px;color:#0C88C7">新房</td>-->
<#-- <td style="width:70px;color:#D3750A">二手房</td> -->
<#-- </#if>-->
<#-- <#if (it.yungujiaNewPrice)?? || (it.yungujiaEsfPrice)??>-->
<#-- <td style="width:70px;color:#0C88C7">新房</td>-->
<#-- <td style="width:70px;color:#D3750A">二手房</td> -->
<#-- -->
<#-- </#if>-->
<#-- -->
<#-- </tr>-->
<#-- -->
<#-- <tr>-->
<#-- <td>${(t_util.parseDate(it.shortDate?string, 'yyyyMM'))?string("yyyy年MM月")}</td>-->
<#-- <td>${it.fangjiaPrice!}</td>-->
<#-- <#if (it.xiaozijiaNewPrice)?? || (it.xiaozijiaEsfPrice)??>-->
<#-- <td style="color:#0C88C7;">${it.xiaozijiaNewPrice!}</td>-->
<#-- <td style ="color:#D3750A">${it.xiaozijiaEsfPrice!}</td>-->
<#-- </#if>-->
<#-- -->
<#-- <#if (it.lianjiaNewPrice)?? || (it.lianjiaEsfPrice)??>-->
<#-- <td style="color:#0C88C7;">${it.lianjiaNewPrice!}</td>-->
<#-- <td style ="color:#D3750A">${it.lianjiaEsfPrice!}</td>-->
<#-- </#if>-->
<#-- -->
<#-- <#if (it.anjukeNewPrice)?? || (it.anjukeEsfPrice)??>-->
<#-- <td style ="color:#0C88C7">${it.anjukeNewPrice!}</td>-->
<#-- <td style ="color:#D3750A">${it.anjukeEsfPrice!}</td>-->
<#-- </#if>-->
<#-- <#if (it.zhugezhaofangNewPrice)?? || (it.zhugezhaofangEsfPrice)??>-->
<#-- <td style ="color:#0C88C7">${it.zhugezhaofangNewPrice!}</td>-->
<#-- <td style ="color:#D3750A">${it.zhugezhaofangEsfPrice!}</td>-->
<#-- </#if>-->
<#-- -->
<#-- <#if (it.beikeNewPrice)?? || (it.beikeEsfPrice)??>-->
<#-- <td style ="color:#0C88C7">${it.beikeNewPrice!}</td>-->
<#-- <td style ="color:#D3750A">${it.beikeEsfPrice!}</td>-->
<#-- </#if>-->
<#-- -->
<#-- <#if (it.fangguguNewPrice)?? || (it.fangguguEsfPrice)??>-->
<#-- <td style ="color:#0C88C7">${it.fangguguNewPrice!}</td>-->
<#-- <td style ="color:#D3750A">${it.fangguguEsfPrice!}</td>-->
<#-- </#if>-->
<#-- <#if (it.fangdoudouNewPrice)?? || (it.fangdoudouEsfPrice)??>-->
<#-- <td style ="color:#0C88C7">${it.fangdoudouNewPrice!}</td>-->
<#-- <td style ="color:#D3750A">${it.fangdoudouEsfPrice!}</td>-->
<#-- </#if>-->
<#-- -->
<#-- <#if (it.soufangNewPrice)?? || (it.soufangEsfPrice)??>-->
<#-- <td style ="color:#0C88C7">${it.soufangNewPrice!}</td>-->
<#-- <td style ="color:#D3750A">${it.soufangEsfPrice!}</td> -->
<#-- </#if>-->
<#-- -->
<#-- -->
<#-- <#if (it.cityhouseNewPrice)?? || (it.cityhouseEsfPrice)??>-->
<#-- <td style ="color:#0C88C7">${it.cityhouseNewPrice!}</td>-->
<#-- <td style ="color:#D3750A">${it.cityhouseEsfPrice!}</td>-->
<#-- </#if>-->
<#-- -->
<#-- <#if (it.fangtanNewPrice)?? || (it.fangtanEsfPrice)??>-->
<#-- <td style ="color:#0C88C7">${it.fangtanNewPrice!}</td>-->
<#-- <td style ="color:#D3750A">${it.fangtanEsfPrice!}</td>-->
<#-- </#if>-->
<#-- -->
<#-- <#if (it.tuboshiNewPrice)?? || (it.tuboshiEsfPrice)??>-->
<#-- <td style ="color:#0C88C7">${it.tuboshiNewPrice!}</td>-->
<#-- <td style ="color:#D3750A">${it.tuboshiEsfPrice!}</td>-->
<#-- </#if>-->
<#-- -->
<#-- <#if (it.centanetNewPrice)?? || (it.centanetEsfPrice)??>-->
<#-- <td style ="color:#0C88C7">${it.centanetNewPrice!}</td>-->
<#-- <td style ="color:#D3750A">${it.centanetEsfPrice!}</td>-->
<#-- </#if>-->
<#-- -->
<#-- <#if (it.leyoujiaNewPrice)?? || (it.leyoujiaEsfPrice)??>-->
<#-- <td style ="color:#0C88C7">${it.leyoujiaNewPrice!}</td>-->
<#-- <td style ="color:#D3750A">${it.leyoujiaEsfPrice!}</td> -->
<#-- </#if>-->
<#-- <#if (it.qfangNewPrice)?? || (it.qfangEsfPrice)??>-->
<#-- <td style ="color:#0C88C7">${it.qfangNewPrice!}</td>-->
<#-- <td style ="color:#D3750A">${it.qfangEsfPrice!}</td> -->
<#-- </#if>-->
<#-- -->
<#-- <#if (it.sinaNewPrice)?? || (it.sinaEsfPrice)??>-->
<#-- <td style ="color:#0C88C7">${it.sinaNewPrice!}</td>-->
<#-- <td style ="color:#D3750A">${it.sinaEsfPrice!}</td> -->
<#-- </#if>-->
<#-- <#if (it.cricNewPrice)?? || (it.cricEsfPrice)??>-->
<#-- <td style ="color:#0C88C7">${it.cricNewPrice!}</td>-->
<#-- <td style ="color:#D3750A">${it.cricEsfPrice!}</td> -->
<#-- </#if> -->
<#-- <#if (it.ganjiNewPrice)?? || (it.ganjiEsfPrice)??>-->
<#-- <td style ="color:#0C88C7">${it.ganjiNewPrice!}</td>-->
<#-- <td style ="color:#D3750A">${it.ganjiEsfPrice!}</td> -->
<#-- </#if>-->
<#-- <#if (it.yungujiaNewPrice)?? || (it.yungujiaEsfPrice)??>-->
<#-- <td style ="color:#0C88C7">${it.yungujiaNewPrice!}</td>-->
<#-- <td style ="color:#D3750A">${it.yungujiaEsfPrice!}</td>-->
<#-- </#if>-->
<#-- -->
<#-- </tr>-->
<#-- </#list>-->
<#-- <#if averageStatistics?size == 0>-->
<#-- <tr><td colspan="7" style="text-align:center;">暂无数据</td></tr>-->
<#-- </#if>-->
<#-- </table>-->
<#-- -->
<#-- <div id="comparisonChartContainer">-->
<#-- <#if !(calcDistrictStat??)><div style="width: 100%;height: 150px;border: 1px solid #d2c298;text-align: center;">本月没有利用第三方的详细数据!</div></#if>-->
<#-- </div>-->
<#-- <#if calcDistrictStat?? && calcDistrictStat.thirdpartDetails??>-->
<#-- <#macro greet pt> -->
<#-- <#assign ret=0>-->
<#-- <#list calcDistrictStat.thirdpartDetails as detail>-->
<#-- <#if detail['name'] == pt && detail['val']??>-->
<#-- <#assign ret>${detail['val']!}</#assign>-->
<#-- </#if>-->
<#-- </#list>-->
<#-- ${ret}-->
<#-- </#macro> -->
<#-- </#if>-->
<p class="prettyprint">
<strong>${district.name!}-样本散列图</strong>
<a style="font-size:8px;float:right;" target="_blank" href="../seawater/houseList?cityDisplay=${district.city!}&region=${district.region!}&districtName=${district.name!}&cat=rent">房源样本列表</a>
<#-- <a style="font-size:8px;float:right;padding-right: 10px;" target="_blank" href="../data/dealPrice?cityDisplay=${district.city}&region=${district.region}&districtName=${district.name}" >交易数据列表(${dealPriceCount!})</a>-->
</p>
<#-- <table class="table table-bordered">
<tr><th>七天</th><th>一个月</th><th>三个月</th><th>半年</th><th>一年</th><th>全部</th><tr>
<tr><td>${distribution['QiTian']}</td><td>${distribution['YiYue']}</td><td>${distribution['SanYue']}</td><td>${distribution['BanNian']}</td><td>${distribution['YiNian']}</td><td>${distribution['All']}</td><tr>
</table> -->
<p class="prettyprint"><strong>${district.name!}-房源散列图</strong></p>
<div id="houseChart"></div>
<#-- <p class="prettyprint"><strong>${district.name!}-样本过滤规则</strong></p>-->
<#-- <form class="form-inline" style="padding:10px;">-->
<#-- <#if calcConfig??>-->
<#-- <input id="configId" value="${calcConfig.id!}" type="hidden"/>-->
<#-- <#else>-->
<#-- <input id="configId" value="" type="hidden"/>-->
<#-- </#if>-->
<#-- <label for="minPrice">最低房价:</label>-->
<#-- <#if calcConfig??>-->
<#-- <input id="minPrice" type="number" class="input-small" value='${calcConfig.logicalMinValue!}'>-->
<#-- <#else>-->
<#-- <input id="configId" value="" type="hidden"/>-->
<#-- </#if>-->
<#-- <label for="maxPrice">最高房价:</label>-->
<#-- <#if calcConfig??>-->
<#-- <input id="maxPrice" type="number" class="input-small" value='${calcConfig.logicalMaxValue!}'>-->
<#-- <#else>-->
<#-- <input id="configId" value="" type="hidden"/>-->
<#-- </#if>-->
<#-- <button type="button" id="sampleFilterBtn" class="btn">设置</button>(<span class="code" style="color: #D14;">请设置较大区间</span>)-->
<#-- </form>-->
<#-- <hr><br>-->
<#-- <div style="text-align:center;">-->
<#-- <button type="button" onclick="javascript:$('#myReCompModal').modal('show')" class="btn btn-danger" >重算租金</button>-->
<#-- </div>-->
<#-- <hr><br><br>-->
</div>
<div id="myReCompModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="myModalLabel">是否确定?</h3>
</div>
<div class="modal-body error">
<p>1.耗时较长,请谨慎操作!</p>
<p>2.计算<b>${district.name!}</b>的历史价格!</p>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true" aria-hidden="true">关闭</button>
<button class="btn btn-primary" name="reComputeBtn" type="all">重算历史</button>
<button class="btn btn-primary" name="reComputeBtn" type="month">最近一期</button>
<#-- <button class="btn btn-primary" name="reComputeBtn" type="month">最近一月</button>-->
<#-- <button class="btn btn-primary" name="reComputeBtn" type="quarter">最近季度</button>-->
<button class="btn btn-primary" name="reComputeBtn" type="year">最近一年</button>
</div>
</div>
</body>
</html>
<script type="text/javascript">
var selectCity = '${district.city!}';
var selectRegion = '${district.region!}'
var selectBlock = '${district.block!}'
var name = '${district.name!}'
function updateAvgPriveOpener(){
if($("#_id").val()==undefined||$("#_id").val()===""){
alert("请选择要更新的时间点");
return;
}
$('#myModal').modal('show')
}
function updateAvgPrice(){
$.ajax({
type: 'GET',
url: '../rentPriceUpdate/updateAvgPrice',
data: {"id":$("#_id").val(),avgPrice:$("#avgPrice").val()},
dataType: 'json',
timeout: 100000,
success: function(model) {
$('#myModal').modal('hide')
showSuccessMsg("更新成功");
initChart();
}
});
}
function initChart(){
var data
$.ajax({
type: 'GET',
url: '../rentPriceUpdate/loadAllDistrictRentPrice',
data: {"cityName":selectCity,region:selectRegion,name:name,estateType:'${district.estateType2!}'},
dataType: 'json',
timeout: 100000,
async:false,
success: function(model) {
data = model.data;
}
});
var series = new Array();
series[0] = {
name:"租金",
data:new Array(),
color:"#0066FF",
events:{
click:function(event){
var item = event.point.data;
$("#dateLabel").text(item.weekend.substring(0,10));
$("#sampleSizeLabel").text(item.sampleSize);
$("#creditLabel").text(item.credit);
$("#calcValueLabel").text(item.calcAvgPrice);
$("#avgPrice").val(item.avgPrice);
$("#_id").val(item.id);
}
}
}
series[1] = {
name:"计算租金",
data:new Array(),
color:"#55AC8C",
visible: false,
events:{
click:function(event){
var item = event.point.data;
$("#dateLabel").text(item.weekend.substring(0,10));
$("#sampleSizeLabel").text(item.sampleSize);
$("#creditLabel").text(item.credit);
$("#calcValueLabel").text(item.calcAvgPrice);
$("#avgPrice").val(item.avgPrice);
$("#_id").val(item.id);
}
}
}
// series[2] = {
// name:"2B价格",
// data:new Array(),
// color:"#5bce60",
// visible: false,
// events:{
// click:function(event){
// var item = event.point.data;
// $("#dateLabel").text(item.weekend.substring(0,10));
// $("#sampleSizeLabel").text(item.sampleSize);
// $("#creditLabel").text(item.credit);
// $("#calcValueLabel").text(item.calcAvgPrice);
// $("#avgPrice").val(item.avgPrice);
// $("#_id").val(item.id);
// }
// }
// }
// series[3] = {
// name:"2B计算价格",
// data:new Array(),
// color:"#a9864f",
// visible: false,
// events:{
// click:function(event){
// var item = event.point.data;
// $("#dateLabel").text(item.weekend.substring(0,10));
// $("#sampleSizeLabel").text(item.sampleSize);
// $("#creditLabel").text(item.credit);
// $("#calcValueLabel").text(item.calcAvgPrice);
// $("#avgPrice").val(item.avgPrice);
// $("#_id").val(item.id);
// }
// }
// }
// series[4] = {
// name:"预期价格",
// data:new Array(),
// color:"red",
// visible: true,
// events:{
// click:function(event){
// var item = event.point.data;
// $("#dateLabel").text(item.weekend.substring(0,10));
// $("#sampleSizeLabel").text(item.sampleSize);
// $("#creditLabel").text(item.credit);
// $("#calcValueLabel").text(item.calcAvgPrice);
// $("#avgPrice").val(item.avgPrice);
// $("#_id").val(item.id);
// }
// }
// }
$(data).each(function(i,item){
series[0].data.push({
x:new Date(item.weekend),
y:item.avgPrice,
data:item
})
if(item.calcAvgPrice!=0){
series[1].data.push({
x:new Date(item.weekend),
y:item.calcAvgPrice,
data:item
})
}
// if (typeof(item.avg_price_2b) != "undefined"){
// series[2].data.push({
// x:new Date(item.weekend),
// y:item.avg_price_2b,
// data:item
// })
// }
//
// if (typeof(item.calc_avg_price_2b) != "undefined"){
// series[3].data.push({
// x:new Date(item.weekend),
// y:item.calc_avg_price_2b,
// data:item
// })
// }
// if (typeof(item.futureValue) != "undefined"){
// series[4].data.push({
// x:new Date(item.weekend),
// y:item.futureValue,
// data:item
// })
// }
});
$('#container').highcharts({
chart: {
type: 'spline',
zoomType:"xy",
height:700
},
title: {
text:'租金走势图('+name+')'
},
xAxis: {
type: 'datetime',
dateTimeLabelFormats: { // don't display the dummy year
month: '%y-%m-%e',
year: '%b'
}
},
yAxis: {
title: {
text: '租金(元/平米)'
},
min: 0
},
tooltip: {
crosshairs: true,
formatter: function() {
var item = this.point.data;
var credit = item.credit;
var title = (Highcharts.dateFormat('%y-%m-%e', this.x)+'<br/>')
title +=('<b>'+ this.series.name +'</b>:'+this.y+'元/平米<br/>');
title +=('<b>可信度:</b>'+credit+'</br>')
if(credit>=0.8){
title +=('<b>样本量:</b>'+item.sampleSize+'</br>')
}else if(credit>=0.6){
}
return title;
}
},
series:series
});
}
function initHouseChart(){
var data
$.ajax({
type: 'GET',
url: '../rentPriceUpdate/loadHouseInfo',
data: {"cityName":selectCity,region:selectRegion,name:name},
dataType: 'json',
timeout: 100000,
async:false,
success: function(model) {
data = model.data;
}
});
var series = new Array();
series[0] = {
name:"房源散列图",
data:new Array()
//color:"#660099"
}
$(data).each(function(i,item){
var pdate = item.pDate + "";
var ds = pdate.substring(0, 4) + '-' + pdate.substring(4, 6) + '-' + pdate.substring(6)
series[0].data.push({
x:new Date(ds),
y:Math.round(item.totalPrice/item.area),
data:item
})
});
$('#houseChart').highcharts({
chart: {
type: 'scatter',
zoomType:"xy",
height:500
},
title: {
text:name + ' 样本散列图'
},
xAxis: {
type: 'datetime',
dateTimeLabelFormats: { // don't display the dummy year
month: '%y-%m-%e',
year: '%b'
}
},
yAxis: {
title: {
text: '租金(元/平米)'
},
min: 0
},
tooltip: {
crosshairs: true,
formatter: function() {
return '<b>'+ this.series.name +'</b><br/>'+
Highcharts.dateFormat('%y-%m-%e', this.x) +': '+ this.y +' 元/平米';
}
},
series:series
});
}
function showSuccessMsg(msg){
jNotify(
msg,
{
autoHide : true,
clickOverlay : false,
MinWidth : 250,
TimeShown : 2000,
ShowTimeEffect : 1000,
HideTimeEffect : 1000,
LongTrip :20,
HorizontalPosition : 'right',
VerticalPosition : 'top',
ShowOverlay : true,
ColorOverlay : '#000',
OpacityOverlay : 0.3,
onClosed : function(){
},
onCompleted : function(){
}
});
}
<#--第三方对比图 start-->
<#if calcDistrictStat?? && calcDistrictStat.thirdpartDetails??>
$('#comparisonChartContainer').highcharts({
chart: {
type: 'column'
},
title: {
text: '第三方价格详细利用情况'
},
subtitle: {
text: '(利用最近2个月的数据)'
},
xAxis: {
categories: [
'搜房','安居客','新浪','克尔瑞','赶集'
]
},
yAxis: {
min: 0,
title: {
text: 'Rainfall (mm)'
}
},
tooltip: {
headerFormat: '<b>{point.key}</b><table>',
pointFormat: '<tr><td style="color:{series.color};padding:0"><b>{series.name}</b>:</td>' +
'<td style="padding:0">{point.y}</td></tr>',
footerFormat: '</table>',
shared: true,
useHTML: true
},
plotOptions: {
column: {
pointPadding: 0.2,
borderWidth: 0
}
},
series: [
{
color:'#0C88C7',
name: '新房',
data: [<@greet pt='soufun_new' />, <@greet pt='anjuke_new' />,<@greet pt='sina_new' />,<@greet pt='cric_new' />,<@greet pt='ganji_new' />]
},
{
color:'#D3750A',
name: '二手房',
data: [<@greet pt='soufun_esf' />, <@greet pt='anjuke_esf' />,<@greet pt='sina_esf' />,<@greet pt='cric_esf' />,<@greet pt='ganji_esf' />]
},
]
});
</#if>
$(function(){
initChart();
initHouseChart();
$("#saveGuidPrice").click(function(){
if($("#guidingPrice").val()===""){
alert("指导价不能为空");
return;
}
if(!$.isNumeric($("#guidingPrice").val())){
alert("指导价必须是数字");
return;
}
if($("#guidingDate").val()===""){
alert("指导日期不能为空");
return;
}
if(${(guidingPrices?size+1)}>=2){
alert("指导价已添加!");
return;
}
$.ajax({
type: 'POST',
url: '../rentPriceUpdate/addGuidingPrice',
data: {"guidingPrice":$("#guidingPrice").val(),guidingDate:$("#guidingDate").val(),id:'${id}'},
dataType: 'json',
timeout: 100000,
success: function(model) {
showSuccessMsg('保存成功!!建议你重算租金');
window.location.hash= 'guiding';
window.location.reload();
}
});
});
$("#sampleFilterBtn").click(function(){
var minPrice = $.trim($("#minPrice").val())
var maxPrice = $.trim($("#maxPrice").val())
if(maxPrice===""||maxPrice===""){
alert("请填写价格区间");
return;
}
if($.trim($("#minPrice").val())!==""&&!$.isNumeric($.trim($("#minPrice").val()))){
alert("价格必须是数字");
return;
}
if($.trim($("#maxPrice").val())!==""&&!$.isNumeric($.trim($("#maxPrice").val()))){
alert("价格必须是数字");
return;
}
if(minPrice!=""&&maxPrice!=""){
if(new Number(maxPrice) - new Number(minPrice)<2000){
alert("最大价格和最小价格至少要相差2000元")
return;
}
}
$.ajax({
type: 'POST',
url: '../rentPriceUpdate/updateCalcConfig',
data: {"minPrice":minPrice,maxPrice:maxPrice,id:'${id}',configId:$("#configId").val()},
dataType: 'json',
timeout: 100000,
success: function(model) {
showSuccessMsg('保存成功');
}
});
});
$(".icon-trash").click(function(){
$.ajax({
type: 'POST',
url: '../rentPriceUpdate/deleteGuidingPrice',
data: {id:$(this).attr("data-id")},
dataType: 'json',
timeout: 100000,
success: function(model) {
showSuccessMsg("指导价删除成功!!建议你重算租金");
window.location.reload();
}
});
});
function getBeforeDay(day) {
var rdate = new Date();
var cmills = new Date().getTime()
if(day > 0) {
cmills = cmills - day * 24 * 3600 * 1000;
}
rdate.setTime(cmills)
var month = rdate.getMonth() < 10 ? "0" + rdate.getMonth() : rdate.getMonth();
var date = rdate.getDate() < 10 ? "0" + rdate.getDate() : rdate.getDate();
return rdate.getFullYear() + month + "" + date
}
$("button[name='reComputeBtn']").click(function(){
var type = $(this).attr('type');
var data ={};
var commands = Array();
commands.push({city:'${district.city!}',region:'${district.region!}',name:'${district.name!}',estateType:'${district.estateType2!}'})
data.commands = commands ;
data.calcRange = type;
$.ajax({
url:"../rentPriceUpdate/reCompute",
dataType:"json",
type:'POST',
data:{data:JSON.stringify(data)},
success:function(data){
showSuccessMsg(data.msg)
$('#myReCompModal').modal('hide')
}
});
});
});
</script>
</#compress>
@@ -0,0 +1,344 @@
<#ftl attributes={"content_type":"text/html; charset=UTF-8"}>
<#compress>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>${cityDisplay}<#if region?? && region!=''>-${region}<#if block?? && block!=''>-${block}</#if></#if> 小区均价操作列表</title>
<link rel="stylesheet" type="text/css" href="../bootstrap/css/bootstrap.min.css?v=${version}" />
<link rel="stylesheet" type="text/css" href="../style/main_simple.css?v=${version}" />
<link rel="stylesheet" type="text/css" href="../style/pagination.css?v=${version}" />
<link rel="stylesheet" type="text/css" href="../style/jnotify/jNotify.jquery.css?v=${version}" />
<#include "/common_js.ftl" />
<script type="text/javascript" src="../js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="../js/jquery-1.9.1.js"></script>
<script type="text/javascript" src="../js/jquery.pagination.js?v=${version}"></script>
<script type="text/javascript" src="../js/highcharts/highcharts-3.0.7.js"></script>
<script type="text/javascript" src="../js/highcharts/exporting-3.0.7.js"></script>
<script type="text/javascript" src="../bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="../js/jNotify.jquery.min.js?v=${version}"></script>
<style>
.con {
border-radius:0px;
}
label{display:inline-block}
.input-small{
margin:0px;
}
#city-border-mid{
margin-top:6px;
}
.pagination-page {
padding-top:8px;
padding-right:20px;
}
.pagination-page a{
border-color: #ccc #aaa #aaa #ccc;
border-image: none;
border-style: solid;
border-width: 1px;
color: #666;
margin: 0 3px;
padding: 2px 6px;
}
.current-page {
padding: 2px 3px;
color: #666;
background: #fff;
font-weight: bold;
}
</style>
</head>
<body>
<#include "/layout/header.ftl" />
<#setting number_format="0.###########"/>
<div class="main-content" style="padding:10px 10px;">
<table class="table table-bordered table-condensed">
<tr>
<th>查询条件</th>
</tr>
<tr>
<td>
<form action="districtList">
<@d_city defaultValue="${cityDisplay!}" callback="changeCity" callbackField="display" name="cityDisplay"/>
<label for="region">区域:</label>
<select id="region" name="region" class="form-control" onchange="changeRegion()" style="width: 120px;">
<option value="">不限</option>
</select>
<label for="region">板块:</label>
<select id="block" name="block" class="form-control" style="width: 120px;">
<option value="">不限</option>
</select>
<label for="name">可信度:</label>
<select id="minCredit" name="minCredit" class="form-control" style="width: 70px;">
<option value="">--</option>
<#list 0..100 as a>
<option <#if minCredit?? && a/100?number == minCredit>selected</#if> value="${a/100?number}">${a/100?number}</option>
</#list>
</select>
-
<select id="maxCredit" name="maxCredit" class="form-control" style="width: 70px;">
<option value="">--</option>
<#list 0..100 as a>
<option <#if maxCredit?? && a/100?number == maxCredit>selected</#if> value="${a/100?number}">${a/100?number}</option>
</#list>
</select>
<label for="name">计算方式:</label>
<select id="valueType" name="valueType" class="form-control" style="width: 120px;">
<option value="">不限</option>
<option value="1" <#if valueType?? && valueType == 1>selected</#if> >指导价</option>
<option value="2" <#if valueType?? && valueType == 2>selected</#if> >自身样本</option>
<option value="3" <#if valueType?? && valueType == 3>selected</#if> >第三方</option>
<option value="4" <#if valueType?? && valueType == 4>selected</#if> >交易数据</option>
<option value="5" <#if valueType?? && valueType == 5>selected</#if> >周边楼盘</option>
<option value="6" <#if valueType?? && valueType == 6>selected</#if> >推算</option>
<option value="-1" <#if valueType?? && valueType == -1>selected</#if> >无方式</option>
</select>
<label for="name">小区:</label>
<input type="text" name="name" id="name" class="input-medium" style="margin-top:4px;" value="${name!}" >
<input id="queryBtn" class ="btn btn-primary" type="submit" value="查询" />
</form>
</td>
</tr>
</table>
<span style="font-size:12px;">查询到<b style="color:red;">${pager.totalRows!}</b>条记录</span>
<table id="dataSheet" class="table table-hover table-condensed">
<tr>
<th style="width:20px;"></th>
<th style="width:60px;">区域</th>
<th style="width:150px;">小区名</th>
<th style="width:150px;">别名</th>
<th style="width:60px;">物业类型</th>
<th style="width:50px;">
<#if sort?? && sort == 'price_desc'>
<a href="../rentPriceUpdate/districtList?cityDisplay=${cityDisplay!}&region=${region!}&block=${block!}&name=${name!}&valueType=${valueType!}&minCredit=${minCredit!}&maxCredit=${maxCredit!}&sort=price_asc">均价</a>↓
<#elseif sort?? && sort == 'price_asc'>
<a href="../rentPriceUpdate/districtList?cityDisplay=${cityDisplay!}&region=${region!}&block=${block!}&name=${name!}&valueType=${valueType!}&minCredit=${minCredit!}&maxCredit=${maxCredit!}&sort=price_desc">均价</a>↑
<#else>
<a href="../rentPriceUpdate/districtList?cityDisplay=${cityDisplay!}&region=${region!}&block=${block!}&name=${name!}&valueType=${valueType!}&minCredit=${minCredit!}&maxCredit=${maxCredit!}&sort=price_desc">均价</a>
</#if>
</th>
<th style="width:86px;">时间</th>
<th style="width:60px;">
<#if sort?? && sort == 'credit_desc'><a href="../rentPriceUpdate/districtList?cityDisplay=${cityDisplay!}&region=${region!}&block=${block!}&name=${name!}&minCredit=${minCredit!}&maxCredit=${maxCredit!}&valueType=${valueType!}&sort=credit_asc">可信度</a>↓
<#elseif sort?? && sort == 'credit_asc'><a href="../rentPriceUpdate/districtList?cityDisplay=${cityDisplay!}&region=${region!}&block=${block!}&name=${name!}&minCredit=${minCredit!}&maxCredit=${maxCredit!}&valueType=${valueType!}&sort=credit_desc">可信度</a>↑
<#else><a href="../rentPriceUpdate/districtList?cityDisplay=${cityDisplay!}&region=${region!}&block=${block!}&name=${name!}&minCredit=${minCredit!}&maxCredit=${maxCredit!}&valueType=${valueType!}&sort=credit_desc">可信度</a>
</#if>
</th>
<th style="width:60px;">计算类型</th>
<th style="width:50px;">操作</th>
</tr>
<#if avgUpdateBos??>
<#list avgUpdateBos as it>
<tr>
<td><input type="checkbox" data-city="${it.city!}" data-region="${it.region!}" data-block="${it.block!}" data-name="${it.districtName!}" data-estateType="${it.estateType!}" data-startDate="${it.calcStartDate!}" data-id="${it.id!}"/></td>
<td>${it.region!}</td>
<td><a href="../rentPriceUpdate/districtDetail?id=${it.id}" target="_blank">${it.districtName!}</a></td>
<td style="width: 120px;">
<span>${t_util.join(it.alias!, ',')}</span>
</td>
<td>${it.estateType!}</td>
<td>${it.avgPrice!}</td>
<td>${it.weekend!}</td>
<td>${it.credit}</td>
<td>
<#if it.valueType?? && it.valueType == 1>
指导价
<#elseif it.valueType?? && it.valueType == 2>
自身样本
<#elseif it.valueType?? && it.valueType == 3>
第三方
<#elseif it.valueType?? && it.valueType == 4>
交易数据
<#elseif it.valueType?? && it.valueType == 5>
周边楼盘
</#if>
</td>
<td>
<a href="../priceSurvey/create?cityDisplay=${it.city!}&region=${it.region!}&districtName=${it.districtName!}" target="_blank">调查</a>
<a href="../seawater/houseList?cityDisplay=${it.city!}&region=${it.region!}&districtName=${it.districtName!}" target="_blank">样本</a>
<a href="../averagerConfig/show?display=${it.city!}&region=${it.region!}&name=${it.districtName!}" target="_blank">设置</a>
</td>
</tr>
</#list>
</#if>
<tfoot>
<tr>
<td colspan="14" style="text-align: right;">
<@d_pager action = "districtList" currentPage = pager.currentPage controller = "rentPriceUpdate" totalPages = pager.totalPages pagerCount=12 theme="full"/>
</td>
</tr>
</tfoot>
</table>
</div>
<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="myModalLabel">警告</h3>
</div>
<div class="modal-body error">
<p>耗时操作,请谨慎操作!</p>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true" aria-hidden="true">关闭</button>
<button class="btn btn-primary" id="reComputeBtn">计算</button>
</div>
</div>
</body>
</html>
<script type="text/javascript">
var selectCity = '${cityDisplay!}';
var selectRegion = '${region!}'
var selectBlock = '${block!}'
function changeCity(display){
selectCity = display;
if (display) {
$("#display").val(display);
}
jQuery.ajax({
type: 'POST',
url: '../district/getRegions',
data: encodeURI("cityDisplay=" + display),
dataType: 'json',
timeout: 100000,
success: function(model) {
$("#region").empty();
if (model.regionList.length > 0) {
$("<option value=''>不限</option>").appendTo($("#region"));
$.each(model.regionList, function(i, region){
if(selectRegion == region){
$("<option value='" + region + "' selected>" + region + "</option>").appendTo($("#region"));
}else{
$("<option value='" + region + "' >" + region + "</option>").appendTo($("#region"));
}
});
}
},
error : function() {
}
});
}
function changeRegion(r){
var selectRegion = $("#region option:selected").text();
if(r!=undefined){
selectRegion = r;
}
$("#block").empty();
if(region==="不限"){
$("<option value=''>不限</option>").appendTo($("#block"));
}
jQuery.ajax({
type: 'POST',
url: '../district/getBlocks',
data: {cityDisplay:selectCity,region:selectRegion},
dataType: 'json',
timeout: 100000,
success: function(model) {
$("#block").empty();
if (model.blockList.length > 0) {
$("<option value=''>不限</option>").appendTo($("#block"));
$.each(model.blockList, function(i, block){
if(selectBlock == block){
$("<option value='" + block + "' selected>" + block + "</option>").appendTo($("#block"));
}else{
$("<option value='" + block + "' >" + block + "</option>").appendTo($("#block"));
}
});
}
},
error : function() {
}
});
}
changeCity('${cityDisplay!}');
if(selectRegion !==''){
changeRegion(selectRegion);
}
function openWarnDailog(){
var checkedInputs = $("#dataSheet input:checked")
if(checkedInputs.length==0){
alert("请选择要更新的小区");
return;
}
$('#myModal').modal('show')
}
function showSuccessMsg(msg){
jNotify(
msg,
{
autoHide : true,
clickOverlay : false,
MinWidth : 250,
TimeShown : 2000,
ShowTimeEffect : 1000,
HideTimeEffect : 1000,
LongTrip :20,
HorizontalPosition : 'right',
VerticalPosition : 'top',
ShowOverlay : true,
ColorOverlay : '#000',
OpacityOverlay : 0.3,
onClosed : function(){
},
onCompleted : function(){
}
});
}
$(function(){
$("#reComputeBtn").click(function(){
var data ={};
var commands = Array();
$("#dataSheet input:checked").each(function(){
var command = {};
if($(this).attr("data-city")!==""){
command.city = $(this).attr("data-city")
}
if($(this).attr("data-region")!==""){
command.region = $(this).attr("data-region")
}
if($(this).attr("data-block")!==""){
command.block = $(this).attr("data-block")
}
if($(this).attr("data-name")!==""){
command.name = $(this).attr("data-name")
}
if($(this).attr("data-estateType")!==""){
command.estateType = $(this).attr("data-estateType")
}
if($(this).attr("data-startdate")!==""){
command.startDate = $(this).attr("data-startDate")
}
commands.push(command)
})
data.commands = commands ;
data.startDate = $("#startDate").val()
data.endDate = $("#endDate").val()
$.ajax({
url:"../rentPriceUpdate/reCompute",
dataType:"json",
type:'POST',
data:{data:JSON.stringify(data)},
success:function(data){
$("#dataSheet input:checked").removeAttr("checked")
showSuccessMsg(data.msg)
$('#myModal').modal('hide')
}
});
});
});
</script>
</#compress>
@@ -0,0 +1,278 @@
<#ftl attributes={"content_type":"text/html; charset=UTF-8"}>
<#compress>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>均价操作后台</title>
<script type="text/javascript" src="../js/My97DatePicker/WdatePicker.js"></script>
<style>
table tr td {
vertical-align: middle !important;;
}
</style>
<link rel="stylesheet" type="text/css" href="../bootstrap/css/bootstrap.min.css?v=${version}" />
<link rel="stylesheet" type="text/css" href="../style/main_simple.css?v=${version}" />
<#include "/common_js.ftl" />
<style>
.right_arrow,.right_arrow:hover,.down_arrow,.down_arrow:hover {
width:0;
height:0;
line-height:0;
border-width:8px;
border-style:solid;
display: inline-block;
margin-top: 6px;
}
.right_arrow{
border-color:transparent transparent transparent #999999;margin-right: 5px; margin-bottom: -2px;
}
.right_arrow:hover{
border-color:transparent transparent transparent red;
}
.down_arrow{
margin-top:8px;
margin-right: 7px;
border-color:#999999 transparent transparent transparent;
}
.down_arrow:hover{
margin-top:8px;
border-color:red transparent transparent transparent;
}
.right_arrow:hover,.down_arrow:hover {
cursor:pointer;
}
input[type="checkbox"]{
margin-top:-3px;
}
</style>
</head>
<body>
<#include "/layout/header.ftl" />
<div class="main-content">
<#--
<table class="table table-bordered table-striped table-condensed">
<thead><tr><th style="width:220px;">项</th><th>值</th></tr></thead>
<tbody>
<tr><td> 城市</td><td><span id="cities"></span></td></tr>
<tr><td> 区域</td><td><span id="regions"></span></td></tr>
<tr><td> 板块</td><td><span id="blocks"></span></td></tr>
<tr><td>起止时间</td>
<td>
<input id="startDate" class="form-control" style="width:100px;" name="startDate" value="${endDate!}" onfocus="WdatePicker({dateFmt:'yyyyMMdd',maxDate:'#F{$dp.$D(\'endDate\')||\'%y-%M-%d\'}',minDate:'2007-1-1'})" />
-<input id="endDate" class="form-control" style="width:100px;" name="endDate" value="${endDate!}" onfocus="WdatePicker({dateFmt:'yyyyMMdd',maxDate:'%y-%M-%d',minDate:'#F{$dp.$D(\'startDate\')||\'2007-1-1\'}'})"/>
</td>
</tr>
<tr>
<td>操作</td>
<td><button type="button" id="reComputeBtn" class="btn btn-danger">重算均价</button>
</td>
</tr>
</tbody>
</table>
-->
<div style="">
<#assign seqIndex = 0 />
<table class="table table-condensed table-bordered table-hover">
<tr>
<td colspan="5">
<#list ['HOT', 'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'] as key>
<a href="#${key}">${key}</a>&nbsp;&nbsp;&nbsp;&nbsp;
</#list>
</td>
</tr>
<tr>
<th>序号</th><th>名称</th><th>最新均价</th><th>起始日期</th><th class="fixedtd">操作</th>
</tr>
<#list ['HOT', 'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'] as key>
<#if avgUpdateBoMap[key]?? && avgUpdateBoMap[key]?size gt 0>
<tr>
<td colspan="5" style="background-color:rgb(236, 231, 231)">&nbsp;&nbsp;<b id="${key}" name="${key}" style="color:rgb(10, 0, 0)">${key}</b></td>
</tr>
<#list avgUpdateBoMap[key] as it>
<tr data-ids = "${it.id!}" data-city="${it.city}" data-level="1" data-startDate="${it.startDate!}">
<td style="width: 40px;"><#assign seqIndex = seqIndex +1 />${seqIndex}</td>
<td style="width:400px;">
&nbsp;${it.city}
</td>
<td>${it.avgPrice!}</td>
<td>${it.startDate!}</td>
<td>
<a href="../rentPriceUpdate/detail?cityDisplay=${it.city!}">详细信息</a>
<a href="../rentPriceUpdate/districtList?cityDisplay=${it.city!}">查看小区</a>
<a href="../districtHouseStat/list?cityDisplay=${it.city}">样本房源</a>
</td>
</tr>
</#list>
</#if>
</#list>
<table>
</div>
</div>
</body>
</html>
<#--
<script type="text/javascript">
$(function(){
listeners.addCityLevelListeners();
listeners.addItemListeners();
$("#reComputeBtn").click(function(){
var data ={};
var commands = Array();
$("input:checked").each(function(){
var tr = $(this).parent().parent();
var command = {};
if(tr.attr("data-level")=="1"){
command.city = tr.attr("data-city")
}else if(tr.attr("data-level")=="2"){
command.city = tr.attr("data-city")
command.region = tr.attr("data-region")
}else if(tr.attr("data-level")=="3"){
command.city = tr.attr("data-city")
command.region = tr.attr("data-region")
command.block = tr.attr("data-block")
}
command.startDate = tr.attr("data-startDate")
commands.push(command)
})
if(commands.length==0){
alert("你没有选择任何城市、区域或板块!")
return;
}
if(!confirm("耗时任务,请慎重进行!!!你确定要重算吗?")){
return;
}
data.commands = commands ;
data.startDate = $("#startDate").val()
data.endDate = $("#endDate").val()
$.ajax({
url:"../rentPriceUpdate/reCompute",
dataType:"json",
cache:false,
type:'POST',
data:{data:JSON.stringify(data)},
success:function(data){
alert(data.msg)
window.location.reload();
}
});
});
});
listeners ={
addCityLevelListeners:function(){
$("[data-level='1'] span").click(function(){
var activeTr = $(this).parent().parent()
var ids = $(activeTr).attr("data-ids");
if($(this).hasClass("right_arrow")){
$(this).removeClass("right_arrow").addClass("down_arrow")
if($("tr[data-ids*='"+$(activeTr).attr("data-ids")+",']").length > 0){
$("tr[data-ids*='"+$(activeTr).attr("data-ids")+",']").show();
return;
}
$.ajax({
url:"../rentPriceUpdate/loadAvgPriceData",
dataType:"json",
cache:true,
data:{cityName:$(activeTr).attr("data-city")},
success:function(data){
$(data).each(function(){
$('<tr data-ids="'+ids+',' + this.id +'" data-region ="'+this.region+'" data-city="'+this.city+'" data-startDate="'+this.startDate+'" data-level="2"><td><span class="right_arrow" style="margin-left:30px;"></span><input type="checkbox"> '+this.region+'</td><td>'+this.avgPrice+'</td><td>'+this.startDate+'</td><td><a href="javascript:;" class="detailBtn">详细信息</a> <a href="javascript:;" class="districtBtn">查看小区</a></td></tr>').insertAfter(activeTr)
});
listeners.addRegionLevelListeners();
listeners.addItemListeners();
}
});
}else{
$(this).removeClass("down_arrow").addClass("right_arrow")
$("tr[data-ids*='"+$(activeTr).attr("data-ids")+",']").hide();
}
});
},
addRegionLevelListeners:function(){
$("[data-level='2'] span").click(function(){
var activeTr = $(this).parent().parent()
var ids = $(activeTr).attr("data-ids");
if($(this).hasClass("right_arrow")){
$(this).removeClass("right_arrow").addClass("down_arrow")
if($("tr[data-ids*='"+$(activeTr).attr("data-ids")+",']").length > 0){
$("tr[data-ids*='"+$(activeTr).attr("data-ids")+",']").show();
return;
}
$.ajax({
url:"../rentPriceUpdate/loadAvgPriceData",
dataType:"json",
cache:true,
data:{cityName:$(activeTr).attr("data-city"),region:$(activeTr).attr("data-region")},
success:function(data){
$(data).each(function(){
$('<tr data-ids="'+ids+","+this.id+'" data-level="3" data-city="'+this.city+'" data-region="'+this.region+'" data-block = "'+this.block+'" data-startDate="'+this.startDate+'"><td><span style="margin-left:90px;"></span><input type="checkbox"> '+this.block+'</td><td>'+this.avgPrice+'</td><td>'+this.startDate+'</td><td><a href="javascript:;" class="detailBtn">详细信息</a> <a href="javascript:;" class="districtBtn">查看小区</a></td></tr>').insertAfter(activeTr)
});
listeners.addItemListeners();
}
});
}else{
$(this).removeClass("down_arrow").addClass("right_arrow")
$("tr[data-ids*='"+$(activeTr).attr("data-ids")+",']").hide();
}
});
},
addItemListeners:function(){
$("input[type='checkbox']").unbind();
$(".detailBtn").unbind();
$(".districtBtn").unbind();
$("input[type='checkbox']").click(function(){
var activeTr = $(this).parent().parent();
if($(this).attr("checked")){
if($(activeTr).attr("data-level")==="1"){
$("#cities").text($("#cities").text()+activeTr.attr("data-city")+",")
}else if($(activeTr).attr("data-level")==="2"){
$("#regions").text($("#regions").text()+activeTr.attr("data-region")+",")
}else if($(activeTr).attr("data-level")==="3"){
$("#blocks").text($("#blocks").text()+activeTr.attr("data-block")+",")
}
}else{
if($(activeTr).attr("data-level")==="1"){
$("#cities").text($("#cities").text().replace(activeTr.attr("data-city")+",",""))
}else if($(activeTr).attr("data-level")==="2"){
$("#regions").text($("#regions").text().replace(activeTr.attr("data-region")+",",""))
}else if($(activeTr).attr("data-level")==="3"){
$("#blocks").text($("#blocks").text().replace(activeTr.attr("data-block")+",",""))
}
}});
$(".detailBtn").click(function(){
var activeTr = $(this).parent().parent();
var url = "../rentPriceUpdate/detail?cityDisplay="+$(activeTr).attr("data-city");
if($(activeTr).attr("data-region")!=undefined){
url =url + "&region=" + $(activeTr).attr("data-region")
}
if($(activeTr).attr("data-block")!=undefined){
url =url + "&block=" + $(activeTr).attr("data-block")
}
window.open(url,'_blank');
});
$(".districtBtn").click(function(){
var activeTr = $(this).parent().parent();
var url = "../rentPriceUpdate/districtList?cityDisplay="+$(activeTr).attr("data-city");
if($(activeTr).attr("data-region")!=undefined){
url =url + "&region=" + $(activeTr).attr("data-region")
}
if($(activeTr).attr("data-block")!=undefined){
url =url + "&block=" + $(activeTr).attr("data-block")
}
window.open(url,'_blank');
});
}
}
</script>
-->
</#compress>
@@ -0,0 +1,192 @@
<#ftl attributes={"content_type":"text/html; charset=UTF-8"}>
<#compress>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>指导价数据</title>
<link rel="stylesheet" type="text/css" href="../bootstrap/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="../style/main_simple.css" />
<link rel="stylesheet" type="text/css" href="../style/jnotify/jNotify.jquery.css?v=${version}" />
<style>
.row-fluid:before, .row-fluid:after {
display: none;
}
.thdiv {
background-image: linear-gradient(to bottom, #FFF, #CCC);
}
.pagination-page {
background: #fff url(../images/skin/shadow.jpg) bottom repeat-x;
border-bottom: 1px solid #ccc;
color: #666;
font-size: 12px;
overflow: hidden;
padding: 2px 3px;
text-align: right;
}
.pagination-page .page-num,.pagination-page .previous,.pagination-page .next
{
background: #fff;
border: 1px solid #ccc;
border-color: #ccc #aaa #aaa #ccc;
color: #666;
margin: 0 3px;
padding: 2px 6px;
}
.pagination-page .current-page {
padding: 2px 3px;
color: #666;
background: #fff;
font-weight: bold;
}
.main-content {
padding-bottom: 0;
}
.row-fluid .span2 {
width: 100%;
*width: 100%;
margin-top: 10px;
}
.sort-th:hover {
cursor: pointer;
}
</style>
</head>
<body>
<#include "/common_js.ftl" />
<#include "/layout/header.ftl" />
<#setting number_format="0.####">
<div class="main-content">
<div class="menuButton">
<a href="../rentPriceUpdate/guidingPrice?id=${district.id!}" class="list" target="_self">添加指导价</a>&nbsp;&nbsp;
</div>
<div class="container-fluid">
<div class="row-fluid">
<div class="span12" style="margin-left:0;">
<div id="thDiv" class="thdiv">
<table class="table table-bordered" style="margin-bottom:0;">
<thead>
<tr>
<th width="4%">城市</th>
<th width="4%">区域</th>
<th width="4%">小区名</th>
<th width="4%">日期</th>
<th width="4%">添加人</th>
<th width="4%">添加价格</th>
<th width="4%">操作</th>
</tr>
</thead>
</table>
</div>
<table class="table table-bordered table-striped table-hover" id="mainTab">
<tbody>
<#list guidingPrices! as guid>
<tr>
<td width="4%">${guid.city!''}</td>
<td width="4%">${guid.region!}</td>
<td width="4%">${guid.name!}</td>
<td width="4%">${guid.guidingDate?string("yyyy-MM-dd")}</td>
<td width="4%">${guid.guidingPerson!}</td>
<td width="4%">${guid.guidingValue!}</td>
<td width="4%">
<a target="_self" href="../rentPriceUpdate/guidingPrice?gid=${guid.id}&id=${district.id}">编辑</a>
<a href="javascript:void(null)" class="deleteData" data-id="${guid.id}">删除</a>
<button type="button" onclick="javascript:$('#myReCompModal').modal('show')" class="btn btn-danger" >重算均价</button>
</td>
</tr>
</#list>
</tbody>
</table>
</div>
</div>
<div id="myReCompModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="myModalLabel">是否确定?</h3>
</div>
<div class="modal-body error">
<p>1.耗时较长,请谨慎操作!</p>
<p>2.计算<b>${district.name!}</b>的历史价格!</p>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true" aria-hidden="true">关闭</button>
<button class="btn btn-primary" name="reComputeBtn" type="all">重算历史</button>
<button class="btn btn-primary" name="reComputeBtn" type="week">最近一期</button>
<button class="btn btn-primary" name="reComputeBtn" type="month">最近一月</button>
<button class="btn btn-primary" name="reComputeBtn" type="quarter">最近季度</button>
<button class="btn btn-primary" name="reComputeBtn" type="year">最近一年</button>
</div>
</div>
<script type="text/javascript" src="../js/jquery-1.9.1.js?v=${version}"></script>
<script type="text/javascript" src="../js/city_select.js?v=${version}"></script>
<script type="text/javascript" src="../bootstrap/js/bootstrap.min.js?v=${version}"></script>
<script type="text/javascript" src="../js/jquery.form.js?v=${version}"></script>
<script type="text/javascript" src="../js/jNotify.jquery.min.js?v=${version}"></script>
<script type="text/javascript">
//删除操作
$(".deleteData").click(function(){
var obj = $(this).parent().parent();
var gid = $(this).attr("data-id");
jQuery.ajax({
type: 'POST',
url: '../rentPriceUpdate/deleteGuidingPriceNew',
data: {gid:gid},
dataType: 'json',
timeout: 100000,
success: function(model) {
obj.remove();
},
error : function() {
alert("删除失败!");
}
});
});
$("button[name='reComputeBtn']").click(function(){
var type = $(this).attr('type');
var data ={};
var commands = Array();
commands.push({city:'${district.city!}',region:'${district.region!}',name:'${district.name!}',estateType:'${district.estateType2!}'})
data.commands = commands ;
data.calcRange = type;
$.ajax({
url:"../rentPriceUpdate/reCompute",
dataType:"json",
type:'POST',
data:{data:JSON.stringify(data)},
success:function(data){
showSuccessMsg(data.msg)
$('#myReCompModal').modal('hide')
}
});
});
function showSuccessMsg(msg){
jNotify(
msg,
{
autoHide : true,
clickOverlay : false,
MinWidth : 250,
TimeShown : 2000,
ShowTimeEffect : 1000,
HideTimeEffect : 1000,
LongTrip :20,
HorizontalPosition : 'right',
VerticalPosition : 'top',
ShowOverlay : true,
ColorOverlay : '#000',
OpacityOverlay : 0.3,
onClosed : function(){
},
onCompleted : function(){
}
});
}
</script>
</body>
</html>
</#compress>
@@ -0,0 +1,111 @@
<#ftl attributes={"content_type":"text/html; charset=UTF-8"}>
<#compress>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>添加指导价</title>
<link rel="stylesheet" type="text/css" href="../style/main.css?v=${version}" />
<script type="text/javascript" src="../js/My97DatePicker/WdatePicker.js"></script>
</head>
<body>
<#include "/common_js.ftl" />
<#include "/layout/header.ftl" />
<div class="main-content">
<div id = "save">
<form id="lineForm" method = "post">
<table class = "saveTable">
<tr>
<td class = "t1">
城市
<td>
<input name="city" id="city" type="text" disabled="true" value="${district.city!}" />
</td>
</tr>
<tr>
<td class = "t1">
区域
<td>
<input name="region" id="region" type="text" disabled="true" value="${district.region!}" />
</td>
</tr>
<tr>
<td class = "t1">
小区名
<td>
<input name="name" id="name" type="text" disabled="true" value="${district.name!}" />
</td>
</tr>
<tr>
<td class = "t1">
日期<font color="red">*</font></td>
<td>
<input placeholder="指导日期" id="guidingDate" name="guidingDate" readonly="true" type="text" value="${guidingDate!}" class="input-small" onfocus="WdatePicker({dateFmt:'yyyyMMdd',maxDate:'%y-%M-{%d-7}'})">
</td>
</tr>
<tr>
<td class = "t1">
指导价格<font color="red">*</font></td>
<td>
<input placeholder="指导价格" name="guidingPrice" id="guidingPrice" type="number" value="${guidingPrice!}" />
</td>
</tr>
</table>
<table class = "saveTable">
<tr>
<td colspan="2" >
<input id="submitForm" type="button" value="确认添加" />
</td>
</tr>
</table>
</form>
</div>
</div>
<script type="text/javascript" src="../js/kindeditor-4.0/kindeditor.js"></script>
<script type="text/javascript" src="../js/kindeditor-4.0/lang/zh_CN.js"></script>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=3E63A744012f88c9a73a2f051aece58b"></script>
<script charset="utf-8" src="http://map.qq.com/api/js?v=2.exp&key=5fc2a1dec61fbd1df575a0967b87aa20"></script>
<script type="text/javascript">
dayStr=function(){ //获得本周的开端日期
var nowDate = new Date();
return nowDate.getDay();
}
$("#submitForm").click(function(){
var guidingDate = $("#guidingDate").val();
if (guidingDate == '' || guidingDate == undefined) {
alert('时间不能为空!');
return false;
}
var guidingPrice = $("#guidingPrice").val();
if (region == '') {
alert('指导价格不能为空!');
return false;
}
jQuery.ajax({
type: 'POST',
url: '../rentPriceUpdate/saveGuidingPrice',
data: {id:"${district.id}",guidingDate:guidingDate,guidingPrice:guidingPrice,gid:"${gid!}"},
dataType: 'json',
timeout: 100000,
success: function(model) {
window.location.href = "../rentPriceUpdate/guidingList?id=${district.id}";
},
error : function() {
alert("操作失败!");
}
});
})
</script>
</body>
</html>
</#compress>
@@ -0,0 +1,125 @@
<#ftl attributes={"content_type":"text/html; charset=UTF-8"}>
<#compress>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>均价系统-${cityDisplay!}价格质量跟踪</title>
<link rel="stylesheet" type="text/css" href="../bootstrap/css/bootstrap.min.css?v=${version}" />
<link rel="stylesheet" type="text/css" href="../style/main_simple.css?v=${version}" />
<link rel="stylesheet" type="text/css" href="../style/pagination.css?v=${version}" />
<link rel="stylesheet" type="text/css" href="../style/jnotify/jNotify.jquery.css?v=${version}" />
<#include "/common_js.ftl" />
<script type="text/javascript" src="../js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="../js/jquery-1.9.1.js"></script>
<script type="text/javascript" src="../js/jquery.pagination.js?v=${version}"></script>
<script type="text/javascript" src="../js/highcharts/highcharts.js"></script>
<script type="text/javascript" src="../js/highcharts/exporting-3.0.7.js"></script>
<script type="text/javascript" src="../bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="../js/jNotify.jquery.min.js?v=${version}"></script>
<style>
.cur{
background-color:#eee;
}
label{display:inline-block}
.stab {
border: 1px solid #e0e0e0; padding: 8px 5px; cursor:pointer;border-left:none;
width: 130px;
float: left;
text-align: center;
}
.leg {
font-size: 14px;
text-align: center;
background-color: #fff;
border: 1px solid #ccc;
border-radius: 4px;
}
.leg input{
margin-top: -2px;
}
</style>
</head>
<body>
<#setting number_format="0.###########"/>
<#include "/layout/header.ftl" />
<div class="main-content" style="padding:10px 10px;">
<table class="table table-bordered table-condensed">
<tr>
<th>查询条件</th>
</tr>
<tr>
<td>
<form action="listQR" style="padding-bottom: 10px;">
<div style="padding-top:5px;">
<@d_city defaultValue="${cityDisplay!}" callback="changeCity" callbackField="display" showCountry="1" name="cityDisplay"/>
</div>
<div style="padding-top: 1px;">
<label for="name">时间:</label>
<input id="startDate" class="form-control" style="width:100px;" name="sdateStart" value="${sdateStart!}" onfocus="WdatePicker({dateFmt:'yyyyMMdd',maxDate:'#F{$dp.$D(\'endDate\')||\'%y%M%d\'}',minDate:'20070101'})" />
&nbsp;-&nbsp;
<input id="endDate" class="form-control" style="width:100px;" name="sdateEnd" value="${sdateEnd!}" onfocus="WdatePicker({dateFmt:'yyyyMMdd',maxDate:'%y%M%d',minDate:'#F{$dp.$D(\'startDate\')||\'20070101\'}'})"/>
<input id="queryBtn" class ="btn btn-primary" type="submit" value="查询" />
</div>
<input type="hidden" name="stype" value="${stype!}">
</form>
</td>
</tr>
</table>
<div id="stabs">
<span class="stab <#if stype=="1">cur</#if>">
<a name="tab1" href="javascript:;" ref="listQR?cityDisplay=${cityDisplay!}&sdateStart=${sdateStart!}&sdateEnd=${sdateEnd!}&stype=1" class="list">小区量</a>
</span>
<span class="stab <#if stype=="2">cur</#if>">
<a name="tab2" href="javascript:;" ref="listQR?cityDisplay=${cityDisplay!}&sdateStart=${sdateStart!}&sdateEnd=${sdateEnd!}&stype=2" class="list">平均可信度</a>
</span>
<span class="stab <#if stype=="3">cur</#if>">
<a name="tab3" href="javascript:;" ref="listQR?cityDisplay=${cityDisplay!}&sdateStart=${sdateStart!}&sdateEnd=${sdateEnd!}&stype=3" class="list">测试案例数量</a>
</span>
<span class="stab <#if stype=="4">cur</#if>">
<a name="tab4" href="javascript:;" ref="listQR?cityDisplay=${cityDisplay!}&sdateStart=${sdateStart!}&sdateEnd=${sdateEnd!}&stype=4" class="list">案例差比<10%量</a>
</span>
<span class="stab <#if stype=="5">cur</#if>">
<a name="tab5" href="javascript:;" ref="listQR?cityDisplay=${cityDisplay!}&sdateStart=${sdateStart!}&sdateEnd=${sdateEnd!}&stype=5" class="list">案例差比<20%量</a>
</span>
<span class="stab <#if stype=="6">cur</#if>">
<a name="tab6" href="javascript:;" ref="listQR?cityDisplay=${cityDisplay!}&sdateStart=${sdateStart!}&sdateEnd=${sdateEnd!}&stype=6" class="list">案例差比<30%量</a>
</span>
<#--
<span <#if stype=="7">class="cur"</#if> style="border: 1px solid #e0e0e0; padding: 8px 10px; margin-top: 10px;cursor:pointer;border-left:none;">
<a name="tab7" href="listQR?cityDisplay=${cityDisplay!}&sdateStart=${sdateStart!}&sdateEnd=${sdateEnd!}&stype=7" class="list">房源样本量</a>
</span>
-->
</div>
<div id="fregment" style="margin-top: 10px"></div>
</div>
<script type="text/javascript">
function changeCity(cityDisplay) {
var currUrl = "listQR?cityDisplay=####&sdateStart=${sdateStart!}&sdateEnd=${sdateEnd!}&stype=${stype!}&vts=${vts!}";
location.href = currUrl.replace("####", cityDisplay);
}
$("#stabs a").click(function(){
var ref = $(this).attr('ref')
var vts = [];
$("#chartLegend input").each(function(){
if ($(this).is(":checked")) {
vts.push($(this).val());
}
})
location.href = ref + "&vts=" + vts.join("-")
})
$(document).ready(function(){
$("#fregment").load("loadQRData?cityDisplay=${cityDisplay!}&stype=${stype!}&sdateStart=${sdateStart!}&sdateEnd=${sdateEnd}&vts=${vts!}");
});
</script>
</body>
</html>
</#compress>
@@ -0,0 +1,110 @@
<#ftl attributes={"content_type":"text/html; charset=UTF-8"}>
<#compress>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>均价系统-${cityDisplay!}样本质量跟踪</title>
<link rel="stylesheet" type="text/css" href="../bootstrap/css/bootstrap.min.css?v=${version}" />
<link rel="stylesheet" type="text/css" href="../style/main_simple.css?v=${version}" />
<link rel="stylesheet" type="text/css" href="../style/pagination.css?v=${version}" />
<link rel="stylesheet" type="text/css" href="../style/jnotify/jNotify.jquery.css?v=${version}" />
<#include "/common_js.ftl" />
<script type="text/javascript" src="../js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="../js/jquery-1.9.1.js"></script>
<script type="text/javascript" src="../js/jquery.pagination.js?v=${version}"></script>
<script type="text/javascript" src="../js/highcharts/highcharts.js"></script>
<script type="text/javascript" src="../js/highcharts/exporting-3.0.7.js"></script>
<script type="text/javascript" src="../bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="../js/jNotify.jquery.min.js?v=${version}"></script>
<style>
.cur{
background-color:#eee;
}
label{display:inline-block}
.stab {
border: 1px solid #e0e0e0; padding: 8px 5px; cursor:pointer;border-left:none;
width: 130px;
float: left;
text-align: center;
}
.leg {
font-size: 14px;
text-align: center;
background-color: #fff;
border: 1px solid #ccc;
border-radius: 4px;
}
.leg input{
margin-top: -2px;
}
</style>
</head>
<body>
<#setting number_format="0.###########"/>
<#include "/layout/header.ftl" />
<div class="main-content" style="padding:10px 10px;">
<table class="table table-bordered table-condensed">
<tr>
<th>查询条件</th>
</tr>
<tr>
<td>
<form action="listSQR" style="padding-bottom: 10px;">
<div style="padding-top:5px;">
<@d_city defaultValue="${cityDisplay!}" callback="changeCity" callbackField="display" showCountry="1" name="cityDisplay"/>
</div>
<div style="padding-top: 1px;">
<label for="name">时间:</label>
<input id="startDate" class="form-control" style="width:100px;" name="sdateStart" value="${sdateStart!}" onfocus="WdatePicker({dateFmt:'yyyyMMdd',maxDate:'#F{$dp.$D(\'endDate\')||\'%y%M%d\'}',minDate:'20070101'})" />
&nbsp;-&nbsp;
<input id="endDate" class="form-control" style="width:100px;" name="sdateEnd" value="${sdateEnd!}" onfocus="WdatePicker({dateFmt:'yyyyMMdd',maxDate:'%y%M%d',minDate:'#F{$dp.$D(\'startDate\')||\'20070101\'}'})"/>
<input id="queryBtn" class ="btn btn-primary" type="submit" value="查询" />
</div>
<input type="hidden" name="stype" value="${stype!}">
</form>
</td>
</tr>
</table>
<div>
<span class="stab <#if stype=="1" || stype=="2" >cur</#if>">
一个月
<a name="tab1" href="listSQR?cityDisplay=${cityDisplay!}&sdateStart=${sdateStart!}&sdateEnd=${sdateEnd!}&stype=1" class="list" <#if stype?? && stype=="1">style="font-weight: bold;font-size: 16px;" </#if> >数量</a>
<a name="tab1" href="listSQR?cityDisplay=${cityDisplay!}&sdateStart=${sdateStart!}&sdateEnd=${sdateEnd!}&stype=2" class="list" <#if stype?? && stype=="2">style="font-weight: bold;font-size: 16px;"</#if>>比例</a>
</span>
<span class="stab <#if stype=="3" || stype=="4" >cur</#if>">
季度
<a name="tab1" href="listSQR?cityDisplay=${cityDisplay!}&sdateStart=${sdateStart!}&sdateEnd=${sdateEnd!}&stype=3" class="list" <#if stype?? && stype=="3">style="font-weight: bold;font-size: 16px;" </#if> >数量</a>
<a name="tab1" href="listSQR?cityDisplay=${cityDisplay!}&sdateStart=${sdateStart!}&sdateEnd=${sdateEnd!}&stype=4" class="list" <#if stype?? && stype=="4">style="font-weight: bold;font-size: 16px;" </#if> >比例</a>
</span>
<span class="stab <#if stype=="5" || stype=="6" >cur</#if>">
半年
<a name="tab1" href="listSQR?cityDisplay=${cityDisplay!}&sdateStart=${sdateStart!}&sdateEnd=${sdateEnd!}&stype=5" class="list" <#if stype?? && stype=="5">style="font-weight: bold;font-size: 16px;" </#if> >数量</a>
<a name="tab1" href="listSQR?cityDisplay=${cityDisplay!}&sdateStart=${sdateStart!}&sdateEnd=${sdateEnd!}&stype=6" class="list" <#if stype?? && stype=="6">style="font-weight: bold;font-size: 16px;" </#if> >比例</a>
</span>
<span class="stab <#if stype=="7" || stype=="8" >cur</#if>">
一年
<a name="tab1" href="listSQR?cityDisplay=${cityDisplay!}&sdateStart=${sdateStart!}&sdateEnd=${sdateEnd!}&stype=7" class="list" <#if stype?? && stype=="7">style="font-weight: bold;font-size: 16px;" </#if> >数量</a>
<a name="tab1" href="listSQR?cityDisplay=${cityDisplay!}&sdateStart=${sdateStart!}&sdateEnd=${sdateEnd!}&stype=8" class="list" <#if stype?? && stype=="8">style="font-weight: bold;font-size: 16px;" </#if> >比例</a>
</span>
</div>
<div id="fregment" style="margin-top: 10px"></div>
</div>
<script type="text/javascript">
function changeCity(cityDisplay) {
var currUrl = "listSQR?cityDisplay=####&sdateStart=${sdateStart!}&sdateEnd=${sdateEnd!}&stype=${stype!}&vts=${vts!}";
location.href = currUrl.replace("####", cityDisplay);
}
$(document).ready(function(){
$("#fregment").load("loadSQRData?cityDisplay=${cityDisplay!}&stype=${stype!}&sdateStart=${sdateStart!}&sdateEnd=${sdateEnd}&vts=${vts!}");
});
</script>
</body>
</html>
</#compress>
@@ -0,0 +1,102 @@
<div id="container"></div>
<div id="chartLegend" class="leg" style="display: none;">
<input id="vt1" name="vts" value="1" type="checkbox"/><label for="vt1" style="color:#79434D;">全部</label>&nbsp;
<input id="vt4" name="vts" value="4" type="checkbox"/><label for="vt4" style="color:#3A696F;">自身样本</label>&nbsp;
<input id="vt7" name="vts" value="7" type="checkbox"/><label for="vt7" style="color:#DD9F19;">周边计算</label>&nbsp;
<input id="vt5" name="vts" value="5" type="checkbox"/><label for="vt5" style="color:#6BB7C5;">第三方</label>&nbsp;
<input id="vt6" name="vts" value="6" type="checkbox"/><label for="vt6" style="color:#729827;">成交数据</label>&nbsp;
<input id="vt3" name="vts" value="3" type="checkbox"/><label for="vt3" style="color:#C877C8;">指导价</label>&nbsp;
<input id="vt2" name="vts" value="2" type="checkbox"/><label for="vt2" style="color:#BBBD81;">无法计算</label>&nbsp;
<input id="vt8" name="vts" value="8" type="checkbox"/><label for="vt8" style="color:#CAB0A2;">推算</label>&nbsp;
</div>
<script type="text/javascript">
Highcharts.setOptions({
global: {
useUTC: false
}
});
$('#container').highcharts({
chart: {
type: 'line'
},
title: {
text: '${cityDisplay!}<#if stype=="1">小区量<#elseif stype=="2">平均可信度<#elseif stype=="3">测试案例数量<#elseif stype=="4">案例差比&lt;10%量<#elseif stype=="5">案例差比&lt;20%量<#elseif stype=="6">案例差比&lt;30%量<#elseif stype=="7">样本数量</#if>情况展示'
},
subtitle: {
text: '${t_util.formatDate(t_util.parseDate(sdateStart?string, 'yyyyMMdd'), 'yyyy年MM月dd日')} - ${t_util.formatDate(t_util.parseDate(sdateEnd?string, 'yyyyMMdd'), 'yyyy年MM月dd日')}'
},
xAxis: {
type: 'datetime',
dateTimeLabelFormats: { // don't display the dummy year
month: '%Y-%m-%d',
year: '%Y'
}
},
yAxis: {
title: {
text: '值'
},
min: 0
},
tooltip: {
formatter: function() {
return '<b>'+ this.series.name +'</b><br>'+ Highcharts.dateFormat('%Y-%m-%d', this.x) +' : '+ this.y;
}
},
legend : {
enabled : false
},
plotOptions: {
line: {
dataLabels: {
enabled: true,
formatter: function() {
return this.y;
}
},
enableMouseTracking: true
}
},
series: ${series!}
});
$("#chartLegend").show();
var vts = "${vts!}".split("-");
$.each(vts, function(i, vt){
$("#chartLegend input").each(function(){
if($(this).val() == vt) {
$(this).prop("checked", true);
$(this).next().css("font-weight", "bold");
}
})
})
$("#chartLegend input").change(function(){
var vts = [];
$("#chartLegend input").each(function(){
if ($(this).is(":checked")) {
vts.push($(this).val());
}
})
if(vts.length > 0) {
$("#fregment").load(
"loadQRData?cityDisplay=${cityDisplay!}&stype=${stype!}&sdateStart=${sdateStart!}&sdateEnd=${sdateEnd}&vts=" + vts.join("-"),
function(){
$("#chartLegend input").each(function(){
if ($(this).is(":checked")) {
$(this).next().css("font-weight", "bold");
}else {
$(this).next().css("font-weight", "");
}
})
}
);
}
})
</script>
@@ -0,0 +1,49 @@
<div id="container"></div>
<div id="chartLegend" class="leg" style="display: none;">
<input id="vt1" name="vts" value="1" type="checkbox"/><label for="vt1">一个月</label>&nbsp;
<input id="vt2" name="vts" value="2" type="checkbox"/><label for="vt2">季度</label>&nbsp;
<input id="vt3" name="vts" value="3" type="checkbox"/><label for="vt3">半年</label>&nbsp;
</div>
<script type="text/javascript">
Highcharts.setOptions({
global: {
useUTC: false
}
});
$('#container').highcharts({
chart: {
type: 'spline'
},
title: {
text: '${cityDisplay!}<#if stype=="1">数量(一个月)<#elseif stype=="2">比例(一个月)<#elseif stype=="3">数量(季度)<#elseif stype=="4">比例(季度)<#elseif stype=="5">数量(半年)<#elseif stype=="6">比例(半年)<#elseif stype=="7">数量(一年)<#elseif stype=="8">比例(一年)</#if>情况展示'
},
subtitle: {
text: '${t_util.formatDate(t_util.parseDate(sdateStart?string, 'yyyyMMdd'), 'yyyy年MM月dd日')} - ${t_util.formatDate(t_util.parseDate(sdateEnd?string, 'yyyyMMdd'), 'yyyy年MM月dd日')}'
},
xAxis: {
type: 'datetime',
dateTimeLabelFormats: { // don't display the dummy year
month: '%Y-%m-%d',
year: '%Y'
}
},
yAxis: {
title: {
text: '值'
},
min: 0
},
tooltip: {
formatter: function() {
return '<b>'+ this.series.name +'</b><br>'+ Highcharts.dateFormat('%Y-%m-%d', this.x) +' : '+ this.y;
}
},
// legend : {
// enabled : false
// },
series: ${series!}
});
</script>
@@ -0,0 +1,160 @@
<#ftl attributes={"content_type":"text/html; charset=UTF-8"}>
<#compress>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>均价更新</title>
<link rel="stylesheet" type="text/css" href="../bootstrap/css/bootstrap.min.css?v=${version}" />
<link rel="stylesheet" type="text/css" href="../style/main_simple.css?v=${version}" />
<link rel="stylesheet" type="text/css" href="../style/pagination.css?v=${version}" />
<link rel="stylesheet" type="text/css" href="../style/jnotify/jNotify.jquery.css?v=${version}" />
<#include "/common_js.ftl" />
<script type="text/javascript" src="../js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="../js/jquery-1.9.1.js"></script>
<script type="text/javascript" src="../js/jquery.pagination.js?v=${version}"></script>
<script type="text/javascript" src="../js/highcharts/highcharts-3.0.7.js"></script>
<script type="text/javascript" src="../js/highcharts/exporting-3.0.7.js"></script>
<script type="text/javascript" src="../bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="../js/jNotify.jquery.min.js?v=${version}"></script>
<style>
.con {
border-radius:0px;
}
label{display:inline-block}
.input-small{
margin:0px;
}
#city-border-mid{
margin-top:6px;
}
</style>
</head>
<body>
<#include "/layout/header.ftl" />
<div class="main-content" style="padding:10px 10px;">
<table class="table table-bordered">
<tr>
<th>查询条件</th>
</tr>
<tr>
<td>
<form action="taskList">
<@d_city defaultValue="${cityDisplay!}" callbackField="display" name="cityDisplay"/>
<label for="stype">任务类型:</label>
<select id="stype" name="stype" class="form-control" style="width:70px;">
<option value="" <#if (stype!'') == ''>selected="selected"</#if> >不限</option>
<option value="city" <#if (stype!'')=='city'>selected="selected"</#if>>城市</option>
<option value="region" <#if (stype!'')=='region'>selected="selected"</#if>>区域</option>
<option value="block" <#if (stype!'')=='block'>selected="selected"</#if>>板块</option>
<option value="district" <#if (stype!'')=='district'>selected="selected"</#if>>小区</option>
</select>
<label for="keyword">关键字:</label>
<input id="keyword" class="form-control" name="keyword" value="${keyword!}" style="width:100px;" />
<label for="startDate">开始时间:</label>
<#if startDate??>
<input id="startDate" class="form-control" style="width:100px;" name="startDate" value="${startDate!?string('yyyy-MM-dd')}" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'endDate\')||\'%y-%M-%d\'}',minDate:'2007-1-1'})" />
<#else>
<input id="startDate" class="form-control" style="width:100px;" name="startDate" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'endDate\')||\'%y-%M-%d\'}',minDate:'2007-1-1'})" />
</#if>
<label for="endDate">结束日期:</label>
<#if endDate??>
<input id="endDate" class="form-control" style="width:100px;" name="endDate" value="${endDate?string('yyyy-MM-dd')!}" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'%y-%M-%d',minDate:'#F{$dp.$D(\'startDate\')||\'2007-1-1\'}'})"/>
<#else>
<input id="endDate" class="form-control" style="width:100px;" name="endDate" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',maxDate:'%y-%M-%d',minDate:'#F{$dp.$D(\'startDate\')||\'2007-1-1\'}'})"/>
</#if>
<input id="queryBtn" class ="btn btn-primary" type="submit" value="查询" />
<a id="queryBtn" class ="btn btn-primary" href="../rentPriceUpdate/doCreatTask" >创建任务</a>
</form>
</td>
</tr>
</table>
<table id="dataSheet" class="table table-bordered table-hover">
<tr><th>城市</th><th>区域</th><th>板块</th><th>小区名</th><th>计算类型</th><th>计算时间</th><th>状态</th><th>优先级</th><th>物业类型</th><th>种类</th><th>创建时间</th><th>备注</th></tr>
<#list calcCommands as it>
<tr>
<td>${it.city!}</td><td>${it.region!}</td><td>${it.block!}</td><td>${it.name}</td>
<td>
<#if it.calcType ==0>指定日期<#elseif it.calcType ==1 >全部计算</#if>
</td>
<td>
<#if it.calcDate??>
${it.calcDate?string("yyyy-MM-dd")}</td>
</#if>
<td>
<#if it.status ==0>
<span class="label">初始状态</span>
<#elseif it.status == 1>
<span class="label label-info">正在处理</span>
<#elseif it.status == 2>
<span class="label label-success">处理完成</span>
<#elseif it.status == 3>
<span class="label label-important">处理异常</span>
</#if>
</td>
<td>
<#if it.priority ==0>
<span class="badge badge-success">0</span>
<#elseif it.priority == 1>
<span class="badge badge-warning">1</span>
<#elseif it.priority == 2>
<span class="badge badge-important">2</span>
</#if>
</td>
<td>${it.estateType!}</td>
<td>${it.category!}</td>
<td>${it.creationDate?string("yyyy-MM-dd HH:mm")}</td>
<td>${it.remark!}</td>
</tr>
</#list>
<tfoot>
<tr><td colspan="12">
<@d_pager action = "taskList" currentPage = pager.currentPage controller = "rentPriceUpdate" totalPages = pager.totalPages/>
</td></tr>
</tfoot>
</table>
</div>
<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="myModalLabel">警告</h3>
</div>
<div class="modal-body error">
<p>耗时操作,请谨慎操作!</p>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true" aria-hidden="true">关闭</button>
<button class="btn btn-primary" id="reComputeBtn">计算</button>
</div>
</div>
</body>
</html>
<script type="text/javascript">
function showSuccessMsg(msg){
jNotify(
msg,
{
autoHide : true,
clickOverlay : false,
MinWidth : 250,
TimeShown : 2000,
ShowTimeEffect : 1000,
HideTimeEffect : 1000,
LongTrip :20,
HorizontalPosition : 'right',
VerticalPosition : 'top',
ShowOverlay : true,
ColorOverlay : '#000',
OpacityOverlay : 0.3,
onClosed : function(){
},
onCompleted : function(){
}
});
}
$(function(){
});
</script>
</#compress>
@@ -11,7 +11,7 @@ import javax.persistence.Table;
import com.fangjia.dal.MongoEntity;
@Entity
@Table(name = "fangjia.sqmetre_rent")
@Table(name = "fangjia.sqmetre_rent_2")
public class SqmetreRent implements MongoEntity {
/**
@@ -22,18 +22,16 @@ public class SqmetreRent implements MongoEntity {
private String city;
private String region;
private String districtName;
private Double avgPrice;
private int markup;
private Integer avgPrice;
private Integer calcAvgPrice;
private Double markup;
private Date weekend;
private String cat;
private Date creationDate;
private Date modificationDate;
private String sampleEnum;
private double credit;
private String cluster;
private Double oldValue;
private String oldSampleEnum;
private Double credit;
private String valueType;
private Integer priceToRent;
@Id
@GeneratedValue
@@ -76,22 +74,47 @@ public class SqmetreRent implements MongoEntity {
}
@Column(name = "avg_price")
public Double getAvgPrice() {
public Integer getAvgPrice() {
return avgPrice;
}
public void setAvgPrice(Double avgPrice) {
public void setAvgPrice(Integer avgPrice) {
this.avgPrice = avgPrice;
}
@Column(name = "calc_avg_price")
public Integer getCalcAvgPrice() {
return calcAvgPrice;
}
public void setCalcAvgPrice(Integer calcAvgPrice) {
this.calcAvgPrice = calcAvgPrice;
}
@Column(name = "value_type")
public String getValueType() {
return valueType;
}
public void setValueType(String valueType) {
this.valueType = valueType;
}
@Column(name = "price_to_rent")
public Integer getPriceToRent() {
return priceToRent;
}
public void setPriceToRent(Integer priceToRent) {
this.priceToRent = priceToRent;
}
@Column(name = "markup")
public int getMarkup() {
public Double getMarkup() {
return markup;
}
public void setMarkup(int markup) {
public void setMarkup(Double markup) {
this.markup = markup;
}
@@ -123,52 +146,15 @@ public class SqmetreRent implements MongoEntity {
}
@Column(name = "sample_enum")
public String getSampleEnum() {
return sampleEnum;
}
public void setSampleEnum(String sampleEnum) {
this.sampleEnum = sampleEnum;
}
@Column(name = "credit")
public double getCredit() {
public Double getCredit() {
return credit;
}
public void setCredit(double credit) {
public void setCredit(Double credit) {
this.credit = credit;
}
@Column(name = "cluster")
public String getCluster() {
return cluster;
}
public void setCluster(String cluster) {
this.cluster = cluster;
}
@Column(name = "old_value")
public Double getOldValue() {
return oldValue;
}
public void setOldValue(Double oldValue) {
this.oldValue = oldValue;
}
@Column(name = "old_sample_enum")
public String getOldSampleEnum() {
return oldSampleEnum;
}
public void setOldSampleEnum(String oldSampleEnum) {
this.oldSampleEnum = oldSampleEnum;
}
@Column(name = "cat")
public String getCat() {
return cat;
@@ -1042,7 +1042,7 @@ public class EvaluationServiceImpl implements EvaluationService {
evaluation.setTotalPrice(((Number) (totalPrice)).intValue());
evaluation.setEvaluateWay(sqmetreRent.getSampleEnum());
evaluation.setEvaluateWay(sqmetreRent.getValueType());
evaluation.setCredit(sqmetreRent.getCredit());
}else{
evaluation.setTotalPrice(null);
@@ -4,6 +4,7 @@ import java.util.Date;
import java.util.List;
import java.util.Map;
import com.fangjia.dal.common.DistrictKey;
import com.fangjia.dal.mongo.model.SqmetreRent;
public interface SqmetreRentService {
@@ -28,4 +29,5 @@ public interface SqmetreRentService {
SqmetreRent findNearestSqmetreRent(String city, String region, String name, String cat);
List<SqmetreRent> findAllAvgPriceByKeys(DistrictKey districtKey, String cat);
}
@@ -5,6 +5,7 @@ import java.util.Date;
import java.util.List;
import java.util.Map;
import com.fangjia.dal.common.DistrictKey;
import org.apache.commons.lang.StringUtils;
import org.apache.http.impl.cookie.DateUtils;
@@ -216,6 +217,21 @@ public class SqmetreRentServiceImpl implements SqmetreRentService{
}
return sqmetreRent;
}
@Override
public List<SqmetreRent> findAllAvgPriceByKeys(DistrictKey key, String cat) {
List<QueryParam> params = new ArrayList<QueryParam>();
params.add(new QueryParam("city", key.getCity()));
if (StringUtils.isNotBlank(key.getRegion())) {
params.add(new QueryParam("region", key.getRegion()));
}
if (StringUtils.isNotBlank(key.getName())) {
params.add(new QueryParam("districtName", key.getName()));
}
params.add(new QueryParam("cat", cat));
List<SortParam> sortParams = new ArrayList<SortParam>();
sortParams.add(new SortParam("weekend", true));
return sqmetreRentDao.findAllByParams(params, sortParams,0,Integer.MAX_VALUE,
new String[]{"weekend", "credit", "cat", "avgPrice", "calcAvgPrice"});
}
}