Merge branch 'master' of http://gitlab.fangjia.com/dev0/main into script_gj
This commit is contained in:
@@ -102,6 +102,8 @@ public class FjtEvaluation implements SqlEntity{
|
||||
|
||||
private String finishDateStr;//竣工时间
|
||||
private String useType;//房屋用途
|
||||
|
||||
private Date downPdfDate;//下载报告时间
|
||||
|
||||
@GeneratedValue(strategy = GenerationType.AUTO)
|
||||
@Id
|
||||
@@ -750,6 +752,16 @@ public class FjtEvaluation implements SqlEntity{
|
||||
this.useType = useType;
|
||||
}
|
||||
|
||||
|
||||
@Column(name = "down_pdf_date")
|
||||
public Date getDownPdfDate() {
|
||||
return downPdfDate;
|
||||
}
|
||||
|
||||
public void setDownPdfDate(Date downPdfDate) {
|
||||
this.downPdfDate = downPdfDate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "FjtEvaluation{" +
|
||||
|
||||
@@ -38,6 +38,7 @@ public class OpenConfig extends Configuration {
|
||||
|
||||
private final String ipdatfile;
|
||||
private final String baiduAk;
|
||||
private final String defaultCity;
|
||||
|
||||
private final boolean isOpenAllAuthority;
|
||||
|
||||
@@ -54,6 +55,7 @@ public class OpenConfig extends Configuration {
|
||||
baiduAk = configuration.get("fangjia.baidu.ak");
|
||||
isOpenAllAuthority = configuration.getBoolean("fangjia.isOpenAllAuthority", false);
|
||||
enabledAddressMatch = configuration.getBoolean("fangjia.addressMatch.enabled",false);
|
||||
defaultCity = configuration.get("fangjia.default.city");
|
||||
}
|
||||
|
||||
public static OpenConfig getConfig() {
|
||||
@@ -134,4 +136,7 @@ public class OpenConfig extends Configuration {
|
||||
return enabledAddressMatch;
|
||||
}
|
||||
|
||||
public String getDefaultCity() {
|
||||
return defaultCity;
|
||||
}
|
||||
}
|
||||
|
||||
+181
@@ -89,6 +89,7 @@ import com.fangjia.service.mongo.fangjia.ServerAreaService;
|
||||
import com.fangjia.service.open.WaitCrawlKeywordsService;
|
||||
import com.fangjia.service.sql.FjtEvaluationService;
|
||||
import com.fangjia.service.web.AddressService;
|
||||
import org.sothis.web.mvc.annotation.Param;
|
||||
|
||||
@Authority(role = Role.USER)
|
||||
public class AddressController {
|
||||
@@ -106,6 +107,7 @@ public class AddressController {
|
||||
private HouseLoudongService houseLoudongService;
|
||||
private FjtEvaluationService fjtEvaluationService;
|
||||
private AddressMatchProxyService addressMatchProxyService;
|
||||
|
||||
private final static String AK = OpenConfig.getConfig().getBaiduAk();
|
||||
private final static Logger LOGGER = LoggerFactory.getLogger(AddressController.class);
|
||||
|
||||
@@ -117,6 +119,8 @@ public class AddressController {
|
||||
private static final String GRADE_NATION = "全国评分";
|
||||
private static final String GRADE_CONSUME = "消费评分";
|
||||
|
||||
public final static OpenConfig CONFIG = OpenConfig.getConfig();
|
||||
|
||||
/**
|
||||
* @deprecated see parse2Action
|
||||
* @param model
|
||||
@@ -1705,6 +1709,183 @@ public class AddressController {
|
||||
return mav;
|
||||
}
|
||||
|
||||
/**
|
||||
* 地址标准化接口V2
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
public Object standard2Action(AddesssMatchModel model) {
|
||||
|
||||
RestfulModelAndView mav = new RestfulModelAndView();
|
||||
if (StringUtils.isBlank(model.getAddress())) {
|
||||
mav.setModel(BasicModel.buildBadRequestModel("地址不能为空"));
|
||||
return mav;
|
||||
}
|
||||
|
||||
HttpRequest request = new HttpRequest();
|
||||
JSONObject json = null;
|
||||
Map<String, String> params = new HashMap<String, String>();
|
||||
params.put("city", StringUtils.isNotBlank(model.getCity()) ? model.getCity() : CONFIG.getDefaultCity());
|
||||
params.put("address", model.getAddress());
|
||||
try{
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/structure", params, "UTF-8");
|
||||
} catch(Exception e){
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/structure", params, "UTF-8");
|
||||
} catch(Exception ex){
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
if (json != null) {
|
||||
int code = json.getInt("status");
|
||||
String msg = json.getString("msg");
|
||||
BasicModel basicModel = new BasicModel(code, msg);
|
||||
if(json.containsKey("result")){
|
||||
basicModel.setResult(json.get("result"));
|
||||
}
|
||||
mav.setModel(basicModel);
|
||||
} else {
|
||||
mav.setModel(BasicModel.buildServerErrorModel().setMsg("服务升级中..."));
|
||||
}
|
||||
return mav;
|
||||
}
|
||||
|
||||
/**
|
||||
* 五级地址标准化接口
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
public Object fiveDivisionStructureAction(AddesssMatchModel model) {
|
||||
|
||||
RestfulModelAndView mav = new RestfulModelAndView();
|
||||
if (StringUtils.isBlank(model.getAddress())) {
|
||||
mav.setModel(BasicModel.buildBadRequestModel("地址不能为空"));
|
||||
return mav;
|
||||
}
|
||||
|
||||
HttpRequest request = new HttpRequest();
|
||||
JSONObject json = null;
|
||||
Map<String, String> params = new HashMap<String, String>();
|
||||
params.put("city", StringUtils.isNotBlank(model.getCity()) ? model.getCity() : CONFIG.getDefaultCity());
|
||||
params.put("address", model.getAddress());
|
||||
// 地址验证无效也输出标准化结果
|
||||
params.put("flag", "true");
|
||||
try{
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/fiveDivisionStructure", params, "UTF-8");
|
||||
} catch(Exception e){
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/fiveDivisionStructure", params, "UTF-8");
|
||||
} catch(Exception ex){
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
if (json != null) {
|
||||
int code = json.getInt("status");
|
||||
String msg = json.getString("msg");
|
||||
BasicModel basicModel = new BasicModel(code, msg);
|
||||
if(json.containsKey("result")){
|
||||
basicModel.setResult(json.get("result"));
|
||||
}
|
||||
mav.setModel(basicModel);
|
||||
} else {
|
||||
mav.setModel(BasicModel.buildServerErrorModel().setMsg("服务升级中..."));
|
||||
}
|
||||
return mav;
|
||||
}
|
||||
|
||||
/**
|
||||
* 详细地址标准化接口
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
public Object divisionStructureAction(AddesssMatchModel model) {
|
||||
|
||||
RestfulModelAndView mav = new RestfulModelAndView();
|
||||
if (StringUtils.isBlank(model.getAddress())) {
|
||||
mav.setModel(BasicModel.buildBadRequestModel("地址不能为空"));
|
||||
return mav;
|
||||
}
|
||||
|
||||
HttpRequest request = new HttpRequest();
|
||||
JSONObject json = null;
|
||||
Map<String, String> params = new HashMap<String, String>();
|
||||
params.put("city", StringUtils.isNotBlank(model.getCity()) ? model.getCity() : CONFIG.getDefaultCity());
|
||||
params.put("address", model.getAddress());
|
||||
// 地址验证无效也输出标准化结果
|
||||
params.put("flag", "true");
|
||||
try{
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/divisionStructure", params, "UTF-8");
|
||||
} catch(Exception e){
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/divisionStructure", params, "UTF-8");
|
||||
} catch(Exception ex){
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
if (json != null) {
|
||||
int code = json.getInt("status");
|
||||
String msg = json.getString("msg");
|
||||
BasicModel basicModel = new BasicModel(code, msg);
|
||||
if(json.containsKey("result")){
|
||||
basicModel.setResult(json.get("result"));
|
||||
}
|
||||
mav.setModel(basicModel);
|
||||
} else {
|
||||
mav.setModel(BasicModel.buildServerErrorModel().setMsg("服务升级中..."));
|
||||
}
|
||||
return mav;
|
||||
}
|
||||
|
||||
/**
|
||||
* 地址标准化专用测试接口
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
public Object structureForTestAction(AddesssMatchModel model) {
|
||||
|
||||
RestfulModelAndView mav = new RestfulModelAndView();
|
||||
if (StringUtils.isBlank(model.getAddress())) {
|
||||
mav.setModel(BasicModel.buildBadRequestModel("地址不能为空"));
|
||||
return mav;
|
||||
}
|
||||
|
||||
HttpRequest request = new HttpRequest();
|
||||
JSONObject json = null;
|
||||
Map<String, String> params = new HashMap<String, String>();
|
||||
params.put("city", StringUtils.isNotBlank(model.getCity()) ? model.getCity() : CONFIG.getDefaultCity());
|
||||
params.put("address", model.getAddress());
|
||||
// 地址验证无效也输出标准化结果
|
||||
params.put("flag", "true");
|
||||
try{
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/structureForTest", params, "UTF-8");
|
||||
} catch(Exception e){
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/structureForTest", params, "UTF-8");
|
||||
} catch(Exception ex){
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
if (json != null) {
|
||||
int code = json.getInt("status");
|
||||
String msg = json.getString("msg");
|
||||
BasicModel basicModel = new BasicModel(code, msg);
|
||||
if(json.containsKey("result")){
|
||||
basicModel.setResult(json.get("result"));
|
||||
}
|
||||
mav.setModel(basicModel);
|
||||
} else {
|
||||
mav.setModel(BasicModel.buildServerErrorModel().setMsg("服务升级中..."));
|
||||
}
|
||||
return mav;
|
||||
}
|
||||
|
||||
public Object similarityAction(AddesssMatchModel model) {
|
||||
RestfulModelAndView mav = new RestfulModelAndView();
|
||||
if (StringUtils.isBlank(model.getAddress_1()) || StringUtils.isBlank(model.getAddress_2())) {
|
||||
|
||||
+1
-1
@@ -2363,7 +2363,7 @@ public class PropertyController {
|
||||
mav.setModel(BasicModel.buildBadRequestModel("size(面积)不能为空"));
|
||||
return mav;
|
||||
}
|
||||
District district = districtService.findByNameAndAlias(model.getCity(), model.getDistrict(), model.getName(),
|
||||
District district = districtService.findByNameAndAlias(model.getCity(), model.getDistrict(), model.getName().replace(" ",""),
|
||||
"district");
|
||||
if (null == district) {
|
||||
mav.setModel(BasicModel.buildBadRequestModel("该小区不存在"));
|
||||
|
||||
+9
-2
@@ -462,8 +462,14 @@ public class WeiXinEvaluationController {
|
||||
}else if(bhDists.size()>1){
|
||||
int mod = Integer.MAX_VALUE;
|
||||
for(JSONObject jo : bhDists){
|
||||
double price = Double.valueOf((String)jo.get("price"));
|
||||
int bhprice = (int)price;
|
||||
int bhprice = 0;
|
||||
if (jo.get("price") == null || jo.get("price").equals("null")) {
|
||||
bhprice = 0;
|
||||
} else {
|
||||
double price = Double.valueOf((String)jo.get("price"));
|
||||
bhprice = (int)price;
|
||||
}
|
||||
|
||||
int bhmod = Math.abs(bhprice - avgPrice);
|
||||
if(bhmod<mod){
|
||||
mod = bhmod;
|
||||
@@ -1025,6 +1031,7 @@ public class WeiXinEvaluationController {
|
||||
|
||||
String reporNum = "147698"+ String.valueOf(evaluation.getId());
|
||||
evaluation.setReportNum(reporNum);
|
||||
evaluation.setDownPdfDate(new Date());
|
||||
fjtEvaluationService.updateEvaluation(evaluation);
|
||||
|
||||
try {
|
||||
|
||||
@@ -441,7 +441,7 @@ public class BHBankUtils {
|
||||
Map params = new HashMap();
|
||||
params.put("queryId",queryId);
|
||||
if(StringUtils.isNotBlank(reportMsg)){
|
||||
params.put("reportMsg",reportMsg);
|
||||
params.put("reportMsg",reportMsg.replace(" ",""));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -100,4 +100,5 @@ fangjia.jms.email.queue=email.queue
|
||||
|
||||
fangjia.redis_nodes=192.168.0.79:6379,192.168.0.79:6380,192.168.0.79:6381,192.168.0.81:6382,192.168.0.81:6383,192.168.0.81:6384
|
||||
|
||||
fangjia.fangjiatong.url = http://user.fangjia.com/fangjiatong2
|
||||
fangjia.fangjiatong.url = http://user.fangjia.com/fangjiatong2
|
||||
fangjia.default.city = \u91CD\u5E86\u5E02
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<urlrewrite>
|
||||
<global-params>
|
||||
<param value="st" name="sort" type="attach"/>
|
||||
<param value="pn" name="pager.currentPage" type="attach"/>
|
||||
<!-- <param value="st" name="sort" type="attach"/>-->
|
||||
<!-- <param value="pn" name="pager.currentPage" type="attach"/>-->
|
||||
</global-params>
|
||||
<rules>
|
||||
<rule controller="city" action="condition2" channel="v2">
|
||||
@@ -33,5 +33,10 @@
|
||||
<ladder>/property/avgPrice</ladder>
|
||||
</ladders>
|
||||
</rule>
|
||||
<rule controller="address" action="standard2" channel="v2">
|
||||
<ladders>
|
||||
<ladder>/address/standard</ladder>
|
||||
</ladders>
|
||||
</rule>
|
||||
</rules>
|
||||
</urlrewrite>
|
||||
@@ -152,7 +152,8 @@ $(document).on('click', '.create-actions03', function () {
|
||||
$("#buildType").val("8")
|
||||
$("#houseFloor").show()
|
||||
$("#floorDesc").hide()
|
||||
$("#basementAreaLi").hide()
|
||||
$("#basementAreaLi").show()
|
||||
$("#basementAreaLi_intr").show()
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -163,6 +164,7 @@ $(document).on('click', '.create-actions03', function () {
|
||||
$("#floorDesc").show()
|
||||
// $("#houseFloor").hide()
|
||||
$("#basementAreaLi").show()
|
||||
$("#basementAreaLi_intr").show()
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -173,6 +175,7 @@ $(document).on('click', '.create-actions03', function () {
|
||||
$("#floorDesc").show()
|
||||
// $("#houseFloor").hide()
|
||||
$("#basementAreaLi").show()
|
||||
$("#basementAreaLi_intr").show()
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -183,6 +186,7 @@ $(document).on('click', '.create-actions03', function () {
|
||||
$("#floorDesc").show()
|
||||
// $("#houseFloor").hide()
|
||||
$("#basementAreaLi").show()
|
||||
$("#basementAreaLi_intr").show()
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -193,6 +197,7 @@ $(document).on('click', '.create-actions03', function () {
|
||||
$("#floorDesc").show()
|
||||
// $("#houseFloor").hide()
|
||||
$("#basementAreaLi").show()
|
||||
$("#basementAreaLi_intr").show()
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -203,6 +208,7 @@ $(document).on('click', '.create-actions03', function () {
|
||||
$("#floorDesc").show()
|
||||
// $("#houseFloor").hide()
|
||||
$("#basementAreaLi").show()
|
||||
$("#basementAreaLi_intr").show()
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -213,6 +219,7 @@ $(document).on('click', '.create-actions03', function () {
|
||||
$("#floorDesc").show()
|
||||
// $("#houseFloor").hide()
|
||||
$("#basementAreaLi").show()
|
||||
$("#basementAreaLi_intr").show()
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -223,6 +230,7 @@ $(document).on('click', '.create-actions03', function () {
|
||||
$("#floorDesc").show()
|
||||
// $("#houseFloor").hide()
|
||||
$("#basementAreaLi").hide()
|
||||
$("#basementAreaLi_intr").hide()
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -233,6 +241,7 @@ $(document).on('click', '.create-actions03', function () {
|
||||
$("#houseFloor").show()
|
||||
// $("#floorDesc").hide()
|
||||
$("#basementAreaLi").hide()
|
||||
$("#basementAreaLi_intr").hide()
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
@@ -172,6 +172,13 @@
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li id="basementAreaLi_intr" style="color:#999;" class="dn">
|
||||
<div class="item-content">
|
||||
<div class="item-inner">
|
||||
*建筑面积中含有地下附属面积
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<#if role?? && role==17 && loanInfoMap??>
|
||||
<p style="margin-top:-12px;">所属分类:${loanInfoMap.type!}类</p>
|
||||
<p style="margin-top:-10px;">可贷成数:${loanInfoMap.loan_ratio!}成</p>
|
||||
<p style="margin-top:-22px;">可贷金额:<strong class="price_final">${(fjtEvaluation.totalPrice*loanInfoMap.loan_ratio*0.1/10000)?string('0.##')}</strong>万元</p>
|
||||
<p style="margin-top:-22px;">可贷金额:<strong class="price_final">${(bohaiEvaluationAudit.inquirePrice*loanInfoMap.loan_ratio*0.1/10000)?string('0.##')}</strong>万元</p>
|
||||
<p style="margin-top:-4px;">贷款利率:4.5%</p>
|
||||
</#if>
|
||||
<#else>
|
||||
@@ -88,7 +88,7 @@
|
||||
<div class="topic inputTopic01" id="inputTopic01a">
|
||||
<div class="topicTitle topicTitle01">
|
||||
<span>期望价:</span>
|
||||
<input class="input_price" type="textArea" name="dealPrice"> 万元
|
||||
<input class="input_price" type="textArea" name="dealPrice" <#if userTrades??>disabled</#if>> 万元
|
||||
<a class="submit_btn" id="submitbhPrice" style="border-left: none;">提交</a>
|
||||
<a class="submit_btn dn" id="refreshbhPrice" style="border-left: none;">刷新</a>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user