Merge branch 'master' of http://gitlab.fangjia.com/dev0/main
This commit is contained in:
+16
-4
@@ -106,7 +106,13 @@ public class EvaluationAuditController {
|
|||||||
if(eval!=null){
|
if(eval!=null){
|
||||||
bo.setHouseArea(eval.getHouseArea());
|
bo.setHouseArea(eval.getHouseArea());
|
||||||
bo.setDistrictName(eval.getDistrictName());
|
bo.setDistrictName(eval.getDistrictName());
|
||||||
bo.setAddress(eval.getAddress());
|
String address = "";
|
||||||
|
if(StringUtils.isNotBlank(eval.getCertificateAddress())){
|
||||||
|
address = eval.getCertificateAddress();
|
||||||
|
}else{
|
||||||
|
address = eval.getAddress();
|
||||||
|
}
|
||||||
|
bo.setAddress(address);
|
||||||
bo.setHouseNum(eval.getHouseNum());
|
bo.setHouseNum(eval.getHouseNum());
|
||||||
bo.setRoomNum(eval.getRoomNum());
|
bo.setRoomNum(eval.getRoomNum());
|
||||||
bo.setEvaluationDate(eval.getLastUpdated());
|
bo.setEvaluationDate(eval.getLastUpdated());
|
||||||
@@ -115,7 +121,7 @@ public class EvaluationAuditController {
|
|||||||
bo.setFloorDesc(eval.getFloorDesc());
|
bo.setFloorDesc(eval.getFloorDesc());
|
||||||
bos.add(bo);
|
bos.add(bo);
|
||||||
|
|
||||||
List<FjtEvaluation> evaluations = fjtEvaluationService.findAllFjtEvaluationByConditions(eval.getCity(), eval.getRegion(), eval.getAddress(), eval.getHouseNum(), eval.getRoomNum());
|
List<FjtEvaluation> evaluations = fjtEvaluationService.findAllFjtEvaluationByConditions(eval.getCity(), eval.getRegion(), bo.getAddress(), eval.getHouseNum(), eval.getRoomNum());
|
||||||
if(evaluations!=null && evaluations.size()>=2){
|
if(evaluations!=null && evaluations.size()>=2){
|
||||||
List<String> ids = new ArrayList<String>();
|
List<String> ids = new ArrayList<String>();
|
||||||
for(FjtEvaluation fjtEval : evaluations){
|
for(FjtEvaluation fjtEval : evaluations){
|
||||||
@@ -148,7 +154,13 @@ public class EvaluationAuditController {
|
|||||||
BeanUtils.copyProperties(audit, bo);
|
BeanUtils.copyProperties(audit, bo);
|
||||||
bo.setHouseArea(eval.getHouseArea());
|
bo.setHouseArea(eval.getHouseArea());
|
||||||
bo.setDistrictName(eval.getDistrictName());
|
bo.setDistrictName(eval.getDistrictName());
|
||||||
bo.setAddress(eval.getAddress());
|
String address = "";
|
||||||
|
if(StringUtils.isNotBlank(eval.getCertificateAddress())){
|
||||||
|
address = eval.getCertificateAddress();
|
||||||
|
}else{
|
||||||
|
address = eval.getAddress();
|
||||||
|
}
|
||||||
|
bo.setAddress(address);
|
||||||
bo.setHouseNum(eval.getHouseNum());
|
bo.setHouseNum(eval.getHouseNum());
|
||||||
bo.setRoomNum(eval.getRoomNum());
|
bo.setRoomNum(eval.getRoomNum());
|
||||||
bo.setEvaluationDate(eval.getLastUpdated());
|
bo.setEvaluationDate(eval.getLastUpdated());
|
||||||
@@ -157,7 +169,7 @@ public class EvaluationAuditController {
|
|||||||
bo.setFloorDesc(eval.getFloorDesc());
|
bo.setFloorDesc(eval.getFloorDesc());
|
||||||
bos.add(bo);
|
bos.add(bo);
|
||||||
//根据地址,楼栋号判断是否是同一套房
|
//根据地址,楼栋号判断是否是同一套房
|
||||||
List<FjtEvaluation> evaluations = fjtEvaluationService.findAllFjtEvaluationByConditions(eval.getCity(), eval.getRegion(), eval.getAddress(), eval.getHouseNum(), eval.getRoomNum());
|
List<FjtEvaluation> evaluations = fjtEvaluationService.findAllFjtEvaluationByConditions(eval.getCity(), eval.getRegion(), bo.getAddress(), eval.getHouseNum(), eval.getRoomNum());
|
||||||
if(evaluations!=null && evaluations.size()>=2){
|
if(evaluations!=null && evaluations.size()>=2){
|
||||||
List<String> ids = new ArrayList<String>();
|
List<String> ids = new ArrayList<String>();
|
||||||
for(FjtEvaluation fjtEval : evaluations){
|
for(FjtEvaluation fjtEval : evaluations){
|
||||||
|
|||||||
+3
-1
@@ -113,7 +113,9 @@ public class fjtEvaluationController {
|
|||||||
FjtEvaluation evaluation = fjtEvaluationService.findEvaluationById(Integer.parseInt(bo.getEvaluationId()));
|
FjtEvaluation evaluation = fjtEvaluationService.findEvaluationById(Integer.parseInt(bo.getEvaluationId()));
|
||||||
if(evaluation != null){
|
if(evaluation != null){
|
||||||
String addr = "";
|
String addr = "";
|
||||||
if(evaluation.getAddress() != null){
|
if(StringUtils.isNotBlank(evaluation.getCertificateAddress())){
|
||||||
|
addr += evaluation.getCertificateAddress();
|
||||||
|
}else if(evaluation.getAddress() != null){
|
||||||
addr += evaluation.getAddress();
|
addr += evaluation.getAddress();
|
||||||
}
|
}
|
||||||
if(StringUtils.isNotBlank(evaluation.getHouseNum())){
|
if(StringUtils.isNotBlank(evaluation.getHouseNum())){
|
||||||
|
|||||||
@@ -724,19 +724,59 @@
|
|||||||
});
|
});
|
||||||
var series = new Array();
|
var series = new Array();
|
||||||
series[0] = {
|
series[0] = {
|
||||||
name:"房源散列图",
|
name:"房源散列图-普通住宅",
|
||||||
data:new Array()
|
data:new Array()
|
||||||
//color:"#660099"
|
//color:"#660099"
|
||||||
}
|
}
|
||||||
|
series[1] = {
|
||||||
|
name:"房源散列图-商住",
|
||||||
|
data:new Array(),
|
||||||
|
color:"#12990f"
|
||||||
|
}
|
||||||
|
series[2] = {
|
||||||
|
name:"房源散列图-别墅",
|
||||||
|
data:new Array(),
|
||||||
|
color:"#992632"
|
||||||
|
}
|
||||||
|
var series_arry_0 = []
|
||||||
|
var series_arry_1 = []
|
||||||
|
var series_arry_2 = []
|
||||||
$(data).each(function(i,item){
|
$(data).each(function(i,item){
|
||||||
var pdate = item.pDate + "";
|
var pdate = item.pDate + "";
|
||||||
var ds = pdate.substring(0, 4) + '-' + pdate.substring(4, 6) + '-' + pdate.substring(6)
|
var ds = pdate.substring(0, 4) + '-' + pdate.substring(4, 6) + '-' + pdate.substring(6)
|
||||||
series[0].data.push({
|
if ((item.estateType!=null) && (item.estateType.indexOf('别墅') > -1)){
|
||||||
x:new Date(ds),
|
series_arry_2.push({
|
||||||
y:Math.round(item.totalPrice/item.area),
|
x:new Date(ds),
|
||||||
data:item
|
y:Math.round(item.totalPrice/item.area),
|
||||||
})
|
data:item
|
||||||
|
})
|
||||||
|
}else if((item.estateType!=null) && ((item.estateType.indexOf('商住') > -1) || (item.estateType.indexOf('公寓酒店') > -1))){
|
||||||
|
series_arry_1.push({
|
||||||
|
x:new Date(ds),
|
||||||
|
y:Math.round(item.totalPrice/item.area),
|
||||||
|
data:item
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
series_arry_0.push({
|
||||||
|
x:new Date(ds),
|
||||||
|
y:Math.round(item.totalPrice/item.area),
|
||||||
|
data:item
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// series[0].data.push({
|
||||||
|
// x:new Date(ds),
|
||||||
|
// y:Math.round(item.totalPrice/item.area),
|
||||||
|
// data:item
|
||||||
|
// })
|
||||||
|
// series[1].data.push({
|
||||||
|
// x:new Date(ds),
|
||||||
|
// y:Math.round(item.totalPrice/item.area),
|
||||||
|
// data:item
|
||||||
|
// })
|
||||||
});
|
});
|
||||||
|
series[0].data = series_arry_0
|
||||||
|
series[1].data = series_arry_1
|
||||||
|
series[2].data = series_arry_2
|
||||||
$('#houseChart').highcharts({
|
$('#houseChart').highcharts({
|
||||||
chart: {
|
chart: {
|
||||||
type: 'scatter',
|
type: 'scatter',
|
||||||
|
|||||||
@@ -152,7 +152,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<#list loudongList! as loudong>
|
<#list loudongList! as loudong>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="4%">
|
<td width="9%">
|
||||||
${loudong.districtNo!''}
|
${loudong.districtNo!''}
|
||||||
</td>
|
</td>
|
||||||
<td width="4%">
|
<td width="4%">
|
||||||
|
|||||||
@@ -140,6 +140,7 @@
|
|||||||
<th style="width:60px;">板块</th>
|
<th style="width:60px;">板块</th>
|
||||||
<th style="width:80px;">装修</th>
|
<th style="width:80px;">装修</th>
|
||||||
<th style="width:70px;">朝向</th>
|
<th style="width:70px;">朝向</th>
|
||||||
|
<th style="width:70px;">物业类型</th>
|
||||||
<th style="width:90px;">来源</th>
|
<th style="width:90px;">来源</th>
|
||||||
<th style="width:80px;">操作</th>
|
<th style="width:80px;">操作</th>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -180,6 +181,7 @@
|
|||||||
<td>${it.block!}</td>
|
<td>${it.block!}</td>
|
||||||
<td>${it.fitment!}</td>
|
<td>${it.fitment!}</td>
|
||||||
<td>${it.direction!}</td>
|
<td>${it.direction!}</td>
|
||||||
|
<td>${it.estateType!}</td>
|
||||||
<td>
|
<td>
|
||||||
<#if it.url??>
|
<#if it.url??>
|
||||||
<a href="${it.url!}" target="_blank" title="${it.url!}">${t_util.urlToSiteName(it.url!)!'未知'}</a>
|
<a href="${it.url!}" target="_blank" title="${it.url!}">${t_util.urlToSiteName(it.url!)!'未知'}</a>
|
||||||
|
|||||||
+87
-2
@@ -6,12 +6,20 @@ import java.lang.reflect.InvocationTargetException;
|
|||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.logging.Handler;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import com.fangjia.core.util.DataUtil;
|
import com.fangjia.core.util.DataUtil;
|
||||||
|
import com.fangjia.core.util.DingDingMessageUtil;
|
||||||
|
import com.fangjia.core.util.HttpRequest;
|
||||||
|
import com.fangjia.core.util.HttpRequestException;
|
||||||
|
import net.sf.json.JSONArray;
|
||||||
|
import net.sf.json.JSONObject;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
|
||||||
import com.fangjia.coresite.model.JsonModel;
|
import com.fangjia.coresite.model.JsonModel;
|
||||||
@@ -27,9 +35,12 @@ import com.fangjia.service.common.CookieName;
|
|||||||
import com.fangjia.service.fangjia.NewsResourceService;
|
import com.fangjia.service.fangjia.NewsResourceService;
|
||||||
import com.fangjia.service.fangjia.SaleLeadsService;
|
import com.fangjia.service.fangjia.SaleLeadsService;
|
||||||
import com.fangjia.service.mongo.fangjia.ServerAreaService;
|
import com.fangjia.service.mongo.fangjia.ServerAreaService;
|
||||||
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
public class SaleLeadsController {
|
public class SaleLeadsController {
|
||||||
|
|
||||||
|
private static final Logger LOG = Logger.getLogger(SaleLeadsController.class);
|
||||||
|
|
||||||
private SaleLeadsService saleLeadsService;
|
private SaleLeadsService saleLeadsService;
|
||||||
private ServerAreaService serverAreaService;
|
private ServerAreaService serverAreaService;
|
||||||
private NewsResourceService newsResourceService;
|
private NewsResourceService newsResourceService;
|
||||||
@@ -41,6 +52,15 @@ public class SaleLeadsController {
|
|||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地数公众号咨询
|
||||||
|
* @param model
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public Object didataApplyAction(SaleLeadsModel model) {
|
||||||
|
return model;
|
||||||
|
}
|
||||||
|
|
||||||
public Object doAddAction(SaleLeadsModel model, HttpServletRequest req,
|
public Object doAddAction(SaleLeadsModel model, HttpServletRequest req,
|
||||||
HttpServletResponse res) throws UnsupportedEncodingException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
|
HttpServletResponse res) throws UnsupportedEncodingException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
|
||||||
|
|
||||||
@@ -129,8 +149,64 @@ public class SaleLeadsController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
saleLeads = converValue(saleLeads);
|
saleLeads = converValue(saleLeads);
|
||||||
|
String body =
|
||||||
|
"业务需求:" + saleLeads.getBusiness() + " " + saleLeads.getOtherBusiness() + "\n\n"
|
||||||
|
+ "姓名:" + saleLeads.getUname() + "\n\n"
|
||||||
|
+ "城市:" + saleLeads.getCity() + "\n\n"
|
||||||
|
+ "工作职能:" + saleLeads.getWork() + " " + saleLeads.getOtherWork() + "\n\n"
|
||||||
|
+ "手机:" + saleLeads.getMobile() + "\n\n"
|
||||||
|
+ "邮箱:" + saleLeads.getEmail() + "\n\n"
|
||||||
|
+ "公司名称:" + saleLeads.getCompany() + "\n\n"
|
||||||
|
+ "行业性质:" + saleLeads.getIndustryNature() + " " + saleLeads.getOtherIndustryNature() + "\n\n";
|
||||||
|
body = body.replaceAll("null", "").replaceAll("其他,请填写", "");
|
||||||
|
if (StringUtils.isNotBlank(refUrl) && refUrl.contains("bd_vid")) {
|
||||||
|
body += "线索来源:百度";
|
||||||
|
} else if (StringUtils.isNotBlank(refUrl) && refUrl.contains("didata.wechat")) {
|
||||||
|
body += "线索来源: 地数公众号";
|
||||||
|
} else {
|
||||||
|
body += "线索来源:房价网";
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
JSONObject requestBody = new JSONObject();
|
||||||
|
requestBody.put("msgtype", "text");
|
||||||
|
JSONObject markdown = new JSONObject();
|
||||||
|
markdown.put("title", "销售线索");
|
||||||
|
markdown.put("content", body);
|
||||||
|
requestBody.put("text", markdown);
|
||||||
|
HttpRequest request = new HttpRequest();
|
||||||
|
final String ding_url = "https://oapi.dingtalk.com/robot/send?access_token=894650a12af9497bed599df1d5f93b21d6da5bbae45f35f18c5825580ebbdf64";
|
||||||
|
Map<String, String> headers = new HashMap<String, String>();
|
||||||
|
headers.put("Content-Type", "application/json; charset=utf-8");
|
||||||
|
request.postWithBody(ding_url, requestBody, headers, "UTF-8");
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
saleLeadsService.save(saleLeads);
|
saleLeadsService.save(saleLeads);
|
||||||
|
|
||||||
|
// 对于百度广告过来的信息,进行回传
|
||||||
|
try {
|
||||||
|
if (StringUtils.isNotBlank(refUrl) && refUrl.contains("bd_vid")) {
|
||||||
|
HttpRequest httpRequest = new HttpRequest();
|
||||||
|
final String baiduUrl = "https://ocpc.baidu.com/ocpcapi/api/uploadConvertData";
|
||||||
|
Map<String, String> bdHeaders = new HashMap<String, String>();
|
||||||
|
bdHeaders.put("Content-Type", "application/json; charset=utf-8");
|
||||||
|
|
||||||
|
JSONObject requestBody = new JSONObject();
|
||||||
|
// https://fengchao.baidu.com/fc/toolscenter/optimize/track/user/27002539
|
||||||
|
requestBody.put("token", "EZGISwlOClRMEZErT2ThZTEjpLAzs2wE@9POwrGLqpRtQeGhvvCug1N3OK1tq3skk");
|
||||||
|
JSONArray jsonArray = new JSONArray();
|
||||||
|
JSONObject contentJson = new JSONObject();
|
||||||
|
contentJson.put("logidUrl", refUrl);
|
||||||
|
contentJson.put("newType", "3");
|
||||||
|
jsonArray.add(contentJson);
|
||||||
|
requestBody.put("conversionTypes", jsonArray);
|
||||||
|
String result = httpRequest.postWithBody(baiduUrl, requestBody, bdHeaders, "UTF-8");
|
||||||
|
LOG.info("百度回传成功:" + result);
|
||||||
|
}
|
||||||
|
} catch (HttpRequestException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
if(StringUtils.isNotBlank(saleLeads.getBusiness()) && saleLeads.getBusiness().contains("_")){
|
if(StringUtils.isNotBlank(saleLeads.getBusiness()) && saleLeads.getBusiness().contains("_")){
|
||||||
String[] businessArray = saleLeads.getBusiness().split("_");
|
String[] businessArray = saleLeads.getBusiness().split("_");
|
||||||
for(String s : businessArray){
|
for(String s : businessArray){
|
||||||
@@ -155,7 +231,12 @@ public class SaleLeadsController {
|
|||||||
|
|
||||||
if(StringUtils.isNotBlank(refUrl) && refUrl.contains("/resource/info")){
|
if(StringUtils.isNotBlank(refUrl) && refUrl.contains("/resource/info")){
|
||||||
url = refUrl.substring(refUrl.indexOf("/resource/info"), refUrl.length());
|
url = refUrl.substring(refUrl.indexOf("/resource/info"), refUrl.length());
|
||||||
}else{
|
} else if (StringUtils.isNotBlank(refUrl) && refUrl.contains("didata.wechat")) { // 地数公众号跳转
|
||||||
|
url = "/enquire/didataSuccess";
|
||||||
|
if (StringUtils.isNotBlank(refUrl)) {
|
||||||
|
url = url + "?backUrl=" + URLEncoder.encode(refUrl);
|
||||||
|
}
|
||||||
|
} else{
|
||||||
url = "/enquire/success";
|
url = "/enquire/success";
|
||||||
if (StringUtils.isNotBlank(refUrl)) {
|
if (StringUtils.isNotBlank(refUrl)) {
|
||||||
url = url + "?backUrl=" + URLEncoder.encode(refUrl);
|
url = url + "?backUrl=" + URLEncoder.encode(refUrl);
|
||||||
@@ -224,6 +305,10 @@ public class SaleLeadsController {
|
|||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Object didataResultAction(SaleLeadsModel model) {
|
||||||
|
return model;
|
||||||
|
}
|
||||||
|
|
||||||
public SaleLeadsService getSaleLeadsService() {
|
public SaleLeadsService getSaleLeadsService() {
|
||||||
return saleLeadsService;
|
return saleLeadsService;
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-1
@@ -1,6 +1,15 @@
|
|||||||
package com.fangjia.coresite.controllers;
|
package com.fangjia.coresite.controllers;
|
||||||
|
|
||||||
|
import com.fangjia.core.util.HttpRequest;
|
||||||
|
import com.fangjia.core.util.HttpRequestException;
|
||||||
import com.fangjia.coresite.model.FangjiaModel;
|
import com.fangjia.coresite.model.FangjiaModel;
|
||||||
|
import net.sf.json.JSONArray;
|
||||||
|
import net.sf.json.JSONObject;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 解决方案 控制器
|
* 解决方案 控制器
|
||||||
@@ -14,7 +23,7 @@ public class SolutionController {
|
|||||||
* @param model
|
* @param model
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Object apiAction(FangjiaModel model) {
|
public Object apiAction(FangjiaModel model, HttpServletRequest request) {
|
||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+5
@@ -48,6 +48,11 @@ public class AntiSpiderFilter implements Filter {
|
|||||||
|
|
||||||
HttpServletRequest request = (HttpServletRequest) req;
|
HttpServletRequest request = (HttpServletRequest) req;
|
||||||
HttpServletResponse response = (HttpServletResponse) resp;
|
HttpServletResponse response = (HttpServletResponse) resp;
|
||||||
|
// 放开首页不做爬虫验证
|
||||||
|
if (request.getRequestURL().toString().endsWith("fangjia.com") || request.getRequestURL().toString().endsWith("fangjia.com/")) {
|
||||||
|
chain.doFilter(req, resp);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if(request.getRequestURI().endsWith("/validate") || request.getRequestURI().contains("randomCode") || request.getRequestURI().contains("checkCode")|| request.getRequestURI().contains("yeepayCallBack")){
|
if(request.getRequestURI().endsWith("/validate") || request.getRequestURI().contains("randomCode") || request.getRequestURI().contains("checkCode")|| request.getRequestURI().contains("yeepayCallBack")){
|
||||||
chain.doFilter(req, resp);
|
chain.doFilter(req, resp);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -309,7 +309,17 @@
|
|||||||
<ladder>/</ladder>
|
<ladder>/</ladder>
|
||||||
</ladders>
|
</ladders>
|
||||||
</rule>
|
</rule>
|
||||||
|
|
||||||
|
<rule controller="saleLeads" action="didataApply" channel="enquire">
|
||||||
|
<ladders>
|
||||||
|
<ladder>/didataApply</ladder>
|
||||||
|
</ladders>
|
||||||
|
</rule>
|
||||||
|
<rule controller="saleLeads" action="didataResult" channel="enquire">
|
||||||
|
<ladders>
|
||||||
|
<ladder>/didataSuccess</ladder>
|
||||||
|
</ladders>
|
||||||
|
</rule>
|
||||||
|
|
||||||
<rule controller="saleLeads" action="result" channel="enquire">
|
<rule controller="saleLeads" action="result" channel="enquire">
|
||||||
<ladders>
|
<ladders>
|
||||||
|
|||||||
@@ -555,27 +555,53 @@ $(".user_btn").click(function(){
|
|||||||
scrollTo(0,0);
|
scrollTo(0,0);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 解决信息丢失问题
|
||||||
|
var work = $(".duty:visible").find("select").val()
|
||||||
|
if (work) {
|
||||||
|
work = work.replaceAll("请选择您的工作职能", "")
|
||||||
|
work = work.replaceAll("请选择", "")
|
||||||
|
$("#work").val(work);
|
||||||
|
}
|
||||||
|
|
||||||
|
var box = $(".demand p i.checked");
|
||||||
|
if(box.length>0) {
|
||||||
|
$(".demand").parent().find(".error span").text("")
|
||||||
|
$(".demand").parent().find(".error").hide();
|
||||||
|
var selectOtherFlag = false;
|
||||||
|
var content = []
|
||||||
|
box.each(function () {
|
||||||
|
var s = $(this).parent().find("span").text();
|
||||||
|
if (s.indexOf("请填写") > 0) {
|
||||||
|
selectOtherFlag = true;
|
||||||
|
} else {
|
||||||
|
content.push(s);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
$("#business").val(content.join("_"));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*if(!checkEmail()){
|
/*if(!checkEmail()){
|
||||||
scrollBy(0,-300);
|
scrollBy(0,-300);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!checkNature()){
|
|
||||||
scrollBy(0,-200);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if(!checkWork()){
|
if(!checkWork()){
|
||||||
scrollBy(0,-100);
|
scrollBy(0,-100);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!checkNature()){
|
||||||
|
scrollBy(0,-200);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if(mid=="1018"||mid=="1016"){
|
if(mid=="1018"||mid=="1016"){
|
||||||
if(!checkOtherInfo()){
|
if(!checkOtherInfo()){
|
||||||
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){
|
||||||
|
|||||||
@@ -0,0 +1,471 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
|
||||||
|
<title>时空价值挖掘平台 -地数 didata.ai</title>
|
||||||
|
<meta name="keywords" content="地址数据智能处理,时空价值计算,时空数据统计分析,自动化客户分类建模">
|
||||||
|
<meta name="description" content="提交联系信息,估家科技将为您提供详尽的产品功能及服务介绍">
|
||||||
|
<#include "../jsconstants.ftl" />
|
||||||
|
|
||||||
|
<link href="${staticUrl}/style/fangjia/v5/common.css?v=${version}" rel="stylesheet">
|
||||||
|
<link href="${staticUrl}/style/fangjia/v5/main.css?v=${version}" rel="stylesheet">
|
||||||
|
<link href="${staticUrl}/style/fangjia/v5/city.css?v=${version}" rel="stylesheet">
|
||||||
|
<link href="${staticUrl}/style/fangjia/v5/user.css?v=${version}" rel="stylesheet">
|
||||||
|
<script src="${staticUrl}/js/fangjia/v5/jquery-1.7.2.min.js?v=${version}"></script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.inputInfoBox01 .inputInfo label.label01a{margin-top:10px;}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
if((navigator.userAgent.match(/(iPad|iPhone|iPod|Android|ios)/i))){
|
||||||
|
document.write("<link href='${staticUrl}/style/fangjia/v5/sm.css?v=${version}' rel='stylesheet'>");
|
||||||
|
document.write("<link href='${staticUrl}/style/fangjia/v5/main-m.css?v=${version}' rel='stylesheet'>");
|
||||||
|
document.write("<link href='${staticUrl}/style/fangjia/v5/city-m.css?v=${version}' rel='stylesheet'>");
|
||||||
|
document.write("<link href='${staticUrl}/style/fangjia/v5/theme-orange.css?v=${version}' rel='stylesheet'>");
|
||||||
|
document.write("<link href='${staticUrl}/style/fangjia/v5/mobile.css?v=${version}' rel='stylesheet'>");
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
@media(max-device-width:768px){
|
||||||
|
.main{padding-top:0;}
|
||||||
|
.main_left{display:none;}
|
||||||
|
.main_right{float:none;width:100%;}
|
||||||
|
.user{width:100%;margin-top:6rem;}
|
||||||
|
.user02{margin-left:0;}
|
||||||
|
.title{text-align:center;position:static;}
|
||||||
|
.title p{margin:1rem;}
|
||||||
|
.content{padding:0 1rem;padding-top:2rem;}
|
||||||
|
.content03 .inputInfoBox{overflow:visible;}
|
||||||
|
.inputInfoBox01{float:none;}
|
||||||
|
.inputInfoBox01 .inputInfo{width:100%;height:40px;margin-bottom:20px;clear:both;}
|
||||||
|
.inputInfoBox01 .inputInfo label{float:left;line-height:40px;}
|
||||||
|
.inputInfoBox01 .inputInfo label.label01{float:left;line-height:20px;width:66px;}
|
||||||
|
.inputInfoBox01 .inputInfo label.label01a{clear:both;margin-bottom:17px;margin-top:17px;}
|
||||||
|
.inputInfoBox01 .inputInfo label i{margin-left:5px;}
|
||||||
|
.inputInfoBox01a{margin-right:0;}
|
||||||
|
.inpu,.sel{height:40px;line-height:40px;}
|
||||||
|
.inpu,.sel,.demand{width:89.5%;float:right;}
|
||||||
|
.dialogBox .inpu{float:left;}
|
||||||
|
.inpu01{width:70%;}
|
||||||
|
.inpu02a{margin-top:17px;}
|
||||||
|
#selectedCity{width:auto;}
|
||||||
|
.error01{top:-17px;left:78px;}
|
||||||
|
.user_btn,.line{width:100%;}
|
||||||
|
.footerM{display:none;}
|
||||||
|
}
|
||||||
|
@media(max-device-width:414px){
|
||||||
|
.inpu,.sel,.demand{width:79.5%;}
|
||||||
|
.inpu01{width:45%;}
|
||||||
|
}
|
||||||
|
@media(max-device-width:375px){
|
||||||
|
.inpu,.sel,.demand{width:77%;}
|
||||||
|
.inpu01{width:40%;}
|
||||||
|
}
|
||||||
|
@media(max-device-width:320px){
|
||||||
|
.inpu,.sel,.demand{width:73%;}
|
||||||
|
.inpu01{width:30%;}
|
||||||
|
.demand p span{width:80%;}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<#escape x as x?html>
|
||||||
|
<div class="header">
|
||||||
|
<div style="background-color: black;">
|
||||||
|
<div class="logo" style="padding-top:2px;">
|
||||||
|
<img class="img-box__img4" src="http://www.didata.ai/upload/20220522/3324a05faa1a88d483572ec64ac48c82.png"></img>
|
||||||
|
<#-- <a href="http://www.didata.ai/upload/20220522/3324a05faa1a88d483572ec64ac48c82.png"></a>-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="main">
|
||||||
|
<div class="main_right">
|
||||||
|
<div class="user user02">
|
||||||
|
<div class="title">
|
||||||
|
<p><label>预约产品Demo申请</label></p>
|
||||||
|
<div style="text-align:left; margin-left: 2rem; font-size: 18px">我们很乐意为您提供帮助</div>
|
||||||
|
<div style="text-align:left; margin-left: 3rem">√ 详尽的产品功能及服务介绍</div>
|
||||||
|
<div style="text-align:left; margin-left: 3rem">√ 针对您所处的行业与业务场景,提供专业的服务方案<br/></div>
|
||||||
|
<div style="text-align:left; margin-left: 3rem">√ 根据您的业务规模和需求,提供优惠的价格方案<br/></div>
|
||||||
|
<div style="text-align:left; margin-left: 3rem">紧急咨询可拨打<strong>400-188-3787</strong><br/></div>
|
||||||
|
<div style="text-align:left; margin-left: 3rem">预约申请请留下您的联系方式,我们会尽快与您联系<br/></div>
|
||||||
|
</div>
|
||||||
|
<div class="content content03">
|
||||||
|
<form action="${wwwUrl}/saleLeads/doAdd" method="POST" id="_add_form">
|
||||||
|
<input type="hidden" name="mid" value="${mid!}"/>
|
||||||
|
<input type="hidden" name="downUrl" value="${downUrl!}"/>
|
||||||
|
<input type="hidden" name="backUrl" value="${backUrl!}"/>
|
||||||
|
<input type="hidden" name="resourceId" value="${resourceId!}"/>
|
||||||
|
<div class="inputInfoBox">
|
||||||
|
<div class="inputInfoBox01 inputInfoBox01a">
|
||||||
|
<div class="inputInfo">
|
||||||
|
<label>您的姓名<i>*</i></label>
|
||||||
|
<input class="inpu inpu02" name="saleLeads.uname" id="uname" type="text" autocomplete="off" placeholder="请输入您的姓名">
|
||||||
|
<div class="error error01 dn"><i></i><span></span></div>
|
||||||
|
</div>
|
||||||
|
<div class="inputInfo">
|
||||||
|
<label>公司名称<i>*</i></label>
|
||||||
|
<input class="inpu inpu02" name="saleLeads.company" id="company" type="text" autocomplete="off" placeholder="请输入您的公司名称">
|
||||||
|
<div class="error error01 dn"><i></i><span></span></div>
|
||||||
|
</div>
|
||||||
|
<div class="inputInfo">
|
||||||
|
<label><a class="ls2_01">手</a><a class="ls2_02">机</a><i>*</i></label>
|
||||||
|
<input class="inpu inpu02" type="text" name="saleLeads.mobile" id="mobile" autocomplete="off" placeholder="请输入您的手机号码">
|
||||||
|
<div class="error error01 dn"><i></i><span></span></div>
|
||||||
|
</div>
|
||||||
|
<div class="inputInfo">
|
||||||
|
<label><a class="ls2_01">留</a><a class="ls2_02">言</a><i></i></label>
|
||||||
|
<textarea class="inpu inpu02" scoll="auto" style="height:60px;padding-top:2px;" name="saleLeads.business" id="business">
|
||||||
|
</textarea>
|
||||||
|
<div class="error error01 dn"><i></i><span></span></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<a class="user_btn" style="background: #6db5ea">提交</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<#include "../citys.ftl"/>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
@media(max-device-width:768px){
|
||||||
|
.main{padding-top:0;}
|
||||||
|
.main_left{display:none;}
|
||||||
|
.main_right{float:none;width:100%;}
|
||||||
|
.user{width:100%;margin-top:6rem;}
|
||||||
|
.user02{margin-left:0;}
|
||||||
|
.title{text-align:center;position:static;}
|
||||||
|
.title p{margin:1rem;}
|
||||||
|
.content{padding:0 1rem;padding-top:2rem;}
|
||||||
|
.content03 .inputInfoBox{overflow:visible;}
|
||||||
|
.inputInfoBox01{float:none;}
|
||||||
|
.inputInfoBox01 .inputInfo{width:100%;height:40px;margin-bottom:20px;clear:both;}
|
||||||
|
.inputInfoBox01 .inputInfo label{float:left;line-height:40px;}
|
||||||
|
.inputInfoBox01 .inputInfo label.label01{float:left;line-height:20px;width:66px;}
|
||||||
|
.inputInfoBox01 .inputInfo label.label01a{clear:both;margin-bottom:17px;margin-top:17px;}
|
||||||
|
.inputInfoBox01 .inputInfo label i{margin-left:5px;}
|
||||||
|
.inputInfoBox01a{margin-right:0;}
|
||||||
|
.inpu,.sel{height:40px;line-height:40px;}
|
||||||
|
.inpu,.sel,.demand{width:89.5%;float:right;}
|
||||||
|
.dialogBox .inpu{float:left;}
|
||||||
|
.inpu01{width:70%;}
|
||||||
|
.inpu02a{margin-top:17px;}
|
||||||
|
#selectedCity{width:auto;}
|
||||||
|
.error01{top:-17px;left:78px;}
|
||||||
|
.user_btn,.line{width:100%;}
|
||||||
|
.footerM{display:none;}
|
||||||
|
}
|
||||||
|
@media(max-device-width:414px){
|
||||||
|
.inpu,.sel,.demand{width:79.5%;}
|
||||||
|
.inpu01{width:45%;}
|
||||||
|
}
|
||||||
|
@media(max-device-width:375px){
|
||||||
|
.inpu,.sel,.demand{width:77%;}
|
||||||
|
.inpu01{width:40%;}
|
||||||
|
}
|
||||||
|
@media(max-device-width:320px){
|
||||||
|
.inpu,.sel,.demand{width:73%;}
|
||||||
|
.inpu01{width:30%;}
|
||||||
|
.demand p span{width:80%;}
|
||||||
|
}
|
||||||
|
.img-box__img4 {
|
||||||
|
background-color: black;
|
||||||
|
width: 100%;
|
||||||
|
height: 50px;
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var retFlag = 1;
|
||||||
|
</script>
|
||||||
|
<script type="text/javascript" src="${staticUrl}/js/fangjiaNew.js?v=${version}"></script>
|
||||||
|
<script src="${staticUrl}/js/fangjia/v5/main.js?v=${version}"></script>
|
||||||
|
<script src="${staticUrl}/js/fangjia/v5/city.js?v=${version}"></script>
|
||||||
|
|
||||||
|
<script type="text/javascript" src="//g.alicdn.com/sj/lib/zepto/zepto.js" charset="utf-8"></script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
/* 关闭路由,以实现不同页面之间的相互跳转(仅开发环境需要) */
|
||||||
|
Zepto = $
|
||||||
|
$.config = {router: false}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script src="${staticUrl}/js/fangjia/v5/light7.js?v=${version}"></script>
|
||||||
|
<script src="${staticUrl}/js/fangjia/v5/cn.js?v=${version}"></script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var controllerName = '${controllerName}';
|
||||||
|
var mid = '${mid!}'
|
||||||
|
$(function(){
|
||||||
|
if((navigator.userAgent.match(/(iPad|iPhone|iPod|Android|ios)/i))){
|
||||||
|
$(".popup-about01 .tabs a").removeAttr("href");//去除城市页面跳转
|
||||||
|
}
|
||||||
|
})
|
||||||
|
$(".user_btn").click(function(){
|
||||||
|
if(!checkContactName()){
|
||||||
|
scrollTo(0,0);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!checkCompany()){
|
||||||
|
scrollTo(0,0);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!checkMobile2()){
|
||||||
|
scrollTo(0,0);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*if(!checkEmail()){
|
||||||
|
scrollBy(0,-300);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(!checkWork()){
|
||||||
|
scrollBy(0,-100);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!checkNature()){
|
||||||
|
scrollBy(0,-200);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(mid=="1018"||mid=="1016"){
|
||||||
|
if(!checkOtherInfo()){
|
||||||
|
scrollBy(0,-100);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
// var cls = $(".agreement i").attr("class");
|
||||||
|
// if(cls.indexOf("checked")>-1){
|
||||||
|
// $("#emailStatus").val(true);
|
||||||
|
// }else{
|
||||||
|
// $("#emailStatus").val(false);
|
||||||
|
// }
|
||||||
|
$("#_add_form").submit();
|
||||||
|
});
|
||||||
|
|
||||||
|
function checkOtherNature(){
|
||||||
|
var otherNature = $("#otherIndustryNature").val();
|
||||||
|
if($.trim(otherNature) == ""){
|
||||||
|
$("#otherIndustryNature").parent().find(".error:eq(0)").show();
|
||||||
|
$("#otherIndustryNature").parent().find(".error:eq(0) span").text("其他行业性质不能为空");
|
||||||
|
return false;
|
||||||
|
}else{
|
||||||
|
|
||||||
|
$("#otherIndustryNature").parent().find(".error:eq(0)").hide();
|
||||||
|
if(!checkIndustryNature()){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkIndustryNature(){
|
||||||
|
var otherWork = $("#otherWork2").val();
|
||||||
|
if($.trim(otherWork) == ""){
|
||||||
|
$("#otherIndustryNature").parent().find(".error:eq(1) span").text("其他工作职能不能为空");
|
||||||
|
$("#otherIndustryNature").parent().find(".error:eq(1)").removeClass("dn")
|
||||||
|
return false;
|
||||||
|
}else{
|
||||||
|
$("#otherIndustryNature").parent().find(".error:eq(1)").hide();
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkWork(){
|
||||||
|
var val = $("#nature").val();
|
||||||
|
if(val!=""){
|
||||||
|
if(val.indexOf("请填写")>0){
|
||||||
|
return checkOtherNature();
|
||||||
|
}else{
|
||||||
|
var work = $(".duty:visible").find("select").val()
|
||||||
|
if($.trim(work) == "请选择您的工作职能"){
|
||||||
|
$(".duty:visible").find(".error span").text("工作职能不能为空");
|
||||||
|
$(".duty:visible").find(".error").show();
|
||||||
|
return false;
|
||||||
|
}else if(work.indexOf("请填写")>-1){
|
||||||
|
return checkOtherWork();
|
||||||
|
}else{
|
||||||
|
$("#work").val(work);
|
||||||
|
$(".duty:visible").find(".error").text("");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkOtherWork(){
|
||||||
|
var otherWork = $("#otherWork").val();
|
||||||
|
if($.trim(otherWork) == ""){
|
||||||
|
$("#otherWork").parent().find(".error span").text("其他工作职能不能为空");
|
||||||
|
$("#otherWork").parent().find(".error").show();
|
||||||
|
return false;
|
||||||
|
}else{
|
||||||
|
$("#otherWork").parent().find(".error").text("");
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkNature(){
|
||||||
|
var val = $("#nature").val();
|
||||||
|
if ($.trim(val) == "") {
|
||||||
|
$("#nature").parent().find(".error span").text("行业性质不能为空");
|
||||||
|
$("#nature").parent().find(".error").show();
|
||||||
|
return false;
|
||||||
|
}else{
|
||||||
|
$("#nature").parent().find(".error").text("");
|
||||||
|
|
||||||
|
if(val.indexOf("请填写")>-1){
|
||||||
|
return checkOtherNature();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkMobile2(){
|
||||||
|
var val = $("#mobile").val();
|
||||||
|
if ($.trim(val) == "") {
|
||||||
|
$("#mobile").parent().find(".error span").text("手机号码不能为空");
|
||||||
|
$("#mobile").parent().find(".error").show();
|
||||||
|
return false;
|
||||||
|
}else if(!(/^1\d{10}$/.test(val))){
|
||||||
|
$("#mobile").parent().find(".error span").text("手机号码格式错误");
|
||||||
|
$("#mobile").parent().find(".error").show();
|
||||||
|
return false;
|
||||||
|
} else{
|
||||||
|
$("#mobile").parent().find(".error").text("");
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkContactName(){
|
||||||
|
var val = $("#uname").val();
|
||||||
|
if ($.trim(val) == "") {
|
||||||
|
$("#uname").parent().find(".error span").text("您的姓名不能为空");
|
||||||
|
$("#uname").parent().find(".error").show();
|
||||||
|
return false;
|
||||||
|
}else{
|
||||||
|
$("#uname").parent().find(".error").hide();
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkEmail(){
|
||||||
|
var val = $("#email").val();
|
||||||
|
if($.trim(val) == ""){
|
||||||
|
$("#email").parent().find(".error span").text("电子邮箱不能为空");
|
||||||
|
$("#email").parent().find(".error").show();
|
||||||
|
return false;
|
||||||
|
}else if (!/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/.test(val)) {
|
||||||
|
$("#email").parent().find(".error span").text("电子邮箱格式错误");
|
||||||
|
$("#email").parent().find(".error").show();
|
||||||
|
return false;
|
||||||
|
}else{
|
||||||
|
$("#email").parent().find(".error").text("");
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkCompany(){
|
||||||
|
var val = $("#company").val();
|
||||||
|
if ($.trim(val) === "") {
|
||||||
|
$("#company").parent().find(".error span").text("公司名称不能为空");
|
||||||
|
$("#company").parent().find(".error").show();
|
||||||
|
return false;
|
||||||
|
}else{
|
||||||
|
$("#company").parent().find(".error").text("");
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function checkOtherInfo(){
|
||||||
|
var box = $(".demand p i.checked");
|
||||||
|
if(box.length>0){
|
||||||
|
$(".demand").parent().find(".error span").text("")
|
||||||
|
$(".demand").parent().find(".error").hide();
|
||||||
|
var selectOtherFlag = false;
|
||||||
|
var content = []
|
||||||
|
box.each(function(){
|
||||||
|
var s = $(this).parent().find("span").text();
|
||||||
|
if(s.indexOf("请填写")>0){
|
||||||
|
selectOtherFlag = true;
|
||||||
|
}
|
||||||
|
content.push(s);
|
||||||
|
})
|
||||||
|
$("#business").val(content.join("_"));
|
||||||
|
|
||||||
|
if(selectOtherFlag){
|
||||||
|
var otherBusiness = $("#otherBusiness").val();
|
||||||
|
if ($.trim(otherBusiness) == "") {
|
||||||
|
$("#otherBusiness").parent().find(".error span").text("其他业务需求不能为空");
|
||||||
|
$("#otherBusiness").parent().find(".error").show();
|
||||||
|
return false;
|
||||||
|
}else{
|
||||||
|
$("#otherBusiness").parent().find(".error").text("");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
$(".demand").parent().find(".error span").text("请至少勾选1项业务需求")
|
||||||
|
$(".demand").parent().find(".error").show();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 定位城市 */
|
||||||
|
$("body").on("click", ".letter a", function () {
|
||||||
|
var s = $(this).html();
|
||||||
|
$(".content").scrollTop(0);
|
||||||
|
$(".content").scrollTop($("#" + s + "1").offset().top - 66);
|
||||||
|
});
|
||||||
|
$(".content-block01").scroll(function () {
|
||||||
|
$(".content-block01 .letter").css("position","absolute");
|
||||||
|
$(".content-block01 .letter").css("top", 116 - $("#cityContainer").position().top);
|
||||||
|
});
|
||||||
|
|
||||||
|
/* 获取城市 移动端 */
|
||||||
|
$(".popup-about01 .cityGPS").on("click", function () {
|
||||||
|
$("#selectedCity,#city").val($(this).find("p").text());
|
||||||
|
//$(".adBoxApp01").show();
|
||||||
|
});
|
||||||
|
$("body").delegate(".popup-about01 a","click", function(){
|
||||||
|
$("#selectedCity,#city").val($(this).text());
|
||||||
|
//$(".adBoxApp01").show();
|
||||||
|
});
|
||||||
|
$(".popup-about01-mobile .cityGPS").on("click", function () {
|
||||||
|
$("#selectedCity,#city").val($(this).find("p").text());
|
||||||
|
//$(".adBoxApp01").show();
|
||||||
|
});
|
||||||
|
$("body").delegate(".popup-about01-mobile a","click", function(){
|
||||||
|
$("#selectedCity,#city").val($(this).text());
|
||||||
|
//$(".adBoxApp01").show();
|
||||||
|
});
|
||||||
|
$(".popup-about01 .icon-left").on("click", function () {
|
||||||
|
//$(".adBoxApp01").show();
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</#escape>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,86 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
|
||||||
|
<title>咨询信息提交成功 - 地数 didata.ai</title>
|
||||||
|
<meta name="keywords" content="">
|
||||||
|
<meta name="description" content="">
|
||||||
|
|
||||||
|
<link href="${staticUrl}/style/fangjia/v5/common.css?v=${version}" rel="stylesheet">
|
||||||
|
<link href="${staticUrl}/style/fangjia/v5/main.css?v=${version}" rel="stylesheet">
|
||||||
|
<link href="${staticUrl}/style/fangjia/v5/user.css?v=${version}" rel="stylesheet">
|
||||||
|
<script src="${staticUrl}/js/fangjia/v5/jquery-1.7.2.min.js?v=${version}"></script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
if((navigator.userAgent.match(/(iPad|iPhone|iPod|Android|ios)/i))){
|
||||||
|
document.write("<link href='${staticUrl}/style/fangjia/v5/mobile.css?v=${version}' rel='stylesheet'>");
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
@media(max-device-width:768px){
|
||||||
|
.main{padding-top:0;}
|
||||||
|
.main_right{float:none;width:100%;}
|
||||||
|
.user{width:90%;margin-top:15rem;}
|
||||||
|
.footerM{display:none;}
|
||||||
|
}
|
||||||
|
.img-box__img4 {
|
||||||
|
background-color: black;
|
||||||
|
width: 100%;
|
||||||
|
height: 50px;
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div class="header">
|
||||||
|
<div style="background-color: black;">
|
||||||
|
<div class="logo" style="padding-top:2px;">
|
||||||
|
<img class="img-box__img4" src="http://www.didata.ai/upload/20220522/3324a05faa1a88d483572ec64ac48c82.png"></img>
|
||||||
|
<#-- <a href="http://www.didata.ai/upload/20220522/3324a05faa1a88d483572ec64ac48c82.png"></a>-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="main">
|
||||||
|
<div class="main_right">
|
||||||
|
<div class="user user03">
|
||||||
|
<div class="content">
|
||||||
|
<p class="success"><i></i>您的信息已提交成功</p>
|
||||||
|
<p class="link" style="color:#333;">我们的专业数据顾问将会尽快与您取得联系,感谢您的咨询!</p>
|
||||||
|
<p class="note">若您有任何问题,欢迎拨打客服电话:<a>400-188-3787</a></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
@media(max-device-width:768px){
|
||||||
|
.main{padding-top:0;}
|
||||||
|
.main_right{float:none;width:100%;}
|
||||||
|
.user{width:90%;margin-top:15rem;}
|
||||||
|
.footerM{display:none;}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<script src="${staticUrl}/js/fangjia/v5/main.js?v=${version}"></script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
var url = '${backUrl!}';
|
||||||
|
var downUrl = '${downUrl!}';
|
||||||
|
|
||||||
|
if(!downUrl){
|
||||||
|
setTimeout("location.href='"+url+"'",3000);
|
||||||
|
}else{
|
||||||
|
setTimeout("location.href='"+url+"&downUrl="+downUrl+"'",3000);
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
+2
-1
@@ -22,7 +22,8 @@ public enum SalesLeadEnum {
|
|||||||
DOWN_APPLY("1016", "下载申请"),
|
DOWN_APPLY("1016", "下载申请"),
|
||||||
FDANG_DIAO_BAO_GAO("1017", "房产专业调查评估报告"),
|
FDANG_DIAO_BAO_GAO("1017", "房产专业调查评估报告"),
|
||||||
BUSINESS_ASK("1018", "业务咨询"),
|
BUSINESS_ASK("1018", "业务咨询"),
|
||||||
HOUSE_EVAL("1019", "房产评估");
|
HOUSE_EVAL("1019", "房产评估"),
|
||||||
|
DIDATA("1020", "地数平台");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+35
-39
@@ -56,47 +56,43 @@ class BigdataDealBatch extends BaseBatch{
|
|||||||
def ccbCitys = CcbCommonUtils.citys;
|
def ccbCitys = CcbCommonUtils.citys;
|
||||||
|
|
||||||
for(def city : citys){
|
for(def city : citys){
|
||||||
if(!ccbCitys.contains(city)){
|
// if(!ccbCitys.contains(city)){
|
||||||
addDealPriceMatch(city);
|
addDealPriceMatch(city);
|
||||||
}
|
|
||||||
}
|
|
||||||
//// println citys.unique().size()
|
|
||||||
// def rows = []
|
|
||||||
// def headers = []//["城市ID","成交ID","城市名称","行政区ID","行政区名称","街道","门牌号","小区ID","小区名称","楼栋ID","楼栋编号","楼栋名称","单元ID","单元编号","单元名称","户ID","详细地址","建筑年代","权属","权属年限","期数","所在楼层","层类型","总楼层数","建筑类型","建筑结构","建筑面积","套内面积","户型","室","厅","厨","卫","房屋用途","室内结构","朝向","装修情况","评估编号","成交单价","成交总价","申报总价","评估总价","网签合同编号","交易日期","交易类型","出售付款方式","成交周期","是否有电梯","赠送面积(地面花园)","赠送面积(露台)","赠送面积(阳台)","赠送面积(飘窗)","赠送面积(阁楼)","赠送面积(车库)","赠送面积(地下室)","赠送面积(其他)","房源数据来源","中介公司ID","中介公司名称","备注","创建时间","更新时间","来源公司","成交金额","数据时间"]
|
|
||||||
// def cityCodeDataMap = CcbCommonUtils.findCityCodeValue()
|
|
||||||
// for(def city : citys){
|
|
||||||
// def distCodeMap = CcbCommonUtils.findAllDistrictCodeValue(city)
|
|
||||||
// def ppeDists = [:]
|
|
||||||
//// if(["贵阳","佛山","杭州","沈阳","天津","中山","徐州","绍兴","南通","哈尔滨","惠州","长沙","青岛","长春","烟台","温州","太原","台州","石家庄","宁波","常州","大连","嘉兴","金华","昆明"].contains(city)){
|
|
||||||
//// ppeDists = getPpeGTE15Datas(city)
|
|
||||||
//// }
|
|
||||||
//
|
|
||||||
// def statMap = [:]//getDistrictStatByCity(city, weekend)
|
|
||||||
// if(city=="上海"){
|
|
||||||
// def youDataTrade = getYouDaData(statMap)
|
|
||||||
// def youdaDatas = createData(youDataTrade, cityCodeDataMap, distCodeMap, "youda")
|
|
||||||
// rows.addAll(youdaDatas)
|
|
||||||
// println city +" "+youdaDatas.size()
|
|
||||||
// }
|
// }
|
||||||
//
|
}
|
||||||
//
|
def rows = []
|
||||||
// def trades = getCityData(city, statMap, ppeDists)
|
def headers = []//["城市ID","成交ID","城市名称","行政区ID","行政区名称","街道","门牌号","小区ID","小区名称","楼栋ID","楼栋编号","楼栋名称","单元ID","单元编号","单元名称","户ID","详细地址","建筑年代","权属","权属年限","期数","所在楼层","层类型","总楼层数","建筑类型","建筑结构","建筑面积","套内面积","户型","室","厅","厨","卫","房屋用途","室内结构","朝向","装修情况","评估编号","成交单价","成交总价","申报总价","评估总价","网签合同编号","交易日期","交易类型","出售付款方式","成交周期","是否有电梯","赠送面积(地面花园)","赠送面积(露台)","赠送面积(阳台)","赠送面积(飘窗)","赠送面积(阁楼)","赠送面积(车库)","赠送面积(地下室)","赠送面积(其他)","房源数据来源","中介公司ID","中介公司名称","备注","创建时间","更新时间","来源公司","成交金额","数据时间"]
|
||||||
// def rets = createData(trades, cityCodeDataMap, distCodeMap, "other")
|
def cityCodeDataMap = CcbCommonUtils.findCityCodeValue()
|
||||||
// rows.addAll(rets)
|
for(def city : citys){
|
||||||
// println city +" 成交共:"+rets.size()
|
def distCodeMap = CcbCommonUtils.findAllDistrictCodeValue(city)
|
||||||
//
|
def ppeDists = [:]
|
||||||
// def cityDatas = []
|
|
||||||
// cityDatas << headers
|
def statMap = [:]//getDistrictStatByCity(city, weekend)
|
||||||
// cityDatas.addAll(rows)
|
if(city=="上海"){
|
||||||
// }
|
def youDataTrade = getYouDaData(statMap)
|
||||||
//
|
def youdaDatas = createData(youDataTrade, cityCodeDataMap, distCodeMap, "youda")
|
||||||
// def fileName = "/home/goojia/ccb/BIGDATA_DEAL_GJ.dat"
|
rows.addAll(youdaDatas)
|
||||||
// if(CommonDatautils.isWindow()){
|
println city +" "+youdaDatas.size()
|
||||||
// fileName = "d:\\数据\\建行\\房产估值\\数据文件\\txt\\BIGDATA_DEAL_GJ.dat"
|
}
|
||||||
// }
|
|
||||||
//
|
|
||||||
// FileUtils.batchCreateFile(rows, fileName,headers, "utf-8", false);
|
def trades = getCityData(city, statMap, ppeDists)
|
||||||
// println "txt 生成"
|
def rets = createData(trades, cityCodeDataMap, distCodeMap, "other")
|
||||||
|
rows.addAll(rets)
|
||||||
|
println city +" 成交共:"+rets.size()
|
||||||
|
|
||||||
|
def cityDatas = []
|
||||||
|
cityDatas << headers
|
||||||
|
cityDatas.addAll(rows)
|
||||||
|
}
|
||||||
|
|
||||||
|
def fileName = "/home/goojia/ccb/BIGDATA_DEAL_GJ.dat"
|
||||||
|
if(CommonDatautils.isWindow()){
|
||||||
|
fileName = "d:\\数据\\建行\\房产估值\\数据文件\\txt\\BIGDATA_DEAL_GJ.dat"
|
||||||
|
}
|
||||||
|
|
||||||
|
FileUtils.batchCreateFile(rows, fileName,headers, "utf-8", false);
|
||||||
|
println "txt 生成"
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -373,10 +373,10 @@ class DealPriceDataProcess {
|
|||||||
def citys = CcbCommonUtils.citys
|
def citys = CcbCommonUtils.citys
|
||||||
def cityCodeDataMap = CcbCommonUtils.findCityCodeValue()
|
def cityCodeDataMap = CcbCommonUtils.findCityCodeValue()
|
||||||
def publishTime = '2021-10-01'
|
def publishTime = '2021-10-01'
|
||||||
def month = 202204
|
def month = 202205
|
||||||
def rows = []
|
def rows = []
|
||||||
for(def city : citys) {
|
for(def city : citys) {
|
||||||
def rets = findPeGteThirdParty(city, 202205)
|
def rets = findPeGteThirdParty(city, 202206)
|
||||||
def total = 0
|
def total = 0
|
||||||
println city +" "+rets.size()
|
println city +" "+rets.size()
|
||||||
for(def m : rets){
|
for(def m : rets){
|
||||||
@@ -388,7 +388,7 @@ class DealPriceDataProcess {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def findPeGteThirdParty(cityName, yearmonth){
|
def findPeGteThirdParty(cityName, yearmonth){
|
||||||
def sql = "select commid,target_avg_price from avm_evaluation_item_gj where year_month=${yearmonth} and data_type='第三方' and cityname='${cityName}' and pe>50"
|
def sql = "select commid,target_avg_price from avm_evaluation_item_gj where year_month=${yearmonth} and data_type='第三方' and cityname='${cityName}' and pe>30"
|
||||||
def rets = []
|
def rets = []
|
||||||
sqlInstance236.eachRow(sql,{r->
|
sqlInstance236.eachRow(sql,{r->
|
||||||
def map = [:]
|
def map = [:]
|
||||||
|
|||||||
+182
-106
@@ -23,7 +23,7 @@ class ExportOracleData {
|
|||||||
def run() {
|
def run() {
|
||||||
// def curMonth = Integer.parseInt(DateUtils.addMonth(DateUtils.formatDateByPattern(new Date(), "yyyyMM"), 0, "yyyyMM"));
|
// def curMonth = Integer.parseInt(DateUtils.addMonth(DateUtils.formatDateByPattern(new Date(), "yyyyMM"), 0, "yyyyMM"));
|
||||||
def lastMonth = Integer.parseInt(DateUtils.addMonth(DateUtils.formatDateByPattern(new Date(), "yyyyMM"), -1, "yyyyMM"));
|
def lastMonth = Integer.parseInt(DateUtils.addMonth(DateUtils.formatDateByPattern(new Date(), "yyyyMM"), -1, "yyyyMM"));
|
||||||
|
def new_dists = ["350604","350605","410307","410308","450181"]
|
||||||
//不会变
|
//不会变
|
||||||
exportEvaluationRateData()
|
exportEvaluationRateData()
|
||||||
exportBigdataPoiData()
|
exportBigdataPoiData()
|
||||||
@@ -37,9 +37,9 @@ class ExportOracleData {
|
|||||||
exportCommunityStaging()
|
exportCommunityStaging()
|
||||||
exportCommunityBuileType()
|
exportCommunityBuileType()
|
||||||
|
|
||||||
exportThirdPartyPrice2(lastMonth)
|
exportThirdPartyPrice2(lastMonth, new_dists)
|
||||||
exportBigdataForsale("2022-04-19")
|
exportBigdataForsale("2022-05-19", new_dists)
|
||||||
exportBigdataDeal("2022-04-01")
|
exportBigdataDeal("2022-05-01", new_dists)
|
||||||
|
|
||||||
|
|
||||||
//计算结果相关
|
//计算结果相关
|
||||||
@@ -293,12 +293,51 @@ class ExportOracleData {
|
|||||||
println "COMMUNITY_GUIDE_PRICE_GJ 上传Ftp完成......"
|
println "COMMUNITY_GUIDE_PRICE_GJ 上传Ftp完成......"
|
||||||
}
|
}
|
||||||
|
|
||||||
def exportBigdataDeal(def dealDate) {
|
def exportBigdataDeal(def dealDate, def new_dists) {
|
||||||
def sql = "select CITYID, DEALID, CITYNAME, DISTID, DISTNAME, STREET, STREETNO, COMMID, COMMNAME, BUILDID, BUILDNO, BUILDNAME, UNITID, UNITNO, UNITNAME, \n" +
|
|
||||||
"HOUSEID, ADDRESS, BUILDYEAR, PROPTYPE, PROPYEARS, PERIODNUM, FLOORNUM, FLOORTYPE, FLOORCNT, BUILDTYPE, BUILDSTRU, BUILDAREA, LIVINGAREA, HOUSESTYLE, ROOMCNT, LIVINGROOMCNT, KITCHENCNT, BATHROOMCNT, \n" +
|
def allRows = []
|
||||||
"HOUSEUSE, HOUSESTRU, HOUSEASPECT, FITMENT, EVALUATENO, DEALUNITPRICE, DEALTOTALPRICE, DECLAREPRICE, EVALUATEPRICE, CONTRACTNO, to_char(DEALDATE,'yyyy-mm-dd') as DEALDATE, DEALTYPE, \n" +
|
if(new_dists){
|
||||||
"PAYTYPE, DEALPERIOD, IFELEVATOR, COMPAREAGARDEN, COMPAREATERRACE, COMPAREABALCONY, COMPAREABAYWINDOW, COMPAREAATTIC, COMPAREAGARAGE, COMPAREABASEMENT, COMPAREAOTHER, DATASOURCE, AGENCYID, AGENCYNAME, REMARK, to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME,SOURCECODE, CJJE, WORKDATE\n" +
|
def newstr = "('"+new_dists.join("','")+"')"
|
||||||
"from bigdata_deal_gj where dealdate>=to_date('${dealDate}','yyyy-MM-dd')";
|
def sql1 = "select CITYID, DEALID, CITYNAME, DISTID, DISTNAME, STREET, STREETNO, COMMID, COMMNAME, BUILDID, BUILDNO, BUILDNAME, UNITID, UNITNO, UNITNAME, \n" +
|
||||||
|
"HOUSEID, ADDRESS, BUILDYEAR, PROPTYPE, PROPYEARS, PERIODNUM, FLOORNUM, FLOORTYPE, FLOORCNT, BUILDTYPE, BUILDSTRU, BUILDAREA, LIVINGAREA, HOUSESTYLE, ROOMCNT, LIVINGROOMCNT, KITCHENCNT, BATHROOMCNT, \n" +
|
||||||
|
"HOUSEUSE, HOUSESTRU, HOUSEASPECT, FITMENT, EVALUATENO, DEALUNITPRICE, DEALTOTALPRICE, DECLAREPRICE, EVALUATEPRICE, CONTRACTNO, to_char(DEALDATE,'yyyy-mm-dd') as DEALDATE, DEALTYPE, \n" +
|
||||||
|
"PAYTYPE, DEALPERIOD, IFELEVATOR, COMPAREAGARDEN, COMPAREATERRACE, COMPAREABALCONY, COMPAREABAYWINDOW, COMPAREAATTIC, COMPAREAGARAGE, COMPAREABASEMENT, COMPAREAOTHER, DATASOURCE, AGENCYID, AGENCYNAME, REMARK, to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME,SOURCECODE, CJJE, WORKDATE\n" +
|
||||||
|
"from bigdata_deal_gj where dealdate>=to_date('${dealDate}','yyyy-MM-dd') and distid not in ${newstr}"
|
||||||
|
def rets1 = dealData(sql1)
|
||||||
|
|
||||||
|
def sql2 = "select CITYID, DEALID, CITYNAME, DISTID, DISTNAME, STREET, STREETNO, COMMID, COMMNAME, BUILDID, BUILDNO, BUILDNAME, UNITID, UNITNO, UNITNAME, \n" +
|
||||||
|
"HOUSEID, ADDRESS, BUILDYEAR, PROPTYPE, PROPYEARS, PERIODNUM, FLOORNUM, FLOORTYPE, FLOORCNT, BUILDTYPE, BUILDSTRU, BUILDAREA, LIVINGAREA, HOUSESTYLE, ROOMCNT, LIVINGROOMCNT, KITCHENCNT, BATHROOMCNT, \n" +
|
||||||
|
"HOUSEUSE, HOUSESTRU, HOUSEASPECT, FITMENT, EVALUATENO, DEALUNITPRICE, DEALTOTALPRICE, DECLAREPRICE, EVALUATEPRICE, CONTRACTNO, to_char(DEALDATE,'yyyy-mm-dd') as DEALDATE, DEALTYPE, \n" +
|
||||||
|
"PAYTYPE, DEALPERIOD, IFELEVATOR, COMPAREAGARDEN, COMPAREATERRACE, COMPAREABALCONY, COMPAREABAYWINDOW, COMPAREAATTIC, COMPAREAGARAGE, COMPAREABASEMENT, COMPAREAOTHER, DATASOURCE, AGENCYID, AGENCYNAME, REMARK, to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME,SOURCECODE, CJJE, WORKDATE\n" +
|
||||||
|
"from bigdata_deal_gj where distid in ${newstr}"
|
||||||
|
def rets2 = dealData(sql2)
|
||||||
|
allRows.addAll(rets1)
|
||||||
|
allRows.addAll(rets2)
|
||||||
|
}else{
|
||||||
|
def sql = "select CITYID, DEALID, CITYNAME, DISTID, DISTNAME, STREET, STREETNO, COMMID, COMMNAME, BUILDID, BUILDNO, BUILDNAME, UNITID, UNITNO, UNITNAME, \n" +
|
||||||
|
"HOUSEID, ADDRESS, BUILDYEAR, PROPTYPE, PROPYEARS, PERIODNUM, FLOORNUM, FLOORTYPE, FLOORCNT, BUILDTYPE, BUILDSTRU, BUILDAREA, LIVINGAREA, HOUSESTYLE, ROOMCNT, LIVINGROOMCNT, KITCHENCNT, BATHROOMCNT, \n" +
|
||||||
|
"HOUSEUSE, HOUSESTRU, HOUSEASPECT, FITMENT, EVALUATENO, DEALUNITPRICE, DEALTOTALPRICE, DECLAREPRICE, EVALUATEPRICE, CONTRACTNO, to_char(DEALDATE,'yyyy-mm-dd') as DEALDATE, DEALTYPE, \n" +
|
||||||
|
"PAYTYPE, DEALPERIOD, IFELEVATOR, COMPAREAGARDEN, COMPAREATERRACE, COMPAREABALCONY, COMPAREABAYWINDOW, COMPAREAATTIC, COMPAREAGARAGE, COMPAREABASEMENT, COMPAREAOTHER, DATASOURCE, AGENCYID, AGENCYNAME, REMARK, to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME,SOURCECODE, CJJE, WORKDATE\n" +
|
||||||
|
"from bigdata_deal_gj where dealdate>=to_date('${dealDate}','yyyy-MM-dd')";
|
||||||
|
allRows = dealData(sql)
|
||||||
|
}
|
||||||
|
|
||||||
|
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM") + "28";
|
||||||
|
def fileName = "/ccb/MODEL_000000_000000_BIGDATA_DEAL_GJ_ADD_${curDate}_0001.dat"
|
||||||
|
if (CommonDatautils.isWindow()) {
|
||||||
|
fileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\${curDate}\\MODEL_000000_000000_BIGDATA_DEAL_GJ_ADD_${curDate}_0001.dat"
|
||||||
|
}
|
||||||
|
def headers = []
|
||||||
|
//["城市ID","成交ID","城市名称","行政区ID","行政区名称","街道","门牌号","小区ID","小区名称","楼栋ID","楼栋编号","楼栋名称","单元ID","单元编号","单元名称","户ID","详细地址","建筑年代","权属","权属年限","期数","所在楼层","层类型","总楼层数","建筑类型","建筑结构","建筑面积","套内面积","户型","室","厅","厨","卫","房屋用途","室内结构","朝向","装修情况","评估编号","成交单价","成交总价","申报总价","评估总价","网签合同编号","交易日期","交易类型","出售付款方式","成交周期","是否有电梯","赠送面积(地面花园)","赠送面积(露台)","赠送面积(阳台)","赠送面积(飘窗)","赠送面积(阁楼)","赠送面积(车库)","赠送面积(地下室)","赠送面积(其他)","房源数据来源","中介公司ID","中介公司名称","备注","创建时间","更新时间","来源公司","成交金额","数据时间"]
|
||||||
|
|
||||||
|
FileUtils.batchCreateFile(allRows, fileName, headers, "utf-8", false);
|
||||||
|
println "BIGDATA_DEAL_GJ 数据文件输出完成......"
|
||||||
|
CcbFtpUtils.ftpUpload(null, fileName, curDate)
|
||||||
|
println "BIGDATA_DEAL_GJ 上传Ftp完成......"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def dealData(def sql){
|
||||||
def allRows = []
|
def allRows = []
|
||||||
sqlInstance.eachRow(sql, { r ->
|
sqlInstance.eachRow(sql, { r ->
|
||||||
def data = []
|
def data = []
|
||||||
@@ -369,21 +408,9 @@ class ExportOracleData {
|
|||||||
data << r.WORKDATE
|
data << r.WORKDATE
|
||||||
allRows << data
|
allRows << data
|
||||||
});
|
});
|
||||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM") + "28";
|
return allRows
|
||||||
def fileName = "/ccb/MODEL_000000_000000_BIGDATA_DEAL_GJ_ADD_${curDate}_0001.dat"
|
|
||||||
if (CommonDatautils.isWindow()) {
|
|
||||||
fileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\${curDate}\\MODEL_000000_000000_BIGDATA_DEAL_GJ_ADD_${curDate}_0001.dat"
|
|
||||||
}
|
|
||||||
def headers = []
|
|
||||||
//["城市ID","成交ID","城市名称","行政区ID","行政区名称","街道","门牌号","小区ID","小区名称","楼栋ID","楼栋编号","楼栋名称","单元ID","单元编号","单元名称","户ID","详细地址","建筑年代","权属","权属年限","期数","所在楼层","层类型","总楼层数","建筑类型","建筑结构","建筑面积","套内面积","户型","室","厅","厨","卫","房屋用途","室内结构","朝向","装修情况","评估编号","成交单价","成交总价","申报总价","评估总价","网签合同编号","交易日期","交易类型","出售付款方式","成交周期","是否有电梯","赠送面积(地面花园)","赠送面积(露台)","赠送面积(阳台)","赠送面积(飘窗)","赠送面积(阁楼)","赠送面积(车库)","赠送面积(地下室)","赠送面积(其他)","房源数据来源","中介公司ID","中介公司名称","备注","创建时间","更新时间","来源公司","成交金额","数据时间"]
|
|
||||||
|
|
||||||
FileUtils.batchCreateFile(allRows, fileName, headers, "utf-8", false);
|
|
||||||
println "BIGDATA_DEAL_GJ 数据文件输出完成......"
|
|
||||||
CcbFtpUtils.ftpUpload(null, fileName, curDate)
|
|
||||||
println "BIGDATA_DEAL_GJ 上传Ftp完成......"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def exportThirdPartyPrice() {
|
def exportThirdPartyPrice() {
|
||||||
def sql = "select ID, COMMID, COMMNAME, CITYID, CITYNAME, DISTID, DISTNAME, YEAR_MONTH, ZHUGE_AVG_PRICE, ANJUKE_AVG_PRICE, FANG_AVG_PRICE, LIANJIA_AVG_PRICE, CITYHOUSE_AVG_PRICE, MAITIAN_AVG_PRICE, KE_AVG_PRICE, \n" +
|
def sql = "select ID, COMMID, COMMNAME, CITYID, CITYNAME, DISTID, DISTNAME, YEAR_MONTH, ZHUGE_AVG_PRICE, ANJUKE_AVG_PRICE, FANG_AVG_PRICE, LIANJIA_AVG_PRICE, CITYHOUSE_AVG_PRICE, MAITIAN_AVG_PRICE, KE_AVG_PRICE, \n" +
|
||||||
"TAOFANG_AVG_PRICE, ZHONGYUAN_AVG_PRICE, TBS_AVG_PRICE, QFANG_AVG_PRICE, FANGTAN_AVG_PRICE, FANGDUODUO_AVG_PRICE, WIWJ_AVG_PRICE, to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME,SOURCECODE\n" +
|
"TAOFANG_AVG_PRICE, ZHONGYUAN_AVG_PRICE, TBS_AVG_PRICE, QFANG_AVG_PRICE, FANGTAN_AVG_PRICE, FANGDUODUO_AVG_PRICE, WIWJ_AVG_PRICE, to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME,SOURCECODE\n" +
|
||||||
@@ -433,8 +460,42 @@ class ExportOracleData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def exportThirdPartyPrice2(price_date) {
|
def exportThirdPartyPrice2(price_date, new_dists) {
|
||||||
def sql = "select ID, CITYID, DISTID, COMMID, COMMNAME, DATA_SOURCE_ID, DATA_SOURCE, PRICE_DATE, COMMUNITY_PRICE, COMMUNITY_MAX_PRICE, COMMUNITY_MIN_PRICE, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME from BIGDATA_THIRD_PARTY_PRICE_GJ where price_date=${price_date} ";
|
|
||||||
|
def allRows = []
|
||||||
|
if(new_dists) {
|
||||||
|
def newstr = "('"+new_dists.join("','")+"')"
|
||||||
|
def sql1 = "select ID, CITYID, DISTID, COMMID, COMMNAME, DATA_SOURCE_ID, DATA_SOURCE, PRICE_DATE, COMMUNITY_PRICE, COMMUNITY_MAX_PRICE, " +
|
||||||
|
"COMMUNITY_MIN_PRICE, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME from BIGDATA_THIRD_PARTY_PRICE_GJ where " +
|
||||||
|
"price_date=${price_date} and distid not in ${newstr} ";
|
||||||
|
def rets1 = getThirdPartyDatas(sql1)
|
||||||
|
allRows.addAll(rets1)
|
||||||
|
|
||||||
|
def sql2 = "select ID, CITYID, DISTID, COMMID, COMMNAME, DATA_SOURCE_ID, DATA_SOURCE, PRICE_DATE, COMMUNITY_PRICE, COMMUNITY_MAX_PRICE, " +
|
||||||
|
"COMMUNITY_MIN_PRICE, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME from BIGDATA_THIRD_PARTY_PRICE_GJ where " +
|
||||||
|
"distid in ${newstr} ";
|
||||||
|
def rets2 = getThirdPartyDatas(sql2)
|
||||||
|
allRows.addAll(rets2)
|
||||||
|
}else{
|
||||||
|
def sql = "select ID, CITYID, DISTID, COMMID, COMMNAME, DATA_SOURCE_ID, DATA_SOURCE, PRICE_DATE, COMMUNITY_PRICE, COMMUNITY_MAX_PRICE, COMMUNITY_MIN_PRICE, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME from BIGDATA_THIRD_PARTY_PRICE_GJ where price_date=${price_date} ";
|
||||||
|
allRows = getThirdPartyDatas(sql)
|
||||||
|
}
|
||||||
|
|
||||||
|
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM") + "28";
|
||||||
|
def fileName = "/ccb/MODEL_000000_000000_BIGDATA_THIRD_PARTY_PRICE_GJ_ADD_${curDate}_0001.dat"
|
||||||
|
if (CommonDatautils.isWindow()) {
|
||||||
|
fileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\${curDate}\\MODEL_000000_000000_BIGDATA_THIRD_PARTY_PRICE_GJ_ADD_${curDate}_0001.dat"
|
||||||
|
// fileName = "D:\\MODEL_000000_000000_BIGDATA_THIRD_PARTY_PRICE_GJ_ADD_${curDate}_0001.dat"
|
||||||
|
}
|
||||||
|
def headers = []
|
||||||
|
//["第三方均价ID","楼盘ID","小区名称","城市ID","城市名称","行政区ID","行政区名称","均价对应的月份","诸葛找房均价","安居客均价","房天下均价","链家均价","城市房产均价","麦田均价","贝壳均价","淘房365","中原均价","兔博士均价","Q房均价","房探均价","房多多均价","我爱我家均价","创建时间","更新时间","来源公司"]
|
||||||
|
|
||||||
|
FileUtils.batchCreateFile(allRows, fileName, headers, "utf-8", false);
|
||||||
|
println "BIGDATA_THIRD_PARTY_PRICE_GJ 数据文件输出完成......"
|
||||||
|
CcbFtpUtils.ftpUpload(null, fileName, curDate)
|
||||||
|
}
|
||||||
|
|
||||||
|
def getThirdPartyDatas(def sql){
|
||||||
def allRows = []
|
def allRows = []
|
||||||
sqlInstance.eachRow(sql, { r ->
|
sqlInstance.eachRow(sql, { r ->
|
||||||
def data = []
|
def data = []
|
||||||
@@ -452,21 +513,9 @@ class ExportOracleData {
|
|||||||
data << r.UPDATETIME
|
data << r.UPDATETIME
|
||||||
allRows << data
|
allRows << data
|
||||||
})
|
})
|
||||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM") + "28";
|
return allRows;
|
||||||
def fileName = "/ccb/MODEL_000000_000000_BIGDATA_THIRD_PARTY_PRICE_GJ_ADD_${curDate}_0001.dat"
|
|
||||||
if (CommonDatautils.isWindow()) {
|
|
||||||
fileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\${curDate}\\MODEL_000000_000000_BIGDATA_THIRD_PARTY_PRICE_GJ_ADD_${curDate}_0001.dat"
|
|
||||||
// fileName = "D:\\MODEL_000000_000000_BIGDATA_THIRD_PARTY_PRICE_GJ_ADD_${curDate}_0001.dat"
|
|
||||||
}
|
|
||||||
def headers = []
|
|
||||||
//["第三方均价ID","楼盘ID","小区名称","城市ID","城市名称","行政区ID","行政区名称","均价对应的月份","诸葛找房均价","安居客均价","房天下均价","链家均价","城市房产均价","麦田均价","贝壳均价","淘房365","中原均价","兔博士均价","Q房均价","房探均价","房多多均价","我爱我家均价","创建时间","更新时间","来源公司"]
|
|
||||||
|
|
||||||
FileUtils.batchCreateFile(allRows, fileName, headers, "utf-8", false);
|
|
||||||
println "BIGDATA_THIRD_PARTY_PRICE_GJ 数据文件输出完成......"
|
|
||||||
CcbFtpUtils.ftpUpload(null, fileName, curDate)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def exportBigdataCommunity(){
|
def exportBigdataCommunity(){
|
||||||
def sql = "select CITYID, DISTID, COMMID, DISTNAME, COMMNAME, ADDRESS, LATITUDE, LONGITUDE, LANDAREA, BUILDAREA, GREENINGRATE, PLOTRATIO, PARKINGCNT, BUILDYEAR, HOUSEUSE, ZTS, WORKDATE, UPDATEFLAG, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME,COMMTYPE, \n" +
|
def sql = "select CITYID, DISTID, COMMID, DISTNAME, COMMNAME, ADDRESS, LATITUDE, LONGITUDE, LANDAREA, BUILDAREA, GREENINGRATE, PLOTRATIO, PARKINGCNT, BUILDYEAR, HOUSEUSE, ZTS, WORKDATE, UPDATEFLAG, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME,COMMTYPE, \n" +
|
||||||
"\tCOMMALIAS, STREET, STREETNO, IFNEW, INTRODUCTION, REMARK, to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME, SOURCECODE, XZJDB, LJXZQHDM, LJXZQH,STATUS from bigdata_community_gj ";//where cityId in (350200,150100)
|
"\tCOMMALIAS, STREET, STREETNO, IFNEW, INTRODUCTION, REMARK, to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME, SOURCECODE, XZJDB, LJXZQHDM, LJXZQH,STATUS from bigdata_community_gj ";//where cityId in (350200,150100)
|
||||||
@@ -521,7 +570,7 @@ class ExportOracleData {
|
|||||||
println "BIGDATA_COMMUNITY_GJ 上传Ftp完成......"
|
println "BIGDATA_COMMUNITY_GJ 上传Ftp完成......"
|
||||||
}
|
}
|
||||||
|
|
||||||
def exportBigdataForsale(publishDate){
|
def exportBigdataForsale(publishDate, new_dists){
|
||||||
//["北京","上海"]
|
//["北京","上海"]
|
||||||
def citys = CcbCommonUtils.citys;
|
def citys = CcbCommonUtils.citys;
|
||||||
def cityCodeDataMap = CcbCommonUtils.findCityCodeValue()
|
def cityCodeDataMap = CcbCommonUtils.findCityCodeValue()
|
||||||
@@ -535,84 +584,111 @@ class ExportOracleData {
|
|||||||
for(def city : citys){
|
for(def city : citys){
|
||||||
def cityCode = cityCodeDataMap.get(city)
|
def cityCode = cityCodeDataMap.get(city)
|
||||||
|
|
||||||
def sql = "select CITYID,FORSALEID,PROPCODE,CITYNAME,DISTID,DISTNAME,COMMID,COMMNAME, BUILDID,BUILDNO, BUILDNAME,UNITID,UNITNO,UNITNAME,HOUSEID,ADDRESS,BUILDYEAR,PROPTYPE,PROPYEARS,UNITPRICE,TOTALPRICE,PAYTYPE,FLOORNUM,FLOORCNT,\n" +
|
|
||||||
" BUILDTYPE, HOUSESTRU,BUILDSTRU,BUILDAREA,LIVINGAREA,HOUSESTYLE,ROOMCNT,LIVINGROOMCNT,KITCHENCNT, BATHROOMCNT,HOUSEASPECT,FITMENT,IFELEVATOR,ELEVATORHOUSE,to_char(PUBLISHTIME,'yyyy-mm-dd hh24:mi:ss') as PUBLISHTIME,to_char(EXPIRETIME,'yyyy-mm-dd hh24:mi:ss') as EXPIRETIME,\n" +
|
|
||||||
" IFFIRST,DATASOURCE,AGENCYID,AGENCYNAME,PUBLISHER,PHONE,DESCRIPTION,REMARK,to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME,SOURCECODE,ATTACH from bigdata_forsale_gj where cityId='${cityCode}' and publishtime>=to_date('${publishDate}','yyyy-MM-dd')";
|
|
||||||
def allRows = []
|
|
||||||
def index = 0
|
|
||||||
sqlInstance.eachRow(sql,{r->
|
|
||||||
index = index+1
|
|
||||||
println city +" "+index
|
|
||||||
def data = []
|
|
||||||
data << r.CITYID
|
|
||||||
data << r.FORSALEID
|
|
||||||
data << r.PROPCODE
|
|
||||||
data << r.CITYNAME
|
|
||||||
data << r.DISTID
|
|
||||||
data << r.DISTNAME
|
|
||||||
data << r.COMMID
|
|
||||||
data << r.COMMNAME
|
|
||||||
data << r.BUILDID
|
|
||||||
data << r.BUILDNO
|
|
||||||
data << r.BUILDNAME
|
|
||||||
data << r.UNITID
|
|
||||||
data << r.UNITNO
|
|
||||||
data << r.UNITNAME
|
|
||||||
data << r.HOUSEID
|
|
||||||
data << r.ADDRESS
|
|
||||||
data << r.BUILDYEAR
|
|
||||||
data << r.PROPTYPE
|
|
||||||
data << r.PROPYEARS
|
|
||||||
data << r.UNITPRICE
|
|
||||||
data << r.TOTALPRICE
|
|
||||||
data << r.PAYTYPE
|
|
||||||
data << r.FLOORNUM
|
|
||||||
data << r.FLOORCNT
|
|
||||||
data << r.BUILDTYPE
|
|
||||||
data << r.HOUSESTRU
|
|
||||||
data << r.BUILDSTRU
|
|
||||||
data << r.BUILDAREA
|
|
||||||
data << r.LIVINGAREA
|
|
||||||
data << r.HOUSESTYLE
|
|
||||||
data << r.ROOMCNT
|
|
||||||
data << r.LIVINGROOMCNT
|
|
||||||
data << r.KITCHENCNT
|
|
||||||
data << r.BATHROOMCNT
|
|
||||||
data << r.HOUSEASPECT
|
|
||||||
data << r.FITMENT
|
|
||||||
data << r.IFELEVATOR
|
|
||||||
data << r.ELEVATORHOUSE
|
|
||||||
data << r.PUBLISHTIME
|
|
||||||
data << r.EXPIRETIME
|
|
||||||
data << r.IFFIRST
|
|
||||||
data << r.DATASOURCE
|
|
||||||
data << r.AGENCYID
|
|
||||||
data << r.AGENCYNAME
|
|
||||||
data << r.PUBLISHER
|
|
||||||
data << r.PHONE
|
|
||||||
data << ""
|
|
||||||
data << r.REMARK
|
|
||||||
data << r.CREATETIME
|
|
||||||
data << r.UPDATETIME
|
|
||||||
data << r.SOURCECODE
|
|
||||||
data << r.ATTACH
|
|
||||||
allRows << data
|
|
||||||
|
|
||||||
if(allRows.size()%200000==0){
|
def allRows = []
|
||||||
FileUtils.batchCreateFile(allRows, fileName, headers, "utf-8", true);
|
if(new_dists){
|
||||||
allRows.clear()
|
def newstr = "('"+new_dists.join("','")+"')"
|
||||||
}
|
def sql1 = "select CITYID,FORSALEID,PROPCODE,CITYNAME,DISTID,DISTNAME,COMMID,COMMNAME, BUILDID,BUILDNO, BUILDNAME,UNITID,UNITNO,UNITNAME,HOUSEID,ADDRESS,BUILDYEAR,PROPTYPE,PROPYEARS,UNITPRICE,TOTALPRICE,PAYTYPE,FLOORNUM,FLOORCNT,\n" +
|
||||||
});
|
" BUILDTYPE, HOUSESTRU,BUILDSTRU,BUILDAREA,LIVINGAREA,HOUSESTYLE,ROOMCNT,LIVINGROOMCNT,KITCHENCNT, BATHROOMCNT,HOUSEASPECT,FITMENT,IFELEVATOR,ELEVATORHOUSE,to_char(PUBLISHTIME,'yyyy-mm-dd hh24:mi:ss') as PUBLISHTIME,to_char(EXPIRETIME,'yyyy-mm-dd hh24:mi:ss') as EXPIRETIME,\n" +
|
||||||
|
" IFFIRST,DATASOURCE,AGENCYID,AGENCYNAME,PUBLISHER,PHONE,DESCRIPTION,REMARK,to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME,SOURCECODE,ATTACH from bigdata_forsale_gj " +
|
||||||
|
"where cityId='${cityCode}' and publishtime>=to_date('${publishDate}','yyyy-MM-dd') and distid not in ${newstr}";
|
||||||
|
def rets1 = getHouseDatas(sql1)
|
||||||
|
allRows.addAll(rets1)
|
||||||
|
}else{
|
||||||
|
def sql = "select CITYID,FORSALEID,PROPCODE,CITYNAME,DISTID,DISTNAME,COMMID,COMMNAME, BUILDID,BUILDNO, BUILDNAME,UNITID,UNITNO,UNITNAME,HOUSEID,ADDRESS,BUILDYEAR,PROPTYPE,PROPYEARS,UNITPRICE,TOTALPRICE,PAYTYPE,FLOORNUM,FLOORCNT,\n" +
|
||||||
|
" BUILDTYPE, HOUSESTRU,BUILDSTRU,BUILDAREA,LIVINGAREA,HOUSESTYLE,ROOMCNT,LIVINGROOMCNT,KITCHENCNT, BATHROOMCNT,HOUSEASPECT,FITMENT,IFELEVATOR,ELEVATORHOUSE,to_char(PUBLISHTIME,'yyyy-mm-dd hh24:mi:ss') as PUBLISHTIME,to_char(EXPIRETIME,'yyyy-mm-dd hh24:mi:ss') as EXPIRETIME,\n" +
|
||||||
|
" IFFIRST,DATASOURCE,AGENCYID,AGENCYNAME,PUBLISHER,PHONE,DESCRIPTION,REMARK,to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME,SOURCECODE,ATTACH from bigdata_forsale_gj where cityId='${cityCode}' and publishtime>=to_date('${publishDate}','yyyy-MM-dd')";
|
||||||
|
allRows = getHouseDatas(sql)
|
||||||
|
}
|
||||||
if(allRows.size()>0){
|
if(allRows.size()>0){
|
||||||
FileUtils.batchCreateFile(allRows, fileName, headers, "utf-8", true);
|
FileUtils.batchCreateFile(allRows, fileName, headers, "utf-8", true);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(new_dists){//补充被修区域的数据
|
||||||
|
def newstr = "('"+new_dists.join("','")+"')"
|
||||||
|
def sql2 = "select CITYID,FORSALEID,PROPCODE,CITYNAME,DISTID,DISTNAME,COMMID,COMMNAME, BUILDID,BUILDNO, BUILDNAME,UNITID,UNITNO,UNITNAME,HOUSEID,ADDRESS,BUILDYEAR,PROPTYPE,PROPYEARS,UNITPRICE,TOTALPRICE,PAYTYPE,FLOORNUM,FLOORCNT,\n" +
|
||||||
|
" BUILDTYPE, HOUSESTRU,BUILDSTRU,BUILDAREA,LIVINGAREA,HOUSESTYLE,ROOMCNT,LIVINGROOMCNT,KITCHENCNT, BATHROOMCNT,HOUSEASPECT,FITMENT,IFELEVATOR,ELEVATORHOUSE,to_char(PUBLISHTIME,'yyyy-mm-dd hh24:mi:ss') as PUBLISHTIME,to_char(EXPIRETIME,'yyyy-mm-dd hh24:mi:ss') as EXPIRETIME,\n" +
|
||||||
|
" IFFIRST,DATASOURCE,AGENCYID,AGENCYNAME,PUBLISHER,PHONE,DESCRIPTION,REMARK,to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME,SOURCECODE,ATTACH " +
|
||||||
|
"from bigdata_forsale_gj where distid in ${newstr}"
|
||||||
|
def rets2 = getHouseDatas(sql2)
|
||||||
|
if(rets2.size()>0){
|
||||||
|
FileUtils.batchCreateFile(rets2, fileName, headers, "utf-8", true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
println "BIGDATA_FORSALE_GJ 数据文件输出完成......"
|
println "BIGDATA_FORSALE_GJ 数据文件输出完成......"
|
||||||
CcbFtpUtils.ftpUpload(null, fileName, curDate)
|
CcbFtpUtils.ftpUpload(null, fileName, curDate)
|
||||||
println "BIGDATA_FORSALE_GJ 上传Ftp完成......"
|
println "BIGDATA_FORSALE_GJ 上传Ftp完成......"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def getHouseDatas(sql){
|
||||||
|
def allRows = []
|
||||||
|
def index = 0
|
||||||
|
sqlInstance.eachRow(sql,{r->
|
||||||
|
index = index+1
|
||||||
|
println r.CITYNAME +" "+index
|
||||||
|
def data = []
|
||||||
|
data << r.CITYID
|
||||||
|
data << r.FORSALEID
|
||||||
|
data << r.PROPCODE
|
||||||
|
data << r.CITYNAME
|
||||||
|
data << r.DISTID
|
||||||
|
data << r.DISTNAME
|
||||||
|
data << r.COMMID
|
||||||
|
data << r.COMMNAME
|
||||||
|
data << r.BUILDID
|
||||||
|
data << r.BUILDNO
|
||||||
|
data << r.BUILDNAME
|
||||||
|
data << r.UNITID
|
||||||
|
data << r.UNITNO
|
||||||
|
data << r.UNITNAME
|
||||||
|
data << r.HOUSEID
|
||||||
|
data << r.ADDRESS
|
||||||
|
data << r.BUILDYEAR
|
||||||
|
data << r.PROPTYPE
|
||||||
|
data << r.PROPYEARS
|
||||||
|
data << r.UNITPRICE
|
||||||
|
data << r.TOTALPRICE
|
||||||
|
data << r.PAYTYPE
|
||||||
|
data << r.FLOORNUM
|
||||||
|
data << r.FLOORCNT
|
||||||
|
data << r.BUILDTYPE
|
||||||
|
data << r.HOUSESTRU
|
||||||
|
data << r.BUILDSTRU
|
||||||
|
data << r.BUILDAREA
|
||||||
|
data << r.LIVINGAREA
|
||||||
|
data << r.HOUSESTYLE
|
||||||
|
data << r.ROOMCNT
|
||||||
|
data << r.LIVINGROOMCNT
|
||||||
|
data << r.KITCHENCNT
|
||||||
|
data << r.BATHROOMCNT
|
||||||
|
data << r.HOUSEASPECT
|
||||||
|
data << r.FITMENT
|
||||||
|
data << r.IFELEVATOR
|
||||||
|
data << r.ELEVATORHOUSE
|
||||||
|
data << r.PUBLISHTIME
|
||||||
|
data << r.EXPIRETIME
|
||||||
|
data << r.IFFIRST
|
||||||
|
data << r.DATASOURCE
|
||||||
|
data << r.AGENCYID
|
||||||
|
data << r.AGENCYNAME
|
||||||
|
data << r.PUBLISHER
|
||||||
|
data << r.PHONE
|
||||||
|
data << ""
|
||||||
|
data << r.REMARK
|
||||||
|
data << r.CREATETIME
|
||||||
|
data << r.UPDATETIME
|
||||||
|
data << r.SOURCECODE
|
||||||
|
data << r.ATTACH
|
||||||
|
allRows << data
|
||||||
|
// if(allRows.size()%200000==0){
|
||||||
|
// FileUtils.batchCreateFile(allRows, fileName, headers, "utf-8", true);
|
||||||
|
// allRows.clear()
|
||||||
|
// }
|
||||||
|
});
|
||||||
|
return allRows
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
def exportAvmEvaluationGJNB(yearMonth){
|
def exportAvmEvaluationGJNB(yearMonth){
|
||||||
def sql = "select ID,CITYID,CITYNAME, YEAR_MONTH, COMMUNITY_NUM, HAS_PRICE_COMMUNITY_NUM, PRICE_COVERAGE, ARTIFICIAL_CALC_NUM, ARTIFICIAL_CALC_COVERAGE, SAMPLE_CALC_NUM, SAMPLE_CALC_COVERAGE, \n" +
|
def sql = "select ID,CITYID,CITYNAME, YEAR_MONTH, COMMUNITY_NUM, HAS_PRICE_COMMUNITY_NUM, PRICE_COVERAGE, ARTIFICIAL_CALC_NUM, ARTIFICIAL_CALC_COVERAGE, SAMPLE_CALC_NUM, SAMPLE_CALC_COVERAGE, \n" +
|
||||||
|
|||||||
+1
-1
@@ -44,7 +44,7 @@ class GuiDingPriceBatch extends BaseBatch{
|
|||||||
def distCodeMap = CcbCommonUtils.findAllDistrictCodeValue(city)
|
def distCodeMap = CcbCommonUtils.findAllDistrictCodeValue(city)
|
||||||
|
|
||||||
//添加自己库中的人工指导价
|
//添加自己库中的人工指导价
|
||||||
def prices = CcbCommonUtils.findPersonPrice(city, "2022-04-1", "2022-05-1")
|
def prices = CcbCommonUtils.findPersonPrice(city, "2022-05-1", "2022-06-1")
|
||||||
if(prices){
|
if(prices){
|
||||||
def distMap = getDistrictMap(city)
|
def distMap = getDistrictMap(city)
|
||||||
def rets = createCityDatas(cityCodeDatas, distCodeMap, distMap, prices)
|
def rets = createCityDatas(cityCodeDatas, distCodeMap, distMap, prices)
|
||||||
|
|||||||
+16
-1
@@ -23,7 +23,8 @@ class LoadGuide {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def run(){
|
def run(){
|
||||||
addPersonGuided("D:\\数据\\建行\\人工指导价更新.xlsx")
|
// addName("D:\\数据\\建行\\房产估值\\人工指导价更新.xlsx")
|
||||||
|
addPersonGuided("D:\\数据\\建行\\房产估值\\人工指导价更新.xlsx")
|
||||||
// match("D:\\数据\\建行\\房产估值\\指导价\\西安指导价2-103.xlsx")
|
// match("D:\\数据\\建行\\房产估值\\指导价\\西安指导价2-103.xlsx")
|
||||||
|
|
||||||
// saveDongGuangPrice("D:\\数据\\建行\\房产估值\\指导价\\东莞指导价218.xlsx")
|
// saveDongGuangPrice("D:\\数据\\建行\\房产估值\\指导价\\东莞指导价218.xlsx")
|
||||||
@@ -38,6 +39,20 @@ class LoadGuide {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def addName(filename){
|
||||||
|
ExcelUtils.multiThreadingModify(filename, { d ->
|
||||||
|
if(d['A']){
|
||||||
|
def dist = CommonDatautils.findDistrictById(d['A'].toString())
|
||||||
|
if(dist){
|
||||||
|
d['B'] = dist.city
|
||||||
|
d['C'] = dist.region
|
||||||
|
d['D'] = dist.name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
def addPersonGuided(filename){
|
def addPersonGuided(filename){
|
||||||
ExcelUtils.modify(filename, { d ->
|
ExcelUtils.modify(filename, { d ->
|
||||||
def city = d['B']
|
def city = d['B']
|
||||||
|
|||||||
+25
-22
@@ -45,7 +45,9 @@ DBCollection POLYLINECOLL = MongoUtils.getCollectionByAuth20190102("fangjia_craw
|
|||||||
def offlineUrl = "mongodb://developer:G00IDCDEV12385@192.168.0.136:28017";
|
def offlineUrl = "mongodb://developer:G00IDCDEV12385@192.168.0.136:28017";
|
||||||
def DBCollection youda_esfhouse_coll = MongoUtils.getCollectionByName2("business", "res_esfdealprice", offlineUrl)
|
def DBCollection youda_esfhouse_coll = MongoUtils.getCollectionByName2("business", "res_esfdealprice", offlineUrl)
|
||||||
|
|
||||||
|
def url = "https://sh.anjuke.com"
|
||||||
|
def s = DataHandleUtils.findMatchPattern(name, "https://\\w+.anjuke.com")
|
||||||
|
println s
|
||||||
|
|
||||||
//def districts = CommonDatautils.findAllFiledDistrict("district", "南宁")
|
//def districts = CommonDatautils.findAllFiledDistrict("district", "南宁")
|
||||||
//for(def d : districts){
|
//for(def d : districts){
|
||||||
@@ -324,27 +326,28 @@ def youdaDeal(youda_esfhouse_coll, def city, def region, def name, def area, def
|
|||||||
//
|
//
|
||||||
//},0)
|
//},0)
|
||||||
|
|
||||||
ExcelUtils.modify("D:\\数据\\建行\\房产估值\\小区\\删除重复小区.xlsx",{d->
|
//ExcelUtils.modify("D:\\数据\\建行\\房产估值\\小区\\删除重复小区.xlsx",{d->
|
||||||
if(d['A']){
|
// if(d['A']){
|
||||||
// def region = d['B']
|
//// def region = d['B']
|
||||||
// def newRegion = RegionData.formatRegion(d['A'], region)
|
//// def newRegion = RegionData.formatRegion(d['A'], region)
|
||||||
// if(newRegion) {
|
//// if(newRegion) {
|
||||||
// def dist = CommonDatautils.findDistrict(d['A'], newRegion, d['C'], "district")
|
//// def dist = CommonDatautils.findDistrict(d['A'], newRegion, d['C'], "district")
|
||||||
def dist = CommonDatautils.findDistrictById(d['A'])
|
// def dist = CommonDatautils.findDistrictById(d['A'])
|
||||||
if(dist){
|
// if(dist){
|
||||||
def udata = new BasicDBObject()
|
// def udata = new BasicDBObject()
|
||||||
udata.put("name_cat", 11)
|
// udata.put("name_cat", 11)
|
||||||
udata.put("m_date",new Date())
|
// udata.put("status", 1)
|
||||||
|
// udata.put("m_date",new Date())
|
||||||
def q = new BasicDBObject()
|
//
|
||||||
q.put("_id", dist._id)
|
// def q = new BasicDBObject()
|
||||||
DbUtils.seaweed.update(q, new BasicDBObject('$set', udata))
|
// q.put("_id", dist._id)
|
||||||
}else{
|
// DbUtils.seaweed.update(q, new BasicDBObject('$set', udata))
|
||||||
println d
|
// }else{
|
||||||
}
|
// println d
|
||||||
// }
|
// }
|
||||||
}
|
//// }
|
||||||
},0)
|
// }
|
||||||
|
//},0)
|
||||||
|
|
||||||
//def citys = CcbCommonUtils.citys
|
//def citys = CcbCommonUtils.citys
|
||||||
//def rets = []
|
//def rets = []
|
||||||
|
|||||||
+3
-3
@@ -22,9 +22,9 @@ import java.util.concurrent.ConcurrentHashMap
|
|||||||
@BatchOwner(Watcher.GaoJuan)
|
@BatchOwner(Watcher.GaoJuan)
|
||||||
class ThirdPartyPriceBatch extends BaseBatch {
|
class ThirdPartyPriceBatch extends BaseBatch {
|
||||||
|
|
||||||
def sDate= 202204//Integer.parseInt(DateUtils.addMonth(DateUtils.formatDateByPattern(new Date(), "yyyyMM"), -1, "yyyyMM"));
|
def sDate= 202205//Integer.parseInt(DateUtils.addMonth(DateUtils.formatDateByPattern(new Date(), "yyyyMM"), -1, "yyyyMM"));
|
||||||
def startDate = 202202
|
def startDate = 202203
|
||||||
def endDate = 202204
|
def endDate = 202205
|
||||||
def curDate = Integer.parseInt(DateUtils.addMonth(DateUtils.formatDateByPattern(new Date(), "yyyyMM"), -6, "yyyyMM"));
|
def curDate = Integer.parseInt(DateUtils.addMonth(DateUtils.formatDateByPattern(new Date(), "yyyyMM"), -6, "yyyyMM"));
|
||||||
|
|
||||||
static final DBCollection AVERAGE_STATISTICS = MongoUtils.getCollectionByName("fangjia", "average_statistics", "192.168.0.43")
|
static final DBCollection AVERAGE_STATISTICS = MongoUtils.getCollectionByName("fangjia", "average_statistics", "192.168.0.43")
|
||||||
|
|||||||
+6
-6
@@ -75,13 +75,13 @@ class TradeStatLog {
|
|||||||
def run(){
|
def run(){
|
||||||
def citys = CcbCommonUtils.citys;
|
def citys = CcbCommonUtils.citys;
|
||||||
def rets = []
|
def rets = []
|
||||||
rets << ["城市","2月总量","3月总量","4月总量","占比","贝壳","链家", "我爱我家","房天下","中原"]
|
rets << ["城市","3月总量","4月总量","5月总量","占比","贝壳","链家", "我爱我家","房天下","中原"]
|
||||||
def sources = ["贝壳找房","链家在线", "我爱我家","房天下","中原地产"]
|
def sources = ["贝壳找房","链家在线", "我爱我家","房天下","中原地产"]
|
||||||
//def startDate = "2021-05-01"
|
//def startDate = "2021-05-01"
|
||||||
def startDate = "2022-02-01"
|
def startDate = "2022-03-01"
|
||||||
def date = "2022-03-01"
|
def date = "2022-04-01"
|
||||||
def endDate = "2022-04-01"
|
def endDate = "2022-05-01"
|
||||||
def newDate = "2022-05-01"
|
def newDate = "2022-06-01"
|
||||||
|
|
||||||
for(def city : citys){
|
for(def city : citys){
|
||||||
def lastMonthCount = findTradesCount(city, null, DateUtils.parseFromTightByPattern(startDate,"yyyy-MM-dd"), DateUtils.parseFromTightByPattern(date,"yyyy-MM-dd"))
|
def lastMonthCount = findTradesCount(city, null, DateUtils.parseFromTightByPattern(startDate,"yyyy-MM-dd"), DateUtils.parseFromTightByPattern(date,"yyyy-MM-dd"))
|
||||||
@@ -131,7 +131,7 @@ class TradeStatLog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ExcelUtils.write("D:\\数据\\建行\\房产估值\\成交\\2022-04成交统计.xlsx", rets, "数据")
|
ExcelUtils.write("D:\\数据\\建行\\房产估值\\成交\\2022-05成交统计.xlsx", rets, "数据")
|
||||||
println "表格生成完成"
|
println "表格生成完成"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+57
-20
@@ -31,8 +31,8 @@ class CcbDistrictToDB {
|
|||||||
// task.meituanSqrentRun()
|
// task.meituanSqrentRun()
|
||||||
// task.updateDistrict()
|
// task.updateDistrict()
|
||||||
// task.updateDongguangRegion()
|
// task.updateDongguangRegion()
|
||||||
// task.houseDistToDB()
|
task.houseDistToDB()
|
||||||
task.sendCalPrice()
|
// task.sendCalPrice()
|
||||||
}
|
}
|
||||||
|
|
||||||
def sendCalPrice(){
|
def sendCalPrice(){
|
||||||
@@ -97,11 +97,11 @@ class CcbDistrictToDB {
|
|||||||
def index = 0
|
def index = 0
|
||||||
def addIndex = 0
|
def addIndex = 0
|
||||||
def keys = new CopyOnWriteArrayList()
|
def keys = new CopyOnWriteArrayList()
|
||||||
ExcelUtils.modify("D:\\数据\\建行\\二期\\新增小区_2739_0610.xlsx", { d ->
|
ExcelUtils.modify("D:\\数据\\建行\\二期\\新增小区_2155.xlsx", { d ->
|
||||||
index++
|
index++
|
||||||
if(d['I']){
|
if(d['A']){
|
||||||
def city = d['A']
|
def city = d['A']
|
||||||
def mapInfo = getStreetInfo(d['P']+","+d['Q'])
|
def mapInfo = getStreetInfo(d['L']+","+d['M'])
|
||||||
def newRegion = null
|
def newRegion = null
|
||||||
if(mapInfo){
|
if(mapInfo){
|
||||||
if(d['A']=="东莞"){
|
if(d['A']=="东莞"){
|
||||||
@@ -114,15 +114,13 @@ class CcbDistrictToDB {
|
|||||||
newRegion = RegionData.formatRegion(city, newRegion)
|
newRegion = RegionData.formatRegion(city, newRegion)
|
||||||
|
|
||||||
if(newRegion && newRegion.contains(d['B'])){
|
if(newRegion && newRegion.contains(d['B'])){
|
||||||
def name = nameFileter(d['I'])
|
def name = nameFileter(d['E'])
|
||||||
def alias = []
|
def alias = []
|
||||||
if(d['I']!=name){
|
if(d['C']!=name){
|
||||||
alias << d['I']
|
|
||||||
}
|
|
||||||
if(d['C']!=d['I'] && !alias.contains(d['C'])){
|
|
||||||
alias << d['C']
|
alias << d['C']
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def estateType2 = "普通住宅"
|
def estateType2 = "普通住宅"
|
||||||
if(name){
|
if(name){
|
||||||
if(name.contains("别墅")){
|
if(name.contains("别墅")){
|
||||||
@@ -130,7 +128,7 @@ class CcbDistrictToDB {
|
|||||||
}else if(name.contains("商住")){
|
}else if(name.contains("商住")){
|
||||||
estateType2 = "商住"
|
estateType2 = "商住"
|
||||||
}else{
|
}else{
|
||||||
def type = d['O']
|
def type = d['K']
|
||||||
if(type){
|
if(type){
|
||||||
if(type.contains("别墅")){
|
if(type.contains("别墅")){
|
||||||
estateType2 = "别墅"
|
estateType2 = "别墅"
|
||||||
@@ -141,8 +139,8 @@ class CcbDistrictToDB {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
def formatAddress = null
|
def formatAddress = null
|
||||||
if (d['N']) {
|
if (d['J']) {
|
||||||
formatAddress = AddressUtil.formatAddress(d['A'], d['N'])
|
formatAddress = AddressUtil.formatAddress(d['A'], d['J'])
|
||||||
}
|
}
|
||||||
|
|
||||||
Long glat = null
|
Long glat = null
|
||||||
@@ -150,10 +148,10 @@ class CcbDistrictToDB {
|
|||||||
Long blat = null
|
Long blat = null
|
||||||
Long blng = null
|
Long blng = null
|
||||||
|
|
||||||
if (d['P']) {
|
if (d['M']) {
|
||||||
glat = d['P'].toString().toDouble() * 10000000000L
|
glat = d['M'].toString().toDouble() * 10000000000L
|
||||||
glng = d['Q'].toString().toDouble() * 10000000000L
|
glng = d['L'].toString().toDouble() * 10000000000L
|
||||||
def baidu = BaiDuApiUtils.geoconv(d['P'].toString().toDouble(), d['Q'].toString().toDouble(), 3)
|
def baidu = BaiDuApiUtils.geoconv(d['L'].toString().toDouble(), d['M'].toString().toDouble(), 3)
|
||||||
blng = baidu.x * 10000000000L
|
blng = baidu.x * 10000000000L
|
||||||
blat = baidu.y * 10000000000L
|
blat = baidu.y * 10000000000L
|
||||||
}
|
}
|
||||||
@@ -175,6 +173,9 @@ class CcbDistrictToDB {
|
|||||||
data.put("name", name)
|
data.put("name", name)
|
||||||
data.put("estate_type2", estateType2)
|
data.put("estate_type2", estateType2)
|
||||||
data.put("address", formatAddress)
|
data.put("address", formatAddress)
|
||||||
|
if(alias){
|
||||||
|
data.put("alias", alias)
|
||||||
|
}
|
||||||
if (glat) {
|
if (glat) {
|
||||||
data.put("lat", glat)
|
data.put("lat", glat)
|
||||||
data.put("lng", glng)
|
data.put("lng", glng)
|
||||||
@@ -196,11 +197,47 @@ class CcbDistrictToDB {
|
|||||||
// }
|
// }
|
||||||
}else{
|
}else{
|
||||||
if(alias){
|
if(alias){
|
||||||
def data = new BasicDBObject();
|
def dbAlias = dist.alias
|
||||||
data.put("alias", alias)
|
if(!dbAlias){
|
||||||
DbUtils.seaweed.update(new BasicDBObject('_id',dist._id),new BasicDBObject('$set',data))
|
def data = new BasicDBObject();
|
||||||
|
data.put("alias", alias)
|
||||||
|
DbUtils.seaweed.update(new BasicDBObject('_id',dist._id),new BasicDBObject('$set',data))
|
||||||
|
}else{
|
||||||
|
for(def n : alias){
|
||||||
|
if(!dbAlias.contains(n)){
|
||||||
|
dbAlias << n
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
def data = new BasicDBObject();
|
||||||
|
data.put("alias", dbAlias)
|
||||||
|
DbUtils.seaweed.update(new BasicDBObject('_id',dist._id),new BasicDBObject('$set',data))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
if(alias){
|
||||||
|
def dist = CommonDatautils.findDistrict(city, newRegion, name, "district")
|
||||||
|
if (dist) {
|
||||||
|
def dbAlias = dist.alias
|
||||||
|
if(!dbAlias){
|
||||||
|
def data = new BasicDBObject();
|
||||||
|
data.put("alias", alias)
|
||||||
|
DbUtils.seaweed.update(new BasicDBObject('_id',dist._id),new BasicDBObject('$set',data))
|
||||||
|
}else{
|
||||||
|
for(def n : alias){
|
||||||
|
if(!dbAlias.contains(n)){
|
||||||
|
dbAlias << n
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
def data = new BasicDBObject();
|
||||||
|
data.put("alias", dbAlias)
|
||||||
|
DbUtils.seaweed.update(new BasicDBObject('_id',dist._id),new BasicDBObject('$set',data))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
println d['A']+" "+d['B']+" "+d['C'] +" 经纬度所在区:"+newRegion
|
println d['A']+" "+d['B']+" "+d['C'] +" 经纬度所在区:"+newRegion
|
||||||
|
|||||||
+1
-1
@@ -25,7 +25,7 @@ class ExportDistrictRongHe extends BaseBatch{
|
|||||||
@Override
|
@Override
|
||||||
void process(Object args) {
|
void process(Object args) {
|
||||||
def curDate = DateUtils.formatDateByPattern(new Date()+1, "yyyyMMdd")
|
def curDate = DateUtils.formatDateByPattern(new Date()+1, "yyyyMMdd")
|
||||||
def new_dists = ["350604","350605","410307","410308","450181"]
|
def new_dists = []//["350604","350605","410307","410308","450181"]
|
||||||
//按天导(每天一个文件夹)
|
//按天导(每天一个文件夹)
|
||||||
exportBigdataDealFJW2(curDate, DateUtils.formatDateByPattern(DateUtils.getFirstDayOfMonth(new Date()+1,-1), "yyyy-MM-dd"), new_dists)
|
exportBigdataDealFJW2(curDate, DateUtils.formatDateByPattern(DateUtils.getFirstDayOfMonth(new Date()+1,-1), "yyyy-MM-dd"), new_dists)
|
||||||
|
|
||||||
|
|||||||
+52
-28
@@ -239,6 +239,27 @@ class CommonDatautils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static def findRemoveDistricts(def city, def cat, def fields, def m_date){
|
||||||
|
DBObject q = new BasicDBObject();
|
||||||
|
q.put("status", 1);
|
||||||
|
q.put("cat", cat);
|
||||||
|
q.put("city", city);
|
||||||
|
q.put("m_date", new BasicDBObject('$gte', DateUtils.parseFromTightYYYYMMDD(m_date)))
|
||||||
|
DBObject keys = new BasicDBObject();
|
||||||
|
if(fields){
|
||||||
|
for(def field : fields){
|
||||||
|
keys.put(field, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DSCursor cursor = getDataStoreConnection().find(q, keys).batchSize(2000)
|
||||||
|
List<DBObject> rets = []
|
||||||
|
for(def obj : cursor){
|
||||||
|
rets << obj
|
||||||
|
}
|
||||||
|
return rets;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取城市中小区的经纬度
|
* 获取城市中小区的经纬度
|
||||||
* @param city
|
* @param city
|
||||||
@@ -834,39 +855,42 @@ class CommonDatautils {
|
|||||||
if(!id){
|
if(!id){
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
DBObject q = new BasicDBObject();
|
|
||||||
q.put("_id", new ObjectId(id.toString().replace("[","").replace("]","")));
|
|
||||||
|
|
||||||
DBObject keys = new BasicDBObject();
|
|
||||||
keys.put("alias", 1);
|
|
||||||
keys.put("addr_alias", 1);
|
|
||||||
keys.put("city", 1);
|
|
||||||
keys.put("region", 1);
|
|
||||||
keys.put("name", 1);
|
|
||||||
keys.put("estate_type2", 1);
|
|
||||||
keys.put("address", 1);
|
|
||||||
keys.put("build_structure", 1);
|
|
||||||
keys.put("out_pics", 1);
|
|
||||||
keys.put("lat", 1);
|
|
||||||
keys.put("lng", 1);
|
|
||||||
keys.put("lat2", 1);
|
|
||||||
keys.put("lng2", 1);
|
|
||||||
keys.put("name_cat", 1);
|
|
||||||
keys.put("finish_building_date", 1)
|
|
||||||
keys.put("mapping_alias", 1)
|
|
||||||
keys.put("sid", 1)
|
|
||||||
try{
|
try{
|
||||||
DSCursor cursor = getDataStoreConnection().find(q, keys);
|
DBObject q = new BasicDBObject();
|
||||||
if(cursor){
|
q.put("_id", new ObjectId(id.toString().replace("[","").replace("]","")));
|
||||||
for(def obj : cursor){
|
|
||||||
return obj;
|
DBObject keys = new BasicDBObject();
|
||||||
|
keys.put("alias", 1);
|
||||||
|
keys.put("addr_alias", 1);
|
||||||
|
keys.put("city", 1);
|
||||||
|
keys.put("region", 1);
|
||||||
|
keys.put("name", 1);
|
||||||
|
keys.put("estate_type2", 1);
|
||||||
|
keys.put("address", 1);
|
||||||
|
keys.put("build_structure", 1);
|
||||||
|
keys.put("out_pics", 1);
|
||||||
|
keys.put("lat", 1);
|
||||||
|
keys.put("lng", 1);
|
||||||
|
keys.put("lat2", 1);
|
||||||
|
keys.put("lng2", 1);
|
||||||
|
keys.put("name_cat", 1);
|
||||||
|
keys.put("finish_building_date", 1)
|
||||||
|
keys.put("mapping_alias", 1)
|
||||||
|
keys.put("sid", 1)
|
||||||
|
try{
|
||||||
|
DSCursor cursor = getDataStoreConnection().find(q, keys);
|
||||||
|
if(cursor){
|
||||||
|
for(def obj : cursor){
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
}catch(Exception e){
|
||||||
|
println "error_id:"+id
|
||||||
|
e.printStackTrace()
|
||||||
}
|
}
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
println "error_id:"+id
|
|
||||||
e.printStackTrace()
|
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+6
-3
@@ -68,14 +68,17 @@ class DistrictInfoExportBatch extends BaseBatch{
|
|||||||
def createDatas(def city){
|
def createDatas(def city){
|
||||||
def result = []
|
def result = []
|
||||||
def districts = CommonDatautils.findAllDistricts(city, "district", null);
|
def districts = CommonDatautils.findAllDistricts(city, "district", null);
|
||||||
|
def removeDists = CommonDatautils.findRemoveDistricts(city, "district", null, "2022-01-01");
|
||||||
|
districts.addAll(removeDists)
|
||||||
|
|
||||||
def lastDate = DateUtils.getLastDayOfMonth(new Date(), -1)
|
def lastDate = DateUtils.getLastDayOfMonth(new Date(), -1)
|
||||||
def startDate = DateUtils.getFirstDayOfMonth(lastDate);
|
def startDate = DateUtils.getFirstDayOfMonth(lastDate);
|
||||||
|
|
||||||
def fzAddrMap = getFzAddress();
|
def fzAddrMap = getFzAddress();
|
||||||
for(def rMap : districts){
|
for(def rMap : districts){
|
||||||
def dbo = CommonDatautils.queryDistrictPriceByDate3(city, rMap.region, rMap.name, startDate, lastDate)
|
//价格没有也提供
|
||||||
if(dbo){
|
// def dbo = CommonDatautils.queryDistrictPriceByDate3(city, rMap.region, rMap.name, startDate, lastDate)
|
||||||
|
// if(dbo){
|
||||||
def row = []
|
def row = []
|
||||||
row << rMap.get("_id").toString()
|
row << rMap.get("_id").toString()
|
||||||
row << rMap.city
|
row << rMap.city
|
||||||
@@ -112,7 +115,7 @@ class DistrictInfoExportBatch extends BaseBatch{
|
|||||||
}
|
}
|
||||||
//row << processAlias(rMap.addr_alias)
|
//row << processAlias(rMap.addr_alias)
|
||||||
result << row
|
result << row
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|||||||
+18
-30
@@ -88,6 +88,9 @@ class DistrictPriceExportBatch extends BaseBatch{
|
|||||||
|
|
||||||
def createDatas(def city){
|
def createDatas(def city){
|
||||||
def districts = CommonDatautils.findAllDistricts(city, "district", null);
|
def districts = CommonDatautils.findAllDistricts(city, "district", null);
|
||||||
|
def removeDists = CommonDatautils.findRemoveDistricts(city, "district", null, "2022-01-01");
|
||||||
|
districts.addAll(removeDists)
|
||||||
|
|
||||||
def endDateStr = DateUtils.formatDateByPattern(new Date(), "yyyy-MM")+"-10"
|
def endDateStr = DateUtils.formatDateByPattern(new Date(), "yyyy-MM")+"-10"
|
||||||
def dataStr = DateUtils.add(endDateStr, -30)
|
def dataStr = DateUtils.add(endDateStr, -30)
|
||||||
def startDate = DateUtils.parseFromTightYYYYMMDD(dataStr)
|
def startDate = DateUtils.parseFromTightYYYYMMDD(dataStr)
|
||||||
@@ -105,9 +108,10 @@ class DistrictPriceExportBatch extends BaseBatch{
|
|||||||
for(def rMap : districts){
|
for(def rMap : districts){
|
||||||
|
|
||||||
def dbo = CommonDatautils.queryDistrictPriceByDate3(city, rMap.region, rMap.name, startDate, lastDate)
|
def dbo = CommonDatautils.queryDistrictPriceByDate3(city, rMap.region, rMap.name, startDate, lastDate)
|
||||||
|
def curPrice = 0
|
||||||
if(dbo){
|
if(dbo){
|
||||||
def lastMonthPrice = lastMonthPriceMap.get(rMap.get("_id").toString())
|
def lastMonthPrice = lastMonthPriceMap.get(rMap.get("_id").toString())
|
||||||
def curPrice = dbo.get("avg_price")
|
curPrice = dbo.get("avg_price")
|
||||||
if(lastMonthPrice && curPrice){
|
if(lastMonthPrice && curPrice){
|
||||||
def markup = (curPrice - lastMonthPrice)*100/lastMonthPrice
|
def markup = (curPrice - lastMonthPrice)*100/lastMonthPrice
|
||||||
if(Math.abs(markup)>3){
|
if(Math.abs(markup)>3){
|
||||||
@@ -120,36 +124,20 @@ class DistrictPriceExportBatch extends BaseBatch{
|
|||||||
curPrice = (int)(lastMonthPrice*markup/100 + lastMonthPrice)
|
curPrice = (int)(lastMonthPrice*markup/100 + lastMonthPrice)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def m = []
|
|
||||||
m << dbo.get("_id").toString()//¾ù¼ÛID
|
|
||||||
m << rMap.get("_id").toString()//Â¥ÅÌID
|
|
||||||
m << rMap.city
|
|
||||||
m << rMap.region
|
|
||||||
m << rMap.name
|
|
||||||
m << curPrice
|
|
||||||
// def lastMonthPrice = map2.get(rMap.city + "##" + rMap.region+"##"+rMap.name)
|
|
||||||
// if(lastMonthPrice && dbo.get("avg_price")){
|
|
||||||
// lastMonthPrice = lastMonthPrice.toInteger()
|
|
||||||
// def markup = (dbo.get("avg_price")-lastMonthPrice)*100.0/lastMonthPrice
|
|
||||||
// if(Math.abs(markup)>10){
|
|
||||||
// def random = 0
|
|
||||||
// if(dbo.get("avg_price")-lastMonthPrice>=0){
|
|
||||||
// random = com.fangjia.core.util.RandomUtil.random(1, 9)
|
|
||||||
// }else{
|
|
||||||
// random = com.fangjia.core.util.RandomUtil.random(-9, 0)
|
|
||||||
// }
|
|
||||||
// def newPrice = lastMonthPrice*random/100 + lastMonthPrice
|
|
||||||
// m << newPrice.toInteger()
|
|
||||||
// }else{
|
|
||||||
// m << dbo.get("avg_price")
|
|
||||||
// }
|
|
||||||
// }else{
|
|
||||||
// m << dbo.get("avg_price")
|
|
||||||
// }
|
|
||||||
m << curDate.toInteger();
|
|
||||||
result << m
|
|
||||||
}
|
}
|
||||||
|
def m = []
|
||||||
|
if(curPrice){
|
||||||
|
m << dbo.get("_id").toString()//¾ù¼ÛID
|
||||||
|
}else{
|
||||||
|
m << ""
|
||||||
|
}
|
||||||
|
m << rMap.get("_id").toString()//Â¥ÅÌID
|
||||||
|
m << rMap.city
|
||||||
|
m << rMap.region
|
||||||
|
m << rMap.name
|
||||||
|
m << curPrice
|
||||||
|
m << curDate.toInteger();
|
||||||
|
result << m
|
||||||
}
|
}
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,11 +10,11 @@ import java.text.SimpleDateFormat
|
|||||||
|
|
||||||
class TestFjtLog {
|
class TestFjtLog {
|
||||||
|
|
||||||
public static final DBCollection COLL = MongoUtils.getCollectionByName("fangjiatong_log", "fjt_select_log", "192.168.0.42", 52002)
|
public static final DBCollection COLL = MongoUtils.getCollectionByName("business", "open_uri_log", "192.168.0.42", 52002)
|
||||||
|
|
||||||
static main(args) {
|
static main(args) {
|
||||||
def q = new BasicDBObject()
|
def q = new BasicDBObject()
|
||||||
q.put("cat","芩華")
|
// q.put("cat","芩華")
|
||||||
def dbcursor = COLL.find(q).sort(new BasicDBObject("_id",-1))
|
def dbcursor = COLL.find(q).sort(new BasicDBObject("_id",-1))
|
||||||
|
|
||||||
def map = [:]
|
def map = [:]
|
||||||
|
|||||||
+9
-5
@@ -25,11 +25,11 @@ class AnjukeHouseCrawl {
|
|||||||
System.setProperty("http.nonProxyHosts", "localhost");
|
System.setProperty("http.nonProxyHosts", "localhost");
|
||||||
WebDriver driver = new ChromeDriver()
|
WebDriver driver = new ChromeDriver()
|
||||||
|
|
||||||
def href = "https://nanjing.anjuke.com/community/view/634969"
|
def href = "https://sh.esf.fang.com/loupan/1210043376.htm"
|
||||||
// def doc = getDocument(href, driver)
|
def doc = getDocument(href, driver)
|
||||||
def doc = ClaABuYun.getResponse(href)
|
// def doc = ClaABuYun.getResponse(href)
|
||||||
// def newUrl = href.substring(0, href.indexOf("?"))
|
// def newUrl = href.substring(0, hrefs.indexOf("?"))
|
||||||
sendMq(href, doc, "district_detail_anjuke")
|
sendMq(href, doc, "district_detail_fang")
|
||||||
|
|
||||||
// for(def i=1;i<50;i++){
|
// for(def i=1;i<50;i++){
|
||||||
// def url = "https://fz.anjuke.com/sale/guloue/p${i}/"
|
// def url = "https://fz.anjuke.com/sale/guloue/p${i}/"
|
||||||
@@ -201,6 +201,10 @@ class AnjukeHouseCrawl {
|
|||||||
if(!els){
|
if(!els){
|
||||||
els = JQueryUtils.select(".tab-cont-right", doc)
|
els = JQueryUtils.select(".tab-cont-right", doc)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!els){
|
||||||
|
els = JQueryUtils.select(".village_info", doc)
|
||||||
|
}
|
||||||
if(els && els.size()>0){
|
if(els && els.size()>0){
|
||||||
stop = true;
|
stop = true;
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
+1
-1
@@ -21,7 +21,7 @@ class AnjukeSendMq {
|
|||||||
def q = new BasicDBObject()
|
def q = new BasicDBObject()
|
||||||
def dbcursor = collection.find(q).limit(30)
|
def dbcursor = collection.find(q).limit(30)
|
||||||
for(def d : dbcursor){
|
for(def d : dbcursor){
|
||||||
sendMq(d.url, d.content, "district_detail_anjuke")
|
sendMq(d.url, d.content, "community_anjuke")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+47
-1
@@ -3,6 +3,7 @@ package com.fangjia.script.gj.location
|
|||||||
import com.fangjia.core.util.GeoUtils
|
import com.fangjia.core.util.GeoUtils
|
||||||
import com.fangjia.script.common.DataHandleUtils
|
import com.fangjia.script.common.DataHandleUtils
|
||||||
import com.fangjia.script.gj.OpenApiUtils
|
import com.fangjia.script.gj.OpenApiUtils
|
||||||
|
import com.fangjia.script.gj.paimai.DataUtil
|
||||||
import com.fangjia.script.util.CosineSimilarAlgorithm
|
import com.fangjia.script.util.CosineSimilarAlgorithm
|
||||||
import com.fangjia.script.util.ExcelUtils
|
import com.fangjia.script.util.ExcelUtils
|
||||||
import com.fangjia.script.yinjihaun.amap.GaoDeApiUtils
|
import com.fangjia.script.yinjihaun.amap.GaoDeApiUtils
|
||||||
@@ -13,7 +14,9 @@ class DistrictMapMatch {
|
|||||||
def task = new DistrictMapMatch()
|
def task = new DistrictMapMatch()
|
||||||
// task.mapMatch()
|
// task.mapMatch()
|
||||||
// task.mapMatch1()
|
// task.mapMatch1()
|
||||||
task.distince()
|
// task.distince()
|
||||||
|
|
||||||
|
task.mapMatch2()
|
||||||
}
|
}
|
||||||
|
|
||||||
def distince(){
|
def distince(){
|
||||||
@@ -93,6 +96,49 @@ class DistrictMapMatch {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def mapMatch2(){
|
||||||
|
def index = 0
|
||||||
|
ExcelUtils.multiThreadingModify("D:\\数据\\建行\\二期\\待入库小区(1).xlsx",{ d->
|
||||||
|
if(!d['M']){
|
||||||
|
index++
|
||||||
|
def rets = OpenApiUtils.getGaoDeSearchLocation(d['C'],d['J'],d['E'])
|
||||||
|
def map = findStandardObject2(d['C'],d['J'],d['E'], d['A'], rets);
|
||||||
|
// if (!map || !map.lat) {
|
||||||
|
// rets = OpenApiUtils.getBiDuLocation(d['A'],d['B'],d['C']);
|
||||||
|
// map = findStandardObject2(d['A'],d['B'],d['C'], d['D'], rets);
|
||||||
|
// }
|
||||||
|
if(map){
|
||||||
|
d['K'] = map.id
|
||||||
|
if(map.adname){
|
||||||
|
d['L'] = map.adname
|
||||||
|
}else if(map.region){
|
||||||
|
d['L'] = map.region
|
||||||
|
}
|
||||||
|
d['M'] = map.name
|
||||||
|
d['N'] = map.address
|
||||||
|
|
||||||
|
d['O'] = map.lng
|
||||||
|
d['P'] = map.lat
|
||||||
|
if(map.type){
|
||||||
|
d['Q'] = map.type
|
||||||
|
}else if(map.estateType){
|
||||||
|
d['Q'] = map.estateType
|
||||||
|
}
|
||||||
|
d['R'] = map.score
|
||||||
|
|
||||||
|
if(d['O'] && d['AM']){
|
||||||
|
def location = d['AM']
|
||||||
|
def lng = location.toString().substring(location.toString().indexOf(": ")+2, location.toString().indexOf(","))
|
||||||
|
def lat = location.toString().substring(location.toString().lastIndexOf(": ")+2, location.toString().indexOf("}"))
|
||||||
|
def distance = GeoUtils.calculateDistance(d['O'].toDouble(), d['P'].toDouble(), lng.toDouble(), lat.toDouble())
|
||||||
|
d['S'] = distance
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},0)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
def findStandardObject2(def city, def region, def name, def address, def rets) {
|
def findStandardObject2(def city, def region, def name, def address, def rets) {
|
||||||
if (rets) {
|
if (rets) {
|
||||||
def bestObj = [:]
|
def bestObj = [:]
|
||||||
|
|||||||
@@ -308,4 +308,5 @@ class DataUtil {
|
|||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -34,7 +34,7 @@ public class LianjiaCrawlByChrome {
|
|||||||
|
|
||||||
static main(args) {
|
static main(args) {
|
||||||
def task = new LianjiaCrawlByChrome();
|
def task = new LianjiaCrawlByChrome();
|
||||||
task.run()
|
// task.run()
|
||||||
// task.run1()
|
// task.run1()
|
||||||
task.addDealRegion();
|
task.addDealRegion();
|
||||||
task.standardRegion()
|
task.standardRegion()
|
||||||
|
|||||||
+53
-5
@@ -1,6 +1,7 @@
|
|||||||
package com.fangjia.script.gj.paimai
|
package com.fangjia.script.gj.paimai
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSON
|
import com.alibaba.fastjson.JSON
|
||||||
|
import com.fangjia.core.RegionData
|
||||||
import com.fangjia.core.util.DataUtil
|
import com.fangjia.core.util.DataUtil
|
||||||
import com.fangjia.script.crawl.JQueryUtils
|
import com.fangjia.script.crawl.JQueryUtils
|
||||||
import com.fangjia.script.util.MongoUtils
|
import com.fangjia.script.util.MongoUtils
|
||||||
@@ -30,22 +31,69 @@ class PaimaiTest {
|
|||||||
def task = new PaimaiTest();
|
def task = new PaimaiTest();
|
||||||
// task.run();
|
// task.run();
|
||||||
// task.stat()
|
// task.stat()
|
||||||
task.updatePaimai()
|
// task.updatePaimai()
|
||||||
// task.updateFieldPaimai()
|
// task.updateFieldPaimai()
|
||||||
|
// task.statCity()
|
||||||
|
task.jsStat()
|
||||||
|
}
|
||||||
|
|
||||||
|
def jsStat(){
|
||||||
|
def q = new BasicDBObject()
|
||||||
|
q.put("city","苏州")
|
||||||
|
def dbcursor = paimai43_COLL.find(q).batchSize(5000).addOption(Bytes.QUERYOPTION_NOTIMEOUT)
|
||||||
|
def rets = []
|
||||||
|
for(def db : dbcursor){
|
||||||
|
def m = [:]
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
def statCity(){
|
||||||
|
def q = new BasicDBObject()
|
||||||
|
def keys = new BasicDBObject()
|
||||||
|
keys.put("city", 1)
|
||||||
|
def dbcursor = paimai43_COLL.find(q, keys).batchSize(5000).addOption(Bytes.QUERYOPTION_NOTIMEOUT)
|
||||||
|
def set = new HashSet()
|
||||||
|
def index = 0
|
||||||
|
for(def d : dbcursor){
|
||||||
|
index++
|
||||||
|
if(index%10000==0){
|
||||||
|
print "."
|
||||||
|
}
|
||||||
|
if(!set.contains(d.city)){
|
||||||
|
set << d.city
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
println set.size()
|
||||||
|
for(def s : set){
|
||||||
|
println s
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def updateFieldPaimai(){
|
def updateFieldPaimai(){
|
||||||
def q = new BasicDBObject()
|
def q = new BasicDBObject()
|
||||||
q.put("city", new BasicDBObject('$in',["重庆","重庆市"]))
|
// q.put("city", new BasicDBObject('$in',["重庆","重庆市"]))
|
||||||
def index = 0
|
def index = 0
|
||||||
def dbcursor = paimai43_COLL.find(q).batchSize(5000).addOption(Bytes.QUERYOPTION_NOTIMEOUT)
|
def dbcursor = paimai43_COLL.find(q).batchSize(5000).addOption(Bytes.QUERYOPTION_NOTIMEOUT)
|
||||||
for(def obj : dbcursor) {
|
for(def obj : dbcursor) {
|
||||||
index++
|
index++
|
||||||
println index
|
println index
|
||||||
if(obj.address && obj.address.contains("可贷款")){
|
def oldCity = obj.city
|
||||||
obj.put("address", obj.address.substring(0,obj.address.indexOf("可贷款")))
|
if(oldCity){
|
||||||
paimai43_COLL.update(new BasicDBObject('_id', obj._id), new BasicDBObject('$set', obj))
|
def newCity = RegionData.formatCity(oldCity)
|
||||||
|
if(newCity && newCity!=oldCity){
|
||||||
|
obj.put("city", newCity)
|
||||||
|
println index +" "+ oldCity +" "+newCity
|
||||||
|
paimai43_COLL.update(new BasicDBObject('_id', obj._id), new BasicDBObject('$set', obj))
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
// if(obj.address && obj.address.contains("可贷款")){
|
||||||
|
// obj.put("address", obj.address.substring(0,obj.address.indexOf("可贷款")))
|
||||||
|
// paimai43_COLL.update(new BasicDBObject('_id', obj._id), new BasicDBObject('$set', obj))
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+50
@@ -0,0 +1,50 @@
|
|||||||
|
package com.fangjia.script.temp.shenjian.oracle;
|
||||||
|
|
||||||
|
import com.fangjia.core.RegionData
|
||||||
|
import com.fangjia.core.util.DistrictCodeUtils
|
||||||
|
import com.fangjia.script.commData.CommonDatautils
|
||||||
|
import com.fangjia.script.gj.district.FangjiaClientUtils
|
||||||
|
import com.fangjia.script.lixue.util.DBUtils
|
||||||
|
import com.fangjia.script.util.DataUtil
|
||||||
|
import com.fangjia.script.util.DateUtils
|
||||||
|
import com.fangjia.script.util.DbUtils
|
||||||
|
import com.fangjia.script.util.ElasticUtils
|
||||||
|
import com.fangjia.script.util.ExcelUtils
|
||||||
|
import com.fangjia.script.util.MongoUtils
|
||||||
|
import com.mongodb.BasicDBObject
|
||||||
|
import com.mongodb.DBCollection
|
||||||
|
import com.mongodb.DBObject
|
||||||
|
import groovy.sql.Sql
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出异常价格
|
||||||
|
*/
|
||||||
|
def sqlInstance = Sql.newInstance("jdbc:oracle:thin:@192.168.0.236:1521:orcl",
|
||||||
|
"GOOJIA", "GOOJIA", "oracle.jdbc.driver.OracleDriver")
|
||||||
|
|
||||||
|
def sql = "SELECT id, cityname, distname, commid, commname, calc_type, avg_price, year_month FROM community_base_price_gj WHERE year_month IN('202206', '202205') " +
|
||||||
|
" AND cityname IN ('东莞', '上海') AND rownum <= 10 ORDER BY cityname, distname, commid, commname, year_month"
|
||||||
|
def result = []
|
||||||
|
result << ["城市", "区域", "小区ID", "小区名", "五月均价", "五月计算方式", "六月均价", "六月计算方式"]
|
||||||
|
Map<String, Integer> fiveMap = new HashMap<>()
|
||||||
|
Map<String, Integer> sixMap = new HashMap<>()
|
||||||
|
sqlInstance.eachRow(sql, { r ->
|
||||||
|
def year_month = r['year_month']
|
||||||
|
String key = r['cityname'] + "," + r['distname'] + "," + r['commid'] + "," + r['commname']
|
||||||
|
if (year_month == '202205') {
|
||||||
|
fiveMap.put(key, r['avg_price'] + "|" + r['calc_type'])
|
||||||
|
} else if ((year_month == '202206')) {
|
||||||
|
fiveMap.put(key, r['avg_price'] + "|" + r['calc_type'])
|
||||||
|
}
|
||||||
|
})
|
||||||
|
for (String key : sixMap.keySet()) {
|
||||||
|
Integer fivePrice = fiveMap.get(key).split("|")[0]
|
||||||
|
Integer sixPrice = sixMap.get(key).split("|")[0]
|
||||||
|
if (fivePrice != null && sixPrice != null) {
|
||||||
|
if (Math.abs(sixPrice - fivePrice) * 100 / fivePrice > 10) {
|
||||||
|
def info = key.split(",")
|
||||||
|
result << [info[0], info[1], info[2], info[3], fivePrice, fiveMap.get(key).split("|")[1], sixPrice, sixMap.get(key).split("|")[1]]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ExcelUtils.write("F:\\数据\\价格\\东莞上海价格偏差大.xlsx", result, "统计")
|
||||||
+3
-3
@@ -40,11 +40,11 @@ class DataStat {
|
|||||||
|
|
||||||
|
|
||||||
def run(){
|
def run(){
|
||||||
def source = "58ͬ³Ç"//
|
def source = "Q·¿"//
|
||||||
def citys = findCrawlCity(source, 202202);
|
def citys = findCrawlCity(source, 202204);
|
||||||
for(def city : citys){
|
for(def city : citys){
|
||||||
def count1 = findCount(source, city, 202204);
|
def count1 = findCount(source, city, 202204);
|
||||||
def count2 = findCount(source, city, 202205);
|
def count2 = findCount(source, city, 202203);
|
||||||
println city +" "+count1+" "+count2
|
println city +" "+count1+" "+count2
|
||||||
// println count1
|
// println count1
|
||||||
// println "--- ----"
|
// println "--- ----"
|
||||||
|
|||||||
+13
-7
@@ -33,18 +33,18 @@ class SynchDistrictPrice {
|
|||||||
|
|
||||||
esSourceMap.each { k, v ->
|
esSourceMap.each { k, v ->
|
||||||
for(def city : citys){
|
for(def city : citys){
|
||||||
def rets = findAllEsData(city, k, v)
|
def rets = findAllEsData(city, v)
|
||||||
println city +" "+rets.size()
|
println city +" "+rets.size()
|
||||||
synchData(city, rets, v)
|
synchData(city, rets, "±´¿ÇÕÒ·¿")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def findAllEsData(source){
|
def findAllEsData(city,source){
|
||||||
def names = new HashSet()
|
def names = new HashSet()
|
||||||
def rets = []
|
def rets = []
|
||||||
ElasticUtils.executeSqlQuery("select * from community where source='±´¿Ç'", {d->
|
ElasticUtils.executeSqlQuery("select * from community where source='±´¿Ç' and city='${city}'", {d->
|
||||||
def s = d.city +"#"+d.region+"#"+d.name
|
def s = d.city +"#"+d.region+"#"+d.name
|
||||||
if(!names.contains(s)){
|
if(!names.contains(s)){
|
||||||
names << s
|
names << s
|
||||||
@@ -56,7 +56,7 @@ class SynchDistrictPrice {
|
|||||||
data.put("avg_price", d.avg_price)
|
data.put("avg_price", d.avg_price)
|
||||||
data.put("source", source)
|
data.put("source", source)
|
||||||
data.put("s_date", SHORT_DATE)
|
data.put("s_date", SHORT_DATE)
|
||||||
rets << d
|
rets << data
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
return rets;
|
return rets;
|
||||||
@@ -132,8 +132,14 @@ class SynchDistrictPrice {
|
|||||||
def obj= findIsExists(r.city, r.region, r.name, SHORT_DATE, source)
|
def obj= findIsExists(r.city, r.region, r.name, SHORT_DATE, source)
|
||||||
if(obj){
|
if(obj){
|
||||||
updateIndex++
|
updateIndex++
|
||||||
thirdPartyColl.remove(new BasicDBObject('_id',obj._id))
|
// thirdPartyColl.remove(new BasicDBObject('_id',obj._id))
|
||||||
thirdPartyColl.save(r)
|
// thirdPartyColl.save(r)
|
||||||
|
|
||||||
|
def udata = new BasicDBObject()
|
||||||
|
udata.put("avg_price", r.avg_price)
|
||||||
|
udata.put("m_date",new Date())
|
||||||
|
thirdPartyColl.update(new BasicDBObject('_id',obj._id), udata)
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
try{
|
try{
|
||||||
addIndex++
|
addIndex++
|
||||||
|
|||||||
+1
-1
@@ -43,7 +43,7 @@ class ThirdDataToGatherBatch extends BaseBatch{
|
|||||||
@Override
|
@Override
|
||||||
void process(Object args) {
|
void process(Object args) {
|
||||||
println SHORT_DATE
|
println SHORT_DATE
|
||||||
def citys = ["¸£ÖÝ"]//CommonDatautils.findAllCity();
|
def citys = CommonDatautils.findAllCity();
|
||||||
def weekend = DateUtils.getFirstDayOfWeek(new Date());
|
def weekend = DateUtils.getFirstDayOfWeek(new Date());
|
||||||
//def weekend = DateUtils.getFirstDayOfWeek(DateUtils.parseFromTightYYYYMMDD("2021-07-15"));
|
//def weekend = DateUtils.getFirstDayOfWeek(DateUtils.parseFromTightYYYYMMDD("2021-07-15"));
|
||||||
def cityIndex = 0;
|
def cityIndex = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user