Merge branch 'master' of http://gitlab.fangjia.com/dev0/main
This commit is contained in:
@@ -19,6 +19,7 @@
|
|||||||
<modules>
|
<modules>
|
||||||
<module>../../projects/fangjia-core</module>
|
<module>../../projects/fangjia-core</module>
|
||||||
<module>../../projects/fangjia-dal</module>
|
<module>../../projects/fangjia-dal</module>
|
||||||
|
<module>../../projects/chafangtong-dal</module>
|
||||||
<module>../../projects/fangjia-service</module>
|
<module>../../projects/fangjia-service</module>
|
||||||
<module>../../projects/geluke-dal</module>
|
<module>../../projects/geluke-dal</module>
|
||||||
<module>../../projects/geluke-service</module>
|
<module>../../projects/geluke-service</module>
|
||||||
|
|||||||
@@ -39,13 +39,15 @@ spec:
|
|||||||
name: web
|
name: web
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
tcpSocket:
|
httpGet:
|
||||||
port: 8080
|
path: /k8s/readiness
|
||||||
|
port: web
|
||||||
initialDelaySeconds: 5
|
initialDelaySeconds: 5
|
||||||
periodSeconds: 10
|
periodSeconds: 10
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
tcpSocket:
|
httpGet:
|
||||||
port: 8080
|
path: /k8s/liveness
|
||||||
|
port: web
|
||||||
initialDelaySeconds: 10
|
initialDelaySeconds: 10
|
||||||
periodSeconds: 5
|
periodSeconds: 5
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
|
|||||||
@@ -0,0 +1,95 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: geluke
|
||||||
|
namespace: fangjia
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
strategy:
|
||||||
|
type: RollingUpdate
|
||||||
|
rollingUpdate:
|
||||||
|
maxSurge: 1
|
||||||
|
maxUnavailable: 0
|
||||||
|
revisionHistoryLimit: 5
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
project: geluke
|
||||||
|
app: fangjia
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
project: geluke
|
||||||
|
app: fangjia
|
||||||
|
spec:
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: nexus-registry-secret
|
||||||
|
nodeSelector:
|
||||||
|
app: fangjia
|
||||||
|
containers:
|
||||||
|
- name: geluke
|
||||||
|
image: 192.168.0.19:9012/geluke:latest
|
||||||
|
imagePullPolicy: Always
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
memory: "3Gi"
|
||||||
|
requests:
|
||||||
|
memory: "2Gi"
|
||||||
|
env:
|
||||||
|
- name: JAVA_OPTS
|
||||||
|
value: "-Xmx3072m -XX:MaxPermSize=256m
|
||||||
|
-Dlog4j.configuration=file:/home/goojia/webapps/ROOT/WEB-INF/classes/log4j_linux.xml
|
||||||
|
-Dfangjia.overridePropertiesLocation=/home/goojia/goojiaconfig/geluke.properties"
|
||||||
|
readinessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: 8080
|
||||||
|
initialDelaySeconds: 10
|
||||||
|
periodSeconds: 10
|
||||||
|
livenessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: 8080
|
||||||
|
initialDelaySeconds: 10
|
||||||
|
periodSeconds: 5
|
||||||
|
ports:
|
||||||
|
- containerPort: 8080
|
||||||
|
name: web
|
||||||
|
protocol: TCP
|
||||||
|
volumeMounts:
|
||||||
|
- name: host-time
|
||||||
|
mountPath: /etc/localtime
|
||||||
|
- name: goojiaconfig
|
||||||
|
mountPath: /home/goojia/goojiaconfig
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- name: host-time
|
||||||
|
hostPath:
|
||||||
|
path: /etc/localtime
|
||||||
|
- name: goojiaconfig
|
||||||
|
cephfs:
|
||||||
|
monitors:
|
||||||
|
- 192.168.0.208:6789
|
||||||
|
- 192.168.0.209:6789
|
||||||
|
- 192.168.0.210:6789
|
||||||
|
user: admin
|
||||||
|
path: /k8s/goojiaconfig
|
||||||
|
secretRef:
|
||||||
|
name: ceph-secret
|
||||||
|
readOnly: false
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: geluke
|
||||||
|
namespace: fangjia
|
||||||
|
labels:
|
||||||
|
project: geluke
|
||||||
|
app: fangjia
|
||||||
|
spec:
|
||||||
|
type: NodePort
|
||||||
|
selector:
|
||||||
|
project: geluke
|
||||||
|
app: fangjia
|
||||||
|
ports:
|
||||||
|
- port: 8080
|
||||||
|
targetPort: 8080
|
||||||
|
nodePort: 30010
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
/**
|
|
||||||
* Created by Administrator on 2017/5/9.
|
|
||||||
*/
|
|
||||||
import com.sun.org.apache.xerces.internal.impl.io.UTF8Reader;
|
|
||||||
import com.sun.xml.internal.txw2.Document;
|
|
||||||
import sun.nio.cs.ext.GB18030;
|
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
|
||||||
import java.io.InputStreamReader;
|
|
||||||
import java.net.URL;
|
|
||||||
import java.net.URLConnection;
|
|
||||||
public class Test {
|
|
||||||
String fixture_Date = null;
|
|
||||||
String area = null;
|
|
||||||
String unit_Price = null;
|
|
||||||
String transaction_Price = null;
|
|
||||||
static String sendGet(String url) {
|
|
||||||
String result = "";
|
|
||||||
// 定义一个缓冲字符输入流
|
|
||||||
BufferedReader in = null;
|
|
||||||
try {
|
|
||||||
// 将string转成url对象
|
|
||||||
URL realUrl = new URL(url);
|
|
||||||
// 初始化一个链接到那个url的连接
|
|
||||||
URLConnection connection = realUrl.openConnection();
|
|
||||||
// 开始实际的连接
|
|
||||||
connection.connect();
|
|
||||||
// 初始化 BufferedReader输入流来读取URL的响应
|
|
||||||
in = new BufferedReader(new InputStreamReader(connection.getInputStream(),"gbk"));
|
|
||||||
// 用来临时存储抓取到的每一行的数据
|
|
||||||
String line;
|
|
||||||
while ((line = in.readLine()) != null)
|
|
||||||
{ // 遍历抓取到的每一行并将其存储到result里面
|
|
||||||
result += line;
|
|
||||||
}
|
|
||||||
Document document = Jsoup.parse(result, url);
|
|
||||||
|
|
||||||
parseListPage(document);
|
|
||||||
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
|
||||||
System.out.println("发送GET请求出现异常!" + e);
|
|
||||||
e.printStackTrace(); }
|
|
||||||
// 使用finally来关闭输入流
|
|
||||||
finally {
|
|
||||||
try {
|
|
||||||
if (in != null) {
|
|
||||||
in.close(); }
|
|
||||||
} catch (Exception e2) {
|
|
||||||
e2.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
public static void main(String[] args) {
|
|
||||||
// 定义即将访问的链接
|
|
||||||
String url = "http://dl.goufang.com/xq/1062/6";
|
|
||||||
// 访问链接并获取页面内容
|
|
||||||
String result = sendGet(url);
|
|
||||||
System.out.println(result);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.sothis</groupId>
|
<groupId>org.sothis</groupId>
|
||||||
<artifactId>sothis-core</artifactId>
|
<artifactId>sothis-core</artifactId>
|
||||||
<version>0.2.0-SNAPSHOT</version>
|
<version>0.2.0</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -154,7 +154,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.poseidon</groupId>
|
<groupId>com.poseidon</groupId>
|
||||||
<artifactId>poseidon-message</artifactId>
|
<artifactId>poseidon-message</artifactId>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>0.0.1</version>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
<exclusion>
|
<exclusion>
|
||||||
<groupId>org.mongodb</groupId>
|
<groupId>org.mongodb</groupId>
|
||||||
|
|||||||
@@ -99,7 +99,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.sothis</groupId>
|
<groupId>org.sothis</groupId>
|
||||||
<artifactId>sothis-web</artifactId>
|
<artifactId>sothis-web</artifactId>
|
||||||
<version>0.2.0-SNAPSHOT</version>
|
<version>0.2.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
|
|||||||
+1
@@ -1265,6 +1265,7 @@ public class DistrictController {
|
|||||||
district.setAddrAlias(new ArrayList<String>(addrAlias));
|
district.setAddrAlias(new ArrayList<String>(addrAlias));
|
||||||
}
|
}
|
||||||
district.setStatus(0);
|
district.setStatus(0);
|
||||||
|
district.setNameCat(0);
|
||||||
district.setCategory("district");
|
district.setCategory("district");
|
||||||
district.setPublisherType(11);
|
district.setPublisherType(11);
|
||||||
district.setCreationDate(new Date());
|
district.setCreationDate(new Date());
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package com.fangjia.bkoff.controllers;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 房价网后台存活监控
|
||||||
|
*
|
||||||
|
* @author shenjian
|
||||||
|
* @since 2021/6/7
|
||||||
|
*/
|
||||||
|
public class K8sController {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 存活检查
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Object livenessAction() {
|
||||||
|
return "liveness";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 就绪检查
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Object readinessAction() {
|
||||||
|
return "readiness";
|
||||||
|
}
|
||||||
|
}
|
||||||
+9
@@ -12,6 +12,7 @@ import com.fangjia.service.mongo.fangjia.SeawaterService;
|
|||||||
import org.apache.commons.codec.digest.DigestUtils;
|
import org.apache.commons.codec.digest.DigestUtils;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.sothis.core.util.Pager;
|
import org.sothis.core.util.Pager;
|
||||||
|
import org.sothis.web.mvc.annotation.Param;
|
||||||
|
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
@@ -116,6 +117,14 @@ public class SeawaterController {
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Object batchDeleteAction(@Param(name="ids") String ids) throws UnsupportedEncodingException {
|
||||||
|
JsonModel ret = new JsonModel();
|
||||||
|
if (StringUtils.isNotBlank(ids)){
|
||||||
|
seawaterService.deleteByIds(ids);
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
public void setSeawaterService(SeawaterService seawaterService) {
|
public void setSeawaterService(SeawaterService seawaterService) {
|
||||||
this.seawaterService = seawaterService;
|
this.seawaterService = seawaterService;
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -40,7 +40,8 @@ public class AuthInterceptor implements Interceptor {
|
|||||||
request.setAttribute("__resources", request.getSession().getAttribute(userId + "_resources"));
|
request.setAttribute("__resources", request.getSession().getAttribute(userId + "_resources"));
|
||||||
|
|
||||||
if (invocation.getAction().getController().getName().equals("login")
|
if (invocation.getAction().getController().getName().equals("login")
|
||||||
|| invocation.getAction().getController().getName().equals("")) {
|
|| invocation.getAction().getController().getName().equals("")
|
||||||
|
|| invocation.getAction().getController().getName().equals("k8s")) {
|
||||||
return invocation.invoke();
|
return invocation.invoke();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ table{text-align: left;}
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
if(role==12){
|
if(role==12||role==17){
|
||||||
if(userStr.length>0){
|
if(userStr.length>0){
|
||||||
console.log(userStr);
|
console.log(userStr);
|
||||||
$("input[name=roleUsers]").val(userStr);
|
$("input[name=roleUsers]").val(userStr);
|
||||||
@@ -306,7 +306,7 @@ $("input[name=email]").blur(function(){
|
|||||||
$("#role").change(function() {
|
$("#role").change(function() {
|
||||||
var role = $(this).val();
|
var role = $(this).val();
|
||||||
//只对农行生效
|
//只对农行生效
|
||||||
if (role == 12) {
|
if (role == 12 || role == 17) {
|
||||||
$("#show_chk_all").removeAttr("style");
|
$("#show_chk_all").removeAttr("style");
|
||||||
jQuery.ajax({
|
jQuery.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
@@ -340,12 +340,12 @@ $("input[name=email]").blur(function(){
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
<#if user?? && user.role == 12>
|
<#if user?? && (user.role == 12 || user.role == 17)>
|
||||||
$("#show_chk_all").removeAttr("style");
|
$("#show_chk_all").removeAttr("style");
|
||||||
jQuery.ajax({
|
jQuery.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
url: '../fjt/getUsersByRole',
|
url: '../fjt/getUsersByRole',
|
||||||
data: {role:12},
|
data: {role:${user.role}},
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
timeout: 100000,
|
timeout: 100000,
|
||||||
success: function(model) {
|
success: function(model) {
|
||||||
|
|||||||
@@ -118,9 +118,13 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<span style="font-size:12px;">查询到<b style="color:red;">${pager.totalRows!}</b>条记录</span>
|
<div>
|
||||||
|
<span style="font-size:12px;">查询到<b style="color:red;">${pager.totalRows!}</b>条记录</span>
|
||||||
|
<input class ="btn btn-primary" id="batchDelete" type="submit" value="批量删除" style="float: right" />
|
||||||
|
</div>
|
||||||
<table id="dataSheet" class="table table-hover table-condensed" name="reginTable">
|
<table id="dataSheet" class="table table-hover table-condensed" name="reginTable">
|
||||||
<tr>
|
<tr>
|
||||||
|
<th style="width:30px;"><input type="checkbox" id="checkAll"/>全选</th>
|
||||||
<th style="width:60px;">类型</th>
|
<th style="width:60px;">类型</th>
|
||||||
<th style="width:50px;">区域</th>
|
<th style="width:50px;">区域</th>
|
||||||
<th style="width:130px;">小区名</th>
|
<th style="width:130px;">小区名</th>
|
||||||
@@ -142,6 +146,7 @@
|
|||||||
<#if seawaterList??>
|
<#if seawaterList??>
|
||||||
<#list seawaterList as it>
|
<#list seawaterList as it>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td><input type="checkbox" name="houseCheck" value="${it.id}"/></td>
|
||||||
<td>
|
<td>
|
||||||
<#if it.category! == 'sell'>
|
<#if it.category! == 'sell'>
|
||||||
二手房
|
二手房
|
||||||
@@ -337,6 +342,46 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 全选
|
||||||
|
$("#checkAll").click(function(){
|
||||||
|
$('input[name="houseCheck"]').each(function() {
|
||||||
|
var _this = this
|
||||||
|
if (_this.checked == true) {
|
||||||
|
_this.checked = false
|
||||||
|
} else {
|
||||||
|
_this.checked = true
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
$("#batchDelete").click(function(){
|
||||||
|
if(confirm('确认要删除所选的数据吗?')) {
|
||||||
|
var ids = "";
|
||||||
|
$('input:checkbox[name=houseCheck]:checked').each(function() {
|
||||||
|
var _this = $(this);
|
||||||
|
ids += _this.val() + ","
|
||||||
|
});
|
||||||
|
if (ids == "") {
|
||||||
|
alert("请选择数据")
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
jQuery.ajax({
|
||||||
|
type: 'POST',
|
||||||
|
url: '../seawater/batchDelete',
|
||||||
|
data:{ids:ids},
|
||||||
|
dataType: 'json',
|
||||||
|
timeout: 100000,
|
||||||
|
success: function(model) {
|
||||||
|
alert("批量删除操作成功");
|
||||||
|
location.reload();
|
||||||
|
},
|
||||||
|
error : function() {
|
||||||
|
//alert("操作失败");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -258,6 +258,41 @@ public class BaiDuApiUtils {
|
|||||||
params.put("coords", lng.toString() + "," + lat.toString());
|
params.put("coords", lng.toString() + "," + lat.toString());
|
||||||
params.put("from", String.valueOf(from));
|
params.put("from", String.valueOf(from));
|
||||||
HttpRequest request = new HttpRequest();
|
HttpRequest request = new HttpRequest();
|
||||||
|
String result = null;
|
||||||
|
try{
|
||||||
|
result = request.get("http://api.map.baidu.com/geoconv/v1/",params,"UTF-8");
|
||||||
|
JSONObject json = JSONObject.fromObject(result);
|
||||||
|
while(!(json == null || json.containsKey("result") || json.getJSONArray("result").size() == 0)){
|
||||||
|
changeAK();
|
||||||
|
result = request.get("http://api.map.baidu.com/geoconv/v1/",params,"UTF-8");
|
||||||
|
json = JSONObject.fromObject(result);
|
||||||
|
Thread.sleep(1000 * 60);
|
||||||
|
}
|
||||||
|
if(json.getInt("status") >= 300){
|
||||||
|
changeAK();
|
||||||
|
json = geoconv(lng, lat, from);
|
||||||
|
}
|
||||||
|
return json.getJSONArray("result").getJSONObject(0);
|
||||||
|
}catch (Exception e){
|
||||||
|
System.out.println("错误:"+result);
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param coords
|
||||||
|
* @param from
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static JSONObject geoconv(String coords,int from){
|
||||||
|
Map<String,String> params = new HashMap<String, String>();
|
||||||
|
params.put("output", "json");
|
||||||
|
params.put("ak", AK);
|
||||||
|
params.put("coords", coords);
|
||||||
|
params.put("from", String.valueOf(from));
|
||||||
|
HttpRequest request = new HttpRequest();
|
||||||
try{
|
try{
|
||||||
String result = request.get("http://api.map.baidu.com/geoconv/v1/",params,"UTF-8");
|
String result = request.get("http://api.map.baidu.com/geoconv/v1/",params,"UTF-8");
|
||||||
JSONObject json = JSONObject.fromObject(result);
|
JSONObject json = JSONObject.fromObject(result);
|
||||||
@@ -269,7 +304,7 @@ public class BaiDuApiUtils {
|
|||||||
}
|
}
|
||||||
if(json.getInt("status") >= 300){
|
if(json.getInt("status") >= 300){
|
||||||
changeAK();
|
changeAK();
|
||||||
json = geoconv(lng, lat, from);
|
json = geoconv(coords, from);
|
||||||
}
|
}
|
||||||
return json.getJSONArray("result").getJSONObject(0);
|
return json.getJSONArray("result").getJSONObject(0);
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
|
|||||||
@@ -312,25 +312,6 @@ public class DataUtil {
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 加密图片url
|
|
||||||
*
|
|
||||||
* @param u
|
|
||||||
* @param s
|
|
||||||
* @param t
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public static String encodePicUrl(String u, String s, String t) {
|
|
||||||
if (StringUtils.isBlank(u)) {
|
|
||||||
return StringUtils.EMPTY;
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
return SecurityUtil.encode("u=" + URLEncoder.encode(u, "UTF-8") + "&s=" + s + "&t=" + t);
|
|
||||||
} catch (UnsupportedEncodingException e) {
|
|
||||||
return SecurityUtil.encode("u=" + u + "&s=" + s + "&t=" + t);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 把字符串以16进制数值显示出来
|
* 把字符串以16进制数值显示出来
|
||||||
*
|
*
|
||||||
@@ -1805,6 +1786,25 @@ public class DataUtil {
|
|||||||
return b2.toString();
|
return b2.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 加密图片url
|
||||||
|
*
|
||||||
|
* @param u
|
||||||
|
* @param s
|
||||||
|
* @param t
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static String encodePicUrl(String u, String s, String t) {
|
||||||
|
if (StringUtils.isBlank(u)) {
|
||||||
|
return StringUtils.EMPTY;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
return SecurityUtil.encode("u=" + URLEncoder.encode(u, "UTF-8") + "&s=" + s + "&t=" + t);
|
||||||
|
} catch (UnsupportedEncodingException e) {
|
||||||
|
return SecurityUtil.encode("u=" + u + "&s=" + s + "&t=" + t);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
System.out.println(getFirstChar("文裕花园"));
|
System.out.println(getFirstChar("文裕花园"));
|
||||||
System.out.println(getFirstChar("文怡花园"));
|
System.out.println(getFirstChar("文怡花园"));
|
||||||
|
|||||||
+51
@@ -0,0 +1,51 @@
|
|||||||
|
package com.fangjia.coresite.controllers;
|
||||||
|
|
||||||
|
import com.fangjia.coresite.model.AdviceLeadsModel;
|
||||||
|
import com.fangjia.coresite.model.user.Message;
|
||||||
|
import com.fangjia.coresite.model.user.UserRegJsonModel;
|
||||||
|
import com.fangjia.coresite.util.CoresiteCookieContext;
|
||||||
|
import com.fangjia.coresite.util.LoginUtil;
|
||||||
|
import com.fangjia.dal.mongo.fangjia.model.AdviceLeads;
|
||||||
|
import com.fangjia.service.common.CookieName;
|
||||||
|
import com.fangjia.service.fangjia.AdviceLeadsService;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
public class AdviceLeadsController {
|
||||||
|
|
||||||
|
private AdviceLeadsService adviceLeadsService;
|
||||||
|
|
||||||
|
private static final CoresiteCookieContext COOKIE_CONTEXT = CoresiteCookieContext
|
||||||
|
.getInstance();
|
||||||
|
|
||||||
|
public Object doAddAction(AdviceLeadsModel model, HttpServletRequest req) {
|
||||||
|
UserRegJsonModel result = new UserRegJsonModel();
|
||||||
|
model.setViewType("redirect");
|
||||||
|
|
||||||
|
String tempId = COOKIE_CONTEXT.getCookieValue(req, CookieName.UID);
|
||||||
|
AdviceLeads adviceLeads = new AdviceLeads();
|
||||||
|
adviceLeads.setName(model.getName());
|
||||||
|
adviceLeads.setMobile(model.getMobile());
|
||||||
|
adviceLeads.setEmail(model.getEmail());
|
||||||
|
adviceLeads.setCompany(model.getCompany());
|
||||||
|
adviceLeads.setDepartment(model.getDepartment());
|
||||||
|
adviceLeads.setPosition(model.getPosition());
|
||||||
|
adviceLeads.setCreateDate(new Date());
|
||||||
|
adviceLeads.setModifyDate(new Date());
|
||||||
|
adviceLeads.setUserId(LoginUtil.getUserId(req));
|
||||||
|
adviceLeads.setTempId(tempId);
|
||||||
|
adviceLeadsService.save(adviceLeads);
|
||||||
|
result.setResult(Message.RESULT_SUCCESS);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public AdviceLeadsService getAdviceLeadsService() {
|
||||||
|
return adviceLeadsService;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAdviceLeadsService(AdviceLeadsService adviceLeadsService) {
|
||||||
|
this.adviceLeadsService = adviceLeadsService;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
package com.fangjia.coresite.controllers;
|
||||||
|
|
||||||
|
import com.fangjia.coresite.model.FangjiaModel;
|
||||||
|
|
||||||
|
public class GuzhiController {
|
||||||
|
|
||||||
|
public FangjiaModel mapAction(FangjiaModel model){
|
||||||
|
return model;
|
||||||
|
}
|
||||||
|
}
|
||||||
+88
@@ -0,0 +1,88 @@
|
|||||||
|
package com.fangjia.coresite.model;
|
||||||
|
|
||||||
|
public class AdviceLeadsModel extends BaseModel{
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -5664116886759283515L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 姓名
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 手机
|
||||||
|
*/
|
||||||
|
private String mobile;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邮箱
|
||||||
|
*/
|
||||||
|
private String email;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公司
|
||||||
|
*/
|
||||||
|
private String company;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门
|
||||||
|
*/
|
||||||
|
private String department;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 职位
|
||||||
|
*/
|
||||||
|
private String position;
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMobile() {
|
||||||
|
return mobile;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMobile(String mobile) {
|
||||||
|
this.mobile = mobile;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEmail() {
|
||||||
|
return email;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEmail(String email) {
|
||||||
|
this.email = email;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCompany() {
|
||||||
|
return company;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCompany(String company) {
|
||||||
|
this.company = company;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDepartment() {
|
||||||
|
return department;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDepartment(String department) {
|
||||||
|
this.department = department;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPosition() {
|
||||||
|
return position;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPosition(String position) {
|
||||||
|
this.position = position;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
<div class="con1">
|
<div class="con1">
|
||||||
<p>上海总部</p>
|
<p>上海总部</p>
|
||||||
<b>电 话</b>: 4001883787(周一至周五 09:00-18:00)<br>
|
<b>电 话</b>: 4001883787(周一至周五 09:00-18:00)<br>
|
||||||
<b>邮 箱</b>: <a href="mailto:service@fangjia.com">service@fangjia.com</a><br>
|
<b>邮 箱</b>: <a href="mailto:gujia@fangjia.com">gujia@fangjia.com</a><br>
|
||||||
<b>地 址</b>: 上海市长宁区协和路1033号文洋大厦B座10楼<br>
|
<b>地 址</b>: 上海市长宁区协和路1033号文洋大厦B座10楼<br>
|
||||||
<b>邮 编</b>: 200335<br><br>
|
<b>邮 编</b>: 200335<br><br>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -158,7 +158,7 @@
|
|||||||
<div class="c0">
|
<div class="c0">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="t0">咨询电话:021-62391139</li>
|
<li class="t0">咨询电话:021-62391139</li>
|
||||||
<li class="email">邮 箱:<a href="mailto:service@fangjia.com">service@fangjia.com</a></li>
|
<li class="email">邮 箱:<a href="mailto:gujia@fangjia.com">gujia@fangjia.com</a></li>
|
||||||
<li class="line"></li>
|
<li class="line"></li>
|
||||||
<li class="tips">商务合作,请提交信息获得产品体验</li>
|
<li class="tips">商务合作,请提交信息获得产品体验</li>
|
||||||
<li class="t1 contact_form"><span><i>*</i>姓名:</span><input type="text" id="f_name" /></li>
|
<li class="t1 contact_form"><span><i>*</i>姓名:</span><input type="text" id="f_name" /></li>
|
||||||
|
|||||||
@@ -72,7 +72,7 @@
|
|||||||
<a ref="nofollow"><img src="${staticUrl}/images/wj110.png?v=${version}" height="47" border="0" /></a>
|
<a ref="nofollow"><img src="${staticUrl}/images/wj110.png?v=${version}" height="47" border="0" /></a>
|
||||||
</p>
|
</p>
|
||||||
<p class="footer_text">
|
<p class="footer_text">
|
||||||
客服热线:4001883787 电子邮箱:service@fangjia.com
|
客服热线:4001883787 电子邮箱:gujia@fangjia.com
|
||||||
<br />
|
<br />
|
||||||
©2006-${now?string("yyyy")} 估家网络 版权所有 <a href="http://www.shcaeg.gov.cn/main.action" target="_blank">沪B2-20130098</a>
|
©2006-${now?string("yyyy")} 估家网络 版权所有 <a href="http://www.shcaeg.gov.cn/main.action" target="_blank">沪B2-20130098</a>
|
||||||
<br/>
|
<br/>
|
||||||
|
|||||||
@@ -290,7 +290,7 @@
|
|||||||
<span>前台总机:021-62393138</span><br>
|
<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>,百度 </span><a href="https://www.baidu.com">房价网</a><br>
|
<a href="${cityUrl}/ershoufang">上海找房子</a><span>,</span><a href="${cityUrl}/gujia">估房价</a><span>,百度 </span><a href="https://www.baidu.com">房价网</a><br>
|
||||||
<span>电子邮箱:service@fangjia.com</span>
|
<span>电子邮箱:gujia@fangjia.com</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="wx"></div>
|
<div class="wx"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -262,9 +262,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="mailto:service@fangjia.com" class="icon two-code" title="客服邮箱"></a>
|
<a href="mailto:gujia@fangjia.com" class="icon two-code" title="客服邮箱"></a>
|
||||||
<div class="fixedNav02">
|
<div class="fixedNav02">
|
||||||
<span>service@fangjia.com</span>
|
<span>gujia@fangjia.com</span>
|
||||||
<font></font>
|
<font></font>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -76,15 +76,17 @@
|
|||||||
<p class="office01 current"><i></i><a>上海</a></p>
|
<p class="office01 current"><i></i><a>上海</a></p>
|
||||||
<p>
|
<p>
|
||||||
<font>电 话: 4001883787(周一至周五 09:00-18:00)<br>
|
<font>电 话: 4001883787(周一至周五 09:00-18:00)<br>
|
||||||
邮 箱: service@fangjia.com</font>
|
邮 箱: gujia@fangjia.com</font>
|
||||||
<font>地 址:上海市黄浦区黄陂北路227号中区广场1207室<br>
|
<font>地 址:上海市黄浦区黄陂北路227号中区广场1207室<br>
|
||||||
邮 编: 200003</font>
|
邮 编: 200003</font>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- <div>
|
<!-- <div>
|
||||||
<p class="office01 current"><i></i><a>上海总部</a></p>
|
<p class="office01 current"><i></i><a>上海总部</a></p>
|
||||||
<p>电 话: 4001883787(周一至周五 09:00-18:00)<br>
|
<p>电 话: 4001883787(周一至周五 09:00-18:00)<br>
|
||||||
邮 箱: service@fangjia.com<br>
|
邮 箱: gujia@fangjia.com<br>
|
||||||
地 址: 上海市黄浦区黄陂北路227号中区广场1207室<br>
|
地 址: 上海市黄浦区黄陂北路227号中区广场1207室<br>
|
||||||
邮 编: 200003</p>
|
邮 编: 200003</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -101,7 +103,24 @@
|
|||||||
邮 编: 518028</p>
|
邮 编: 518028</p>
|
||||||
</div> -->
|
</div> -->
|
||||||
<div class="officeMapBox">
|
<div class="officeMapBox">
|
||||||
<div class="officeMap" id="officeMap01"></div>
|
<div class="officeMap" id="officeMap01" style="width: 50%; float:left" ></div>
|
||||||
|
<div style="padding-left: 5%; float:left;width: 25%;padding-top: 5%; text-align: center;">
|
||||||
|
<img src="${staticUrl}/images/fangjia/v5/KfWx.png" style="width: 200px; display: inline-block;"><br><br>
|
||||||
|
<span>关注估家科技客服微信号<br>
|
||||||
|
Follow us on WeChat</span>
|
||||||
|
</div>
|
||||||
|
<div style="float:left; padding-top: 5%; text-align: center;">
|
||||||
|
<img src="${staticUrl}/images/fangjia/v5/GfWx.png" style="width: 200px; display: inline-block;"><br><br>
|
||||||
|
<span>关注官方微信公众号<br>
|
||||||
|
Follow us on WeChat</span>
|
||||||
|
</div>
|
||||||
|
<#--<div style="padding-left: 85%; float:left">
|
||||||
|
<img src="${staticUrl}/images/fangjia/v5/GfWx.png"><br>
|
||||||
|
<span> 关注官方微信公众号</span><br>
|
||||||
|
<span> Follow us on WeChat</span>
|
||||||
|
</div>-->
|
||||||
|
|
||||||
|
|
||||||
<!-- <div class="officeMap" id="officeMap02"></div>
|
<!-- <div class="officeMap" id="officeMap02"></div>
|
||||||
<div class="officeMap" id="officeMap03"></div> -->
|
<div class="officeMap" id="officeMap03"></div> -->
|
||||||
</div>
|
</div>
|
||||||
@@ -110,20 +129,34 @@
|
|||||||
<div>
|
<div>
|
||||||
<p class="office01 current"><i></i><a>上海</a></p>
|
<p class="office01 current"><i></i><a>上海</a></p>
|
||||||
<p>电 话: 4001883787(周一至周五 09:00-18:00)<br>
|
<p>电 话: 4001883787(周一至周五 09:00-18:00)<br>
|
||||||
邮 箱: service@fangjia.com<br>
|
邮 箱: gujia@fangjia.com<br>
|
||||||
地 址: 上海市黄浦区黄陂北路227号中区广场1207室<br>
|
地 址: 上海市黄浦区黄陂北路227号中区广场1207室<br>
|
||||||
邮 编: 200003</p>
|
邮 编: 200003</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="officeMapBox">
|
<div>
|
||||||
<div class="officeMap" id="officeMap04"></div>
|
<div style="float:left;">
|
||||||
|
<img src="${staticUrl}/images/fangjia/v5/KfWx.png" style="height:80px;padding-left: 20%;"><br>
|
||||||
|
<span>关注估家科技客服微信号</span><br>
|
||||||
|
<span> Follow us on WeChat</span>
|
||||||
|
</div>
|
||||||
|
<div style="float:left;margin-left: 10%;">
|
||||||
|
<img src="${staticUrl}/images/fangjia/v5/GfWx.png" style="height:80px;margin-left: 15%;"><br>
|
||||||
|
<span> 关注官方微信公众号</span><br>
|
||||||
|
<span> Follow us on WeChat</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="officeMapBox" >
|
||||||
|
<div class="officeMap" id="officeMap04" style="margin-top: 10px"></div>
|
||||||
|
<#-- <div class="officeMap" id="officeMap01" style="width: 80%; float:left" ></div>-->
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="main_title" id="partner" style="padding-top:100px;">他们都在和我们合作</div>
|
<div class="main_title" id="partner" style="padding-top:100px;">他们都在和我们合作</div>
|
||||||
<div class="main_content partner mobile01">
|
<div class="main_content partner mobile01">
|
||||||
<a class="partner11"></a>
|
<a class="partner11"></a>
|
||||||
<a class="partner12"></a>
|
<a class="partner12"></a>
|
||||||
<a class="partner13"></a>
|
<a class="partner13"></a>
|
||||||
<a class="partner14"></a>
|
<#-- <a class="partner14"></a>-->
|
||||||
<a class="partner15"></a>
|
<a class="partner15"></a>
|
||||||
<a class="partner16" style="margin-right:0;"></a>
|
<a class="partner16" style="margin-right:0;"></a>
|
||||||
<a class="partner21"></a>
|
<a class="partner21"></a>
|
||||||
|
|||||||
@@ -85,7 +85,7 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="footer_in por">
|
<div class="footer_in por">
|
||||||
客服热线:4001883787 电子邮箱:service@fangjia.com
|
客服热线:4001883787 电子邮箱:gujia@fangjia.com
|
||||||
<br />
|
<br />
|
||||||
©2006-${now?string("yyyy")} 房价网 版权所有 沪ICP备10203734号-1
|
©2006-${now?string("yyyy")} 房价网 版权所有 沪ICP备10203734号-1
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -70,7 +70,7 @@
|
|||||||
<a ref="nofollow"><img src="${staticUrl}/images/wj110.png?v=${version}" height="47" border="0" /></a>
|
<a ref="nofollow"><img src="${staticUrl}/images/wj110.png?v=${version}" height="47" border="0" /></a>
|
||||||
</p>
|
</p>
|
||||||
<p class="footer_text">
|
<p class="footer_text">
|
||||||
客服热线:4001883787 电子邮箱:service@fangjia.com
|
客服热线:4001883787 电子邮箱:gujia@fangjia.com
|
||||||
<br />
|
<br />
|
||||||
©2006-${now?string("yyyy")} 估家网络 版权所有 <a href="http://www.miitbeian.gov.cn/" target="_blank">沪ICP备10203734号-1</a>
|
©2006-${now?string("yyyy")} 估家网络 版权所有 <a href="http://www.miitbeian.gov.cn/" target="_blank">沪ICP备10203734号-1</a>
|
||||||
<br/>
|
<br/>
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
|
|
||||||
<p class="footer_text">
|
<p class="footer_text">
|
||||||
图片来源于网络,版权属于作者,请勿用于商业用途。<br/>
|
图片来源于网络,版权属于作者,请勿用于商业用途。<br/>
|
||||||
客服热线:4001883787 电子邮箱:service@fangjia.com
|
客服热线:4001883787 电子邮箱:gujia@fangjia.com
|
||||||
<br />
|
<br />
|
||||||
©2006-${now?string("yyyy")} 估家网络 版权所有 <a href="http://www.shcaeg.gov.cn/main.action" target="_blank">沪B2-20130098</a>
|
©2006-${now?string("yyyy")} 估家网络 版权所有 <a href="http://www.shcaeg.gov.cn/main.action" target="_blank">沪B2-20130098</a>
|
||||||
<br/>
|
<br/>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
<span>前台总机:021-62393138</span><br>
|
<span>前台总机:021-62393138</span><br>
|
||||||
<span>客服热线:4001883787</span><br>
|
<span>客服热线:4001883787</span><br>
|
||||||
<a href="${_currentCityUrl}/ershoufang/">上海找房子</a><span>,</span><a href="${_currentCityUrl}/gujia/">估房价</a><span>,百度 </span><a href="http://www.baidu.com/s?wd=%B7%BF%BC%DB%CD%F8">房价网</a><br>
|
<a href="${_currentCityUrl}/ershoufang/">上海找房子</a><span>,</span><a href="${_currentCityUrl}/gujia/">估房价</a><span>,百度 </span><a href="http://www.baidu.com/s?wd=%B7%BF%BC%DB%CD%F8">房价网</a><br>
|
||||||
<span>电子邮箱:service@fangjia.com</span>
|
<span>电子邮箱:gujia@fangjia.com</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="wx"></div>
|
<div class="wx"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
<span>前台总机:021-62393138</span><br>
|
<span>前台总机:021-62393138</span><br>
|
||||||
<span>客服热线:4001883787</span><br>
|
<span>客服热线:4001883787</span><br>
|
||||||
<a href="${_currentCityUrl}/ershoufang/">上海找房子</a><span>,</span><a href="${_currentCityUrl}/gujia/">估房价</a><span>,百度 </span><a href="http://www.baidu.com/s?wd=%B7%BF%BC%DB%CD%F8">房价网</a><br>
|
<a href="${_currentCityUrl}/ershoufang/">上海找房子</a><span>,</span><a href="${_currentCityUrl}/gujia/">估房价</a><span>,百度 </span><a href="http://www.baidu.com/s?wd=%B7%BF%BC%DB%CD%F8">房价网</a><br>
|
||||||
<span>电子邮箱:service@fangjia.com</span>
|
<span>电子邮箱:gujia@fangjia.com</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="wx"></div>
|
<div class="wx"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -0,0 +1,95 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||||
|
<#include "/jsconstants.ftl" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="container" style="background:url('${staticUrl}/images/map/blue.jpg') no-repeat;background-size:100% 100%;">
|
||||||
|
<div id="echartsMap" style="min-width: 300px; height: 800px;padding-top: 32px;"></div>
|
||||||
|
</div>
|
||||||
|
<script type="text/javascript" src="${staticUrl}/js/jquery-3.6.0.min.js?v=${version}"></script>
|
||||||
|
<script type="text/javascript" src="${staticUrl}/js/fangjia/v5/echarts.min.5.0.2.js?v=${version}"></script>
|
||||||
|
<script type="text/javascript" src="${staticUrl}/js/shanghai.js?v=${version}"></script>
|
||||||
|
<script>
|
||||||
|
//省
|
||||||
|
$("#container").height($(window).height() - 20)
|
||||||
|
function echartsMap() {
|
||||||
|
echarts.registerMap('shanghai', data);
|
||||||
|
option = {
|
||||||
|
|
||||||
|
visualMap: {
|
||||||
|
min: 18,
|
||||||
|
max: 106,
|
||||||
|
right: '3%',
|
||||||
|
text: ['最高', '最低'],
|
||||||
|
realtime: false,
|
||||||
|
calculable: true,
|
||||||
|
opacity: 0,
|
||||||
|
textStyle: {
|
||||||
|
color: "#FF7F24"
|
||||||
|
},
|
||||||
|
inRange: {
|
||||||
|
color: ['lightskyblue', 'yellow', 'orangered']
|
||||||
|
}
|
||||||
|
},
|
||||||
|
textStyle: {
|
||||||
|
color: "#FF1493",
|
||||||
|
fontSize: 14,
|
||||||
|
},
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'item',
|
||||||
|
formatter: function (arg) {
|
||||||
|
return arg.name + '<br/>' + rent[arg.name] + '元/平米/月'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
series: [{
|
||||||
|
type: 'map',
|
||||||
|
//这里的“map”值需要与下面的“echarts.registerMap”值对应
|
||||||
|
map: 'shanghai',
|
||||||
|
zoom: 1.25,
|
||||||
|
roam: false,
|
||||||
|
label: {
|
||||||
|
normal: {
|
||||||
|
show: true
|
||||||
|
},
|
||||||
|
emphasis: {
|
||||||
|
show: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
layoutSize: '100%',
|
||||||
|
itemStyle: {
|
||||||
|
normal: {
|
||||||
|
color: "#FFF",
|
||||||
|
label: {
|
||||||
|
show: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data: [{"name": "奉贤", "value": 23}, {"name": "青浦", "value": 30}, {
|
||||||
|
"name": "金山",
|
||||||
|
"value": 19
|
||||||
|
}, {"name": "崇明", "value": 18}, {"name": "嘉定", "value": 37}, {"name": "松江", "value": 41}, {
|
||||||
|
"name": "浦东",
|
||||||
|
"value": 53
|
||||||
|
}, {"name": "闵行", "value": 53}, {"name": "宝山", "value": 59}, {"name": "杨浦", "value": 82}, {
|
||||||
|
"name": "静安",
|
||||||
|
"value": 92
|
||||||
|
}, {"name": "虹口", "value": 79}, {"name": "普陀", "value": 85}, {"name": "长宁", "value": 99}, {
|
||||||
|
"name": "徐汇",
|
||||||
|
"value": 96
|
||||||
|
}, {"name": "黄浦", "value": 106}],
|
||||||
|
nameMap: {}
|
||||||
|
}]
|
||||||
|
};
|
||||||
|
myEcharts = echarts.init(document.getElementById("echartsMap"));
|
||||||
|
myEcharts.setOption(option);
|
||||||
|
window.addEventListener('resize', () => {
|
||||||
|
myEcharts.resize();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
echartsMap();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -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/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>
|
<a ref="nofollow" href="#"><img src="${staticUrl}/images/wj110.png?v=${version}" height="47" border="0" /></a>
|
||||||
</p>
|
</p>
|
||||||
<p class="copyrights">客服热线:4001883787 电子邮箱:service@fangjia.com<br />
|
<p class="copyrights">客服热线:4001883787 电子邮箱:gujia@fangjia.com<br />
|
||||||
©2006-${now?string("yyyy")} 房价网 版权所有 沪ICP备10203734号-1<br/>
|
©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>
|
<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>
|
</p>
|
||||||
|
|||||||
@@ -78,7 +78,7 @@
|
|||||||
<font>|</font>
|
<font>|</font>
|
||||||
<a href="https://www.linkedin.com/company/fangjia" title="LinkedIn" target="_blank" rel="nofollow"><img src="${imgUrl}/images/fangjia/v5/footer_icon03.png" class="footer_icon03"><span style="width:56px;">LinkedIn</span></a>
|
<a href="https://www.linkedin.com/company/fangjia" title="LinkedIn" target="_blank" rel="nofollow"><img src="${imgUrl}/images/fangjia/v5/footer_icon03.png" class="footer_icon03"><span style="width:56px;">LinkedIn</span></a>
|
||||||
<font>|</font>
|
<font>|</font>
|
||||||
<a href="mailto:service@fangjia.com" title="客服邮箱" target="_blank" rel="nofollow"><img src="${imgUrl}/images/fangjia/v5/footer_icon06.png" class="footer_icon06"><span>客服邮箱</span></a>
|
<a href="mailto:gujia@fangjia.com" title="客服邮箱" target="_blank" rel="nofollow"><img src="${imgUrl}/images/fangjia/v5/footer_icon06.png" class="footer_icon06"><span>客服邮箱</span></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer_bottom">
|
<div class="footer_bottom">
|
||||||
|
|||||||
@@ -78,7 +78,7 @@
|
|||||||
<font>|</font>
|
<font>|</font>
|
||||||
<a href="https://www.linkedin.com/company/fangjia" title="LinkedIn" target="_blank" rel="nofollow"><img src="${imgUrl}/images/fangjia/v5/footer_icon03.png" class="footer_icon03"><span style="width:56px;">LinkedIn</span></a>
|
<a href="https://www.linkedin.com/company/fangjia" title="LinkedIn" target="_blank" rel="nofollow"><img src="${imgUrl}/images/fangjia/v5/footer_icon03.png" class="footer_icon03"><span style="width:56px;">LinkedIn</span></a>
|
||||||
<font>|</font>
|
<font>|</font>
|
||||||
<a href="mailto:service@fangjia.com" title="客服邮箱" target="_blank" rel="nofollow"><img src="${imgUrl}/images/fangjia/v5/footer_icon06.png" class="footer_icon06"><span>客服邮箱</span></a>
|
<a href="mailto:gujia@fangjia.com" title="客服邮箱" target="_blank" rel="nofollow"><img src="${imgUrl}/images/fangjia/v5/footer_icon06.png" class="footer_icon06"><span>客服邮箱</span></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer_bottom">
|
<div class="footer_bottom">
|
||||||
|
|||||||
@@ -16,9 +16,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="mailto:market@fangjia.com" class="icon two-code" title="客服邮箱"></a>
|
<a href="mailto:gujia@fangjia.com" class="icon two-code" title="客服邮箱"></a>
|
||||||
<div class="fixedNav02">
|
<div class="fixedNav02">
|
||||||
<span>market@fangjia.com</span>
|
<span>gujia@fangjia.com</span>
|
||||||
<font></font>
|
<font></font>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -1476,9 +1476,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="mailto:market@fangjia.com" class="icon two-code" title="客服邮箱"></a>
|
<a href="mailto:gujia@fangjia.com" class="icon two-code" title="客服邮箱"></a>
|
||||||
<div class="fixedNav02">
|
<div class="fixedNav02">
|
||||||
<span>market@fangjia.com</span>
|
<span>gujia@fangjia.com</span>
|
||||||
<font></font>
|
<font></font>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -78,7 +78,7 @@
|
|||||||
<font>|</font>
|
<font>|</font>
|
||||||
<a href="https://www.linkedin.com/company/fangjia" title="LinkedIn" target="_blank" rel="nofollow"><img src="${imgUrl}/images/fangjia/v5/footer_icon03.png" class="footer_icon03"><span style="width:56px;">LinkedIn</span></a>
|
<a href="https://www.linkedin.com/company/fangjia" title="LinkedIn" target="_blank" rel="nofollow"><img src="${imgUrl}/images/fangjia/v5/footer_icon03.png" class="footer_icon03"><span style="width:56px;">LinkedIn</span></a>
|
||||||
<font>|</font>
|
<font>|</font>
|
||||||
<a href="mailto:service@fangjia.com" title="客服邮箱" target="_blank" rel="nofollow"><img src="${imgUrl}/images/fangjia/v5/footer_icon06.png" class="footer_icon06"><span>客服邮箱</span></a>
|
<a href="mailto:gujia@fangjia.com" title="客服邮箱" target="_blank" rel="nofollow"><img src="${imgUrl}/images/fangjia/v5/footer_icon06.png" class="footer_icon06"><span>客服邮箱</span></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer_bottom">
|
<div class="footer_bottom">
|
||||||
|
|||||||
@@ -102,7 +102,7 @@
|
|||||||
<span>前台总机:021-62393138</span><br>
|
<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>,百度 </span><a href="https://www.baidu.com">房价网</a><br>
|
<a href="${cityUrl}/ershoufang">上海找房子</a><span>,</span><a href="${cityUrl}/gujia">估房价</a><span>,百度 </span><a href="https://www.baidu.com">房价网</a><br>
|
||||||
<span>电子邮箱:service@fangjia.com</span>
|
<span>电子邮箱:gujia@fangjia.com</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="wx"></div>
|
<div class="wx"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -97,7 +97,7 @@
|
|||||||
<span>前台总机:021-62393138</span><br>
|
<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>,百度 </span><a href="https://www.baidu.com">房价网</a><br>
|
<a href="${cityUrl}/ershoufang">上海找房子</a><span>,</span><a href="${cityUrl}/gujia">估房价</a><span>,百度 </span><a href="https://www.baidu.com">房价网</a><br>
|
||||||
<span>电子邮箱:service@fangjia.com</span>
|
<span>电子邮箱:gujia@fangjia.com</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="wx"></div>
|
<div class="wx"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -111,7 +111,7 @@
|
|||||||
<span>前台总机:021-62393138</span><br>
|
<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>,百度 </span><a href="https://www.baidu.com">房价网</a><br>
|
<a href="${cityUrl}/ershoufang">上海找房子</a><span>,</span><a href="${cityUrl}/gujia">估房价</a><span>,百度 </span><a href="https://www.baidu.com">房价网</a><br>
|
||||||
<span>电子邮箱:service@fangjia.com</span>
|
<span>电子邮箱:gujia@fangjia.com</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="wx"></div>
|
<div class="wx"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -117,7 +117,7 @@
|
|||||||
<span>前台总机:021-62393138</span><br>
|
<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>,百度 </span><a href="https://www.baidu.com">房价网</a><br>
|
<a href="${cityUrl}/ershoufang">上海找房子</a><span>,</span><a href="${cityUrl}/gujia">估房价</a><span>,百度 </span><a href="https://www.baidu.com">房价网</a><br>
|
||||||
<span>电子邮箱:service@fangjia.com</span>
|
<span>电子邮箱:gujia@fangjia.com</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="wx"></div>
|
<div class="wx"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -101,7 +101,7 @@
|
|||||||
<span>前台总机:021-62393138</span><br>
|
<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>,百度 </span><a href="https://www.baidu.com">房价网</a><br>
|
<a href="${cityUrl}/ershoufang">上海找房子</a><span>,</span><a href="${cityUrl}/gujia">估房价</a><span>,百度 </span><a href="https://www.baidu.com">房价网</a><br>
|
||||||
<span>电子邮箱:service@fangjia.com</span>
|
<span>电子邮箱:gujia@fangjia.com</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="wx"></div>
|
<div class="wx"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -83,7 +83,7 @@
|
|||||||
<span>前台总机:021-62393138</span><br>
|
<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>,百度 </span><a href="https://www.baidu.com">房价网</a><br>
|
<a href="${cityUrl}/ershoufang">上海找房子</a><span>,</span><a href="${cityUrl}/gujia">估房价</a><span>,百度 </span><a href="https://www.baidu.com">房价网</a><br>
|
||||||
<span>电子邮箱:service@fangjia.com</span>
|
<span>电子邮箱:gujia@fangjia.com</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="wx"></div>
|
<div class="wx"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -84,7 +84,7 @@
|
|||||||
<span>前台总机:021-62393138</span><br>
|
<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>,百度 </span><a href="https://www.baidu.com">房价网</a><br>
|
<a href="${cityUrl}/ershoufang">上海找房子</a><span>,</span><a href="${cityUrl}/gujia">估房价</a><span>,百度 </span><a href="https://www.baidu.com">房价网</a><br>
|
||||||
<span>电子邮箱:service@fangjia.com</span>
|
<span>电子邮箱:gujia@fangjia.com</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="wx"></div>
|
<div class="wx"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -243,14 +243,14 @@
|
|||||||
<div class="error error01 dn"><i></i><span></span></div>
|
<div class="error error01 dn"><i></i><span></span></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="inputInfo">
|
<div class="inputInfo">
|
||||||
<label>电子邮箱<i>*</i></label>
|
<label>电子邮箱</label>
|
||||||
<input class="inpu inpu02" type="text" name="saleLeads.email" id="email" autocomplete="off" placeholder="请输入您的电子邮箱">
|
<input class="inpu inpu02" type="text" name="saleLeads.email" id="email" autocomplete="off" placeholder="请输入您的电子邮箱">
|
||||||
<div class="error error01 dn"><i></i><span></span></div>
|
<div class="error error01 dn"><i></i><span></span></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="inputInfoBox01">
|
<div class="inputInfoBox01">
|
||||||
<div class="inputInfo">
|
<div class="inputInfo">
|
||||||
<label>所在城市<i>*</i></label>
|
<label>所在城市</label>
|
||||||
<div class="inpu inpu02 cityChoice open-about01">
|
<div class="inpu inpu02 cityChoice open-about01">
|
||||||
<input type="hidden" name="saleLeads.city" id="city" value="上海">
|
<input type="hidden" name="saleLeads.city" id="city" value="上海">
|
||||||
<input id="selectedCity" value="上海" placeholder="请选择城市" readonly>
|
<input id="selectedCity" value="上海" placeholder="请选择城市" readonly>
|
||||||
@@ -259,7 +259,7 @@
|
|||||||
<div class="error error01 dn"><i></i>所在城市不能为空</div>
|
<div class="error error01 dn"><i></i>所在城市不能为空</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="inputInfo">
|
<div class="inputInfo">
|
||||||
<label>行业性质<i>*</i></label>
|
<label>行业性质</label>
|
||||||
<select class="sel" id="nature" name="saleLeads.industryNature">
|
<select class="sel" id="nature" name="saleLeads.industryNature">
|
||||||
<option value="">请选择您所在的行业性质</option>
|
<option value="">请选择您所在的行业性质</option>
|
||||||
<option value="银行">银行</option>
|
<option value="银行">银行</option>
|
||||||
@@ -280,7 +280,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<input name="saleLeads.work" id="work" type="hidden"/>
|
<input name="saleLeads.work" id="work" type="hidden"/>
|
||||||
<div class="inputInfo duty dn">
|
<div class="inputInfo duty dn">
|
||||||
<label>工作职能<i>*</i></label>
|
<label>工作职能</label>
|
||||||
<select class="sel" name="">
|
<select class="sel" name="">
|
||||||
<option>请选择您的工作职能</option>
|
<option>请选择您的工作职能</option>
|
||||||
<option>风控管理</option>
|
<option>风控管理</option>
|
||||||
@@ -296,7 +296,7 @@
|
|||||||
<div class="error error01 dn"><i></i>工作职能不能为空</div>
|
<div class="error error01 dn"><i></i>工作职能不能为空</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="inputInfo duty dn">
|
<div class="inputInfo duty dn">
|
||||||
<label>工作职能<i>*</i></label>
|
<label>工作职能</label>
|
||||||
<select class="sel">
|
<select class="sel">
|
||||||
<option>请选择您的工作职能</option>
|
<option>请选择您的工作职能</option>
|
||||||
<option>风控管理</option>
|
<option>风控管理</option>
|
||||||
@@ -311,7 +311,7 @@
|
|||||||
<div class="error error01 dn"><i></i>工作职能不能为空</div>
|
<div class="error error01 dn"><i></i>工作职能不能为空</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="inputInfo duty dn">
|
<div class="inputInfo duty dn">
|
||||||
<label>工作职能<i>*</i></label>
|
<label>工作职能</label>
|
||||||
<select class="sel">
|
<select class="sel">
|
||||||
<option>请选择您的工作职能</option>
|
<option>请选择您的工作职能</option>
|
||||||
<option>数据分析</option>
|
<option>数据分析</option>
|
||||||
@@ -324,7 +324,7 @@
|
|||||||
<div class="error error01 dn"><i></i>工作职能不能为空</div>
|
<div class="error error01 dn"><i></i>工作职能不能为空</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="inputInfo duty dn">
|
<div class="inputInfo duty dn">
|
||||||
<label>工作职能<i>*</i></label>
|
<label>工作职能</label>
|
||||||
<select class="sel">
|
<select class="sel">
|
||||||
<option>请选择您的工作职能</option>
|
<option>请选择您的工作职能</option>
|
||||||
<option>房地产评估</option>
|
<option>房地产评估</option>
|
||||||
@@ -337,7 +337,7 @@
|
|||||||
<div class="error error01 dn"><i></i>工作职能不能为空</div>
|
<div class="error error01 dn"><i></i>工作职能不能为空</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="inputInfo duty dn">
|
<div class="inputInfo duty dn">
|
||||||
<label>工作职能<i>*</i></label>
|
<label>工作职能</label>
|
||||||
<select class="sel">
|
<select class="sel">
|
||||||
<option>请选择您的工作职能</option>
|
<option>请选择您的工作职能</option>
|
||||||
<option>课题研究</option>
|
<option>课题研究</option>
|
||||||
@@ -351,7 +351,7 @@
|
|||||||
<div class="error error01 dn"><i></i>工作职能不能为空</div>
|
<div class="error error01 dn"><i></i>工作职能不能为空</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="inputInfo duty dn">
|
<div class="inputInfo duty dn">
|
||||||
<label>工作职能<i>*</i></label>
|
<label>工作职能</label>
|
||||||
<select class="sel">
|
<select class="sel">
|
||||||
<option>请选择您的工作职能</option>
|
<option>请选择您的工作职能</option>
|
||||||
<option>信用征集</option>
|
<option>信用征集</option>
|
||||||
@@ -366,7 +366,7 @@
|
|||||||
<div class="error error01 dn"><i></i>工作职能不能为空</div>
|
<div class="error error01 dn"><i></i>工作职能不能为空</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="inputInfo duty dn">
|
<div class="inputInfo duty dn">
|
||||||
<label>工作职能<i>*</i></label>
|
<label>工作职能</label>
|
||||||
<select class="sel">
|
<select class="sel">
|
||||||
<option>请选择您的工作职能</option>
|
<option>请选择您的工作职能</option>
|
||||||
<option>市场研究与分析</option>
|
<option>市场研究与分析</option>
|
||||||
@@ -377,7 +377,7 @@
|
|||||||
<div class="error error01 dn"><i></i>工作职能不能为空</div>
|
<div class="error error01 dn"><i></i>工作职能不能为空</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="inputInfo duty dn">
|
<div class="inputInfo duty dn">
|
||||||
<label>工作职能<i>*</i></label>
|
<label>工作职能</label>
|
||||||
<select class="sel">
|
<select class="sel">
|
||||||
<option>请选择您的工作职能</option>
|
<option>请选择您的工作职能</option>
|
||||||
<option>数据分析</option>
|
<option>数据分析</option>
|
||||||
@@ -391,7 +391,7 @@
|
|||||||
<div class="error error01 dn"><i></i>工作职能不能为空</div>
|
<div class="error error01 dn"><i></i>工作职能不能为空</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="inputInfo duty dn">
|
<div class="inputInfo duty dn">
|
||||||
<label>工作职能<i>*</i></label>
|
<label>工作职能</label>
|
||||||
<select class="sel">
|
<select class="sel">
|
||||||
<option>请选择您的工作职能</option>
|
<option>请选择您的工作职能</option>
|
||||||
<option>项目策划与开发</option>
|
<option>项目策划与开发</option>
|
||||||
@@ -407,20 +407,20 @@
|
|||||||
<div class="error error01 dn"><i></i>工作职能不能为空</div>
|
<div class="error error01 dn"><i></i>工作职能不能为空</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="inputInfo duty dn">
|
<div class="inputInfo duty dn">
|
||||||
<label class="label01">其他行业性质<i>*</i></label>
|
<label class="label01">其他行业性质</label>
|
||||||
<input class="inpu inpu02" type="text" autocomplete="off" placeholder="请输入其他行业性质" id="otherIndustryNature" name="saleLeads.otherIndustryNature">
|
<input class="inpu inpu02" type="text" autocomplete="off" placeholder="请输入其他行业性质" id="otherIndustryNature" name="saleLeads.otherIndustryNature">
|
||||||
<div class="error error01 dn"><i></i><span></span></div>
|
<div class="error error01 dn"><i></i><span></span></div>
|
||||||
<label class="label01 label01a">其他工作职能<i>*</i></label>
|
<label class="label01 label01a">其他工作职能</label>
|
||||||
<input class="inpu inpu02 inpu02a" type="text" id="otherWork2" name="saleLeads.otherWork" autocomplete="off" placeholder="请输入其他工作职能">
|
<input class="inpu inpu02 inpu02a" type="text" id="otherWork2" name="saleLeads.otherWork" autocomplete="off" placeholder="请输入其他工作职能">
|
||||||
<div class="error error01 dn" style="top:91px;"><i></i><span></span></div>
|
<div class="error error01 dn" style="top:91px;"><i></i><span></span></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="inputInfo duty01 dn">
|
<div class="inputInfo duty01 dn">
|
||||||
<label class="label01">其他工作职能<i>*</i></label>
|
<label class="label01">其他工作职能</label>
|
||||||
<input class="inpu inpu02" type="text" id="otherWork" name="saleLeads.otherWork" autocomplete="off" placeholder="请输入其他工作职能">
|
<input class="inpu inpu02" type="text" id="otherWork" name="saleLeads.otherWork" autocomplete="off" placeholder="请输入其他工作职能">
|
||||||
<div class="error error01 dn"><i></i><span></span></div>
|
<div class="error error01 dn"><i></i><span></span></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="inputInfo <#if mid?? && mid!='1018'&&mid!='1016'>dn</#if>" >
|
<div class="inputInfo <#if mid?? && mid!='1018'&&mid!='1016'>dn</#if>" >
|
||||||
<label>业务需求<i>*</i></label>
|
<label>业务需求</label>
|
||||||
<input name="saleLeads.business" id="business" type="hidden"/>
|
<input name="saleLeads.business" id="business" type="hidden"/>
|
||||||
<div class="demand">
|
<div class="demand">
|
||||||
<p><b><i></i>解决方案</b></p>
|
<p><b><i></i>解决方案</b></p>
|
||||||
@@ -445,7 +445,7 @@
|
|||||||
<div class="error error01 dn"><i></i><span></span></div>
|
<div class="error error01 dn"><i></i><span></span></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="inputInfo demand01 dn">
|
<div class="inputInfo demand01 dn">
|
||||||
<label class="label01">其他业务需求<i>*</i></label>
|
<label class="label01">其他业务需求</label>
|
||||||
<input class="inpu inpu02" type="text" id="otherBusiness" name="saleLeads.otherBusiness" autocomplete="off" placeholder="请输入其他业务需求">
|
<input class="inpu inpu02" type="text" id="otherBusiness" name="saleLeads.otherBusiness" autocomplete="off" placeholder="请输入其他业务需求">
|
||||||
<div class="error error01 dn"><i></i>其他业务需求不能为空</div>
|
<div class="error error01 dn"><i></i>其他业务需求不能为空</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -556,7 +556,7 @@ $(".user_btn").click(function(){
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!checkEmail()){
|
/*if(!checkEmail()){
|
||||||
scrollBy(0,-300);
|
scrollBy(0,-300);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -575,7 +575,7 @@ $(".user_btn").click(function(){
|
|||||||
scrollBy(0,-100);
|
scrollBy(0,-100);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
} */
|
||||||
|
|
||||||
var cls = $(".agreement i").attr("class");
|
var cls = $(".agreement i").attr("class");
|
||||||
if(cls.indexOf("checked")>-1){
|
if(cls.indexOf("checked")>-1){
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
<p class="p02" style="width:1250px;"><label>高效率、高智能的批量地址标准化分析与处理</label></p>
|
<p class="p02" style="width:1250px;"><label>高效率、高智能的批量地址标准化分析与处理</label></p>
|
||||||
<p><small>无论在风控、征信还是营销领域,任何批量地址数据的处理都离不开地址标准化。<br>房价网基于强大的CPDB数据库和人机技术,为各行业提供高效智能的地址标准化服务。</small></p>
|
<p><small>无论在风控、征信还是营销领域,任何批量地址数据的处理都离不开地址标准化。<br>房价网基于强大的CPDB数据库和人机技术,为各行业提供高效智能的地址标准化服务。</small></p>
|
||||||
<div class="btnGroup">
|
<div class="btnGroup">
|
||||||
<a class="link_btn link01_btn large" data_id="1007" cat="solution">立即咨询专业顾问</a>
|
<a class="link_btn link01_btn large" data_id="1007" id="seekAdvice" style="width: 222px; font-size: 25px; color: #FB8;">立即咨询专业顾问</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
<p class="p01"><small>地址标准化解决方案</small></p>
|
<p class="p01"><small>地址标准化解决方案</small></p>
|
||||||
<p class="p02"><label>高效率、高智能的批量地址标准化分析与处理</label></p>
|
<p class="p02"><label>高效率、高智能的批量地址标准化分析与处理</label></p>
|
||||||
<div class="btnGroup">
|
<div class="btnGroup">
|
||||||
<a class="link_btn link01_btn large" data_id="1007" cat="solution">立即咨询专业顾问</a>
|
<a class="link_btn link01_btn large" data_id="1007" id="seekAdvice_mobile">立即咨询专业顾问</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -110,7 +110,7 @@
|
|||||||
|
|
||||||
<div class="adBox adBox03">
|
<div class="adBox adBox03">
|
||||||
<p><small>您可通过在线方式联系专业顾问,他们将非常乐意为您提供更多服务。</small></p>
|
<p><small>您可通过在线方式联系专业顾问,他们将非常乐意为您提供更多服务。</small></p>
|
||||||
<a class="link_btn" data_id="1007" cat="solution">立即咨询</a>
|
<a class="link_btn" data_id="1007" id="seekAdvice2" style="width: 150px; height: 38px; background: #FB8;">立即咨询</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="resource" data-url = "${wwwUrl}/resource/recommend?module=1016"></div>
|
<div class="resource" data-url = "${wwwUrl}/resource/recommend?module=1016"></div>
|
||||||
@@ -128,9 +128,134 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="dialogBox dialogBoxSolution dn" style="top: 40%;">
|
||||||
|
<#--<div class="dialogBox_title">申请贷款<i class="close" id="loanWin"></i></div>-->
|
||||||
|
<div class="dialogBox_content" style="padding: 20px;">
|
||||||
|
<div class="user" style="margin-top: 40px;">
|
||||||
|
<div class="content">
|
||||||
|
<div class="inputInfoBox">
|
||||||
|
<div class="inputInfo">
|
||||||
|
<label>姓名<i style="color: red;">*</i></label>
|
||||||
|
<input id="name_d" class="inpu" type="text" autocomplete="off" placeholder="请输入您的姓名">
|
||||||
|
<div class="error dn"><i></i><span></span></div>
|
||||||
|
</div>
|
||||||
|
<div class="inputInfo">
|
||||||
|
<label>手机<i style="color: red;">*</i></label>
|
||||||
|
<input id="mobile_d" class="inpu" type="text" autocomplete="off" placeholder="请输入手机号码">
|
||||||
|
<div class="error dn"><i></i><span></span></div>
|
||||||
|
</div>
|
||||||
|
<div class="inputInfo">
|
||||||
|
<label>邮箱</label>
|
||||||
|
<input id="email_d" class="inpu" type="text" autocomplete="off" placeholder="请输入邮箱">
|
||||||
|
<div class="error dn email_err"></div>
|
||||||
|
</div>
|
||||||
|
<div class="inputInfo">
|
||||||
|
<label>公司</label>
|
||||||
|
<input id="company_d" class="inpu" type="text" autocomplete="off" placeholder="请输入公司">
|
||||||
|
</div>
|
||||||
|
<div class="inputInfo">
|
||||||
|
<label>部门</label>
|
||||||
|
<input id="department_d" class="inpu" type="text" autocomplete="off" placeholder="请输入部门">
|
||||||
|
</div>
|
||||||
|
<div class="inputInfo">
|
||||||
|
<label>职位</label>
|
||||||
|
<input id="position_d" class="inpu" type="text" autocomplete="off" placeholder="请输入职位">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="text-align: center">
|
||||||
|
<#--<a style="width: 100px;background: #f08300;line-height: 40px;color: #fff;display: block;float: left;margin-left: 100px;" id="addData">提交</a>
|
||||||
|
<a style="width: 100px;background: #f08300;line-height: 40px;color: #fff;float: left;margin-left: 20px;" id="close_d">返回</a>-->
|
||||||
|
|
||||||
|
<a style="width: 25%;background: #f08300;line-height: 40px;color: #fff;display: block;float: left;margin-left: 23%;" id="addData">提交</a>
|
||||||
|
<a style="width: 25%;background: #f08300;line-height: 40px;color: #fff;float: left;margin-left: 4%;" id="close_d">返回</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<#include "/header/v5/_footer.ftl"/>
|
<#include "/header/v5/_footer.ftl"/>
|
||||||
|
|
||||||
<script src="${staticUrl}/js/fangjia/v5/main.js?v=${version}"></script>
|
<script src="${staticUrl}/js/fangjia/v5/main.js?v=${version}"></script>
|
||||||
|
<script>
|
||||||
|
$("#seekAdvice,#seekAdvice2,#seekAdvice_mobile").click(function(){
|
||||||
|
$("#name_d").val(""),
|
||||||
|
$("#mobile_d").val(""),
|
||||||
|
$("#email_d").val(""),
|
||||||
|
$("#company_d").val(""),
|
||||||
|
$("#department_d").val(""),
|
||||||
|
$("#position_d").val("")
|
||||||
|
$(".mask").show();
|
||||||
|
$(".dialogBoxSolution").removeClass("dn");
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#close_d").click(function(){
|
||||||
|
$(".mask").hide();
|
||||||
|
$(".dialogBoxSolution").addClass("dn");
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$("#addData").click(function(){
|
||||||
|
if(!checkName()){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!checkMobile()){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$.ajax({
|
||||||
|
type : "POST",
|
||||||
|
url : " ${wwwUrl}/adviceLeads/doAdd",
|
||||||
|
data : {
|
||||||
|
name:$("#name_d").val(),
|
||||||
|
mobile:$("#mobile_d").val(),
|
||||||
|
email:$("#email_d").val(),
|
||||||
|
company:$("#company_d").val(),
|
||||||
|
department:$("#department_d").val(),
|
||||||
|
position:$("#position_d").val()
|
||||||
|
},
|
||||||
|
success : function(result) {
|
||||||
|
var re = $.parseJSON(result);
|
||||||
|
if(re.result == "fail"){
|
||||||
|
alert("申请失败,请重试");
|
||||||
|
} else {
|
||||||
|
$(".mask").hide();
|
||||||
|
$(".dialogBoxSolution").addClass("dn");
|
||||||
|
popMsg("申请成功");
|
||||||
|
}
|
||||||
|
},error:function (data, status) {
|
||||||
|
alert("申请失败,请重试");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
function checkMobile(){
|
||||||
|
var val = $("#mobile_d").val();
|
||||||
|
if ($.trim(val) == "") {
|
||||||
|
$("#mobile_d").parent().find(".error span").text("手机号码不能为空");
|
||||||
|
$("#mobile_d").parent().find(".error").show();
|
||||||
|
return false;
|
||||||
|
}else if(!(/^1\d{10}$/.test(val))){
|
||||||
|
$("#mobile_d").parent().find(".error span").text("手机号码格式错误");
|
||||||
|
$("#mobile_d").parent().find(".error").show();
|
||||||
|
return false;
|
||||||
|
} else{
|
||||||
|
$("#mobile_d").parent().find(".error").text("");
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkName(){
|
||||||
|
var val = $("#name_d").val();
|
||||||
|
if ($.trim(val) == "") {
|
||||||
|
$("#name_d").parent().find(".error span").text("您的姓名不能为空");
|
||||||
|
$("#name_d").parent().find(".error").show();
|
||||||
|
return false;
|
||||||
|
}else{
|
||||||
|
$("#name_d").parent().find(".error").hide();
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -179,7 +179,7 @@
|
|||||||
<span>前台总机:021-62393138</span><br>
|
<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>,百度 </span><a href="https://www.baidu.com">房价网</a><br>
|
<a href="${cityUrl}/ershoufang">上海找房子</a><span>,</span><a href="${cityUrl}/gujia">估房价</a><span>,百度 </span><a href="https://www.baidu.com">房价网</a><br>
|
||||||
<span>电子邮箱:service@fangjia.com</span>
|
<span>电子邮箱:gujia@fangjia.com</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="wx"></div>
|
<div class="wx"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -106,7 +106,7 @@
|
|||||||
<span>前台总机:021-62393138</span><br>
|
<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>,百度 </span><a href="https://www.baidu.com">房价网</a><br>
|
<a href="${cityUrl}/ershoufang">上海找房子</a><span>,</span><a href="${cityUrl}/gujia">估房价</a><span>,百度 </span><a href="https://www.baidu.com">房价网</a><br>
|
||||||
<span>电子邮箱:service@fangjia.com</span>
|
<span>电子邮箱:gujia@fangjia.com</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="wx"></div>
|
<div class="wx"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -75,7 +75,7 @@
|
|||||||
<span>前台总机:021-62393138</span><br>
|
<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>,百度 </span><a href="https://www.baidu.com">房价网</a><br>
|
<a href="${cityUrl}/ershoufang">上海找房子</a><span>,</span><a href="${cityUrl}/gujia">估房价</a><span>,百度 </span><a href="https://www.baidu.com">房价网</a><br>
|
||||||
<span>电子邮箱:service@fangjia.com</span>
|
<span>电子邮箱:gujia@fangjia.com</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="wx"></div>
|
<div class="wx"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -123,7 +123,7 @@
|
|||||||
<a href="http://support.fangjia.com/pinpai">热门品牌</a>
|
<a href="http://support.fangjia.com/pinpai">热门品牌</a>
|
||||||
</p>
|
</p>
|
||||||
<div class="footer_in por">
|
<div class="footer_in por">
|
||||||
客服热线:4001883787 电子邮箱:service@fangjia.com
|
客服热线:4001883787 电子邮箱:gujia@fangjia.com
|
||||||
<br>
|
<br>
|
||||||
©2006-2013 <strong class="yhua">房价</strong>网 版权所有 沪ICP备10203734号-1
|
©2006-2013 <strong class="yhua">房价</strong>网 版权所有 沪ICP备10203734号-1
|
||||||
<b class="bg_common"></b>
|
<b class="bg_common"></b>
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.sothis</groupId>
|
<groupId>org.sothis</groupId>
|
||||||
<artifactId>sothis-core</artifactId>
|
<artifactId>sothis-core</artifactId>
|
||||||
<version>0.2.0-SNAPSHOT</version>
|
<version>0.2.0</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
@@ -205,7 +205,6 @@ public abstract class ElasticDaoImpl<E extends MongoEntity> extends AbstractJpaC
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteByIds(List<String> idList) {
|
public void deleteByIds(List<String> idList) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
+8
@@ -0,0 +1,8 @@
|
|||||||
|
package com.fangjia.dal.mongo.dao;
|
||||||
|
|
||||||
|
import com.fangjia.dal.MongoDao;
|
||||||
|
import com.fangjia.dal.mongo.model.DistrictRoomSqmetreRent;
|
||||||
|
|
||||||
|
|
||||||
|
public interface DistrictRoomSqmetreRentDao extends MongoDao<DistrictRoomSqmetreRent> {
|
||||||
|
}
|
||||||
+8
@@ -0,0 +1,8 @@
|
|||||||
|
package com.fangjia.dal.mongo.dao;
|
||||||
|
|
||||||
|
import com.fangjia.dal.MongoDaoImpl;
|
||||||
|
import com.fangjia.dal.mongo.model.DistrictRoomSqmetreRent;
|
||||||
|
import com.fangjia.dal.mongo.model.bkoff.DistrictRentCoverage;
|
||||||
|
|
||||||
|
public class DistrictRoomSqmetreRentDaoImpl extends MongoDaoImpl<DistrictRoomSqmetreRent> implements DistrictRoomSqmetreRentDao{
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package com.fangjia.dal.mongo.dao;
|
||||||
|
|
||||||
|
import com.fangjia.dal.MongoDao;
|
||||||
|
import com.fangjia.dal.mongo.model.PriceBorder;
|
||||||
|
import com.fangjia.dal.mongo.model.PriceJiucuo;
|
||||||
|
|
||||||
|
public interface PriceBorderDao extends MongoDao<PriceBorder> {
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package com.fangjia.dal.mongo.dao;
|
||||||
|
|
||||||
|
import com.fangjia.dal.MongoDaoImpl;
|
||||||
|
import com.fangjia.dal.mongo.model.PriceBorder;
|
||||||
|
|
||||||
|
public class PriceBorderDaoImpl extends MongoDaoImpl<PriceBorder> implements PriceBorderDao{
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
package com.fangjia.dal.mongo.dao;
|
||||||
|
|
||||||
|
import com.fangjia.dal.MongoDao;
|
||||||
|
import com.fangjia.dal.MongoDaoImpl;
|
||||||
|
import com.fangjia.dal.mongo.model.RentDealPrice;
|
||||||
|
|
||||||
|
public interface RentDealPriceDao extends MongoDao<RentDealPrice> {
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package com.fangjia.dal.mongo.dao;
|
||||||
|
|
||||||
|
import com.fangjia.dal.MongoDaoImpl;
|
||||||
|
import com.fangjia.dal.mongo.model.RentDealPrice;
|
||||||
|
|
||||||
|
public class RentDealPriceDaoImpl extends MongoDaoImpl<RentDealPrice> implements RentDealPriceDao{
|
||||||
|
}
|
||||||
+8
@@ -0,0 +1,8 @@
|
|||||||
|
package com.fangjia.dal.mongo.fangjia.dao;
|
||||||
|
|
||||||
|
import com.fangjia.dal.MongoDao;
|
||||||
|
import com.fangjia.dal.mongo.fangjia.model.AdviceLeads;
|
||||||
|
|
||||||
|
public interface AdviceLeadsDao extends MongoDao<AdviceLeads> {
|
||||||
|
|
||||||
|
}
|
||||||
+8
@@ -0,0 +1,8 @@
|
|||||||
|
package com.fangjia.dal.mongo.fangjia.dao;
|
||||||
|
|
||||||
|
import com.fangjia.dal.MongoDaoImpl;
|
||||||
|
import com.fangjia.dal.mongo.fangjia.model.AdviceLeads;
|
||||||
|
|
||||||
|
public class AdviceLeadsDaoImpl extends MongoDaoImpl<AdviceLeads> implements AdviceLeadsDao {
|
||||||
|
|
||||||
|
}
|
||||||
+175
@@ -0,0 +1,175 @@
|
|||||||
|
package com.fangjia.dal.mongo.fangjia.model;
|
||||||
|
|
||||||
|
import com.fangjia.dal.MongoEntity;
|
||||||
|
|
||||||
|
import javax.persistence.*;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新版房价网咨询线索表
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Entity
|
||||||
|
@Table(name = "fangjia_coresite.advice_leads")
|
||||||
|
public class AdviceLeads implements MongoEntity {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 3318465986161755755L;
|
||||||
|
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 姓名
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 手机
|
||||||
|
*/
|
||||||
|
private String mobile;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邮箱
|
||||||
|
*/
|
||||||
|
private String email;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公司
|
||||||
|
*/
|
||||||
|
private String company;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门
|
||||||
|
*/
|
||||||
|
private String department;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 职位
|
||||||
|
*/
|
||||||
|
private String position;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private Date createDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改时间
|
||||||
|
*/
|
||||||
|
private Date modifyDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 临时用户id
|
||||||
|
*/
|
||||||
|
private String tempId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 真实用户id
|
||||||
|
*/
|
||||||
|
private String userId;
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@GeneratedValue
|
||||||
|
@Column(name = "_id", unique = true, nullable = false)
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "name")
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "company")
|
||||||
|
public String getCompany() {
|
||||||
|
return company;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCompany(String company) {
|
||||||
|
this.company = company;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "mobile")
|
||||||
|
public String getMobile() {
|
||||||
|
return mobile;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMobile(String mobile) {
|
||||||
|
this.mobile = mobile;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "email")
|
||||||
|
public String getEmail() {
|
||||||
|
return email;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEmail(String email) {
|
||||||
|
this.email = email;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "department")
|
||||||
|
public String getDepartment() {
|
||||||
|
return department;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDepartment(String department) {
|
||||||
|
this.department = department;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "position")
|
||||||
|
public String getPosition() {
|
||||||
|
return position;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPosition(String position) {
|
||||||
|
this.position = position;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "c_date")
|
||||||
|
public Date getCreateDate() {
|
||||||
|
return createDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateDate(Date createDate) {
|
||||||
|
this.createDate = createDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "m_date")
|
||||||
|
public Date getModifyDate() {
|
||||||
|
return modifyDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setModifyDate(Date modifyDate) {
|
||||||
|
this.modifyDate = modifyDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "temp_id")
|
||||||
|
public String getTempId() {
|
||||||
|
return tempId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTempId(String tempId) {
|
||||||
|
this.tempId = tempId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "user_id")
|
||||||
|
public String getUserId() {
|
||||||
|
return userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserId(String userId) {
|
||||||
|
this.userId = userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+126
@@ -0,0 +1,126 @@
|
|||||||
|
package com.fangjia.dal.mongo.model;
|
||||||
|
|
||||||
|
import com.fangjia.dal.MongoEntity;
|
||||||
|
|
||||||
|
import javax.persistence.*;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Table(name = "fangjia.district_room_sqmetre_rent")
|
||||||
|
public class DistrictRoomSqmetreRent implements MongoEntity {
|
||||||
|
|
||||||
|
private String id;
|
||||||
|
private String city;
|
||||||
|
private String region;
|
||||||
|
private String block;
|
||||||
|
private String districtName;
|
||||||
|
private int avgPrice;
|
||||||
|
private String estateType;
|
||||||
|
private Integer houseType;
|
||||||
|
private int markup;
|
||||||
|
private Date creationDate;
|
||||||
|
private int sDate;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Id
|
||||||
|
@GeneratedValue
|
||||||
|
@Column(name = "_id", unique = true, nullable = false)
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "city")
|
||||||
|
public String getCity() {
|
||||||
|
return city;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCity(String city) {
|
||||||
|
this.city = city;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "region")
|
||||||
|
public String getRegion() {
|
||||||
|
return region;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRegion(String region) {
|
||||||
|
this.region = region;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "block")
|
||||||
|
public String getBlock() {
|
||||||
|
return block;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBlock(String block) {
|
||||||
|
this.block = block;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "district_name")
|
||||||
|
public String getDistrictName() {
|
||||||
|
return districtName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDistrictName(String districtName) {
|
||||||
|
this.districtName = districtName;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "avg_price")
|
||||||
|
public int getAvgPrice() {
|
||||||
|
return avgPrice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAvgPrice(int avgPrice) {
|
||||||
|
this.avgPrice = avgPrice;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "estate_type")
|
||||||
|
public String getEstateType() {
|
||||||
|
return estateType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEstateType(String estateType) {
|
||||||
|
this.estateType = estateType;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "house_type")
|
||||||
|
public Integer getHouseType() {
|
||||||
|
return houseType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHouseType(Integer houseType) {
|
||||||
|
this.houseType = houseType;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "markup")
|
||||||
|
public int getMarkup() {
|
||||||
|
return markup;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMarkup(int markup) {
|
||||||
|
this.markup = markup;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "c_date")
|
||||||
|
public Date getCreationDate() {
|
||||||
|
return creationDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreationDate(Date creationDate) {
|
||||||
|
this.creationDate = creationDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "s_date")
|
||||||
|
public int getsDate() {
|
||||||
|
return sDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setsDate(int sDate) {
|
||||||
|
this.sDate = sDate;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,95 @@
|
|||||||
|
package com.fangjia.dal.mongo.model;
|
||||||
|
|
||||||
|
import com.fangjia.dal.MongoEntity;
|
||||||
|
|
||||||
|
import javax.persistence.*;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Table(name = "fangjia_crawl.price_border")
|
||||||
|
public class PriceBorder implements MongoEntity {
|
||||||
|
|
||||||
|
private String id;
|
||||||
|
private String city;
|
||||||
|
private String region;
|
||||||
|
private String name;
|
||||||
|
private Double latitude;
|
||||||
|
private Double longitude;
|
||||||
|
private String border;
|
||||||
|
private Integer level;
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@GeneratedValue
|
||||||
|
@Column(name = "_id", unique = true, nullable = false)
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "city")
|
||||||
|
public String getCity() {
|
||||||
|
return city;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCity(String city) {
|
||||||
|
this.city = city;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "region")
|
||||||
|
public String getRegion() {
|
||||||
|
return region;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRegion(String region) {
|
||||||
|
this.region = region;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "name")
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Column(name = "latitude")
|
||||||
|
public Double getLatitude() {
|
||||||
|
return latitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLatitude(Double latitude) {
|
||||||
|
this.latitude = latitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "longitude")
|
||||||
|
public Double getLongitude() {
|
||||||
|
return longitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLongitude(Double longitude) {
|
||||||
|
this.longitude = longitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "border")
|
||||||
|
public String getBorder() {
|
||||||
|
return border;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBorder(String border) {
|
||||||
|
this.border = border;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "level")
|
||||||
|
public Integer getLevel() {
|
||||||
|
return level;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLevel(Integer level) {
|
||||||
|
this.level = level;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,200 @@
|
|||||||
|
package com.fangjia.dal.mongo.model;
|
||||||
|
|
||||||
|
import com.fangjia.dal.MongoEntity;
|
||||||
|
|
||||||
|
import javax.persistence.*;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Table(name = "fangjia.rent_deal_price")
|
||||||
|
public class RentDealPrice implements MongoEntity {
|
||||||
|
|
||||||
|
private String id;
|
||||||
|
private String city;
|
||||||
|
private String region;
|
||||||
|
private String districtName;
|
||||||
|
private Double area;
|
||||||
|
private Integer totalPrice;
|
||||||
|
private Integer avgPrice;
|
||||||
|
private String source;
|
||||||
|
private Integer room;
|
||||||
|
private Integer hall;
|
||||||
|
private Integer toilet;
|
||||||
|
private String fitment;
|
||||||
|
private String url;
|
||||||
|
private String direction;
|
||||||
|
private Integer height;
|
||||||
|
private Date modificationDate;
|
||||||
|
private Date tradeDate;
|
||||||
|
private Date createDate;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Id
|
||||||
|
@GeneratedValue
|
||||||
|
@Column(name = "_id", unique = true, nullable = false)
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Column(name = "city")
|
||||||
|
public String getCity() {
|
||||||
|
return city;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCity(String city) {
|
||||||
|
this.city = city;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "region")
|
||||||
|
public String getRegion() {
|
||||||
|
return region;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRegion(String region) {
|
||||||
|
this.region = region;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "district_name")
|
||||||
|
public String getDistrictName() {
|
||||||
|
return districtName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDistrictName(String districtName) {
|
||||||
|
this.districtName = districtName;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "area")
|
||||||
|
public Double getArea() {
|
||||||
|
return area;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setArea(Double area) {
|
||||||
|
this.area = area;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "total_price")
|
||||||
|
public Integer getTotalPrice() {
|
||||||
|
return totalPrice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTotalPrice(Integer totalPrice) {
|
||||||
|
this.totalPrice = totalPrice;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "avg_price")
|
||||||
|
public Integer getAvgPrice() {
|
||||||
|
return avgPrice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAvgPrice(Integer avgPrice) {
|
||||||
|
this.avgPrice = avgPrice;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "source")
|
||||||
|
public String getSource() {
|
||||||
|
return source;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSource(String source) {
|
||||||
|
this.source = source;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "room")
|
||||||
|
public Integer getRoom() {
|
||||||
|
return room;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRoom(Integer room) {
|
||||||
|
this.room = room;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "hall")
|
||||||
|
public Integer getHall() {
|
||||||
|
return hall;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHall(Integer hall) {
|
||||||
|
this.hall = hall;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "toilet")
|
||||||
|
public Integer getToilet() {
|
||||||
|
return toilet;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setToilet(Integer toilet) {
|
||||||
|
this.toilet = toilet;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "fitment")
|
||||||
|
public String getFitment() {
|
||||||
|
return fitment;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFitment(String fitment) {
|
||||||
|
this.fitment = fitment;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "url")
|
||||||
|
public String getUrl() {
|
||||||
|
return url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUrl(String url) {
|
||||||
|
this.url = url;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "direction")
|
||||||
|
public String getDirection() {
|
||||||
|
return direction;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setDirection(String direction) {
|
||||||
|
this.direction = direction;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "height")
|
||||||
|
public Integer getHeight() {
|
||||||
|
return height;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHeight(Integer height) {
|
||||||
|
this.height = height;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Column(name = "trade_date")
|
||||||
|
public Date getTradeDate() {
|
||||||
|
return tradeDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTradeDate(Date tradeDate) {
|
||||||
|
this.tradeDate = tradeDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "create_date")
|
||||||
|
public Date getCreateDate() {
|
||||||
|
return createDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateDate(Date createDate) {
|
||||||
|
this.createDate = createDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "m_date")
|
||||||
|
public Date getModificationDate() {
|
||||||
|
return modificationDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setModificationDate(Date modificationDate) {
|
||||||
|
this.modificationDate = modificationDate;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -14,10 +14,8 @@ public interface SeawaterDao extends com.fangjia.dal.SeawaterDao<Seawater> {
|
|||||||
|
|
||||||
Seawater findByIdFromEs(String id,String table);
|
Seawater findByIdFromEs(String id,String table);
|
||||||
|
|
||||||
List<Seawater> findSeawatersFromEs(String category, String city, String region, String name,
|
List<Seawater> findSeawatersFromEs(String category, String city, String region, String name, List<String> alias, List<String> regionAlias, Integer startDate, Integer endDate,
|
||||||
List<String> alias, List<String> regionAlias, Integer startDate, Integer endDate, Integer room, String root,
|
Double startArea, Double endArea, Integer startPrice, Integer endPrice, Integer room, String root, String sort, boolean order, int start, int limit , String table);
|
||||||
String sort, boolean order, int start, int limit, String[] keys,String table);
|
|
||||||
|
|
||||||
List<Seawater> findHouses(String city, String region, List<String> alias, Integer minPrice, Integer maxPrice, Integer limit);
|
List<Seawater> findHouses(String city, String region, List<String> alias, Integer minPrice, Integer maxPrice, Integer limit);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+87
-10
@@ -29,7 +29,7 @@ public class SeawaterDaoImpl extends com.fangjia.dal.SeawaterDaoImpl<Seawater> i
|
|||||||
@Override
|
@Override
|
||||||
public Seawater findByIdFromEs(String id,String table) {
|
public Seawater findByIdFromEs(String id,String table) {
|
||||||
Seawater seawater = null;
|
Seawater seawater = null;
|
||||||
List<JSONObject> jsonList = queryList(id,null,null,null,null,null,null,null,null,null,null,null,false,-1,-1,table);
|
List<JSONObject> jsonList = queryList(id,null,null,null,null,null,null,null,null, null, null, null, null, null,null,null,false,-1,-1,table);
|
||||||
if(jsonList == null){
|
if(jsonList == null){
|
||||||
return null;
|
return null;
|
||||||
}else{
|
}else{
|
||||||
@@ -42,11 +42,9 @@ public class SeawaterDaoImpl extends com.fangjia.dal.SeawaterDaoImpl<Seawater> i
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Seawater> findSeawatersFromEs(String category, String city, String region, String name,
|
public List<Seawater> findSeawatersFromEs(String category, String city, String region, String name, List<String> alias, List<String> regionAlias, Integer startDate, Integer endDate, Double startArea, Double endArea, Integer startPrice, Integer endPrice, Integer room, String root, String sort, boolean order, int start, int limit, String table) {
|
||||||
List<String> alias, List<String> regionAlias, Integer startDate, Integer endDate, Integer room, String root,
|
|
||||||
String sort, boolean order, int start, int limit, String[] keys,String table) {
|
|
||||||
List<Seawater> seawaterList= new ArrayList<Seawater>();
|
List<Seawater> seawaterList= new ArrayList<Seawater>();
|
||||||
List<JSONObject> jsonList = queryList(null,category,city,region,name,alias,regionAlias,startDate,endDate,room,root,sort,order,start,limit,table);
|
List<JSONObject> jsonList = queryList(null,category,city,region,name,alias,regionAlias,startDate,endDate, startArea, endArea, startPrice, endPrice, room,root,sort,order,start,limit,table);
|
||||||
if(jsonList == null){
|
if(jsonList == null){
|
||||||
return null;
|
return null;
|
||||||
}else{
|
}else{
|
||||||
@@ -55,6 +53,7 @@ public class SeawaterDaoImpl extends com.fangjia.dal.SeawaterDaoImpl<Seawater> i
|
|||||||
return seawaterList;
|
return seawaterList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Seawater> findHouses(String city, String region, List<String> alias, Integer minPrice, Integer maxPrice, Integer limit) {
|
public List<Seawater> findHouses(String city, String region, List<String> alias, Integer minPrice, Integer maxPrice, Integer limit) {
|
||||||
JSONObject reqBody = new JSONObject();
|
JSONObject reqBody = new JSONObject();
|
||||||
@@ -97,6 +96,44 @@ public class SeawaterDaoImpl extends com.fangjia.dal.SeawaterDaoImpl<Seawater> i
|
|||||||
return new ArrayList<Seawater>();
|
return new ArrayList<Seawater>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteById(String id) {
|
||||||
|
deleteByIds(Arrays.asList(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
private Map<String, String> buildHeader() {
|
||||||
|
Base64 token = new Base64();
|
||||||
|
String authenticationEncoding = token.encodeAsString(new String("" + ES_USER + ":" + ES_PASSWORD + "").getBytes());
|
||||||
|
Map<String, String> headers = new HashMap<String, String>();
|
||||||
|
headers.put("Content-Type", "application/json");
|
||||||
|
headers.put("Authorization", "Basic " + authenticationEncoding + "");
|
||||||
|
return headers;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteByIds(List<String> idList) {
|
||||||
|
HttpRequest request = new HttpRequest();
|
||||||
|
|
||||||
|
JSONObject reqBody = new JSONObject();
|
||||||
|
JSONObject query = new JSONObject();
|
||||||
|
JSONObject bool = new JSONObject();
|
||||||
|
JSONArray must = new JSONArray();
|
||||||
|
must.add(addTerms("_id", idList));
|
||||||
|
bool.put("must", must);
|
||||||
|
query.put("bool", bool);
|
||||||
|
reqBody.put("query", query);
|
||||||
|
|
||||||
|
JSONObject script = new JSONObject();
|
||||||
|
script.put("source", "ctx._source.status=1");
|
||||||
|
reqBody.put("script", script);
|
||||||
|
|
||||||
|
try {
|
||||||
|
request.postWithBody("http://es.fangjia.com:9200/seawater/_update_by_query", reqBody, this.buildHeader(), "UTF-8");
|
||||||
|
} catch (HttpRequestException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private JSONObject addMatch(String name, String value){
|
private JSONObject addMatch(String name, String value){
|
||||||
JSONObject term = new JSONObject();
|
JSONObject term = new JSONObject();
|
||||||
JSONObject match = new JSONObject();
|
JSONObject match = new JSONObject();
|
||||||
@@ -200,7 +237,8 @@ public class SeawaterDaoImpl extends com.fangjia.dal.SeawaterDaoImpl<Seawater> i
|
|||||||
}
|
}
|
||||||
|
|
||||||
private JSONObject query(String id,String category, String city, String region, String name, List<String> alias,
|
private JSONObject query(String id,String category, String city, String region, String name, List<String> alias,
|
||||||
List<String> regionAlias, Integer startDate, Integer endDate, Integer room, String root,String sort, boolean order, int start, int limit,String table){
|
List<String> regionAlias, Integer startDate, Integer endDate, Double startArea, Double endArea, Integer startPrice, Integer endPrice,
|
||||||
|
Integer room, String root,String sort, boolean order, int start, int limit,String table){
|
||||||
long time1 = System.currentTimeMillis();
|
long time1 = System.currentTimeMillis();
|
||||||
JSONObject reqBody = new JSONObject();
|
JSONObject reqBody = new JSONObject();
|
||||||
JSONObject q = new JSONObject();
|
JSONObject q = new JSONObject();
|
||||||
@@ -288,6 +326,37 @@ public class SeawaterDaoImpl extends com.fangjia.dal.SeawaterDaoImpl<Seawater> i
|
|||||||
jsonList.add(temp);
|
jsonList.add(temp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(startArea != null || endArea != null){
|
||||||
|
JSONObject param = new JSONObject();
|
||||||
|
JSONObject temp = new JSONObject();
|
||||||
|
JSONObject temp2 = new JSONObject();
|
||||||
|
if(startArea != null){
|
||||||
|
temp2.put("gte", startArea);
|
||||||
|
}
|
||||||
|
if(endArea != null){
|
||||||
|
temp2.put("lte", endArea);
|
||||||
|
}
|
||||||
|
param.put("area", temp2);
|
||||||
|
temp.put("range", param);
|
||||||
|
jsonList.add(temp);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(startPrice != null || endPrice != null){
|
||||||
|
JSONObject param = new JSONObject();
|
||||||
|
JSONObject temp = new JSONObject();
|
||||||
|
JSONObject temp2 = new JSONObject();
|
||||||
|
if(startPrice != null){
|
||||||
|
temp2.put("gte", startPrice);
|
||||||
|
}
|
||||||
|
if(endPrice != null){
|
||||||
|
temp2.put("lte", endPrice);
|
||||||
|
}
|
||||||
|
param.put("avg_price", temp2);
|
||||||
|
temp.put("range", param);
|
||||||
|
jsonList.add(temp);
|
||||||
|
}
|
||||||
|
|
||||||
if(StringUtils.isNotBlank(sort)){
|
if(StringUtils.isNotBlank(sort)){
|
||||||
JSONObject jsonOrder = new JSONObject();
|
JSONObject jsonOrder = new JSONObject();
|
||||||
if(order){
|
if(order){
|
||||||
@@ -308,6 +377,14 @@ public class SeawaterDaoImpl extends com.fangjia.dal.SeawaterDaoImpl<Seawater> i
|
|||||||
if(limit >= 0){
|
if(limit >= 0){
|
||||||
reqBody.put("size", limit);
|
reqBody.put("size", limit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ²»Õ¹Ê¾É¾³ý
|
||||||
|
JSONObject param = new JSONObject();
|
||||||
|
param.put("status", 0);
|
||||||
|
JSONObject temp = new JSONObject();
|
||||||
|
temp.put("term", param);
|
||||||
|
jsonList.add(temp);
|
||||||
|
|
||||||
query.put("must", jsonList);
|
query.put("must", jsonList);
|
||||||
q.put("bool", query);
|
q.put("bool", query);
|
||||||
reqBody.put("query", q);
|
reqBody.put("query", q);
|
||||||
@@ -319,7 +396,7 @@ public class SeawaterDaoImpl extends com.fangjia.dal.SeawaterDaoImpl<Seawater> i
|
|||||||
headers.put("Content-Type", "application/json");
|
headers.put("Content-Type", "application/json");
|
||||||
headers.put("Authorization", "Basic "+authenticationEncoding+"");
|
headers.put("Authorization", "Basic "+authenticationEncoding+"");
|
||||||
try {
|
try {
|
||||||
String response = request.postWithBody("http://es.fangjia.com:9200/"+table+"/_search", reqBody, headers, "UTF-8");
|
String response = request.postWithBody("http://es.fangjia.com:9200/"+table+"/_search?rest_total_hits_as_int=true", reqBody, headers, "UTF-8");
|
||||||
JSONObject json = JSONObject.fromObject(response);
|
JSONObject json = JSONObject.fromObject(response);
|
||||||
long time2 = System.currentTimeMillis();
|
long time2 = System.currentTimeMillis();
|
||||||
System.out.println(time2-time1);
|
System.out.println(time2-time1);
|
||||||
@@ -331,8 +408,8 @@ public class SeawaterDaoImpl extends com.fangjia.dal.SeawaterDaoImpl<Seawater> i
|
|||||||
}
|
}
|
||||||
|
|
||||||
private List<JSONObject> queryList(String id,String category, String city, String region, String name, List<String> alias,
|
private List<JSONObject> queryList(String id,String category, String city, String region, String name, List<String> alias,
|
||||||
List<String> regionAlias, Integer startDate, Integer endDate, Integer room, String root,String sort, boolean order, int start, int limit,String table){
|
List<String> regionAlias, Integer startDate, Integer endDate, Double startArea, Double endArea, Integer startPrice, Integer endPrice, Integer room, String root,String sort, boolean order, int start, int limit,String table){
|
||||||
JSONObject json = query(id,category,city,region,name,alias,regionAlias,startDate,endDate,room,root,sort,order,start,limit,table);
|
JSONObject json = query(id,category,city,region,name,alias,regionAlias,startDate,endDate, startArea, endArea, startPrice, endPrice, room,root,sort,order,start,limit,table);
|
||||||
if(!json.containsKey("hits") || !json.getJSONObject("hits").containsKey("hits")){
|
if(!json.containsKey("hits") || !json.getJSONObject("hits").containsKey("hits")){
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -347,7 +424,7 @@ public class SeawaterDaoImpl extends com.fangjia.dal.SeawaterDaoImpl<Seawater> i
|
|||||||
|
|
||||||
private int queryCount(String id,String category, String city, String region, String name, List<String> alias,
|
private int queryCount(String id,String category, String city, String region, String name, List<String> alias,
|
||||||
List<String> regionAlias, Integer startDate, Integer endDate, Integer room, String root,String sort, boolean order, int start, int limit,String table){
|
List<String> regionAlias, Integer startDate, Integer endDate, Integer room, String root,String sort, boolean order, int start, int limit,String table){
|
||||||
JSONObject json = query(id,category,city,region,name,alias,regionAlias,startDate,endDate,room,root,sort,order,start,limit,table);
|
JSONObject json = query(id,category,city,region,name,alias,regionAlias,startDate,endDate,null, null, null, null, room,root,sort,order,start,limit,table);
|
||||||
if(!json.containsKey("hits") || !json.getJSONObject("hits").containsKey("total")){
|
if(!json.containsKey("hits") || !json.getJSONObject("hits").containsKey("total")){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -122,10 +122,8 @@ public class District implements SeaweedEntity {
|
|||||||
private String houseStructure; //·¿Îݽṹ
|
private String houseStructure; //·¿Îݽṹ
|
||||||
private String source;
|
private String source;
|
||||||
private String propertyLife;
|
private String propertyLife;
|
||||||
//
|
//ÏçÕò½ÖµÀ
|
||||||
// //ÏçÕò½ÖµÀ
|
private String township;
|
||||||
// private String township;
|
|
||||||
//
|
|
||||||
|
|
||||||
private String pinyin;
|
private String pinyin;
|
||||||
|
|
||||||
@@ -237,6 +235,8 @@ public class District implements SeaweedEntity {
|
|||||||
|
|
||||||
private String createYear;
|
private String createYear;
|
||||||
|
|
||||||
|
private Integer nameCat;
|
||||||
|
|
||||||
@Column(name = "source_web")
|
@Column(name = "source_web")
|
||||||
public String getSourceWeb() {
|
public String getSourceWeb() {
|
||||||
return sourceWeb;
|
return sourceWeb;
|
||||||
@@ -1873,17 +1873,21 @@ public class District implements SeaweedEntity {
|
|||||||
this.mappingAlias = mappingAlias;
|
this.mappingAlias = mappingAlias;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Column(name = "township")
|
@Column(name = "township")
|
||||||
// public String getTownship() {
|
public String getTownship() {
|
||||||
// return township;
|
return township;
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// public void setTownship(String township) {
|
|
||||||
// this.township = township;
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public void setTownship(String township) {
|
||||||
|
this.township = township;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Column(name = "name_cat")
|
||||||
|
public Integer getNameCat() {
|
||||||
|
return nameCat;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNameCat(Integer nameCat) {
|
||||||
|
this.nameCat = nameCat;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -147,5 +147,28 @@
|
|||||||
<version>1.0.0</version>
|
<version>1.0.0</version>
|
||||||
<classifier>jdk18</classifier>
|
<classifier>jdk18</classifier>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!-- html转pdf -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.xhtmlrenderer</groupId>
|
||||||
|
<artifactId>core-renderer</artifactId>
|
||||||
|
<version>R8</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- 绘制折线图等 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jfree</groupId>
|
||||||
|
<artifactId>jfreechart</artifactId>
|
||||||
|
<version>1.5.3</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.xmlgraphics</groupId>
|
||||||
|
<artifactId>batik-codec</artifactId>
|
||||||
|
<version>1.11</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.sothis</groupId>
|
||||||
|
<artifactId>sothis-core</artifactId>
|
||||||
|
<version>0.1.0-SNAPSHOT</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
+29
-7
@@ -1705,6 +1705,25 @@ public class AddressController {
|
|||||||
return mav;
|
return mav;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Object similarityAction(AddesssMatchModel model) {
|
||||||
|
RestfulModelAndView mav = new RestfulModelAndView();
|
||||||
|
if (StringUtils.isBlank(model.getAddress_1()) || StringUtils.isBlank(model.getAddress_2())) {
|
||||||
|
mav.setModel(BasicModel.buildBadRequestModel("两个地址均不能为空"));
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
model.setAddress(model.getAddress_1());
|
||||||
|
String result1 = addressMatchProxyService.standard(convertModelToMap(model));
|
||||||
|
model.setAddress(model.getAddress_2());
|
||||||
|
String result2 = addressMatchProxyService.standard(convertModelToMap(model));
|
||||||
|
if (result1 != null && result2 != null) {
|
||||||
|
Map<String, Object> resultMap = addressService.addressSimilarity(result1, result2);
|
||||||
|
mav.setModel(BasicModel.buildOKModel().setResult(resultMap));
|
||||||
|
} else {
|
||||||
|
mav.setModel(BasicModel.buildServerErrorModel().setMsg("服务升级中..."));
|
||||||
|
}
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
|
||||||
public Object parseCityAction(AddressModel model) {
|
public Object parseCityAction(AddressModel model) {
|
||||||
RestfulModelAndView mav = new RestfulModelAndView();
|
RestfulModelAndView mav = new RestfulModelAndView();
|
||||||
if (StringUtils.isBlank(model.getProvince())) {
|
if (StringUtils.isBlank(model.getProvince())) {
|
||||||
@@ -1749,7 +1768,8 @@ public class AddressController {
|
|||||||
matchParams.setProvince(model.getProvince());
|
matchParams.setProvince(model.getProvince());
|
||||||
|
|
||||||
// matchParams.setUseMap(true);
|
// matchParams.setUseMap(true);
|
||||||
matchParams.setUseAliyunApi(true);
|
matchParams.setUseAliyunApi(false);
|
||||||
|
// matchParams.setUseCrf(true);
|
||||||
matchParams.setContainsLocation(model.isContainsLocation());
|
matchParams.setContainsLocation(model.isContainsLocation());
|
||||||
Building building = addressParserService.standard(matchParams);
|
Building building = addressParserService.standard(matchParams);
|
||||||
Address address = building.getSearchAddress();
|
Address address = building.getSearchAddress();
|
||||||
@@ -1765,13 +1785,14 @@ public class AddressController {
|
|||||||
dto.append("township", address.getTownship());
|
dto.append("township", address.getTownship());
|
||||||
dto.append("street", address.getStreet());
|
dto.append("street", address.getStreet());
|
||||||
dto.append("streetNumber", address.getStreetNumber());
|
dto.append("streetNumber", address.getStreetNumber());
|
||||||
dto.append("name", building.getSuggestName());
|
|
||||||
if(StringUtils.isBlank(building.getSuggestName())){
|
if(StringUtils.isBlank(building.getSuggestName())){
|
||||||
if(StringUtils.isNotBlank(address.getParsedPropertyName())){
|
if(StringUtils.isNotBlank(address.getParsedPropertyName())){
|
||||||
dto.append("name", address.getParsedPropertyName());
|
dto.append("name", address.getParsedPropertyName());
|
||||||
}else if(StringUtils.isNotBlank(address.getOrgKeywords())){
|
}else if(StringUtils.isNotBlank(address.getOrgKeywords())){
|
||||||
dto.append("name", address.getOrgKeywords());
|
dto.append("name", address.getOrgKeywords());
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
dto.append("name", building.getSuggestName());
|
||||||
}
|
}
|
||||||
if(StringUtils.isBlank(address.getStreet()) && StringUtils.isNotBlank(building.getAddress())){
|
if(StringUtils.isBlank(address.getStreet()) && StringUtils.isNotBlank(building.getAddress())){
|
||||||
String addr = building.getAddress();
|
String addr = building.getAddress();
|
||||||
@@ -1789,6 +1810,7 @@ public class AddressController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
dto.append("buildingNumber", address.getBuildingNumber());
|
dto.append("buildingNumber", address.getBuildingNumber());
|
||||||
|
dto.append("floor", address.getFloor());
|
||||||
dto.append("unitNumber", address.getUnitNumber());
|
dto.append("unitNumber", address.getUnitNumber());
|
||||||
dto.append("roomNumber", address.getRoomNumber());
|
dto.append("roomNumber", address.getRoomNumber());
|
||||||
dto.append("formattedAddress", address.getFormattedAddress());
|
dto.append("formattedAddress", address.getFormattedAddress());
|
||||||
@@ -2729,10 +2751,10 @@ public class AddressController {
|
|||||||
@Authority(role = Role.USER)
|
@Authority(role = Role.USER)
|
||||||
public Object riskAction(AddesssMatchModel model) {
|
public Object riskAction(AddesssMatchModel model) {
|
||||||
RestfulModelAndView mav = new RestfulModelAndView();
|
RestfulModelAndView mav = new RestfulModelAndView();
|
||||||
if (StringUtils.isEmpty(model.getCity())) {
|
// if (StringUtils.isEmpty(model.getCity())) {
|
||||||
mav.setModel(BasicModel.buildBadRequestModel("参数错误,城市不能为空!"));
|
// mav.setModel(BasicModel.buildBadRequestModel("参数错误,城市不能为空!"));
|
||||||
return mav;
|
// return mav;
|
||||||
}
|
// }
|
||||||
if (StringUtils.isEmpty(model.getAddress())) {
|
if (StringUtils.isEmpty(model.getAddress())) {
|
||||||
mav.setModel(BasicModel.buildBadRequestModel("参数错误,地址不能为空!"));
|
mav.setModel(BasicModel.buildBadRequestModel("参数错误,地址不能为空!"));
|
||||||
return mav;
|
return mav;
|
||||||
@@ -2751,7 +2773,7 @@ public class AddressController {
|
|||||||
if(json.getInt("code")==200){
|
if(json.getInt("code")==200){
|
||||||
JSONObject resultJson = json.getJSONObject("result");
|
JSONObject resultJson = json.getJSONObject("result");
|
||||||
JSONObject searchAddress = resultJson.getJSONObject("searchAddress");
|
JSONObject searchAddress = resultJson.getJSONObject("searchAddress");
|
||||||
if(resultJson.getInt("credit")>0){
|
if(resultJson.getDouble("credit")>0){
|
||||||
District district = districtService.findByNameAndAlias(resultJson.getString("city"), resultJson.getString("district"), resultJson.getString("name"), "district");
|
District district = districtService.findByNameAndAlias(resultJson.getString("city"), resultJson.getString("district"), resultJson.getString("name"), "district");
|
||||||
if(district != null){
|
if(district != null){
|
||||||
resultMap.put("riskLevel","A");
|
resultMap.put("riskLevel","A");
|
||||||
|
|||||||
+385
-99
@@ -1,154 +1,424 @@
|
|||||||
package com.fangjia.open.controllers;
|
package com.fangjia.open.controllers;
|
||||||
|
|
||||||
|
import com.fangjia.core.util.AnalyticsUtil;
|
||||||
|
import com.fangjia.core.util.BeanUtils;
|
||||||
import com.fangjia.core.util.DataUtil;
|
import com.fangjia.core.util.DataUtil;
|
||||||
import com.fangjia.dal.common.DistrictKey;
|
import com.fangjia.dal.common.DistrictKey;
|
||||||
|
import com.fangjia.dal.mongo.model.CzbankSampleLog;
|
||||||
|
import com.fangjia.dal.mongo.model.Evaluation;
|
||||||
|
import com.fangjia.dal.mongo.model.FangjiaOfficialAreaMap;
|
||||||
import com.fangjia.dal.seaweed.model.District;
|
import com.fangjia.dal.seaweed.model.District;
|
||||||
|
import com.fangjia.open.interceptors.Authority;
|
||||||
|
import com.fangjia.open.interceptors.Role;
|
||||||
import com.fangjia.open.model.BasicModel;
|
import com.fangjia.open.model.BasicModel;
|
||||||
|
import com.fangjia.open.model.CzbankSampleModel;
|
||||||
import com.fangjia.open.model.RestfulModelAndView;
|
import com.fangjia.open.model.RestfulModelAndView;
|
||||||
|
import com.fangjia.open.util.EvaluationFactorUtil;
|
||||||
|
import com.fangjia.open.ws.query.CollateralSampleQuery;
|
||||||
|
import com.fangjia.open.ws.query.EvaluationQuery;
|
||||||
|
import com.fangjia.service.api.AddressMatchProxyService;
|
||||||
import com.fangjia.service.bo.Collateral;
|
import com.fangjia.service.bo.Collateral;
|
||||||
|
import com.fangjia.service.bo.EvaluationResult;
|
||||||
|
import com.fangjia.service.bo.Sample;
|
||||||
import com.fangjia.service.datastore.CzbankSampleService;
|
import com.fangjia.service.datastore.CzbankSampleService;
|
||||||
import com.fangjia.service.datastore.DistrictService;
|
import com.fangjia.service.datastore.DistrictService;
|
||||||
|
import com.fangjia.service.datastore.EvaluationService;
|
||||||
import com.fangjia.service.datastore.bean.CollateralSampleQueryBean;
|
import com.fangjia.service.datastore.bean.CollateralSampleQueryBean;
|
||||||
|
import com.fangjia.service.mongo.fangjia.CzbankSampleLogService;
|
||||||
|
import com.fangjia.service.open.FangjiaOfficialAreaService;
|
||||||
|
import net.sf.json.JSONArray;
|
||||||
|
import net.sf.json.JSONObject;
|
||||||
|
import net.sf.json.JsonConfig;
|
||||||
|
import net.sf.json.util.PropertyFilter;
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
|
import org.apache.commons.lang.ArrayUtils;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
import org.apache.cxf.interceptor.Fault;
|
||||||
import org.dom4j.Document;
|
import org.dom4j.Document;
|
||||||
import org.dom4j.DocumentHelper;
|
import org.dom4j.DocumentHelper;
|
||||||
import org.dom4j.Element;
|
import org.dom4j.Element;
|
||||||
|
import org.sothis.web.mvc.ActionContext;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 浙商银行风险缓释项目接口
|
* 浙商银行风险缓释项目接口
|
||||||
*/
|
*/
|
||||||
|
@Authority(role = Role.USER)
|
||||||
public class CzbankController {
|
public class CzbankController {
|
||||||
|
|
||||||
|
|
||||||
private CzbankSampleService czbankSampleService;
|
private CzbankSampleService czbankSampleService;
|
||||||
private DistrictService districtService;
|
private DistrictService districtService;
|
||||||
|
private CzbankSampleLogService czbankSampleLogService;
|
||||||
|
private FangjiaOfficialAreaService fangjiaOfficialAreaService;
|
||||||
|
private AddressMatchProxyService addressMatchProxyService;
|
||||||
|
private EvaluationService evaluationService;
|
||||||
|
|
||||||
|
private List<String> PROPERTY_TYPE_CODE_LIST = Arrays.asList("01", "02");
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 样本查询接口
|
* 样本查询接口
|
||||||
* @param request
|
* @param model
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Object sampleAction(HttpServletRequest request){
|
@Authority(role = Role.USER)
|
||||||
|
public Object sampleAction(CzbankSampleModel model){
|
||||||
RestfulModelAndView mav = new RestfulModelAndView();
|
RestfulModelAndView mav = new RestfulModelAndView();
|
||||||
List<CollateralSampleQueryBean> queryBeans = null;
|
|
||||||
try {
|
long start = System.currentTimeMillis();
|
||||||
queryBeans = parseParams(request);
|
if(StringUtils.isBlank(model.getCltNo())){
|
||||||
} catch (Exception e) {
|
mav.setModel(BasicModel.buildBadRequestModel("cltNo押品编号不能为空"));
|
||||||
mav.setModel(BasicModel.buildBadRequestModel(e.getMessage()));
|
|
||||||
return mav;
|
return mav;
|
||||||
}
|
}
|
||||||
if(queryBeans == null || queryBeans.isEmpty()){
|
|
||||||
mav.setModel(BasicModel.buildBadRequestModel("参数无效"));
|
if (StringUtils.isBlank(model.getProvince()) ||StringUtils.isBlank(model.getCity()) || StringUtils.isBlank(model.getDistrict())
|
||||||
|
|| StringUtils.isBlank(model.getBuildingName()) || StringUtils.isBlank(model.getPropertyTypeCode())) {
|
||||||
|
mav.setModel(BasicModel.buildBadRequestModel("参数缺失:province(省),city(城市),district(区域),buildingName(名称),propertyTypeCode(物业类型编码)是必须参数"));
|
||||||
return mav;
|
return mav;
|
||||||
}
|
}
|
||||||
String paramMax = request.getParameter("max");
|
|
||||||
if(StringUtils.isBlank(paramMax) || !StringUtils.isNumeric(paramMax)){
|
FangjiaOfficialAreaMap fangjiaOfficialAreaMap = fangjiaOfficialAreaService.convertOfficialCodeToFangjia(model.getDistrict());
|
||||||
paramMax = "5";
|
if(fangjiaOfficialAreaMap == null){
|
||||||
|
fangjiaOfficialAreaMap = fangjiaOfficialAreaService.convertOfficialCodeToFangjiaCity(model.getDistrict());
|
||||||
}
|
}
|
||||||
int max = Integer.valueOf(paramMax);
|
if(fangjiaOfficialAreaMap == null){
|
||||||
if(max < 1 || max > 20){
|
mav.setModel(BasicModel.buildBadRequestModel("地区信息无法映射到房价网的地区信息->(province:" + model.getProvince() + " ,city: " + model.getCity() + " ,district: " + model.getDistrict() + ")"));
|
||||||
max = 5;
|
return mav;
|
||||||
}
|
}
|
||||||
List<Collateral> collateralList = czbankSampleService.findSample(queryBeans, max);
|
|
||||||
mav.setModel(BasicModel.buildOKModel().setResult(collateralList));
|
|
||||||
|
|
||||||
|
String propertyTypeCode = model.getPropertyTypeCode();
|
||||||
|
if(StringUtils.isBlank(propertyTypeCode)){
|
||||||
|
propertyTypeCode = "01";
|
||||||
|
}
|
||||||
|
if(!PROPERTY_TYPE_CODE_LIST.contains(propertyTypeCode)){
|
||||||
|
mav.setModel(BasicModel.buildBadRequestModel("propertyTypeCode取值非法"));
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
if(model.getStrctureArea() <= 0){
|
||||||
|
mav.setModel(BasicModel.buildBadRequestModel("strctureArea取值非法"));
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (model.getFloorNumber() != null && (model.getFloorNumber() <= 0 || model.getFloorNumber() > 59)) {
|
||||||
|
mav.setModel(BasicModel.buildBadRequestModel("floorNumber,正确范围[1,60)"));
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (model.getAboveFloorAmount() != null && (model.getAboveFloorAmount() <= 0 || model.getAboveFloorAmount() > 59)) {
|
||||||
|
mav.setModel(BasicModel.buildBadRequestModel("floorAmount,正确范围[1,60)"));
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
if (model.getAboveFloorAmount() != null && model.getAboveFloorAmount() != null && model.getFloorNumber()> model.getAboveFloorAmount()) {
|
||||||
|
mav.setModel(BasicModel.buildBadRequestModel("所在楼层不能大于总楼层"));
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Integer decrCondCode = model.getDecrCondCode();
|
||||||
|
if(decrCondCode == null){
|
||||||
|
decrCondCode = 2;
|
||||||
|
}
|
||||||
|
if(decrCondCode > 5 || decrCondCode < 1){
|
||||||
|
mav.setModel(BasicModel.buildBadRequestModel("decrCondCode取值非法"));
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
|
||||||
|
Integer towardDirectCode = model.getTowardDirectCode();
|
||||||
|
if(towardDirectCode == null || towardDirectCode == 0){
|
||||||
|
towardDirectCode = 3;
|
||||||
|
}
|
||||||
|
if(towardDirectCode > 10 || towardDirectCode < 1){
|
||||||
|
mav.setModel(BasicModel.buildBadRequestModel("towardDirectCode取值非法"));
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
CollateralSampleQueryBean queryBean = new CollateralSampleQueryBean();
|
||||||
|
BeanUtils.copyProperties(model, queryBean);
|
||||||
|
queryBean.setFangjiaCity(fangjiaOfficialAreaMap.getFangjiaCity());
|
||||||
|
queryBean.setFangjiaDistrict(fangjiaOfficialAreaMap.getFangjiaDistrict());
|
||||||
|
|
||||||
|
District property = districtService.findByNameAndAlias(queryBean.getFangjiaCity(), queryBean.getFangjiaDistrict(), model.getBuildingName(), "district");
|
||||||
|
if(property == null){
|
||||||
|
Map<String, Object> params = new HashMap<String, Object>();
|
||||||
|
params.put("city", queryBean.getFangjiaCity());
|
||||||
|
params.put("suggestDistrict", queryBean.getFangjiaDistrict());
|
||||||
|
if(StringUtils.isBlank(queryBean.getAddress())){
|
||||||
|
params.put("address", model.getBuildingName());
|
||||||
|
}else{
|
||||||
|
params.put("address", queryBean.getAddress());
|
||||||
|
params.put("suggestName", model.getBuildingName());
|
||||||
|
}
|
||||||
|
params.put("category", "district");
|
||||||
|
String result = addressMatchProxyService.parser(params);
|
||||||
|
if (result != null) {
|
||||||
|
JSONObject json = JSONObject.fromObject(result);
|
||||||
|
if(json.getInt("code")==200){
|
||||||
|
Map<String, Object> map = (Map<String, Object>) json.get("result");
|
||||||
|
if((Integer)map.get("precise")>=0){
|
||||||
|
property = districtService.findByNameAndAlias((String) map.get("city"), (String) map.get("district"), (String) map.get("name"), "district");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(property == null){
|
||||||
|
mav.setModel(BasicModel.buildBadRequestModel("该楼盘不存在 city:" + queryBean.getFangjiaCity() + " region:" + queryBean.getFangjiaDistrict() + " name:" + model.getBuildingName()));
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
queryBean.setProperty(property);
|
||||||
|
List<CollateralSampleQueryBean> queryBeans = new ArrayList<CollateralSampleQueryBean>();
|
||||||
|
queryBeans.add(queryBean);
|
||||||
|
List<Collateral> collaterals = czbankSampleService.findSample(queryBeans, 5);
|
||||||
|
long time = System.currentTimeMillis() - start;
|
||||||
|
Map<String, Object> stat = new HashMap<String, Object>();
|
||||||
|
for(Collateral collateral : collaterals){
|
||||||
|
// stat.put(collateral.getCltNo(), collateral.getSample());
|
||||||
|
stat.put("cltNo", collateral.getCltNo());
|
||||||
|
stat.put("sample", collateral.getSample());
|
||||||
|
}
|
||||||
|
for(CollateralSampleQueryBean qb : queryBeans){
|
||||||
|
JsonConfig jsonConfig = new JsonConfig();
|
||||||
|
jsonConfig.setJsonPropertyFilter(new PropertyFilter() {
|
||||||
|
@Override
|
||||||
|
public boolean apply(Object o, String s, Object o1) {
|
||||||
|
return o1 == null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
qb.setProperty(null);
|
||||||
|
JSONObject query = JSONObject.fromObject(qb, jsonConfig);
|
||||||
|
CzbankSampleLog log = new CzbankSampleLog();
|
||||||
|
log.setCaseId(qb.getCltNo());
|
||||||
|
log.setCreatedDate(new Date());
|
||||||
|
log.setQuery(DataUtil.toMongoDbObj(query));
|
||||||
|
List<Sample> samples = (List)stat.get("sample");
|
||||||
|
if(samples != null){
|
||||||
|
log.setSamples(DataUtil.toMongoDbObj(JSONArray.fromObject(samples, jsonConfig)));
|
||||||
|
}
|
||||||
|
log.setTime(time);
|
||||||
|
czbankSampleLogService.save(log);
|
||||||
|
}
|
||||||
|
mav.setModel(BasicModel.buildOKModel().setResult(stat));
|
||||||
return mav;
|
return mav;
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<CollateralSampleQueryBean> parseParams(HttpServletRequest request) throws Exception {
|
|
||||||
String xml = null;
|
@Authority(role = Role.USER)
|
||||||
|
public Object evaluationAction(EvaluationQuery evaluationQuery) {
|
||||||
|
RestfulModelAndView mav = new RestfulModelAndView();
|
||||||
|
District property = null;
|
||||||
try {
|
try {
|
||||||
xml = IOUtils.toString(request.getInputStream(), "UTF-8");
|
if (StringUtils.isBlank(evaluationQuery.getCity()) || StringUtils.isBlank(evaluationQuery.getDistrict()) || StringUtils.isBlank(evaluationQuery.getName())) {
|
||||||
|
mav.setModel(BasicModel.buildBadRequestModel("参数缺失:city(城市),district(区域),buildingName(名称)是必须参数"));
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(evaluationQuery.getSize() <= 0){
|
||||||
|
mav.setModel(BasicModel.buildBadRequestModel("size不能为空"));
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (evaluationQuery.getCarportPrice() != null && (evaluationQuery.getCarportPrice() < 0 || evaluationQuery.getCarportPrice() > 1000000)) {
|
||||||
|
mav.setModel(BasicModel.buildBadRequestModel("carportPrice(车位)取值不合法"));
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (evaluationQuery.getMaxFloor() != null && (evaluationQuery.getMaxFloor() <= 0 || evaluationQuery.getMaxFloor() > 59)) {
|
||||||
|
mav.setModel(BasicModel.buildBadRequestModel("maxFloor取值非法,正确范围[1,60)"));
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (evaluationQuery.getFloor() != null && (evaluationQuery.getFloor() <= 0 || evaluationQuery.getFloor() > 59)) {
|
||||||
|
mav.setModel(BasicModel.buildBadRequestModel("floor取值非法,正确范围[1,60)"));
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
if (evaluationQuery.getMaxFloor() != null && evaluationQuery.getFloor() != null && evaluationQuery.getFloor() > evaluationQuery.getMaxFloor()) {
|
||||||
|
mav.setModel(BasicModel.buildBadRequestModel("所在楼层不能大于总楼层"));
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
|
||||||
|
FangjiaOfficialAreaMap fangjiaOfficialAreaMap = fangjiaOfficialAreaService.convertOfficialCodeToFangjia(evaluationQuery.getDistrict());
|
||||||
|
if(fangjiaOfficialAreaMap == null){
|
||||||
|
fangjiaOfficialAreaMap = fangjiaOfficialAreaService.convertOfficialCodeToFangjiaCity(evaluationQuery.getDistrict());
|
||||||
|
}
|
||||||
|
if(fangjiaOfficialAreaMap == null){
|
||||||
|
mav.setModel(BasicModel.buildBadRequestModel("地区信息无法映射到房价网的地区信息->(province:" + evaluationQuery.getProvince() + " ,city: " + evaluationQuery.getCity() + " ,district: " + evaluationQuery.getDistrict() + ")"));
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
String fangjiaCity = fangjiaOfficialAreaMap.getFangjiaCity();
|
||||||
|
String fangjiaDistrict = fangjiaOfficialAreaMap.getFangjiaDistrict();
|
||||||
|
|
||||||
|
property = districtService.findByNameAndAlias(fangjiaCity, fangjiaDistrict, evaluationQuery.getName(), "district");
|
||||||
|
if(property == null){
|
||||||
|
Map<String, Object> params = new HashMap<String, Object>();
|
||||||
|
params.put("city", fangjiaCity);
|
||||||
|
params.put("suggestDistrict", fangjiaDistrict);
|
||||||
|
if(StringUtils.isBlank(evaluationQuery.getAddress())){
|
||||||
|
params.put("address", evaluationQuery.getName());
|
||||||
|
}else{
|
||||||
|
params.put("address", evaluationQuery.getAddress());
|
||||||
|
params.put("suggestName", evaluationQuery.getName());
|
||||||
|
}
|
||||||
|
params.put("category", "district");
|
||||||
|
String result = addressMatchProxyService.parser(params);
|
||||||
|
if (result != null) {
|
||||||
|
JSONObject json = JSONObject.fromObject(result);
|
||||||
|
if(json.getInt("code")==200){
|
||||||
|
Map<String, Object> map = (Map<String, Object>) json.get("result");
|
||||||
|
if((Integer)map.get("precise")>=0){
|
||||||
|
property = districtService.findByNameAndAlias((String) map.get("city"), (String) map.get("district"), (String) map.get("name"), "district");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(property == null){
|
||||||
|
mav.setModel(BasicModel.buildBadRequestModel("该楼盘不存在 city:" + fangjiaCity + " region:" + fangjiaDistrict + " name:" + evaluationQuery.getName()));
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if(property != null){
|
||||||
|
if(StringUtils.isNotBlank(fangjiaDistrict) && !property.getRegion().equals(fangjiaDistrict)){
|
||||||
|
mav.setModel(BasicModel.buildBadRequestModel("该楼盘不存在 city:" + fangjiaCity + " region:" + fangjiaDistrict + " name:" + evaluationQuery.getName()));
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
throw new Fault(e);
|
||||||
}
|
|
||||||
if(StringUtils.isBlank(xml)){
|
|
||||||
throw new Exception("数据读取异常");
|
|
||||||
}
|
|
||||||
Document document;
|
|
||||||
try{
|
|
||||||
document = DocumentHelper.parseText(xml);
|
|
||||||
}catch (Exception e){
|
|
||||||
throw e;
|
|
||||||
}
|
}
|
||||||
|
EvaluationResult result = null;
|
||||||
|
if (property != null) {
|
||||||
|
HttpServletRequest request = ActionContext.getContext().getRequest();
|
||||||
|
Evaluation evaluation = evaluationService.evaluate(property, buildEvaluation(evaluationQuery, request),
|
||||||
|
evaluationQuery.getCalDate());
|
||||||
|
|
||||||
|
if(null != evaluation && evaluation.getTotalPrice()!=null){
|
||||||
Element root = document.getRootElement();
|
result = new EvaluationResult();
|
||||||
List<Element> params = root.elements();
|
result.setTotalPrice(evaluation.getTotalPrice());
|
||||||
List<CollateralSampleQueryBean> queryBeans = new ArrayList<CollateralSampleQueryBean>();
|
result.setAvgPrice(evaluation.getAvgPrice());
|
||||||
for(Element param : params){
|
}else{
|
||||||
|
mav.setModel(BasicModel.buildBadRequestModel("该楼盘暂无法估值!"));
|
||||||
String cltNo = param.elementText("cltNo");
|
return mav;
|
||||||
if(StringUtils.isBlank(cltNo)){
|
|
||||||
throw new Exception("cltNo不能为空");
|
|
||||||
}
|
}
|
||||||
String city = param.elementText("city");
|
|
||||||
if(StringUtils.isBlank(city)){
|
|
||||||
throw new Exception("city不能为空,cltNo:" + cltNo);
|
|
||||||
}
|
|
||||||
String district = param.elementText("district");
|
|
||||||
if(StringUtils.isBlank(district)){
|
|
||||||
throw new Exception("district不能为空,cltNo:" + cltNo);
|
|
||||||
}
|
|
||||||
String buildingName = param.elementText("buildingName");
|
|
||||||
if(StringUtils.isBlank(buildingName)){
|
|
||||||
throw new Exception("buildingName不能为空,cltNo:" + cltNo);
|
|
||||||
}
|
|
||||||
District d = districtService.findOneByKey(new DistrictKey(city, district, buildingName), "district");
|
|
||||||
if(d == null){
|
|
||||||
throw new Exception("楼盘不存在,cltNo:" + cltNo);
|
|
||||||
}
|
|
||||||
String propertyTypeCode = param.elementText("propertyTypeCode");
|
|
||||||
if(StringUtils.isBlank(propertyTypeCode)){
|
|
||||||
throw new Exception("propertyTypeCode不能为空,cltNo:" + cltNo);
|
|
||||||
}
|
|
||||||
if(!"1".equals(propertyTypeCode) && !"0".equals(propertyTypeCode)){
|
|
||||||
throw new Exception("propertyTypeCode取值非法,cltNo:" + cltNo);
|
|
||||||
}
|
|
||||||
String floorNumber = param.elementText("floorNumber");
|
|
||||||
if(StringUtils.isBlank(floorNumber) || !StringUtils.isNumeric(floorNumber)){
|
|
||||||
throw new Exception("floorNumber取值非法,cltNo:" + cltNo);
|
|
||||||
}
|
|
||||||
String strctureArea = param.elementText("strctureArea");
|
|
||||||
if(StringUtils.isBlank(strctureArea) || !DataUtil.isNumeric(strctureArea)){
|
|
||||||
throw new Exception("strctureArea取值非法,cltNo:" + cltNo);
|
|
||||||
}
|
|
||||||
String decrCondCode = param.elementText("decrCondCode");
|
|
||||||
if(StringUtils.isBlank(decrCondCode)){
|
|
||||||
decrCondCode = "2";
|
|
||||||
}
|
|
||||||
if(!StringUtils.isNumeric(decrCondCode) || (Integer.valueOf(decrCondCode) > 5 || Integer.valueOf(decrCondCode) < 1)){
|
|
||||||
throw new Exception("decrCondCode取值非法,cltNo:" + cltNo);
|
|
||||||
}
|
|
||||||
String towardDirectCode = param.elementText("towardDirectCode");
|
|
||||||
if(StringUtils.isBlank(towardDirectCode)){
|
|
||||||
towardDirectCode = "3";
|
|
||||||
}
|
|
||||||
if(!StringUtils.isNumeric(towardDirectCode) || (Integer.valueOf(towardDirectCode) > 10 || Integer.valueOf(towardDirectCode) < 1)){
|
|
||||||
throw new Exception("towardDirectCode取值非法,cltNo:" + cltNo);
|
|
||||||
}
|
|
||||||
CollateralSampleQueryBean queryBean = new CollateralSampleQueryBean();
|
|
||||||
queryBean.setCltNo(cltNo);
|
|
||||||
queryBean.setCity(city);
|
|
||||||
queryBean.setDistrict(district);
|
|
||||||
queryBean.setBuildingName(buildingName);
|
|
||||||
queryBean.setPropertyTypeCode(propertyTypeCode);
|
|
||||||
queryBean.setFloorNumber(Integer.valueOf(floorNumber));
|
|
||||||
queryBean.setStrctureArea(Double.valueOf(strctureArea));
|
|
||||||
queryBean.setTowardDirectCode(Integer.valueOf(towardDirectCode));
|
|
||||||
queryBean.setDecrCondCode(Integer.valueOf(decrCondCode));
|
|
||||||
queryBean.setProperty(d);
|
|
||||||
queryBeans.add(queryBean);
|
|
||||||
}
|
}
|
||||||
return queryBeans;
|
mav.setModel(BasicModel.buildOKModel().setResult(result));
|
||||||
|
return mav;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Evaluation buildEvaluation(EvaluationQuery model, HttpServletRequest request) {
|
||||||
|
Evaluation evaluation = new Evaluation();
|
||||||
|
evaluation.setCity(model.getCity());
|
||||||
|
evaluation.setRegion(model.getDistrict());
|
||||||
|
evaluation.setDistrictName(model.getName());
|
||||||
|
|
||||||
|
|
||||||
|
if (StringUtils.isNotBlank(model.getBuildingNumber())) {
|
||||||
|
evaluation.setHouseNum(model.getBuildingNumber());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (StringUtils.isNotBlank(model.getRoomNumber())) {
|
||||||
|
evaluation.setRoomNum(model.getRoomNumber());
|
||||||
|
}
|
||||||
|
evaluation.setArea(model.getSize());
|
||||||
|
|
||||||
|
if (null != model.getFloor()) {
|
||||||
|
evaluation.setFloor(model.getFloor());
|
||||||
|
}
|
||||||
|
if (model.getMaxFloor() != null && 0 != model.getMaxFloor()) {
|
||||||
|
evaluation.setHeight(model.getMaxFloor());
|
||||||
|
}
|
||||||
|
if (0 != model.getRoom()) {
|
||||||
|
evaluation.setRoom(model.getRoom());
|
||||||
|
}
|
||||||
|
if (0 != model.getHall()) {
|
||||||
|
evaluation.setHall(model.getHall());
|
||||||
|
}
|
||||||
|
if (0 != model.getToilet()) {
|
||||||
|
evaluation.setToilet(model.getToilet());
|
||||||
|
}
|
||||||
|
evaluation.setEstateType(EvaluationFactorUtil.PROPERTY_TYPES.get(model.getPropertyType()));
|
||||||
|
evaluation.setDirection(EvaluationFactorUtil.DIRECTION.get(model.getDirection()));
|
||||||
|
evaluation.setFitment(EvaluationFactorUtil.EVALUATION_MODEL_FITMENT.get(EvaluationFactorUtil.FITMENT.get(model.getDecoration())));
|
||||||
|
if (model.getDecorationAge() >= 1 && model.getDecorationAge() <= 5) {
|
||||||
|
evaluation.setFitmentAge(model.getDecorationAge());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (model.getDecorationCost() != null && model.getDecorationCost() > 0) {
|
||||||
|
evaluation.setFitmentCharge(model.getDecorationCost());
|
||||||
|
}
|
||||||
|
evaluation.setSight(EvaluationFactorUtil.SIGHT.get(model.getView()));
|
||||||
|
evaluation.setNoise(EvaluationFactorUtil.NOISE.get(model.getNoise()));
|
||||||
|
|
||||||
|
if (model.getGardenSize()!=null && 0 != model.getGardenSize()) {
|
||||||
|
evaluation.setGardenArea(((Number) model.getGardenSize()).doubleValue());
|
||||||
|
}
|
||||||
|
if (model.getBasementSize()!=null && 0 != model.getBasementSize()) {
|
||||||
|
evaluation.setBasementArea(((Number) model.getBasementSize()).doubleValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (model.getAtticSize()!=null && 0 != model.getAtticSize()) {
|
||||||
|
evaluation.setAtticArea(((Number) model.getAtticSize()).doubleValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
// if (0 != model.getOuterSize()) {
|
||||||
|
// evaluation.setOtherFactor(((Number) model.getOuterSize()).doubleValue());
|
||||||
|
// }
|
||||||
|
|
||||||
|
String worryFacility = model.getNegativeFactor();
|
||||||
|
evaluation.setWorryFacility(EvaluationFactorUtil.NEGATIVE_FACTOR.get(worryFacility));
|
||||||
|
if (0 != model.getAge()) {
|
||||||
|
evaluation.setAge(model.getAge());
|
||||||
|
}
|
||||||
|
evaluation.setCarportPrice(model.getCarportPrice());
|
||||||
|
|
||||||
|
if (model.getFacilities() != null) {
|
||||||
|
String facilities = model.getFacilities();
|
||||||
|
String[] fs = facilities.split(",");
|
||||||
|
for (int i = 0; i < fs.length; i++) {
|
||||||
|
fs[i] = EvaluationFactorUtil.FACILITIES.get(fs[i]);
|
||||||
|
}
|
||||||
|
evaluation.setFacilities(convertToString(fs));
|
||||||
|
}
|
||||||
|
|
||||||
|
evaluation.setCreationDate(new Date());
|
||||||
|
evaluation.setModificationDate(new Date());
|
||||||
|
|
||||||
|
|
||||||
|
String ip = AnalyticsUtil.getIpAddress(request);
|
||||||
|
evaluation.setIp(ip);
|
||||||
|
|
||||||
|
String fromUserId = (String) request.getAttribute("from_user_id");
|
||||||
|
if (StringUtils.isNotBlank(fromUserId)) {
|
||||||
|
evaluation.setFromUserId(String.valueOf(fromUserId));
|
||||||
|
}
|
||||||
|
evaluation.setSource("cz_property_evaluation");
|
||||||
|
return evaluation;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String convertToString(String[] strs) {
|
||||||
|
if (ArrayUtils.isNotEmpty(strs)) {
|
||||||
|
StringBuffer ret = new StringBuffer();
|
||||||
|
for (String str : strs) {
|
||||||
|
if (StringUtils.isEmpty(ret.toString())) {
|
||||||
|
ret.append(str);
|
||||||
|
} else {
|
||||||
|
ret.append(",").append(str);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ret.toString();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void setCzbankSampleService(CzbankSampleService czbankSampleService) {
|
public void setCzbankSampleService(CzbankSampleService czbankSampleService) {
|
||||||
this.czbankSampleService = czbankSampleService;
|
this.czbankSampleService = czbankSampleService;
|
||||||
}
|
}
|
||||||
@@ -156,4 +426,20 @@ public class CzbankController {
|
|||||||
public void setDistrictService(DistrictService districtService) {
|
public void setDistrictService(DistrictService districtService) {
|
||||||
this.districtService = districtService;
|
this.districtService = districtService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setCzbankSampleLogService(CzbankSampleLogService czbankSampleLogService) {
|
||||||
|
this.czbankSampleLogService = czbankSampleLogService;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFangjiaOfficialAreaService(FangjiaOfficialAreaService fangjiaOfficialAreaService) {
|
||||||
|
this.fangjiaOfficialAreaService = fangjiaOfficialAreaService;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAddressMatchProxyService(AddressMatchProxyService addressMatchProxyService) {
|
||||||
|
this.addressMatchProxyService = addressMatchProxyService;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEvaluationService(EvaluationService evaluationService) {
|
||||||
|
this.evaluationService = evaluationService;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -156,12 +156,12 @@ public class GuzhiController {
|
|||||||
return mv;
|
return mv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//福州农商行人工录入
|
||||||
public Object checkAction(@Valid GuzhiCheckModel model){
|
public Object checkAction(@Valid GuzhiCheckModel model){
|
||||||
RestfulModelAndView mv = new RestfulModelAndView();
|
RestfulModelAndView mv = new RestfulModelAndView();
|
||||||
|
|
||||||
mv.setModel(BasicModel.buildOKModel());
|
mv.setModel(BasicModel.buildOKModel());
|
||||||
String msg = "【房价网-人工审查地址】接收到新的人工审查地址信息,请求请及时处理!城市:" + model.getCity()
|
String msg = "【房价网-人工审查地址】接收到新的人工审查地址信息,请求请及时处理!城市:" + model.getCity()+" 区域:"+model.getDistrict() +" 小区名称:"+(model.getName()!=null?model.getName():"")
|
||||||
+ " ²úÖ¤µØÖ·£º" + model.getAddress();
|
+ " ²úÖ¤µØÖ·£º" + model.getAddress();
|
||||||
DingDingMessageUtil.sendTextMessage("065f4a05d5f87eb39a9f9e048eeefb80c1f7560446f8926441de80453c160c60", msg);
|
DingDingMessageUtil.sendTextMessage("065f4a05d5f87eb39a9f9e048eeefb80c1f7560446f8926441de80453c160c60", msg);
|
||||||
return mv;
|
return mv;
|
||||||
|
|||||||
+484
-42
@@ -28,11 +28,16 @@ import javax.servlet.http.HttpServletRequest;
|
|||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
import com.fangjia.core.util.*;
|
||||||
import com.fangjia.dal.*;
|
import com.fangjia.dal.*;
|
||||||
import com.fangjia.dal.mongo.model.*;
|
import com.fangjia.dal.mongo.model.*;
|
||||||
import com.fangjia.dal.seawater.dao.SeawaterDao;
|
import com.fangjia.dal.seawater.dao.SeawaterDao;
|
||||||
import com.fangjia.dal.seawater.model.Seawater;
|
import com.fangjia.dal.seawater.model.Seawater;
|
||||||
|
import com.fangjia.open.dto.*;
|
||||||
|
import com.fangjia.service.district.*;
|
||||||
|
import com.fangjia.service.mongo.fangjia.*;
|
||||||
import com.fangjia.service.open.*;
|
import com.fangjia.service.open.*;
|
||||||
|
import com.fangjia.service.util.DistrictScoreUtil;
|
||||||
import net.sf.json.JSONArray;
|
import net.sf.json.JSONArray;
|
||||||
import net.sf.json.JSONObject;
|
import net.sf.json.JSONObject;
|
||||||
|
|
||||||
@@ -56,16 +61,6 @@ import org.sothis.web.mvc.annotation.Param;
|
|||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import com.fangjia.core.RegionData;
|
import com.fangjia.core.RegionData;
|
||||||
import com.fangjia.core.util.AnalyticsUtil;
|
|
||||||
import com.fangjia.core.util.CoordPoint;
|
|
||||||
import com.fangjia.core.util.CoordinateConversion;
|
|
||||||
import com.fangjia.core.util.DataUtil;
|
|
||||||
import com.fangjia.core.util.DateUtil;
|
|
||||||
import com.fangjia.core.util.GeoUtils;
|
|
||||||
import com.fangjia.core.util.GeocodeUtils;
|
|
||||||
import com.fangjia.core.util.HouseValidator;
|
|
||||||
import com.fangjia.core.util.LoggerFactory;
|
|
||||||
import com.fangjia.core.util.SecurityUtil;
|
|
||||||
import com.fangjia.dal.common.DistrictKey;
|
import com.fangjia.dal.common.DistrictKey;
|
||||||
import com.fangjia.dal.common.ServerAreaData;
|
import com.fangjia.dal.common.ServerAreaData;
|
||||||
import com.fangjia.dal.datastore.model.House;
|
import com.fangjia.dal.datastore.model.House;
|
||||||
@@ -81,21 +76,6 @@ import com.fangjia.dal.sql.model.FjtEvaluation;
|
|||||||
import com.fangjia.dal.sql.model.User;
|
import com.fangjia.dal.sql.model.User;
|
||||||
import com.fangjia.open.APIConstant;
|
import com.fangjia.open.APIConstant;
|
||||||
import com.fangjia.open.FangjiaApiUtil;
|
import com.fangjia.open.FangjiaApiUtil;
|
||||||
import com.fangjia.open.dto.AroundDto;
|
|
||||||
import com.fangjia.open.dto.BuildingDto;
|
|
||||||
import com.fangjia.open.dto.DistrictAnalysisDto;
|
|
||||||
import com.fangjia.open.dto.DistrictInfoDto;
|
|
||||||
import com.fangjia.open.dto.FloorPlanDto;
|
|
||||||
import com.fangjia.open.dto.HouseAuctionDetailDto;
|
|
||||||
import com.fangjia.open.dto.HouseAuctionDto;
|
|
||||||
import com.fangjia.open.dto.HouseDealPriceDetailDto;
|
|
||||||
import com.fangjia.open.dto.HouseDealPriceDto;
|
|
||||||
import com.fangjia.open.dto.HouseEvaluateNumDto;
|
|
||||||
import com.fangjia.open.dto.PropertyDto;
|
|
||||||
import com.fangjia.open.dto.RoomDto;
|
|
||||||
import com.fangjia.open.dto.StationDto;
|
|
||||||
import com.fangjia.open.dto.UnitNumberDto;
|
|
||||||
import com.fangjia.open.dto.UniversalDto;
|
|
||||||
import com.fangjia.open.interceptors.AuthenticationBean;
|
import com.fangjia.open.interceptors.AuthenticationBean;
|
||||||
import com.fangjia.open.interceptors.Authority;
|
import com.fangjia.open.interceptors.Authority;
|
||||||
import com.fangjia.open.interceptors.Role;
|
import com.fangjia.open.interceptors.Role;
|
||||||
@@ -137,24 +117,9 @@ import com.fangjia.service.datastore.FieldFilterService;
|
|||||||
import com.fangjia.service.datastore.HouseService;
|
import com.fangjia.service.datastore.HouseService;
|
||||||
import com.fangjia.service.datastore.NoHouseDistrictService;
|
import com.fangjia.service.datastore.NoHouseDistrictService;
|
||||||
import com.fangjia.service.datastore.OpenApiLogService;
|
import com.fangjia.service.datastore.OpenApiLogService;
|
||||||
import com.fangjia.service.district.DistrictStatRentService;
|
|
||||||
import com.fangjia.service.district.DistrictStatService;
|
|
||||||
import com.fangjia.service.mongo.bkoff.HouseAuctionService;
|
import com.fangjia.service.mongo.bkoff.HouseAuctionService;
|
||||||
import com.fangjia.service.mongo.bkoff.HouseLoudongService;
|
import com.fangjia.service.mongo.bkoff.HouseLoudongService;
|
||||||
import com.fangjia.service.mongo.bkoff.LoudongService;
|
import com.fangjia.service.mongo.bkoff.LoudongService;
|
||||||
import com.fangjia.service.mongo.fangjia.AddressMatchLogService;
|
|
||||||
import com.fangjia.service.mongo.fangjia.AverageAnalyService;
|
|
||||||
import com.fangjia.service.mongo.fangjia.AverageStatisticsService;
|
|
||||||
import com.fangjia.service.mongo.fangjia.BatchEvaluateService;
|
|
||||||
import com.fangjia.service.mongo.fangjia.BizShopService;
|
|
||||||
import com.fangjia.service.mongo.fangjia.BusStationService;
|
|
||||||
import com.fangjia.service.mongo.fangjia.CityHotService;
|
|
||||||
import com.fangjia.service.mongo.fangjia.DealPriceService;
|
|
||||||
import com.fangjia.service.mongo.fangjia.DistrictAttentionRankService;
|
|
||||||
import com.fangjia.service.mongo.fangjia.DistrictHotService;
|
|
||||||
import com.fangjia.service.mongo.fangjia.DistrictHouseResourceStatService;
|
|
||||||
import com.fangjia.service.mongo.fangjia.NetworkPriceService;
|
|
||||||
import com.fangjia.service.mongo.fangjia.ServerAreaService;
|
|
||||||
import com.fangjia.service.sql.ApiUserService;
|
import com.fangjia.service.sql.ApiUserService;
|
||||||
import com.fangjia.service.sql.FjtEvaluationService;
|
import com.fangjia.service.sql.FjtEvaluationService;
|
||||||
import com.fangjia.service.sql.UserService;
|
import com.fangjia.service.sql.UserService;
|
||||||
@@ -208,6 +173,8 @@ public class PropertyController {
|
|||||||
private FangjiaOfficialAreaService fangjiaOfficialAreaService;
|
private FangjiaOfficialAreaService fangjiaOfficialAreaService;
|
||||||
private RegionAnaDataService regionAnaDataService;
|
private RegionAnaDataService regionAnaDataService;
|
||||||
private SeawaterDao seawaterDao;
|
private SeawaterDao seawaterDao;
|
||||||
|
private SeawaterService seawaterService;
|
||||||
|
private SqmetreRentService sqmetreRentService;
|
||||||
|
|
||||||
private FileDao fileDao = FileDao.getInstance();
|
private FileDao fileDao = FileDao.getInstance();
|
||||||
private static final int DEFAULT_PAGE_SIZE = 20;
|
private static final int DEFAULT_PAGE_SIZE = 20;
|
||||||
@@ -217,6 +184,10 @@ public class PropertyController {
|
|||||||
|
|
||||||
private AutoCompleteService autoCompleteService;
|
private AutoCompleteService autoCompleteService;
|
||||||
|
|
||||||
|
|
||||||
|
private DistrictRoomSqmetreRentService districtRoomSqmetreRentService;
|
||||||
|
private RentDealPriceService rentDealPriceService;
|
||||||
|
|
||||||
private static final int EVALUATE_SHOW_DETAIL = 1;
|
private static final int EVALUATE_SHOW_DETAIL = 1;
|
||||||
private static final Map<String, String> PROPERTY_TYPES = new HashMap<String, String>() {
|
private static final Map<String, String> PROPERTY_TYPES = new HashMap<String, String>() {
|
||||||
{
|
{
|
||||||
@@ -700,7 +671,7 @@ public class PropertyController {
|
|||||||
&& !"1007486".equals(userId) && !"1007533".equals(userId) && !"1007630".equals(userId)
|
&& !"1007486".equals(userId) && !"1007533".equals(userId) && !"1007630".equals(userId)
|
||||||
&& !"1007705".equals(userId) && !"1007739".equals(userId) && !"1007736".equals(userId)
|
&& !"1007705".equals(userId) && !"1007739".equals(userId) && !"1007736".equals(userId)
|
||||||
&& !"1007741".equals(userId) && !"1007742".equals(userId) && !"1007743".equals(userId)
|
&& !"1007741".equals(userId) && !"1007742".equals(userId) && !"1007743".equals(userId)
|
||||||
&& !"1007747".equals(userId)
|
&& !"1007747".equals(userId) && !"1007757".equals(userId)
|
||||||
&& model.getDetailLevel() != null && model.getDetailLevel() != 0) {// ÁÙʱȨÏÞ¿ØÖÆ
|
&& model.getDetailLevel() != null && model.getDetailLevel() != 0) {// ÁÙʱȨÏÞ¿ØÖÆ
|
||||||
mav.setModel(BasicModel.buildUnAuthorizedModel());
|
mav.setModel(BasicModel.buildUnAuthorizedModel());
|
||||||
return mav;
|
return mav;
|
||||||
@@ -2476,7 +2447,8 @@ public class PropertyController {
|
|||||||
evaluation.setRegion(model.getRegion());
|
evaluation.setRegion(model.getRegion());
|
||||||
evaluation.setDistrictName(model.getName());
|
evaluation.setDistrictName(model.getName());
|
||||||
evaluation.setDirection(DIRECTION.get(model.getDirection()));
|
evaluation.setDirection(DIRECTION.get(model.getDirection()));
|
||||||
evaluation.setFitment(EVALUATION_MODEL_FITMENT.get(FITMENT.get(model.getDecoration())));
|
evaluation.setFitment(EVALUATION_MODEL_FITMENT.get(FITMENT.get(StringUtils.isNotBlank(model.getDecoration()) ?
|
||||||
|
model.getDecoration() : model.getFitment())));
|
||||||
evaluation.setNoise(NOISE.get(model.getNoise()));
|
evaluation.setNoise(NOISE.get(model.getNoise()));
|
||||||
evaluation.setEstateType(PROPERTY_TYPES.get(model.getPropertyType()));
|
evaluation.setEstateType(PROPERTY_TYPES.get(model.getPropertyType()));
|
||||||
evaluation.setSight(SIGHT.get(model.getView()));
|
evaluation.setSight(SIGHT.get(model.getView()));
|
||||||
@@ -4987,6 +4959,460 @@ public class PropertyController {
|
|||||||
return mav;
|
return mav;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 小区租金估值报告(上半部分)
|
||||||
|
* @param model
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
* @throws NumberFormatException
|
||||||
|
* @throws IllegalAccessException
|
||||||
|
*/
|
||||||
|
@Authority(role = Role.NONE)
|
||||||
|
public Object rentReportAction(PropertyEvaluationModel model, HttpServletRequest request)throws NumberFormatException, IllegalAccessException {
|
||||||
|
RestfulModelAndView mav = new RestfulModelAndView();
|
||||||
|
mav.setViewType("rest");
|
||||||
|
if (StringUtils.isBlank(model.getCity()) || StringUtils.isBlank(model.getName())
|
||||||
|
|| StringUtils.isBlank(model.getDistrict()) || model.getSize() <= 0) {
|
||||||
|
mav.setModel(BasicModel.buildBadRequestModel("参数非法:城市,区域,小区名,面积(size)为必填项"));
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
if (model.getCity().endsWith("市")) {
|
||||||
|
model.setCity(model.getCity().replaceAll("市$", ""));
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(request.getParameter("calDate"))) {
|
||||||
|
Date calDate = null;
|
||||||
|
try {
|
||||||
|
calDate = org.apache.commons.lang.time.DateUtils.parseDate(request.getParameter("calDate"), new String[] { "yyyy-MM-dd" });
|
||||||
|
} catch (ParseException e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
if (calDate == null) {
|
||||||
|
mav.setModel(BasicModel.buildBadRequestModel("calDate:数据类型不合法"));
|
||||||
|
return mav;
|
||||||
|
} else {
|
||||||
|
model.setCalDate(calDate);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* 先到CPDB库中查找小区 */
|
||||||
|
District district = districtService.findByNameAndAlias(model.getCity(), model.getDistrict(), model.getName(),
|
||||||
|
"district");
|
||||||
|
if (district == null) {
|
||||||
|
mav.setModel(BasicModel.buildBadRequestModel("该小区不存在"));
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
model.setName(district.getName());
|
||||||
|
|
||||||
|
|
||||||
|
if (model.getMaxFloor() != null && (model.getMaxFloor() <= 0 || model.getMaxFloor() > 59)) {
|
||||||
|
mav.setModel(BasicModel.buildBadRequestModel("maxFloor取值非法,正确范围[1,60)"));
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (model.getFloor() != null && (model.getFloor() <= 0 || model.getFloor() > 59)) {
|
||||||
|
mav.setModel(BasicModel.buildBadRequestModel("floor取值非法,正确范围[1,60)"));
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
if (model.getMaxFloor() != null && model.getFloor() != null && model.getFloor() > model.getMaxFloor()) {
|
||||||
|
mav.setModel(BasicModel.buildBadRequestModel("所在楼层不能大于总楼层"));
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
|
||||||
|
model.setRegion(district.getRegion());
|
||||||
|
model.setDistrictName(district.getName());
|
||||||
|
if (StringUtils.isBlank(model.getPropertyType())) {
|
||||||
|
if (district.getEstateType2() != null && district.getEstateType2().contains("别墅")) {
|
||||||
|
model.setPropertyType("1");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (model.getCalDate() != null) {
|
||||||
|
if (new Date().before(model.getCalDate())) {
|
||||||
|
model.setCalDate(DateUtil.getFirstDayOfWeek(new Date()));
|
||||||
|
} else {
|
||||||
|
model.setCalDate(DateUtil.getFirstDayOfWeek(model.getCalDate()));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
model.setCalDate(DateUtil.getFirstDayOfWeek(new Date()));
|
||||||
|
}
|
||||||
|
|
||||||
|
Evaluation evaluation = buildEvaluation(model, request);
|
||||||
|
evaluation.setSource("api_property_evaluate_rent");
|
||||||
|
evaluation = evaluationService.evaluateRent(district, evaluation, model.getCalDate());
|
||||||
|
|
||||||
|
|
||||||
|
if (evaluation.getTotalPrice() != null && evaluation.getTotalPrice() != 0) {
|
||||||
|
evaluation.setAvgPrice((int)(evaluation.getTotalPrice()/evaluation.getArea()));
|
||||||
|
Map<String, Object> districtPriceMap = new HashMap<String, Object>();
|
||||||
|
districtPriceMap.put("city", district.getCity());
|
||||||
|
districtPriceMap.put("district", district.getRegion());
|
||||||
|
districtPriceMap.put("name", district.getName());
|
||||||
|
districtPriceMap.put("address", district.getAddress());
|
||||||
|
districtPriceMap.put("totalPrice", evaluation.getTotalPrice());
|
||||||
|
districtPriceMap.put("totalPriceUpper", CurrencyConverter.toChinese(String.valueOf(evaluation.getTotalPrice())));
|
||||||
|
districtPriceMap.put("cal_date", DateUtil.formatByPattern(new Date(), "yyyy/MM/dd"));
|
||||||
|
districtPriceMap.put("direction", evaluation.getDirection());
|
||||||
|
districtPriceMap.put("size", evaluation.getArea());
|
||||||
|
districtPriceMap.put("floor", model.getFloor());
|
||||||
|
districtPriceMap.put("height", model.getHeight());
|
||||||
|
districtPriceMap.put("fitment", evaluation.getFitment());
|
||||||
|
districtPriceMap.put("buildYear",district.getFinishBuildingDate());
|
||||||
|
|
||||||
|
Integer startPrice = (int)(evaluation.getTotalPrice() - evaluation.getTotalPrice()*0.2);
|
||||||
|
Integer endPrice = (int)(evaluation.getTotalPrice() + evaluation.getTotalPrice()*0.2);
|
||||||
|
|
||||||
|
//周边相似小区
|
||||||
|
// if (null == model.getRadius()) {// 设置默认值
|
||||||
|
// model.setRadius(1000);
|
||||||
|
// }
|
||||||
|
// String[] fields = { "city", "region", "name", "estateType2", "id","finishBuildingDate"};
|
||||||
|
// List<District> allDistricts = districtService.findNearestDistrict(district, model.getRadius(), fields, Integer.MAX_VALUE);
|
||||||
|
// //按条件过滤相似小区
|
||||||
|
// Integer buildYear = null;
|
||||||
|
// List<District> districts = new ArrayList<District>();
|
||||||
|
// if(StringUtils.isNotBlank(district.getFinishBuildingDate())){
|
||||||
|
// buildYear = DistrictScoreUtil.parseStringToDate(district.getFinishBuildingDate());
|
||||||
|
// if(buildYear!=null){
|
||||||
|
// districts = new ArrayList<District>();
|
||||||
|
// int startYear = buildYear -7;
|
||||||
|
// int endYear = buildYear + 7;
|
||||||
|
// for(District dist : allDistricts){
|
||||||
|
// if(StringUtils.isNotBlank(dist.getFinishBuildingDate())){
|
||||||
|
// int simlarDistYear = DistrictScoreUtil.parseStringToDate(district.getFinishBuildingDate());
|
||||||
|
// if(simlarDistYear>=startYear && simlarDistYear<=endYear && StringUtils.isNotBlank(district.getEstateType2()) && StringUtils.isNotBlank(dist.getEstateType2()) && district.getEstateType2().equals(dist.getEstateType2())){
|
||||||
|
// districts.add(dist);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
//相似房源
|
||||||
|
// Double startArea = model.getSize() - model.getSize()*0.1;
|
||||||
|
// Double endArea = model.getSize() + model.getSize()*0.1;
|
||||||
|
// Integer startDate = Integer.parseInt(org.apache.tools.ant.util.DateUtils.format(DateUtil.addMonthToDate(new Date(), -12), "yyyyMMdd"));
|
||||||
|
// List<Seawater> houses = seawaterService.findSeawatersFromEs2("rent", district.getCity(), district.getRegion(), district.getName(), null, null, startDate, null,
|
||||||
|
// startArea, endArea, startPrice, endPrice, null, null, "p_date", false, 1, 5 , null,"seawater-20*/_doc");
|
||||||
|
// //无评估小区房源用周边相似小区的房源
|
||||||
|
// if(null == houses || houses.size()==0){
|
||||||
|
// for (District dist : districts) {
|
||||||
|
// houses = seawaterService.findSeawatersFromEs2("rent", dist.getCity(), dist.getRegion(), dist.getName(), null, null, startDate, null,
|
||||||
|
// startArea, endArea, startPrice, endPrice, null, null, "p_date", false, 1, 5 , null,"seawater-20*/_doc");
|
||||||
|
// if(houses!=null && houses.size()>0){
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// districtPriceMap.put("houses", houses);
|
||||||
|
|
||||||
|
// //周边相似小区租金
|
||||||
|
// Integer room = null;
|
||||||
|
// if(model.getRoom()!=0){
|
||||||
|
// room = model.getRoom();
|
||||||
|
// }else{
|
||||||
|
// room = houseService.getDistrictRoomType((float)model.getSize());
|
||||||
|
// }
|
||||||
|
// if (null != districts) {
|
||||||
|
// if (null != room) {
|
||||||
|
// List<DistrictHouseDtao> dtos = new ArrayList<DistrictHouseDtao>();
|
||||||
|
// Date weekend = DateUtil.getFirstDayOfWeek(new Date());
|
||||||
|
// for (District dist : districts) {
|
||||||
|
//
|
||||||
|
// List<DistrictRoomSqmetreRent> districtRoomSqmetreRents = districtRoomSqmetreRentService.findDistrictRoomSqmetreRents(dist, 1, room);
|
||||||
|
//
|
||||||
|
// ///List<DistrictStatRent> districtStatRents = districtStatRentService.findLatestDistrictStatRent(dist, 1, room);
|
||||||
|
// if (null != districtRoomSqmetreRents && districtRoomSqmetreRents.size() > 0) {
|
||||||
|
// DistrictRoomSqmetreRent districtRoomSqmetreRent = districtRoomSqmetreRents.get(0);
|
||||||
|
// if (districtRoomSqmetreRent.getAvgPrice() > 0) {
|
||||||
|
//
|
||||||
|
// int startSqPrice = (int)(evaluation.getAvgPrice() - evaluation.getAvgPrice()*0.1);
|
||||||
|
// int endSqPrice = (int)(evaluation.getAvgPrice() + evaluation.getAvgPrice()*0.1);
|
||||||
|
//// SqmetreRent sqmetreRent = sqmetreRentService.findNearestSqmetreRent(dist.getCity(), dist.getRegion(), dist.getName(), DateUtil.formatToYYYYMMDD(weekend), "district");
|
||||||
|
// if(districtRoomSqmetreRent.getAvgPrice()>=startSqPrice && districtRoomSqmetreRent.getAvgPrice()<=endSqPrice){
|
||||||
|
// DistrictHouseDtao dto = new DistrictHouseDtao();
|
||||||
|
// dto.setCity(dist.getCity());
|
||||||
|
// dto.setRegion(dist.getRegion());
|
||||||
|
// dto.setDistrictName(dist.getName());
|
||||||
|
// dto.setSqAvgPrice(districtRoomSqmetreRent.getAvgPrice());
|
||||||
|
// dto.setRoom(room);
|
||||||
|
// dtos.add(dto);
|
||||||
|
// if(dtos.size()>=5){
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// districtPriceMap.put("districts", dtos);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// //近一年户型租金走势
|
||||||
|
// Map<String, Object> trendsMap = districtRoomSqmetreRentService.getRentTrends(district.getCity(), district.getRegion(), district.getName(), room, -12);
|
||||||
|
//// Map<String, Object> trendsMap = districtStatRentService.getRentTrend(district.getCity(), district.getRegion(), district.getDistrictName(), -12);
|
||||||
|
// if (MapUtils.isNotEmpty(trendsMap)) {
|
||||||
|
// Map distMap = (Map) trendsMap.get("distMap");
|
||||||
|
// Map<String, Integer> trendMap = (Map) distMap.get(String.valueOf(trendsMap.get("room")));
|
||||||
|
// if (MapUtils.isNotEmpty(trendMap)) {
|
||||||
|
// for (String key : trendMap.keySet()) {
|
||||||
|
// Double totalPrice = (trendMap.get(key) * evaluation.getArea());
|
||||||
|
// trendMap.put(key, totalPrice.intValue());
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// districtPriceMap.put("trends", trendsMap);
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// //成交的租房房源
|
||||||
|
// List<RentDealPrice> rentTrades = rentDealPriceService.getRentDealPrices(district.getCity(), district.getRegion(), district.getName(), 5);
|
||||||
|
// districtPriceMap.put("trades", rentTrades);
|
||||||
|
|
||||||
|
mav.setModel(BasicModel.buildOKModel().setResult(districtPriceMap));
|
||||||
|
return mav;
|
||||||
|
} else {
|
||||||
|
|
||||||
|
mav.setModel(BasicModel.buildOKModel().setMsg("暂时不支持该小区的租金估价").markNoData());
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* 小区租金估值报告(下半部分)
|
||||||
|
* @param model
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
* @throws NumberFormatException
|
||||||
|
* @throws IllegalAccessException
|
||||||
|
*/
|
||||||
|
@Authority(role = Role.NONE)
|
||||||
|
public Object rentReport2Action(PropertyEvaluationModel model, HttpServletRequest request)throws NumberFormatException, IllegalAccessException {
|
||||||
|
RestfulModelAndView mav = new RestfulModelAndView();
|
||||||
|
mav.setViewType("rest");
|
||||||
|
/* 先到CPDB库中查找小区 */
|
||||||
|
District district = districtService.findByNameAndAlias(model.getCity(), model.getDistrict(), model.getName(),"district");
|
||||||
|
model.setRegion(district.getRegion());
|
||||||
|
model.setDistrictName(district.getName());
|
||||||
|
if (StringUtils.isBlank(model.getPropertyType())) {
|
||||||
|
if (district.getEstateType2() != null && district.getEstateType2().contains("别墅")) {
|
||||||
|
model.setPropertyType("1");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Evaluation evaluation = buildEvaluation(model, request);
|
||||||
|
evaluation.setSource("api_property_evaluate_rent");
|
||||||
|
evaluation = evaluationService.evaluateRent(district, evaluation, model.getCalDate());
|
||||||
|
|
||||||
|
if (evaluation.getTotalPrice() != null && evaluation.getTotalPrice() != 0) {
|
||||||
|
evaluation.setAvgPrice((int)(evaluation.getTotalPrice()/evaluation.getArea()));
|
||||||
|
Map<String, Object> districtPriceMap = new HashMap<String, Object>();
|
||||||
|
Integer startPrice = (int)(evaluation.getTotalPrice() - evaluation.getTotalPrice()*0.2);
|
||||||
|
Integer endPrice = (int)(evaluation.getTotalPrice() + evaluation.getTotalPrice()*0.2);
|
||||||
|
|
||||||
|
//周边相似小区
|
||||||
|
if (null == model.getRadius()) {// 设置默认值
|
||||||
|
model.setRadius(1000);
|
||||||
|
}
|
||||||
|
String[] fields = { "city", "region", "name", "estateType2", "id","finishBuildingDate"};
|
||||||
|
List<District> allDistricts = districtService.findNearestDistrict(district, model.getRadius(), fields, Integer.MAX_VALUE);
|
||||||
|
//按条件过滤相似小区
|
||||||
|
Integer buildYear = null;
|
||||||
|
List<District> districts = new ArrayList<District>();
|
||||||
|
if(StringUtils.isNotBlank(district.getFinishBuildingDate())){
|
||||||
|
buildYear = DistrictScoreUtil.parseStringToDate(district.getFinishBuildingDate());
|
||||||
|
if(buildYear!=null){
|
||||||
|
districts = new ArrayList<District>();
|
||||||
|
int startYear = buildYear -7;
|
||||||
|
int endYear = buildYear + 7;
|
||||||
|
for(District dist : allDistricts){
|
||||||
|
if(StringUtils.isNotBlank(dist.getFinishBuildingDate())){
|
||||||
|
int simlarDistYear = DistrictScoreUtil.parseStringToDate(district.getFinishBuildingDate());
|
||||||
|
if(simlarDistYear>=startYear && simlarDistYear<=endYear && StringUtils.isNotBlank(district.getEstateType2()) && StringUtils.isNotBlank(dist.getEstateType2()) && district.getEstateType2().equals(dist.getEstateType2())){
|
||||||
|
districts.add(dist);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//相似房源
|
||||||
|
Double startArea = model.getSize() - model.getSize()*0.1;
|
||||||
|
Double endArea = model.getSize() + model.getSize()*0.1;
|
||||||
|
Integer startDate = Integer.parseInt(org.apache.tools.ant.util.DateUtils.format(DateUtil.addMonthToDate(new Date(), -12), "yyyyMMdd"));
|
||||||
|
List<Seawater> houses = seawaterService.findSeawatersFromEs2("rent", district.getCity(), district.getRegion(), district.getName(), null, null, startDate, null,
|
||||||
|
startArea, endArea, startPrice, endPrice, null, null, "p_date", false, 1, 5 , null,"seawater-20*/_doc");
|
||||||
|
//无评估小区房源用周边相似小区的房源
|
||||||
|
if(null == houses || houses.size()==0){
|
||||||
|
for (District dist : districts) {
|
||||||
|
houses = seawaterService.findSeawatersFromEs2("rent", dist.getCity(), dist.getRegion(), dist.getName(), null, null, startDate, null,
|
||||||
|
startArea, endArea, startPrice, endPrice, null, null, "p_date", false, 1, 5 , null,"seawater-20*/_doc");
|
||||||
|
if(houses!=null && houses.size()>0){
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
districtPriceMap.put("houses", houses);
|
||||||
|
|
||||||
|
//周边相似小区租金
|
||||||
|
Integer room = null;
|
||||||
|
if(model.getRoom()!=0){
|
||||||
|
room = model.getRoom();
|
||||||
|
}else{
|
||||||
|
room = houseService.getDistrictRoomType((float)model.getSize());
|
||||||
|
}
|
||||||
|
if (null != districts) {
|
||||||
|
if (null != room) {
|
||||||
|
List<DistrictHouseDtao> dtos = new ArrayList<DistrictHouseDtao>();
|
||||||
|
Date weekend = DateUtil.getFirstDayOfWeek(new Date());
|
||||||
|
for (District dist : districts) {
|
||||||
|
|
||||||
|
List<DistrictRoomSqmetreRent> districtRoomSqmetreRents = districtRoomSqmetreRentService.findDistrictRoomSqmetreRents(dist, 1, room);
|
||||||
|
|
||||||
|
///List<DistrictStatRent> districtStatRents = districtStatRentService.findLatestDistrictStatRent(dist, 1, room);
|
||||||
|
if (null != districtRoomSqmetreRents && districtRoomSqmetreRents.size() > 0) {
|
||||||
|
DistrictRoomSqmetreRent districtRoomSqmetreRent = districtRoomSqmetreRents.get(0);
|
||||||
|
if (districtRoomSqmetreRent.getAvgPrice() > 0) {
|
||||||
|
|
||||||
|
int startSqPrice = (int)(evaluation.getAvgPrice() - evaluation.getAvgPrice()*0.1);
|
||||||
|
int endSqPrice = (int)(evaluation.getAvgPrice() + evaluation.getAvgPrice()*0.1);
|
||||||
|
// SqmetreRent sqmetreRent = sqmetreRentService.findNearestSqmetreRent(dist.getCity(), dist.getRegion(), dist.getName(), DateUtil.formatToYYYYMMDD(weekend), "district");
|
||||||
|
if(districtRoomSqmetreRent.getAvgPrice()>=startSqPrice && districtRoomSqmetreRent.getAvgPrice()<=endSqPrice){
|
||||||
|
DistrictHouseDtao dto = new DistrictHouseDtao();
|
||||||
|
dto.setCity(dist.getCity());
|
||||||
|
dto.setRegion(dist.getRegion());
|
||||||
|
dto.setDistrictName(dist.getName());
|
||||||
|
dto.setSqAvgPrice(districtRoomSqmetreRent.getAvgPrice());
|
||||||
|
dto.setRoom(room);
|
||||||
|
dtos.add(dto);
|
||||||
|
if(dtos.size()>=5){
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
districtPriceMap.put("districts", dtos);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//近一年户型租金走势
|
||||||
|
// Map<String, Object> trendsMap = districtRoomSqmetreRentService.getRentTrends(district.getCity(), district.getRegion(), district.getName(), room, -12);
|
||||||
|
Map<String, Object> trendsMap = districtStatRentService.getRentTrend(district.getCity(), district.getRegion(), district.getDistrictName(), -12);
|
||||||
|
if (MapUtils.isNotEmpty(trendsMap)) {
|
||||||
|
Map distMap = (Map) trendsMap.get("distMap");
|
||||||
|
Map<String, Integer> trendMap = (Map) distMap.get(String.valueOf(trendsMap.get("room")));
|
||||||
|
if (MapUtils.isNotEmpty(trendMap)) {
|
||||||
|
for (String key : trendMap.keySet()) {
|
||||||
|
Double totalPrice = (trendMap.get(key) * evaluation.getArea());
|
||||||
|
trendMap.put(key, totalPrice.intValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
districtPriceMap.put("trends", trendsMap);
|
||||||
|
|
||||||
|
|
||||||
|
//成交的租房房源
|
||||||
|
List<RentDealPrice> rentTrades = rentDealPriceService.getRentDealPrices(district.getCity(), district.getRegion(), district.getName(), 5);
|
||||||
|
districtPriceMap.put("trades", rentTrades);
|
||||||
|
|
||||||
|
mav.setModel(BasicModel.buildOKModel().setResult(districtPriceMap));
|
||||||
|
return mav;
|
||||||
|
} else {
|
||||||
|
mav.setModel(BasicModel.buildOKModel().setMsg("暂时不支持该小区的租金估价").markNoData());
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public Object evaluateRentAction(PropertyEvaluationModel model, HttpServletRequest request)throws NumberFormatException, IllegalAccessException {
|
||||||
|
RestfulModelAndView mav = new RestfulModelAndView();
|
||||||
|
mav.setViewType("rest");
|
||||||
|
if (StringUtils.isBlank(model.getCity()) || StringUtils.isBlank(model.getName())
|
||||||
|
|| StringUtils.isBlank(model.getDistrict()) || model.getSize() <= 0) {
|
||||||
|
mav.setModel(BasicModel.buildBadRequestModel("参数非法:城市,区域,小区名,面积(size)为必填项"));
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
if (model.getCity().endsWith("市")) {
|
||||||
|
model.setCity(model.getCity().replaceAll("市$", ""));
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(request.getParameter("calDate"))) {
|
||||||
|
Date calDate = null;
|
||||||
|
try {
|
||||||
|
calDate = org.apache.commons.lang.time.DateUtils.parseDate(request.getParameter("calDate"), new String[] { "yyyy-MM-dd" });
|
||||||
|
} catch (ParseException e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
if (calDate == null) {
|
||||||
|
mav.setModel(BasicModel.buildBadRequestModel("calDate:数据类型不合法"));
|
||||||
|
return mav;
|
||||||
|
} else {
|
||||||
|
model.setCalDate(calDate);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* 先到CPDB库中查找小区 */
|
||||||
|
District district = districtService.findByNameAndAlias(model.getCity(), model.getDistrict(), model.getName(),
|
||||||
|
"district");
|
||||||
|
if (district == null) {
|
||||||
|
mav.setModel(BasicModel.buildBadRequestModel("该小区不存在"));
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
model.setName(district.getName());
|
||||||
|
|
||||||
|
|
||||||
|
if (model.getMaxFloor() != null && (model.getMaxFloor() <= 0 || model.getMaxFloor() > 59)) {
|
||||||
|
mav.setModel(BasicModel.buildBadRequestModel("maxFloor取值非法,正确范围[1,60)"));
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (model.getFloor() != null && (model.getFloor() <= 0 || model.getFloor() > 59)) {
|
||||||
|
mav.setModel(BasicModel.buildBadRequestModel("floor取值非法,正确范围[1,60)"));
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
if (model.getMaxFloor() != null && model.getFloor() != null && model.getFloor() > model.getMaxFloor()) {
|
||||||
|
mav.setModel(BasicModel.buildBadRequestModel("所在楼层不能大于总楼层"));
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
|
||||||
|
model.setRegion(district.getRegion());
|
||||||
|
model.setDistrictName(district.getName());
|
||||||
|
if (StringUtils.isBlank(model.getPropertyType())) {
|
||||||
|
if (district.getEstateType2() != null && district.getEstateType2().contains("别墅")) {
|
||||||
|
model.setPropertyType("1");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (model.getCalDate() != null) {
|
||||||
|
if (new Date().before(model.getCalDate())) {
|
||||||
|
model.setCalDate(DateUtil.getFirstDayOfWeek(new Date()));
|
||||||
|
} else {
|
||||||
|
model.setCalDate(DateUtil.getFirstDayOfWeek(model.getCalDate()));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
model.setCalDate(DateUtil.getFirstDayOfWeek(new Date()));
|
||||||
|
}
|
||||||
|
|
||||||
|
Evaluation evaluation = buildEvaluation(model, request);
|
||||||
|
evaluation.setSource("api_property_evaluate_rent");
|
||||||
|
evaluation = evaluationService.evaluateRent(district, evaluation, model.getCalDate());
|
||||||
|
|
||||||
|
|
||||||
|
if (evaluation.getTotalPrice() != null && evaluation.getTotalPrice() != 0) {
|
||||||
|
Map<String, Object> districtPriceMap = new HashMap<String, Object>();
|
||||||
|
districtPriceMap.put("city", district.getCity());
|
||||||
|
districtPriceMap.put("district", district.getRegion());
|
||||||
|
districtPriceMap.put("name", district.getName());
|
||||||
|
districtPriceMap.put("address", district.getAddress());
|
||||||
|
districtPriceMap.put("totalPrice", evaluation.getTotalPrice());
|
||||||
|
districtPriceMap.put("cal_date", model.getCalDate());
|
||||||
|
mav.setModel(BasicModel.buildOKModel().setResult(districtPriceMap));
|
||||||
|
return mav;
|
||||||
|
} else {
|
||||||
|
|
||||||
|
mav.setModel(BasicModel.buildOKModel().setMsg("暂时不支持该小区的租金估价").markNoData());
|
||||||
|
return mav;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void setHouseLoudongService(HouseLoudongService houseLoudongService) {
|
public void setHouseLoudongService(HouseLoudongService houseLoudongService) {
|
||||||
this.houseLoudongService = houseLoudongService;
|
this.houseLoudongService = houseLoudongService;
|
||||||
}
|
}
|
||||||
@@ -5159,4 +5585,20 @@ public class PropertyController {
|
|||||||
public void setRegionAnaDataService(RegionAnaDataService regionAnaDataService) {
|
public void setRegionAnaDataService(RegionAnaDataService regionAnaDataService) {
|
||||||
this.regionAnaDataService = regionAnaDataService;
|
this.regionAnaDataService = regionAnaDataService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setSeawaterService(SeawaterService seawaterService) {
|
||||||
|
this.seawaterService = seawaterService;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSqmetreRentService(SqmetreRentService sqmetreRentService) {
|
||||||
|
this.sqmetreRentService = sqmetreRentService;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDistrictRoomSqmetreRentService(DistrictRoomSqmetreRentService districtRoomSqmetreRentService) {
|
||||||
|
this.districtRoomSqmetreRentService = districtRoomSqmetreRentService;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRentDealPriceService(RentDealPriceService rentDealPriceService) {
|
||||||
|
this.rentDealPriceService = rentDealPriceService;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+106
-42
@@ -1,5 +1,6 @@
|
|||||||
package com.fangjia.open.controllers;
|
package com.fangjia.open.controllers;
|
||||||
|
|
||||||
|
import java.text.ParseException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
@@ -7,6 +8,16 @@ import java.util.HashMap;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import com.fangjia.dal.mongo.model.*;
|
||||||
|
import com.fangjia.dal.mongo.open.model.ApiUserAuthority;
|
||||||
|
import com.fangjia.dal.seawater.model.Seawater;
|
||||||
|
import com.fangjia.open.dto.DistrictDto;
|
||||||
|
import com.fangjia.open.dto.DistrictHouseDtao;
|
||||||
|
import com.fangjia.open.model.PropertyEvaluationModel;
|
||||||
|
import com.fangjia.open.util.CommonUtils;
|
||||||
|
import com.fangjia.service.datastore.EvaluationService;
|
||||||
|
import com.fangjia.service.datastore.HouseService;
|
||||||
|
import com.fangjia.service.mongo.fangjia.SeawaterService;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.tools.ant.util.DateUtils;
|
import org.apache.tools.ant.util.DateUtils;
|
||||||
|
|
||||||
@@ -15,9 +26,6 @@ import com.fangjia.core.util.DateUtil;
|
|||||||
import com.fangjia.dal.common.DistrictKey;
|
import com.fangjia.dal.common.DistrictKey;
|
||||||
import com.fangjia.dal.common.ServerAreaData;
|
import com.fangjia.dal.common.ServerAreaData;
|
||||||
import com.fangjia.dal.mongo.fangjia.model.ServerArea;
|
import com.fangjia.dal.mongo.fangjia.model.ServerArea;
|
||||||
import com.fangjia.dal.mongo.model.DistrictStatRent;
|
|
||||||
import com.fangjia.dal.mongo.model.RegionStatRent;
|
|
||||||
import com.fangjia.dal.mongo.model.SqmetreRent;
|
|
||||||
import com.fangjia.dal.seaweed.model.District;
|
import com.fangjia.dal.seaweed.model.District;
|
||||||
import com.fangjia.open.HttpCode;
|
import com.fangjia.open.HttpCode;
|
||||||
import com.fangjia.open.OpenHttpCodeEnum;
|
import com.fangjia.open.OpenHttpCodeEnum;
|
||||||
@@ -35,6 +43,8 @@ import com.fangjia.service.district.DistrictStatService;
|
|||||||
import com.fangjia.service.district.RegionStatRentService;
|
import com.fangjia.service.district.RegionStatRentService;
|
||||||
import com.fangjia.service.district.SqmetreRentService;
|
import com.fangjia.service.district.SqmetreRentService;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
//@Authority(role = Role.USER)
|
//@Authority(role = Role.USER)
|
||||||
public class RentController {
|
public class RentController {
|
||||||
|
|
||||||
@@ -43,6 +53,9 @@ public class RentController {
|
|||||||
private DistrictStatRentService districtStatRentService;
|
private DistrictStatRentService districtStatRentService;
|
||||||
private DistrictStatService districtStatService;
|
private DistrictStatService districtStatService;
|
||||||
private RegionStatRentService regionStatRentService;
|
private RegionStatRentService regionStatRentService;
|
||||||
|
private EvaluationService evaluationService;
|
||||||
|
private SeawaterService seawaterService;
|
||||||
|
private HouseService houseService;
|
||||||
//³ÇÊÐÆ½Ã××â½ð
|
//³ÇÊÐÆ½Ã××â½ð
|
||||||
public Object cityRentAction(RentModel rentModel){
|
public Object cityRentAction(RentModel rentModel){
|
||||||
RestfulModelAndView mav = new RestfulModelAndView();
|
RestfulModelAndView mav = new RestfulModelAndView();
|
||||||
@@ -298,48 +311,92 @@ public class RentController {
|
|||||||
}else if(rentModel.getType() == 4){ //Á½Äê
|
}else if(rentModel.getType() == 4){ //Á½Äê
|
||||||
type = -24;
|
type = -24;
|
||||||
}
|
}
|
||||||
List<Date> dates = DateUtil.getLastDayBetweenDates(DateUtil.addMonthToDate(new Date(),type), new Date());
|
Map<String, Object> trendsMap = districtStatRentService.getRentTrend(rentModel.getCity(), rentModel.getDistrict(), rentModel.getName(), type);
|
||||||
|
mav.setModel(BasicModel.buildOKModel().setResult(trendsMap));
|
||||||
List<String> times = new ArrayList<String>();
|
|
||||||
for(Date date : dates){
|
|
||||||
times.add(DateUtils.format(date, "yyyy-MM"));
|
|
||||||
}
|
|
||||||
|
|
||||||
List<DistrictStatRentBo> districtRents = districtStatRentService.findDistrictStatRentsByParams(rentModel.getCity(), rentModel.getDistrict(), rentModel.getName(), null, dates.get(0), dates.get(dates.size()-1), null, null, null, null, true);
|
|
||||||
Map<String, Map<String, Integer>> distMap = null;
|
|
||||||
List<Integer> rooms = null;
|
|
||||||
|
|
||||||
if(null != districtRents){
|
|
||||||
distMap = new HashMap<String, Map<String, Integer>>();
|
|
||||||
rooms = new ArrayList<Integer>();
|
|
||||||
for(DistrictStatRentBo rent : districtRents){
|
|
||||||
|
|
||||||
DistrictStatRent distRent = rent.getDistrictStatRent();
|
|
||||||
if(null == distRent){
|
|
||||||
distRent = rent.getVillaDistrictStatRent();
|
|
||||||
}
|
|
||||||
|
|
||||||
Map<String, Integer> priceMap = distMap.get(distRent.getHouseType().toString());
|
|
||||||
if(null == priceMap){
|
|
||||||
rooms.add(distRent.getHouseType());
|
|
||||||
priceMap = new HashMap<String, Integer>();
|
|
||||||
distMap.put(distRent.getHouseType().toString(), priceMap);
|
|
||||||
}
|
|
||||||
|
|
||||||
priceMap.put(DateUtils.format(distRent.getEndMonthDate(), "yyyy-MM"), distRent.getAvgPrice());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Collections.sort(rooms);
|
|
||||||
|
|
||||||
Map<String, Object> retMap = new HashMap<String, Object>();
|
|
||||||
retMap.put("times", times);
|
|
||||||
retMap.put("distMap", distMap);
|
|
||||||
retMap.put("rooms", rooms);
|
|
||||||
mav.setModel(BasicModel.buildOKModel().setResult(retMap));
|
|
||||||
return mav;
|
return mav;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// public Object evaluateRentAction(RentModel model, HttpServletRequest request){
|
||||||
|
// RestfulModelAndView mav = new RestfulModelAndView();
|
||||||
|
//
|
||||||
|
// if (StringUtils.isBlank(model.getCity()) || StringUtils.isBlank(model.getName())
|
||||||
|
// || StringUtils.isBlank(model.getDistrict()) || model.getSize() <= 0) {
|
||||||
|
// mav.setModel(BasicModel.buildBadRequestModel("参数非法:城市,区域,小区名,面积(size)为必填项"));
|
||||||
|
// return mav;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// District district = districtService.findByNameAndAlias(model.getCity(), model.getDistrict(), model.getName(),"district");
|
||||||
|
// if (null == district) {
|
||||||
|
// mav.setModel(BasicModel.buildBadRequestModel("小区不存在"));
|
||||||
|
// return mav;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// Double startArea = model.getSize() - model.getSize()*0.1;
|
||||||
|
// Double endArea = model.getSize() + model.getSize()*0.1;
|
||||||
|
//
|
||||||
|
// Integer startDate = Integer.parseInt(DateUtils.format(DateUtil.addMonthToDate(new Date(), -12), "yyyyMMdd"));
|
||||||
|
//
|
||||||
|
// //相似房源
|
||||||
|
// List<Seawater> houses = seawaterService.findSeawatersFromEs2("rent", district.getCity(), district.getRegion(), district.getName(), null, null, startDate, null,
|
||||||
|
// startArea, endArea, null, null, null, null, "p_date", false, 1, 5 , null,"seawater-20*/_doc");
|
||||||
|
// Map<String, Object> retMap = new HashMap<String, Object>();
|
||||||
|
// retMap.put("houses", houses);
|
||||||
|
//
|
||||||
|
// if (null == model.getRadius()) {// 设置默认值
|
||||||
|
// model.setRadius(2000);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// //相近小区
|
||||||
|
// List<District> districts = districtService.findNearestDistrict(district, model.getRadius(), 50);
|
||||||
|
// if (null != districts) {
|
||||||
|
// Integer room = null;
|
||||||
|
// if(model.getHouseType()!=null){
|
||||||
|
// room = model.getHouseType();
|
||||||
|
// }else{
|
||||||
|
// room = houseService.getDistrictRoomType(model.getSize());
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// if (null != room) {
|
||||||
|
// List<DistrictHouseDtao> dtos = new ArrayList<DistrictHouseDtao>();
|
||||||
|
// List<Integer> prices = new ArrayList<Integer>();
|
||||||
|
// Date weekend = DateUtil.getFirstDayOfWeek(new Date());
|
||||||
|
// for (District dist : districts) {
|
||||||
|
// List<DistrictStatRent> districtStatRents = districtStatRentService.findLatestDistrictStatRent(dist, 1, room);
|
||||||
|
// if (null != districtStatRents && districtStatRents.size() > 0) {
|
||||||
|
// DistrictStatRent districtStatRent = districtStatRents.get(0);
|
||||||
|
// if (districtStatRent.getAvgPrice() > 0) {
|
||||||
|
// SqmetreRent sqmetreRent = sqmetreRentService.findNearestSqmetreRent(dist.getCity(), dist.getRegion(), dist.getName(), DateUtil.formatToYYYYMMDD(weekend), "district");
|
||||||
|
// if(sqmetreRent != null){
|
||||||
|
// DistrictHouseDtao dto = new DistrictHouseDtao();
|
||||||
|
// dto.setCity(dist.getCity());
|
||||||
|
// dto.setRegion(dist.getRegion());
|
||||||
|
// dto.setDistrictName(dist.getName());
|
||||||
|
// dto.setSqAvgPrice(sqmetreRent.getAvgPrice());
|
||||||
|
// dto.setRoom(room);
|
||||||
|
// dtos.add(dto);
|
||||||
|
// if(dtos.size()>=5){
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// retMap.put("districts", dtos);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Map<String, Object> trendsMap = districtStatRentService.getRentTrend(model.getCity(), model.getDistrict(), model.getName(), -12);
|
||||||
|
// retMap.put("trends", trendsMap);
|
||||||
|
// mav.setModel(BasicModel.buildOKModel().setResult(retMap));
|
||||||
|
// return mav;
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public void setSeawaterService(SeawaterService seawaterService) {
|
||||||
|
this.seawaterService = seawaterService;
|
||||||
|
}
|
||||||
|
|
||||||
public void setSqmetreRentService(SqmetreRentService sqmetreRentService) {
|
public void setSqmetreRentService(SqmetreRentService sqmetreRentService) {
|
||||||
this.sqmetreRentService = sqmetreRentService;
|
this.sqmetreRentService = sqmetreRentService;
|
||||||
@@ -359,4 +416,11 @@ public class RentController {
|
|||||||
this.regionStatRentService = regionStatRentService;
|
this.regionStatRentService = regionStatRentService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setEvaluationService(EvaluationService evaluationService) {
|
||||||
|
this.evaluationService = evaluationService;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHouseService(HouseService houseService) {
|
||||||
|
this.houseService = houseService;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
package com.fangjia.open.controllers;
|
package com.fangjia.open.controllers;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import com.fangjia.core.util.AnalyticsUtil;
|
||||||
|
import com.fangjia.dal.mongo.model.SendSmsLog;
|
||||||
|
import com.fangjia.open.model.weixin.SendCodeJsonModel;
|
||||||
|
import com.fangjia.open.model.weixin.SendCodeModel;
|
||||||
import net.sf.json.JSONObject;
|
import net.sf.json.JSONObject;
|
||||||
|
|
||||||
import org.apache.commons.codec.digest.DigestUtils;
|
import org.apache.commons.codec.digest.DigestUtils;
|
||||||
@@ -18,6 +23,8 @@ import com.fangjia.service.mongo.mobile.UserInfoService;
|
|||||||
import com.fangjia.service.sql.UserService;
|
import com.fangjia.service.sql.UserService;
|
||||||
import com.fangjia.service.util.UsersUtils;
|
import com.fangjia.service.util.UsersUtils;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
public class UsersController {
|
public class UsersController {
|
||||||
private UserService userService;
|
private UserService userService;
|
||||||
private UserInfoService userInfoService;
|
private UserInfoService userInfoService;
|
||||||
|
|||||||
+687
@@ -0,0 +1,687 @@
|
|||||||
|
package com.fangjia.open.controllers.weixin;
|
||||||
|
|
||||||
|
import com.fangjia.core.util.*;
|
||||||
|
import com.fangjia.dal.QueryParam;
|
||||||
|
import com.fangjia.dal.SdQuery;
|
||||||
|
import com.fangjia.dal.SrQuery;
|
||||||
|
import com.fangjia.dal.mongo.model.DistrictRoomSqmetreRent;
|
||||||
|
import com.fangjia.dal.mongo.model.Evaluation;
|
||||||
|
import com.fangjia.dal.mongo.model.RentDealPrice;
|
||||||
|
import com.fangjia.dal.seawater.model.Seawater;
|
||||||
|
import com.fangjia.dal.seaweed.model.District;
|
||||||
|
import com.fangjia.open.APIConstant;
|
||||||
|
import com.fangjia.open.compatible.model.JsonModel;
|
||||||
|
import com.fangjia.open.dto.DistrictHouseDtao;
|
||||||
|
import com.fangjia.open.interceptors.AuthenticationBean;
|
||||||
|
import com.fangjia.open.model.AddesssMatchModel;
|
||||||
|
import com.fangjia.open.model.BaseModel;
|
||||||
|
import com.fangjia.open.model.weixin.EvaluationModel;
|
||||||
|
import com.fangjia.open.model.weixin.PropertyEvaluationModel;
|
||||||
|
import com.fangjia.open.util.LineChartsUtils;
|
||||||
|
import com.fangjia.service.api.AutoCompleteBo;
|
||||||
|
import com.fangjia.service.datastore.DistrictService;
|
||||||
|
import com.fangjia.service.datastore.EvaluationService;
|
||||||
|
import com.fangjia.service.datastore.HouseService;
|
||||||
|
import com.fangjia.service.district.DistrictRoomSqmetreRentService;
|
||||||
|
import com.fangjia.service.district.DistrictStatRentService;
|
||||||
|
import com.fangjia.service.district.RentDealPriceService;
|
||||||
|
import com.fangjia.service.mongo.fangjia.FileService;
|
||||||
|
import com.fangjia.service.mongo.fangjia.SeawaterService;
|
||||||
|
import com.fangjia.service.util.DistrictScoreUtil;
|
||||||
|
import com.lowagie.text.pdf.BaseFont;
|
||||||
|
import org.apache.batik.transcoder.Transcoder;
|
||||||
|
import org.apache.batik.transcoder.TranscoderException;
|
||||||
|
import org.apache.batik.transcoder.TranscoderInput;
|
||||||
|
import org.apache.batik.transcoder.TranscoderOutput;
|
||||||
|
import org.apache.batik.transcoder.image.PNGTranscoder;
|
||||||
|
import org.apache.commons.collections.MapUtils;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
import org.apache.lucene.index.Term;
|
||||||
|
import org.apache.lucene.search.BooleanClause;
|
||||||
|
import org.apache.lucene.search.BooleanQuery;
|
||||||
|
import org.apache.lucene.search.TermQuery;
|
||||||
|
import org.bson.types.ObjectId;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.sothis.core.util.CollectionUtils;
|
||||||
|
import org.sothis.web.mvc.ActionContext;
|
||||||
|
import org.sothis.web.mvc.annotation.Param;
|
||||||
|
import org.xhtmlrenderer.pdf.ITextFontResolver;
|
||||||
|
import org.xhtmlrenderer.pdf.ITextRenderer;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.*;
|
||||||
|
import java.lang.reflect.InvocationTargetException;
|
||||||
|
import java.net.URLEncoder;
|
||||||
|
import java.text.ParseException;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 建设银行租金控制类
|
||||||
|
*
|
||||||
|
* @author shenjian
|
||||||
|
* @since 2021/4/6
|
||||||
|
*/
|
||||||
|
public class CcbRentController {
|
||||||
|
|
||||||
|
private static final Logger logger = LoggerFactory.getLogger(CcbRentController.class);
|
||||||
|
|
||||||
|
private DistrictService districtService;
|
||||||
|
private SeawaterService seawaterService;
|
||||||
|
private DistrictStatRentService districtStatRentService;
|
||||||
|
private DistrictRoomSqmetreRentService districtRoomSqmetreRentService;
|
||||||
|
private EvaluationService evaluationService;
|
||||||
|
private HouseService houseService;
|
||||||
|
private RentDealPriceService rentDealPriceService;
|
||||||
|
private FileService fileService;
|
||||||
|
|
||||||
|
public Object indexAction(BaseModel result) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object reportAction(EvaluationModel result, @Param(name = "address") String address, @Param(name = "totalPrice") String totalPrice) {
|
||||||
|
result.setLender(address);
|
||||||
|
if (StringUtils.isNotBlank(totalPrice)) {
|
||||||
|
result.setDealPrice(Double.valueOf(totalPrice));
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object detailAction(PropertyEvaluationModel result) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object matchAction(AddesssMatchModel model) {
|
||||||
|
String result = null;
|
||||||
|
HttpRequest httpRequest = new HttpRequest();
|
||||||
|
try {
|
||||||
|
Map<String, String> headers = new HashMap<String, String>();
|
||||||
|
// &__refresh_cache=1 刷新缓存
|
||||||
|
String url = "http://open.fangjia.com/address/match?token=" + APIConstant.SUPER_USER_TOKEN;
|
||||||
|
Map<String, String> params = org.apache.commons.beanutils.BeanUtils.describe(model);
|
||||||
|
result = httpRequest.post(url, params, headers,"UTF-8");
|
||||||
|
} catch (NoSuchMethodException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (HttpRequestException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (InvocationTargetException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (IllegalAccessException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object evaluateRentAction(com.fangjia.open.model.PropertyEvaluationModel model, HttpServletRequest request)throws NumberFormatException, IllegalAccessException {
|
||||||
|
String result = null;
|
||||||
|
HttpRequest httpRequest = new HttpRequest();
|
||||||
|
try {
|
||||||
|
Map<String, String> headers = new HashMap<String, String>();
|
||||||
|
// &__refresh_cache=1 刷新缓存
|
||||||
|
String url = "http://open.fangjia.com/property/evaluateRent?token=" + APIConstant.SUPER_USER_TOKEN;
|
||||||
|
Map<String, String> params = org.apache.commons.beanutils.BeanUtils.describe(model);
|
||||||
|
result = httpRequest.post(url, params, headers,"UTF-8");
|
||||||
|
} catch (NoSuchMethodException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (HttpRequestException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} catch (InvocationTargetException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object downloadPageAction(PropertyEvaluationModel result, HttpServletRequest request, @Param(name = "city") String city, @Param(name = "district") String districtStr,
|
||||||
|
@Param(name = "name") String name, @Param(name = "address") String address, @Param(name = "addressDetail") String addressDetail,
|
||||||
|
@Param(name = "size") Double size, @Param(name = "floor") Integer floor, @Param(name = "height") Integer height, @Param(name = "room") Integer room,
|
||||||
|
@Param(name = "hall") Integer hall, @Param(name = "toilet") Integer toilet, @Param(name = "direction") String direction, @Param(name = "fitment") String fitment, @Param(name = "hasLift") String hasLift, @Param(name = "chartImgUrl") String chartImgUrl) {
|
||||||
|
com.fangjia.open.model.PropertyEvaluationModel model = new com.fangjia.open.model.PropertyEvaluationModel();
|
||||||
|
model.setCity(city);
|
||||||
|
model.setDistrict(districtStr);
|
||||||
|
model.setName(name);
|
||||||
|
model.setAddress(address);
|
||||||
|
model.setSize(size);
|
||||||
|
model.setFloor(floor);
|
||||||
|
model.setHeight(height);
|
||||||
|
if (room != null) {
|
||||||
|
model.setRoom(room);
|
||||||
|
}
|
||||||
|
if (hall != null) {
|
||||||
|
model.setHall(hall);
|
||||||
|
}
|
||||||
|
if (toilet != null) {
|
||||||
|
model.setToilet(toilet);
|
||||||
|
}
|
||||||
|
model.setDirection(direction);
|
||||||
|
model.setFitment(fitment);
|
||||||
|
|
||||||
|
if (model.getCity().endsWith("市")) {
|
||||||
|
model.setCity(model.getCity().replaceAll("市$", ""));
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(request.getParameter("calDate"))) {
|
||||||
|
Date calDate = null;
|
||||||
|
try {
|
||||||
|
calDate = org.apache.commons.lang.time.DateUtils.parseDate(request.getParameter("calDate"), new String[] { "yyyy-MM-dd" });
|
||||||
|
} catch (ParseException e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
model.setCalDate(calDate);
|
||||||
|
}
|
||||||
|
/* 先到CPDB库中查找小区 */
|
||||||
|
District district = districtService.findByNameAndAlias(model.getCity(), model.getDistrict(), model.getName(),
|
||||||
|
"district");
|
||||||
|
model.setName(district.getName());
|
||||||
|
|
||||||
|
|
||||||
|
model.setRegion(district.getRegion());
|
||||||
|
model.setDistrictName(district.getName());
|
||||||
|
if (StringUtils.isBlank(model.getPropertyType())) {
|
||||||
|
if (district.getEstateType2() != null && district.getEstateType2().contains("别墅")) {
|
||||||
|
model.setPropertyType("1");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (model.getCalDate() != null) {
|
||||||
|
if (new Date().before(model.getCalDate())) {
|
||||||
|
model.setCalDate(DateUtil.getFirstDayOfWeek(new Date()));
|
||||||
|
} else {
|
||||||
|
model.setCalDate(DateUtil.getFirstDayOfWeek(model.getCalDate()));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
model.setCalDate(DateUtil.getFirstDayOfWeek(new Date()));
|
||||||
|
}
|
||||||
|
|
||||||
|
Evaluation evaluation = buildEvaluation(model, request);
|
||||||
|
evaluation.setSource("api_property_evaluate_rent");
|
||||||
|
evaluation = evaluationService.evaluateRent(district, evaluation, model.getCalDate());
|
||||||
|
|
||||||
|
if (evaluation.getTotalPrice() != null && evaluation.getTotalPrice() != 0) {
|
||||||
|
evaluation.setAvgPrice((int)(evaluation.getTotalPrice()/evaluation.getArea()));
|
||||||
|
Map<String, Object> districtPriceMap = new HashMap<String, Object>();
|
||||||
|
districtPriceMap.put("city", district.getCity());
|
||||||
|
districtPriceMap.put("district", district.getRegion());
|
||||||
|
districtPriceMap.put("name", district.getName());
|
||||||
|
districtPriceMap.put("address", district.getAddress());
|
||||||
|
districtPriceMap.put("totalPrice", evaluation.getTotalPrice());
|
||||||
|
districtPriceMap.put("totalPriceUpper", CurrencyConverter.toChinese(String.valueOf(evaluation.getTotalPrice())));
|
||||||
|
districtPriceMap.put("cal_date", DateUtil.formatByPattern(new Date(), "yyyy/MM/dd"));
|
||||||
|
districtPriceMap.put("direction", evaluation.getDirection());
|
||||||
|
districtPriceMap.put("size", evaluation.getArea());
|
||||||
|
districtPriceMap.put("floor", model.getFloor());
|
||||||
|
districtPriceMap.put("height", model.getHeight());
|
||||||
|
districtPriceMap.put("fitment", evaluation.getFitment());
|
||||||
|
districtPriceMap.put("buildYear",district.getFinishBuildingDate());
|
||||||
|
districtPriceMap.put("hasLift",hasLift);
|
||||||
|
districtPriceMap.put("room", room);
|
||||||
|
districtPriceMap.put("addressDetail", addressDetail);
|
||||||
|
|
||||||
|
Integer startPrice = (int)(evaluation.getTotalPrice() - evaluation.getTotalPrice()*0.2);
|
||||||
|
Integer endPrice = (int)(evaluation.getTotalPrice() + evaluation.getTotalPrice()*0.2);
|
||||||
|
|
||||||
|
//周边相似小区
|
||||||
|
if (null == model.getRadius()) {// 设置默认值
|
||||||
|
model.setRadius(1000);
|
||||||
|
}
|
||||||
|
String[] fields = { "city", "region", "name", "estateType2", "id","finishBuildingDate"};
|
||||||
|
List<District> allDistricts = districtService.findNearestDistrict(district, model.getRadius(), fields, Integer.MAX_VALUE);
|
||||||
|
//按条件过滤相似小区
|
||||||
|
Integer buildYear = null;
|
||||||
|
List<District> districts = new ArrayList<District>();
|
||||||
|
if(StringUtils.isNotBlank(district.getFinishBuildingDate())){
|
||||||
|
buildYear = DistrictScoreUtil.parseStringToDate(district.getFinishBuildingDate());
|
||||||
|
if(buildYear!=null){
|
||||||
|
districts = new ArrayList<District>();
|
||||||
|
int startYear = buildYear -7;
|
||||||
|
int endYear = buildYear + 7;
|
||||||
|
for(District dist : allDistricts){
|
||||||
|
if(StringUtils.isNotBlank(dist.getFinishBuildingDate())){
|
||||||
|
int simlarDistYear = DistrictScoreUtil.parseStringToDate(district.getFinishBuildingDate());
|
||||||
|
if(simlarDistYear>=startYear && simlarDistYear<=endYear && StringUtils.isNotBlank(district.getEstateType2()) && StringUtils.isNotBlank(dist.getEstateType2()) && district.getEstateType2().equals(dist.getEstateType2())){
|
||||||
|
districts.add(dist);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//相似房源
|
||||||
|
Double startArea = model.getSize() - model.getSize()*0.1;
|
||||||
|
Double endArea = model.getSize() + model.getSize()*0.1;
|
||||||
|
Integer startDate = Integer.parseInt(org.apache.tools.ant.util.DateUtils.format(DateUtil.addMonthToDate(new Date(), -12), "yyyyMMdd"));
|
||||||
|
List<Seawater> houses = seawaterService.findSeawatersFromEs2("rent", district.getCity(), district.getRegion(), district.getName(), null, null, startDate, null,
|
||||||
|
startArea, endArea, startPrice, endPrice, null, null, "p_date", false, 1, 5 , null,"seawater-20*/_doc");
|
||||||
|
//无评估小区房源用周边相似小区的房源
|
||||||
|
if(null == houses || houses.size()==0){
|
||||||
|
for (District dist : districts) {
|
||||||
|
houses = seawaterService.findSeawatersFromEs2("rent", dist.getCity(), dist.getRegion(), dist.getName(), null, null, startDate, null,
|
||||||
|
startArea, endArea, startPrice, endPrice, null, null, "p_date", false, 1, 5 , null,"seawater-20*/_doc");
|
||||||
|
if(houses!=null && houses.size()>0){
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (CollectionUtils.isNotEmpty(houses)) {
|
||||||
|
for (Seawater seawater: houses) {
|
||||||
|
if (seawater.getpDate() != null) {
|
||||||
|
seawater.setRoot(DateUtil.formatByPattern(DateUtil.parseDate(String.valueOf(seawater.getpDate()), "yyyyMMdd"), "yyyy-MM-dd"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
districtPriceMap.put("houses", houses);
|
||||||
|
|
||||||
|
//周边相似小区租金
|
||||||
|
if(model.getRoom() != 0){
|
||||||
|
room = model.getRoom();
|
||||||
|
}else{
|
||||||
|
room = houseService.getDistrictRoomType((float)model.getSize());
|
||||||
|
}
|
||||||
|
if (null != districts) {
|
||||||
|
if (null != room) {
|
||||||
|
List<DistrictHouseDtao> dtos = new ArrayList<DistrictHouseDtao>();
|
||||||
|
Date weekend = DateUtil.getFirstDayOfWeek(new Date());
|
||||||
|
for (District dist : districts) {
|
||||||
|
|
||||||
|
List<DistrictRoomSqmetreRent> districtRoomSqmetreRents = districtRoomSqmetreRentService.findDistrictRoomSqmetreRents(dist, 1, room);
|
||||||
|
|
||||||
|
///List<DistrictStatRent> districtStatRents = districtStatRentService.findLatestDistrictStatRent(dist, 1, room);
|
||||||
|
if (null != districtRoomSqmetreRents && districtRoomSqmetreRents.size() > 0) {
|
||||||
|
DistrictRoomSqmetreRent districtRoomSqmetreRent = districtRoomSqmetreRents.get(0);
|
||||||
|
if (districtRoomSqmetreRent.getAvgPrice() > 0) {
|
||||||
|
|
||||||
|
int startSqPrice = (int)(evaluation.getAvgPrice() - evaluation.getAvgPrice()*0.1);
|
||||||
|
int endSqPrice = (int)(evaluation.getAvgPrice() + evaluation.getAvgPrice()*0.1);
|
||||||
|
// SqmetreRent sqmetreRent = sqmetreRentService.findNearestSqmetreRent(dist.getCity(), dist.getRegion(), dist.getName(), DateUtil.formatToYYYYMMDD(weekend), "district");
|
||||||
|
if(districtRoomSqmetreRent.getAvgPrice()>=startSqPrice && districtRoomSqmetreRent.getAvgPrice()<=endSqPrice){
|
||||||
|
DistrictHouseDtao dto = new DistrictHouseDtao();
|
||||||
|
dto.setCity(dist.getCity());
|
||||||
|
dto.setRegion(dist.getRegion());
|
||||||
|
dto.setDistrictName(dist.getName());
|
||||||
|
dto.setSqAvgPrice(districtRoomSqmetreRent.getAvgPrice());
|
||||||
|
dto.setRoom(room);
|
||||||
|
dtos.add(dto);
|
||||||
|
if(dtos.size()>=5){
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
districtPriceMap.put("districts", dtos);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//近一年户型租金走势
|
||||||
|
//Map<String, Object> trendsMap = districtRoomSqmetreRentService.getRentTrends(district.getCity(), district.getRegion(), district.getName(), room, -12);
|
||||||
|
Map<String, Object> trendsMap = districtStatRentService.getRentTrend(district.getCity(), district.getRegion(), district.getDistrictName(), -12);
|
||||||
|
if (MapUtils.isNotEmpty(trendsMap)) {
|
||||||
|
Map distMap = (Map) trendsMap.get("distMap");
|
||||||
|
Map<String, Integer> trendMap = (Map) distMap.get(String.valueOf(trendsMap.get("room")));
|
||||||
|
if (MapUtils.isNotEmpty(trendMap)) {
|
||||||
|
for (String key : trendMap.keySet()) {
|
||||||
|
Double totalPrice = (trendMap.get(key) * evaluation.getArea());
|
||||||
|
trendMap.put(key, totalPrice.intValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
districtPriceMap.put("trends", trendsMap);
|
||||||
|
|
||||||
|
// 生成走势图图片,一遍转pdf
|
||||||
|
//String tradesImgUrl = buildTrendImage(trendsMap, room);
|
||||||
|
String tradesImgUrl = chartImgUrl;
|
||||||
|
|
||||||
|
//成交的租房房源
|
||||||
|
List<RentDealPrice> rentTrades = rentDealPriceService.getRentDealPrices(district.getCity(), district.getRegion(), district.getName(), 5);
|
||||||
|
if (CollectionUtils.isNotEmpty(rentTrades)) {
|
||||||
|
for (RentDealPrice price : rentTrades) {
|
||||||
|
// 返回成交日期到前端,直接取日期转pdf报错!!!!!!!!!!!!!!!!!
|
||||||
|
if (price.getTradeDate() != null) {
|
||||||
|
price.setSource(DateUtil.formatByPattern(price.getTradeDate(), "yyyy-MM-dd"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
districtPriceMap.put("trades", rentTrades);
|
||||||
|
districtPriceMap.put("tradesImgUrl", tradesImgUrl);
|
||||||
|
|
||||||
|
result.setResult(districtPriceMap);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String buildTrendImage(Map<String, Object> trendsMap, Integer room) {
|
||||||
|
List<String> times = (List<String>) trendsMap.get("times");
|
||||||
|
Map<String, Object> distMap = (Map<String, Object>) ((Map<String, Object>) trendsMap.get("distMap")).get(String.valueOf(room));
|
||||||
|
if (distMap != null) {
|
||||||
|
List<Integer> values = new ArrayList<Integer>();
|
||||||
|
for (int i = 0; i < times.size(); i++) {
|
||||||
|
if (distMap.get(times.get(i)) != null) {
|
||||||
|
values.add((Integer) distMap.get(times.get(i)));
|
||||||
|
} else {
|
||||||
|
values.add(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 保存到本地测试
|
||||||
|
//String url = LineChartsUtils.createChartAndSave2Png("d://test.png",room + "居室", times, values);
|
||||||
|
String url = LineChartsUtils.createChartAndUpload(fileService,room + "居室", times, values);
|
||||||
|
logger.info("租金估值图片上传至服务器:{}", url);
|
||||||
|
return url;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过EvaluationModel组装Evaluation实体
|
||||||
|
*
|
||||||
|
* @param model
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private Evaluation buildEvaluation(com.fangjia.open.model.PropertyEvaluationModel model, HttpServletRequest request) {
|
||||||
|
Evaluation evaluation = new Evaluation();
|
||||||
|
evaluation.setCity(model.getCity());
|
||||||
|
evaluation.setRegion(model.getRegion());
|
||||||
|
evaluation.setDistrictName(model.getName());
|
||||||
|
evaluation.setDirection(DIRECTION.get(model.getDirection()));
|
||||||
|
evaluation.setFitment(EVALUATION_MODEL_FITMENT.get(FITMENT.get(StringUtils.isNotBlank(model.getDecoration()) ?
|
||||||
|
model.getDecoration() : model.getFitment())));
|
||||||
|
evaluation.setAtticArea(model.getAtticSize());
|
||||||
|
evaluation.setTerraceArea(model.getOuterSize());
|
||||||
|
evaluation.setBasementArea(model.getBasementSize());
|
||||||
|
evaluation.setGardenArea(model.getGardenSize());
|
||||||
|
String worryFacility = model.getNegativeFactor();
|
||||||
|
evaluation.setCreationDate(new Date());
|
||||||
|
evaluation.setModificationDate(new Date());
|
||||||
|
evaluation.setClientNo(model.getClientNo());
|
||||||
|
if (0 != model.getAge()) {
|
||||||
|
evaluation.setAge(model.getAge());
|
||||||
|
}
|
||||||
|
evaluation.setArea(model.getSize());
|
||||||
|
if (StringUtils.isNotBlank(model.getBuildType())) {
|
||||||
|
evaluation.setBuildType(model.getBuildType());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(model.getCarport())) {
|
||||||
|
evaluation.setCarport(model.getCarport());
|
||||||
|
}
|
||||||
|
if (model.getDecorationAge() >= 1 && model.getDecorationAge() <= 5) {
|
||||||
|
evaluation.setFitmentAge(model.getDecorationAge());
|
||||||
|
}
|
||||||
|
evaluation.setCarportPrice(model.getCarportPrice());
|
||||||
|
evaluation.setCity(model.getCity());
|
||||||
|
evaluation.setDistrictName(model.getName());
|
||||||
|
if (model.getDecorationCost() != null && model.getDecorationCost() > 0) {
|
||||||
|
evaluation.setFitmentCharge(model.getDecorationCost());
|
||||||
|
}
|
||||||
|
if (0 != model.getHall()) {
|
||||||
|
evaluation.setHall(model.getHall());
|
||||||
|
}
|
||||||
|
if (null != model.getFloor()) {
|
||||||
|
evaluation.setFloor(model.getFloor());
|
||||||
|
}
|
||||||
|
if (model.getMaxFloor() != null && 0 != model.getMaxFloor()) {
|
||||||
|
evaluation.setHeight(model.getMaxFloor());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(model.getBuildingNumber())) {
|
||||||
|
evaluation.setHouseNum(model.getBuildingNumber());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(model.getHouseProperty())) {
|
||||||
|
evaluation.setHouseProperty(model.getHouseProperty());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(model.getInsidepos())) {
|
||||||
|
evaluation.setInsidepos(model.getInsidepos());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(model.getLightingVentilation())) {
|
||||||
|
evaluation.setLightingVentilation(model.getLightingVentilation());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (StringUtils.isNotBlank(model.getOtherFactor())) {
|
||||||
|
evaluation.setOtherFactor(model.getOtherFactor());
|
||||||
|
}
|
||||||
|
evaluation.setRegion(model.getDistrict());
|
||||||
|
if (0 != model.getRoom()) {
|
||||||
|
evaluation.setRoom(model.getRoom());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(model.getRoomNumber())) {
|
||||||
|
evaluation.setRoomNum(model.getRoomNumber());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(model.getSideset())) {
|
||||||
|
evaluation.setSideset(model.getSideset());
|
||||||
|
}
|
||||||
|
if (0 != model.getToilet()) {
|
||||||
|
evaluation.setToilet(model.getToilet());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (StringUtils.isNotBlank(model.getFacade())) {
|
||||||
|
evaluation.setFacade(model.getFacade());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(model.getTraffice())) {
|
||||||
|
evaluation.setTraffice(model.getTraffice());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(model.getShape())) {
|
||||||
|
evaluation.setShape(model.getShape());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(model.getObstacle())) {
|
||||||
|
evaluation.setObstacle(model.getObstacle());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(model.getIndustry())) {
|
||||||
|
evaluation.setIndustry(model.getIndustry());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(model.getSupportDevice())) {
|
||||||
|
evaluation.setSupportDevice(model.getSupportDevice());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(model.getLeftPosition())) {
|
||||||
|
evaluation.setLeftPosition(model.getLeftPosition());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(model.getShopType())) {
|
||||||
|
evaluation.setShopType(model.getShopType());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(model.getShopUnique())) {
|
||||||
|
evaluation.setShopUnique(model.getShopUnique());
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(model.getLocation())) {
|
||||||
|
evaluation.setLocation(model.getLocation());
|
||||||
|
}
|
||||||
|
if (model.isNewDistrict()) {
|
||||||
|
evaluation.setNewDistrict(model.isNewDistrict());
|
||||||
|
}
|
||||||
|
String ip = AnalyticsUtil.getIpAddress(ActionContext.getContext().getRequest());
|
||||||
|
evaluation.setIp(ip);
|
||||||
|
AuthenticationBean authenticationBean = (AuthenticationBean) request
|
||||||
|
.getAttribute(AuthenticationBean.ATTR_AUTHENTICATION_BEAN);
|
||||||
|
if (authenticationBean != null && authenticationBean.apiUser != null) {
|
||||||
|
evaluation.setFromUserId(String.valueOf(authenticationBean.apiUser.getId()));
|
||||||
|
}
|
||||||
|
evaluation.setSource("api_property_evaluation");
|
||||||
|
return evaluation;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object saveHighChartAsImageAction(HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
String svg = request.getParameter("svg");
|
||||||
|
ByteArrayOutputStream out = null;
|
||||||
|
String url = null;
|
||||||
|
try {
|
||||||
|
svg = svg.replaceAll(":rect", "rect");
|
||||||
|
Transcoder t = new PNGTranscoder();
|
||||||
|
out = new ByteArrayOutputStream();
|
||||||
|
TranscoderInput input = new TranscoderInput(new StringReader(svg));
|
||||||
|
TranscoderOutput output = new TranscoderOutput(out);
|
||||||
|
t.transcode(input, output);
|
||||||
|
byte[] data = out.toByteArray();
|
||||||
|
String id = new ObjectId().toString();
|
||||||
|
fileService.save(id,"o", data, "image/png", "o");
|
||||||
|
url = "http://img0.fangjia.com/stc/fs/" + DataUtil.encodePicUrl(id, "o", "house");
|
||||||
|
} catch (TranscoderException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
out.close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
JsonModel model = new JsonModel();
|
||||||
|
AutoCompleteBo bo = new AutoCompleteBo();
|
||||||
|
bo.setAddress(url);
|
||||||
|
model.setJsonModel(bo);
|
||||||
|
return model;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void downloadAction(HttpServletResponse response, HttpServletRequest request, @Param(name = "city") String city, @Param(name = "district") String district,
|
||||||
|
@Param(name = "name") String name, @Param(name = "address") String address, @Param(name = "addressDetail") String addressDetail,
|
||||||
|
@Param(name = "size") Double size, @Param(name = "floor") Integer floor, @Param(name = "height") Integer height, @Param(name = "room") Integer room,
|
||||||
|
@Param(name = "hall") Integer hall, @Param(name = "toilet") Integer toilet, @Param(name = "direction") String direction, @Param(name = "fitment") String fitment, @Param(name = "hasLift") String hasLift, @Param(name = "chartImgUrl") String chartImgUrl) throws IOException {
|
||||||
|
response.setHeader("Content-disposition", "attachment; filename=" + URLEncoder.encode("租金估值报告", "UTF-8") + ".pdf");
|
||||||
|
response.setContentType("application/pdf;charset=UTF-8");
|
||||||
|
response.setCharacterEncoding("UTF-8");
|
||||||
|
OutputStream os = null;
|
||||||
|
try {
|
||||||
|
os = response.getOutputStream();
|
||||||
|
ITextRenderer renderer = new ITextRenderer(35, 24);
|
||||||
|
ITextFontResolver fontResolver = renderer.getFontResolver();
|
||||||
|
String fontUrl = ActionContext.getContext().getServletContext().getRealPath("/") + "fonts" + File.separator + "simsun.ttc";
|
||||||
|
fontResolver.addFont(fontUrl, BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);
|
||||||
|
final String path = "http://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath();
|
||||||
|
String url = path + "/ccbRent/downloadPage?city=" + DataUtil.urlEncode(city) + "&district="+DataUtil.urlEncode(district)+"&name="+DataUtil.urlEncode(name);
|
||||||
|
url += "&address=" + DataUtil.urlEncode(address) + "&addressDetail=" + DataUtil.urlEncode(addressDetail) +"&size="+size+"&floor="+floor+"&height="+height+"&room="+room+"&hall="+hall+"&toilet="+toilet+"&direction="+direction+"&fitment="+fitment+"&chartImgUrl="+chartImgUrl + "&hasLift=" + DataUtil.urlEncode(hasLift);
|
||||||
|
renderer.setDocument(url);
|
||||||
|
renderer.layout();
|
||||||
|
renderer.createPDF(os, true);
|
||||||
|
renderer.finishPDF();
|
||||||
|
os.flush();
|
||||||
|
os.close();
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} finally {
|
||||||
|
if (os != null) {
|
||||||
|
os.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 方法同DistrictController#suggestAction
|
||||||
|
*/
|
||||||
|
public Object suggestAction(@Param(name = "city") String city, @Param(name = "cat") String cat, @Param(name = "keyword") String keyword,
|
||||||
|
@Param(name = "limit") Integer limit, @Param(name="lat")Double lat, @Param(name="lng")Double lng) {
|
||||||
|
JsonModel model = new JsonModel();
|
||||||
|
if (limit == null || limit > 100 || limit <= 0) {
|
||||||
|
limit = 10;
|
||||||
|
}
|
||||||
|
System.out.println(cat + "#" + city + "#" + keyword + "#" + limit + "#" + lng + "#" + lat);
|
||||||
|
List<AutoCompleteBo> suggestList = getDistrictByKeyword(cat, city, keyword, limit, lng, lat);
|
||||||
|
model.setJsonModel(suggestList);
|
||||||
|
return model;
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<AutoCompleteBo> getDistrictByKeyword(String cat, String city, String keyword, int limit, final Double lng, final Double lat) {
|
||||||
|
|
||||||
|
keyword = DataUtil.escapeSolr(keyword);
|
||||||
|
if (StringUtils.isBlank(keyword) || keyword.length() >= 30) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<QueryParam> params = new ArrayList<QueryParam>();
|
||||||
|
params.add(new QueryParam("city", city));
|
||||||
|
params.add(new QueryParam("category", cat));
|
||||||
|
params.add(new QueryParam("visible", 0));
|
||||||
|
|
||||||
|
|
||||||
|
BooleanQuery srQuery1 = new BooleanQuery();
|
||||||
|
BooleanQuery nameQuery = new BooleanQuery();
|
||||||
|
// nameQuery.add(new TermQuery(new Term("district_name", keyword)), BooleanClause.Occur.SHOULD);
|
||||||
|
// nameQuery.add(new TermQuery(new Term("alias_std", keyword)), BooleanClause.Occur.SHOULD);
|
||||||
|
// nameQuery.add(new TermQuery(new Term("address", keyword)), BooleanClause.Occur.SHOULD);
|
||||||
|
// nameQuery.add(new TermQuery(new Term("addr_alias_std", keyword)), BooleanClause.Occur.SHOULD);
|
||||||
|
nameQuery.add(new TermQuery(new Term("keyword", keyword)), BooleanClause.Occur.SHOULD);
|
||||||
|
//nameQuery.add(new TermQuery(new Term("keyword_cjk", keyword)), BooleanClause.Occur.SHOULD);//这个重要,因seaweed不支持模糊搜索,当输入"中远两"需用此进行搜索
|
||||||
|
srQuery1.add(nameQuery, BooleanClause.Occur.SHOULD);
|
||||||
|
if(lat != null && lng != null && lat != 0 && lng != 0){
|
||||||
|
Map<String, Double> geo = GeocodeUtils.geoconvBaiduToGoogle(lng, lat);
|
||||||
|
SdQuery sdQuery = new SdQuery();
|
||||||
|
sdQuery.setPoint(geo.get("lat") + "," + geo.get("lng"));
|
||||||
|
sdQuery.setField("lat_lng");
|
||||||
|
sdQuery.setDistance("500");
|
||||||
|
params.add(new QueryParam(QueryParam.SD_PARAM_NAME, sdQuery));
|
||||||
|
}
|
||||||
|
params.add(new QueryParam("$sr", new SrQuery(srQuery1)));
|
||||||
|
List<District> districts = districtService.findAllByParams(params, 0, limit, new String[]{"region", "name", "address", "addrAlias","id"});
|
||||||
|
List<AutoCompleteBo> ret = new ArrayList<AutoCompleteBo>(districts.size());
|
||||||
|
for (District district : districts) {
|
||||||
|
AutoCompleteBo bo = new AutoCompleteBo();
|
||||||
|
bo.setKeyword(district.getName());
|
||||||
|
bo.setVal(district.getName());
|
||||||
|
bo.setDesc(district.getAddress());
|
||||||
|
bo.setRegion(district.getRegion());
|
||||||
|
bo.setId(district.getId());
|
||||||
|
ret.add(bo);
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final Map<String, String> DIRECTION = new HashMap<String, String>() {
|
||||||
|
{
|
||||||
|
put(null, "南");
|
||||||
|
put("1", "西南");
|
||||||
|
put("2", "东南");
|
||||||
|
put("3", "南");
|
||||||
|
put("4", "西北");
|
||||||
|
put("5", "东北");
|
||||||
|
put("6", "东");
|
||||||
|
put("7", "西");
|
||||||
|
put("8", "北");
|
||||||
|
put("9", "东西");
|
||||||
|
put("10", "南北");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
private static final Map<String, String> FITMENT = new HashMap<String, String>() {
|
||||||
|
{
|
||||||
|
put(null, "简装");
|
||||||
|
put("1", "毛坯");
|
||||||
|
put("2", "简装");
|
||||||
|
put("3", "精装");
|
||||||
|
put("4", "豪装");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
private static final Map<String, String> EVALUATION_MODEL_FITMENT = new HashMap<String, String>() {
|
||||||
|
{
|
||||||
|
put(null, "简单装修");
|
||||||
|
put("简装", "简单装修");
|
||||||
|
put("毛坯", "毛坯");
|
||||||
|
put("精装", "精装修");
|
||||||
|
put("豪装", "豪华装修");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
public void setDistrictService(DistrictService districtService) {
|
||||||
|
this.districtService = districtService;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSeawaterService(SeawaterService seawaterService) {
|
||||||
|
this.seawaterService = seawaterService;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDistrictRoomSqmetreRentService(DistrictRoomSqmetreRentService districtRoomSqmetreRentService) {
|
||||||
|
this.districtRoomSqmetreRentService = districtRoomSqmetreRentService;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEvaluationService(EvaluationService evaluationService) {
|
||||||
|
this.evaluationService = evaluationService;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHouseService(HouseService houseService) {
|
||||||
|
this.houseService = houseService;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRentDealPriceService(RentDealPriceService rentDealPriceService) {
|
||||||
|
this.rentDealPriceService = rentDealPriceService;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFileService(FileService fileService) {
|
||||||
|
this.fileService = fileService;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDistrictStatRentService(DistrictStatRentService districtStatRentService) {
|
||||||
|
this.districtStatRentService = districtStatRentService;
|
||||||
|
}
|
||||||
|
}
|
||||||
+226
-6
@@ -10,10 +10,15 @@ import java.util.List;
|
|||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.fangjia.dal.common.XcxKey;
|
||||||
|
import com.fangjia.dal.mongo.model.bkoff.XcxUserInfo;
|
||||||
|
import com.fangjia.service.fangjia.FangJiaUserService;
|
||||||
|
import com.fangjia.service.mongo.fangjia.XcxUserInfoService;
|
||||||
import com.fangjia.service.open.WeChatAuthService;
|
import com.fangjia.service.open.WeChatAuthService;
|
||||||
import com.fangjia.service.open.WeChatAuthServiceImpl;
|
import com.fangjia.service.open.WeChatAuthServiceImpl;
|
||||||
import com.fangjia.service.util.CookieUtils;
|
import com.fangjia.service.util.CookieUtils;
|
||||||
|
|
||||||
|
import com.fangjia.service.util.DataConvertUtil;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
|
||||||
import com.fangjia.core.util.CacheUtils;
|
import com.fangjia.core.util.CacheUtils;
|
||||||
@@ -37,6 +42,7 @@ public class UserController {
|
|||||||
private UserCityService userCityService;
|
private UserCityService userCityService;
|
||||||
private FjtUsersService fjtUsersService;
|
private FjtUsersService fjtUsersService;
|
||||||
private WeChatAuthService weChatAuthService;
|
private WeChatAuthService weChatAuthService;
|
||||||
|
private XcxUserInfoService xcxUserInfoService;
|
||||||
|
|
||||||
public void setUserCityService(UserCityService userCityService) {
|
public void setUserCityService(UserCityService userCityService) {
|
||||||
this.userCityService = userCityService;
|
this.userCityService = userCityService;
|
||||||
@@ -59,6 +65,36 @@ public class UserController {
|
|||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//渤海银行登录
|
||||||
|
public Object bhydLoginPageAction(UserModel model, HttpServletResponse response, HttpServletRequest request) {
|
||||||
|
String type = StringUtils.trimToNull(model.getType());
|
||||||
|
if(!StringUtils.isBlank(type)){
|
||||||
|
model.setType(type);
|
||||||
|
CookieUtils.setCookie("login_user_type", type, "/", 60 * 60 * 24 *7, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
WeChatAuthServiceImpl.WeChatWebToken token = weChatAuthService.getWeChatWebToken(model.getCode());
|
||||||
|
String weiXinId = "";
|
||||||
|
if(token != null) {
|
||||||
|
weiXinId = token.getOpenid();
|
||||||
|
} else {
|
||||||
|
weiXinId = CookieUtils.getCookieValue(request,"we_chat_open_id");
|
||||||
|
}
|
||||||
|
if(weiXinId == null && StringUtils.isNotBlank(model.getCode())) {//微信公众号渤海银行
|
||||||
|
weiXinId = DataConvertUtil.getRandomString2(16);
|
||||||
|
}
|
||||||
|
if(weiXinId != null && !weiXinId.equals("")){
|
||||||
|
CookieUtils.setCookie("we_chat_open_id", weiXinId, "/", 60 * 60 * 24 *7, response);
|
||||||
|
}
|
||||||
|
System.out.println("bhyd微信OPEN_ID:" + weiXinId);
|
||||||
|
|
||||||
|
return model;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setXcxUserInfoService(XcxUserInfoService xcxUserInfoService) {
|
||||||
|
this.xcxUserInfoService = xcxUserInfoService;
|
||||||
|
}
|
||||||
|
|
||||||
public Object reqCityChoicePageAction(UserModel model, HttpServletResponse response, HttpServletRequest request) {
|
public Object reqCityChoicePageAction(UserModel model, HttpServletResponse response, HttpServletRequest request) {
|
||||||
String type = StringUtils.trimToNull(model.getType());
|
String type = StringUtils.trimToNull(model.getType());
|
||||||
if(!StringUtils.isBlank(type)){
|
if(!StringUtils.isBlank(type)){
|
||||||
@@ -217,6 +253,25 @@ public class UserController {
|
|||||||
String username = StringUtils.trimToNull(model.getUsername());
|
String username = StringUtils.trimToNull(model.getUsername());
|
||||||
String pass = StringUtils.trimToNull(model.getPass());
|
String pass = StringUtils.trimToNull(model.getPass());
|
||||||
String weiXinId = CookieUtils.getCookieValue(request,"we_chat_open_id");
|
String weiXinId = CookieUtils.getCookieValue(request,"we_chat_open_id");
|
||||||
|
|
||||||
|
if(StringUtils.isBlank(weiXinId) && StringUtils.isNotBlank(model.getCode())){
|
||||||
|
System.out.println("小程序code:"+model.getCode());
|
||||||
|
System.out.println("小程序AppId:"+model.getAppId());
|
||||||
|
System.out.println("小程序AppSecret:"+model.getAppSecret());
|
||||||
|
System.out.println("sid:"+model.getSid());
|
||||||
|
XcxKey sessionValue = getSessionValue(model.getCode(), null, model.getAppId(), model.getAppSecret());
|
||||||
|
if(sessionValue!=null){
|
||||||
|
weiXinId = sessionValue.getOpenId();
|
||||||
|
}
|
||||||
|
if(weiXinId == null) {
|
||||||
|
weiXinId = CookieUtils.getCookieValue(request,"we_chat_open_id");
|
||||||
|
}
|
||||||
|
if(weiXinId != null && !weiXinId.equals("")){
|
||||||
|
CookieUtils.setCookie("we_chat_open_id", weiXinId, "/", 60 * 60 * 24 *7, response);
|
||||||
|
}
|
||||||
|
System.out.println("[sid]小程序微信OPEN_ID:" + weiXinId);
|
||||||
|
}
|
||||||
|
|
||||||
//测试时可以先去掉
|
//测试时可以先去掉
|
||||||
if (StringUtils.isBlank(username) || StringUtils.isBlank(pass) || StringUtils.isBlank(weiXinId)){
|
if (StringUtils.isBlank(username) || StringUtils.isBlank(pass) || StringUtils.isBlank(weiXinId)){
|
||||||
resultModel.setMsg(Message.PARAM_NOT_NULL);
|
resultModel.setMsg(Message.PARAM_NOT_NULL);
|
||||||
@@ -242,6 +297,99 @@ public class UserController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 渤海
|
||||||
|
* @param model
|
||||||
|
* @param response
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Object enterpriseLoginBHAction(UserModel model, HttpServletResponse response, HttpServletRequest request) {
|
||||||
|
UserJsonModel resultModel = new UserJsonModel();
|
||||||
|
resultModel.setResult(Message.RESULT_FAIL);
|
||||||
|
String username = StringUtils.trimToNull(model.getUsername());
|
||||||
|
String pass = StringUtils.trimToNull(model.getPass());
|
||||||
|
String code = model.getCode();
|
||||||
|
String type = StringUtils.trimToNull(model.getType());
|
||||||
|
|
||||||
|
String cacheCode = getCacheCode(username, type, request);
|
||||||
|
if (cacheCode == null) {
|
||||||
|
resultModel.setMsg(Message.MOBILE_NOT_SEND_CODE);
|
||||||
|
return resultModel;
|
||||||
|
}
|
||||||
|
if (!cacheCode.equals(code)) {
|
||||||
|
resultModel.setMsg(Message.CODE_ERROR);
|
||||||
|
return resultModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
String weiXinId = CookieUtils.getCookieValue(request,"we_chat_open_id");
|
||||||
|
|
||||||
|
if(StringUtils.isBlank(weiXinId) && StringUtils.isNotBlank(model.getCode())){
|
||||||
|
System.out.println("小程序code:"+model.getCode());
|
||||||
|
System.out.println("小程序AppId:"+model.getAppId());
|
||||||
|
System.out.println("小程序AppSecret:"+model.getAppSecret());
|
||||||
|
System.out.println("sid:"+model.getSid());
|
||||||
|
XcxKey sessionValue = getSessionValue(model.getCode(), null, model.getAppId(), model.getAppSecret());
|
||||||
|
if(sessionValue!=null){
|
||||||
|
weiXinId = sessionValue.getOpenId();
|
||||||
|
}
|
||||||
|
if(weiXinId == null) {
|
||||||
|
weiXinId = CookieUtils.getCookieValue(request,"we_chat_open_id");
|
||||||
|
}
|
||||||
|
if(weiXinId != null && !weiXinId.equals("")){
|
||||||
|
CookieUtils.setCookie("we_chat_open_id", weiXinId, "/", 60 * 60 * 24 *7, response);
|
||||||
|
}
|
||||||
|
System.out.println("[sid]小程序微信OPEN_ID:" + weiXinId);
|
||||||
|
}
|
||||||
|
|
||||||
|
//测试时可以先去掉
|
||||||
|
if (StringUtils.isBlank(username) || StringUtils.isBlank(pass) || StringUtils.isBlank(weiXinId)){
|
||||||
|
resultModel.setMsg(Message.PARAM_NOT_NULL);
|
||||||
|
return resultModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
FjtUsers user = usersInfoService.enterpriseLogin(username, pass);
|
||||||
|
if(user == null) {
|
||||||
|
resultModel.setMsg(Message.LOGIN_FAIL);
|
||||||
|
return resultModel;
|
||||||
|
}
|
||||||
|
CookieUtils.setCookie("login_user_id", user.getId() + "", "/", 60 * 60 * 24 *7, response);
|
||||||
|
CookieUtils.setCookie("login_user_type", "b", "/", 60 * 60 * 24 *7, response);
|
||||||
|
CookieUtils.setCookie("login_enterpriseuser_weixinid", weiXinId, "/", 60 * 60 * 24 *7, response);
|
||||||
|
resultModel.setResult(Message.RESULT_SUCCESS);
|
||||||
|
return resultModel;
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
resultModel.setMsg(e.getMessage());
|
||||||
|
return resultModel;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public XcxKey getSessionValue(String code, String sid, String appId, String secret){
|
||||||
|
XcxKey sessionValue = null;
|
||||||
|
if(StringUtils.isNotBlank(sid)){
|
||||||
|
System.out.println(sid+"houqi");
|
||||||
|
sessionValue = new XcxKey();
|
||||||
|
sessionValue.setSid(sid);
|
||||||
|
sessionValue.setOpenId(sid);
|
||||||
|
}
|
||||||
|
//缓存中没有登陆信息
|
||||||
|
if(sessionValue==null){
|
||||||
|
//获取openid信息
|
||||||
|
sessionValue = xcxUserInfoService.getOpenId(code, appId, secret);
|
||||||
|
XcxUserInfo user = null;
|
||||||
|
if(sessionValue!=null&&StringUtils.isNotBlank(sessionValue.getOpenId())){
|
||||||
|
//根据是否是第一次使用,保存并查询除用户信息
|
||||||
|
user = xcxUserInfoService.save(sessionValue.getOpenId(), null);
|
||||||
|
sessionValue.setSid(sessionValue.getOpenId());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return sessionValue;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取缓存的验证码
|
* 获取缓存的验证码
|
||||||
* @author yinjihuan
|
* @author yinjihuan
|
||||||
@@ -270,18 +418,31 @@ public class UserController {
|
|||||||
String type = StringUtils.trimToNull(model.getType());
|
String type = StringUtils.trimToNull(model.getType());
|
||||||
String codeToken = StringUtils.trimToNull(model.getCodeToken());
|
String codeToken = StringUtils.trimToNull(model.getCodeToken());
|
||||||
String code = StringUtils.trimToNull(model.getCode());
|
String code = StringUtils.trimToNull(model.getCode());
|
||||||
if (StringUtils.isBlank(mobile) || StringUtils.isBlank(type) || StringUtils.isBlank(codeToken) || StringUtils.isBlank(code)) {
|
if(StringUtils.isNotBlank(type) && type.equals("bindmobilebh")){
|
||||||
resultModel.setResult(Message.RESULT_FAIL);
|
if (StringUtils.isBlank(mobile)) {
|
||||||
resultModel.setMsg(Message.PARAM_NOT_NULL);
|
resultModel.setResult(Message.RESULT_FAIL);
|
||||||
return resultModel;
|
resultModel.setMsg(Message.PARAM_NOT_NULL);
|
||||||
|
return resultModel;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if (StringUtils.isBlank(mobile) || StringUtils.isBlank(type) || StringUtils.isBlank(codeToken) || StringUtils.isBlank(code)) {
|
||||||
|
resultModel.setResult(Message.RESULT_FAIL);
|
||||||
|
resultModel.setMsg(Message.PARAM_NOT_NULL);
|
||||||
|
return resultModel;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String cacheCode = getCacheCode(codeToken, Message.SMS_CODE_TYPE_LOGIN, request);
|
String cacheCode = getCacheCode(codeToken, Message.SMS_CODE_TYPE_LOGIN, request);
|
||||||
if(!code.equals(cacheCode)){
|
if(!type.equals("bindmobilebh") && !code.equals(cacheCode)){
|
||||||
resultModel.setResult(Message.RESULT_FAIL);
|
resultModel.setResult(Message.RESULT_FAIL);
|
||||||
resultModel.setMsg(Message.IMG_CODE_ERROR);
|
resultModel.setMsg(Message.IMG_CODE_ERROR);
|
||||||
return resultModel;
|
return resultModel;
|
||||||
}
|
}
|
||||||
return sendCode(model, resultModel, mobile, type, resp);
|
if(type.equals("bindmobilebh")){
|
||||||
|
return sendBHCode(model, resultModel, mobile, type, resp);
|
||||||
|
}else{
|
||||||
|
return sendCode(model, resultModel, mobile, type, resp);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -322,6 +483,34 @@ public class UserController {
|
|||||||
return resultModel;
|
return resultModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private Object sendBHCode(SendCodeModel model, SendCodeJsonModel resultModel, String mobile, String type, HttpServletResponse resp) {
|
||||||
|
|
||||||
|
Long sendCodeTime = (Long) CacheUtils.getValue(FjtUsers.class, mobile);
|
||||||
|
if(sendCodeTime != null) {
|
||||||
|
Long curTime = new Date().getTime();
|
||||||
|
long second = (curTime - sendCodeTime)/1000;
|
||||||
|
if(second < 300 ){
|
||||||
|
resultModel.setResult(Message.RESULT_FAIL);
|
||||||
|
resultModel.setMsg(Message.SMS_CODE_SEND_FAIL_TIME);
|
||||||
|
return resultModel;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String code = usersInfoService.randomCode();
|
||||||
|
System.out.println(code);
|
||||||
|
try {
|
||||||
|
smsService.send(model.getMobile(), "【房价网】你的验证码是" + code + ",请立即验证。");
|
||||||
|
resultModel.setResult(Message.RESULT_SUCCESS);
|
||||||
|
CookieUtils.setCookie(mobile + "_" + type, code, "/", 60 * 60 * 24 *7, resp);
|
||||||
|
CacheUtils.putValue(CachePolicyEnum.TINY, FjtUsers.class, mobile, new Date().getTime());
|
||||||
|
} catch (SmsException e) {
|
||||||
|
resultModel.setResult(Message.RESULT_FAIL);
|
||||||
|
resultModel.setMsg(Message.SMS_CODE_SEND_FAIL);
|
||||||
|
}
|
||||||
|
return resultModel;
|
||||||
|
}
|
||||||
|
|
||||||
public void setWeChatAuthService(WeChatAuthService weChatAuthService) {
|
public void setWeChatAuthService(WeChatAuthService weChatAuthService) {
|
||||||
this.weChatAuthService = weChatAuthService;
|
this.weChatAuthService = weChatAuthService;
|
||||||
}
|
}
|
||||||
@@ -339,4 +528,35 @@ public class UserController {
|
|||||||
CacheUtils.putValue(CachePolicyEnum.LONG, "fangjia-weiXin-key", model.getWeiXinId(), model.getUsername());
|
CacheUtils.putValue(CachePolicyEnum.LONG, "fangjia-weiXin-key", model.getWeiXinId(), model.getUsername());
|
||||||
return resultModel;
|
return resultModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Object setupAction(UserModel model){
|
||||||
|
return model;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object updateInfoAction(UserModel model, HttpServletRequest request){
|
||||||
|
UserJsonModel resultModel = new UserJsonModel();
|
||||||
|
Long userId = Long.parseLong(CookieUtils.getCookieValue(request,"login_user_id"));
|
||||||
|
if(null != userId){
|
||||||
|
if(!model.getPass1().equals(model.getPass2())){
|
||||||
|
resultModel.setResult(Message.RESULT_FAIL);
|
||||||
|
resultModel.setMsg(Message.PASS_REPEAT);
|
||||||
|
return resultModel;
|
||||||
|
}
|
||||||
|
FjtUsers users = fjtUsersService.findById(userId);
|
||||||
|
if(null != users){
|
||||||
|
if(!users.getPassword().equals(model.getPass())){
|
||||||
|
resultModel.setResult(Message.RESULT_FAIL);
|
||||||
|
resultModel.setMsg(Message.LOGIN_UPPSW);
|
||||||
|
return resultModel;
|
||||||
|
}else{
|
||||||
|
users.setPassword(model.getPass1());
|
||||||
|
fjtUsersService.update(users);
|
||||||
|
resultModel.setResult(Message.RESULT_SUCCESS);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return resultModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+75
-8
@@ -2,14 +2,14 @@ package com.fangjia.open.controllers.weixin;
|
|||||||
|
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Date;
|
import java.util.regex.Matcher;
|
||||||
import java.util.HashMap;
|
import java.util.regex.Pattern;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
|
import com.fangjia.open.util.InsidePolygon2;
|
||||||
|
import com.fangjia.service.mongo.fangjia.PriceBorderService;
|
||||||
import net.sf.json.JSONArray;
|
import net.sf.json.JSONArray;
|
||||||
import net.sf.json.JSONObject;
|
import net.sf.json.JSONObject;
|
||||||
|
|
||||||
@@ -25,6 +25,7 @@ import com.fangjia.dal.common.DistrictKey;
|
|||||||
import com.fangjia.dal.mongo.model.AverageStatistics;
|
import com.fangjia.dal.mongo.model.AverageStatistics;
|
||||||
import com.fangjia.dal.mongo.model.Evaluation;
|
import com.fangjia.dal.mongo.model.Evaluation;
|
||||||
import com.fangjia.dal.mongo.model.LatlngPolygon;
|
import com.fangjia.dal.mongo.model.LatlngPolygon;
|
||||||
|
import com.fangjia.dal.mongo.model.PriceBorder;
|
||||||
import com.fangjia.dal.mongo.model.bkoff.DistrictHouseStat;
|
import com.fangjia.dal.mongo.model.bkoff.DistrictHouseStat;
|
||||||
import com.fangjia.dal.seaweed.model.District;
|
import com.fangjia.dal.seaweed.model.District;
|
||||||
import com.fangjia.dal.sql.model.EvaluationAudit;
|
import com.fangjia.dal.sql.model.EvaluationAudit;
|
||||||
@@ -105,6 +106,7 @@ public class WeiXinEvaluationController {
|
|||||||
private EvaluationRateService evaluationRateService;
|
private EvaluationRateService evaluationRateService;
|
||||||
private EvaluationService evaluationService;
|
private EvaluationService evaluationService;
|
||||||
private GoldLogsService goldLogsService;
|
private GoldLogsService goldLogsService;
|
||||||
|
private PriceBorderService priceBorderService;
|
||||||
|
|
||||||
private final static String DD_ID = "5938c43984aec20a36f474c5";
|
private final static String DD_ID = "5938c43984aec20a36f474c5";
|
||||||
|
|
||||||
@@ -369,7 +371,7 @@ public class WeiXinEvaluationController {
|
|||||||
|
|
||||||
|
|
||||||
FjtUsers fjtUser = fjtUsersService.findById(evaluation.getUserId());
|
FjtUsers fjtUser = fjtUsersService.findById(evaluation.getUserId());
|
||||||
model.setRole(fjtUser.getRole());
|
model.setRole(fjtUser.getRole());
|
||||||
|
|
||||||
District district = districtService.findDistrict(new DistrictKey(evaluation.getCity(), evaluation.getRegion(), evaluation.getDistrictName()), "district");
|
District district = districtService.findDistrict(new DistrictKey(evaluation.getCity(), evaluation.getRegion(), evaluation.getDistrictName()), "district");
|
||||||
model.setId(district.getId());
|
model.setId(district.getId());
|
||||||
@@ -377,7 +379,12 @@ public class WeiXinEvaluationController {
|
|||||||
EvaluationAudit evaluationAudit = evaluationAuditService.findByEvalutionId(evaluationId);
|
EvaluationAudit evaluationAudit = evaluationAuditService.findByEvalutionId(evaluationId);
|
||||||
model.setEvaluationAudit(evaluationAudit);
|
model.setEvaluationAudit(evaluationAudit);
|
||||||
|
|
||||||
model.setRole(fjtUser.getRole());
|
if(fjtUser!=null && fjtUser.getRole()==17 && district.getCity().equals("ÉϺ£")){
|
||||||
|
Map<String, Object> retMap = getLoanInfo(district, evaluation.getHouseArea());
|
||||||
|
if(retMap!=null && retMap.size()>0){
|
||||||
|
model.setLoanInfoMap(retMap);
|
||||||
|
}
|
||||||
|
}
|
||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -791,6 +798,64 @@ public class WeiXinEvaluationController {
|
|||||||
return loopLine;
|
return loopLine;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Map<String, Object> getLoanInfo(District district, Double area){
|
||||||
|
List<PriceBorder> ranges = priceBorderService.getALLBlockRange();
|
||||||
|
PriceBorder pbObj = null;
|
||||||
|
for(PriceBorder pb : ranges){
|
||||||
|
String[] pointArrs = pb.getBorder().split(";");
|
||||||
|
List<Point> points = new ArrayList<Point>();
|
||||||
|
for(String pointStr : pointArrs){
|
||||||
|
String[] ll = pointStr.split(",");
|
||||||
|
Point point = new Point(Double.valueOf(ll[0]), Double.valueOf(ll[1]));
|
||||||
|
points.add(point);
|
||||||
|
}
|
||||||
|
Point point = new Point(district.getLng()/10000000000.0, district.getLat()/10000000000.0);
|
||||||
|
//boolean flag = InsidePolygon.aboutZone(point, points);
|
||||||
|
//boolean flag = InsidePolygon.isPtInPoly(point.getLon(), point.getLat(), points);
|
||||||
|
boolean flag = InsidePolygon2.checkIsInPolygon(point, points);
|
||||||
|
if(flag){
|
||||||
|
pbObj = pb;
|
||||||
|
System.out.println(district.getRegion()+" "+district.getName()+" "+pb.getName());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Integer yearAge = getBuildYear(district.getFinishBuildingDate());
|
||||||
|
Map<String, Object> retsMap = new HashMap<String, Object>();
|
||||||
|
if(pbObj!=null && pbObj.getLevel()!=null && pbObj.getLevel()==1 && yearAge!=null && yearAge<=25 && area>=60){
|
||||||
|
retsMap.put("type", "A");
|
||||||
|
retsMap.put("loan_ratio", 7);
|
||||||
|
}else if(pbObj!=null && pbObj.getLevel()!=null && pbObj.getLevel()==2 && yearAge!=null && yearAge<=25 && area>=70){
|
||||||
|
retsMap.put("type", "B");
|
||||||
|
retsMap.put("loan_ratio", 6.5);
|
||||||
|
}else if(yearAge!=null && yearAge<=25 && yearAge>20 && pbObj!=null && pbObj.getLevel()!=null && (pbObj.getLevel()==1 || pbObj.getLevel()==2)){
|
||||||
|
retsMap.put("type", "C");
|
||||||
|
retsMap.put("loan_ratio", 6);
|
||||||
|
}else if(yearAge!=null && yearAge<=20 ){
|
||||||
|
retsMap.put("type", "C");
|
||||||
|
retsMap.put("loan_ratio", 6);
|
||||||
|
}else if(yearAge!=null && yearAge>25){
|
||||||
|
retsMap.put("type", "D");
|
||||||
|
retsMap.put("loan_ratio", 5);
|
||||||
|
}
|
||||||
|
return retsMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getBuildYear(String finishBuildingDate){
|
||||||
|
if(StringUtils.isNotBlank(finishBuildingDate)){
|
||||||
|
Pattern pat3 = Pattern.compile("\\d{4}");
|
||||||
|
Matcher matcher3 = pat3.matcher(finishBuildingDate);
|
||||||
|
if (matcher3.find()) {
|
||||||
|
String year = matcher3.group();
|
||||||
|
if(StringUtils.isNotBlank(year)){
|
||||||
|
int curYear = Calendar.getInstance().get(Calendar.YEAR);
|
||||||
|
return curYear - Integer.valueOf(year);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void setFjtEvaluationService(FjtEvaluationService fjtEvaluationService) {
|
public void setFjtEvaluationService(FjtEvaluationService fjtEvaluationService) {
|
||||||
this.fjtEvaluationService = fjtEvaluationService;
|
this.fjtEvaluationService = fjtEvaluationService;
|
||||||
@@ -869,5 +934,7 @@ public class WeiXinEvaluationController {
|
|||||||
this.emailService = emailService;
|
this.emailService = emailService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setPriceBorderService(PriceBorderService priceBorderService) {
|
||||||
|
this.priceBorderService = priceBorderService;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
@@ -192,6 +192,8 @@ public class XcxInfoController {
|
|||||||
return sessionValue;
|
return sessionValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 小程序估价接口
|
* 小程序估价接口
|
||||||
* @param model
|
* @param model
|
||||||
|
|||||||
@@ -0,0 +1,145 @@
|
|||||||
|
package com.fangjia.open.dto;
|
||||||
|
|
||||||
|
import groovy.transform.builder.Builder;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 建行租金dto
|
||||||
|
*
|
||||||
|
* @author shenjian
|
||||||
|
* @since 2021/4/6
|
||||||
|
*/
|
||||||
|
@Builder
|
||||||
|
public class CcbRentDto implements Serializable {
|
||||||
|
|
||||||
|
private String city;
|
||||||
|
// 区域
|
||||||
|
private String district;
|
||||||
|
// 小区名
|
||||||
|
private String name;
|
||||||
|
// 面积
|
||||||
|
private Double size;
|
||||||
|
// 半径
|
||||||
|
private Integer radius;
|
||||||
|
// 室
|
||||||
|
private Integer room;
|
||||||
|
// 厅
|
||||||
|
private Integer hall;
|
||||||
|
// 卫
|
||||||
|
private Integer toilet;
|
||||||
|
// 所在楼层
|
||||||
|
private Integer floor;
|
||||||
|
// 总楼层
|
||||||
|
private Integer height;
|
||||||
|
// 朝向
|
||||||
|
private String direction;
|
||||||
|
// 装修情况
|
||||||
|
private String fitment;
|
||||||
|
// 电梯配套
|
||||||
|
private Boolean hasLift;
|
||||||
|
|
||||||
|
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 getRadius() {
|
||||||
|
return radius;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRadius(Integer radius) {
|
||||||
|
this.radius = radius;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getRoom() {
|
||||||
|
return room;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRoom(Integer room) {
|
||||||
|
this.room = room;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getHall() {
|
||||||
|
return hall;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHall(Integer hall) {
|
||||||
|
this.hall = hall;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getToilet() {
|
||||||
|
return toilet;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setToilet(Integer toilet) {
|
||||||
|
this.toilet = toilet;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getFloor() {
|
||||||
|
return floor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFloor(Integer floor) {
|
||||||
|
this.floor = floor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDirection() {
|
||||||
|
return direction;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDirection(String direction) {
|
||||||
|
this.direction = direction;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFitment() {
|
||||||
|
return fitment;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFitment(String fitment) {
|
||||||
|
this.fitment = fitment;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean getHasLift() {
|
||||||
|
return hasLift;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHasLift(Boolean hasLift) {
|
||||||
|
this.hasLift = hasLift;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getSize() {
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSize(Double size) {
|
||||||
|
this.size = size;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getHeight() {
|
||||||
|
return height;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHeight(Integer height) {
|
||||||
|
this.height = height;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -49,6 +49,7 @@ public class DistrictDto implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private Integer avgPrice;
|
private Integer avgPrice;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* °å¿é
|
* °å¿é
|
||||||
*/
|
*/
|
||||||
@@ -526,6 +527,4 @@ public class DistrictDto implements Serializable {
|
|||||||
this.avgPrice = avgPrice;
|
this.avgPrice = avgPrice;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,79 @@
|
|||||||
|
package com.fangjia.open.dto;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
public class DistrictHouseDtao implements Serializable {
|
||||||
|
|
||||||
|
private String city;
|
||||||
|
private String region;
|
||||||
|
private String districtName;
|
||||||
|
private Integer roomPrice;
|
||||||
|
private Integer sqAvgPrice;
|
||||||
|
private Integer room;
|
||||||
|
private Integer hall;
|
||||||
|
private Integer toilet;
|
||||||
|
|
||||||
|
public String getCity() {
|
||||||
|
return city;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCity(String city) {
|
||||||
|
this.city = city;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRegion() {
|
||||||
|
return region;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRegion(String region) {
|
||||||
|
this.region = region;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDistrictName() {
|
||||||
|
return districtName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDistrictName(String districtName) {
|
||||||
|
this.districtName = districtName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getRoomPrice() {
|
||||||
|
return roomPrice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRoomPrice(Integer roomPrice) {
|
||||||
|
this.roomPrice = roomPrice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getSqAvgPrice() {
|
||||||
|
return sqAvgPrice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSqAvgPrice(Integer sqAvgPrice) {
|
||||||
|
this.sqAvgPrice = sqAvgPrice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getRoom() {
|
||||||
|
return room;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRoom(Integer room) {
|
||||||
|
this.room = room;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getHall() {
|
||||||
|
return hall;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHall(Integer hall) {
|
||||||
|
this.hall = hall;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getToilet() {
|
||||||
|
return toilet;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setToilet(Integer toilet) {
|
||||||
|
this.toilet = toilet;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -19,7 +19,24 @@ public class AddesssMatchModel extends FangjiaApiModel {
|
|||||||
private String province;
|
private String province;
|
||||||
private String debugName;
|
private String debugName;
|
||||||
private boolean useMap;
|
private boolean useMap;
|
||||||
|
private String address_1;
|
||||||
|
private String address_2;
|
||||||
|
|
||||||
|
public String getAddress_1() {
|
||||||
|
return address_1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAddress_1(String address_1) {
|
||||||
|
this.address_1 = address_1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddress_2() {
|
||||||
|
return address_2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAddress_2(String address_2) {
|
||||||
|
this.address_2 = address_2;
|
||||||
|
}
|
||||||
public boolean isContainsLocation() {
|
public boolean isContainsLocation() {
|
||||||
return containsLocation;
|
return containsLocation;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,166 @@
|
|||||||
|
package com.fangjia.open.model;
|
||||||
|
|
||||||
|
import org.hibernate.validator.constraints.NotBlank;
|
||||||
|
|
||||||
|
import javax.validation.constraints.Max;
|
||||||
|
import javax.validation.constraints.Min;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
public class CzbankSampleModel extends FangjiaApiModel{
|
||||||
|
private String cltNo;
|
||||||
|
private String province;
|
||||||
|
/**城市*/
|
||||||
|
private String city;
|
||||||
|
/**区域*/
|
||||||
|
private String district;
|
||||||
|
/**小区名*/
|
||||||
|
private String buildingName;
|
||||||
|
/**楼栋名称*/
|
||||||
|
private String buildingNoName;
|
||||||
|
/**物业类型编码*/
|
||||||
|
private String propertyTypeCode;
|
||||||
|
/**是否有电梯 0:无 1:有*/
|
||||||
|
private Integer isElevator;
|
||||||
|
/**总楼层*/
|
||||||
|
private Integer aboveFloorAmount;
|
||||||
|
/**所在楼层*/
|
||||||
|
private Integer floorNumber;
|
||||||
|
/**
|
||||||
|
* 装修情况编码
|
||||||
|
* 1:毛坯
|
||||||
|
* 2:简装(默认)
|
||||||
|
* 3:精装
|
||||||
|
* 4:豪装
|
||||||
|
* */
|
||||||
|
private Integer decrCondCode;
|
||||||
|
/**面积**/
|
||||||
|
private Double strctureArea;
|
||||||
|
/**
|
||||||
|
* 朝向情况编码
|
||||||
|
* 1:西南
|
||||||
|
* 2:东南
|
||||||
|
* 3:南(默认)
|
||||||
|
* 4:西北
|
||||||
|
* 5:东北
|
||||||
|
* 6:东
|
||||||
|
* 7:西
|
||||||
|
* 8:北
|
||||||
|
* 9:东西
|
||||||
|
* 10:南北
|
||||||
|
* */
|
||||||
|
private Integer towardDirectCode;
|
||||||
|
private Date updateDate;
|
||||||
|
|
||||||
|
public String getCltNo() {
|
||||||
|
return cltNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCltNo(String cltNo) {
|
||||||
|
this.cltNo = cltNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProvince() {
|
||||||
|
return province;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProvince(String province) {
|
||||||
|
this.province = province;
|
||||||
|
}
|
||||||
|
|
||||||
|
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 getBuildingName() {
|
||||||
|
return buildingName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBuildingName(String buildingName) {
|
||||||
|
this.buildingName = buildingName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBuildingNoName() {
|
||||||
|
return buildingNoName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBuildingNoName(String buildingNoName) {
|
||||||
|
this.buildingNoName = buildingNoName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPropertyTypeCode() {
|
||||||
|
return propertyTypeCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPropertyTypeCode(String propertyTypeCode) {
|
||||||
|
this.propertyTypeCode = propertyTypeCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getIsElevator() {
|
||||||
|
return isElevator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsElevator(Integer isElevator) {
|
||||||
|
this.isElevator = isElevator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getAboveFloorAmount() {
|
||||||
|
return aboveFloorAmount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAboveFloorAmount(Integer aboveFloorAmount) {
|
||||||
|
this.aboveFloorAmount = aboveFloorAmount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getFloorNumber() {
|
||||||
|
return floorNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFloorNumber(Integer floorNumber) {
|
||||||
|
this.floorNumber = floorNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getDecrCondCode() {
|
||||||
|
return decrCondCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDecrCondCode(Integer decrCondCode) {
|
||||||
|
this.decrCondCode = decrCondCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getStrctureArea() {
|
||||||
|
return strctureArea;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStrctureArea(Double strctureArea) {
|
||||||
|
this.strctureArea = strctureArea;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getTowardDirectCode() {
|
||||||
|
return towardDirectCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTowardDirectCode(Integer towardDirectCode) {
|
||||||
|
this.towardDirectCode = towardDirectCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getUpdateDate() {
|
||||||
|
return updateDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdateDate(Date updateDate) {
|
||||||
|
this.updateDate = updateDate;
|
||||||
|
}
|
||||||
|
}
|
||||||
+18
-3
@@ -1,5 +1,7 @@
|
|||||||
package com.fangjia.open.model;
|
package com.fangjia.open.model;
|
||||||
|
|
||||||
|
import javax.validation.constraints.Max;
|
||||||
|
import javax.validation.constraints.Min;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
public class PropertyEvaluationModel extends FangjiaApiModel {
|
public class PropertyEvaluationModel extends FangjiaApiModel {
|
||||||
@@ -267,7 +269,9 @@ public class PropertyEvaluationModel extends FangjiaApiModel {
|
|||||||
private String estateType;
|
private String estateType;
|
||||||
private String periodType;
|
private String periodType;
|
||||||
private Integer periodCount;
|
private Integer periodCount;
|
||||||
private int houseType;
|
|
||||||
|
|
||||||
|
private Integer houseType;
|
||||||
private String clientNo;
|
private String clientNo;
|
||||||
private int scope;
|
private int scope;
|
||||||
|
|
||||||
@@ -280,6 +284,9 @@ public class PropertyEvaluationModel extends FangjiaApiModel {
|
|||||||
|
|
||||||
private String user;
|
private String user;
|
||||||
|
|
||||||
|
private Integer avgPrice;
|
||||||
|
|
||||||
|
|
||||||
public void setDecorationAge(int decorationAge) {
|
public void setDecorationAge(int decorationAge) {
|
||||||
this.decorationAge = decorationAge;
|
this.decorationAge = decorationAge;
|
||||||
}
|
}
|
||||||
@@ -701,11 +708,11 @@ public class PropertyEvaluationModel extends FangjiaApiModel {
|
|||||||
this.decoration = decoration;
|
this.decoration = decoration;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getHouseType() {
|
public Integer getHouseType() {
|
||||||
return houseType;
|
return houseType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setHouseType(int houseType) {
|
public void setHouseType(Integer houseType) {
|
||||||
this.houseType = houseType;
|
this.houseType = houseType;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -890,4 +897,12 @@ public class PropertyEvaluationModel extends FangjiaApiModel {
|
|||||||
public void setAtticSize(Double atticSize) {
|
public void setAtticSize(Double atticSize) {
|
||||||
this.atticSize = atticSize;
|
this.atticSize = atticSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Integer getAvgPrice() {
|
||||||
|
return avgPrice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAvgPrice(Integer avgPrice) {
|
||||||
|
this.avgPrice = avgPrice;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,10 +30,15 @@ public class RentModel {
|
|||||||
|
|
||||||
private String endDate;
|
private String endDate;
|
||||||
|
|
||||||
|
|
||||||
@Min(1)
|
@Min(1)
|
||||||
@Max(4)
|
@Max(4)
|
||||||
private Integer type;//ÀàÐÍ
|
private Integer type;//ÀàÐÍ
|
||||||
|
|
||||||
|
@Min(1)
|
||||||
|
@Max(6)
|
||||||
|
private Integer houseType;//·¿ÐÍ
|
||||||
|
|
||||||
public String getCity() {
|
public String getCity() {
|
||||||
return city;
|
return city;
|
||||||
}
|
}
|
||||||
@@ -91,8 +96,11 @@ public class RentModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public Integer getHouseType() {
|
||||||
|
return houseType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHouseType(Integer houseType) {
|
||||||
|
this.houseType = houseType;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-1
@@ -2,6 +2,7 @@ package com.fangjia.open.model.weixin;
|
|||||||
|
|
||||||
import com.fangjia.dal.mongo.model.Evaluation;
|
import com.fangjia.dal.mongo.model.Evaluation;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import com.fangjia.dal.seaweed.model.District;
|
import com.fangjia.dal.seaweed.model.District;
|
||||||
import com.fangjia.dal.sql.model.EvaluationAudit;
|
import com.fangjia.dal.sql.model.EvaluationAudit;
|
||||||
@@ -38,7 +39,7 @@ public class EvaluationModel extends BaseModel{
|
|||||||
private String userType;
|
private String userType;
|
||||||
private Integer role;
|
private Integer role;
|
||||||
private String cardId;
|
private String cardId;
|
||||||
|
private Map<String, Object> loanInfoMap;
|
||||||
|
|
||||||
|
|
||||||
public void setId(String id) {
|
public void setId(String id) {
|
||||||
@@ -188,5 +189,11 @@ public class EvaluationModel extends BaseModel{
|
|||||||
this.cardId = cardId;
|
this.cardId = cardId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Map<String, Object> getLoanInfoMap() {
|
||||||
|
return loanInfoMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLoanInfoMap(Map<String, Object> loanInfoMap) {
|
||||||
|
this.loanInfoMap = loanInfoMap;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,4 +46,6 @@ public class Message {
|
|||||||
public static final String PAY_PASSWORD_ERROR = "支付密码错误,请重新输入";
|
public static final String PAY_PASSWORD_ERROR = "支付密码错误,请重新输入";
|
||||||
|
|
||||||
public static final String NOT_LOGIN = "请先进行登录";
|
public static final String NOT_LOGIN = "请先进行登录";
|
||||||
|
|
||||||
|
public static final String LOGIN_UPPSW = "ÔʼÃÜÂëÊäÈë´íÎó";
|
||||||
}
|
}
|
||||||
|
|||||||
+181
@@ -0,0 +1,181 @@
|
|||||||
|
package com.fangjia.open.model.weixin;
|
||||||
|
|
||||||
|
import com.fangjia.open.model.BaseModel;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 建行租房估值
|
||||||
|
*
|
||||||
|
* @author shenjian
|
||||||
|
* @since 2021/4/7
|
||||||
|
*/
|
||||||
|
public class PropertyEvaluationModel extends BaseModel {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 城市
|
||||||
|
*/
|
||||||
|
private String cityName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 区域(新版本估价)
|
||||||
|
**/
|
||||||
|
private String district;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 小区名(新版本)
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
/**
|
||||||
|
* 地址
|
||||||
|
*/
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 面积
|
||||||
|
*/
|
||||||
|
private double size;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所在楼层
|
||||||
|
*/
|
||||||
|
private Integer floor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总楼层
|
||||||
|
*/
|
||||||
|
private Integer height;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 室数
|
||||||
|
*/
|
||||||
|
private Integer room;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 厅数
|
||||||
|
*/
|
||||||
|
private Integer hall;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 卫数
|
||||||
|
*/
|
||||||
|
private Integer toilet;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 朝向
|
||||||
|
*/
|
||||||
|
private String direction;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 装修情况
|
||||||
|
*/
|
||||||
|
private String fitment;
|
||||||
|
|
||||||
|
private Map<String, Object> result;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getCityName() {
|
||||||
|
return cityName;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setCityName(String cityName) {
|
||||||
|
this.cityName = cityName;
|
||||||
|
}
|
||||||
|
|
||||||
|
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 String getAddress() {
|
||||||
|
return address;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAddress(String address) {
|
||||||
|
this.address = address;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getSize() {
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSize(double size) {
|
||||||
|
this.size = size;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getFloor() {
|
||||||
|
return floor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFloor(Integer floor) {
|
||||||
|
this.floor = floor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getHeight() {
|
||||||
|
return height;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHeight(Integer height) {
|
||||||
|
this.height = height;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getRoom() {
|
||||||
|
return room;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRoom(Integer room) {
|
||||||
|
this.room = room;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getHall() {
|
||||||
|
return hall;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHall(Integer hall) {
|
||||||
|
this.hall = hall;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getToilet() {
|
||||||
|
return toilet;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setToilet(Integer toilet) {
|
||||||
|
this.toilet = toilet;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDirection() {
|
||||||
|
return direction;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDirection(String direction) {
|
||||||
|
this.direction = direction;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFitment() {
|
||||||
|
return fitment;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFitment(String fitment) {
|
||||||
|
this.fitment = fitment;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<String, Object> getResult() {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setResult(Map<String, Object> result) {
|
||||||
|
this.result = result;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -14,9 +14,15 @@ public class UserModel extends BaseModel {
|
|||||||
private String weiXinId;
|
private String weiXinId;
|
||||||
private String username;
|
private String username;
|
||||||
private String pass;
|
private String pass;
|
||||||
|
private String pass1;
|
||||||
|
private String pass2;
|
||||||
private String code;
|
private String code;
|
||||||
private List<String> citys;
|
private List<String> citys;
|
||||||
|
|
||||||
|
private String appId;//²âÊÔ
|
||||||
|
private String appSecret;//²âÊÔ
|
||||||
|
private String sid;//²âÊÔ
|
||||||
|
|
||||||
public List<String> getCitys() {
|
public List<String> getCitys() {
|
||||||
return citys;
|
return citys;
|
||||||
}
|
}
|
||||||
@@ -80,4 +86,44 @@ public class UserModel extends BaseModel {
|
|||||||
public void setCode(String code) {
|
public void setCode(String code) {
|
||||||
this.code = code;
|
this.code = code;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getAppId() {
|
||||||
|
return appId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAppId(String appId) {
|
||||||
|
this.appId = appId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAppSecret() {
|
||||||
|
return appSecret;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAppSecret(String appSecret) {
|
||||||
|
this.appSecret = appSecret;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSid() {
|
||||||
|
return sid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSid(String sid) {
|
||||||
|
this.sid = sid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPass1() {
|
||||||
|
return pass1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPass1(String pass1) {
|
||||||
|
this.pass1 = pass1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPass2() {
|
||||||
|
return pass2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPass2(String pass2) {
|
||||||
|
this.pass2 = pass2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -144,4 +144,43 @@ public class InsidePolygon {
|
|||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static boolean isPtInPoly (double ALon , double ALat , List<Point> ps) {
|
||||||
|
int iSum, iCount, iIndex;
|
||||||
|
double dLon1 = 0, dLon2 = 0, dLat1 = 0, dLat2 = 0, dLon;
|
||||||
|
if (ps.size() < 3) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
iSum = 0;
|
||||||
|
iCount = ps.size();
|
||||||
|
for (iIndex = 0; iIndex<iCount;iIndex++) {
|
||||||
|
if (iIndex == iCount - 1) {
|
||||||
|
dLon1 = ps.get(iIndex).getLon();
|
||||||
|
dLat1 = ps.get(iIndex).getLat();
|
||||||
|
dLon2 = ps.get(0).getLon();
|
||||||
|
dLat2 = ps.get(0).getLat();
|
||||||
|
} else {
|
||||||
|
dLon1 = ps.get(iIndex).getLon();
|
||||||
|
dLat1 = ps.get(iIndex).getLat();
|
||||||
|
dLon2 = ps.get(iIndex + 1).getLon();
|
||||||
|
dLat2 = ps.get(iIndex + 1).getLat();
|
||||||
|
}
|
||||||
|
// 以下语句判断A点是否在边的两端点的水平平行线之间,在则可能有交点,开始判断交点是否在左射线上
|
||||||
|
if (((ALat >= dLat1) && (ALat < dLat2)) || ((ALat >= dLat2) && (ALat < dLat1))) {
|
||||||
|
if (Math.abs(dLat1 - dLat2) > 0) {
|
||||||
|
//得到 A点向左射线与边的交点的x坐标:
|
||||||
|
dLon = dLon1 - ((dLon1 - dLon2) * (dLat1 - ALat) ) / (dLat1 - dLat2);
|
||||||
|
// 如果交点在A点左侧(说明是做射线与 边的交点),则射线与边的全部交点数加一:
|
||||||
|
if (dLon < ALon) {
|
||||||
|
iSum++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ((iSum % 2) != 0) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,116 @@
|
|||||||
|
package com.fangjia.open.util;
|
||||||
|
|
||||||
|
import java.awt.geom.Point2D;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class InsidePolygon2 {
|
||||||
|
/**
|
||||||
|
* 判断当前位置是否在多边形区域内
|
||||||
|
*
|
||||||
|
* @param checkPoint 当前经纬度
|
||||||
|
* @param areaAround 围栏范围
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static boolean checkIsInPolygon(Point checkPoint, List<Point> areaAround) {
|
||||||
|
Point2D.Double point = new Point2D.Double(checkPoint.getLat(), checkPoint.getLon());
|
||||||
|
List<Point2D.Double> pointList = new ArrayList<Point2D.Double>();
|
||||||
|
for (Point everyPoint : areaAround) {
|
||||||
|
Point2D.Double polygonPoint = new Point2D.Double(everyPoint.getLat(), everyPoint.getLon());
|
||||||
|
pointList.add(polygonPoint);
|
||||||
|
}
|
||||||
|
return checkIsPtInPoly(point, pointList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断点是否在多边形内,如果点位于多边形的顶点或边上,也算做点在多边形内,直接返回true
|
||||||
|
*
|
||||||
|
* @param point 检测点
|
||||||
|
* @param pts 多边形的顶点
|
||||||
|
* @return 点在多边形内返回true, 否则返回false
|
||||||
|
*/
|
||||||
|
public static boolean checkIsPtInPoly(Point2D.Double point, List<Point2D.Double> pts) {
|
||||||
|
int N = pts.size();
|
||||||
|
//如果点位于多边形的顶点或边上,也算做点在多边形内,直接返回true
|
||||||
|
boolean boundOrVertex = true;
|
||||||
|
//cross points count of x
|
||||||
|
int intersectCount = 0;
|
||||||
|
//浮点类型计算时候与0比较时候的容差
|
||||||
|
double precision = 2e-10;
|
||||||
|
//neighbour bound vertices
|
||||||
|
Point2D.Double p1, p2;
|
||||||
|
//当前点
|
||||||
|
Point2D.Double p = point;
|
||||||
|
//left vertex
|
||||||
|
p1 = pts.get(0);
|
||||||
|
//check all rays
|
||||||
|
for (int i = 1; i <= N; ++i) {
|
||||||
|
if (p.equals(p1)) {
|
||||||
|
//p is an vertex
|
||||||
|
return boundOrVertex;
|
||||||
|
}
|
||||||
|
//right vertex
|
||||||
|
p2 = pts.get(i % N);
|
||||||
|
//ray is outside of our interests
|
||||||
|
if (p.x < Math.min(p1.x, p2.x) || p.x > Math.max(p1.x, p2.x)) {
|
||||||
|
p1 = p2;
|
||||||
|
//next ray left point
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
//ray is crossing over by the algorithm (common part of)
|
||||||
|
if (p.x > Math.min(p1.x, p2.x) && p.x < Math.max(p1.x, p2.x)) {
|
||||||
|
//x is before of ray
|
||||||
|
if (p.y <= Math.max(p1.y, p2.y)) {
|
||||||
|
//overlies on a horizontal ray
|
||||||
|
if (p1.x == p2.x && p.y >= Math.min(p1.y, p2.y)) {
|
||||||
|
return boundOrVertex;
|
||||||
|
}
|
||||||
|
//ray is vertical
|
||||||
|
if (p1.y == p2.y) {
|
||||||
|
//overlies on a vertical ray
|
||||||
|
if (p1.y == p.y) {
|
||||||
|
return boundOrVertex;
|
||||||
|
//before ray
|
||||||
|
} else {
|
||||||
|
++intersectCount;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
//cross point on the left side
|
||||||
|
//cross point of y
|
||||||
|
double xinters = (p.x - p1.x) * (p2.y - p1.y) / (p2.x - p1.x) + p1.y;
|
||||||
|
//overlies on a ray
|
||||||
|
if (Math.abs(p.y - xinters) < precision) {
|
||||||
|
return boundOrVertex;
|
||||||
|
}
|
||||||
|
//before ray
|
||||||
|
if (p.y < xinters) {
|
||||||
|
++intersectCount;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
//special case when ray is crossing through the vertex
|
||||||
|
//p crossing over p2
|
||||||
|
if (p.x == p2.x && p.y <= p2.y) {
|
||||||
|
//next vertex
|
||||||
|
Point2D.Double p3 = pts.get((i + 1) % N);
|
||||||
|
//p.x lies between p1.x & p3.x
|
||||||
|
if (p.x >= Math.min(p1.x, p3.x) && p.x <= Math.max(p1.x, p3.x)) {
|
||||||
|
++intersectCount;
|
||||||
|
} else {
|
||||||
|
intersectCount += 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//next ray left point
|
||||||
|
p1 = p2;
|
||||||
|
}
|
||||||
|
//偶数在多边形外
|
||||||
|
if (intersectCount % 2 == 0) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
//奇数在多边形内
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,174 @@
|
|||||||
|
package com.fangjia.open.util;
|
||||||
|
|
||||||
|
import com.fangjia.core.util.DataUtil;
|
||||||
|
import com.fangjia.service.mongo.fangjia.FileService;
|
||||||
|
import org.apache.batik.transcoder.Transcoder;
|
||||||
|
import org.apache.batik.transcoder.TranscoderException;
|
||||||
|
import org.apache.batik.transcoder.TranscoderInput;
|
||||||
|
import org.apache.batik.transcoder.TranscoderOutput;
|
||||||
|
import org.apache.batik.transcoder.image.JPEGTranscoder;
|
||||||
|
import org.apache.batik.transcoder.image.PNGTranscoder;
|
||||||
|
import org.bson.types.ObjectId;
|
||||||
|
import org.jfree.chart.ChartFactory;
|
||||||
|
import org.jfree.chart.ChartUtilities;
|
||||||
|
import org.jfree.chart.JFreeChart;
|
||||||
|
import org.jfree.chart.axis.NumberAxis;
|
||||||
|
import org.jfree.chart.plot.CategoryPlot;
|
||||||
|
import org.jfree.chart.plot.PlotOrientation;
|
||||||
|
import org.jfree.chart.renderer.category.LineAndShapeRenderer;
|
||||||
|
import org.jfree.data.category.DefaultCategoryDataset;
|
||||||
|
|
||||||
|
import java.awt.*;
|
||||||
|
import java.io.*;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 折线图绘图工具类
|
||||||
|
*
|
||||||
|
* @author shenjian
|
||||||
|
* @since 2021/4/9
|
||||||
|
*/
|
||||||
|
public class LineChartsUtils {
|
||||||
|
|
||||||
|
|
||||||
|
public static void main(String[] args) throws IOException {
|
||||||
|
File file = new File("d://test.png");
|
||||||
|
List<String> columns = new ArrayList<String>();
|
||||||
|
columns.add("2020-02");
|
||||||
|
columns.add("2020-03");
|
||||||
|
columns.add("2020-04");
|
||||||
|
columns.add("2020-05");
|
||||||
|
columns.add("2020-06");
|
||||||
|
columns.add("2020-07");
|
||||||
|
columns.add("2020-08");
|
||||||
|
columns.add("2020-09");
|
||||||
|
columns.add("2020-10");
|
||||||
|
columns.add("2020-11");
|
||||||
|
columns.add("2020-12");
|
||||||
|
columns.add("2021-01");
|
||||||
|
|
||||||
|
List<Integer> values = new ArrayList<Integer>();
|
||||||
|
values.add(1000);
|
||||||
|
values.add(2000);
|
||||||
|
values.add(2000);
|
||||||
|
values.add(2000);
|
||||||
|
values.add(2000);
|
||||||
|
values.add(2000);
|
||||||
|
values.add(2000);
|
||||||
|
values.add(3000);
|
||||||
|
values.add(3000);
|
||||||
|
values.add(3000);
|
||||||
|
values.add(3000);
|
||||||
|
values.add(3000);
|
||||||
|
|
||||||
|
createChartAndSave2Png("d://test.png", "1居室", columns, values);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String createChartAndSave2Png(String path, String rowKey, List<String> columns, List<Integer> values) {
|
||||||
|
File file = new File(path);
|
||||||
|
try {
|
||||||
|
ChartUtilities.saveChartAsPNG(file, createChart(rowKey, columns, values),800,300);
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String createChartAndUpload(FileService fileService, String rowKey, List<String> columns, List<Integer> values) {
|
||||||
|
ByteArrayOutputStream os = new ByteArrayOutputStream();
|
||||||
|
try {
|
||||||
|
ChartUtilities.writeChartAsPNG(os, createChart(rowKey, columns, values),800,300);
|
||||||
|
byte[] data = os.toByteArray();
|
||||||
|
String id = new ObjectId().toString();
|
||||||
|
fileService.save(id,"o", data, "image/png", "o");
|
||||||
|
String url = "http://img0.fangjia.com/stc/fs/" + DataUtil.encodePicUrl(id, "o", "house");
|
||||||
|
|
||||||
|
return url;
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} finally {
|
||||||
|
if (os != null) {
|
||||||
|
try {
|
||||||
|
os.close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void svg2ImgTest() {
|
||||||
|
String svg = "<svg height=\"200\" xmlns=\"http://www.w3.org/2000/svg\"><polygon points=\"10,10 75,150 150,60\" style=\"fill:#63BCF7;stroke:black;stroke-width:3\"/></svg>";
|
||||||
|
String type="image/png";
|
||||||
|
String filename="svg";
|
||||||
|
if (null != type && null != svg) {
|
||||||
|
svg = svg.replaceAll(":rect", "rect");
|
||||||
|
String ext = "";
|
||||||
|
Transcoder t = null;
|
||||||
|
if (type.equals("image/png")) {
|
||||||
|
ext = "png";
|
||||||
|
t = new PNGTranscoder();
|
||||||
|
}
|
||||||
|
else if (type.equals("image/jpeg")) {
|
||||||
|
ext = "jpg";
|
||||||
|
t = new JPEGTranscoder();
|
||||||
|
}
|
||||||
|
if (null != t) {
|
||||||
|
OutputStream out = null;
|
||||||
|
try {
|
||||||
|
out = new FileOutputStream("D:\\"+filename+"."+ext);
|
||||||
|
} catch (FileNotFoundException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
TranscoderInput input = new TranscoderInput(new StringReader(svg));
|
||||||
|
TranscoderOutput output = new TranscoderOutput(out);
|
||||||
|
try{
|
||||||
|
t.transcode(input, output);
|
||||||
|
System.out.println("out");
|
||||||
|
}
|
||||||
|
catch (TranscoderException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定义图表对象
|
||||||
|
* @param rowKey 曲线名,如一居室
|
||||||
|
* @param columns 横坐标名
|
||||||
|
* @param values 纵坐标值
|
||||||
|
*/
|
||||||
|
public static JFreeChart createChart(String rowKey, List<String> columns, List<Integer> values) {
|
||||||
|
createDataset(rowKey, columns, values);
|
||||||
|
// 折线图名称, 横坐标名称, 纵坐标名称 数据水平竖直 PlotOrientation.HORIZONTAL, 水平显示图像 true, 水平显示图像 true, include legend true, tooltips false, urls
|
||||||
|
JFreeChart chart = ChartFactory.createLineChart("", "", "", createDataset(rowKey, columns, values), PlotOrientation.VERTICAL, true, true, false);
|
||||||
|
CategoryPlot plot = chart.getCategoryPlot();
|
||||||
|
plot.setRangeGridlinesVisible(false); // 是否显示格子线
|
||||||
|
plot.setBackgroundAlpha(0.3f); // 设置背景透明度
|
||||||
|
LineAndShapeRenderer renderer = (LineAndShapeRenderer) plot.getRenderer();
|
||||||
|
renderer.setSeriesPaint(0, Color.BLUE);
|
||||||
|
NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
|
||||||
|
rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
|
||||||
|
rangeAxis.setAutoRangeIncludesZero(true);
|
||||||
|
rangeAxis.setUpperMargin(0.20);
|
||||||
|
rangeAxis.setLabelAngle(Math.PI / 2.0);
|
||||||
|
return chart;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static DefaultCategoryDataset createDataset(String rowKey, List<String> columns, List<Integer> values) {
|
||||||
|
DefaultCategoryDataset dataset = new DefaultCategoryDataset();
|
||||||
|
for (int i = 0; i < columns.size(); i++) {
|
||||||
|
String column = columns.get(i);
|
||||||
|
if (values.get(i) != null) {
|
||||||
|
dataset.addValue(Double.valueOf(values.get(i)), rowKey, column);
|
||||||
|
} else {
|
||||||
|
dataset.addValue(null, rowKey, column);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return dataset;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -38,6 +38,8 @@ public class OpenApiClient {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
JSONObject matchResult = request.getJsonContent(url, params, "UTF-8");
|
JSONObject matchResult = request.getJsonContent(url, params, "UTF-8");
|
||||||
|
|
||||||
|
|
||||||
if(matchResult.getInt("code") == 200){
|
if(matchResult.getInt("code") == 200){
|
||||||
return matchResult.getJSONObject("result");
|
return matchResult.getJSONObject("result");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -406,10 +406,6 @@ public class CzbankServiceImpl implements CzbankService {
|
|||||||
evaluation.setFacilities(convertToString(fs));
|
evaluation.setFacilities(convertToString(fs));
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (StringUtils.isNotBlank(model.getInsidepos())) {
|
|
||||||
// evaluation.setInsidepos(model.getInsidepos());
|
|
||||||
// }
|
|
||||||
|
|
||||||
evaluation.setCreationDate(new Date());
|
evaluation.setCreationDate(new Date());
|
||||||
evaluation.setModificationDate(new Date());
|
evaluation.setModificationDate(new Date());
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
374548aec5ca5d3cde89978570a9627c
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
hjcJCHahWBw1Nj88
|
||||||
@@ -0,0 +1,502 @@
|
|||||||
|
<#ftl attributes={"content_type":"text/html; charset=UTF-8"}>
|
||||||
|
<#compress>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
|
<meta name="referrer" content="no-referrer"/>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
|
||||||
|
<title>租金报告中心</title>
|
||||||
|
<meta name="viewport" content="initial-scale=1, maximum-scale=1"/>
|
||||||
|
<link rel="shortcut icon" href="/favicon.ico"/>
|
||||||
|
<meta name="apple-mobile-web-app-capable" content="yes"/>
|
||||||
|
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="https://g.alicdn.com/msui/sm/0.6.2/css/sm.css"/>
|
||||||
|
<link rel="stylesheet" href="../static/style/wx.css"/>
|
||||||
|
<style type="text/css">
|
||||||
|
body {
|
||||||
|
overflow: hidden;
|
||||||
|
overflow-y: scroll;
|
||||||
|
background: white;
|
||||||
|
}
|
||||||
|
.main {
|
||||||
|
margin: 4px 8px 4px 8px;
|
||||||
|
background: white;
|
||||||
|
}
|
||||||
|
.title {
|
||||||
|
position: relative;
|
||||||
|
color: #1E90FF;
|
||||||
|
font-size: 20px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.title1 {
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #1E90FF;
|
||||||
|
margin-top: 2px;
|
||||||
|
margin-bottom: 2px;
|
||||||
|
}
|
||||||
|
.p {
|
||||||
|
font-size: 18px;
|
||||||
|
line-height: 30px;
|
||||||
|
}
|
||||||
|
.table {
|
||||||
|
width: 100%;
|
||||||
|
overflow-y: hidden;
|
||||||
|
overflow-x: scroll
|
||||||
|
}
|
||||||
|
.inline {
|
||||||
|
width: 550px;
|
||||||
|
border-spacing: 0;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
.table .inline th {
|
||||||
|
color: #999;
|
||||||
|
font-weight: normal;
|
||||||
|
line-height: 30px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
.download {
|
||||||
|
float: right;
|
||||||
|
color: #3d4145;
|
||||||
|
border: solid 1px #333;
|
||||||
|
order-radius: 3px;
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 1rem;
|
||||||
|
width: 43px;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class="main">
|
||||||
|
<div class="title">
|
||||||
|
估值报告<span class="download" id="download">下载</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="title1">1 评估申明</div>
|
||||||
|
<div class="p">建设银行遵循中立、客观、公正的原则,通过周密细致的测算,评估求得分析对象的房地产市场参考。</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="title1">2 评估时间</div>
|
||||||
|
<div class="p">
|
||||||
|
<span name="cal_date"></span><br/>
|
||||||
|
<b>评估结果</b><br/>
|
||||||
|
<b>楼盘名称</b>:<span name="name"></span><br/>
|
||||||
|
<b>楼盘地址</b>:<span name="address"></span><br/>
|
||||||
|
<b>租金估值(RMB)</b>:<span name="totalPrice"></span>元/月<br/>
|
||||||
|
<b>大写(人民币)</b>:<span name="totalPriceUpper"></span><br/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="title1">3 报告有效期</div>
|
||||||
|
<div class="p">本报告在市场无较大波动的情况下,该评估价格在报告出具起三个月内有效。</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="title1">4 房产状况</div>
|
||||||
|
<div class="p">
|
||||||
|
<b>详细地址</b>:<span name="addressDetail"></span><br/>
|
||||||
|
<b>楼盘名称</b>:<span name="name"></span><br/>
|
||||||
|
<b>室号</b>:<span name="roomNumber"></span><br/>
|
||||||
|
<b>朝向</b>:<span name="direction"></span><br/>
|
||||||
|
<b>建筑面积</b>:<span name="size"></span>平米<br/>
|
||||||
|
<b>所在楼层</b>:<span name="floor"></span> 层(共<span name="height"></span>层)<br/>
|
||||||
|
<b>电梯配套</b>:<span name="hasLift"></span><br/>
|
||||||
|
<b>装修情况</b>:<span name="fitment"></span><br/>
|
||||||
|
<b>建筑年代</b>:<span name="buildYear"></span><br/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="title1">5 历史租金</div>
|
||||||
|
<div class="charts" id="districtRentTrendsChart"></div>
|
||||||
|
<input type="hidden" id="chartImgUrl"/>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="title1">6 已租房源</div>
|
||||||
|
<div class="p table">
|
||||||
|
<table class="inline">
|
||||||
|
<thead>
|
||||||
|
<tr class="bg">
|
||||||
|
<th class="th01">城市</th>
|
||||||
|
<th>区域</th>
|
||||||
|
<th>小区名</th>
|
||||||
|
<th>成交价</th>
|
||||||
|
<th>面积</th>
|
||||||
|
<th>室</th>
|
||||||
|
<th>厅</th>
|
||||||
|
<th>装修</th>
|
||||||
|
<th>成交日期</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody id="trades">
|
||||||
|
<td colspan="6">暂无数据</td>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="title1">7 样本参考</div>
|
||||||
|
<div class="p table">
|
||||||
|
<table class="inline">
|
||||||
|
<thead>
|
||||||
|
<tr class="bg">
|
||||||
|
<th class="th01">城市</th>
|
||||||
|
<th>区域</th>
|
||||||
|
<th>小区名</th>
|
||||||
|
<th>租金</th>
|
||||||
|
<th>面积</th>
|
||||||
|
<th>室</th>
|
||||||
|
<th>厅</th>
|
||||||
|
<th>装修</th>
|
||||||
|
<th>成交日期</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody id="referenceHouses">
|
||||||
|
<td colspan="6">暂无数据</td>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="title1">8 周边同类小区租金</div>
|
||||||
|
<div class="p table">
|
||||||
|
<table class="inline">
|
||||||
|
<thead>
|
||||||
|
<tr class="bg">
|
||||||
|
<th class="th01">城市</th>
|
||||||
|
<th>区域</th>
|
||||||
|
<th>小区名</th>
|
||||||
|
<th>平米租金</th>
|
||||||
|
<th>室</th>
|
||||||
|
<th>厅</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody id="sameDistricts">
|
||||||
|
<tr class="">
|
||||||
|
<td colspan="6">暂无数据</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script type='text/javascript' src='https://g.alicdn.com/sj/lib/zepto/zepto.js' charset='utf-8'></script>
|
||||||
|
<script type='text/javascript' src='https://g.alicdn.com/msui/sm/0.6.2/js/sm.js' charset='utf-8'></script>
|
||||||
|
<!-- 暂时注释 -->
|
||||||
|
<#-- <script type="text/javascript" src="https://cdn.highcharts.com.cn/highcharts/9.0.1/highcharts.js"></script>-->
|
||||||
|
<#-- <script type="text/javascript" src="https://code.highcharts.com.cn/highcharts/modules/exporting.js"></script>-->
|
||||||
|
|
||||||
|
<script src="https://cdn.highcharts.com.cn/highcharts/highcharts.js"></script>
|
||||||
|
<script src="https://cdn.highcharts.com.cn/highcharts/modules/exporting.js"></script>
|
||||||
|
<script src="https://cdn.highcharts.com.cn/highcharts/modules/series-label.js"></script>
|
||||||
|
<script src="https://cdn.highcharts.com.cn/highcharts/modules/oldie.js"></script>
|
||||||
|
<script src="https://code.highcharts.com.cn/highcharts-plugins/highcharts-zh_CN.js"></script>
|
||||||
|
|
||||||
|
<script type='text/javascript' src='../static/js/wx.js' charset='utf-8'></script>
|
||||||
|
<script type="text/javascript" src="../static/js/trend-charts.js"></script>
|
||||||
|
<script src="https://html2canvas.hertzen.com/dist/html2canvas.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
let chart;
|
||||||
|
$("#download").bind('click', function(){
|
||||||
|
$.toast("报告下载中,请耐心等待");
|
||||||
|
$("#download").css('color', 'blue')
|
||||||
|
let chartImgUrl = $('#chartImgUrl').val();
|
||||||
|
window.location.href = "download?city="+params.city+"&district="+params.district+"&name="+params.name+"&address="+params.address+"&addressDetail="+params.addressDetail+"&size="+params.size+"&floor="+params.floor
|
||||||
|
+"&height="+params.height+"&room="+params.roomNumber+"&hall="+params.hall+"&toilet="+params.toilet+"&direction="+params.direction+"&fitment="+params.fitment+"&chartImgUrl=" + chartImgUrl + "&hasLift=" + (params.hasLift == 'true' ? '有' : '无');
|
||||||
|
});
|
||||||
|
|
||||||
|
// 后台传参过来用
|
||||||
|
let params = {
|
||||||
|
'city': sessionStorage.city,
|
||||||
|
'district': sessionStorage.district,
|
||||||
|
'name': sessionStorage.name,
|
||||||
|
'address': sessionStorage.address,
|
||||||
|
'size': sessionStorage.size,
|
||||||
|
'floor': sessionStorage.floor,
|
||||||
|
'height': sessionStorage.height,
|
||||||
|
'room': sessionStorage.room,
|
||||||
|
'hall': sessionStorage.hall,
|
||||||
|
'toilet': sessionStorage.toilet,
|
||||||
|
'direction': sessionStorage.direction,
|
||||||
|
'fitment': sessionStorage.fitment,
|
||||||
|
'hasLift': sessionStorage.hasLift,
|
||||||
|
'roomNumber': sessionStorage.roomNumber,
|
||||||
|
'addressDetail': sessionStorage.addressDetail
|
||||||
|
};
|
||||||
|
|
||||||
|
function init() {
|
||||||
|
// let charts = {}
|
||||||
|
// charts.xData = ["2020-08", "2020-09", "2020-10", "2020-11", "2020-12", "2021-01", "2021-02", "2021-03", "2021-04", "2021-05", "2021-06", "2021-07"]
|
||||||
|
// charts.series = [{
|
||||||
|
// name: '1居室',
|
||||||
|
// data: [3800, 3900, 4000, 4100, 4200, 4200, 4200, 4200]
|
||||||
|
// }];
|
||||||
|
// createChartNow('districtRentTrendsChart', charts, true);
|
||||||
|
// return false;
|
||||||
|
|
||||||
|
$('span[name="hasLift"]').text(params.hasLift == 'true' ? '有' : '无')
|
||||||
|
$('span[name="roomNumber"]').text(params.roomNumber != '' ? params.roomNumber + '室' : '')
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
// 注意需要加..
|
||||||
|
url: '../property/rentReport',
|
||||||
|
data: params,
|
||||||
|
dataType:"json",
|
||||||
|
type:"post",
|
||||||
|
success:function(data){
|
||||||
|
|
||||||
|
if(data.code == 200){
|
||||||
|
let result = data.result;
|
||||||
|
// 评估时间
|
||||||
|
$('span[name="cal_date"]').text(result.cal_date)
|
||||||
|
$('span[name="name"]').text(result.name);
|
||||||
|
$('span[name="address"]').text(result.address);
|
||||||
|
$('span[name="addressDetail"]').text(params.addressDetail);
|
||||||
|
$('span[name="totalPrice"]').text(result.totalPrice)
|
||||||
|
$('span[name="totalPriceUpper"]').text(result.totalPriceUpper)
|
||||||
|
|
||||||
|
// 房产状况
|
||||||
|
//$('span[name="room"]').text(result.room)
|
||||||
|
$('span[name="floor"]').text(result.floor)
|
||||||
|
$('span[name="buildYear"]').text(result.buildYear)
|
||||||
|
$('span[name="direction"]').text(result.direction)
|
||||||
|
$('span[name="size"]').text(result.size)
|
||||||
|
$('span[name="height"]').text(result.height)
|
||||||
|
$('span[name="fitment"]').text(result.fitment)
|
||||||
|
}else{
|
||||||
|
$.toast(data.msg);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function () {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
// 注意需要加..
|
||||||
|
url: '../property/rentReport2',
|
||||||
|
data: params,
|
||||||
|
dataType: "json",
|
||||||
|
type: "post",
|
||||||
|
success: function (data) {
|
||||||
|
if (data.code == 200) {
|
||||||
|
let result = data.result;
|
||||||
|
//历史租金
|
||||||
|
var charts = {}
|
||||||
|
if (result.trends.distMap[params.room] == undefined) {
|
||||||
|
console.log("返回历史租金,不存在" + params.room + "居室数据")
|
||||||
|
$('#districtRentTrendsChart').empty();
|
||||||
|
$('#districtRentTrendsChart').removeClass("charts");
|
||||||
|
$('#districtRentTrendsChart').addClass("p table");
|
||||||
|
$('#districtRentTrendsChart').append('<table style="width: 300px"><tr colspan="6">暂无数据<td></tr></table>');
|
||||||
|
} else {
|
||||||
|
var arr = [];
|
||||||
|
result.trends.times.forEach(function (d) {
|
||||||
|
var price = result.trends.distMap[params.room][d];
|
||||||
|
if (price != undefined) {
|
||||||
|
arr.push(price);
|
||||||
|
} else {
|
||||||
|
arr.push('');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
charts.series = [{'name': params.room + '居室', 'data': arr}]; // 纵坐标
|
||||||
|
charts.xData = result.trends.times; // 横坐标值
|
||||||
|
createChartNow('districtRentTrendsChart', charts, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
//已租房源
|
||||||
|
var trades = result.trades;
|
||||||
|
if (trades && trades.length > 0) {
|
||||||
|
$('#trades').empty();
|
||||||
|
trades.forEach(function(d){
|
||||||
|
var fitment = d.fitment != undefined ? d.fitment : '';
|
||||||
|
var hall = d.hall != undefined ? d.hall : '';
|
||||||
|
$('#trades').append('<tr class="bg"> \
|
||||||
|
<td class="td01">' + d.city + '</td> \
|
||||||
|
<td class="td02">' + d.region + '</td> \
|
||||||
|
<td>' + d.districtName + '</td> \
|
||||||
|
<td>' + (d.totalPrice != undefined ? d.totalPrice : '') + '</td> \
|
||||||
|
<td>' + (d.area != undefined ? d.area : '') + '</td> \
|
||||||
|
<td>' + (d.room != undefined ? d.room : '') + '</td> \
|
||||||
|
<td>' + hall + '</td> \
|
||||||
|
<td>' + fitment + '</td> \
|
||||||
|
<td>' + formatDate(d.tradeDate) + '</td> \
|
||||||
|
</tr>');
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 样本参考
|
||||||
|
var referenceHouses = result.houses;
|
||||||
|
if (referenceHouses && referenceHouses.length > 0) {
|
||||||
|
$('#referenceHouses').empty();
|
||||||
|
referenceHouses.forEach(function(d){
|
||||||
|
var fitment = d.fitment != undefined ? d.fitment : '';
|
||||||
|
var date = (d.pDate + '').substring(0, 4) + "-" + (d.pDate + '').substring(4, 6) + "-" + (d.pDate + '').substring(6, 8)
|
||||||
|
$('#referenceHouses').append('<tr class="bg"> \
|
||||||
|
<td class="td01">' + d.city + '</td> \
|
||||||
|
<td class="td02">' + d.region + '</td> \
|
||||||
|
<td>' + d.districtName + '</td> \
|
||||||
|
<td>' + (d.totalPrice != undefined ? d.totalPrice : '') + '</td> \
|
||||||
|
<td>' + (d.area != undefined ? d.area : '') + '</td> \
|
||||||
|
<td>' + (d.room != undefined ? d.room : '') + '</td> \
|
||||||
|
<td>' + (d.hall != undefined ? d.hall : '')+ '</td> \
|
||||||
|
<td>' + fitment + '</td> \
|
||||||
|
<td>' + date + '</td> \
|
||||||
|
</tr>');
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// 同类小区租金
|
||||||
|
var sameDistricts = result.districts;
|
||||||
|
if (sameDistricts && sameDistricts.length > 0) {
|
||||||
|
$('#sameDistricts').empty()
|
||||||
|
sameDistricts.forEach(function(d){
|
||||||
|
$('#sameDistricts').append('<tr class="bg"> \
|
||||||
|
<td class="td01">' + d.city + '</td> \
|
||||||
|
<td class="td02">' + d.region + '</td> \
|
||||||
|
<td>' + (d.districtName != undefined ? d.districtName:'' ) + '</td> \
|
||||||
|
<td>' + (d.sqAvgPrice != undefined ? d.sqAvgPrice:'') + '</td> \
|
||||||
|
<td>' + (d.room != undefined ? d.room:'') + '</td> \
|
||||||
|
<td>1</td> \
|
||||||
|
</tr>');
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
var formatDate = function (dateStr) {
|
||||||
|
var date = new Date(dateStr);
|
||||||
|
var y = date.getFullYear();
|
||||||
|
var m = date.getMonth() + 1;
|
||||||
|
m = m < 10 ? ('0' + m) : m;
|
||||||
|
var d = date.getDate();
|
||||||
|
d = d < 10 ? ('0' + d) : d;
|
||||||
|
return y + '-' + m + '-' + d;
|
||||||
|
};
|
||||||
|
function createChartNow(renderId, data, showTradeCount) {
|
||||||
|
if(data == null || data == 'undefined' || typeof(data) == undefined) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(data.series == 'undefined' || data.series.length == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var yaxis = [{
|
||||||
|
title: {
|
||||||
|
enable: false,
|
||||||
|
text: ''
|
||||||
|
},
|
||||||
|
offset : -5,
|
||||||
|
labels: {
|
||||||
|
formatter: function() {
|
||||||
|
return this.value + "元";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
|
||||||
|
if(showTradeCount) {
|
||||||
|
yaxis.push({
|
||||||
|
title: {
|
||||||
|
enable: false,
|
||||||
|
text: ''
|
||||||
|
},
|
||||||
|
labels: {
|
||||||
|
formatter: function() {
|
||||||
|
return this.value +'套';
|
||||||
|
},
|
||||||
|
style: {
|
||||||
|
color: '#4572A7'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
opposite: true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
var config = {yaxis : yaxis};
|
||||||
|
createHighChartNow(renderId, data, config);
|
||||||
|
};
|
||||||
|
|
||||||
|
function createHighChartNow(renderId, data, config) {
|
||||||
|
chart = new Highcharts.Chart({
|
||||||
|
credits:{
|
||||||
|
enabled:true,
|
||||||
|
text: '',
|
||||||
|
href: "",
|
||||||
|
position: {
|
||||||
|
align: 'center',
|
||||||
|
verticalAlign: 'top',
|
||||||
|
x: 0,
|
||||||
|
y: 25
|
||||||
|
},
|
||||||
|
itemStyle: {
|
||||||
|
cursor: 'pointer'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
chart: {
|
||||||
|
renderTo: renderId,
|
||||||
|
type: 'spline'
|
||||||
|
},
|
||||||
|
exporting: {
|
||||||
|
enabled: false
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
text: data.title,
|
||||||
|
floating: false,
|
||||||
|
align: 'center',
|
||||||
|
x : 0,
|
||||||
|
y : 10
|
||||||
|
},
|
||||||
|
legend: {
|
||||||
|
align: 'center',
|
||||||
|
verticalAlign: 'bottom'
|
||||||
|
},
|
||||||
|
xAxis: {
|
||||||
|
type: 'datetime',
|
||||||
|
dateTimeLabelFormats: {
|
||||||
|
day: '%m月%d',
|
||||||
|
week: '%m月%d',
|
||||||
|
month: '%Y.%m',
|
||||||
|
year: '%Y-%m'
|
||||||
|
},
|
||||||
|
categories: data.xData
|
||||||
|
},
|
||||||
|
yAxis: config.yaxis,
|
||||||
|
series: data.series,
|
||||||
|
tooltip: {
|
||||||
|
formatter: function() {
|
||||||
|
return this.x +'<br/>'+ this.series.name+ ": <span style='color:#F50;font-weight: bold;'>"+ this.y +'</span>元/平米';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
saveHighChartImg();
|
||||||
|
};
|
||||||
|
|
||||||
|
function saveHighChartImg() {
|
||||||
|
var svg = chart.getSVG();
|
||||||
|
$.ajax({
|
||||||
|
// 注意需要加..
|
||||||
|
url: "saveHighChartAsImage",
|
||||||
|
data: {
|
||||||
|
svg:svg
|
||||||
|
},
|
||||||
|
dataType: "json",
|
||||||
|
type: "post",
|
||||||
|
success: function (ret) {
|
||||||
|
if (ret.address != null) {
|
||||||
|
$('#chartImgUrl').val(ret.address)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
$(function () {
|
||||||
|
init();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
</#compress>
|
||||||
@@ -0,0 +1,209 @@
|
|||||||
|
<#ftl attributes={"content_type":"text/html; charset=UTF-8"}>
|
||||||
|
<#compress>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
|
<meta name="referrer" content="no-referrer"/>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
|
||||||
|
<title>租金报告中心</title>
|
||||||
|
<meta name="viewport" content="initial-scale=1, maximum-scale=1"/>
|
||||||
|
<link rel="shortcut icon" href="/favicon.ico"/>
|
||||||
|
<meta name="apple-mobile-web-app-capable" content="yes"/>
|
||||||
|
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="https://g.alicdn.com/msui/sm/0.6.2/css/sm.css"/>
|
||||||
|
<link rel="stylesheet" href="../static/style/wx.css"/>
|
||||||
|
<link rel="stylesheet" href="../static/style/report.css"/>
|
||||||
|
<style type="text/css">
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class="content">
|
||||||
|
<div class="t1" style="text-align:center;background:none">
|
||||||
|
估值报告
|
||||||
|
</div>
|
||||||
|
<div class="t1">
|
||||||
|
<em>1</em>估价结果
|
||||||
|
</div>
|
||||||
|
<div class="st1"><em>1.1</em>评估申明:</div>
|
||||||
|
<div class="text1">建设银行遵循中立、客观、公正的原则,通过周密细致的测算,评估求得分析对象的房<br/>地产市场参考。</div>
|
||||||
|
|
||||||
|
<div class="st1"><em>1.2</em>评估时间:</div>
|
||||||
|
<div class="text1"><#if result.cal_date??>${result.cal_date}</#if></div>
|
||||||
|
<div class="st1"><em>1.3</em>评估结果:</div>
|
||||||
|
<div class="text2">
|
||||||
|
<b>楼盘名称</b>:<#if result.name??>${result.name}</#if><br/><br/>
|
||||||
|
<b>楼盘地址</b>:<#if result.address??>${result.address}</#if><br/><br/>
|
||||||
|
<b>租金估值(RMB)</b>:<#if result.totalPrice??>${result.totalPrice}</#if>元/月<br/><br/>
|
||||||
|
<b>大写(人民币)</b>:<#if result.totalPriceUpper??>${result.totalPriceUpper}</#if><br/><br/>
|
||||||
|
</div>
|
||||||
|
<div class="st1"><em>1.4</em>报告有效期:</div>
|
||||||
|
<div class="text1" style="margin-bottom: 30px">本报告在市场无较大波动的情况下,该评估价格在报告出具起三个月内有效。</div>
|
||||||
|
<div class="t1"><em>2</em>房产状况</div>
|
||||||
|
<div class="c1">
|
||||||
|
<table class="distTab" width="700" border="0" cellspacing="0" cellpadding="0">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td class="textTd" style="width: 15%;">楼盘名称</td>
|
||||||
|
<td class="textRight1" style="width: 35%;"><#if result.name??>${result.name}</#if></td>
|
||||||
|
<td class="textTd" style="width: 15%;">地址</td>
|
||||||
|
<td class="textRight2" colspan="3" style="width: 35%;"><#if result.addressDetail??>${result.addressDetail}</#if></td>
|
||||||
|
</tr>
|
||||||
|
<tr class="tdbg">
|
||||||
|
<td class="textTd">室号</td>
|
||||||
|
<td class="textRight1"><#if result.room??>${result.room + '室'}</#if></td>
|
||||||
|
<td class="textTd">朝向</td>
|
||||||
|
<td class="textRight2" colspan="3"><#if result.direction??>${result.direction}</#if></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="textTd" style="width: 15%;">建筑面积</td>
|
||||||
|
<td class="textRight1" style="width: 35%;"><#if result.size??>${result.size}</#if>平米</td>
|
||||||
|
<td class="textTd" style="width: 15%;">所在楼层</td>
|
||||||
|
<td class="textRight2" colspan="3" style="width: 35%;"><#if result.floor??>${result.floor}</#if> 层(共<#if result.height??>${result.height}</#if>层)</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="tdbg">
|
||||||
|
<td class="textTd">电梯配套</td>
|
||||||
|
<td class="textRight1"><#if result.hasLift??>${result.hasLift}</#if></td>
|
||||||
|
<td class="textTd">装修情况</td>
|
||||||
|
<td class="textRight2" colspan="3"><#if result.fitment??>${result.fitment}</#if></td>
|
||||||
|
</tr>
|
||||||
|
<tr class="tdbg">
|
||||||
|
<td class="textTd">建筑年代</td>
|
||||||
|
<td class="textRight1"><#if result.buildYear??>${result.buildYear}</#if></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="t1">
|
||||||
|
<em>3</em>历史租金
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<#if result.tradesImgUrl??>
|
||||||
|
<#-- <img width="800px" height="300px" src="../static/images/test.png"></img>-->
|
||||||
|
<img width="600px" height="300px" src="${result.tradesImgUrl}"></img>
|
||||||
|
<#else>
|
||||||
|
<div class="p table">
|
||||||
|
<table class="inline">
|
||||||
|
<tbody><tr><td>暂无数据</td></tr></tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</#if>
|
||||||
|
</div>
|
||||||
|
<div class="t1">
|
||||||
|
<em>4</em>已租房源
|
||||||
|
</div>
|
||||||
|
<div style="margin-bottom: 30px;">
|
||||||
|
<table class="distTab" width="780" border="0" cellspacing="0" cellpadding="0">
|
||||||
|
<thead>
|
||||||
|
<tr class="tdbg">
|
||||||
|
<th class="th01">城市</th>
|
||||||
|
<th>区域</th>
|
||||||
|
<th>小区名</th>
|
||||||
|
<th>成交价</th>
|
||||||
|
<th>面积</th>
|
||||||
|
<th>室</th>
|
||||||
|
<th>厅</th>
|
||||||
|
<th>装修</th>
|
||||||
|
<th>成交日期</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<#if (result.trades??&&result.trades?size>0)>
|
||||||
|
<#list result.trades as bo>
|
||||||
|
<tr class="tdbg">
|
||||||
|
<td class="td01"><#if bo.city??>${bo.city}</#if></td>
|
||||||
|
<td class="td02"><#if bo.region??>${bo.region}</#if></td>
|
||||||
|
<td><#if bo.districtName??>${bo.districtName}</#if></td>
|
||||||
|
<td><#if bo.totalPrice??>${bo.totalPrice}</#if></td>
|
||||||
|
<td><#if bo.area??>${bo.area}</#if></td>
|
||||||
|
<td><#if bo.room??>${bo.room}</#if></td>
|
||||||
|
<td><#if bo.hall??>${bo.hall}</#if></td>
|
||||||
|
<td><#if bo.fitment??>${bo.fitment}</#if></td>
|
||||||
|
<td><#if bo.source??>${bo.source}</#if></td>
|
||||||
|
</tr>
|
||||||
|
</#list>
|
||||||
|
<#else>
|
||||||
|
<tr><td>暂无数据</td></tr>
|
||||||
|
</#if>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="t1">
|
||||||
|
<em>5</em>样本参考
|
||||||
|
</div>
|
||||||
|
<div style="margin-bottom: 30px;">
|
||||||
|
<table class="distTab" width="780" border="0" cellspacing="0" cellpadding="0">
|
||||||
|
<thead>
|
||||||
|
<tr class="tdbg">
|
||||||
|
<th class="th01">城市</th>
|
||||||
|
<th>区域</th>
|
||||||
|
<th>小区名</th>
|
||||||
|
<th>租 金</th>
|
||||||
|
<th>面积</th>
|
||||||
|
<th>室</th>
|
||||||
|
<th>厅</th>
|
||||||
|
<th>装修</th>
|
||||||
|
<th>成交日期</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody id="referenceHouses">
|
||||||
|
<#if (result.houses??&&result.houses?size>0)>
|
||||||
|
<#list result.houses as bo>
|
||||||
|
<tr class="tdbg">
|
||||||
|
<td class="td01"><#if bo.city??>${bo.city}</#if></td>
|
||||||
|
<td class="td02"><#if bo.region??>${bo.region}</#if></td>
|
||||||
|
<td><#if bo.districtName??>${bo.districtName}</#if></td>
|
||||||
|
<td><#if bo.totalPrice??>${bo.totalPrice}</#if></td>
|
||||||
|
<td><#if bo.area??>${bo.area}</#if></td>
|
||||||
|
<td><#if bo.room??>${bo.room}</#if></td>
|
||||||
|
<td><#if bo.hall??>${bo.hall}</#if></td>
|
||||||
|
<td><#if bo.fitment??>${bo.fitment}</#if></td>
|
||||||
|
<td><#if bo.root??>${bo.root}</#if></td>
|
||||||
|
</tr>
|
||||||
|
</#list>
|
||||||
|
<#else>
|
||||||
|
<tr><td>暂无数据</td></tr>
|
||||||
|
</#if>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="t1">
|
||||||
|
<em>6</em>周边同类小区租金
|
||||||
|
</div>
|
||||||
|
<div style="margin-bottom: 30px;">
|
||||||
|
<table class="distTab" width="500" border="0" cellspacing="0" cellpadding="0">
|
||||||
|
<thead>
|
||||||
|
<tr class="tdbg">
|
||||||
|
<th class="th01">城市</th>
|
||||||
|
<th>区域</th>
|
||||||
|
<th>小区名</th>
|
||||||
|
<th>平米租金</th>
|
||||||
|
<th>室</th>
|
||||||
|
<th>厅</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody id="sameDistricts">
|
||||||
|
<#if (result.districts??&&result.districts?size>0)>
|
||||||
|
<#list result.districts as bo>
|
||||||
|
<tr class="tdbg">
|
||||||
|
<td class="td01"><#if bo.city??>${bo.city}</#if></td>
|
||||||
|
<td class="td02"><#if bo.region??>${bo.region}</#if></td>
|
||||||
|
<td><#if bo.districtName??>${bo.districtName}</#if></td>
|
||||||
|
<td><#if bo.sqAvgPrice??>${bo.sqAvgPrice}</#if></td>
|
||||||
|
<td><#if bo.room??>${bo.room}</#if></td>
|
||||||
|
<td><#if bo.hall??>${bo.hall}<#else>1</#if></td>
|
||||||
|
</tr>
|
||||||
|
</#list>
|
||||||
|
<#else>
|
||||||
|
<tr><td>暂无数据</td></tr>
|
||||||
|
</#if>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
</#compress>
|
||||||
@@ -0,0 +1,488 @@
|
|||||||
|
<#ftl attributes={"content_type":"text/html; charset=UTF-8"}>
|
||||||
|
<#compress>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<title>租金评估</title>
|
||||||
|
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
|
||||||
|
<link rel="shortcut icon" href="/favicon.ico">
|
||||||
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
|
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<link rel="stylesheet" href="https://g.alicdn.com/msui/sm/0.6.2/css/sm.css">
|
||||||
|
<link rel="stylesheet" href="../static/style/wx.css">
|
||||||
|
<style>
|
||||||
|
.list-block .item-content .item-inner{margin-left:0;padding-left:0.75rem;}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class="page-group">
|
||||||
|
<div class="page page-current">
|
||||||
|
<input type="hidden" id="t" value="c">
|
||||||
|
<form id="evaluateForm">
|
||||||
|
<div class="content">
|
||||||
|
<div class="list-block" style="margin-bottom:60px;">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<div class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<input id="cityName" value="上海" name="city" type="hidden">
|
||||||
|
<input value="2000" name="radius" type="hidden">
|
||||||
|
<div class="item-title label">城市:<font>上海</font></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<div class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div class="item-title label">地址:</div>
|
||||||
|
<div class="item-input">
|
||||||
|
<input type="text" placeholder="请输入小区名或地址" id="districtSearch" name="address" class="search_input" required>
|
||||||
|
<input type="hidden" name="name" />
|
||||||
|
<input type="hidden" name="roomNumber" />
|
||||||
|
</div>
|
||||||
|
<!-- 区域 -->
|
||||||
|
<input value="" name="district" type="hidden" required>
|
||||||
|
<div class="item-media"><span>(必填项)</span></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="searchSpan" style="margin-bottom:50px;z-index:999;position: absolute; width: 100%;" >
|
||||||
|
<ul></ul>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<div class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div class="item-title label">面积:</div>
|
||||||
|
<div class="item-input">
|
||||||
|
<input type="number" name="size" placeholder="请输入建筑面积(平米)" id="houseArea" min="0" max="1000" value="" required>
|
||||||
|
</div>
|
||||||
|
<div class="item-media"><span>(必填项)</span></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<div class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div class="content-block">
|
||||||
|
<div class="item-title label di">户型:</div>
|
||||||
|
<input name="room" type="hidden" id="room" placeholder="请选择室" value="1">
|
||||||
|
<input name="hall" type="hidden" id="hall" placeholder="请选择厅">
|
||||||
|
<input name="toilet" type="hidden" id="toilet" placeholder="请选择卫">
|
||||||
|
<p class="di">
|
||||||
|
<a href="#" class="create-actions01-now">1</a>室 <a
|
||||||
|
href="#" class="create-actions02-now">0</a>厅 <a
|
||||||
|
href="#" class="create-actions03-now">0</a>卫
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<div class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div class="item-title label">楼层:</div>
|
||||||
|
<div class="item-input">
|
||||||
|
<input type="number" name="floor" id="houseFloor" placeholder="请输入所在楼层" min="1" max="200" required value="">
|
||||||
|
</div>
|
||||||
|
<div class="item-media"><span>(必填项)</span></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<div class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div class="item-title label">总楼层:</div>
|
||||||
|
<div class="item-input">
|
||||||
|
<input type="number" name="height" id="houseHight" placeholder="请输入总楼层" min="1" max="200" value="" required>
|
||||||
|
</div>
|
||||||
|
<div class="item-media"><span>(必填项)</span></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul class="moreInput dn">
|
||||||
|
<li>
|
||||||
|
<div class="item-content">
|
||||||
|
|
||||||
|
<div class="item-inner">
|
||||||
|
<div class="content-block">
|
||||||
|
<div class="item-title label di">朝向:</div>
|
||||||
|
<input id="direction" type="hidden" name="direction">
|
||||||
|
<p class="di"><a href="#" class="create-actions04">请选择朝向</a></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<div class="item-content">
|
||||||
|
|
||||||
|
<div class="item-inner">
|
||||||
|
<div class="content-block">
|
||||||
|
<div class="item-title label di">装修情况:</div>
|
||||||
|
<input type="hidden" id="decoration" name="decoration">
|
||||||
|
<input type="hidden" id="fitment" name="fitment">
|
||||||
|
<p class="di"><a href="#" class="create-actions05-now">请选择装修情况</a></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<div class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div class="content-block">
|
||||||
|
<div class="item-title label di">电梯配套:</div>
|
||||||
|
<input type="hidden" id="hasLift" name="hasLift" placeholder="请选择电梯配套">
|
||||||
|
<p class="di"><a href="#" class="create-actions14-now">请选择电梯配套</a></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<div class="more_btn">继续填写,租金更加精准↓</div>
|
||||||
|
<div class="little_btn dn">收起</div>
|
||||||
|
</div>
|
||||||
|
<div class="content-block">
|
||||||
|
<p><a id="evaluateBtn" class="button button-big button-fill">查看租金结果</a></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script type='text/javascript' src='https://g.alicdn.com/sj/lib/zepto/zepto.js' charset='utf-8'></script>
|
||||||
|
<script type='text/javascript' src='https://g.alicdn.com/msui/sm/0.6.2/js/sm.js' charset='utf-8'></script>
|
||||||
|
<script type='text/javascript' src='../static/js/select.js' charset='utf-8'></script>
|
||||||
|
<script type='text/javascript' src='../static/js/wx.js' charset='utf-8'></script>
|
||||||
|
<script type='text/javascript' src='../static/js/autoCompletion.js' charset='utf-8'></script>
|
||||||
|
<script type='text/javascript' src='../static/js/jquery.cookie.js' charset='utf-8'></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
function storeSession() {
|
||||||
|
sessionStorage.city = $('input[name="city"]').val()
|
||||||
|
sessionStorage.name = $('input[name="name"]').val()
|
||||||
|
sessionStorage.district = $('input[name="district"]').val()
|
||||||
|
sessionStorage.address = $('input[name="address"]').val()
|
||||||
|
sessionStorage.addressDetail = $('input[name="address"]').val()
|
||||||
|
sessionStorage.size = $('input[name="size"]').val()
|
||||||
|
sessionStorage.roomNumber = $('input[name="roomNumber"]').val()
|
||||||
|
sessionStorage.room = $('input[name="room"]').val()
|
||||||
|
sessionStorage.hall = $('input[name="hall"]').val()
|
||||||
|
sessionStorage.toilet = $('input[name="toilet"]').val()
|
||||||
|
sessionStorage.floor = $('input[name="floor"]').val()
|
||||||
|
sessionStorage.height = $('input[name="height"]').val()
|
||||||
|
sessionStorage.direction = $('input[name="direction"]').val()
|
||||||
|
sessionStorage.fitment = $('input[name="fitment"]').val()
|
||||||
|
sessionStorage.hasLift = $('input[name="hasLift"]').val()
|
||||||
|
}
|
||||||
|
function getSession() {
|
||||||
|
if (sessionStorage.city != undefined) {
|
||||||
|
$('input[name="city"]').val(sessionStorage.city)
|
||||||
|
}
|
||||||
|
if (sessionStorage.name != undefined) {
|
||||||
|
$('input[name="name"]').val(sessionStorage.name)
|
||||||
|
}
|
||||||
|
if (sessionStorage.district != undefined) {
|
||||||
|
$('input[name="district"]').val(sessionStorage.district)
|
||||||
|
}
|
||||||
|
if (sessionStorage.address != undefined) {
|
||||||
|
$('input[name="address"]').val(sessionStorage.address)
|
||||||
|
}
|
||||||
|
if (sessionStorage.size != undefined) {
|
||||||
|
$('input[name="size"]').val(sessionStorage.size)
|
||||||
|
}
|
||||||
|
if (sessionStorage.room != undefined) {
|
||||||
|
$('input[name="room"]').val(sessionStorage.room)
|
||||||
|
}
|
||||||
|
if (sessionStorage.hall != undefined) {
|
||||||
|
$('input[name="hall"]').val(sessionStorage.hall)
|
||||||
|
}
|
||||||
|
if (sessionStorage.toilet != undefined) {
|
||||||
|
$('input[name="toilet"]').val(sessionStorage.toilet)
|
||||||
|
}
|
||||||
|
if (sessionStorage.floor != undefined) {
|
||||||
|
$('input[name="floor"]').val(sessionStorage.floor)
|
||||||
|
}
|
||||||
|
if (sessionStorage.height != undefined) {
|
||||||
|
$('input[name="height"]').val(sessionStorage.height)
|
||||||
|
}
|
||||||
|
if (sessionStorage.direction != undefined) {
|
||||||
|
$('input[name="direction"]').val(sessionStorage.direction)
|
||||||
|
}
|
||||||
|
if (sessionStorage.fitment != undefined) {
|
||||||
|
$('input[name="fitment"]').val(sessionStorage.fitment)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$("#evaluateBtn").on('click', function(){
|
||||||
|
var inputs = $("input")
|
||||||
|
for (var i = 0; i < inputs.length; i++) {
|
||||||
|
var input = $(inputs[i])
|
||||||
|
var fieldName = input.attr("placeholder").substring(3)
|
||||||
|
var fieldVal = $.trim(input.val())
|
||||||
|
if (input.attr("required") && fieldVal == "") {
|
||||||
|
if (input.attr("name").indexOf("district") != -1) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$.toast(fieldName + "不能为空");
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (input.attr("type") == 'number' && fieldVal != "") {
|
||||||
|
if (input.attr("name").indexOf("size") != -1) {
|
||||||
|
if (!/^[0-9]+(.[0-9]+)?$/.test(fieldVal)) {
|
||||||
|
$.toast(fieldName + "非法");
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
if (!/^[0-9]+$/.test(fieldVal)) {
|
||||||
|
$.toast(fieldName + "必须是正整数");
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var min = input.attr("min")
|
||||||
|
var max = input.attr("max")
|
||||||
|
if (max && min && (parseFloat(min) > parseFloat(fieldVal) || parseFloat(max) < parseFloat(fieldVal))) {
|
||||||
|
$.toast(fieldName + "的取值范围是:" + min + "到" + max);
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(parseFloat($("#houseHight").val()) < parseFloat($("#houseFloor").val())){
|
||||||
|
$.toast("楼层不能大于楼高");
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if($("#houseHight").val() && parseFloat($("#houseHight").val())>=60){
|
||||||
|
$.toast("请输入合理的楼层数");
|
||||||
|
return
|
||||||
|
}
|
||||||
|
$("#evaluateBtn").prop("disabled", true)
|
||||||
|
|
||||||
|
// 用户输入可能为地址,需要匹配,在估价
|
||||||
|
let city = $('input[name="city"]').val()
|
||||||
|
let address = $('input[name="address"]').val()
|
||||||
|
|
||||||
|
if ($('input[name="district"]').val() == '') {
|
||||||
|
$.ajax({
|
||||||
|
// 注意需要加..
|
||||||
|
url: '../ccbRent/match',
|
||||||
|
data: {'city': city, 'address': address},
|
||||||
|
dataType: "json",
|
||||||
|
type: "post",
|
||||||
|
success: function (data) {
|
||||||
|
if (data.code == 200) {
|
||||||
|
let result = data.result
|
||||||
|
$('input[name="name"]').val(result.name)
|
||||||
|
$('input[name="district"]').val(result.district)
|
||||||
|
$('input[name="roomNumber"]').val(result.searchAddress.orgRoomNumber)
|
||||||
|
evaluateRent()
|
||||||
|
} else {
|
||||||
|
$.toast("估价失败,暂不支持该小区估价");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
evaluateRent()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// 选择操作-房型-室
|
||||||
|
$(document).on('click', '.create-actions01-now', function () {
|
||||||
|
var buttons1 = [
|
||||||
|
{
|
||||||
|
text: '请选择室',
|
||||||
|
label: true
|
||||||
|
}
|
||||||
|
];
|
||||||
|
for (var i = 1; i < 10; i++) {
|
||||||
|
buttons1.push({
|
||||||
|
text: i + '',
|
||||||
|
onClick: function () {
|
||||||
|
$("#room").val(this.text)
|
||||||
|
$(".create-actions01-now").empty().text(this.text).addClass("selected")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
var buttons2 = [
|
||||||
|
{
|
||||||
|
text: '取消',
|
||||||
|
bg: 'gray'
|
||||||
|
}
|
||||||
|
];
|
||||||
|
var groups = [buttons1, buttons2];
|
||||||
|
$.actions(groups);
|
||||||
|
});
|
||||||
|
|
||||||
|
let evaluateRent = function() {
|
||||||
|
$.ajax({
|
||||||
|
// 注意需要加..
|
||||||
|
url: '../ccbRent/evaluateRent',
|
||||||
|
data:$("#evaluateForm").serialize(),
|
||||||
|
dataType:"json",
|
||||||
|
type:"post",
|
||||||
|
success:function(data){
|
||||||
|
if(data.code == 200){
|
||||||
|
let name = $('input[name="name"]').val()
|
||||||
|
let roomNumber = $('input[name="roomNumber"]').val()
|
||||||
|
window.location.href = "report?address=" + data.result.address + "&totalPrice=" + data.result.totalPrice
|
||||||
|
storeSession()
|
||||||
|
}else{
|
||||||
|
$.toast("估价失败,请重新评估");
|
||||||
|
$("#evaluateBtn").prop("disabled", false)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function () {
|
||||||
|
//$.toast("服务器异常,请重新评估");
|
||||||
|
$("#evaluateBtn").prop("disabled", false)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 选择操作-装修情况
|
||||||
|
$(document).on('click', '.create-actions05-now', function () {
|
||||||
|
var buttons1 = [
|
||||||
|
{
|
||||||
|
text: '请选择装修情况',
|
||||||
|
label: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '简装',
|
||||||
|
bold: true,
|
||||||
|
onClick: function () {
|
||||||
|
$("a.create-actions05-now").empty().text(this.text).addClass("selected")
|
||||||
|
$("#fitment").val("2")
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '毛坯',
|
||||||
|
onClick: function () {
|
||||||
|
$("a.create-actions05-now").empty().text(this.text).addClass("selected")
|
||||||
|
$("#fitment").val("1")
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '精装',
|
||||||
|
onClick: function () {
|
||||||
|
$("a.create-actions05-now").empty().text(this.text).addClass("selected")
|
||||||
|
$("#fitment").val("3")
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '豪装',
|
||||||
|
onClick: function () {
|
||||||
|
$("a.create-actions05-now").empty().text(this.text).addClass("selected")
|
||||||
|
$("#fitment").val("4")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
];
|
||||||
|
var buttons2 = [
|
||||||
|
{
|
||||||
|
text: '取消',
|
||||||
|
bg: 'gray'
|
||||||
|
}
|
||||||
|
];
|
||||||
|
var groups = [buttons1, buttons2];
|
||||||
|
$.actions(groups);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// 选择操作-房型-号
|
||||||
|
$(document).on('click', '.create-actions02-now', function () {
|
||||||
|
var buttons1 = [
|
||||||
|
{
|
||||||
|
text: '请选择厅',
|
||||||
|
label: true
|
||||||
|
}
|
||||||
|
];
|
||||||
|
for (var i = 0; i < 10; i++) {
|
||||||
|
buttons1.push({
|
||||||
|
text: i + '',
|
||||||
|
onClick: function () {
|
||||||
|
$("#hall").val(this.text)
|
||||||
|
$(".create-actions02-now").empty().text(this.text).addClass("selected")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
var buttons2 = [
|
||||||
|
{
|
||||||
|
text: '取消',
|
||||||
|
bg: 'gray'
|
||||||
|
}
|
||||||
|
];
|
||||||
|
var groups = [buttons1, buttons2];
|
||||||
|
$.actions(groups);
|
||||||
|
});
|
||||||
|
|
||||||
|
// 选择操作-房型-卫
|
||||||
|
$(document).on('click', '.create-actions03-now', function () {
|
||||||
|
var buttons1 = [
|
||||||
|
{
|
||||||
|
text: '请选择卫',
|
||||||
|
label: true
|
||||||
|
}
|
||||||
|
];
|
||||||
|
for (var i = 0; i < 10; i++) {
|
||||||
|
buttons1.push({
|
||||||
|
text: i + '',
|
||||||
|
onClick: function () {
|
||||||
|
$("#toilet").val(this.text)
|
||||||
|
$(".create-actions03-now").empty().text(this.text).addClass("selected")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
var buttons2 = [
|
||||||
|
{
|
||||||
|
text: '取消',
|
||||||
|
bg: 'gray'
|
||||||
|
}
|
||||||
|
];
|
||||||
|
var groups = [buttons1, buttons2];
|
||||||
|
$.actions(groups);
|
||||||
|
});
|
||||||
|
|
||||||
|
// 电梯配套
|
||||||
|
$(document).on('click', '.create-actions14-now', function () {
|
||||||
|
var buttons1 = [
|
||||||
|
{
|
||||||
|
text: '请选择是否有电梯',
|
||||||
|
label: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '是',
|
||||||
|
bold: true,
|
||||||
|
onClick: function () {
|
||||||
|
$('#hasLift').val(true)
|
||||||
|
$("a.create-actions14-now").empty().text(this.text).addClass("selected")
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '否',
|
||||||
|
onClick: function () {
|
||||||
|
$('#hasLift').val(false)
|
||||||
|
$("a.create-actions14-now").empty().text(this.text).addClass("selected")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
];
|
||||||
|
var buttons2 = [
|
||||||
|
{
|
||||||
|
text: '取消',
|
||||||
|
bg: 'gray'
|
||||||
|
}
|
||||||
|
];
|
||||||
|
var groups = [buttons1, buttons2];
|
||||||
|
$.actions(groups);
|
||||||
|
});
|
||||||
|
function init() {
|
||||||
|
getSession()
|
||||||
|
}
|
||||||
|
$(function(){
|
||||||
|
init()
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
</#compress>
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
<#ftl attributes={"content_type":"text/html; charset=UTF-8"}>
|
||||||
|
<#compress>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
|
||||||
|
<title>租金报告中心</title>
|
||||||
|
<meta name="viewport" content="initial-scale=1, maximum-scale=1"/>
|
||||||
|
<link rel="shortcut icon" href="/favicon.ico"/>
|
||||||
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||||
|
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="https://g.alicdn.com/msui/sm/0.6.2/css/sm.css"/>
|
||||||
|
<link rel="stylesheet" href="../static/style/wx.css"/>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="page-group">
|
||||||
|
<div class="page page-current">
|
||||||
|
<div class="content">
|
||||||
|
<div class="list-block" style="margin-bottom:60px;">
|
||||||
|
<a href="javascript:void(0)" onclick="javascript:history.back(-1);" class="button_12 blue blue_borderbottom radius4"><返回</a>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<div class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div class="item-title label">您评估的地址:</div>
|
||||||
|
<div class="item-input">
|
||||||
|
<input type="text" disabled id="districtSearch" name="name" value="${lender}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<div class="item-content">
|
||||||
|
<div class="item-inner">
|
||||||
|
<div class="item-title label">租金:</div>
|
||||||
|
<div class="item-input">
|
||||||
|
<input type="text" name="mount" disabled name="evaluation.mount" value="${dealPrice}元/月">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="content-block">
|
||||||
|
<p><a id="evaluateBtn" class="button button-big button-fill">查看租金报告</a></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script type='text/javascript' src='https://g.alicdn.com/sj/lib/zepto/zepto.js' charset='utf-8'></script>
|
||||||
|
<script type='text/javascript' src='https://g.alicdn.com/msui/sm/0.6.2/js/sm.js' charset='utf-8'></script>
|
||||||
|
<script type='text/javascript' src='../static/js/wx.js' charset='utf-8'></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$("#evaluateBtn").on('click', function(){
|
||||||
|
window.location.href = "detail"
|
||||||
|
});
|
||||||
|
function init() {
|
||||||
|
|
||||||
|
};
|
||||||
|
$(function () {
|
||||||
|
init();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
</#compress>
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||||
|
|
||||||
<link rel="stylesheet" href="http://g.alicdn.com/msui/sm/0.6.2/css/sm.css">
|
<link rel="stylesheet" href="https://g.alicdn.com/msui/sm/0.6.2/css/sm.css">
|
||||||
<link rel="stylesheet" href="../static/style/wx.css">
|
<link rel="stylesheet" href="../static/style/wx.css">
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
|
||||||
<link rel="stylesheet" href="http://g.alicdn.com/msui/sm/0.6.2/css/sm.css">
|
<link rel="stylesheet" href="https://g.alicdn.com/msui/sm/0.6.2/css/sm.css">
|
||||||
<link rel="stylesheet" href="../static/style/wx.css">
|
<link rel="stylesheet" href="../static/style/wx.css">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
@@ -117,10 +117,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<#include '/layout/footer.ftl'/>
|
<#include '/layout/footer.ftl'/>
|
||||||
<script type="text/javascript" src="http://cdn.hcharts.cn/highcharts/highcharts.js"></script>
|
<script type="text/javascript" src="https://cdn.hcharts.cn/highcharts/highcharts.js"></script>
|
||||||
<script type='text/javascript' src='../static/js/wx.js' charset='utf-8'></script>
|
<script type='text/javascript' src='../static/js/wx.js' charset='utf-8'></script>
|
||||||
<script type="text/javascript" src="../static/js/trend-charts.js"></script>
|
<script type="text/javascript" src="../static/js/trend-charts.js"></script>
|
||||||
<script type="text/javascript" src="http://api.map.baidu.com/api?ak=0a7eM0lkIvpKGPiq1bMCfeH7&v=2.0&callback=initMap"></script>
|
<script type="text/javascript" src="https://api.map.baidu.com/api?ak=0a7eM0lkIvpKGPiq1bMCfeH7&v=2.0&callback=initMap"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var Constants = {
|
var Constants = {
|
||||||
wwwUrl : '${wwwUrl}',
|
wwwUrl : '${wwwUrl}',
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user