Merge branch 'master' of http://gitlab.fangjia.com/dev0/main into script_gj

# Conflicts:
#	projects/fangjia-script/pom.xml
This commit is contained in:
2026-01-09 14:40:24 +08:00
97 changed files with 1673 additions and 193 deletions
@@ -28,12 +28,12 @@
<div class="right_content">
<div class="companyName">
<div>上海估家网络科技有限公司</div>
<div>咨询热线: <a>4001883787</a><br><span>(周一至周五 09:00-18:00)</span></div>
<div>咨询热线: <a>021-62393138</a><br><span>(周一至周五 09:00-18:00)</span></div>
</div>
<div class="companyInfo">
<div class="con1">
<p>上海总部</p>
<b>电&nbsp;&nbsp;话</b>: 4001883787(周一至周五 09:00-18:00)<br>
<b>电&nbsp;&nbsp;话</b>: 021-62393138(周一至周五 09:00-18:00)<br>
<b>邮&nbsp;&nbsp;箱</b>: <a href="mailto:gujia@fangjia.com">gujia@fangjia.com</a><br>
<b>地&nbsp;&nbsp;址</b>: 上海市长宁区协和路1033号文洋大厦B座10楼<br>
<b>邮&nbsp;&nbsp;编</b>: 200335<br><br>
@@ -63,7 +63,7 @@
</div>
<div class="content_right">
<span class="text1">免费体验请联系:</span>
<span class="text2">4001883787</span>
<span class="text2">021-62393138</span>
</div>
</div>
</div>
@@ -44,7 +44,7 @@
</form>
<button class="submit_btn" id="addressButton" type="button" style="margin-top:10px;">提交</button>
<p style="text-align:center;">您也可以直接联系商务,商务热线:4001883787</p>
<p style="text-align:center;">您也可以直接联系商务,商务热线:021-62393138</p>
</div>
</div>
@@ -61,7 +61,7 @@
<input type="button" id="filebutton" value="浏览">
</div>
<div class="group"><a class="download_btn">下载模板</a><a class="guideLink" href="<#if actionName=='fjindex'>fkdemo<#else>yxdemo</#if>"><img></a></div>
<span>单次免费批量分析100条上海地址数据,如需分析超过100条数据或测试其他城市请联系商务:4001883787</span>
<span>单次免费批量分析100条上海地址数据,如需分析超过100条数据或测试其他城市请联系商务:021-62393138</span>
<button class="submit_btn" type="button" onclick="fileChange($('#browsefile'));">提交</button>
</div>
</form>
@@ -72,7 +72,7 @@
<a ref="nofollow"><img src="${staticUrl}/images/wj110.png?v=${version}" height="47" border="0" /></a>
</p>
<p class="footer_text">
客服热线:4001883787 电子邮箱:gujia@fangjia.com
客服热线:021-62393138 电子邮箱:gujia@fangjia.com
<br />
©2006-${now?string("yyyy")} 估家网络 版权所有 <a href="http://www.shcaeg.gov.cn/main.action" target="_blank">沪B2-20130098</a>
<br/>
@@ -121,7 +121,7 @@
<div class="login_spread_title">信息提示<i class="close"></i></div>
<span></span>
<div class="login_spread_content">
您已免费测试/购买过接口,如需更多测试请联系商务:4001883787。
您已免费测试/购买过接口,如需更多测试请联系商务:021-62393138。
</div>
<span style="display: none" id="successMgs"></span>
</div>
@@ -86,7 +86,7 @@
<div class="login_spread_title">信息提示<i class="close"></i></div>
<span></span>
<div class="login_spread_content">
您已免费测试/购买过接口,如需更多测试请联系商务:4001883787。
您已免费测试/购买过接口,如需更多测试请联系商务:021-62393138。
</div>
<span style="display: none" id="successMgs"></span>
</div>
@@ -86,7 +86,7 @@
<div class="login_spread_title">信息提示<i class="close"></i></div>
<span></span>
<div class="login_spread_content">
您已免费测试/购买过接口,如需更多测试请联系商务:4001883787。
您已免费测试/购买过接口,如需更多测试请联系商务:021-62393138。
</div>
<span style="display: none" id="successMgs"></span>
</div>
@@ -84,7 +84,7 @@
<div class="login_spread_title">信息提示<i class="close"></i></div>
<span></span>
<div class="login_spread_content">
您已免费测试/购买过接口,如需更多测试请联系商务:4001883787。
您已免费测试/购买过接口,如需更多测试请联系商务:021-62393138。
</div>
<span style="display: none" id="successMgs"></span>
</div>
@@ -287,8 +287,8 @@
<a ref="nofollow" href="http://www.sgs.gov.cn/lz/licenseLink.do?method=licenceView&entyId=20120426105658696">
<div class="infoLeft"></div></a>
<div class="infoRight">
<span>前台总机:021-62393138</span><br>
<span>客服热线:4001883787</span><br>
<span>客服热线:021-62393138</span><br>
<#-- <span>客服热线:4001883787</span><br>-->
<a href="${cityUrl}/ershoufang">上海找房子</a><span>,</span><a href="${cityUrl}/gujia">估房价</a><span>,百度&nbsp;</span><a href="https://www.baidu.com">房价网</a><br>
<span>电子邮箱:gujia@fangjia.com</span>
</div>
@@ -86,7 +86,7 @@
<div class="login_spread_title">信息提示<i class="close"></i></div>
<span></span>
<div class="login_spread_content">
您已免费测试/购买过接口,如需更多测试请联系商务:4001883787。
您已免费测试/购买过接口,如需更多测试请联系商务:021-62393138。
</div>
<span style="display: none" id="successMgs"></span>
</div>
@@ -258,7 +258,7 @@
<a href="javascript:;" class="icon tel" title="客服电话"></a>
<div class="fixedNav01">
<i></i>
<p>400-188-3787</p>
<p>021-62393138</p>
<small>周一至周五 09:00-18:00</small>
<font></font>
</div>
@@ -40,7 +40,7 @@
1.<p>请立即登陆会员中心或注册新会员,否则将无法得到房豆及相应奖励</p><br/>
2.感谢您的参与,请耐心等待人工审核<br/>
3.在房价网会员中心的“用户中心”可查看任务审核进度、房豆数量<br/>
4.如有疑问,欢迎拨打客服热线4001883787
4.如有疑问,欢迎拨打客服热线021-62393138
</div>
</div>
</div>
@@ -140,7 +140,7 @@
<div class="index-box-small">
<div class="icon_bg"><div class="icon02"></div><label>业务咨询</label></div>
<div class="text">提供产品咨询与服务</div>
<div class="icon"><div class="icon03"></div><label>400 188 3787</label></div>
<div class="icon"><div class="icon03"></div><label>021-62393138</label></div>
<div class="text">(周一至周五 09:00-18:00)</div>
</div>
<div class="index-box-small">
@@ -159,7 +159,7 @@
<div class="index-box-small">
<div class="icon_bg"><div class="icon02"></div><label>业务咨询</label></div>
<div class="text">提供产品咨询与服务</div>
<div class="icon"><div class="icon03" style="width: 34px;height: 30px;"></div><label>400 188 3787</label></div>
<div class="icon"><div class="icon03" style="width: 34px;height: 30px;"></div><label>021-62393138</label></div>
<div class="text">(周一至周五 09:00-18:00)</div>
<div class="icon06" style="width: 100px;height: 100px;margin: 0 auto;"></div><label class="text_small">关注房价网公众微信号</label>
</div>
@@ -175,7 +175,7 @@
<div class="index-box-03 mobile01">
<div class="index-box-left">
<div class="icon_bg"><div class="icon08"></div><label>服务与合作</label></div>
<div class="text">地址:上海市静安区江宁路212号凯迪克大厦1709室</div>
<div class="text">地址:上海市长宁区金钟路658弄10号201-202室</div>
<div class="text">邮箱:gujia@fangjia.com</div>
<div class="text">邮编:200003</div>
</div>
@@ -37,7 +37,7 @@
<span>手&emsp;&emsp;机:</span>
<input type="text" name="failMobile" id="failMobile" />
</div>
<div class="line3">或直接拨打客服热线:4001883787</div>
<div class="line3">或直接拨打客服热线:021-62393138</div>
<div class="line4">(服务时间:周一至周五9:00-18:00)</div>
<div class="line5">
<a class="prev" id="__prev">上一步</a><a class="next" id="__next">提&emsp;交</a>
@@ -125,7 +125,7 @@
<a id="_sqSubmit">提&emsp;交</a>
</div>
<div class="line3">
申请提交后该机构客户经理会在24小时内主动联系您,请耐心等待。<br/>如有疑问请拨打客服热线:4001883787
申请提交后该机构客户经理会在24小时内主动联系您,请耐心等待。<br/>如有疑问请拨打客服热线:021-62393138
</div>
</div>
</div>
@@ -195,7 +195,7 @@ $(document).ready(function(){
function(data){
data = eval("(" + data + ")");
if(data.msg == 'OK') {
showAlert("感谢您的申请,该机构客户经理会尽快联系您,谢谢!<br/>客服热线:4001883787");
showAlert("感谢您的申请,该机构客户经理会尽快联系您,谢谢!<br/>客服热线:021-62393138");
$("#_sqForm").hide();
}else{
showAlert(data.msg);
@@ -85,7 +85,7 @@
</p>
<div class="footer_in por">
客服热线:4001883787 电子邮箱:gujia@fangjia.com
客服热线:021-62393138 电子邮箱:gujia@fangjia.com
<br />
©2006-${now?string("yyyy")} 房价网 版权所有 沪ICP备10203734号-1
</div>
@@ -65,7 +65,7 @@
<a class="user_btn" id="smslogin">登录</a>
<div class="line"><span>或</span></div>
<p class="link">新用户<a href="${wwwUrl}/user/register">注册</a></p>
<p class="note">如果您不是通过手机注册的用户,请直接致电客服找回密码<br>客服热线:4001883787</p>
<p class="note">如果您不是通过手机注册的用户,请直接致电客服找回密码<br>客服热线:021-62393138</p>
</div>
</div>
</div>
@@ -60,7 +60,7 @@
<img src="${staticUrl}/images/success01.png">
<p>您的申请已提交</p>
<p>稍后会有工作人员和您联系,请耐心等待!</p>
<p class="link">或是您可拨贷款咨询热线 <a>400-188-3787</a></p>
<p class="link">或是您可拨贷款咨询热线 <a>021-62393138</a></p>
<a class="user_btn confirm_btn" id="loan_sub">确认</a>
</div>
</div>
@@ -280,7 +280,7 @@
<div class="errBox01_content">
<div class="user">
<div class="content">
<p>如有商务合作需求,请填写您的信息,我们的客服人员会尽快与您取得联系。您也可以拨打<em>400-188-3787</em>(周一至周五9:00-18:00)与我们联系。</p>
<p>如有商务合作需求,请填写您的信息,我们的客服人员会尽快与您取得联系。您也可以拨打<em>021-62393138</em>(周一至周五9:00-18:00)与我们联系。</p>
<a class="user_btn login_btn" onclick="goApplyPage()" target="_blank">前往填写</a>
</div>
</div>
@@ -70,7 +70,7 @@
<a ref="nofollow"><img src="${staticUrl}/images/wj110.png?v=${version}" height="47" border="0" /></a>
</p>
<p class="footer_text">
客服热线:4001883787 电子邮箱:gujia@fangjia.com
客服热线:021-62393138 电子邮箱:gujia@fangjia.com
<br />
©2006-${now?string("yyyy")} 估家网络 版权所有 <a href="http://www.miitbeian.gov.cn/" target="_blank">沪ICP备10203734号-1</a>
<br/>
@@ -63,7 +63,7 @@
<p class="footer_text">
图片来源于网络,版权属于作者,请勿用于商业用途。<br/>
客服热线:4001883787 电子邮箱:gujia@fangjia.com
客服热线:021-62393138 电子邮箱:gujia@fangjia.com
<br />
©2006-${now?string("yyyy")} 估家网络 版权所有 <a href="http://www.shcaeg.gov.cn/main.action" target="_blank">沪B2-20130098</a>
<br/>
@@ -18,8 +18,8 @@
<a ref="nofollow" href="http://www.sgs.gov.cn/lz/licenseLink.do?method=licenceView&entyId=20120426105658696">
<div class="infoLeft"></div></a>
<div class="infoRight">
<span>前台总机:021-62393138</span><br>
<span>客服热线:4001883787</span><br>
<span>客服热线:021-62393138</span><br>
<#-- <span>客服热线:4001883787</span><br>-->
<a href="${_currentCityUrl}/ershoufang/">上海找房子</a><span>,</span><a href="${_currentCityUrl}/gujia/">估房价</a><span>,百度&nbsp;</span><a href="http://www.baidu.com/s?wd=%B7%BF%BC%DB%CD%F8">房价网</a><br>
<span>电子邮箱:gujia@fangjia.com</span>
</div>
@@ -18,8 +18,8 @@
<a ref="nofollow" href="http://www.sgs.gov.cn/lz/licenseLink.do?method=licenceView&entyId=20120426105658696">
<div class="infoLeft"></div></a>
<div class="infoRight">
<span>前台总机:021-62393138</span><br>
<span>客服热线:4001883787</span><br>
<#-- <span>前台总机:021-62393138</span><br>-->
<span>客服热线:021-62393138</span><br>
<a href="${_currentCityUrl}/ershoufang/">上海找房子</a><span>,</span><a href="${_currentCityUrl}/gujia/">估房价</a><span>,百度&nbsp;</span><a href="http://www.baidu.com/s?wd=%B7%BF%BC%DB%CD%F8">房价网</a><br>
<span>电子邮箱:gujia@fangjia.com</span>
</div>
@@ -193,7 +193,7 @@
<div class="d3">
请您填入准确信息,以便估价师能及时联络到您。<br/>
点击发送后,估价师将在24小时内主动联络您,请耐心等待,谢谢!<br/><br/>
客服热线:4001883787 (工作日9:00-18:00)
客服热线:021-62393138 (工作日9:00-18:00)
</div>
</div>
</div>
@@ -51,7 +51,7 @@
<li><a href="${_currentCityUrl}/about/" <#if controllerName == 'about'||(controllerName=='advisoryMore'&&resPage??&&resPage==2)>class="current"</#if>>关于我们</a></li>
</ul>
<ul class="hotline">
<li><a>咨询热线:<label>400-188-3787</label></a></li>
<li><a>咨询热线:<label>021-62393138</label></a></li>
</ul>
</div>
</div>
@@ -70,7 +70,7 @@
<a href="javascript:;" class="icon tel"></a>
<div class="fixedNav01">
<i></i>
<p>400-188-3787</p>
<p>021-62393138</p>
<small>周一至周五 09:00-18:00</small>
<font></font>
</div>
@@ -198,7 +198,7 @@
<a ref="nofollow" href="#"><img src="${staticUrl}/images/wlzx.png?v=${version}" height="47" border="0" /></a>
<a ref="nofollow" href="#"><img src="${staticUrl}/images/wj110.png?v=${version}" height="47" border="0" /></a>
</p>
<p class="copyrights">客服热线:4001883787 电子邮箱:gujia@fangjia.com<br />
<p class="copyrights">客服热线:021-62393138 电子邮箱:gujia@fangjia.com<br />
&copy;2006-${now?string("yyyy")} 房价网 版权所有 沪ICP备10203734号-1<br/>
<a class="grey9c" target="_blank" href="<@d_url schema="${citySchema}" uri="/sellHouseSearch/list" />"><#if (!serverAreaMap?exists && actionName == 'index')>${cityName}</#if>找房子</a>,<a class="grey9c" target="_blank" href="<@d_url uri="/evaluation/report" schema="${cityDomain}" />">估房价</a>,百度 <a class="grey9c" target="_blank" href="http://www.baidu.com/s?wd=%B7%BF%BC%DB%CD%F8">房价网</a>
</p>
@@ -46,7 +46,7 @@
</ul>
</div>
<div class="footer_right">
<p><b>400-188-3787</b></p>
<p><b>021-62393138</b></p>
<div>
<a class="wx" title="微信"><img src="${imgUrl}/images/fangjia/v5/footer_icon01.png" class="footer_icon01"><img src="${imgUrl}/images/fangjia/v5/wx.png" class="wxImg"></a>
<a href="http://weibo.com/fangjiawang" title="微博" target="_blank" rel="nofollow"><img src="${imgUrl}/images/fangjia/v5/footer_icon02.png" class="footer_icon02"></a>
@@ -66,7 +66,7 @@
<div class="footerM dn">
<div>
<div class="footer_top">
<p><b>400-188-3787</b></p>
<p><b>021-62393138</b></p>
</div>
<div class="footer_center01">
<div>
@@ -108,7 +108,7 @@
</a>
</div>
<div class="newfooter-li">
<a href="tel:4001883787" class="fu-btn" id="app-mobile-click">
<a href="tel:02162393138" class="fu-btn" id="app-mobile-click">
电话咨询
</a>
</div>
@@ -43,7 +43,7 @@
</ul>
</div>
<div class="footer_right">
<p><b>400-188-3787</b></p>
<p><b>021-62393138</b></p>
<div>
<a class="wx" title="微信"><img src="${imgUrl}/images/fangjia/v5/footer_icon01.png" class="footer_icon01"><img src="${imgUrl}/images/fangjia/v5/wx.png" class="wxImg"></a>
<a href="http://weibo.com/fangjiawang" title="微博" target="_blank" rel="nofollow"><img src="${imgUrl}/images/fangjia/v5/footer_icon02.png" class="footer_icon02"></a>
@@ -63,7 +63,7 @@
<div class="footerM dn">
<div>
<div class="footer_top">
<p><b>400-188-3787</b></p>
<p><b>021-62393138</b></p>
</div>
<div class="footer_center01">
<div>
@@ -10,7 +10,7 @@
<a href="javascript:;" class="icon tel" title="客服电话"></a>
<div class="fixedNav01">
<i></i>
<p>400-188-3787</p>
<p>021-62393138</p>
<small>周一至周五 09:00-18:00</small>
<font></font>
</div>
@@ -1443,7 +1443,7 @@
</ul>
</div>
<div class="footer_right">
<p><b>400-188-3787</b></p>
<p><b>021-62393138</b></p>
<div>
<a class="wx" title="微信"><i class="footer_icon01"></i><img src="images/wx.png"></a>
<a href="http://weibo.com/fangjiawang" title="微博" target="_blank" rel="nofollow"><i class="footer_icon02"></i></a>
@@ -1464,13 +1464,13 @@
<a href="javascript:scroll(0,0)" class="icon top" title="返回顶部"></a>
</li>
<li>
<a href="http://wpa.qq.com/msgrd?V=1&Uin=4001883787" class="icon qq" title="QQ联系"></a>
<a href="http://wpa.qq.com/msgrd?V=1&Uin=02162393138" class="icon qq" title="QQ联系"></a>
</li>
<li>
<a href="javascript:;" class="icon tel" title="客服电话"></a>
<div class="fixedNav01">
<i></i>
<p>400-188-3787</p>
<p>021-62393138</p>
<small>周一至周五 09:00-18:00</small>
<font></font>
</div>
@@ -43,7 +43,7 @@
</ul>
</div>
<div class="footer_right">
<p><b>400-188-3787</b></p>
<p><b>021-62393138</b></p>
<div>
<a class="wx" title="微信"><img src="${imgUrl}/images/fangjia/v5/footer_icon01.png" class="footer_icon01"><img src="${imgUrl}/images/fangjia/v5/wx.png" class="wxImg"></a>
<a href="http://weibo.com/fangjiawang" title="微博" target="_blank" rel="nofollow"><img src="${imgUrl}/images/fangjia/v5/footer_icon02.png" class="footer_icon02"></a>
@@ -63,7 +63,7 @@
<div class="footerM dn">
<div>
<div class="footer_top">
<p><b>400-188-3787</b></p>
<p><b>021-62393138</b></p>
</div>
<div class="footer_center01">
<div>
@@ -43,7 +43,7 @@
</ul>
</div>
<div class="footer_right">
<p><b>400-188-3787</b></p>
<p><b>021-62393138</b></p>
<div>
<a class="wx" title="微信"><img src="${imgUrl}/images/fangjia/v5/footer_icon01.png" class="footer_icon01"><img src="${imgUrl}/images/fangjia/v5/wx.png" class="wxImg"></a>
<a href="http://weibo.com/fangjiawang" title="微博" target="_blank" rel="nofollow"><img src="${imgUrl}/images/fangjia/v5/footer_icon02.png" class="footer_icon02"></a>
@@ -20,7 +20,7 @@
<i class="footer_icon1"></i>
<div style="margin-top: -50px;">
<span>服务咨询热线</span>
<span style="color: #41AAAA;font-size: 24px;">400-188-3787</span>
<span style="color: #41AAAA;font-size: 24px;">021-62393138</span>
</div>
</div>
</div>
@@ -237,7 +237,7 @@
<li class="wx-footer">
<center>
<p class="p1">服务咨询热线</p>
<p class="p2">400-188-3787</p>
<p class="p2">021-62393138</p>
<img src="${imgUrl}/images/fangjia/v6/mb/wx.jpg" width="100px">
<p class="p3">
<i class="icon1"></i><span class="sp1">友情链接</span><i class="icon2"></i><i class="icon3"></i>
@@ -8,7 +8,7 @@
<a href="javascript:;" class="icon tel" title="客服电话"></a>
<div class="fixedNav01">
<i></i>
<p>400-188-3787</p>
<p>021-62393138</p>
<small>周一至周五 09:00-18:00</small>
<font></font>
</div>
@@ -32,7 +32,7 @@
<div class="fl">
<div class="mb20">
<strong>广告后台及网站操作事宜,请联系:</strong>
<p class="mt10">客服热线:4001883787<br>周一至周五(法定假日除外)<br>09:00-12:00<br>13:00-18:00</p>
<p class="mt10">客服热线:021-62393138<br>周一至周五(法定假日除外)<br>09:00-12:00<br>13:00-18:00</p>
</div>
<div class="mb20">
<strong>网站合作事宜,请联系:</strong>
@@ -65,7 +65,7 @@
请把您的姓名、网站名称、网址、链接方式、链接地址等信息发给我们,我们会尽快与您联系。<br />
Email:<a href="mailto:link@fangjia.com">link@fangjia.com</a><br/>
友情链接合作请联系QQ:1967419612(上海站) 1909341170(北京站) 2358839349(深圳站) 1838892913(广州站) <br/>
Tel:4001883787<br/>
Tel:021-62393138<br/>
</div><!--rig_foot结束-->
</div>
</div><!--rig结束-->
@@ -117,7 +117,7 @@
</div>
<div class="adBox adBox01" style="padding-top: 60px;">
<p><small>如想了解详情,请致电 <b style="font-size: 18px;color: yellow;">400-188-3787</b> 联系我们,或者留下您的联系方式和需求,我们会第一时间联系您。</small></p>
<p><small>如想了解详情,请致电 <b style="font-size: 18px;color: yellow;">021-62393138</b> 联系我们,或者留下您的联系方式和需求,我们会第一时间联系您。</small></p>
<a class="link_btn link01_btn" data_id="1006" cat="solution">立即咨询</a>
</div>
@@ -151,7 +151,7 @@
</div>
<div class="adBox adBox01" style="padding-top: 60px;">
<p><small>如想了解详情,请致电 <b style="font-size: 18px;color: yellow;">400-188-3787</b> 联系我们,或者留下您的联系方式和需求,我们会第一时间联系您。</small></p>
<p><small>如想了解详情,请致电 <b style="font-size: 18px;color: yellow;">021-62393138</b> 联系我们,或者留下您的联系方式和需求,我们会第一时间联系您。</small></p>
<a class="link_btn link01_btn" data_id="1033" cat="solution">立即咨询</a>
</div>
@@ -131,7 +131,7 @@
</div>
<div class="adBox adBox01" style="padding-top: 60px;">
<p><small>如想了解详情,请致电 <b style="font-size: 18px;color: yellow;">400-188-3787</b> 联系我们,或者留下您的联系方式和需求,我们会第一时间联系您。</small></p>
<p><small>如想了解详情,请致电 <b style="font-size: 18px;color: yellow;">021-62393138</b> 联系我们,或者留下您的联系方式和需求,我们会第一时间联系您。</small></p>
<a class="link_btn link01_btn" data_id="1029" cat="solution">立即咨询</a>
</div>
@@ -33,7 +33,7 @@
<div class="content">
<p class="success"><i></i>您的贷款申请已提交成功</p>
<p class="link" style="color:#333;">我们的贷款专员将会尽快与您取得联系,感谢您的申请!</p>
<p class="note">若您有任何问题,欢迎拨打客服电话:<a>400-188-3787</a></p>
<p class="note">若您有任何问题,欢迎拨打客服电话:<a>021-62393138</a></p>
</div>
</div>
</div>
@@ -52,7 +52,7 @@
<div class="content">
<p class="success"><i></i>您的信息已提交成功</p>
<p class="link" style="color:#333;">我们的专业数据顾问将会尽快与您取得联系,感谢您的咨询!</p>
<p class="note">若您有任何问题,欢迎拨打客服电话:<a>400-188-3787</a></p>
<p class="note">若您有任何问题,欢迎拨打客服电话:<a>021-62393138</a></p>
</div>
</div>
</div>
@@ -99,8 +99,8 @@
<a ref="nofollow" href="http://www.sgs.gov.cn/lz/licenseLink.do?method=licenceView&entyId=20120426105658696">
<div class="infoLeft"></div></a>
<div class="infoRight">
<span>前台总机:021-62393138</span><br>
<span>客服热线:4001883787</span><br>
<#-- <span>前台总机:021-62393138</span><br>-->
<span>客服热线:021-62393138</span><br>
<a href="${cityUrl}/ershoufang">上海找房子</a><span>,</span><a href="${cityUrl}/gujia">估房价</a><span>,百度&nbsp;</span><a href="https://www.baidu.com">房价网</a><br>
<span>电子邮箱:gujia@fangjia.com</span>
</div>
@@ -94,8 +94,8 @@
<a ref="nofollow" href="http://www.sgs.gov.cn/lz/licenseLink.do?method=licenceView&entyId=20120426105658696">
<div class="infoLeft"></div></a>
<div class="infoRight">
<span>前台总机:021-62393138</span><br>
<span>客服热线:4001883787</span><br>
<#-- <span>前台总机:021-62393138</span><br>-->
<span>客服热线:021-62393138</span><br>
<a href="${cityUrl}/ershoufang">上海找房子</a><span>,</span><a href="${cityUrl}/gujia">估房价</a><span>,百度&nbsp;</span><a href="https://www.baidu.com">房价网</a><br>
<span>电子邮箱:gujia@fangjia.com</span>
</div>
@@ -108,8 +108,8 @@
<a ref="nofollow" href="http://www.sgs.gov.cn/lz/licenseLink.do?method=licenceView&entyId=20120426105658696">
<div class="infoLeft"></div></a>
<div class="infoRight">
<span>前台总机:021-62393138</span><br>
<span>客服热线:4001883787</span><br>
<#-- <span>前台总机:021-62393138</span><br>-->
<span>客服热线:021-62393138</span><br>
<a href="${cityUrl}/ershoufang">上海找房子</a><span>,</span><a href="${cityUrl}/gujia">估房价</a><span>,百度&nbsp;</span><a href="https://www.baidu.com">房价网</a><br>
<span>电子邮箱:gujia@fangjia.com</span>
</div>
@@ -114,8 +114,8 @@
<a ref="nofollow" href="http://www.sgs.gov.cn/lz/licenseLink.do?method=licenceView&entyId=20120426105658696">
<div class="infoLeft"></div></a>
<div class="infoRight">
<span>前台总机:021-62393138</span><br>
<span>客服热线:4001883787</span><br>
<#-- <span>前台总机:021-62393138</span><br>-->
<span>客服热线:021-62393138</span><br>
<a href="${cityUrl}/ershoufang">上海找房子</a><span>,</span><a href="${cityUrl}/gujia">估房价</a><span>,百度&nbsp;</span><a href="https://www.baidu.com">房价网</a><br>
<span>电子邮箱:gujia@fangjia.com</span>
</div>
@@ -352,7 +352,7 @@
});
var yeTab = "<div id='__balance_banks' class='payWay_spread dn'><div class='inputInfo'><div class='inputInfoa'><label style='font-size:20px;'>当前余额:<em style='font-size:26px;vertical-align:-2px;'>${amount!'0.00'}</em>&nbsp;元</label>" +
"</div><div class='inputInfoa'><label><i></i>支付密码:</label><input class='input_name' type='password' id='pay_pwd' autocomplete='off' placeholder='请输入支付密码'><div class='error'></div></div>" +
"<div class='inputInfoa'><label><i></i>手机号码:</label><input class='input_company' type='text' id='pay_phone' autocomplete='off' placeholder='请输入手机号码'><div class='error'></div><button class='sendCode' id='sendCode'>发送验证码</button></div><div class='inputInfoa'><label><i></i><a class='ls3_01'>验证</a><a class='ls3_02'>码</a>:</label><input class='input_code' type='text' id='pay_auth_code' autocomplete='off' placeholder='请输入验证码'><a class='waiting dn'>48&nbsp;s</a><div class='error' id='auth-error'></div></div><a class='confirm_btn' id='btn_buy_confirm' href=''>确认支付</a><span style='margin-left:43px;'>忘记密码/修改密码,请致电客服:4001883787</span></div></div>";
"<div class='inputInfoa'><label><i></i>手机号码:</label><input class='input_company' type='text' id='pay_phone' autocomplete='off' placeholder='请输入手机号码'><div class='error'></div><button class='sendCode' id='sendCode'>发送验证码</button></div><div class='inputInfoa'><label><i></i><a class='ls3_01'>验证</a><a class='ls3_02'>码</a>:</label><input class='input_code' type='text' id='pay_auth_code' autocomplete='off' placeholder='请输入验证码'><a class='waiting dn'>48&nbsp;s</a><div class='error' id='auth-error'></div></div><a class='confirm_btn' id='btn_buy_confirm' href=''>确认支付</a><span style='margin-left:43px;'>忘记密码/修改密码,请致电客服:021-62393138</span></div></div>";
var yebzTab = "<div id='__balance_banks' class='payWay01_spread dn'><p>需支付<span id='totalCost'>0</span>元,当前账户余额不足,请先充值或选择其他付款方式</p><a class='confirm_btn' id='btn_comfirm_ye'>确定</a></div>";
$("#btn_buy_submit").bind("click", function(){
@@ -98,8 +98,8 @@
<a ref="nofollow" href="http://www.sgs.gov.cn/lz/licenseLink.do?method=licenceView&entyId=20120426105658696">
<div class="infoLeft"></div></a>
<div class="infoRight">
<span>前台总机:021-62393138</span><br>
<span>客服热线:4001883787</span><br>
<#-- <span>前台总机:021-62393138</span><br>-->
<span>客服热线:021-62393138</span><br>
<a href="${cityUrl}/ershoufang">上海找房子</a><span>,</span><a href="${cityUrl}/gujia">估房价</a><span>,百度&nbsp;</span><a href="https://www.baidu.com">房价网</a><br>
<span>电子邮箱:gujia@fangjia.com</span>
</div>
@@ -80,8 +80,8 @@
<a ref="nofollow" href="http://www.sgs.gov.cn/lz/licenseLink.do?method=licenceView&entyId=20120426105658696">
<div class="infoLeft"></div></a>
<div class="infoRight">
<span>前台总机:021-62393138</span><br>
<span>客服热线:4001883787</span><br>
<span>客服热线:021-62393138</span><br>
<#-- <span>客服热线:4001883787</span><br>-->
<a href="${cityUrl}/ershoufang">上海找房子</a><span>,</span><a href="${cityUrl}/gujia">估房价</a><span>,百度&nbsp;</span><a href="https://www.baidu.com">房价网</a><br>
<span>电子邮箱:gujia@fangjia.com</span>
</div>
@@ -81,8 +81,8 @@
<a ref="nofollow" href="http://www.sgs.gov.cn/lz/licenseLink.do?method=licenceView&entyId=20120426105658696">
<div class="infoLeft"></div></a>
<div class="infoRight">
<span>前台总机:021-62393138</span><br>
<span>客服热线:4001883787</span><br>
<#-- <span>前台总机:021-62393138</span><br>-->
<span>客服热线:021-62393138</span><br>
<a href="${cityUrl}/ershoufang">上海找房子</a><span>,</span><a href="${cityUrl}/gujia">估房价</a><span>,百度&nbsp;</span><a href="https://www.baidu.com">房价网</a><br>
<span>电子邮箱:gujia@fangjia.com</span>
</div>
@@ -426,7 +426,7 @@
<div class="adBox adBox01" style="padding-top: 60px;">
<p><small>如想了解详情,请致电 <b style="font-size: 18px;color: yellow;">400-188-3787</b> 联系我们,或者留下您的联系方式和需求,我们会第一时间联系您。</small></p>
<p><small>如想了解详情,请致电 <b style="font-size: 18px;color: yellow;">021-62393138</b> 联系我们,或者留下您的联系方式和需求,我们会第一时间联系您。</small></p>
<a class="link_btn link01_btn" data_id="1028" cat="solution">立即咨询</a>
</div>
@@ -93,7 +93,7 @@
<div style="text-align:left; margin-left: 3rem">&radic; 详尽的产品功能及服务介绍</div>
<div style="text-align:left; margin-left: 3rem">&radic; 针对您所处的行业与业务场景,提供专业的服务方案<br/></div>
<div style="text-align:left; margin-left: 3rem">&radic; 根据您的业务规模和需求,提供优惠的价格方案<br/></div>
<div style="text-align:left; margin-left: 3rem">紧急咨询可拨打<strong>400-188-3787</strong><br/></div>
<div style="text-align:left; margin-left: 3rem">紧急咨询可拨打<strong>021-62393138</strong><br/></div>
<div style="text-align:left; margin-left: 3rem">预约申请请留下您的联系方式,我们会尽快与您联系<br/></div>
</div>
<div class="content content03">
@@ -52,7 +52,7 @@
<div class="content">
<p class="success"><i></i>您的信息已提交成功</p>
<p class="link" style="color:#333;">我们的专业数据顾问将会尽快与您取得联系,感谢您的咨询!</p>
<p class="note">若您有任何问题,欢迎拨打客服电话:<a>400-188-3787</a></p>
<p class="note">若您有任何问题,欢迎拨打客服电话:<a>021-62393138</a></p>
</div>
</div>
</div>
@@ -52,7 +52,7 @@
<div class="content">
<p class="success"><i></i>您的信息已提交成功</p>
<p class="link" style="color:#333;">我们的专业数据顾问将会尽快与您取得联系,感谢您的咨询!</p>
<p class="note">若您有任何问题,欢迎拨打客服电话:<a>400-188-3787</a></p>
<p class="note">若您有任何问题,欢迎拨打客服电话:<a>021-62393138</a></p>
</div>
</div>
</div>
@@ -78,7 +78,7 @@
<div class="adBox adBox01" style="padding-top: 60px;">
<p><small>如想了解详情,请致电 <b style="font-size: 18px;color: yellow;">400-188-3787</b> 联系我们,或者留下您的联系方式和需求,我们会第一时间联系您。</small></p>
<p><small>如想了解详情,请致电 <b style="font-size: 18px;color: yellow;">021-62393138</b> 联系我们,或者留下您的联系方式和需求,我们会第一时间联系您。</small></p>
<a class="link_btn link01_btn" data_id="1031" cat="solution">立即咨询</a>
</div>
@@ -154,12 +154,12 @@
</div>
<div class="adBox adBox01 mobile01" style="padding-top: 60px;">
<p><small>如想了解详情,请致电 <b style="font-size: 18px;color: yellow;">400-188-3787</b> 联系我们,或者留下您的联系方式和需求,我们会第一时间联系您。</small></p>
<p><small>如想了解详情,请致电 <b style="font-size: 18px;color: yellow;">021-62393138</b> 联系我们,或者留下您的联系方式和需求,我们会第一时间联系您。</small></p>
<a class="link_btn link01_btn" data_id="1006" cat="solution">立即咨询</a>
</div>
<div class="adBox adBox01 mobile02" style="padding-top: 60px;">
<p><small>如想了解详情,请致电 <b style="font-size: 18px;color: yellow;">400-188-3787</b> 联系我们,或者留下您的联系方式和需求,我们会第一时间联系您。</small></p>
<p><small>如想了解详情,请致电 <b style="font-size: 18px;color: yellow;">021-62393138</b> 联系我们,或者留下您的联系方式和需求,我们会第一时间联系您。</small></p>
<a class="link_btn link01_btn" data_id="1006" cat="solution">立即咨询</a>
</div>
@@ -77,7 +77,7 @@
<div class="adBox adBox01" style="padding-top: 60px;">
<p><small>如想了解详情,请致电 <b style="font-size: 18px;color: yellow;">400-188-3787</b> 联系我们,或者留下您的联系方式和需求,我们会第一时间联系您。</small></p>
<p><small>如想了解详情,请致电 <b style="font-size: 18px;color: yellow;">021-62393138</b> 联系我们,或者留下您的联系方式和需求,我们会第一时间联系您。</small></p>
<a class="link_btn link01_btn" data_id="1032" cat="solution">立即咨询</a>
</div>
@@ -157,12 +157,12 @@
<div class="adBox adBox01 mobile01">
<p style="margin-top: -10px"><label>法拍房数据解决方案</label></p>
<p><small>如想获取您所关注城市的法拍房市场分析报告,或者查询任一楼盘的法拍成交折扣率,请致电&nbsp;&nbsp;<b style="font-size: 18px;color: yellow;">400-188-3787</b>&nbsp;&nbsp;联系我们,或者留下您的联系方式和需求,我们会第一时间联系您。</small></p>
<p><small>如想获取您所关注城市的法拍房市场分析报告,或者查询任一楼盘的法拍成交折扣率,请致电&nbsp;&nbsp;<b style="font-size: 18px;color: yellow;">021-62393138</b>&nbsp;&nbsp;联系我们,或者留下您的联系方式和需求,我们会第一时间联系您。</small></p>
<a class="link_btn link01_btn" data_id="1023" cat="solution" >立即体验</a>
</div>
<div class="adBox adBox01 mobile02">
<p><label>法拍房数据解决方案</label></p>
<p><small>如想获取您所关注城市的法拍房市场分析报告,或者查询任一楼盘的法拍成交折扣率,请致电<label>400-188-3787</label>联系我们,或者留下您的联系方式和需求,我们会第一时间联系您。</small></p>
<p><small>如想获取您所关注城市的法拍房市场分析报告,或者查询任一楼盘的法拍成交折扣率,请致电<label>021-62393138</label>联系我们,或者留下您的联系方式和需求,我们会第一时间联系您。</small></p>
<a class="link_btn link01_btn" data_id="1023" cat="solution">立即体验</a>
</div>
@@ -152,7 +152,7 @@
<a class="login_user_btn" id="smslogin">登录</a>
<div class="line" style="width: 586px;"><span>或</span></div>
<p class="link">新用户<a href="${wwwUrl}/user/register">注册</a></p>
<p class="note">如果您不是通过手机注册的用户,请直接致电客服找回密码<br>客服热线:4001883787</p>
<p class="note">如果您不是通过手机注册的用户,请直接致电客服找回密码<br>客服热线:021-62393138</p>
</div>
</div>
</div>
@@ -66,7 +66,7 @@
<a class="user_btn" id="smslogin">登录</a>
<div class="line"><span>或</span></div>
<p class="link">新用户<a href="${wwwUrl}/user/register">注册</a></p>
<p class="note">如果您不是通过手机注册的用户,请直接致电客服找回密码<br>客服热线:4001883787</p>
<p class="note">如果您不是通过手机注册的用户,请直接致电客服找回密码<br>客服热线:021-62393138</p>
</div>
</div>
</div>
@@ -127,7 +127,7 @@
<a class="login_user_btn confirm_btn" >完成</a>
<div class="line"><span>或</span></div>
<p class="link">想起密码请直接<a href="${wwwUrl}/user/login">登录</a></p>
<p class="note">如果您为非手机注册用户、海外用户或当前手机不用/丢失,<br>请致电客服:4001883787</p>
<p class="note">如果您为非手机注册用户、海外用户或当前手机不用/丢失,<br>请致电客服:021-62393138</p>
</div>
</div>
</div>
@@ -51,7 +51,7 @@
<div class="content">
<p class="success"><i></i>感谢您的注册</p>
<p class="link" style="color:#333;">希望房价网能为您带来最佳使用体验</p>
<p class="note">若您有任何问题,欢迎拨打客服电话:<a>400-188-3787</a></p>
<p class="note">若您有任何问题,欢迎拨打客服电话:<a>021-62393138</a></p>
</div>
</div>
</div>
@@ -146,7 +146,7 @@
<a class="login_user_btn confirm_btn">注册</a>
<div class="line" style="width: 586px;"><span>或</span></div>
<p class="link">已有账户?请直接<a href="${wwwUrl}/user/login">登录</a></p>
<p class="note">若有任何问题,请致电客服:400-188-3787</p>
<p class="note">若有任何问题,请致电客服:021-62393138</p>
</div>
</div>
</div>
@@ -121,7 +121,7 @@
<!-- <button class="login_btn_before bind_btn_before" type="button">确认</button>-->
<button class="login_btn bind_btn" type="button">确认</button>
<span style="margin-top:14px;display:block;color:#666;font-size:12px;">手机绑定成功后,您可通过手机号码与原账号密码登录</span>
<span style="display:block;color:#666;font-size:12px;">海外用户请致电客服:4001883787</span>
<span style="display:block;color:#666;font-size:12px;">海外用户请致电客服:021-62393138</span>
</div>
@@ -157,7 +157,7 @@
<button class="login_btn smslogin_btn" type="button" id="smslogin">登录</button>
<a class="return" onclick="history.go(-1)" style="left:50px;bottom:60px;">返回</a>
<a class="newUser" href="${cityUrl}/user/reqUserRegPage" style="font-size:16px;color:#007fc5;line-height:32px;margin-left:14px;*margin-left:10px;">新用户注册</a>
<span style="margin-top:60px;display:block;color:#666;font-size:12px;">如果您不是通过手机注册的用户,请直接致电客服找回密码<br>客服热线:4001883787</span>
<span style="margin-top:60px;display:block;color:#666;font-size:12px;">如果您不是通过手机注册的用户,请直接致电客服找回密码<br>客服热线:021-62393138</span>
</div>
</div>
<div class="footer_vip">
@@ -176,8 +176,8 @@
<a ref="nofollow" href="http://www.sgs.gov.cn/lz/licenseLink.do?method=licenceView&entyId=20120426105658696">
<div class="infoLeft"></div></a>
<div class="infoRight">
<span>前台总机:021-62393138</span><br>
<span>客服热线:4001883787</span><br>
<#-- <span>前台总机:021-62393138</span><br>-->
<span>客服热线:021-62393138</span><br>
<a href="${cityUrl}/ershoufang">上海找房子</a><span>,</span><a href="${cityUrl}/gujia">估房价</a><span>,百度&nbsp;</span><a href="https://www.baidu.com">房价网</a><br>
<span>电子邮箱:gujia@fangjia.com</span>
</div>
@@ -83,7 +83,7 @@
<!-- <button class="register_btn_before " type="button">注册</button>-->
<button class="register_btn" type="button" id="registerButton">注册</button>
<span style="margin-top:6px;margin-left:80px;text-align:center;display:block;">已有账户?请直接<a style="color:#007fc5;" href="${cityUrl}/user/reqUserLoginPage">登录</a></span>
<span style="margin-left:80px;text-align:center;display:block;color:#666;font-size:12px;">海外用户请致电客服:4001883787</span>
<span style="margin-left:80px;text-align:center;display:block;color:#666;font-size:12px;">海外用户请致电客服:021-62393138</span>
</div>
</div>
@@ -103,8 +103,8 @@
<a ref="nofollow" href="//www.sgs.gov.cn/lz/licenseLink.do?method=licenceView&entyId=20120426105658696">
<div class="infoLeft"></div></a>
<div class="infoRight">
<span>前台总机:021-62393138</span><br>
<span>客服热线:4001883787</span><br>
<#-- <span>前台总机:021-62393138</span><br>-->
<span>客服热线:021-62393138</span><br>
<a href="${cityUrl}/ershoufang">上海找房子</a><span>,</span><a href="${cityUrl}/gujia">估房价</a><span>,百度&nbsp;</span><a href="https://www.baidu.com">房价网</a><br>
<span>电子邮箱:gujia@fangjia.com</span>
</div>
@@ -52,7 +52,7 @@
</div>
<button class="register_btn" type="button">完成</button>
<span style="margin-top:14px;margin-left:80px;display:block;color:#333;text-align:center;">想起密码请直接<a href="${cityUrl}/user/reqUserLoginPage" style="color:#007fc5;">登录</a></span>
<span style="margin-top:4px;margin-left:90px;display:block;color:#666;font-size:12px;">如果您为非手机注册用户、海外用户或当前手机不用/丢失,请致电客服:4001883787</span>
<span style="margin-top:4px;margin-left:90px;display:block;color:#666;font-size:12px;">如果您为非手机注册用户、海外用户或当前手机不用/丢失,请致电客服:021-62393138</span>
</div>
</div>
@@ -73,7 +73,7 @@
<div class="infoLeft"></div></a>
<div class="infoRight">
<span>前台总机:021-62393138</span><br>
<span>客服热线:4001883787</span><br>
<#-- <span>客服热线:4001883787</span><br>-->
<a href="${cityUrl}/ershoufang">上海找房子</a><span>,</span><a href="${cityUrl}/gujia">估房价</a><span>,百度&nbsp;</span><a href="https://www.baidu.com">房价网</a><br>
<span>电子邮箱:gujia@fangjia.com</span>
</div>
@@ -123,7 +123,7 @@
<a href="http://support.fangjia.com/pinpai">热门品牌</a>
</p>
<div class="footer_in por">
客服热线:4001883787 电子邮箱:gujia@fangjia.com
客服热线:021-62393138 电子邮箱:gujia@fangjia.com
<br>
&copy;2006-2013 <strong class="yhua">房价</strong>网 版权所有 沪ICP备10203734号-1
<b class="bg_common"></b>
@@ -66,7 +66,7 @@ public class Seawater implements SeawaterEntity {
private String url;
private String root;
private Integer avgPrice;
private Integer unitPrice;
private Number unitPrice;
private String purpose;
private String estateType;
private String buildType;
@@ -458,11 +458,11 @@ public class Seawater implements SeawaterEntity {
this.maxFloor = maxFloor;
}
public Integer getUnitPrice() {
public Number getUnitPrice() {
return unitPrice;
}
public void setUnitPrice(Integer unitPrice) {
public void setUnitPrice(Number unitPrice) {
this.unitPrice = unitPrice;
}
@@ -864,9 +864,9 @@ public class AddrSvcController {
if (result.containsKey("town")) {
map.put("town", result.getString("town"));
}
if (result.containsKey("committee")) {
map.put("committee", result.getString("committee"));
}
// if (result.containsKey("committee")) {
// map.put("committee", result.getString("committee"));
// }
if (result.containsKey("provinceCode")) {
map.put("provinceCode", result.getString("provinceCode"));
}
@@ -879,15 +879,15 @@ public class AddrSvcController {
if (result.containsKey("townCode")) {
map.put("townCode", result.getString("townCode"));
}
if (result.containsKey("committeeCode")) {
map.put("committeeCode", result.getString("committeeCode"));
}
if (result.containsKey("typeCode")) {
map.put("typeCode", result.getString("typeCode"));
}
if (result.containsKey("typeName")) {
map.put("typeName", result.getString("typeName"));
}
// if (result.containsKey("committeeCode")) {
// map.put("committeeCode", result.getString("committeeCode"));
// }
// if (result.containsKey("typeCode")) {
// map.put("typeCode", result.getString("typeCode"));
// }
// if (result.containsKey("typeName")) {
// map.put("typeName", result.getString("typeName"));
// }
if (result.containsKey("verifyFlag")) {
map.put("verifyFlag", result.getString("verifyFlag"));
} else {
@@ -921,6 +921,9 @@ public class AddrSvcController {
if (result.containsKey("countyGovTown")) {
map.put("countyGovTown", result.getString("countyGovTown"));
}
if (result.containsKey("remark")) {
map.put("remark", result.getString("remark"));
}
basicModel.setResult(map);
mav.setModel(basicModel);
} else {
@@ -80,6 +80,11 @@ public class CommercialController {
}
/**
* 商铺出租
* @param model
* @return
*/
public Object shopRentEvaluateAction(CommercialModel model) {
RestfulModelAndView mav = new RestfulModelAndView();
@@ -93,7 +98,7 @@ public class CommercialController {
if (json != null) {
if (json.containsKey("msg") && "成功".equals(json.getString("msg"))) {
HashMap<String, Object> resultMap = new HashMap<String, Object>();
resultMap.put("avgPrice", Long.valueOf(json.getString("unitPrice")));
resultMap.put("avgPrice", Double.valueOf(json.getString("unitPrice")));
resultMap.put("totalPrice", Long.valueOf(json.getString("totalPrice")));
if (model.getShowSample()!=null && model.getShowSample()==1 && json.containsKey("case")) {
@@ -198,6 +203,9 @@ public class CommercialController {
HttpRequest request = new HttpRequest();
JSONObject json = null;
Map<String, String> params = new HashMap<String, String>();
if(StringUtils.isNotBlank(model.getCityName())){
params.put("city", model.getCityName());
}
if(StringUtils.isNotBlank(model.getAddress())){
params.put("address", model.getAddress());
}
@@ -57,6 +57,7 @@ import com.fangjia.service.sql.ApiUserService;
import com.fangjia.service.sql.UserService;
import com.fangjia.service.web.MenuService;
import net.sf.json.JSONObject;
import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.lang.StringUtils;
import org.bson.types.ObjectId;
import org.sothis.core.util.Closure;
@@ -975,6 +976,22 @@ public class HouseController {
mav.setModel(BasicModel.buildBadRequestModel("非中国经纬度"));
return mav;
}
List<Seawater> houses = new ArrayList<Seawater>();
List<Seawater> houseSelf = new ArrayList<Seawater>();
List<Seawater> houseAround = new ArrayList<Seawater>();
List<Seawater> houseList = new ArrayList<Seawater>();
String[] categories = {"rent", "shop_rent", "office_rent"};
// if (cat.contains("_")) {
// 商铺,写字楼有经纬度,直接查
SeawaterQuery query = new SeawaterQuery();
// 先用名字查自身的样本
query.setCityDisplay(city);
query.setRegion(region);
query.setDistrictName(districtName);
query.setStartDate(model.getStartTime());
query.setEndDate(model.getEndTime());
String category = "district";
if ("1".equals(model.getPropertyType())) {
category = "office";
@@ -991,6 +1008,11 @@ public class HouseController {
} else {
cat = "rent";
}
if (model.getPrice() != null) {
query.setStartPrice((int) (model.getPrice() * 0.9 * 30));
query.setEndPrice((int) (model.getPrice() * 1.1 * 30));
}
} else {
if ("1".equals(model.getPropertyType())) {
cat = "office_sell";
@@ -998,21 +1020,13 @@ public class HouseController {
if ("2".equals(model.getPropertyType())) {
cat = "shop_sell";
}
if (model.getPrice() != null) {
query.setStartPrice((int) (model.getPrice() * 0.9));
query.setEndPrice((int) (model.getPrice() * 1.1));
}
}
List<Seawater> houses = new ArrayList<Seawater>();
List<Seawater> houseSelf = new ArrayList<Seawater>();
List<Seawater> houseAround = new ArrayList<Seawater>();
List<Seawater> houseList = new ArrayList<Seawater>();
// if (cat.contains("_")) {
// 商铺,写字楼有经纬度,直接查
SeawaterQuery query = new SeawaterQuery();
// 先用名字查自身的样本
query.setCityDisplay(city);
query.setRegion(region);
query.setDistrictName(districtName);
query.setCat(cat);
query.setStartDate(model.getStartTime());
query.setEndDate(model.getEndTime());
if (model.getSize() != null && model.getSize() != 0) {
query.setStartArea(model.getSize() * 0.9);
@@ -1025,16 +1039,15 @@ public class HouseController {
} else {
pager.setPageSize(5);
}
if (model.getPrice() != null) {
query.setStartPrice((int) (model.getPrice() * 0.9));
query.setEndPrice((int) (model.getPrice() * 1.1));
}
query.setPager(pager);
query.setSortField("p_date");
query.setOrder(false);
query.setTable("latest_seawater");
if (StringUtils.isNotBlank(city) && StringUtils.isNotBlank(region) && StringUtils.isNotBlank(districtName)) {
houseSelf = seawaterDao.findSeawatersByQuery(query);
for(Seawater house : houseSelf){
house.setDistance(0);
}
houses.addAll(houseSelf);
}
// 如果自身样本数不够,再查周边
@@ -1080,7 +1093,15 @@ public class HouseController {
}
}
seawater.setSize(house.getArea() == null || house.getArea() == 0 ? null : house.getArea());
seawater.setUnitPrice(house.getAvgPrice() == null || house.getAvgPrice() == 0 ? null : house.getAvgPrice());
if(ArrayUtils.contains(categories, cat)){
if(house.getAvgPrice() != null){
double dayRentPrice = (double)(house.getAvgPrice()/30.0);
seawater.setUnitPrice(DataUtil.getDoubleRound(2,dayRentPrice));
}
}else{
seawater.setUnitPrice(house.getAvgPrice() == null || house.getAvgPrice() == 0 ? null : house.getAvgPrice());
}
seawater.setTotalPrice(house.getTotalPrice() == null || house.getTotalPrice() == 0 ? null : house.getTotalPrice());
seawater.setDirection(house.getDirection());
seawater.setFloor(house.getFloor() == null || house.getFloor() == 0 ? null : house.getFloor());
@@ -1088,7 +1109,7 @@ public class HouseController {
// seawater.setRoom(house.getRoom() == null || house.getRoom() == 0 ? null : house.getRoom());
// seawater.setHall(house.getHall() == null || house.getHall() == 0 ? null : house.getHall());
// seawater.setToilet(house.getToilet() == null || house.getToilet() == 0 ? null : house.getToilet());
seawater.setDayUnitPrice(house.getDayUnitPrice() == null || house.getDayUnitPrice() == 0 ? null : house.getDayUnitPrice());
// seawater.setDayUnitPrice(house.getDayUnitPrice() == null || house.getDayUnitPrice() == 0 ? null : house.getDayUnitPrice());
seawater.setRentType(house.getRentType());
seawater.setPayType(house.getPayType());
seawater.setBusinessStatus(house.getBusinessStatus());
@@ -222,32 +222,50 @@ public class OfficeSellController {
public Object evaluateSellAction(PropertyEvaluationModel model, HttpServletRequest request) {
RestfulModelAndView mav = new RestfulModelAndView();
mav.setViewType("rest");
if (StringUtils.isBlank(model.getCity()) || StringUtils.isBlank(model.getName())
|| StringUtils.isBlank(model.getDistrict()) || model.getSize() <= 0 || model.getCity().contains("全国")
|| model.getDistrict().contains("全国")) {
mav.setModel(BasicModel.buildBadRequestModel("参数非法:城市,区域,写字楼名,面积(size)为必填项"));
if (StringUtils.isBlank(model.getCity()) || model.getSize()<=0) {
mav.setModel(BasicModel.buildBadRequestModel("参数非法:城市,面积为必填项"));
return mav;
}
if (model.getCity().endsWith("市")) {
model.setCity(model.getCity().replaceAll("市$", ""));
if (StringUtils.isBlank(model.getName()) && StringUtils.isBlank(model.getAddress()) ) {
mav.setModel(BasicModel.buildBadRequestModel("参数非法:名称或地址至少填一个"));
return mav;
}
/* 先到CPDB库中查找写字楼 */
District district = districtService.findByNameAndAlias(model.getCity(), model.getDistrict(), model.getName(), "office");
District district = null;
if(StringUtils.isNotBlank(model.getDistrict()) && StringUtils.isNotBlank(model.getName())) {
district = districtService.findByNameAndAlias(model.getCity(), model.getDistrict(), model.getName(), "office");
}
if (district == null) {
if (model.getDistrict().contains("市辖区") || model.getDistrict().contains(model.getCity())) {
if (StringUtils.isNotBlank(model.getDistrict()) && (model.getDistrict().contains("市辖区") || model.getDistrict().contains(model.getCity()))) {
district = districtService.findByNameAndAlias(model.getCity(), null, model.getName(), "office");
}
if (district == null) {
mav.setModel(BasicModel.buildBadRequestModel("该写字楼不存在"));
return mav;
}
if (district == null && (StringUtils.isNotBlank(model.getName()) || StringUtils.isNotBlank(model.getAddress()))) {
JSONObject resultObject = null;
if(StringUtils.isNotBlank(model.getAddress())){
resultObject = addressMatchProxyService.newMatch(model.getCity(), model.getAddress(), "office", false);
}else if(StringUtils.isNotBlank(model.getName())){
resultObject = addressMatchProxyService.newMatch(model.getCity(), model.getName(), "office", false);
}
if(resultObject != null){
String id = (String) resultObject.get("id");
district = districtService.findById(id);
}
}
if (district == null) {
mav.setModel(BasicModel.buildBadRequestModel("该写字楼不存在"));
return mav;
}
model.setName(district.getName());
if (model.getCarportPrice() != null && (model.getCarportPrice() < 0 || model.getCarportPrice() > 1000000)) {
mav.setModel(BasicModel.buildBadRequestModel("carportPrice(车位)取值不合法"));
return mav;
}
if (model.getMaxFloor() != null && (model.getMaxFloor() <= 0 || model.getMaxFloor() > 59)) {
mav.setModel(BasicModel.buildBadRequestModel("maxFloor取值非法,正确范围[1,60)"));
return mav;
@@ -287,16 +305,19 @@ public class OfficeSellController {
districtPriceMap.put("district", district.getRegion());
districtPriceMap.put("name", district.getName());
districtPriceMap.put("unitPrice", evaluation.getUnitPrice());
districtPriceMap.put("samples", evaluation.getSeawater());
mav.setModel(BasicModel.buildOKModel().setResult(districtPriceMap));
try {
if (StringUtils.isNotBlank(evaluation.getFromUserId()) && !evaluation.getFromUserId().equals("1007497")) {
openApiLogService.saveLog(CommonUtils.convertToMap(model), districtPriceMap, evaluation, "/officeSell/evaluateSell");
}
} catch (Exception e) {
e.printStackTrace();
Long totalPrice = (long) (evaluation.getUnitPrice() * model.getSize());
districtPriceMap.put("totalPrice", totalPrice);
if(model.getShow()!=null && model.getShow()==1){
districtPriceMap.put("samples", evaluation.getSeawater());
}
mav.setModel(BasicModel.buildOKModel().setResult(districtPriceMap));
// try {
// if (StringUtils.isNotBlank(evaluation.getFromUserId()) && !evaluation.getFromUserId().equals("1007497")) {
// openApiLogService.saveLog(CommonUtils.convertToMap(model), districtPriceMap, evaluation, "/officeSell/evaluateSell");
// }
// } catch (Exception e) {
// e.printStackTrace();
// }
return mav;
} else {
@@ -473,7 +494,10 @@ public class OfficeSellController {
if (StringUtils.isNotBlank(model.getOtherFactor())) {
evaluation.setOtherFactor(model.getOtherFactor());
}
evaluation.setRegion(model.getDistrict());
if(StringUtils.isNotBlank(model.getDistrict())){
evaluation.setRegion(model.getDistrict());
}
if (null != model.getRoom()) {
evaluation.setRoom(model.getRoom());
}
@@ -372,7 +372,7 @@ public class PoiController {
for (Map<String, Object> hit : hits) {
Map<String, Object> source = (Map<String, Object>) hit.get("_source");
if (source.containsKey("name")) {
if (source.containsKey("name") && !source.get("name").toString().contains("公司")) {
poiNames.add(source.get("name").toString());
}
}
@@ -51,6 +51,7 @@ import org.apache.lucene.search.BooleanClause;
import org.apache.lucene.search.BooleanQuery;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.TermQuery;
import org.apache.solr.client.solrj.util.ClientUtils;
import org.bson.types.ObjectId;
import org.slf4j.Logger;
import org.sothis.core.util.CollectionUtils;
@@ -759,12 +760,14 @@ public class PropertyController {
districtInfoDto.setAddress(district.getAddress());
//int avgPrice = districtStatService.findLatestDistrictAvgPrice(new DistrictKey(district), null);
// 返回2B价格,小程序用,其他也改为2B
int avgPrice = districtStatService.findLatestDistrictAvgPrice2B(new DistrictKey(district), null);
if (avgPrice == 0) {
avgPrice = districtStatService.findLatestDistrictAvgPrice2B(new DistrictKey(district), DateUtil.add(new Date(), -7));
}
if (avgPrice != 0) {
districtInfoDto.setAvgPrice(avgPrice);
// int avgPrice = districtStatService.findLatestDistrictAvgPrice2B(new DistrictKey(district), null);
// if (avgPrice == 0) {
// avgPrice = districtStatService.findLatestDistrictAvgPrice2B(new DistrictKey(district), DateUtil.add(new Date(), -7));
// }
DistrictSellStat sellStat = districtSellStatService.findFirstByParams(district.getCity(), district.getRegion(), district.getName());
if (sellStat != null) {
districtInfoDto.setAvgPrice(sellStat.getAvgPrice());
}
districtInfoDto.setPropertyType(district.getEstateType2());
if (district.getLat2() != null && district.getLat2() != 0 && district.getLng2() != null
@@ -1660,7 +1663,16 @@ public class PropertyController {
}
}
}
if (district == null) {
//使用新匹配再配一遍,不加类型,有结果,类型为district则走小区估值,其它类型也走经纬度估值
JSONObject resultObject = addressMatchProxyService.newMatch(model.getCity(), model.getAddress(), null, false);
if (resultObject != null && resultObject.containsKey("category") && resultObject.get("category")!=null) {
if(resultObject.containsKey("id") && resultObject.get("category").equals("district")){
String id = (String) resultObject.get("id");
district = districtService.findById(id);
}
}
}
if (district == null) {
//加上高德获取经纬度 和 根据经纬度估值
@@ -2493,9 +2505,19 @@ public class PropertyController {
item.put("name", districtStat.getDistrictName());
item.put("avgPrice", districtStat.getAvgPrice());
item.put("date", districtStat.getDate() / 100 + "-" + String.format("%02d", districtStat.getDate() % 100));
item.put("changePercent", BigDecimal.valueOf(districtStat.getMom() * 100)
.setScale(2, RoundingMode.HALF_UP)
.doubleValue());
if(null == districtStat.getMom()){
if(result.size()>0){
Integer avgPrice = (Integer) result.get(result.size() - 1).get("avgPrice");
double mom = (districtStat.getAvgPrice() - avgPrice)*100.0/avgPrice;
item.put("changePercent", DataUtil.getRound(2, mom));
}else{
item.put("changePercent", 0);
}
}else{
item.put("changePercent", BigDecimal.valueOf(districtStat.getMom() * 100)
.setScale(2, RoundingMode.HALF_UP)
.doubleValue());
}
result.add(item);
}
}
@@ -6013,6 +6035,512 @@ public class PropertyController {
return mav;
}
public Object sellCaseAction(PropertyEvaluationModel model, HttpServletRequest request){
RestfulModelAndView mav = new RestfulModelAndView();
mav.setViewType("rest");
if (StringUtils.isBlank(model.getCity())) {
mav.setModel(BasicModel.buildBadRequestModel("参数非法:城市为必填项"));
return mav;
}
if (StringUtils.isBlank(model.getName()) && StringUtils.isBlank(model.getAddress()) ) {
mav.setModel(BasicModel.buildBadRequestModel("参数非法:名称或地址至少填一个"));
return mav;
}
String estateType = null;
if(StringUtils.isNotBlank(model.getPropertyType())){
if(model.getPropertyType().equals("0")){
estateType = "普通住宅";
}else if(model.getPropertyType().equals("1")){
estateType = "别墅";
}else if(model.getPropertyType().equals("2")){
estateType = "商住";
}
}
District district = null;
if(StringUtils.isNotBlank(model.getDistrict()) && StringUtils.isNotBlank(model.getName())){
if(StringUtils.isNotBlank(model.getEstateType()) && model.getEstateType().equals("别墅") && !model.getName().contains("别墅")){
district = districtService.findByNameAndAlias(model.getCity(), model.getDistrict(), model.getName()+"别墅","district");
}else{
district = districtService.findByNameAndAlias(model.getCity(), model.getDistrict(), model.getName(),"district");
}
}
if (district == null && (StringUtils.isNotBlank(model.getName()) || StringUtils.isNotBlank(model.getAddress()))) {
JSONObject resultObject = null;
if(StringUtils.isNotBlank(model.getAddress())){
resultObject = addressMatchProxyService.newMatch(model.getCity(), model.getAddress(), "property", false);
}else if(StringUtils.isNotBlank(model.getName())){
if(estateType !=null && estateType.equals("别墅") && !model.getName().contains("别墅")){
resultObject = addressMatchProxyService.newMatch(model.getCity(), model.getName()+"别墅", "property", false);
}else{
resultObject = addressMatchProxyService.newMatch(model.getCity(), model.getName(), "property", false);
}
}
if(resultObject != null){
String id = (String) resultObject.get("id");
district = districtService.findById(id);
}
}
if(district == null && StringUtils.isBlank(model.getLocation())){
mav.setModel(BasicModel.buildOKModel().setResult(null));
return mav;
}
String startDate = DateUtil.formatByPattern(DateUtil.addMonthToDate(new Date(), -3),"yyyyMMdd");
String endDate = DateUtil.formatByPattern(new Date(), "yyyyMMdd");
List<HouseCaseDto> caseDtos = new ArrayList<HouseCaseDto>();
Pager pager = new Pager();
pager.setStartRow(0);
if (model.getPageSize() != null) {
pager.setPageSize(model.getPageSize());
// if(model.getPageSize() <=50){
// pager.setPageSize(model.getPageSize());
// }else{
// pager.setPageSize(50);
// }
} else {
pager.setPageSize(5);
}
// 默认1公里内
if (model.getRadius() == null) {
model.setRadius(1000);
}
if(district != null){
if(model.getMinPrice() == null){
DistrictSellStat districtSellStat = districtSellStatService.findFirstByParams(district.getCity(), district.getRegion(), district.getName());
if(districtSellStat != null) {
int minPrice = (int) (districtSellStat.getAvgPrice() - districtSellStat.getAvgPrice() * 0.1);
model.setMinPrice(minPrice);
int maxPrice = (int) (districtSellStat.getAvgPrice() + districtSellStat.getAvgPrice() * 0.1);
model.setMaxPrice(maxPrice);
}
}else{
if(model.getMinPrice() != null && model.getMinPrice()>0){
model.setMinPrice(model.getMinPrice());
}
if(model.getMaxPrice() != null && model.getMaxPrice()>0){
model.setMaxPrice(model.getMaxPrice());
}
}
//先查成交案例
Date startTime = DateUtil.parseDate(startDate,"yyyyMMdd");
Date endTime = DateUtil.parseDate(endDate,"yyyyMMdd");
List<DealPrice> dealPrices = dealPriceService.findDealPrices(district.getId(), pager.getPageSize(), model.getMinPrice(), model.getMaxPrice(), startTime, endTime);
if(dealPrices!=null && dealPrices.size()>0){
caseDtos = createDealHouseCase(caseDtos, dealPrices, 0, model.getShowSource());
if(caseDtos.size() == pager.getPageSize()){
caseDtos = caseDtos.subList(0, caseDtos.size()-1);
mav.setModel(BasicModel.buildOKModel().setResult(caseDtos));
return mav;
}
}
if(caseDtos.size() < pager.getPageSize()){
//查自身样本
List<Seawater> houseSelf = houseService.findSelfHouseByParams(district, "sell", Integer.parseInt(startDate), Integer.parseInt(endDate), model.getMinPrice(), model.getMaxPrice(), estateType, pager);
if(houseSelf!=null && houseSelf.size()>0){
caseDtos = createHouseCase(caseDtos, houseSelf, model.getShowSource());
if(caseDtos.size() == pager.getPageSize()){
caseDtos = caseDtos.subList(0, caseDtos.size()-1);
mav.setModel(BasicModel.buildOKModel().setResult(caseDtos));
return mav;
}
}
if(caseDtos.size() < pager.getPageSize() && StringUtils.isNotBlank(estateType) && district.getName().contains("别墅")){
District newDist = new District();
newDist.setCity(district.getCity());
newDist.setRegion(district.getRegion());
newDist.setName(district.getName().replace("别墅",""));
newDist.setEstateType2(estateType);
houseSelf = houseService.findSelfHouseByParams(newDist, "sell", Integer.parseInt(startDate), Integer.parseInt(endDate), model.getMinPrice(), model.getMaxPrice(), estateType, pager);
if(houseSelf!=null && houseSelf.size()>0){
caseDtos = createHouseCase(caseDtos, houseSelf, model.getShowSource());
if(caseDtos.size() == pager.getPageSize()){
caseDtos = caseDtos.subList(0, caseDtos.size()-1);
mav.setModel(BasicModel.buildOKModel().setResult(caseDtos));
return mav;
}
}
}
//有物业类型且自身样本数据不足,忽略物业类型查
if(caseDtos.size() ==0 && StringUtils.isNotBlank(estateType)){
District newDist = new District();
newDist.setCity(district.getCity());
newDist.setRegion(district.getRegion());
newDist.setName(district.getName().replace("别墅",""));
newDist.setEstateType2(estateType);
houseSelf = houseService.findSelfHouseByParams(newDist, "sell", Integer.parseInt(startDate), Integer.parseInt(endDate), model.getMinPrice(), model.getMaxPrice(), null, pager);
if(houseSelf!=null && houseSelf.size()>0){
caseDtos = createHouseCase(caseDtos, houseSelf, model.getShowSource());
if(caseDtos.size() == pager.getPageSize()){
caseDtos = caseDtos.subList(0, caseDtos.size()-1);
mav.setModel(BasicModel.buildOKModel().setResult(caseDtos));
return mav;
}
}
}
//自身样本不足,查周边成交
List<District> districts = districtService.findNearestDistrict(district, 1000, 20);
if(districts!=null && districts.size()>0){
for(District d : districts){
if(!district.getId().equals(d.getId())){
dealPrices = dealPriceService.findDealPrices(d.getId(), pager.getPageSize(), model.getMinPrice(), model.getMaxPrice(), DateUtil.parseDate(startDate,"yyyyMMdd"), DateUtil.parseDate(endDate,"yyyyMMdd"));
if(dealPrices!=null && dealPrices.size()>0 && d.getLng()!=null && d.getLng()>0){
double distance = GeoUtils.calculateDistance(district.getLng()/10000000000.0, district.getLat()/10000000000.0, d.getLng()/10000000000.0, d.getLat()/10000000000.0);
caseDtos = createDealHouseCase(caseDtos, dealPrices, (int)distance, model.getShowSource());
if(caseDtos.size()>pager.getPageSize()){
caseDtos = caseDtos.subList(0, caseDtos.size()-1);
break;
}
}
}
}
if(caseDtos.size() == pager.getPageSize()){
mav.setModel(BasicModel.buildOKModel().setResult(caseDtos));
return mav;
}
}
}
}
//自身成交,自身样本,周边成交不足,查周边挂牌
List<Seawater> houseAround = null;
if (caseDtos.size() < pager.getPageSize() ) {
Double lng = null;
Double lat = null;
if(district!=null && district.getLat()!=null && district.getLat()>0){
lng = district.getLng()/10000000000.0;
lat = district.getLat()/10000000000.0;
if(estateType == null ){
estateType = district.getEstateType2();
}
}else if(StringUtils.isNotBlank(model.getLocation())){
String[] locationStr = model.getLocation().split(",");
String numberPattern = "-?\\d+(\\.\\d+)?"; // 匹配整数或浮点数
for (String loc : locationStr) {
if (!loc.trim().matches(numberPattern)) {
mav.setModel(BasicModel.buildBadRequestModel("location(经纬度)格式错误"));
return mav;
}
}
lng = Double.valueOf(locationStr[0]);
lat = Double.valueOf(locationStr[1]);
if (lng < 70 || lng > 140 || lat < 0 || lat > 55) {
mav.setModel(BasicModel.buildBadRequestModel("非中国经纬度"));
return mav;
}
}
if(lat !=null && lat>0){
houseAround = houseService.findArroundHouseByParams("sell", lng, lat, Integer.parseInt(startDate), Integer.parseInt(endDate), model.getMinPrice(), model.getMaxPrice(), estateType, pager, model.getRadius());
}
if(houseAround != null && houseAround.size()>0){
caseDtos = createHouseCase(caseDtos, houseAround, model.getShowSource());
}
}
if(caseDtos.size()>pager.getPageSize()){
caseDtos = caseDtos.subList(0, caseDtos.size()-1);
}
mav.setModel(BasicModel.buildOKModel().setResult(caseDtos));
return mav;
}
public Object rentCaseAction(PropertyEvaluationModel model, HttpServletRequest request){
RestfulModelAndView mav = new RestfulModelAndView();
mav.setViewType("rest");
if (StringUtils.isBlank(model.getCity())) {
mav.setModel(BasicModel.buildBadRequestModel("参数非法:城市为必填项"));
return mav;
}
if (StringUtils.isBlank(model.getName()) && StringUtils.isBlank(model.getAddress()) ) {
mav.setModel(BasicModel.buildBadRequestModel("参数非法:名称或地址至少填一个"));
return mav;
}
District district = null;
String estateType = null;
if(StringUtils.isNotBlank(model.getPropertyType())){
if(model.getPropertyType().equals("0")){
estateType = "普通住宅";
}else if(model.getPropertyType().equals("1")){
estateType = "别墅";
}else if(model.getPropertyType().equals("2")){
estateType = "商住";
}
}
if(StringUtils.isNotBlank(model.getDistrict()) && StringUtils.isNotBlank(model.getName())){
district = districtService.findByNameAndAlias(model.getCity(), model.getDistrict(), model.getName(),"district");
}
if (district == null && (StringUtils.isNotBlank(model.getName()) || StringUtils.isNotBlank(model.getAddress()))) {
JSONObject resultObject = null;
if(StringUtils.isNotBlank(model.getAddress())){
resultObject = addressMatchProxyService.newMatch(model.getCity(), model.getAddress(), "property", false);
}else if(StringUtils.isNotBlank(model.getName())){
if(estateType !=null && estateType.equals("别墅") && !model.getName().contains("别墅")){
resultObject = addressMatchProxyService.newMatch(model.getCity(), model.getName()+"别墅", "property", false);
}else{
resultObject = addressMatchProxyService.newMatch(model.getCity(), model.getName(), "property", false);
}
}
if(resultObject != null){
String id = (String) resultObject.get("id");
district = districtService.findById(id);
}
}
if(district == null && StringUtils.isBlank(model.getLocation())){
mav.setModel(BasicModel.buildOKModel().setResult(null));
return mav;
}
String startDate = DateUtil.formatByPattern(DateUtil.addMonthToDate(new Date(), -6),"yyyyMMdd");
String endDate = DateUtil.formatByPattern(new Date(), "yyyyMMdd");
List<HouseCaseDto> caseDtos = new ArrayList<HouseCaseDto>();
Pager pager = new Pager();
pager.setStartRow(0);
if (model.getPageSize() != null) {
// pager.setPageSize(model.getPageSize());
if(model.getPageSize() <=50){
pager.setPageSize(model.getPageSize());
}else{
pager.setPageSize(50);
}
} else {
pager.setPageSize(5);
}
// 默认1公里内
if (model.getRadius() == null) {
model.setRadius(1000);
}
if(district != null){
if(model.getMinPrice() == null){
SqmetreRent rent = sqmetreRentService.findNearestSqmetreRent(district.getCity(), district.getRegion(), district.getName(), "district");
if(rent != null) {
int minPrice = (int) (rent.getAvgPrice().intValue() - rent.getAvgPrice().intValue() * 0.1);
model.setMinPrice(minPrice);
int maxPrice = (int) (rent.getAvgPrice().intValue() + rent.getAvgPrice().intValue() * 0.1);
model.setMaxPrice(maxPrice);
}
}else{
if(model.getMinPrice() != null && model.getMinPrice()>0){
model.setMinPrice(model.getMinPrice());
}
if(model.getMaxPrice() != null && model.getMaxPrice()>0){
model.setMaxPrice(model.getMaxPrice());
}
}
if(caseDtos.size() < pager.getPageSize()){
//查自身样本
List<Seawater> houseSelf = houseService.findSelfHouseByParams(district, "rent", Integer.parseInt(startDate), Integer.parseInt(endDate), model.getMinPrice(), model.getMaxPrice(), estateType, pager);
if(houseSelf!=null && houseSelf.size()>0){
caseDtos = createHouseCase(caseDtos, houseSelf, model.getShowSource());
if(caseDtos.size() == pager.getPageSize()){
caseDtos = caseDtos.subList(0, caseDtos.size()-1);
mav.setModel(BasicModel.buildOKModel().setResult(caseDtos));
return mav;
}
}
if(caseDtos.size() < pager.getPageSize() && StringUtils.isNotBlank(estateType) && district.getName().contains("别墅")){
District newDist = new District();
newDist.setCity(district.getCity());
newDist.setRegion(district.getRegion());
newDist.setName(district.getName().replace("别墅",""));
newDist.setEstateType2(estateType);
houseSelf = houseService.findSelfHouseByParams(newDist, "sell", Integer.parseInt(startDate), Integer.parseInt(endDate), model.getMinPrice(), model.getMaxPrice(), estateType, pager);
if(houseSelf!=null && houseSelf.size()>0){
caseDtos = createHouseCase(caseDtos, houseSelf, model.getShowSource());
if(caseDtos.size() == pager.getPageSize()){
caseDtos = caseDtos.subList(0, caseDtos.size()-1);
mav.setModel(BasicModel.buildOKModel().setResult(caseDtos));
return mav;
}
}
}
//有物业类型且自身样本数据不足,忽略物业类型查
if(caseDtos.size() ==0 && StringUtils.isNotBlank(estateType)){
District newDist = new District();
newDist.setCity(district.getCity());
newDist.setRegion(district.getRegion());
newDist.setName(district.getName().replace("别墅",""));
newDist.setEstateType2(estateType);
houseSelf = houseService.findSelfHouseByParams(newDist, "sell", Integer.parseInt(startDate), Integer.parseInt(endDate), model.getMinPrice(), model.getMaxPrice(), null, pager);
if(houseSelf!=null && houseSelf.size()>0){
caseDtos = createHouseCase(caseDtos, houseSelf, model.getShowSource());
if(caseDtos.size() == pager.getPageSize()){
caseDtos = caseDtos.subList(0, caseDtos.size()-1);
mav.setModel(BasicModel.buildOKModel().setResult(caseDtos));
return mav;
}
}
}
}
}
//自身样本不足,查周边挂牌
List<Seawater> houseAround = null;
if (caseDtos.size() < pager.getPageSize() ) {
Double lng = null;
Double lat = null;
if(district!=null && district.getLat()!=null && district.getLat()>0){
lng = district.getLng()/10000000000.0;
lat = district.getLat()/10000000000.0;
if(estateType == null ){
estateType = district.getEstateType2();
}
}else if(StringUtils.isNotBlank(model.getLocation())){
String[] locationStr = model.getLocation().split(",");
String numberPattern = "-?\\d+(\\.\\d+)?"; // 匹配整数或浮点数
for (String loc : locationStr) {
if (!loc.trim().matches(numberPattern)) {
mav.setModel(BasicModel.buildBadRequestModel("location(经纬度)格式错误"));
return mav;
}
}
lng = Double.valueOf(locationStr[0]);
lat = Double.valueOf(locationStr[1]);
if (lng < 70 || lng > 140 || lat < 0 || lat > 55) {
mav.setModel(BasicModel.buildBadRequestModel("非中国经纬度"));
return mav;
}
}
if(lat !=null && lat>0){
houseAround = houseService.findArroundHouseByParams("rent", lng, lat, Integer.parseInt(startDate), Integer.parseInt(endDate), model.getMinPrice(), model.getMaxPrice(), estateType, pager, model.getRadius());
}
if(houseAround != null && houseAround.size()>0){
caseDtos = createHouseCase(caseDtos, houseAround, model.getShowSource());
}
}
if(caseDtos.size()>pager.getPageSize()){
caseDtos = caseDtos.subList(0, caseDtos.size()-1);
}
mav.setModel(BasicModel.buildOKModel().setResult(caseDtos));
return mav;
}
private List<HouseCaseDto> createDealHouseCase(List<HouseCaseDto> caseDtos, List<DealPrice> dealPrices,int distance, Integer showSource){
if(dealPrices!=null && dealPrices.size()>0){
List<String> ids = new ArrayList<String>();
for(HouseCaseDto dto : caseDtos){
ids.add(dto.getId());
}
for(DealPrice dp : dealPrices){
if(!ids.contains(dp.getId())){
HouseCaseDto dto = new HouseCaseDto();
dto.setId(dp.getId());
dto.setCity(dp.getCity());
dto.setDistrict(dp.getRegion());
dto.setName(dp.getDistrictName());
dto.setSize(dp.getArea());
dto.setDistance(distance);
dto.setUnitPrice(dp.getAvgPrice());
dto.setTotalPrice(dp.getTotalPrice());
dto.setDecoration(dp.getFitment());
dto.setDirection(dp.getDirection());
dto.setFloor(dp.getFloor());
dto.setMaxFloor(dp.getHeight());
dto.setRoom(String.valueOf(dp.getRoom()));
dto.setHall(String.valueOf(dp.getHall()));
dto.setCaseDate(DateUtil.formatByPattern(dp.getTradeDate(), "yyyy-MM-dd"));
if(showSource!=null && showSource==1){
dto.setSource("成交");
}
caseDtos.add(dto);
}
}
return caseDtos;
}
return null;
}
private List<HouseCaseDto> createHouseCase(List<HouseCaseDto> caseDtos, List<Seawater> houses, Integer showSource){
if (houses != null && !houses.isEmpty()) {
Set<String> seenIds = new HashSet<String>();
Iterator<Seawater> iterator = houses.iterator();
while (iterator.hasNext()) {
Seawater s = iterator.next();
if (!seenIds.add(s.getId())) {
// 如果已经存在,则从列表中移除
iterator.remove();
}
}
List<String> ids = new ArrayList<String>();
for(HouseCaseDto dto : caseDtos){
ids.add(dto.getId());
}
for (Seawater house : houses) {
if(!ids.contains(house.getId())){
HouseCaseDto caseDto = new HouseCaseDto();
caseDto.setId(house.getId());
caseDto.setCity(house.getCity());
caseDto.setDistrict(house.getRegion());
caseDto.setName(house.getDistrictName());
caseDto.setSize(house.getArea() == null || house.getArea() == 0 ? null : house.getArea());
caseDto.setUnitPrice(house.getAvgPrice() == null || house.getAvgPrice() == 0 ? null : house.getAvgPrice());
caseDto.setTotalPrice(house.getTotalPrice() == null || house.getTotalPrice() == 0 ? null : house.getTotalPrice());
caseDto.setDirection(house.getDirection());
caseDto.setDecoration(house.getFitment());
caseDto.setFloor(house.getFloor() == null || house.getFloor() == 0 ? null : house.getFloor());
caseDto.setMaxFloor(house.getHeight() == null || house.getHeight() == 0 ? null : house.getHeight());
caseDto.setRoom(house.getRoom() == null || house.getRoom() == 0 ? null : house.getRoom().toString());
caseDto.setHall(house.getHall() == null || house.getHall() == 0 ? null : house.getHall().toString());
if (house.getpDate() != null && house.getpDate() > 10000000) {
String numberStr = String.valueOf(house.getpDate());
// 拆分字符串并格式化
String year = numberStr.substring(0, 4); // 前四位是年份
String month = numberStr.substring(4, 6); // 中间两位是月份
String day = numberStr.substring(6, 8); // 最后两位是日期
String formattedDate = year + "-" + month + "-" + day;
caseDto.setCaseDate(formattedDate);
}
caseDto.setDistance(house.getDistance());
if(showSource!=null && showSource==1){
caseDto.setSource("挂牌");
}
caseDtos.add(caseDto);
}
}
}
return caseDtos;
}
public void setHouseLoudongService(HouseLoudongService houseLoudongService) {
this.houseLoudongService = houseLoudongService;
@@ -1,6 +1,7 @@
package com.fangjia.open.controllers;
import com.fangjia.core.RegionData;
import com.fangjia.core.util.DataUtil;
import com.fangjia.core.util.DateUtil;
import com.fangjia.dal.mongo.model.SqmetreRent;
import com.fangjia.dal.seaweed.model.District;
@@ -92,7 +93,7 @@ public class SqmetreRentController {
// 设置返回结果,防止 subList 越界
if (result.size() > 1) {
mav.setModel(BasicModel.buildOKModel().setResult(result.subList(1, result.size())));
mav.setModel(BasicModel.buildOKModel().setResult(result));
} else {
mav.setModel(BasicModel.buildOKModel().setResult(null));
}
@@ -166,7 +167,7 @@ public class SqmetreRentController {
// 设置返回结果,防止 subList 越界
if (result.size() > 1) {
mav.setModel(BasicModel.buildOKModel().setResult(result.subList(1, result.size())));
mav.setModel(BasicModel.buildOKModel().setResult(result));
} else {
mav.setModel(BasicModel.buildOKModel().setResult(null));
}
@@ -232,7 +233,8 @@ public class SqmetreRentController {
item.put("district", sqmetreRent.getRegion());
item.put("name", sqmetreRent.getDistrictName());
Integer currentRent = (sqmetreRent.getAvgPrice() != null) ? sqmetreRent.getAvgPrice().intValue() : 0;
item.put("rent", currentRent);
Double dayRentPrice = currentRent/30.0;
item.put("rent", DataUtil.getRound(2, dayRentPrice));
item.put("date", sqmetreRent.getWeekend() != null ? DateUtil.formatByPattern(sqmetreRent.getWeekend(), "yyyy-MM") : "未知日期");
// 计算月涨幅
@@ -249,7 +251,7 @@ public class SqmetreRentController {
}
// 设置返回结果,防止 subList 越界
if (result.size() > 1) {
if (result.size() > 0) {
mav.setModel(BasicModel.buildOKModel().setResult(result.subList(1, result.size())));
} else {
mav.setModel(BasicModel.buildOKModel().setResult(null));
@@ -0,0 +1,150 @@
package com.fangjia.open.dto;
public class HouseCaseDto {
private String id;//房源id
private String city;//城市
private String district;//区域
private String name;//楼盘名称
private Integer distance;//距离(单位:米)
private Double size;//面积(单位:平米)
private Integer unitPrice;//单价(单位:元/平米)
private Integer totalPrice;//总价(单位:元)
private String decoration;//装修(如:精装)
private String direction;//朝向(如:南)
private Integer floor;//所在楼层
private Integer maxFloor;//总楼层
private String room;//室
private String hall;//厅
private String caseDate;//案例时间(如: 2013-07-12)
private String source;//来源
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getDistrict() {
return district;
}
public void setDistrict(String district) {
this.district = district;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getDistance() {
return distance;
}
public void setDistance(Integer distance) {
this.distance = distance;
}
public Double getSize() {
return size;
}
public void setSize(Double size) {
this.size = size;
}
public Integer getUnitPrice() {
return unitPrice;
}
public void setUnitPrice(Integer unitPrice) {
this.unitPrice = unitPrice;
}
public Integer getTotalPrice() {
return totalPrice;
}
public void setTotalPrice(Integer totalPrice) {
this.totalPrice = totalPrice;
}
public String getDecoration() {
return decoration;
}
public void setDecoration(String decoration) {
this.decoration = decoration;
}
public String getDirection() {
return direction;
}
public void setDirection(String direction) {
this.direction = direction;
}
public Integer getFloor() {
return floor;
}
public void setFloor(Integer floor) {
this.floor = floor;
}
public Integer getMaxFloor() {
return maxFloor;
}
public void setMaxFloor(Integer maxFloor) {
this.maxFloor = maxFloor;
}
public String getRoom() {
return room;
}
public void setRoom(String room) {
this.room = room;
}
public String getHall() {
return hall;
}
public void setHall(String hall) {
this.hall = hall;
}
public String getCaseDate() {
return caseDate;
}
public void setCaseDate(String caseDate) {
this.caseDate = caseDate;
}
public String getSource() {
return source;
}
public void setSource(String source) {
this.source = source;
}
}
@@ -14,7 +14,7 @@ public class CommercialModel extends FangjiaApiModel{
private Integer maxFloor;//总楼层
private Integer passengerFlow;//客流量---0:高 1:中 2:低
private Integer LeaseStability;//租约稳定性---0:持续稳定出租 1:阶段性出租 2:偶尔出租 3:未出租
private Integer leaseStability;//租约稳定性---0:持续稳定出租 1:阶段性出租 2:偶尔出租 3:未出租
private Integer sellType;//出售/转让---0:出售 1:转让
private Integer decorationCost;//装修成本(单位:万元)
private Integer decorationYear;//装修年限(单位:年)
@@ -72,11 +72,11 @@ public class CommercialModel extends FangjiaApiModel{
}
public Integer getLeaseStability() {
return LeaseStability;
return leaseStability;
}
public void setLeaseStability(Integer leaseStability) {
LeaseStability = leaseStability;
leaseStability = leaseStability;
}
public Integer getSellType() {
@@ -296,6 +296,39 @@ public class PropertyEvaluationModel extends FangjiaApiModel {
private String sampleIds;
private Integer max;
private Date startDate;
private Date endDate;
private Integer pageSize;
/**
* 显示来源
*/
private Integer showSource;
/**
* 显示房源 1:显示 0:默认 不显示
*/
private Integer show;
public Integer getPageSize() {
return pageSize;
}
public void setPageSize(Integer pageSize) {
this.pageSize = pageSize;
}
public Integer getShowSource() {
return showSource;
}
public void setShowSource(Integer showSource) {
this.showSource = showSource;
}
public void setDecorationAge(int decorationAge) {
this.decorationAge = decorationAge;
}
@@ -962,4 +995,36 @@ public class PropertyEvaluationModel extends FangjiaApiModel {
public String getSampleIds() {
return sampleIds;
}
public Integer getMax() {
return max;
}
public void setMax(Integer max) {
this.max = max;
}
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 Integer getShow() {
return show;
}
public void setShow(Integer show) {
this.show = show;
}
}
@@ -49,5 +49,11 @@
</ladders>
</rule>
<rule controller="officeSell" action="evaluateSell" channel="office">
<ladders>
<ladder>/evaluateSell</ladder>
</ladders>
</rule>
</rules>
</urlrewrite>
+3
View File
@@ -602,8 +602,11 @@
<!-- <artifactId>mysql-connector-java</artifactId>-->
<!-- <version>8.0.33</version>-->
<!-- </dependency>-->
<<<<<<< HEAD
=======
>>>>>>> 0f09380b841eb4db196b8a3ad66beb5d3d06e7f9
</dependencies>
</project>
@@ -153,7 +153,7 @@ class InsertMonitorSquareRentCalcCommandBatch extends BaseBatch {
query.append("cat", "block")
blockCount = SQMETRE_RENT_COLL.count(query)
def msg = "本月(${weekend.format("yyyyMM")})小区平米租金计算量:".toString() + districtCount + ";本月城市平米租金计算量:" + cityCount + ";本月区域平米租金计算量:" + regionCount + ";本月版块平米租金计算量:" + blockCount + ";运行时间:" + secondToTime(time) + "."
sendDingDingMsg(TOKEN, msg)
sendDingDingMsg(TOKEN, msg, "13916076378")
}
/**
* 均价是否计算完成
@@ -0,0 +1,29 @@
package com.fangjia.script.util
/**
* POI查询结果数据类
*/
class PoiSearchResult {
// 总数量
long totalCount
// 最近距离(米)
Double minDistanceMeters
// 最近的N个POI列表
List<PoiInfo> nearestPois = []
// 类型分布统计
Map<String, Long> typeDistribution = [:]
// 主类型分布统计
Map<Integer, Long> mainTypeDistribution = [:]
// 区域分布统计
Map<String, Long> districtDistribution = [:]
@Override
String toString() {
return super.toString()
}
}
@@ -0,0 +1,176 @@
package com.fangjia.script.util
import org.apache.http.HttpHost
import org.apache.http.auth.AuthScope
import org.apache.http.auth.UsernamePasswordCredentials
import org.apache.http.client.CredentialsProvider
import org.apache.http.client.config.RequestConfig
import org.apache.http.impl.client.BasicCredentialsProvider
import org.apache.http.impl.nio.client.HttpAsyncClientBuilder
import org.elasticsearch.action.search.SearchRequest
import org.elasticsearch.action.search.SearchResponse
import org.elasticsearch.client.RequestOptions
import org.elasticsearch.client.RestClient
import org.elasticsearch.client.RestClientBuilder
import org.elasticsearch.client.RestHighLevelClient
import org.elasticsearch.common.unit.DistanceUnit
import org.elasticsearch.index.query.BoolQueryBuilder
import org.elasticsearch.index.query.QueryBuilders
import org.elasticsearch.search.builder.SearchSourceBuilder
import org.elasticsearch.search.sort.SortBuilders
import org.elasticsearch.search.sort.SortOrder
import org.elasticsearch.xpack.sql.jdbc.EsDataSource
public class PoiUtils {
static RestHighLevelClient client = getClient()
static RestHighLevelClient getClient() {
RestClientBuilder builder = RestClient.builder(new HttpHost("192.168.0.89", 9200, "http"));
builder.setRequestConfigCallback(new RestClientBuilder.RequestConfigCallback() {
@Override
RequestConfig.Builder customizeRequestConfig(RequestConfig.Builder requestConfigBuilder) {
requestConfigBuilder.setConnectionRequestTimeout(1000 * 60);
requestConfigBuilder.setSocketTimeout(1000 * 180);
return requestConfigBuilder;
}
})
builder.setHttpClientConfigCallback(new RestClientBuilder.HttpClientConfigCallback() {
@Override
HttpAsyncClientBuilder customizeHttpClient(HttpAsyncClientBuilder httpAsyncClientBuilder) {
httpAsyncClientBuilder.disableAuthCaching();
CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
credentialsProvider.setCredentials(AuthScope.ANY, new UsernamePasswordCredentials("elastic", "elasticsearch"));
httpAsyncClientBuilder.setDefaultCredentialsProvider(credentialsProvider);
return httpAsyncClientBuilder;
}
})
return new RestHighLevelClient(builder)
}
/**
* 根据经纬度搜索POI
* @param city
* @param lng
* @param lat
* @param tags
* @param distance
* @param maxResults
* @return
*/
public static PoiSearchResult searchPoi(String city, Double lng, Double lat, List<String> tags =[],String distance = "1km", int maxResults = 20) {
PoiSearchResult poiSearchResult = null
SearchResponse response = null
try {
SearchSourceBuilder sourceBuilder = new SearchSourceBuilder()
// 构建查询条件
BoolQueryBuilder boolQuery = QueryBuilders.boolQuery()
// 地理位置查询
boolQuery.must(QueryBuilders.geoDistanceQuery("location")
.point(lat, lng)
.distance(distance))
boolQuery.must(QueryBuilders.termQuery("city", city))
if(!tags.isEmpty()){
boolQuery.must(QueryBuilders.termsQuery("small_type", tags))
}
sourceBuilder.trackTotalHits(true) // 强制追踪总数
// boolQuery.must(QueryBuilders.termQuery("status", "0"))
sourceBuilder.query(boolQuery)
sourceBuilder.sort(SortBuilders.geoDistanceSort("location", lat, lng)
.order(SortOrder.ASC)
.unit(DistanceUnit.METERS))
sourceBuilder.size(maxResults)
SearchRequest searchRequest = new SearchRequest("didata_map_poi_shards")
searchRequest.source(sourceBuilder)
response = client.search(searchRequest, RequestOptions.DEFAULT)
poiSearchResult = parseSearchResponse(response)
} catch (Exception e) {
throw new RuntimeException("根据名称搜索POI失败: ${e.message}", e)
}finally {
}
return poiSearchResult
}
/**
* 解析搜索响应
*/
private static PoiSearchResult parseSearchResponse(SearchResponse response) {
PoiSearchResult result = new PoiSearchResult()
// 总数量
result.totalCount = response.hits.totalHits.value
// 最近的POI列表
result.nearestPois = parsePoiInfos(response, true)
if(result.nearestPois.size() > 0){
result.minDistanceMeters = result.nearestPois[0].distanceMeters
}
return result
}
/**
* 解析POI信息列表
*/
private static List<PoiInfo> parsePoiInfos(SearchResponse response, boolean includeDistance = true) {
List<PoiInfo> pois = []
response.hits.hits.each { hit ->
def source = hit.sourceAsMap
PoiInfo poi = new PoiInfo(
id: source.id,
name: source.name,
type: source.type,
cat: source.cat,
mainType: source.main_type as Integer,
secondaryType: source.secondary_type,
smallType: source.small_type,
address: source.address,
city: source.city,
district: source.district,
province: source.province,
location: source.location as Map,
dataSource: source.data_source,
status: source.status
)
// 添加距离信息
if (includeDistance && hit.sortValues && hit.sortValues.length > 0) {
// 距离通常是最后一个排序字段
def distanceValue = hit.sortValues[hit.sortValues.length - 1]
if (distanceValue instanceof Number) {
poi.distanceMeters = (int)distanceValue.doubleValue()
}
}
pois.add(poi)
}
return pois
}
static void main(String[] args) {
PoiSearchResult result = PoiUtils.searchPoi("上海市", 121.19563,31.296209, ["便民商店/便利店","7-ELEVEn便利店","OK便利店"])
println(result)
}
}
class PoiInfo {
String id
String name
String type
String cat
Integer mainType
String secondaryType
String smallType
String address
String city
String district
String province
Map<String, Object> location
Integer distanceMeters
String dataSource
String status
}
@@ -0,0 +1,91 @@
package com.fangjia.script.wenyan.temp
import com.fangjia.core.util.DataUtil
import com.fangjia.script.util.ExcelUtils
import org.apache.commons.lang3.StringUtils
public static Double normalize(Double orgValue, double min, double max) {
if (min > max) {
throw new IllegalArgumentException("min should be less than or equal to max");
}
if(orgValue == null){
return null;
}
double value = orgValue;
// 大于 max:不断除以 2,直到 ≤ max
while (value > max) {
value /= 2.0;
}
// 小于 min:不断乘以 2,直到 ≥ min
while (value < min) {
if(value < 0){
value /= 2.0;
}else{
value *= 2.0;
}
}
return DataUtil.roundDouble(value, 2);
}
//def map1 =[:]
//ExcelUtils.read("C:\\Users\\goojia\\Desktop\\楼盘评级\\楼盘数据2.xlsx").each {
// map1[it[0]] = it[1]
//}
//ExcelUtils.multiThreadingModify("C:\\Users\\goojia\\Desktop\\楼盘评级\\估家科技楼盘评级数据测试反馈.xlsx",{List item->
// item["X"] = map1.getOrDefault(item["A"],null)
// if(item["X"]){
// DataUtil.roundDouble(item["X"],2)
// }
//}, 1)
//
//ExcelUtils.multiThreadingModify("C:\\Users\\goojia\\Desktop\\楼盘评级\\估家科技楼盘评级数据测试反馈.xlsx",{List item->
// item["X"] = map1.getOrDefault(item["A"],null)
// if(item["X"]){
// DataUtil.roundDouble(item["X"],2)
// }
//}, 3)
//ExcelUtils.multiThreadingModify("C:\\Users\\goojia\\Desktop\\楼盘评级\\估家科技楼盘评级数据测试反馈.xlsx",{List item->
// def row = "l"
// if(!(item[row] instanceof Double) && StringUtils.isBlank(item[row])){
// item[ row] = null
// }
// if(item[row] && item[row] instanceof String){
// println("---" + item)
// }
// item[row] = normalize(item[row], -30, 20);
//
//},0)
//ExcelUtils.multiThreadingModify("C:\\Users\\goojia\\Desktop\\楼盘评级\\估家科技楼盘评级数据测试反馈.xlsx",{List item->
// def row = "l"
// if(!(item[row] instanceof Double) && StringUtils.isBlank(item[row])){
// item[ row] = null
// }
// if(item[row] && item[row] instanceof String){
// println("---" + item)
// }
// item[row] = normalize(item[row], -30, 20);
//},1)
ExcelUtils.multiThreadingModify("C:\\Users\\goojia\\Desktop\\楼盘评级\\估家科技楼盘评级数据测试反馈V3.xlsx",{List item->
def row = "l"
if(!(item[row] instanceof Double) && StringUtils.isBlank(item[row])){
item[ row] = null
}
if(item[row] && item[row] instanceof String){
println("---" + item)
}
item[row] = normalize(item[row], -30, 13);
},2)
ExcelUtils.multiThreadingModify("C:\\Users\\goojia\\Desktop\\楼盘评级\\估家科技楼盘评级数据测试反馈V3.xlsx",{List item->
def row = "l"
if(!(item[row] instanceof Double) && StringUtils.isBlank(item[row])){
item[ row] = null
}
if(item[row] && item[row] instanceof String){
println("---" + item)
}
item[row] = normalize(item[row], -30, 13);
},3)
@@ -1469,6 +1469,7 @@ public class AddressParserImpl implements AddressParser {
.replaceAll("【】()\\(\\)\\[\\]", "").replaceAll("\\*+", "").replaceAll("[\\s ]+", "");
}
public void setDistrictService(DistrictService districtService) {
this.districtService = districtService;
}
@@ -88,5 +88,16 @@ public interface AddressMatchProxyService {
JSONObject addressStructure(String city, String address);
/**
* 最新的匹配算法(穆)
* @param city
* @param address
* @param category
* @param useMap
* @return
*/
JSONObject newMatch(String city, String address, String category, boolean useMap );
}
@@ -866,6 +866,35 @@ public class AddressMatchProxyServiceImpl extends AbstractHttpApiService impleme
}
}
@Override
public JSONObject newMatch(String city, String address, String category, boolean useMap ){
HttpRequest request = new HttpRequest();
JSONObject json = null;
Map<String, String> params = new HashMap<String, String>();
params.put("city", city);
params.put("address", address);
if(StringUtils.isNotBlank(category)){
params.put("category", category);
}
params.put("useMap", String.valueOf(useMap));
try {
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaNlpService/match", params, "UTF-8");
} catch (Exception e) {
try {
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaNlpService/match", params, "UTF-8");
} catch (Exception ex) {
ex.printStackTrace();
}
}
if (json != null && json.size()>0) {
return (JSONObject)json;
}
return null;
}
public void setHouseLoudongService(HouseLoudongService houseLoudongService) {
this.houseLoudongService = houseLoudongService;
}
@@ -99,6 +99,15 @@ public interface DistrictSellStatService {
* @return
*/
Long findCityMarkDownDistrictCount(String city);
/**
* 查找最新一期的月度增价
* @param city
* @param region
* @param name
* @return
*/
DistrictSellStat findFirstByParams(String city, String region,String name);
}
@@ -219,4 +219,17 @@ public class DistrictSellStatServiceImpl implements DistrictSellStatService {
params.add(new QueryParam("mom", QueryParam.LESS_THAN_OPERATOR, 0));
return districtSellStatDao.findCountByParams(params);
}
@Override
public DistrictSellStat findFirstByParams(String city, String region,String name) {
List<QueryParam> queryParams = ImmutableList.of(
new QueryParam("city", city),
new QueryParam("region", region),
new QueryParam("districtName", name)
);
List<SortParam> sortParams = ImmutableList.of(
new SortParam("date", false)
);
return districtSellStatDao.findFirstByParams(queryParams, sortParams);
}
}
@@ -2014,6 +2014,13 @@ public class DistrictServiceImpl implements DistrictService {
if (city == null){
return null;
}
if(RegionData.isRegion(city, region)){
region = RegionData.formatRegion(city, region);
}
if(region == null){
return null;
}
District districtInfo = findDistrict(new DistrictKey(city, region, name), target);
// 先精确查询,查不到再根据别名匹配
if (districtInfo != null) {
@@ -2449,6 +2456,7 @@ public class DistrictServiceImpl implements DistrictService {
List<QueryParam> params = new ArrayList<QueryParam>();
params.add(new QueryParam("category", "district"));
params.add(new QueryParam("city", district.getCity()));
params.add(new QueryParam("estateType2", district.getEstateType2()));
params.add(new QueryParam("visible", 0));
SdQuery sdQuery = new SdQuery();
sdQuery.setPoint((double) district.getLat() / 10000000000.0 + "," + (double) district.getLng() / 10000000000.0);
@@ -2456,7 +2464,7 @@ public class DistrictServiceImpl implements DistrictService {
sdQuery.setDistance(String.valueOf((double) radiusMeters / 1000.0));
params.add(new QueryParam(QueryParam.SD_PARAM_NAME, sdQuery));
List<District> list = districtDao.findAllByParams(params, null, 0, limit * 2,
new String[] { "city", "region", "name", "estateType2", "id" });
new String[] { "city", "region", "name", "estateType2", "id","lat","lng" });
if (list.isEmpty()) {
return Collections.emptyList();
}
@@ -8,6 +8,7 @@ import java.util.Map;
import com.fangjia.dal.FacetQuery;
import com.fangjia.dal.common.DistrictKey;
import com.fangjia.dal.datastore.model.RentHouse;
import com.fangjia.dal.seawater.model.Seawater;
import com.fangjia.datastore.driver.FacetResult;
import com.fangjia.service.bo.HousePDSBo;
import com.fangjia.service.bo.HouseScorer;
@@ -473,5 +474,32 @@ public interface HouseService extends ModeService<String, HouseBo> {
List<House> findNearestHasHouseByLocation(String city, Double lat, Double lng, String cat, int radiusMeters, int limit);
/**
* 查询自身房源
* @param district
* @param cat
* @param startTime
* @param endTime
* @param startPrie
* @param endPrice
* @param pager
* @return
*/
List<Seawater> findSelfHouseByParams(District district, String cat, Integer startTime, Integer endTime, Integer startPrie, Integer endPrice, String estateType, Pager pager);
/**
* 根据经纬度查周边样本
* @param lng
* @param lat
* @param startTime
* @param endTime
* @param startPrie
* @param endPrice
* @param pager
* @param radius
* @return
*/
List<Seawater> findArroundHouseByParams(String cat, Double lng, Double lat, Integer startTime, Integer endTime, Integer startPrie, Integer endPrice, String estateType, Pager pager, Integer radius);
}
@@ -11,16 +11,18 @@ import com.fangjia.dal.datastore.model.House;
import com.fangjia.dal.datastore.model.RentHouse;
import com.fangjia.dal.mongo.dao.UserHouseDao;
import com.fangjia.dal.mongo.fangjia.model.ServerArea;
import com.fangjia.dal.mongo.model.DistrictStat;
import com.fangjia.dal.mongo.model.FangjiaOfficialAreaMap;
import com.fangjia.dal.mongo.model.UserHouse;
import com.fangjia.dal.mongo.model.bkoff.DealPrice;
import com.fangjia.dal.seawater.dao.SeawaterDao;
import com.fangjia.dal.seawater.model.Seawater;
import com.fangjia.dal.seaweed.model.District;
import com.fangjia.datastore.driver.DSCollection;
import com.fangjia.datastore.driver.DataStore;
import com.fangjia.datastore.driver.FacetResult;
import com.fangjia.service.api.KnowbaseService;
import com.fangjia.service.bo.HouseBo;
import com.fangjia.service.bo.HousePDSBo;
import com.fangjia.service.bo.HouseScorer;
import com.fangjia.service.bo.KnowbaseBo;
import com.fangjia.service.bo.*;
import com.fangjia.service.common.SellSimilar;
import com.fangjia.service.datastore.bean.HouseQueryBean;
import com.fangjia.service.district.DistrictStatService;
@@ -31,6 +33,7 @@ import com.fangjia.service.menu.Menu;
import com.fangjia.service.mode.ModeEnum;
import com.fangjia.service.mongo.fangjia.MetroService;
import com.fangjia.service.query.QueryBean;
import com.fangjia.service.util.CommonUtils;
import com.fangjia.service.util.ServiceUtil;
import com.fangjia.service.util.SitenameUtil;
import com.fangjia.service.web.MenuService;
@@ -38,6 +41,7 @@ import com.mongodb.BasicDBObject;
import com.mongodb.DBObject;
import org.apache.commons.lang.StringUtils;
import org.apache.lucene.index.Term;
import org.apache.lucene.search.BooleanClause;
import org.apache.lucene.search.BooleanClause.Occur;
import org.apache.lucene.search.BooleanQuery;
import org.apache.lucene.search.Query;
@@ -83,7 +87,9 @@ public class HouseServiceImpl implements HouseService {
* 房源样本估价简洁模式检索属性
*/
private static final String[] SAMPLE_COMPACT = {"id", "city", "region", "districtName", "name", "area", "hall", "room", "toilet", "floor", "height", "direction", "fitment", "totalPrice", "url", "publishDate" };
public static String[] TAGS = new String[]{"独栋", "联排", "叠加", "双拼", "花园面积", "泳池", "别墅", "带花园", "洋房", "叠拼", "独院", "联体", "微墅", "大平墅"};
private HouseDao houseDao;
private PicService picService;
private DistrictService districtService;
@@ -94,6 +100,7 @@ public class HouseServiceImpl implements HouseService {
private BoostQueryPolicy boostQueryInformationPolicy;
private UserHouseDao userHouseDao;
private DistrictStatService districtStatService;
private SeawaterDao seawaterDao;
public FacetQueryResult<HouseBo> randomGainHouse(HouseQueryBean queryBean, int count) {
long totalCount = this.findHouseCount(queryBean);
@@ -2635,4 +2642,239 @@ public class HouseServiceImpl implements HouseService {
return list;
}
@Override
public List<Seawater> findSelfHouseByParams(District district, String cat, Integer startTime, Integer endTime, Integer startPrie, Integer endPrice, String estateType, Pager pager) {
SeawaterQuery query = new SeawaterQuery();
// 先用名字查自身的样本
query.setCityDisplay(district.getCity());
query.setRegion(district.getRegion());
query.setDistrictName(district.getName());
query.setCat(cat);
query.setStartDate(startTime);
query.setEndDate(endTime);
if(StringUtils.isNotBlank(estateType)){
query.setEstateType(estateType);
}
if (startPrie != null) {
query.setStartPrice(startPrie);
}
if(endPrice != null){
query.setEndPrice(endPrice);
}
query.setPager(pager);
query.setSortField("p_date");
query.setOrder(false);
query.setTable("latest_seawater");
// if(StringUtils.isNotBlank(estateType)){
List<Seawater> seawaters = seawaterDao.findSeawatersByQuery(query);
List<Seawater> houses = new ArrayList<Seawater>();
for(Seawater s : seawaters){
if(StringUtils.isNotBlank(district.getEstateType2())){
if (district.getEstateType2().equals("普通住宅")) {//01:普通住宅 02:别墅
if (StringUtils.isNotBlank(s.getEstateType()) && s.getEstateType().contains("别墅")) {
continue;
}
if (isVilla(s.getArea(), s.getName(), s.getHeight(), s.getRoom())) {
continue;
}
houses.add(s);
} else if (district.getEstateType2().equals("别墅")) {
if (s.getHeight() != null && s.getHeight() >= 10) {
continue;
}
if (s.getFloor() != null && s.getFloor() >= 10) {
continue;
}
if (s.getArea()<=150) {
continue;
}
houses.add(s);
}
}
}
return houses;
// }
// return seawaterDao.findSeawatersByQuery(query);
}
@Override
public List<Seawater> findArroundHouseByParams(String cat, Double lng, Double lat, Integer startTime, Integer endTime, Integer startPrie, Integer endPrice, String estateType, Pager pager, Integer radius) {
SeawaterQuery query = new SeawaterQuery();
query.setLat(lat);
query.setLng(lng);
query.setRadius(radius);
query.setCat(cat);
query.setStartDate(startTime);
query.setEndDate(endTime);
if (startPrie != null) {
query.setStartPrice(startPrie);
}
if(endPrice != null){
query.setEndPrice(endPrice);
}
if(StringUtils.isNotBlank(estateType)){
query.setEstateType(estateType);
}
query.setPager(pager);
query.setSortField("p_date");
query.setOrder(false);
query.setTable("latest_seawater");
return seawaterDao.findSeawatersByQuery(query);
}
/**
*
* @param estateType 用户查询物业类型
* @param startDate
* @return
*/
private List<SampleWrapper> findByDistrict(District district, List<String> keys, List<String> names, Date startDate, Integer startPrice, Integer endPrice) {
//改为从ES 查房源
ArrayList<String> districtNames = new ArrayList<String>();
BooleanQuery nameQuery = new BooleanQuery();
int c = 0;
for (String namekey : keys) {
if (StringUtils.isNotBlank(namekey)) {
namekey = ClientUtils.escapeQueryChars(namekey);
if (namekey.contains("_")) {
districtNames.add(namekey.split("_")[0]);
}
c++;
nameQuery.add(new TermQuery(new Term("districtname_key", namekey)), BooleanClause.Occur.SHOULD);
}
}
List<SampleWrapper> samples = new ArrayList<SampleWrapper>();
List<SampleWrapper> nolianjiaSamples = new ArrayList<SampleWrapper>();
List<QueryParam> houseQuery = new ArrayList<QueryParam>();
houseQuery.add(new QueryParam("city", district.getCity()));
houseQuery.add(new QueryParam("region", district.getRegion()));
SeawaterQuery seawaterQuery = new SeawaterQuery();
if (startPrice!=null && startPrice>0) {
houseQuery.add(new QueryParam("avgPrice", QueryParam.GREATER_THAN_EQUAL_OPERATOR, startPrice));
}
if(endPrice!=null && endPrice>0){
houseQuery.add(new QueryParam("avgPrice", QueryParam.LESS_THAN_EQUAL_OPERATOR, endPrice));
}
if (nameQuery.clauses().isEmpty()) {
return samples;
}
BooleanQuery srQuery = new BooleanQuery();
srQuery.add(nameQuery, BooleanClause.Occur.MUST);
houseQuery.add(new QueryParam("$sr", new SrQuery(srQuery)));
if (startDate != null) {
houseQuery.add(new QueryParam("publishDate", QueryParam.GREATER_THAN_OPERATOR, startDate));
}
List<SortParam> houseSortParams = new ArrayList<SortParam>();
houseSortParams.add(new SortParam("publishDate", false));
seawaterQuery.setCityDisplay(district.getCity());
seawaterQuery.setDistrictAlias(names);
seawaterQuery.setRegion(district.getRegion());
seawaterQuery.setDistrictName(district.getName());
seawaterQuery.setSortField("p_date");
seawaterQuery.setOrder(false);
Pager pager = new Pager(0, 200);
pager.setPageSize(200);
seawaterQuery.setTable("latest_seawater");
seawaterQuery.setPager(pager);
seawaterQuery.setCat("sell");
List<Seawater> seawaters = seawaterDao.findSeawatersByQuery(seawaterQuery);
List<House> houses = CommonUtils.transformListV(House.class, seawaters);
int height = 0;
int maxFloor = 0;
boolean allSampleHasHeight = true;
for (House house : houses) {
if (StringUtils.isNotBlank(district.getEstateType2()) && district.getEstateType2().equals("普通住宅")) {//01:普通住宅 02:别墅
if (StringUtils.isNotBlank(house.getEstateType()) && house.getEstateType().contains("别墅")) {
continue;
}
if (isVilla(house.getArea(), house.getName(), house.getHeight(), house.getRoom())) {
continue;
}
} else if (StringUtils.isNotBlank(district.getEstateType2()) && district.getEstateType2().equals("别墅")) {
if (house.getHeight() != null && house.getHeight() >= 10) {
continue;
}
if (house.getFloor() != null && house.getFloor() >= 10) {
continue;
}
}
SampleWrapper sample = null;//convertHouse2Sample(house);
if (isAvailableSample(sample)) {
if (house.getUrl().contains("lianjia.com") || house.getUrl().contains("ke.com")) {
samples.add(sample);
} else {
nolianjiaSamples.add(sample);
}
}
}
return samples;
}
/**
* 判断样本是否可用
*
* @param sample
* @return
*/
private boolean isAvailableSample(SampleWrapper sample) {
if (sample.getStrctureArea() > 500 || sample.getStrctureArea() < 10) {
return false;
}
return true;
}
/**
* 是否是别墅
*
* @return
*/
public boolean isVilla(Double area, String name, Integer height, Integer room) {
if (area == null) {
return false;
}
if (area >= 150 && StringUtils.indexOfAny(name, TAGS) > -1) {
return true;
}
boolean ret = false;
if (height != null && room != null) {
if (height <= 3) {
if (area > 200 && room >= 5) {
ret = true;
}
}
} else if (height == null && room != null) {
if (area > 360 && room >= 6) {
ret = true;
}
} else if (height == null && room == null) {
if (area > 500) {
ret = true;
}
}
return ret;
}
public void setSeawaterDao(SeawaterDao seawaterDao) {
this.seawaterDao = seawaterDao;
}
}
@@ -197,9 +197,6 @@ public class OfficeServiceImpl implements OfficeService {
params.add(new QueryParam("city", evaluation.getCity()));
params.add(new QueryParam("district", evaluation.getRegion()));
params.add(new QueryParam("name", evaluation.getDistrictName()));
// 获取上个月yyyyMM日期
String date = DateUtil.formatByPattern(DateUtil.addMonthToDate(new Date(), -2), "yyyyMM");
params.add(new QueryParam("date", Integer.parseInt(date)));
// 按日期降序排序,取最新的数据,可能上月还未更新,则取上上个月的数据
List<SortParam> sortParams = new ArrayList<SortParam>();
@@ -207,7 +204,15 @@ public class OfficeServiceImpl implements OfficeService {
// 第二步:基准价*楼层系数*装修系数*朝向系数
OfficeRentStat officeRentStat = officeRentStatDao.findFirstByParams(params);
Double avgPrice = officeRentStat.getAvgPrice();
// if(officeRentStat == null){
// // 获取上个月yyyyMM日期
// String date = DateUtil.formatByPattern(DateUtil.addMonthToDate(new Date(), -1), "yyyyMM");
// params.add(new QueryParam("date", Integer.parseInt(date)));
// }
Double avgPrice = null;
if(officeRentStat != null){
avgPrice = officeRentStat.getAvgPrice();
}
if (avgPrice != null) {
Double factor = 1.0;
if (evaluation.getFitment() != null) {
@@ -69,6 +69,8 @@ public interface DealPriceService {
*/
public List<DealPrice> findDealPrices(List<QueryParam> params, int max);
public List<DealPrice> findDealPrices(String id, int max, Integer startPrice, Integer endPrice, Date startDate, Date endDate);
public Integer findDealPrices(String city, String region, String districtName, Date startDate, Date endDate);
public List<DealPrice> findDealPriceList(String city, String region, String districtName, Date startDate,
@@ -177,7 +177,34 @@ public class DealPriceServiceImpl implements DealPriceService {
sortParams.add(new SortParam("tradeDate", false));
return dealPriceDao.findAllByParams(params, sortParams, 0, max,
new String[] { "city", "region", "districtName", "avgPrice", "fitment", "area", "totalPrice",
"tradeDate", "source", "room", "hall", "toilet", "height", "floor" });
"tradeDate", "source", "room", "hall", "toilet", "height", "floor","direction" });
}
@Override
public List<DealPrice> findDealPrices(String id, int max, Integer startPrice, Integer endPrice, Date startDate, Date endDate) {
List<QueryParam> params = new ArrayList<QueryParam>();
params.add(new QueryParam("tradeDate", QueryParam.GREATER_THAN_EQUAL_OPERATOR, DateUtil.add(new Date(), -6)));
params.add(new QueryParam("matchId", id));
if(startPrice!=null && startPrice>0){
params.add(new QueryParam("avgPrice", QueryParam.GREATER_THAN_EQUAL_OPERATOR, startPrice));
}
if(startPrice!=null && startPrice>0){
params.add(new QueryParam("avgPrice", QueryParam.LESS_THAN_EQUAL_OPERATOR, endPrice));
}
if(startDate!=null){
params.add(new QueryParam("tradeDate", QueryParam.GREATER_THAN_EQUAL_OPERATOR, startDate));
}
if(endDate!=null){
params.add(new QueryParam("tradeDate", QueryParam.LESS_THAN_EQUAL_OPERATOR, endDate));
}
List<SortParam> sortParams = new ArrayList<SortParam>();
sortParams.add(new SortParam("tradeDate", false));
return dealPriceDao.findAllByParams(params, sortParams, 0, max,
new String[] { "city", "region", "districtName", "avgPrice", "fitment", "area", "totalPrice",
"tradeDate", "source", "room", "hall", "toilet", "height", "floor","direction" });
}
@Override
@@ -105,7 +105,6 @@ public class EmppSmsService implements SmsService {
private void doSend(final String mobile, final String messageContent, final boolean isForRongshidai) throws SmsException {
try {
DingDingMessageUtil.sendTextMessage(messageContent);
jmsTemplate.send(smsOutgoingDestination, new MessageCreator() {
public Message createMessage(Session session) throws JMSException {
ActiveMQObjectMessage message = new ActiveMQObjectMessage();
@@ -103,7 +103,7 @@
<a href="#" class="grey9c">关于我们</a>
<a href="#" class="grey9c nb">关于我们</a>
</p>
<p class="copyrights bg">客服热线:4001883787 电子邮箱:service@fangjia.com<br />
<p class="copyrights bg">客服热线:021-62393138 电子邮箱:service@fangjia.com<br />
&copy;2006-2013 房价网 版权所有 沪ICP备10203734号-1</p>
<p class="fj-search">找房子,估房价,百度 房价网</p>
</div>
@@ -1,6 +1,6 @@
<div class="footer">
<div class="split"></div>
<div class="content fcgrey2">
客服热线:4001883787&nbsp;&nbsp;电子邮箱:service@fangjia.com<br />
<span class="copy">&copy;</span>&nbsp;2006-2011 房价网 版权所有 沪ICP备10203734号-1</div>
客服热线:021-62393138&nbsp;&nbsp;电子邮箱:service@fangjia.com<br />
<span class="copy">&copy;</span>&nbsp;2006-2026 房价网 版权所有 沪ICP备10203734号-1</div>
</div>
@@ -39,7 +39,7 @@
替您量身搜索合适的银行产品<br />
直接电话联系银行业务人员<br />
让您贷款不再费劲<br />
房价网客服:4001883787</p>
房价网客服:021-62393138</p>
</div>
</div>
<div class="clr"></div>