Merge branch 'master' of http://gitlab.fangjia.com/dev0/main
This commit is contained in:
@@ -54,7 +54,6 @@
|
||||
<div class="main_content">
|
||||
<p>房价网成立于2006年,隶属于上海估家网络科技有限公司,致力于建立中国领先的房产大数据库CPDB及推动基于地理位置的人工智能的发展和应用。公司以“发现地址价值”为使命,始终秉承客观严谨的态度为政府、银行、金融机构等客户提供大数据、建模、咨询等服务。目前,所积累的房产数据已覆盖全国367个城市及地区,技术力量强大,客户查询量行业领先。</p>
|
||||
<p>公司在贷前估值、内评系统、贷后批量复估、信贷授信、地址反欺诈、数据治理、精准营销等领域都有着丰富的经验,拥有多项专利,被评为高新技术企业,赢得了国家统计局、建设银行、农业银行、平安集团、微众银行等众多客户的信赖。</p>
|
||||
<p>2020年,南京三悦网络科技有限公司与我司达成全面战略合作,并接受我司委托,全权负责我司产品手机版“房价网”公众号和电脑版的“房价通”的市场推广、客户开发与售后服务;有权直接与客户签订上述产品的销售合同;我司对其所有用户全面提供产品升级、数据更新及线上售后等服务。</p>
|
||||
</div>
|
||||
<div class="main_title"><small>数据为大众服务</small></div>
|
||||
<div class="main_content">
|
||||
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package com.fangjia.dal.sql.fangjia.dao;
|
||||
|
||||
import com.fangjia.dal.SqlDao;
|
||||
import com.fangjia.dal.sql.model.BohaiEvaluationAudit;
|
||||
|
||||
public interface BohaiEvaluationAuditDao extends SqlDao<BohaiEvaluationAudit> {
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package com.fangjia.dal.sql.fangjia.dao;
|
||||
|
||||
import com.fangjia.dal.GoojiaFangjiaSqlDao;
|
||||
import com.fangjia.dal.sql.model.BohaiEvaluationAudit;
|
||||
|
||||
public class BohaiEvaluationAuditDaoImpl extends GoojiaFangjiaSqlDao<BohaiEvaluationAudit> implements BohaiEvaluationAuditDao{
|
||||
}
|
||||
+184
@@ -0,0 +1,184 @@
|
||||
package com.fangjia.dal.sql.model;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import com.fangjia.dal.SqlEntity;
|
||||
@Entity
|
||||
@Table(name = "bohai_evaluation_audit")
|
||||
public class BohaiEvaluationAudit implements SqlEntity{
|
||||
|
||||
long id;
|
||||
|
||||
long evaluationId;
|
||||
String queryId;
|
||||
Integer backStatus;
|
||||
Integer inquirePrice;
|
||||
Integer auditStatus;//
|
||||
long userId;
|
||||
Integer hopePrice;
|
||||
Integer lastPrice;
|
||||
String remark;
|
||||
|
||||
String inquireRemark;
|
||||
|
||||
String feedbackId;
|
||||
Integer feedbackStatus;
|
||||
String feedbackMsg;
|
||||
|
||||
Date dateCreated;
|
||||
Date lastUpdated;
|
||||
|
||||
@Id
|
||||
@Column(name = "id")
|
||||
@GeneratedValue(strategy = GenerationType.AUTO)
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setId(long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Column(name = "evaluation_id")
|
||||
public long getEvaluationId() {
|
||||
return evaluationId;
|
||||
}
|
||||
|
||||
public void setEvaluationId(long evaluationId) {
|
||||
this.evaluationId = evaluationId;
|
||||
}
|
||||
|
||||
@Column(name = "query_id")
|
||||
public String getQueryId() {
|
||||
return queryId;
|
||||
}
|
||||
|
||||
public void setQueryId(String queryId) {
|
||||
this.queryId = queryId;
|
||||
}
|
||||
|
||||
@Column(name = "back_status")
|
||||
public Integer getBackStatus() {
|
||||
return backStatus;
|
||||
}
|
||||
|
||||
public void setBackStatus(Integer backStatus) {
|
||||
this.backStatus = backStatus;
|
||||
}
|
||||
|
||||
@Column(name = "inquire_price")
|
||||
public Integer getInquirePrice() {
|
||||
return inquirePrice;
|
||||
}
|
||||
|
||||
public void setInquirePrice(Integer inquirePrice) {
|
||||
this.inquirePrice = inquirePrice;
|
||||
}
|
||||
|
||||
@Column(name = "audit_status")
|
||||
public Integer getAuditStatus() {
|
||||
return auditStatus;
|
||||
}
|
||||
|
||||
public void setAuditStatus(Integer auditStatus) {
|
||||
this.auditStatus = auditStatus;
|
||||
}
|
||||
|
||||
@Column(name = "user_id")
|
||||
public long getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(long userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
@Column(name = "hope_price")
|
||||
public Integer getHopePrice() {
|
||||
return hopePrice;
|
||||
}
|
||||
|
||||
public void setHopePrice(Integer hopePrice) {
|
||||
this.hopePrice = hopePrice;
|
||||
}
|
||||
|
||||
@Column(name = "last_price")
|
||||
public Integer getLastPrice() {
|
||||
return lastPrice;
|
||||
}
|
||||
|
||||
public void setLastPrice(Integer lastPrice) {
|
||||
this.lastPrice = lastPrice;
|
||||
}
|
||||
|
||||
@Column(name = "remark")
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
@Column(name = "c_date")
|
||||
public Date getDateCreated() {
|
||||
return dateCreated;
|
||||
}
|
||||
|
||||
public void setDateCreated(Date dateCreated) {
|
||||
this.dateCreated = dateCreated;
|
||||
}
|
||||
|
||||
@Column(name = "m_date")
|
||||
public Date getLastUpdated() {
|
||||
return lastUpdated;
|
||||
}
|
||||
|
||||
public void setLastUpdated(Date lastUpdated) {
|
||||
this.lastUpdated = lastUpdated;
|
||||
}
|
||||
|
||||
@Column(name = "feedback_id")
|
||||
public String getFeedbackId() {
|
||||
return feedbackId;
|
||||
}
|
||||
|
||||
public void setFeedbackId(String feedbackId) {
|
||||
this.feedbackId = feedbackId;
|
||||
}
|
||||
|
||||
@Column(name = "feedback_status")
|
||||
public Integer getFeedbackStatus() {
|
||||
return feedbackStatus;
|
||||
}
|
||||
|
||||
public void setFeedbackStatus(Integer feedbackStatus) {
|
||||
this.feedbackStatus = feedbackStatus;
|
||||
}
|
||||
|
||||
@Column(name = "feedback_msg")
|
||||
public String getFeedbackMsg() {
|
||||
return feedbackMsg;
|
||||
}
|
||||
|
||||
public void setFeedbackMsg(String feedbackMsg) {
|
||||
this.feedbackMsg = feedbackMsg;
|
||||
}
|
||||
|
||||
@Column(name = "inquire_remark")
|
||||
public String getInquireRemark() {
|
||||
return inquireRemark;
|
||||
}
|
||||
|
||||
public void setInquireRemark(String inquireRemark) {
|
||||
this.inquireRemark = inquireRemark;
|
||||
}
|
||||
}
|
||||
@@ -99,6 +99,9 @@ public class FjtEvaluation implements SqlEntity{
|
||||
private Integer buyYear; //是否满五
|
||||
private Integer onlyOne; //是否唯一
|
||||
private Double registerPrice; //深圳 登记价
|
||||
|
||||
private String finishDateStr;//竣工时间
|
||||
private String useType;//房屋用途
|
||||
|
||||
@GeneratedValue(strategy = GenerationType.AUTO)
|
||||
@Id
|
||||
@@ -729,6 +732,24 @@ public class FjtEvaluation implements SqlEntity{
|
||||
this.registerPrice = registerPrice;
|
||||
}
|
||||
|
||||
@Column(name = "finish_date_str")
|
||||
public String getFinishDateStr() {
|
||||
return finishDateStr;
|
||||
}
|
||||
|
||||
public void setFinishDateStr(String finishDateStr) {
|
||||
this.finishDateStr = finishDateStr;
|
||||
}
|
||||
|
||||
@Column(name = "use_type")
|
||||
public String getUseType() {
|
||||
return useType;
|
||||
}
|
||||
|
||||
public void setUseType(String useType) {
|
||||
this.useType = useType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "FjtEvaluation{" +
|
||||
|
||||
+2
-2
@@ -2773,7 +2773,7 @@ public class AddressController {
|
||||
if(json.getInt("code")==200){
|
||||
JSONObject resultJson = json.getJSONObject("result");
|
||||
JSONObject searchAddress = resultJson.getJSONObject("searchAddress");
|
||||
if(resultJson.getInt("credit")>0){
|
||||
if(resultJson.getDouble("credit")>0){
|
||||
District district = districtService.findByNameAndAlias(resultJson.getString("city"), resultJson.getString("district"), resultJson.getString("name"), "district");
|
||||
if(district != null){
|
||||
resultMap.put("riskLevel","A");
|
||||
@@ -2789,7 +2789,7 @@ public class AddressController {
|
||||
if(searchAddress.containsKey("streetNumber")){
|
||||
searchKey.append(searchAddress.getString("streetNumber"));
|
||||
}
|
||||
if(StringUtils.isNotBlank(searchKey.toString()) && StringUtils.isNotBlank(searchAddress.getString("city"))){
|
||||
if(StringUtils.isNotBlank(searchKey.toString()) && searchAddress.has("city") && StringUtils.isNotBlank(searchAddress.getString("city"))){
|
||||
JSONObject jsonObject = addressMatchProxyService.searchByAmap(searchAddress.getString("city"), model.getAddress());
|
||||
JSONArray poisData = jsonObject.getJSONArray("pois");
|
||||
for (int i = 0; i < poisData.size(); i++) {
|
||||
|
||||
+12
-8
@@ -6,16 +6,12 @@ import com.fangjia.dal.QueryParam;
|
||||
import com.fangjia.dal.SdQuery;
|
||||
import com.fangjia.dal.SrQuery;
|
||||
import com.fangjia.dal.common.DistrictKey;
|
||||
import com.fangjia.dal.mongo.model.DistrictStat;
|
||||
import com.fangjia.dal.seaweed.model.District;
|
||||
import com.fangjia.dal.sql.model.FjtUsers;
|
||||
import com.fangjia.dal.sql.model.UserCity;
|
||||
import com.fangjia.open.compatible.model.JsonModel;
|
||||
import com.fangjia.open.model.BaseModel;
|
||||
import com.fangjia.open.model.FangjiaApiModel;
|
||||
import com.fangjia.open.model.weixin.DistrictModel;
|
||||
import com.fangjia.open.model.weixin.DistrictSearchModel;
|
||||
import com.fangjia.open.model.weixin.UserModel;
|
||||
import com.fangjia.open.util.BHBankUtils;
|
||||
import com.fangjia.service.api.AutoCompleteBo;
|
||||
import com.fangjia.service.bo.DistrictStatBo;
|
||||
import com.fangjia.service.bo.DistrictStatRentBo;
|
||||
@@ -27,8 +23,8 @@ import com.fangjia.service.sql.UserCityService;
|
||||
import com.fangjia.service.user.UsersInfoService;
|
||||
import com.fangjia.service.util.CookieUtils;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
|
||||
import net.sf.json.JSONObject;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.lucene.index.Term;
|
||||
import org.apache.lucene.search.BooleanClause;
|
||||
@@ -40,7 +36,6 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.*;
|
||||
|
||||
public class DistrictController {
|
||||
@@ -151,6 +146,7 @@ public class DistrictController {
|
||||
districtModel.setMsg("参数错误");
|
||||
return districtModel;
|
||||
}
|
||||
|
||||
District district = null;
|
||||
if(StringUtils.isNotBlank(districtModel.getId())) {
|
||||
district = districtService.findById(districtModel.getId());
|
||||
@@ -162,8 +158,14 @@ public class DistrictController {
|
||||
} else {
|
||||
district = districtService.findByKeyMiniModel(districtModel.getCityName(), districtModel.getRegion(), districtModel.getName(), "district");
|
||||
}
|
||||
|
||||
//小区价格
|
||||
DistrictStatBo districtStatBo = getDistrictStat(new DistrictKey(district));
|
||||
|
||||
String userId = CookieUtils.getCookieValue(request, "login_user_id");
|
||||
|
||||
|
||||
|
||||
//小区租金
|
||||
List<DistrictStatRentBo> districtStatRentBos = districtStatRentService.findAllHouseTypeByDistrictStatRent(new DistrictKey(district));
|
||||
//处理图片链接
|
||||
@@ -183,7 +185,7 @@ public class DistrictController {
|
||||
boolean is=true;
|
||||
if (null != districtStatBo && null != districtStatBo.getDefaultDistrictStat()) {
|
||||
double credit = districtStatBo.getDefaultDistrictStat().getCredit();
|
||||
String userId = CookieUtils.getCookieValue(request, "login_user_id");
|
||||
|
||||
Map<String, String> map = userCityService.FindCreditByUserId(Long.parseLong(userId));
|
||||
String creditStr = map.get(city);
|
||||
if (StringUtils.isNotBlank(creditStr)) {
|
||||
@@ -208,6 +210,8 @@ public class DistrictController {
|
||||
return districtModel;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private DistrictStatBo getDistrictStat(DistrictKey districtKey) {
|
||||
District district = districtService.findDistrict(districtKey, true);
|
||||
DistrictStatBo statBo = null;
|
||||
|
||||
+46
-13
@@ -1,16 +1,10 @@
|
||||
package com.fangjia.open.controllers.weixin;
|
||||
|
||||
import com.fangjia.core.util.StringUtil;
|
||||
import com.fangjia.dal.sql.model.EvaluationAudit;
|
||||
import com.fangjia.dal.sql.model.FjtEvaluation;
|
||||
import com.fangjia.dal.sql.model.FjtUsers;
|
||||
import com.fangjia.dal.sql.model.UserTrades;
|
||||
import com.fangjia.dal.sql.model.*;
|
||||
import com.fangjia.open.model.RestfulModelAndView;
|
||||
import com.fangjia.open.model.weixin.ReportModel;
|
||||
import com.fangjia.service.sql.EvaluationAuditService;
|
||||
import com.fangjia.service.sql.FjtEvaluationService;
|
||||
import com.fangjia.service.sql.FjtUsersService;
|
||||
import com.fangjia.service.sql.UserTradesService;
|
||||
import com.fangjia.service.sql.*;
|
||||
import com.fangjia.service.util.CookieUtils;
|
||||
import net.sf.json.JSONArray;
|
||||
import net.sf.json.JSONObject;
|
||||
@@ -32,6 +26,7 @@ public class ReportController {
|
||||
private FjtEvaluationService fjtEvaluationService;
|
||||
private EvaluationAuditService evaluationAuditService;
|
||||
private FjtUsersService fjtUsersService;
|
||||
private BohaiEvaluationAuditService bohaiEvaluationAuditService;
|
||||
|
||||
public Object downloadListAction(HttpServletRequest req, ReportModel model, @Param(name = "page") String page) {
|
||||
if(req.getMethod()==null || "GET".equalsIgnoreCase(req.getMethod())) {
|
||||
@@ -68,7 +63,7 @@ public class ReportController {
|
||||
jsonObject.put("bgsf", userTrades.getCharge()+"");
|
||||
if(StringUtils.isNotBlank(evaluationId)) {
|
||||
FjtEvaluation fjtEvaluation = fjtEvaluationService.findEvaluationById(NumberUtils.toLong(evaluationId));
|
||||
EvaluationAudit evaluationAudit = evaluationAuditService.findByEvalutionId(evaluationId);
|
||||
|
||||
if(fjtEvaluation != null) {
|
||||
jsonObject.put("eid", fjtEvaluation.getId());
|
||||
jsonObject.put("dz", fjtEvaluation.getAddress());
|
||||
@@ -76,11 +71,40 @@ public class ReportController {
|
||||
jsonObject.put("rn", fjtEvaluation.getRoomNum());
|
||||
jsonObject.put("zdr", StringUtils.isBlank(fjtEvaluation.getLender()) ? "-" : fjtEvaluation.getLender());
|
||||
jsonObject.put("mj", fjtEvaluation.getHouseArea());
|
||||
jsonObject.put("zj", df.format(fjtEvaluation.getTotalPrice() / 10000.0));
|
||||
}
|
||||
if(evaluationAudit != null) {
|
||||
jsonObject.put("ckj", (evaluationAudit.getDealPrice()==null) ? "-" : df.format(evaluationAudit.getDealPrice())+"");//²Î¿¼¼Û
|
||||
jsonObject.put("zsj", (evaluationAudit.getAuditPrice()==null) ? "-" : df.format(evaluationAudit.getAuditPrice())+"");//ÖÕÉó¼Û
|
||||
|
||||
if(fjtEvaluation != null && fjtUsers.getRole()==17){
|
||||
BohaiEvaluationAudit bhEvaluationAudit = bohaiEvaluationAuditService.findByBohaiEvaluationAuditId(fjtEvaluation.getId());
|
||||
String zj = "-";
|
||||
String qwj = "-";
|
||||
String zsj = "-";
|
||||
if(bhEvaluationAudit != null){
|
||||
if(bhEvaluationAudit.getInquirePrice()!=null && bhEvaluationAudit.getInquirePrice() > 0){
|
||||
zj = String.valueOf((int)(bhEvaluationAudit.getInquirePrice() / 10000));
|
||||
}
|
||||
if(bhEvaluationAudit.getHopePrice()!=null && bhEvaluationAudit.getHopePrice()>0){
|
||||
qwj = String.valueOf((int)(bhEvaluationAudit.getHopePrice() / 10000));
|
||||
}
|
||||
|
||||
if(bhEvaluationAudit.getLastPrice()!=null && bhEvaluationAudit.getLastPrice()>0){
|
||||
zsj = String.valueOf((int)(bhEvaluationAudit.getLastPrice() / 10000));
|
||||
}
|
||||
|
||||
}
|
||||
jsonObject.put("zj", zj);//总价
|
||||
jsonObject.put("qwj", qwj);//期望价
|
||||
jsonObject.put("zsj", zsj);//终审价
|
||||
|
||||
}else{
|
||||
EvaluationAudit evaluationAudit = evaluationAuditService.findByEvalutionId(evaluationId);
|
||||
if(fjtEvaluation != null) {
|
||||
jsonObject.put("zj", df.format(fjtEvaluation.getTotalPrice() / 10000.0));
|
||||
}
|
||||
|
||||
if(evaluationAudit != null) {
|
||||
jsonObject.put("ckj", (evaluationAudit.getDealPrice()==null) ? "-" : df.format(evaluationAudit.getDealPrice())+"");//参考价
|
||||
jsonObject.put("zsj", (evaluationAudit.getAuditPrice()==null) ? "-" : df.format(evaluationAudit.getAuditPrice())+"");//终审价
|
||||
}
|
||||
}
|
||||
}
|
||||
ja.add(jsonObject);
|
||||
@@ -106,4 +130,13 @@ public class ReportController {
|
||||
public void setFjtUsersService(FjtUsersService fjtUsersService) {
|
||||
this.fjtUsersService = fjtUsersService;
|
||||
}
|
||||
|
||||
|
||||
public BohaiEvaluationAuditService getBohaiEvaluationAuditService() {
|
||||
return bohaiEvaluationAuditService;
|
||||
}
|
||||
|
||||
public void setBohaiEvaluationAuditService(BohaiEvaluationAuditService bohaiEvaluationAuditService) {
|
||||
this.bohaiEvaluationAuditService = bohaiEvaluationAuditService;
|
||||
}
|
||||
}
|
||||
|
||||
+295
-17
@@ -1,5 +1,6 @@
|
||||
package com.fangjia.open.controllers.weixin;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
@@ -7,9 +8,13 @@ import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.fangjia.dal.sql.model.*;
|
||||
import com.fangjia.open.util.BHBankUtils;
|
||||
import com.fangjia.open.util.InsidePolygon2;
|
||||
import com.fangjia.service.mongo.fangjia.PriceBorderService;
|
||||
import com.fangjia.service.sql.*;
|
||||
import net.sf.json.JSONArray;
|
||||
import net.sf.json.JSONObject;
|
||||
|
||||
@@ -28,12 +33,6 @@ import com.fangjia.dal.mongo.model.LatlngPolygon;
|
||||
import com.fangjia.dal.mongo.model.PriceBorder;
|
||||
import com.fangjia.dal.mongo.model.bkoff.DistrictHouseStat;
|
||||
import com.fangjia.dal.seaweed.model.District;
|
||||
import com.fangjia.dal.sql.model.EvaluationAudit;
|
||||
import com.fangjia.dal.sql.model.FjtEvaluation;
|
||||
import com.fangjia.dal.sql.model.FjtUsers;
|
||||
import com.fangjia.dal.sql.model.GoldLogs;
|
||||
import com.fangjia.dal.sql.model.UserTrades;
|
||||
import com.fangjia.dal.sql.model.UsersDetail;
|
||||
import com.fangjia.open.compatible.model.JsonModel;
|
||||
import com.fangjia.open.model.RestfulModelAndView;
|
||||
import com.fangjia.open.model.weixin.EvaluationModel;
|
||||
@@ -56,13 +55,6 @@ import com.fangjia.service.mongo.fangjia.DealPriceService;
|
||||
import com.fangjia.service.mongo.fangjia.LatlngPolygonService;
|
||||
import com.fangjia.service.sms.SmsException;
|
||||
import com.fangjia.service.sms.SmsService;
|
||||
import com.fangjia.service.sql.EvaluationAuditService;
|
||||
import com.fangjia.service.sql.EvaluationRateService;
|
||||
import com.fangjia.service.sql.FjtEvaluationService;
|
||||
import com.fangjia.service.sql.FjtUsersService;
|
||||
import com.fangjia.service.sql.GoldLogsService;
|
||||
import com.fangjia.service.sql.UserTradesService;
|
||||
import com.fangjia.service.sql.UsersDetailService;
|
||||
import com.fangjia.service.user.UsersInfoService;
|
||||
import com.fangjia.service.util.CookieUtils;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
@@ -107,6 +99,7 @@ public class WeiXinEvaluationController {
|
||||
private EvaluationService evaluationService;
|
||||
private GoldLogsService goldLogsService;
|
||||
private PriceBorderService priceBorderService;
|
||||
private BohaiEvaluationAuditService bohaiEvaluationAuditService;
|
||||
|
||||
private final static String DD_ID = "5938c43984aec20a36f474c5";
|
||||
|
||||
@@ -122,7 +115,7 @@ public class WeiXinEvaluationController {
|
||||
//MOBILES.add("13681915777");//13774361275
|
||||
}
|
||||
|
||||
public Object formAction(HttpServletRequest req, EvaluationModel model){
|
||||
public Object formAction(HttpServletRequest req, EvaluationModel model, HttpServletResponse response){
|
||||
District district = districtService.findById(model.getId());
|
||||
model.setDistrict(district);
|
||||
|
||||
@@ -130,9 +123,33 @@ public class WeiXinEvaluationController {
|
||||
long userId = Long.valueOf(cookieUserId);
|
||||
FjtUsers fjtUsers = fjtUsersService.findById(userId);
|
||||
model.setRole(fjtUsers.getRole());
|
||||
if(fjtUsers.getRole()==17){
|
||||
try {
|
||||
response.sendRedirect("bhform?id="+model.getId());
|
||||
} catch (IOException e) {
|
||||
}
|
||||
}
|
||||
return model;
|
||||
}
|
||||
|
||||
public Object bhformAction(EvaluationModel model) {
|
||||
District district = districtService.findById(model.getId());
|
||||
List<String> addrAlias = new ArrayList<String>();
|
||||
if(StringUtils.isNotBlank(district.getAddress())){
|
||||
addrAlias.add(district.getAddress());
|
||||
|
||||
if(district.getAddrAlias()!=null && !district.getAddrAlias().contains(district.getAddress())){
|
||||
addrAlias.addAll(district.getAddrAlias());
|
||||
}
|
||||
district.setAddrAlias(addrAlias);
|
||||
}
|
||||
|
||||
model.setDistrict(district);
|
||||
return model;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 微信小程序:小区详情获取
|
||||
* @return
|
||||
@@ -177,6 +194,108 @@ public class WeiXinEvaluationController {
|
||||
return jsonModel;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public Object bhhistoryAction(HttpServletRequest req, EvaluationModel model, @Param(name = "page") String page) {
|
||||
if (req.getMethod() == null || "GET".equalsIgnoreCase(req.getMethod())) {
|
||||
return model;
|
||||
}
|
||||
String cookieUserId = CookieUtils.getCookieValue(req, "login_user_id");
|
||||
long userId = Long.valueOf(cookieUserId);
|
||||
FjtUsers fjtUsers = fjtUsersService.findById(userId);
|
||||
RestfulModelAndView data = new RestfulModelAndView();
|
||||
JSONObject result = new JSONObject();
|
||||
//最多10页
|
||||
if (NumberUtils.toInt(page) > 10) {
|
||||
result.put("result", new JSONArray().toString());
|
||||
data.setModel(result);
|
||||
return data;
|
||||
}
|
||||
Pager pager = new Pager(10);
|
||||
pager.setCurrentPage(NumberUtils.toInt(page));
|
||||
List<FjtEvaluation> fjtEvaluationList = fjtEvaluationService.findEvaluationsByUserId(userId, pager);
|
||||
JSONArray ja = new JSONArray();
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy.MM.dd");
|
||||
for (int i = 0; i < fjtEvaluationList.size(); ++i) {
|
||||
FjtEvaluation fjtEvaluation = fjtEvaluationList.get(i);
|
||||
BohaiEvaluationAudit evaluationAudit = bohaiEvaluationAuditService.findByBohaiEvaluationAuditId(fjtEvaluation.getId());
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("eid", fjtEvaluation.getId());
|
||||
jsonObject.put("pgrq", sdf.format(fjtEvaluation.getDateCreated()));//评估日期
|
||||
jsonObject.put("tjrq", (evaluationAudit == null || evaluationAudit.getAuditStatus() != 4) ? "-" : sdf.format(evaluationAudit.getLastUpdated()));//调价日期
|
||||
jsonObject.put("dz", fjtEvaluation.getAddress());//地址
|
||||
jsonObject.put("hn", fjtEvaluation.getHouseNum());
|
||||
jsonObject.put("rn", fjtEvaluation.getRoomNum());
|
||||
jsonObject.put("wylx", StringUtils.isBlank(BUILDTYPE_MAP.get(fjtEvaluation.getBuildType())) ? "-" : BUILDTYPE_MAP.get(fjtEvaluation.getBuildType()));//物业类型
|
||||
jsonObject.put("mj", fjtEvaluation.getHouseArea());//面积
|
||||
String zj = "-";
|
||||
if(evaluationAudit != null && evaluationAudit.getInquirePrice() > 0){
|
||||
zj = String.valueOf((int)(evaluationAudit.getInquirePrice() / 10000));
|
||||
}
|
||||
jsonObject.put("zj", zj);//总价
|
||||
jsonObject.put("ckj", (evaluationAudit == null || evaluationAudit.getHopePrice() == null) ? "-" : (int)(evaluationAudit.getHopePrice()/ 10000));//期望价
|
||||
jsonObject.put("zsj", (evaluationAudit == null || evaluationAudit.getLastPrice() == null) ? "-" : (int)(evaluationAudit.getLastPrice()/ 10000));//终审价
|
||||
jsonObject.put("zdr", StringUtils.isBlank(fjtEvaluation.getLender()) ? "-" : fjtEvaluation.getLender());//主贷人
|
||||
if(evaluationAudit==null || (evaluationAudit!=null && StringUtils.isBlank(evaluationAudit.getInquireRemark()))){
|
||||
jsonObject.put("pgsm","");//评估说明
|
||||
}else{
|
||||
jsonObject.put("pgsm",evaluationAudit.getInquireRemark());//评估说明
|
||||
}
|
||||
|
||||
if (evaluationAudit!=null && evaluationAudit.getAuditStatus()==0) {
|
||||
jsonObject.put("shzt", "价格待审核");
|
||||
|
||||
//接入询价结果查询接口
|
||||
JSONObject obj = BHBankUtils.getInquireRecord(evaluationAudit.getQueryId());
|
||||
if(obj!=null){
|
||||
Integer totalPrice = (Integer) obj.get("inquirePrice");
|
||||
if(totalPrice>0){
|
||||
evaluationAudit.setAuditStatus(1);
|
||||
evaluationAudit.setInquirePrice(totalPrice);
|
||||
jsonObject.put("zj", (int)(totalPrice/10000));
|
||||
bohaiEvaluationAuditService.updateBohaiEvaluationAudit(evaluationAudit);
|
||||
jsonObject.put("shzt", "价格已审核");
|
||||
}
|
||||
}
|
||||
} else if (evaluationAudit!=null && evaluationAudit.getAuditStatus()==1) {
|
||||
jsonObject.put("shzt", "价格已审核");
|
||||
} else if (evaluationAudit!=null && evaluationAudit.getAuditStatus()==2) {
|
||||
jsonObject.put("shzt", "价格待审核");
|
||||
if(evaluationAudit.getHopePrice()>0){
|
||||
//接入反馈结果查询接口
|
||||
JSONObject object = BHBankUtils.inquireFeedbackCall(evaluationAudit.getFeedbackId());
|
||||
if(object!=null){
|
||||
Integer feedbackStatus = (Integer) object.get("feedbackStatus");
|
||||
if(feedbackStatus!=0){
|
||||
int inquirePrice = (Integer) object.get("inquirePrice");
|
||||
evaluationAudit.setAuditStatus(3);
|
||||
evaluationAudit.setLastPrice(inquirePrice);
|
||||
evaluationAudit.setFeedbackStatus(feedbackStatus);
|
||||
evaluationAudit.setFeedbackMsg((String)object.get("feedbackCallMsg"));
|
||||
jsonObject.put("zsj",(int)(inquirePrice/ 10000));//终审价
|
||||
bohaiEvaluationAuditService.updateBohaiEvaluationAudit(evaluationAudit);
|
||||
jsonObject.put("shzt", "审核完成");
|
||||
}
|
||||
}
|
||||
}
|
||||
}else if (evaluationAudit!=null && evaluationAudit.getAuditStatus()==3) {
|
||||
jsonObject.put("shzt", "审核完成");
|
||||
}else{
|
||||
jsonObject.put("shzt", "-");
|
||||
}
|
||||
|
||||
UserTrades userTrade = userTradesService.findUserTradesByEvaluationId(String.valueOf(fjtEvaluation.getId()));
|
||||
if(userTrade!=null){
|
||||
jsonObject.put("down", 1);
|
||||
}
|
||||
ja.add(jsonObject);
|
||||
}
|
||||
result.put("result", ja.toString());
|
||||
result.put("role", fjtUsers!=null? fjtUsers.getRole(): 0);
|
||||
data.setModel(result);
|
||||
return data;
|
||||
}
|
||||
|
||||
/**
|
||||
* 估价记录列表
|
||||
* @param model
|
||||
@@ -243,6 +362,7 @@ public class WeiXinEvaluationController {
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
public Object inputAction(EvaluationModel model){
|
||||
District district = districtService.findById(model.getId());
|
||||
if(model.getEvaluation() == null){
|
||||
@@ -277,7 +397,9 @@ public class WeiXinEvaluationController {
|
||||
evaluation.setCity(district.getCity());
|
||||
evaluation.setRegion(district.getRegion());
|
||||
evaluation.setDistrictName(district.getName());
|
||||
evaluation.setAddress(district.getAddress());
|
||||
if(StringUtils.isBlank(evaluation.getAddress())){
|
||||
evaluation.setAddress(district.getAddress());
|
||||
}
|
||||
evaluation.setUserId(userId);
|
||||
evaluation.setDateCreated(new Date());
|
||||
evaluation.setLastUpdated(new Date());
|
||||
@@ -294,14 +416,88 @@ public class WeiXinEvaluationController {
|
||||
}
|
||||
|
||||
int avgPrice = districtStatService.findLatestDistrictAvgPrice(new DistrictKey(district), null);
|
||||
|
||||
FjtUsers fjtUser = fjtUsersService.findById(Long.valueOf(userId));
|
||||
if(fjtUser!=null && fjtUser.getRole()==17) {
|
||||
evaluation.setDirection(3);//渤海朝向默认南
|
||||
if(StringUtils.isBlank(evaluation.getUseType())){
|
||||
evaluation.setUseType("居住");
|
||||
}
|
||||
// BHBankUtils.getInquirePrice(model);
|
||||
}
|
||||
if(avgPrice > 0){
|
||||
long totalPrice = evaluationRateService.evaluation(avgPrice, evaluation);
|
||||
evaluation.setTotalPrice(Integer.valueOf(totalPrice+""));
|
||||
evaluation.setAveragePrice((int)(totalPrice/evaluation.getHouseArea()));
|
||||
}
|
||||
|
||||
fjtEvaluationService.saveEvaluation(evaluation);
|
||||
|
||||
if(fjtUser!=null && fjtUser.getRole()==17) {
|
||||
List<JSONObject> bhDists = BHBankUtils.getDistrictByBhbank(evaluation.getAddress());
|
||||
if(bhDists.size()<1){
|
||||
bhDists = BHBankUtils.getDistrictByBhbank(district.getName());
|
||||
}
|
||||
Map<String, String> bhMatchMap = new HashMap<String, String>();
|
||||
if(bhDists.size()==1){
|
||||
JSONObject o = bhDists.get(0);
|
||||
String bhDistName = (String)o.get("name");
|
||||
String regionCode = String.valueOf((Long)o.get("country"));
|
||||
String bhRegion = BHBankUtils.regionCodeMap.get(regionCode);
|
||||
bhMatchMap.put("preCode", (String)o.get("code"));
|
||||
bhMatchMap.put("preName", bhDistName);
|
||||
bhMatchMap.put("countryCode",regionCode);
|
||||
// bhMatchMap.put("buildName",(String)o.get("address"));
|
||||
}else{
|
||||
Map<String,String> regionCodeMap = BHBankUtils.regionCodeMap;
|
||||
String regionCode = null;
|
||||
for(String key : regionCodeMap.keySet()){
|
||||
String value = regionCodeMap.get(key);
|
||||
if(value.equals(district.getRegion())){
|
||||
regionCode = key;
|
||||
break;
|
||||
}
|
||||
}
|
||||
bhMatchMap.put("preName", district.getName());
|
||||
bhMatchMap.put("countryCode",regionCode);
|
||||
System.out.println("【渤海银行】地址查询返回结果"+bhDists.size()+"个");
|
||||
}
|
||||
UsersDetail usersDetail = usersDetailService.findById(Long.valueOf(userId));
|
||||
if(StringUtils.isBlank(usersDetail.getMobile())){
|
||||
usersDetail.setMobile(fjtUser.getEmail());
|
||||
}
|
||||
JSONObject bhApiResult = BHBankUtils.getInquirePrice(model, bhMatchMap, usersDetail, evaluation.getTotalPrice());
|
||||
if(bhApiResult!=null){
|
||||
JSONObject dataObj = (JSONObject) bhApiResult.get("data");
|
||||
String queryId = (String) dataObj.get("queryId");
|
||||
Integer inquirePrice = (Integer) dataObj.get("inquirePrice");
|
||||
Integer auditStatus = null;
|
||||
String inquireRemark = (String) dataObj.get("remark");
|
||||
if((Integer) bhApiResult.get("errCode") == 1){//待人工核验
|
||||
auditStatus = 0;
|
||||
}else if((Integer) bhApiResult.get("errCode") == 0){//正常返回
|
||||
auditStatus = 1;
|
||||
}
|
||||
|
||||
BohaiEvaluationAudit audit = new BohaiEvaluationAudit();
|
||||
audit.setEvaluationId(evaluation.getId());
|
||||
audit.setQueryId(queryId);
|
||||
audit.setBackStatus((Integer) bhApiResult.get("errCode") );
|
||||
audit.setUserId(userId);
|
||||
audit.setInquirePrice(inquirePrice);
|
||||
audit.setAuditStatus(auditStatus);//0:价格待审核 1:价格已审核 2:有期望价 3:价格确认
|
||||
if(StringUtils.isNotBlank(inquireRemark) && !inquireRemark.equals("None")){
|
||||
audit.setInquireRemark(inquireRemark);
|
||||
}
|
||||
audit.setDateCreated(new Date());
|
||||
audit.setDateCreated(new Date());
|
||||
bohaiEvaluationAuditService.saveBohaiEvaluationAudit(audit);
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, String> data = new HashMap<String, String>();
|
||||
data.put("id", String.valueOf(evaluation.getId()));
|
||||
data.put("role", String.valueOf(fjtUser.getRole()));
|
||||
JsonModel json = new JsonModel();
|
||||
json.setJsonModel(data);
|
||||
return json;
|
||||
@@ -380,6 +576,8 @@ public class WeiXinEvaluationController {
|
||||
model.setEvaluationAudit(evaluationAudit);
|
||||
|
||||
if(fjtUser!=null && fjtUser.getRole()==17 && district.getCity().equals("上海")){
|
||||
|
||||
|
||||
Map<String, Object> retMap = getLoanInfo(district, evaluation.getHouseArea());
|
||||
if(retMap!=null && retMap.size()>0){
|
||||
model.setLoanInfoMap(retMap);
|
||||
@@ -387,6 +585,34 @@ public class WeiXinEvaluationController {
|
||||
}
|
||||
return model;
|
||||
}
|
||||
|
||||
public Object bhreportAction(EvaluationModel model){
|
||||
String evaluationId = model.getEvaluationId();
|
||||
FjtEvaluation evaluation = fjtEvaluationService.findEvaluationById(Long.valueOf(evaluationId));
|
||||
model.setFjtEvaluation(evaluation);
|
||||
DistrictStatBo districtStatBo = districtStatService.findDistrictStat(new DistrictKey(evaluation.getCity(), evaluation.getRegion(), evaluation.getDistrictName()));
|
||||
model.setDistrictStatBo(districtStatBo);
|
||||
|
||||
|
||||
FjtUsers fjtUser = fjtUsersService.findById(evaluation.getUserId());
|
||||
model.setRole(fjtUser.getRole());
|
||||
|
||||
District district = districtService.findDistrict(new DistrictKey(evaluation.getCity(), evaluation.getRegion(), evaluation.getDistrictName()), "district");
|
||||
model.setId(district.getId());
|
||||
//参考价
|
||||
BohaiEvaluationAudit bohaiEvaluationAudit = bohaiEvaluationAuditService.findByBohaiEvaluationAuditId(Long.valueOf(evaluationId));
|
||||
model.setBohaiEvaluationAudit(bohaiEvaluationAudit);
|
||||
|
||||
|
||||
|
||||
if(fjtUser!=null && fjtUser.getRole()==17 && district.getCity().equals("上海")){
|
||||
Map<String, Object> retMap = getLoanInfo(district, evaluation.getHouseArea());
|
||||
if(retMap!=null && retMap.size()>0){
|
||||
model.setLoanInfoMap(retMap);
|
||||
}
|
||||
}
|
||||
return model;
|
||||
}
|
||||
|
||||
//To C 报告结果页
|
||||
public Object resultAction(EvaluationModel model){
|
||||
@@ -580,8 +806,6 @@ public class WeiXinEvaluationController {
|
||||
evaluationAudit.setVersion(1);
|
||||
evaluationAuditService.save(evaluationAudit);
|
||||
}
|
||||
|
||||
|
||||
String smsContent = "【房价网】微信端调价地址:"+evaluationAudit.getCity()+" "+evaluationAudit.getInput()+",成交价:"+evaluationAudit.getDealPrice()+"万,请及时审核!用户邮箱: "+evaluationAudit.getUserName();
|
||||
try {
|
||||
for (String mobile : MOBILES) {
|
||||
@@ -596,6 +820,40 @@ public class WeiXinEvaluationController {
|
||||
return jsonMmodel;
|
||||
}
|
||||
|
||||
public Object saveHopePriceAction(EvaluationModel model){
|
||||
JsonModel jsonMmodel = new JsonModel();
|
||||
if(StringUtils.isNotBlank(model.getEvaluationId()) && model.getHopePrice()!=null){
|
||||
BohaiEvaluationAudit evaluationAudit = bohaiEvaluationAuditService.findByBohaiEvaluationAuditId(Long.valueOf(model.getEvaluationId()));
|
||||
if(evaluationAudit != null){
|
||||
evaluationAudit.setHopePrice(model.getHopePrice()*10000);
|
||||
evaluationAudit.setLastUpdated(new Date());
|
||||
evaluationAudit.setAuditStatus(2);
|
||||
|
||||
//期望价反馈接口
|
||||
UsersDetail usersDetail = usersDetailService.findById(evaluationAudit.getUserId());
|
||||
String feedbackId = BHBankUtils.inquireFeedback(usersDetail.getName(), evaluationAudit.getQueryId(), model.getHopePrice());
|
||||
if(StringUtils.isNotBlank(feedbackId)){
|
||||
evaluationAudit.setFeedbackId(feedbackId);
|
||||
}
|
||||
bohaiEvaluationAuditService.updateBohaiEvaluationAudit(evaluationAudit);
|
||||
}
|
||||
}
|
||||
return jsonMmodel;
|
||||
}
|
||||
|
||||
public Object saveBhRemarkAction(EvaluationModel model){
|
||||
JsonModel jsonMmodel = new JsonModel();
|
||||
if(StringUtils.isNotBlank(model.getEvaluationId()) && StringUtils.isNotBlank(model.getRemark())){
|
||||
BohaiEvaluationAudit evaluationAudit = bohaiEvaluationAuditService.findByBohaiEvaluationAuditId(Long.valueOf(model.getEvaluationId()));
|
||||
if(evaluationAudit != null){
|
||||
evaluationAudit.setRemark(model.getRemark());
|
||||
evaluationAudit.setLastUpdated(new Date());
|
||||
bohaiEvaluationAuditService.updateBohaiEvaluationAudit(evaluationAudit);
|
||||
}
|
||||
}
|
||||
return jsonMmodel;
|
||||
}
|
||||
|
||||
//刷新审核价
|
||||
public Object refreshAuditPriceAction(EvaluationModel model){
|
||||
JsonModel jsonMmodel = new JsonModel();
|
||||
@@ -611,6 +869,22 @@ public class WeiXinEvaluationController {
|
||||
jsonMmodel.setJsonModel(dataMap);
|
||||
return jsonMmodel;
|
||||
}
|
||||
|
||||
|
||||
public Object refreshBhAuditPriceAction(EvaluationModel model){
|
||||
JsonModel jsonMmodel = new JsonModel();
|
||||
Map<String, Integer> dataMap = new HashMap<String, Integer>();
|
||||
if(StringUtils.isNotBlank(model.getEvaluationId()) ){
|
||||
|
||||
BohaiEvaluationAudit bohaiEvaluationAudit = bohaiEvaluationAuditService.findByBohaiEvaluationAuditId(Long.valueOf(model.getEvaluationId()));
|
||||
if(bohaiEvaluationAudit != null){
|
||||
dataMap.put("lastPrice", bohaiEvaluationAudit.getLastPrice());
|
||||
dataMap.put("hopePrice", bohaiEvaluationAudit.getHopePrice());
|
||||
}
|
||||
}
|
||||
jsonMmodel.setJsonModel(dataMap);
|
||||
return jsonMmodel;
|
||||
}
|
||||
|
||||
|
||||
public Object collectsAction(EvaluationModel model, HttpServletRequest req, @Param(name = "page") String page){
|
||||
@@ -937,4 +1211,8 @@ public class WeiXinEvaluationController {
|
||||
public void setPriceBorderService(PriceBorderService priceBorderService) {
|
||||
this.priceBorderService = priceBorderService;
|
||||
}
|
||||
|
||||
public void setBohaiEvaluationAuditService(BohaiEvaluationAuditService bohaiEvaluationAuditService) {
|
||||
this.bohaiEvaluationAuditService = bohaiEvaluationAuditService;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,6 +47,11 @@ public class DistrictModel extends BaseModel {
|
||||
|
||||
// 判断是否需要查询均价,false则调用方自己去组装价格
|
||||
private Boolean showPrice = true;
|
||||
|
||||
// private String preCode;//渤海接口--楼盘编码
|
||||
// private String preName;//渤海接口--楼盘名称
|
||||
// private String countryCode;//渤海接口--区域编码
|
||||
// private String buildName;//渤海接口--地址
|
||||
|
||||
/**
|
||||
* 判断是不是友达
|
||||
@@ -205,4 +210,35 @@ public class DistrictModel extends BaseModel {
|
||||
this.isYouDa = isYouDa;
|
||||
}
|
||||
|
||||
// public String getPreCode() {
|
||||
// return preCode;
|
||||
// }
|
||||
//
|
||||
// public void setPreCode(String preCode) {
|
||||
// this.preCode = preCode;
|
||||
// }
|
||||
//
|
||||
// public String getPreName() {
|
||||
// return preName;
|
||||
// }
|
||||
//
|
||||
// public void setPreName(String preName) {
|
||||
// this.preName = preName;
|
||||
// }
|
||||
//
|
||||
// public String getCountryCode() {
|
||||
// return countryCode;
|
||||
// }
|
||||
//
|
||||
// public void setCountryCode(String countryCode) {
|
||||
// this.countryCode = countryCode;
|
||||
// }
|
||||
//
|
||||
// public String getBuildName() {
|
||||
// return buildName;
|
||||
// }
|
||||
//
|
||||
// public void setBuildName(String buildName) {
|
||||
// this.buildName = buildName;
|
||||
// }
|
||||
}
|
||||
|
||||
+64
@@ -5,6 +5,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.fangjia.dal.seaweed.model.District;
|
||||
import com.fangjia.dal.sql.model.BohaiEvaluationAudit;
|
||||
import com.fangjia.dal.sql.model.EvaluationAudit;
|
||||
import com.fangjia.dal.sql.model.FjtEvaluation;
|
||||
import com.fangjia.open.model.BaseModel;
|
||||
@@ -32,6 +33,7 @@ public class EvaluationModel extends BaseModel{
|
||||
private long sellHouseCount;
|
||||
private long rentHouseCount;
|
||||
private EvaluationAudit evaluationAudit;
|
||||
private BohaiEvaluationAudit bohaiEvaluationAudit;
|
||||
private String lender;
|
||||
private Double dealPrice;
|
||||
private List<FjtEvaluation> evaluations;
|
||||
@@ -40,6 +42,12 @@ public class EvaluationModel extends BaseModel{
|
||||
private Integer role;
|
||||
private String cardId;
|
||||
private Map<String, Object> loanInfoMap;
|
||||
private Integer hopePrice;
|
||||
private String remark;
|
||||
// private String preCode;//眾漆諉諳--瞼攫晤鎢
|
||||
// private String preName;//眾漆諉諳--瞼攫靡備
|
||||
// private String countryCode;//眾漆諉諳--Е郖晤鎢
|
||||
// private String buildName;//眾漆諉諳--華硊
|
||||
|
||||
|
||||
public void setId(String id) {
|
||||
@@ -196,4 +204,60 @@ public class EvaluationModel extends BaseModel{
|
||||
public void setLoanInfoMap(Map<String, Object> loanInfoMap) {
|
||||
this.loanInfoMap = loanInfoMap;
|
||||
}
|
||||
|
||||
public BohaiEvaluationAudit getBohaiEvaluationAudit() {
|
||||
return bohaiEvaluationAudit;
|
||||
}
|
||||
|
||||
public void setBohaiEvaluationAudit(BohaiEvaluationAudit bohaiEvaluationAudit) {
|
||||
this.bohaiEvaluationAudit = bohaiEvaluationAudit;
|
||||
}
|
||||
|
||||
public Integer getHopePrice() {
|
||||
return hopePrice;
|
||||
}
|
||||
|
||||
public void setHopePrice(Integer hopePrice) {
|
||||
this.hopePrice = hopePrice;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
// public String getPreCode() {
|
||||
// return preCode;
|
||||
// }
|
||||
//
|
||||
// public void setPreCode(String preCode) {
|
||||
// this.preCode = preCode;
|
||||
// }
|
||||
//
|
||||
// public String getPreName() {
|
||||
// return preName;
|
||||
// }
|
||||
//
|
||||
// public void setPreName(String preName) {
|
||||
// this.preName = preName;
|
||||
// }
|
||||
//
|
||||
// public String getCountryCode() {
|
||||
// return countryCode;
|
||||
// }
|
||||
//
|
||||
// public void setCountryCode(String countryCode) {
|
||||
// this.countryCode = countryCode;
|
||||
// }
|
||||
//
|
||||
// public String getBuildName() {
|
||||
// return buildName;
|
||||
// }
|
||||
//
|
||||
// public void setBuildName(String buildName) {
|
||||
// this.buildName = buildName;
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,282 @@
|
||||
package com.fangjia.open.util;
|
||||
|
||||
import com.fangjia.core.util.HttpRequest;
|
||||
import com.fangjia.core.util.MD5Util;
|
||||
import com.fangjia.dal.sql.model.FjtEvaluation;
|
||||
import com.fangjia.dal.sql.model.UsersDetail;
|
||||
import com.fangjia.open.model.weixin.EvaluationModel;
|
||||
import net.sf.json.JSONArray;
|
||||
import net.sf.json.JSONObject;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.*;
|
||||
|
||||
public class BHBankUtils {
|
||||
|
||||
// public static String token = "bohaifangjiatest";//测试token
|
||||
public static String token = "bohaifangjia";//正式token
|
||||
public static String nonce = "818975";
|
||||
// public static String uri = "http://topen.shbrea.com.cn/API";//测试
|
||||
public static String uri ="https://open.shbrea.com.cn/API";
|
||||
|
||||
public static Map<String, String > regionCodeMap = new HashMap<String, String>(){{
|
||||
put("310101000000","黄浦");
|
||||
put("310104000000","徐汇");
|
||||
put("310105000000","长宁");
|
||||
put("310106000000","静安");
|
||||
put("310107000000","普陀");
|
||||
put("310109000000","虹口");
|
||||
put("310110000000","杨浦");
|
||||
put("310112000000","闵行");
|
||||
put("310113000000","宝山");
|
||||
put("310114000000","嘉定");
|
||||
put("310115000000","浦东");
|
||||
put("310116000000","金山");
|
||||
put("310117000000","松江");
|
||||
put("310118000000","青浦");
|
||||
put("310120000000","奉贤");
|
||||
put("310230000000","崇明");
|
||||
}};
|
||||
|
||||
public static List<JSONObject> getDistrictByBhbank(String address){
|
||||
|
||||
List<JSONObject> list = new ArrayList<JSONObject>();
|
||||
Map params = new HashMap();
|
||||
params.put("keyword",address);
|
||||
|
||||
Integer date1 = (int)(new Date().getTime()/1000);
|
||||
String str = token + date1.toString()+nonce;
|
||||
String md5str2 = MD5Util.encrypt(str,"utf-8");
|
||||
|
||||
Map headers = new HashMap();
|
||||
headers.put("timestamp", date1.toString());
|
||||
headers.put("sign", md5str2);
|
||||
headers.put("nonce", nonce.toString());
|
||||
HttpRequest request = new HttpRequest();
|
||||
String content = null;
|
||||
try {
|
||||
content = request.get(uri +"/searchAddr/bh/", params, headers, "utf-8");
|
||||
if(StringUtils.isNotBlank(content)){
|
||||
JSONObject jsonObj = JSONObject.fromObject(content);
|
||||
JSONArray data = (JSONArray) jsonObj.get("data");
|
||||
if(data.size()>0){
|
||||
for(int i=0;i<data.size();i++){
|
||||
JSONObject obj = (JSONObject) data.get(i);
|
||||
list.add(obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public static JSONObject getInquirePrice(EvaluationModel model, Map<String, String> bhMatchMap, UsersDetail usersDetail, int fjwTotalPrice){
|
||||
List<JSONObject> list = new ArrayList<JSONObject>();
|
||||
Map params = new HashMap();
|
||||
FjtEvaluation ev = model.getFjtEvaluation();
|
||||
String queryFullAddr = ev.getAddress();
|
||||
if(StringUtils.isNotBlank(ev.getHouseNum())){
|
||||
queryFullAddr = queryFullAddr + ev.getHouseNum()+"号";
|
||||
}
|
||||
if(StringUtils.isNotBlank(ev.getRoomNum())){
|
||||
queryFullAddr = queryFullAddr + ev.getRoomNum()+"室";
|
||||
}
|
||||
params.put("queryFullAddr",queryFullAddr);//加了楼栋号和室号403
|
||||
if(bhMatchMap.containsKey("preCode")){
|
||||
params.put("preCode", bhMatchMap.get("preCode"));
|
||||
}
|
||||
if(bhMatchMap.containsKey("preName")){
|
||||
params.put("preName", bhMatchMap.get("preName"));
|
||||
}
|
||||
if(bhMatchMap.containsKey("countryCode")){
|
||||
params.put("countryCode", bhMatchMap.get("countryCode"));
|
||||
}
|
||||
|
||||
if(StringUtils.isNotBlank(ev.getAddress())){
|
||||
params.put("buildName", ev.getAddress());
|
||||
}
|
||||
if(StringUtils.isNotBlank(ev.getUnitNum())){
|
||||
params.put("unitCode", ev.getUnitNum());
|
||||
}
|
||||
if(ev.getHouseFloor()>0){
|
||||
params.put("floor", String.valueOf(ev.getHouseFloor()));
|
||||
}
|
||||
if(ev.getHouseHight()>0){
|
||||
params.put("totalFloor", String.valueOf(ev.getHouseHight()));
|
||||
}
|
||||
if(StringUtils.isNotBlank(ev.getRoomNum())){
|
||||
params.put("houseNo",ev.getRoomNum());
|
||||
}
|
||||
if(ev.getHouseArea()>0){
|
||||
params.put("groundArea", String.valueOf(ev.getHouseArea()));
|
||||
}
|
||||
params.put("orientName", "南");
|
||||
params.put("buildYear", ev.getFinishDateStr());
|
||||
fjwTotalPrice= (int)(fjwTotalPrice/10000) * 10000;
|
||||
params.put("dealPriceTotal", String.valueOf(fjwTotalPrice));
|
||||
|
||||
params.put("userName", usersDetail.getName());
|
||||
params.put("userPhone", usersDetail.getPhone());
|
||||
// params.put("userMail", "");
|
||||
params.put("groupName", usersDetail.getOrgName());
|
||||
|
||||
|
||||
List<String> lists = Arrays.asList("queryFullAddr", "preCode", "preName", "countryCode", "buildName", "unitCode","floor","totalFloor","houseNo","groundArea","undergroundArea","orientName","buildYear","dealPriceTotal","specialNo","userName","userPhone","userMail","groupName");
|
||||
|
||||
String s = "";
|
||||
for(String key : lists){
|
||||
String value = (String)params.get(key);
|
||||
if(StringUtils.isNotBlank(value)){
|
||||
s = s + value;
|
||||
}
|
||||
}
|
||||
String s1 = null;
|
||||
try {
|
||||
s1 = URLEncoder.encode(s,"utf-8");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
Integer date1 = (int)(new Date().getTime()/1000);
|
||||
String str = token + date1.toString()+nonce+ s1;
|
||||
String md5str2 = MD5Util.encrypt(str,"utf-8");
|
||||
|
||||
Map headers = new HashMap();
|
||||
headers.put("timestamp", date1.toString());
|
||||
headers.put("sign", md5str2);
|
||||
headers.put("nonce", nonce.toString());
|
||||
HttpRequest request = new HttpRequest();
|
||||
String content = null;
|
||||
try {
|
||||
content = request.post(uri +"/inquirePrice/bh/", params, headers, "utf-8");
|
||||
if(StringUtils.isNotBlank(content)){
|
||||
JSONObject jsonObj = JSONObject.fromObject(content);
|
||||
return jsonObj;
|
||||
}
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static JSONObject getInquireRecord(String queryId){
|
||||
List<JSONObject> list = new ArrayList<JSONObject>();
|
||||
Map params = new HashMap();
|
||||
params.put("queryId",queryId);
|
||||
|
||||
Integer date1 = (int)(new Date().getTime()/1000);
|
||||
String str = token + date1.toString()+nonce;
|
||||
String md5str2 = MD5Util.encrypt(str,"utf-8");
|
||||
|
||||
Map headers = new HashMap();
|
||||
headers.put("timestamp", date1.toString());
|
||||
headers.put("sign", md5str2);
|
||||
headers.put("nonce", nonce.toString());
|
||||
HttpRequest request = new HttpRequest();
|
||||
String content = null;
|
||||
try {
|
||||
content = request.get(uri + "/inquireRecord/bh/", params, headers, "utf-8");
|
||||
if(StringUtils.isNotBlank(content)){
|
||||
JSONObject jsonObj = JSONObject.fromObject(content);
|
||||
JSONObject data = (JSONObject) jsonObj.get("data");
|
||||
if(data.size()>0){
|
||||
return data;
|
||||
}
|
||||
}
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String inquireFeedback(String name, String queryId, Integer hopePrice){
|
||||
String feedbackId = null;
|
||||
List<JSONObject> list = new ArrayList<JSONObject>();
|
||||
Map params = new HashMap();
|
||||
params.put("queryId",queryId);
|
||||
params.put("userName",name);
|
||||
params.put("feedbackMsg","期望价:"+hopePrice+"万");
|
||||
|
||||
List<String> lists = Arrays.asList("queryId", "userName", "feedbackMsg");
|
||||
|
||||
String s = "";
|
||||
for(String key : lists){
|
||||
String value = (String)params.get(key);
|
||||
if(StringUtils.isNotBlank(value)){
|
||||
s = s + value;
|
||||
}
|
||||
}
|
||||
String s1 = null;
|
||||
try {
|
||||
s1 = URLEncoder.encode(s,"utf-8");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
Integer date1 = (int)(new Date().getTime()/1000);
|
||||
String str = token + date1.toString()+nonce+ s1;
|
||||
String md5str2 = MD5Util.encrypt(str,"utf-8");
|
||||
|
||||
Map headers = new HashMap();
|
||||
headers.put("timestamp", date1.toString());
|
||||
headers.put("sign", md5str2);
|
||||
headers.put("nonce", nonce.toString());
|
||||
HttpRequest request = new HttpRequest();
|
||||
String content = null;
|
||||
try {
|
||||
content = request.post(uri+"/inquireFeedback/bh/", params, headers, "utf-8");
|
||||
if(StringUtils.isNotBlank(content)){
|
||||
JSONObject jsonObj = JSONObject.fromObject(content);
|
||||
Integer code = (Integer) jsonObj.get("errCode");
|
||||
if (code == 0) {
|
||||
JSONObject data = (JSONObject) jsonObj.get("data");
|
||||
if(data.size()>0){
|
||||
feedbackId = (String) data.get("feedbackId");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
return feedbackId;
|
||||
}
|
||||
|
||||
|
||||
public static JSONObject inquireFeedbackCall(String feedbackId){
|
||||
|
||||
List<JSONObject> list = new ArrayList<JSONObject>();
|
||||
Map params = new HashMap();
|
||||
params.put("feedbackId",feedbackId);
|
||||
|
||||
Integer date1 = (int)(new Date().getTime()/1000);
|
||||
String str = token + date1.toString()+nonce;
|
||||
String md5str2 = MD5Util.encrypt(str,"utf-8");
|
||||
|
||||
Map headers = new HashMap();
|
||||
headers.put("timestamp", date1.toString());
|
||||
headers.put("sign", md5str2);
|
||||
headers.put("nonce", nonce.toString());
|
||||
HttpRequest request = new HttpRequest();
|
||||
String content = null;
|
||||
try {
|
||||
content = request.get(uri+"/inquireFeedbackCall/bh/", params, headers, "utf-8");
|
||||
if(StringUtils.isNotBlank(content)){
|
||||
JSONObject jsonObj = JSONObject.fromObject(content);
|
||||
Integer code = (Integer) jsonObj.get("errCode");
|
||||
if(code == 0){
|
||||
JSONObject data = (JSONObject) jsonObj.get("data");
|
||||
return data;
|
||||
}
|
||||
|
||||
}
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,7 @@
|
||||
<class>com.fangjia.dal.sql.model.UsersDetail</class>
|
||||
<class>com.fangjia.dal.sql.model.EvaluationAudit</class>
|
||||
<class>com.fangjia.dal.sql.model.GoldLogs</class>
|
||||
<class>com.fangjia.dal.sql.model.BohaiEvaluationAudit</class>
|
||||
<exclude-unlisted-classes>true</exclude-unlisted-classes>
|
||||
</persistence-unit>
|
||||
</persistence>
|
||||
@@ -50,7 +50,12 @@
|
||||
</div>
|
||||
<#if type?? && type == 'b'>
|
||||
<nav class="bar bar-tab">
|
||||
<a class="tab-item external" href="../weiXinEvaluation/recordList">估价记录</a>
|
||||
<#if role?? && role == 17>
|
||||
<a class="tab-item external" href="../weiXinEvaluation/bhhistory">估价记录</a>
|
||||
<#else>
|
||||
<a class="tab-item external" href="../weiXinEvaluation/recordList">估价记录</a>
|
||||
</#if>
|
||||
|
||||
<a class="tab-item external" href="../report/downloadList">下载记录</a>
|
||||
<#if role?? && role == 17>
|
||||
<a class="tab-item external" href="../user/setup">我的</a>
|
||||
|
||||
@@ -32,9 +32,14 @@
|
||||
</div>
|
||||
<#include '/layout/footer.ftl'/>
|
||||
<script type="text/javascript">
|
||||
function showDetail(id, obj) {
|
||||
function showDetail(id, role, obj) {
|
||||
$(obj).css("background", "#d9d9d9")
|
||||
window.location.href = "../weiXinEvaluation/report?evaluationId="+id;
|
||||
if(role == 17){
|
||||
window.location.href = "../weiXinEvaluation/bhreport?evaluationId="+id;
|
||||
}else{
|
||||
window.location.href = "../weiXinEvaluation/report?evaluationId="+id;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$.init()
|
||||
@@ -59,6 +64,9 @@
|
||||
// 生成新条目的HTML
|
||||
var html = '';
|
||||
$.each(data['result'], function(i){
|
||||
|
||||
var role = data['role'];
|
||||
|
||||
var address = this.dz;
|
||||
if(this.hn){
|
||||
address = address + this.hn + "栋";
|
||||
@@ -67,7 +75,7 @@
|
||||
address = address + this.rn + "室";
|
||||
}
|
||||
if(data.role==12) {
|
||||
html += "<div class='topic topic01' onclick='showDetail("+this.eid+", this)'><div class='topicContent topicContent01'><div class='left'><p><label>下载日期:</label><span>" + this.xzrq +
|
||||
html += "<div class='topic topic01' onclick='showDetail("+this.eid+","+role+", this)'><div class='topicContent topicContent01'><div class='left'><p><label>下载日期:</label><span>" + this.xzrq +
|
||||
"</span></p><p><label>地址:</label><span>" + address + "</span></p><p><label>主贷人:</label><span>" + this.zdr + "</span></p><p><label>面积:</label><span>" + this.mj;
|
||||
if (this.mj == "-") {
|
||||
html += "</span></p></div><div class='right'><p><label>总价:</label><span>" + this.zj;
|
||||
@@ -95,7 +103,7 @@
|
||||
html += ("<em>" + this.zsj + "</em> 万元</span></p><p><label>报告收费:</label><span>" + (this.bgsf!=null?this.bgsf+" 元":'-') + "</span></p></div></div></div>");
|
||||
}
|
||||
}else if(data.role==17) {
|
||||
html += "<div class='topic topic01' onclick='showDetail("+this.eid+", this)'><div class='topicContent topicContent01'><div class='left'><p><label>下载日期:</label><span>" + this.xzrq +
|
||||
html += "<div class='topic topic01' onclick='showDetail("+this.eid+","+role+", this)'><div class='topicContent topicContent01'><div class='left'><p><label>下载日期:</label><span>" + this.xzrq +
|
||||
"</span></p><p><label>地址:</label><span>" + address + "</span></p><p><label>主贷人:</label><span>" + this.zdr + "</span></p><p><label>面积:</label><span>" + this.mj;
|
||||
if (this.mj == "-") {
|
||||
html += "</span></p></div><div class='right'><p><label>总价:</label><span>" + this.zj;
|
||||
@@ -107,11 +115,11 @@
|
||||
}
|
||||
}
|
||||
if (this.zj == "-") {
|
||||
html += "</span></p><p><label>参考价:</label><span>" + this.ckj;
|
||||
html += "</span></p><p><label>期望价:</label><span>" + this.qwj;
|
||||
} else {
|
||||
html += " 万元</span></p><p><label>参考价:</label><span>" + this.ckj;
|
||||
html += " 万元</span></p><p><label>期望价:</label><span>" + this.qwj;
|
||||
}
|
||||
if (this.ckj == "-") {
|
||||
if (this.qwj == "-") {
|
||||
html += "</span></p><p><label>终审价:</label><span>";
|
||||
} else {
|
||||
html += " 万元</span></p><p><label>终审价:</label><span>";
|
||||
|
||||
@@ -26,6 +26,7 @@ $('#scBtn').on('click', function () {
|
||||
|
||||
/* 提交主贷人 */
|
||||
$('#submitLender').on('click', function () {
|
||||
|
||||
var lender = $("input[name=lender]").val();
|
||||
|
||||
var opt = $("#submitLender").text();
|
||||
@@ -49,7 +50,12 @@ $('#submitLender').on('click', function () {
|
||||
// $("#submitLender").remove();
|
||||
// $("input[name=lender]").remove();
|
||||
// $("#inputTopic02a div").append("<span>"+lender+"</span>");
|
||||
window.location.href ="report?evaluationId="+eId;
|
||||
if(role==17){
|
||||
window.location.href ="bhreport?evaluationId="+eId;
|
||||
}else{
|
||||
window.location.href ="report?evaluationId="+eId;
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -124,6 +130,66 @@ $('#submitPrice').on('click', function () {
|
||||
}
|
||||
});
|
||||
|
||||
$('#submitbhPrice').on('click', function () {
|
||||
|
||||
var dealPrice = $("input[name=dealPrice]").val();
|
||||
if(dealPrice == ""){
|
||||
$.toast("请输入期望价");
|
||||
}else{
|
||||
|
||||
if(!/^\d+(\.\d)?(\d)*$/.test(dealPrice)){
|
||||
$.toast("参考价必须是数字")
|
||||
}else{
|
||||
$.ajax({
|
||||
url:"saveHopePrice",
|
||||
data:{
|
||||
evaluationId:eId,
|
||||
hopePrice:dealPrice
|
||||
},
|
||||
dataType:"json",
|
||||
success:function(data){
|
||||
$("#submitbhPrice").remove();
|
||||
$("input[name=dealPrice]").remove();
|
||||
$("#inputTopic01a div span").text("期望价:"+dealPrice);
|
||||
$("#refreshPrice0").show();
|
||||
location.href ="bhreport?evaluationId="+eId;
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$('#submitRemark').on('click', function () {
|
||||
var opt = $("#submitRemark").text();
|
||||
if(opt == "修改"){
|
||||
$(this).parent().find("span").eq(1).hide()
|
||||
$("input[name=remark]").removeClass("dn");
|
||||
$("#submitRemark").text("保存");
|
||||
}else{
|
||||
var remark = $("input[name=remark]").val();
|
||||
if(remark == ""){
|
||||
$.toast("请输入备注");
|
||||
}else{
|
||||
$.ajax({
|
||||
url:"saveBhRemark",
|
||||
data:{
|
||||
evaluationId:eId,
|
||||
remark:remark
|
||||
},
|
||||
dataType:"json",
|
||||
success:function(data){
|
||||
$("#submitRemark").remove();
|
||||
$("input[name=remark]").remove();
|
||||
$("#inputTopic01a div span").text("备注:"+remark);
|
||||
$("#refreshPrice0").show();
|
||||
location.href ="bhreport?evaluationId="+eId;
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$('#refreshPrice,#refreshPrice0').on('click', function () {
|
||||
$.ajax({
|
||||
url:"refreshAuditPrice",
|
||||
@@ -150,6 +216,32 @@ $('#refreshPrice,#refreshPrice0').on('click', function () {
|
||||
});
|
||||
|
||||
|
||||
$('#refreshbhPrice').on('click', function () {
|
||||
$.ajax({
|
||||
url:"refreshBhAuditPrice",
|
||||
data:{
|
||||
evaluationId:eId
|
||||
},
|
||||
dataType:"json",
|
||||
success:function(data){
|
||||
var auditPrice = data.lastPrice;
|
||||
if(auditPrice == undefined){
|
||||
$.toast("正在审核中");
|
||||
}else{
|
||||
$("#inputTopic01c .price_final").text(auditPrice);
|
||||
|
||||
$('#inputTopic01b').hide();
|
||||
$('#inputTopic01a').hide();
|
||||
$('#inputTopic01c').show();
|
||||
$(".topicTop strong").removeClass("price_final");
|
||||
$("#auditAfterDiv").text("审核价:"+data.dealPrice+" 万元");
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
});
|
||||
|
||||
|
||||
/* 全部信息 */
|
||||
$('.more_btn').on('click', function () {
|
||||
$('.more_btn').hide();
|
||||
|
||||
@@ -2,6 +2,72 @@
|
||||
|
||||
/* 选择操作 */
|
||||
|
||||
// 选择操作-地址
|
||||
$(document).on('click', '.create-actions00', function () {
|
||||
var buttons1 = [
|
||||
{
|
||||
text: '请选择地址',
|
||||
label: true
|
||||
}
|
||||
];
|
||||
|
||||
for (var i = 0; i < alias.length; i++) {
|
||||
buttons1.push({
|
||||
text: alias[i] + '',
|
||||
onClick: function () {
|
||||
console.log(this.text)
|
||||
$("#address").val(this.text)
|
||||
$(".create-actions00").empty().text(this.text).addClass("selected")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
var buttons2 = [
|
||||
{
|
||||
text: '取消',
|
||||
bg: 'gray'
|
||||
}
|
||||
];
|
||||
var groups = [buttons1, buttons2];
|
||||
$.actions(groups);
|
||||
});
|
||||
|
||||
// 选择操作-房型-室
|
||||
$(document).on('click', '.create-actions01', function () {
|
||||
var buttons1 = [
|
||||
{
|
||||
text: '请选择室',
|
||||
label: true
|
||||
}
|
||||
];
|
||||
for (var i = 1; i < 6; i++) {
|
||||
buttons1.push({
|
||||
text: i + '',
|
||||
onClick: function () {
|
||||
$("#room").val(this.text)
|
||||
$(".create-actions01").empty().text(this.text).addClass("selected")
|
||||
}
|
||||
})
|
||||
}
|
||||
buttons1.push({
|
||||
text: '>5',
|
||||
onClick: function () {
|
||||
$("#room").val("")
|
||||
$(".create-actions01").empty().text(">5")
|
||||
}
|
||||
})
|
||||
|
||||
var buttons2 = [
|
||||
{
|
||||
text: '取消',
|
||||
bg: 'gray'
|
||||
}
|
||||
];
|
||||
var groups = [buttons1, buttons2];
|
||||
$.actions(groups);
|
||||
});
|
||||
|
||||
|
||||
// 选择操作-房型-室
|
||||
$(document).on('click', '.create-actions01', function () {
|
||||
var buttons1 = [
|
||||
@@ -86,6 +152,7 @@ $(document).on('click', '.create-actions03', function () {
|
||||
$("#buildType").val("8")
|
||||
$("#houseFloor").show()
|
||||
$("#floorDesc").hide()
|
||||
$("#basementAreaLi").hide()
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -94,7 +161,8 @@ $(document).on('click', '.create-actions03', function () {
|
||||
$("a.create-actions03").empty().text(this.text).addClass("selected")
|
||||
$("#buildType").val("4")
|
||||
$("#floorDesc").show()
|
||||
$("#houseFloor").hide()
|
||||
// $("#houseFloor").hide()
|
||||
$("#basementAreaLi").show()
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -103,7 +171,8 @@ $(document).on('click', '.create-actions03', function () {
|
||||
$("a.create-actions03").empty().text(this.text).addClass("selected")
|
||||
$("#buildType").val("5")
|
||||
$("#floorDesc").show()
|
||||
$("#houseFloor").hide()
|
||||
// $("#houseFloor").hide()
|
||||
$("#basementAreaLi").show()
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -112,7 +181,8 @@ $(document).on('click', '.create-actions03', function () {
|
||||
$("a.create-actions03").empty().text(this.text).addClass("selected")
|
||||
$("#buildType").val("6")
|
||||
$("#floorDesc").show()
|
||||
$("#houseFloor").hide()
|
||||
// $("#houseFloor").hide()
|
||||
$("#basementAreaLi").show()
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -121,7 +191,38 @@ $(document).on('click', '.create-actions03', function () {
|
||||
$("a.create-actions03").empty().text(this.text).addClass("selected")
|
||||
$("#buildType").val("7")
|
||||
$("#floorDesc").show()
|
||||
$("#houseFloor").hide()
|
||||
// $("#houseFloor").hide()
|
||||
$("#basementAreaLi").show()
|
||||
}
|
||||
},
|
||||
{
|
||||
text: '联列住宅',
|
||||
onClick: function () {
|
||||
$("a.create-actions03").empty().text(this.text).addClass("selected")
|
||||
$("#buildType").val("9")
|
||||
$("#floorDesc").show()
|
||||
// $("#houseFloor").hide()
|
||||
$("#basementAreaLi").show()
|
||||
}
|
||||
},
|
||||
{
|
||||
text: '花园住宅',
|
||||
onClick: function () {
|
||||
$("a.create-actions03").empty().text(this.text).addClass("selected")
|
||||
$("#buildType").val("10")
|
||||
$("#floorDesc").show()
|
||||
// $("#houseFloor").hide()
|
||||
$("#basementAreaLi").show()
|
||||
}
|
||||
},
|
||||
{
|
||||
text: '旧式里弄2',
|
||||
onClick: function () {
|
||||
$("a.create-actions03").empty().text(this.text).addClass("selected")
|
||||
$("#buildType").val("11")
|
||||
$("#floorDesc").show()
|
||||
// $("#houseFloor").hide()
|
||||
$("#basementAreaLi").hide()
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -130,7 +231,8 @@ $(document).on('click', '.create-actions03', function () {
|
||||
$("a.create-actions03").empty().text(this.text).addClass("selected")
|
||||
$("#buildType").val("0")
|
||||
$("#houseFloor").show()
|
||||
$("#floorDesc").hide()
|
||||
// $("#floorDesc").hide()
|
||||
$("#basementAreaLi").hide()
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
@@ -132,7 +132,7 @@ input::-webkit-input-placeholder{
|
||||
.inputTopic01 .topicTitle .input_price{width:20%;padding-left:5px;}
|
||||
.inputTopic02 .topicTitle .input_lender{width:40%;padding-left:5px;}
|
||||
.inputTopic02 .topicTitle .input_cardId{width:35%;padding-left:5px;}
|
||||
.submit_btn{width:100px;border-left:solid 1px #e7e7e7;float:right;padding-right:0;text-align:center;cursor:pointer;}
|
||||
.submit_btn{width:90px;border-left:solid 1px #e7e7e7;float:right;padding-right:0;text-align:center;cursor:pointer;}
|
||||
.left01{float:left;margin-right:8%;}
|
||||
.right01{float:left;}
|
||||
|
||||
|
||||
@@ -0,0 +1,265 @@
|
||||
<#ftl attributes={"content_type":"text/html; charset=UTF-8"}>
|
||||
<#compress>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>房产评估</title>
|
||||
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
|
||||
<link rel="shortcut icon" href="/favicon.ico">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<link rel="stylesheet" href="https://g.alicdn.com/msui/sm/0.6.2/css/sm.css">
|
||||
<link rel="stylesheet" href="../static/style/wx.css">
|
||||
<style>
|
||||
.list-block .item-content .item-inner{margin-left:0;padding-left:0.75rem;}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="page-group">
|
||||
<div class="page page-current">
|
||||
<form action="evaluate" id="evaluateForm">
|
||||
<div class="content" style="padding-bottom:60px;">
|
||||
<div class="list-block">
|
||||
<input name="district.id" id="districtId" value="${district.id}" type="hidden">
|
||||
<input name="city" id="city" value="${district.city}" type="hidden">
|
||||
<input name="region" id="region" value="${district.region}" type="hidden">
|
||||
<input name="name" id="name" value="${district.name}" type="hidden">
|
||||
|
||||
<#-- <input name="name" id="preCode" value="${preCode}" type="hidden">-->
|
||||
<#-- <input name="name" id="preName" value="${preName}" type="hidden">-->
|
||||
<#-- <input name="name" id="countryCode" value="${countryCode}" type="hidden">-->
|
||||
<#-- <input name="name" id="buildName" value="${buildName}" type="hidden">-->
|
||||
|
||||
<input name="userType" value="business" type="hidden">
|
||||
<ul>
|
||||
<li>
|
||||
<div class="item-content">
|
||||
<div class="item-inner">
|
||||
<div class="item-title label">小区:<font>${district.name}</font></div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<div class="item-content">
|
||||
|
||||
<div class="item-inner">
|
||||
<div class="content-block">
|
||||
<div class="item-title label di">地址:</div>
|
||||
<input name="fjtEvaluation.address" type="hidden" id="address" placeholder="请选择地址" required>
|
||||
<p class="di"><a href="#" class="create-actions00">请选择地址</a></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-media"><span>(必填项)</span></div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<div class="item-content">
|
||||
<div class="item-inner">
|
||||
<div class="item-title label">幢号:</div>
|
||||
<div class="item-input">
|
||||
<input type="text" placeholder="请输入幢号" name="fjtEvaluation.houseNum" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-media"><span>(必填项)</span></div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<div class="item-content">
|
||||
<div class="item-inner">
|
||||
<div class="item-title label">室号或部位:</div>
|
||||
<div class="item-input">
|
||||
<input type="number" min="0" placeholder="请输入室号或部位" name="fjtEvaluation.roomNum" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-media"><span>(必填项)</span></div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<div class="item-content">
|
||||
|
||||
<div class="item-inner">
|
||||
<div class="content-block">
|
||||
<div class="item-title label di">房屋类型:</div>
|
||||
<input name="fjtEvaluation.buildType" type="hidden" id="buildType" placeholder="请选择房屋类型" required>
|
||||
<p class="di"><a href="#" class="create-actions03">请选择建筑类型</a></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-media"><span>(必填项)</span></div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<div class="item-content">
|
||||
<div class="item-inner">
|
||||
<div class="item-title label">所在楼层:</div>
|
||||
<div class="item-input">
|
||||
<input type="number" name="fjtEvaluation.houseFloor" id="houseFloor"
|
||||
placeholder="请输入所在楼层" min="1" max="200" required>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-media"><span>(必填项)</span></div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="item-content">
|
||||
<div class="item-inner">
|
||||
<div class="item-title label">总楼层:</div>
|
||||
<div class="item-input">
|
||||
<input type="number" name="fjtEvaluation.houseHight" id="houseHight"
|
||||
placeholder="请输入总楼层" min="1" max="200" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-media"><span>(必填项)</span></div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="item-content">
|
||||
<div class="item-inner">
|
||||
<div class="item-title label">产证建筑面积:</div>
|
||||
<div class="item-input">
|
||||
<input type="number" placeholder="请输入建筑面积" id="houseArea" min="0" max="1000"
|
||||
name="fjtEvaluation.houseArea" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-media"><span>(必填项)</span></div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li id="basementAreaLi" class="dn">
|
||||
<div class="item-content">
|
||||
<div class="item-inner">
|
||||
<div class="item-title label">地下建筑面积:</div>
|
||||
<div class="item-input">
|
||||
<input type="number" placeholder="请输入地下面积" id="basementArea" min="0" max="1000"
|
||||
name="fjtEvaluation.basementArea">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="item-content">
|
||||
<div class="item-inner">
|
||||
<div class="item-title label">竣工日期:</div>
|
||||
<div class="item-input">
|
||||
<input type="text" placeholder="请输入竣工日期" id="finishDateStr"
|
||||
name="fjtEvaluation.finishDateStr" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-media"><span>(必填项)</span></div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<div class="item-content">
|
||||
<div class="item-inner">
|
||||
<div class="item-title label">房屋用途:</div>
|
||||
<div class="item-input">
|
||||
<input type="text" placeholder="请输入房屋用途" id="useType"
|
||||
name="fjtEvaluation.useType" value="居住">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div class="content-block">
|
||||
<p><a id="evaluateBtn" class="button button-big button-fill">评估</a></p>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<#include '/layout/footer.ftl'/>
|
||||
|
||||
<script>
|
||||
var alias = []
|
||||
<#if district.addrAlias?? && district.addrAlias?size gte 1>
|
||||
<#list district.addrAlias as name>
|
||||
alias.push("${name?replace("\n","")}")
|
||||
</#list>
|
||||
</#if>
|
||||
|
||||
</script>
|
||||
<script type='text/javascript' src='../static/js/select.js' charset='utf-8'></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
$("#floorDesc").hide()
|
||||
|
||||
$("#evaluateBtn").on('click', function () {
|
||||
var inputs = $("input")
|
||||
for (var i = 0; i < inputs.length; i++) {
|
||||
var input = $(inputs[i])
|
||||
var fieldName = input.attr("placeholder").substring(3)
|
||||
var fieldVal = $.trim(input.val())
|
||||
if (input.attr("required") && fieldVal == "") {
|
||||
$.toast(fieldName + "不能为空");
|
||||
return
|
||||
}
|
||||
if (input.attr("type") == 'number' && fieldVal != "") {
|
||||
if (input.attr("name").indexOf("Area") != -1) {
|
||||
if (!/^[0-9]+(.[0-9]+)?$/.test(fieldVal)) {
|
||||
$.toast(fieldName + "非法");
|
||||
return
|
||||
}
|
||||
|
||||
} else {
|
||||
if (!/^[0-9]+$/.test(fieldVal)) {
|
||||
$.toast(fieldName + "必须是正整数");
|
||||
return
|
||||
}
|
||||
}
|
||||
var min = input.attr("min")
|
||||
var max = input.attr("max")
|
||||
if (max && min && (parseFloat(min) > parseFloat(fieldVal) || parseFloat(max) < parseFloat(fieldVal))) {
|
||||
$.toast(fieldName + "的取值范围是:" + min + "到" + max);
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
if (parseFloat($("#houseHight").val()) < parseFloat($("#houseFloor").val())) {
|
||||
$.toast("楼层不能大于楼高");
|
||||
return
|
||||
}
|
||||
if($("#houseHight").val() && parseFloat($("#houseHight").val())>=60){
|
||||
$.toast("请输入合理的楼层数");
|
||||
return
|
||||
}
|
||||
$("#evaluateBtn").prop("disabled", true)
|
||||
$.ajax({
|
||||
url: 'businessUserEvaluate',
|
||||
data: $("#evaluateForm").serialize(),
|
||||
dataType: "json",
|
||||
method: "POST",
|
||||
success: function (data) {
|
||||
if (data.id == undefined) {
|
||||
$.toast("估价失败,请重新评估");
|
||||
$("#evaluateBtn").prop("disabled", false)
|
||||
} else {
|
||||
if(data.role == "17"){
|
||||
location.href = "bhreport?evaluationId=" + data.id
|
||||
}else{
|
||||
location.href = "report?evaluationId=" + data.id
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
$.toast("服务器异常,请重新评估");
|
||||
$("#evaluateBtn").prop("disabled", false)
|
||||
}
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
</#compress>
|
||||
@@ -0,0 +1,177 @@
|
||||
<#ftl attributes={"content_type":"text/html; charset=UTF-8"}>
|
||||
<#compress>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>估价记录</title>
|
||||
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
|
||||
<link rel="shortcut icon" href="/favicon.ico">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<link rel="stylesheet" href="https://g.alicdn.com/msui/sm/0.6.2/css/sm.min.css">
|
||||
<link rel="stylesheet" href="../static/style/wx.css">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="page-group">
|
||||
<div class="page page-current">
|
||||
<div class="content infinite-scroll infinite-scroll-bottom" data-distance="100">
|
||||
<div class="list-container">
|
||||
|
||||
</div>
|
||||
|
||||
<!-- 加载提示符 -->
|
||||
<div class="infinite-scroll-preloader">
|
||||
<div class="preloader"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<#include '/layout/footer.ftl'/>
|
||||
<script type="text/javascript">
|
||||
function showDetail(id, obj) {
|
||||
$(obj).css("background", "#d9d9d9")
|
||||
window.location.href = "bhreport?evaluationId="+id;
|
||||
}
|
||||
$.init()
|
||||
// 加载flag
|
||||
var loading = false;
|
||||
// 最多可加载的条目
|
||||
var maxItems = 100;
|
||||
// 每次加载添加多少条目
|
||||
var itemsPerLoad = 10;
|
||||
var url = "bhhistory";
|
||||
function addItems(number, lastIndex) {
|
||||
var page = lastIndex / 10 + 1;
|
||||
$.post(url, "page="+page, function(data){
|
||||
//返回为空,代表加载完毕
|
||||
if(data['result']==null || data['result'].length==0) {
|
||||
// 加载完毕,则注销无限加载事件,以防不必要的加载
|
||||
$.detachInfiniteScroll($('.infinite-scroll'));
|
||||
// 删除加载提示符
|
||||
$('.infinite-scroll-preloader').remove();
|
||||
return;
|
||||
}
|
||||
// 生成新条目的HTML
|
||||
var html = '';
|
||||
$.each(data['result'], function(i){
|
||||
var address = this.dz;
|
||||
var fontColor = "";
|
||||
if(this.hn){
|
||||
if(this.hn.indexOf("栋")>-1 || this.hn.indexOf("幢")>-1){
|
||||
address = address + this.hn;
|
||||
}else{
|
||||
address = address + this.hn + "栋";
|
||||
}
|
||||
|
||||
}
|
||||
if(this.rn){
|
||||
address = address + this.rn + "室";
|
||||
}
|
||||
if(this.down && this.down==1){
|
||||
fontColor = "background-color:#F3F3F3;"
|
||||
}
|
||||
|
||||
if(data.role == 12 || data.role == 17) {
|
||||
html += "<div class='topic topic01' onclick='showDetail("+this.eid+", this)'><div class='topicContent topicContent01' style='"+fontColor+"'><div class='left'><p><label>评估日期:</label><span>" + this.pgrq + "</span></p>" +
|
||||
"<p><label>核价日期:</label><span>" + this.tjrq + "</span></p><p><label>面积:</label><span>" + this.mj + " 平米</span></p><p><label>物业类型:</label><span>" + this.wylx +
|
||||
"</span></p>";
|
||||
if (this.mj == "-") {
|
||||
html += "</span></p></div><div class='right'><p><label>总价:</label><span>" + this.zj;
|
||||
} else {
|
||||
if (this.zsj == "-") {
|
||||
html += "</div><div class='right'><p><label>总价:</label><span><em>" + this.zj + "</em>";
|
||||
} else {
|
||||
html += "</div><div class='right'><p><label>总价:</label><span>" + this.zj;
|
||||
}
|
||||
}
|
||||
if (this.zj == "-") {
|
||||
html += "</span></p><p><label>期望价:</label><span>" + this.ckj;
|
||||
} else {
|
||||
html += " 万元</span></p><p><label>期望价:</label><span>" + this.ckj;
|
||||
}
|
||||
if (this.ckj == "-") {
|
||||
html += "</span></p><p><label>终审价:</label><span>";
|
||||
} else {
|
||||
html += " 万元</span></p><p><label>终审价:</label><span>";
|
||||
}
|
||||
if (this.zsj == "-") {
|
||||
html += (this.zsj + "</span></p><p><label>审核状态:</label><span> " + this.shzt + "</span></p><p><label></label><span></span></p></div>");
|
||||
} else {
|
||||
html += ("<em>" + this.zsj + "</em> 万元</span></p><p><label>审核状态:</label><span> " + this.shzt + "</span></p><p><label></label><span></span></p></div>");
|
||||
}
|
||||
|
||||
html +="<div style='display: inline-block;display: inline-block;margin-top: -20px;'><p><label>地址:</label><span>"+address+"</span></p></div>"
|
||||
if(this.pgsm){
|
||||
html +="<div style='display: inline-block;'><p><label>评估说明:</label><span>"+this.pgsm+"</span></p></div>"
|
||||
}
|
||||
html +="</div></div>";
|
||||
} else {
|
||||
html += "<div class='topic topic01' onclick='showDetail("+this.eid+")'><div class='topicContent topicContent01'><div class='left'><p><label>评估日期:</label><span>" + this.pgrq + "</span></p><p><label>物业类型:</label><span>" + this.wylx
|
||||
+ "</span></p></div><div class='right'><p><label>总价:</label><span>";
|
||||
if (this.zj == "-") {
|
||||
html += "-</span></p><p><label>面积:</label><span>";
|
||||
} else {
|
||||
html += "<em>" + this.zj + "</em> 万元</span></p><p><label>面积:</label><span>";
|
||||
}
|
||||
|
||||
if (this.mj == "-") {
|
||||
html += "-</span></p></div><p><label>地址:</label><span>" + address + "</span></p></div></div>";
|
||||
} else {
|
||||
html += this.mj + " 平米</span></p></div><p><label>地址:</label><span>" + address + "</span></p></div></div>";
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$('.infinite-scroll-bottom .list-container').append(html);
|
||||
|
||||
if(data['result'].length<itemsPerLoad){
|
||||
// 加载完毕,则注销无限加载事件,以防不必要的加载
|
||||
$.detachInfiniteScroll($('.infinite-scroll'));
|
||||
// 删除加载提示符
|
||||
$('.infinite-scroll-preloader').remove();
|
||||
}
|
||||
}, "json");
|
||||
// 添加新条目
|
||||
}
|
||||
//预先加载20条
|
||||
addItems(itemsPerLoad, 0);
|
||||
|
||||
// 上次加载的序号
|
||||
var lastIndex = 10;
|
||||
|
||||
// 注册'infinite'事件处理函数
|
||||
$(document).on('infinite', '.infinite-scroll-bottom', function() {
|
||||
// 如果正在加载,则退出
|
||||
if (loading)
|
||||
return;
|
||||
// 设置flag
|
||||
loading = true;
|
||||
// 模拟1s的加载过程
|
||||
setTimeout(function() {
|
||||
// 重置加载flag
|
||||
loading = false;
|
||||
if (lastIndex >= maxItems) {
|
||||
// 加载完毕,则注销无限加载事件,以防不必要的加载
|
||||
$.detachInfiniteScroll($('.infinite-scroll'));
|
||||
// 删除加载提示符
|
||||
// $('.infinite-scroll-preloader').remove();
|
||||
$('.infinite-scroll-preloader').html('<span style="color:#ccc;font-size:12px">查看更多估价记录请访问房价网官网!</span>');
|
||||
return;
|
||||
}
|
||||
// 添加新条目
|
||||
addItems(itemsPerLoad, lastIndex);
|
||||
// 更新最后加载的序号
|
||||
lastIndex = $('.list-container .topic').length;
|
||||
//容器发生改变,如果是js滚动,需要刷新滚动
|
||||
$.refreshScroller();
|
||||
}, 1000);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
</#compress>
|
||||
@@ -0,0 +1,429 @@
|
||||
<#ftl attributes={"content_type":"text/html; charset=UTF-8"}>
|
||||
<#compress>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>评估结果</title>
|
||||
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
|
||||
<link rel="shortcut icon" href="/favicon.ico">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
|
||||
<link rel="stylesheet" href="https://g.alicdn.com/msui/sm/0.6.2/css/sm.css">
|
||||
<link rel="stylesheet" href="../static/style/wx.css">
|
||||
<style>
|
||||
.list-block02 ul:before,.list-block02 ul:after{height:0;}
|
||||
.moretext{display:inline-block;vertical-align:middle;max-width:130px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="page-group">
|
||||
<div class="page page-current">
|
||||
<div class="content" style="padding-bottom:60px;">
|
||||
|
||||
<div class="topic">
|
||||
<div class="topicContent topicTop" style="padding:0px 20px;">
|
||||
<p>${fjtEvaluation.districtName!}</p>
|
||||
<p style="margin-top:-4px;"><i class="location"></i><small>${fjtEvaluation.address!} <#if fjtEvaluation.houseNum?? && (fjtEvaluation.houseNum?contains("栋") || fjtEvaluation.houseNum?contains("幢"))>${fjtEvaluation.houseNum!}<#else>${fjtEvaluation.houseNum!}号</#if>${fjtEvaluation.roomNum!}室</small> <a href="../district/weXinList?cityName=${fjtEvaluation.city!}" class="collectionLink" style="line-height: 32px;">重新评估 ></a></p>
|
||||
<span></span>
|
||||
<#if bohaiEvaluationAudit?? && bohaiEvaluationAudit.auditStatus!=0>
|
||||
<p style="margin-top:14px;">评估总价:<#if fjtEvaluation??><strong class="<#if bohaiEvaluationAudit?? && bohaiEvaluationAudit.lastPrice??><#else>price_final</#if>">
|
||||
${(bohaiEvaluationAudit.inquirePrice/10000)?int}</strong> 万元</#if></p>
|
||||
<p>评估单价:<#if bohaiEvaluationAudit.inquirePrice gt 0>${(bohaiEvaluationAudit.inquirePrice/fjtEvaluation.houseArea)?int}</#if> 元/平米</p>
|
||||
<#if role?? && role==17 && loanInfoMap??>
|
||||
<p style="margin-top:-12px;">所属分类:${loanInfoMap.type!}类</p>
|
||||
<p style="margin-top:-10px;">可贷成数:${loanInfoMap.loan_ratio!}成</p>
|
||||
<p style="margin-top:-22px;">可贷金额:<strong class="price_final">${(fjtEvaluation.totalPrice*loanInfoMap.loan_ratio*0.1/10000)?string('0.##')}</strong>万元</p>
|
||||
<p style="margin-top:-4px;">贷款利率:4.5%</p>
|
||||
</#if>
|
||||
<#else>
|
||||
<p style="font-size: 16px;height: 40px;color: #FFAF60;">该评估结果需人工审核,请耐心等待,30分钟后可在估价记录中查看人工审核结果!</p>
|
||||
</#if>
|
||||
</div>
|
||||
<div class="topicContent topicBottom" style="padding:0 20px;padding-bottom:5px;">
|
||||
<a id="evalRows" class="collectionLink">估价记录 ></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<#if bohaiEvaluationAudit?? && bohaiEvaluationAudit.auditStatus!=0>
|
||||
<#if role?? && (role==12 || role==16 || role==17)>
|
||||
|
||||
<#if bohaiEvaluationAudit?? && bohaiEvaluationAudit.inquireRemark?? && bohaiEvaluationAudit.inquireRemark?length gt 0>
|
||||
<div class="topic inputTopic01" id="inputTopic01c" style="line-height: 1.5em;">
|
||||
<div class="topicTitle topicTitle01">
|
||||
<span>评估说明:${bohaiEvaluationAudit.inquireRemark!}</span>
|
||||
</div>
|
||||
</div>
|
||||
</#if>
|
||||
|
||||
<#if bohaiEvaluationAudit?? && bohaiEvaluationAudit.lastPrice??>
|
||||
<div class="topic inputTopic01" id="inputTopic01c">
|
||||
<div class="topicTitle topicTitle01">
|
||||
<span>审核价:<strong class="price_final">${(bohaiEvaluationAudit.lastPrice!/10000)?int}</strong> 万元</span><br>
|
||||
<span style="display:block;margin-top:-10px;">期望价:${(bohaiEvaluationAudit.hopePrice!/10000)?int} 万元</span>
|
||||
</div>
|
||||
</div>
|
||||
<#else>
|
||||
<#if bohaiEvaluationAudit?? && bohaiEvaluationAudit.hopePrice??>
|
||||
<div class="topic inputTopic01" id="inputTopic01b">
|
||||
<div class="topicTitle topicTitle01">
|
||||
<span>期望价:${(bohaiEvaluationAudit.hopePrice!/10000)?int} 万元</span>
|
||||
<a class="submit_btn" id="refreshbhPrice">刷新</a>
|
||||
</div>
|
||||
</div>
|
||||
<#else>
|
||||
<div class="topic inputTopic01" id="inputTopic01a">
|
||||
<div class="topicTitle topicTitle01">
|
||||
<span>期望价:</span>
|
||||
<input class="input_price" type="textArea" name="dealPrice"> 万元
|
||||
<a class="submit_btn" id="submitbhPrice" style="border-left: none;">提交</a>
|
||||
<a class="submit_btn dn" id="refreshbhPrice" style="border-left: none;">刷新</a>
|
||||
</div>
|
||||
</div>
|
||||
</#if>
|
||||
|
||||
<div class="topic inputTopic01 dn" id="inputTopic01c">
|
||||
<div class="topicTitle topicTitle01">
|
||||
<span>审核价:<strong class="price_final"></strong> 万元</span><br>
|
||||
<span style="display:block;margin-top:-10px;" id="auditAfterDiv"></span>
|
||||
</div>
|
||||
</div>
|
||||
</#if>
|
||||
</#if>
|
||||
|
||||
|
||||
<div class="topic inputTopic02" id="inputTopic02b" style="border-bottom:none;margin-bottom:0;">
|
||||
<div class="topicTitle topicTitle01">
|
||||
<span>主贷人:</span>
|
||||
<span class="moretext"><#if fjtEvaluation.lender??>${fjtEvaluation.lender!}</#if></span>
|
||||
|
||||
<input class="input_lender <#if fjtEvaluation.lender??>dn</#if>" type="text" name="lender">
|
||||
<a class="submit_btn" id="submitLender" style="border-left: none;"><#if fjtEvaluation.lender??>修改<#else>提交</#if></a>
|
||||
</div>
|
||||
<div class="topicTitle topicTitle01" style="color: #F4A460;font-size: 12px;line-height: 20px;margin-top: -5px;">
|
||||
注:如需下载评估报告,主贷人为必填项
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="topic inputTopic02" id="inputTopic02b" style="border-bottom:none;margin-bottom:0;">
|
||||
<div class="topicTitle topicTitle01">
|
||||
<span>备 注:</span>
|
||||
<span class="moretext"><#if bohaiEvaluationAudit.remark??>${bohaiEvaluationAudit.remark!}</#if></span>
|
||||
<input class="input_lender <#if bohaiEvaluationAudit.remark??>dn</#if>" name="remark" type="textArea"/>
|
||||
<a class="submit_btn" id="submitRemark" style="border-left: none;"><#if bohaiEvaluationAudit.remark??>修改<#else>提交</#if></a>
|
||||
</div>
|
||||
<div class="topicTitle topicTitle01" style="color: #F4A460;font-size: 12px;line-height: 20px;margin-top: -5px;">
|
||||
注:如房屋有特殊情况,请填写备注信息
|
||||
</div>
|
||||
</div>
|
||||
</#if>
|
||||
|
||||
|
||||
|
||||
<div class="topic">
|
||||
<div class="topicTitle">房产基本信息</div>
|
||||
<div class="topicContent">
|
||||
<div class="left">
|
||||
<p><label>室号:</label><span><#if fjtEvaluation.houseNum??>${fjtEvaluation.houseNum!}<#else>-</#if>号<#if fjtEvaluation.unitNum?? && fjtEvaluation.unitNum?length gt 0>${fjtEvaluation.unitNum!}单元</#if><#if fjtEvaluation.roomNum??>${fjtEvaluation.roomNum!}<#else>-</#if>室</span></p>
|
||||
<p><label>房型:</label><span><#if fjtEvaluation.houseRoom??>${fjtEvaluation.houseRoom!}<#else>-</#if>室<#if fjtEvaluation.houseHall??>${fjtEvaluation.houseHall!}<#else>-</#if>厅</span></p>
|
||||
<p>
|
||||
<label>所在楼层:</label>
|
||||
<span>
|
||||
<#if fjtEvaluation.buildType?? && fjtEvaluation.buildType gte 4 && fjtEvaluation.buildType lte 7 >
|
||||
${fjtEvaluation.floorDesc!}
|
||||
<#else>
|
||||
<#if fjtEvaluation.houseFloor??>${fjtEvaluation.houseFloor!}<#else>-</#if>
|
||||
</#if>
|
||||
</span>
|
||||
</p>
|
||||
<p><label>朝向:</label><span>
|
||||
<#if fjtEvaluation.direction! == 3>
|
||||
南
|
||||
<#elseif fjtEvaluation.direction! == 10>
|
||||
南北
|
||||
<#elseif fjtEvaluation.direction! == 2>
|
||||
东南
|
||||
<#elseif fjtEvaluation.direction! == 1>
|
||||
西南
|
||||
<#elseif fjtEvaluation.direction! == 4>
|
||||
西北
|
||||
<#elseif fjtEvaluation.direction! == 5>
|
||||
东北
|
||||
<#elseif fjtEvaluation.direction! == 6>
|
||||
东
|
||||
<#elseif fjtEvaluation.direction! == 7>
|
||||
西
|
||||
<#elseif fjtEvaluation.direction! == 8>
|
||||
北
|
||||
<#elseif fjtEvaluation.direction! == 9>
|
||||
东西
|
||||
<#else>
|
||||
-
|
||||
</#if>
|
||||
</span></p>
|
||||
<p><label>车位号:</label><span><#if fjtEvaluation.carSiteNum??>${fjtEvaluation.carSiteNum!}<#else>-</#if></span></p>
|
||||
<#if fjtEvaluation.city! == "上海">
|
||||
<p class="loopLine"><label>环线:</label><span>${fjtEvaluation.loopLine!}</span></p>
|
||||
</#if>
|
||||
|
||||
<#if role?? && role==16>
|
||||
<p>
|
||||
<label>是否满五:</label>
|
||||
<span>
|
||||
<#if fjtEvaluation.buyYear! == 1>
|
||||
是
|
||||
<#elseif fjtEvaluation.buyYear! == 2>
|
||||
否
|
||||
<#else>
|
||||
-
|
||||
</#if>
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label>登记价:</label>
|
||||
<span>
|
||||
${fjtEvaluation.registerPrice!?string('0.##')} 元
|
||||
</span>
|
||||
</p>
|
||||
</#if>
|
||||
</div>
|
||||
<div class="right">
|
||||
<p><label>建筑面积:</label><span>${fjtEvaluation.houseArea!?string('0.##')} 平米</span></p>
|
||||
<p><label>建筑类型:</label>
|
||||
<span>
|
||||
<#if evaluation?? && (fjtEvaluation.buildType)! == 3>
|
||||
住宅
|
||||
<#elseif fjtEvaluation.buildType! == 8>
|
||||
公寓
|
||||
<#elseif fjtEvaluation.buildType! == 4>
|
||||
独立别墅
|
||||
<#elseif fjtEvaluation.buildType! == 5>
|
||||
双拼别墅
|
||||
<#elseif fjtEvaluation.buildType! == 6>
|
||||
联排别墅
|
||||
<#elseif fjtEvaluation.buildType! == 7>
|
||||
叠加别墅
|
||||
<#else>
|
||||
-
|
||||
</#if>
|
||||
</span></p>
|
||||
<p><label>总楼层:</label><span><#if fjtEvaluation.houseHight??>${fjtEvaluation.houseHight!}<#else>-</#if></span></p>
|
||||
<p><label>装修情况:</label><span>
|
||||
<#if fjtEvaluation.fitment! == 1>
|
||||
毛坯
|
||||
<#elseif fjtEvaluation.fitment! == 2>
|
||||
普通装修
|
||||
<#elseif fjtEvaluation.fitment! == 4>
|
||||
精装修
|
||||
<#elseif fjtEvaluation.fitment! == 5>
|
||||
豪华装修
|
||||
<#elseif fjtEvaluation.fitment! == 0>
|
||||
开发商装修
|
||||
<#else>
|
||||
-
|
||||
</#if>
|
||||
</span></p>
|
||||
<p><label>车位价格:</label><span>-</span></p>
|
||||
<#if role?? && role==16>
|
||||
<p>
|
||||
<label>是否唯一:</label>
|
||||
<span>
|
||||
<#if fjtEvaluation.onlyOne! == 1>
|
||||
是
|
||||
<#elseif fjtEvaluation.onlyOne! == 2>
|
||||
否
|
||||
<#else>
|
||||
-
|
||||
</#if>
|
||||
</span>
|
||||
</p>
|
||||
</#if>
|
||||
</div>
|
||||
<div class="left leftMore dn">
|
||||
<p><label>小区位置:</label>
|
||||
<span>
|
||||
<#if fjtEvaluation.insidepos! == 1>
|
||||
离小区出口近
|
||||
<#elseif fjtEvaluation.insidepos! == 2>
|
||||
离小区出口远
|
||||
<#elseif fjtEvaluation.insidepos! == 3>
|
||||
离小区出口适中
|
||||
<#else>
|
||||
-
|
||||
</#if>
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label>采光通风:</label>
|
||||
<span>
|
||||
<#if fjtEvaluation.lightingVentilation! == 1>
|
||||
无暗房/南北通风
|
||||
<#elseif fjtEvaluation.lightingVentilation! == 2>
|
||||
南北通风
|
||||
<#elseif fjtEvaluation.lightingVentilation! == 3>
|
||||
一般
|
||||
<#elseif fjtEvaluation.lightingVentilation! == 4>
|
||||
差
|
||||
<#else>
|
||||
-
|
||||
</#if>
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label>边套装置:</label>
|
||||
<span>
|
||||
<#if fjtEvaluation.sideset! == 1>
|
||||
非边套
|
||||
<#elseif fjtEvaluation.sideset! == 2>
|
||||
边套不带窗
|
||||
<#elseif fjtEvaluation.sideset! == 3>
|
||||
边套带窗
|
||||
<#else>
|
||||
-
|
||||
</#if>
|
||||
</span>
|
||||
</p>
|
||||
<p><label>花园面积:</label><span><#if fjtEvaluation.gardenArea??>${fjtEvaluation.gardenArea!?string('0.##')}平米<#else>-</#if></span></p>
|
||||
<p><label>露台面积:</label><span><#if fjtEvaluation.outerArea??>${fjtEvaluation.outerArea!?string('0.##')}平米<#else>-</#if></span></p>
|
||||
<p><label>车位面积:</label><span><#if fjtEvaluation.carSiteArea??>${fjtEvaluation.carSiteArea!?string('0.##')}平米<#else>-</#if></p>
|
||||
<#if fjtEvaluation.city! == "上海">
|
||||
<p><label>环线:</label><span>${fjtEvaluation.loopLine!}</span></p>
|
||||
</#if>
|
||||
</div>
|
||||
<div class="right rightMore dn">
|
||||
<p>
|
||||
<label>景观情况:</label>
|
||||
<span>
|
||||
<#if fjtEvaluation.sight! == 1>
|
||||
景观房
|
||||
<#elseif fjtEvaluation.sight! == 2>
|
||||
侧景观房
|
||||
<#elseif fjtEvaluation.sight! == 3>
|
||||
一般
|
||||
<#elseif fjtEvaluation.sight! == 4>
|
||||
差
|
||||
<#else>
|
||||
-
|
||||
</#if>
|
||||
</span>
|
||||
</p>
|
||||
<p>
|
||||
<label>噪音影响:</label>
|
||||
<span>
|
||||
<#if fjtEvaluation.noise! == 1>
|
||||
无噪音
|
||||
<#elseif fjtEvaluation.noise! == 2>
|
||||
噪音较小
|
||||
<#elseif fjtEvaluation.noise! == 3>
|
||||
噪音较大
|
||||
<#else>
|
||||
-
|
||||
</#if>
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<label>厌恶设施:</label>
|
||||
<span>
|
||||
<#if fjtEvaluation.worryFacility! == 1>
|
||||
很近
|
||||
<#elseif fjtEvaluation.worryFacility! == 2>
|
||||
较近
|
||||
<#elseif fjtEvaluation.worryFacility! == 3>
|
||||
较远
|
||||
<#else>
|
||||
-
|
||||
</#if>
|
||||
</span>
|
||||
</p>
|
||||
<p><label>地下室面积:</label><span><#if fjtEvaluation.basementArea??&&(fjtEvaluation.basementArea!>0)>${fjtEvaluation.basementArea!?string('0.##')}平米<#else>-</#if></span></p>
|
||||
<p><label>阁楼面积:</label><span><#if fjtEvaluation.basementArea??&&(fjtEvaluation.atticArea!>0)>${fjtEvaluation.atticArea!?string('0.##')}平米<#else>-</#if></span></p>
|
||||
<p>
|
||||
<label>车位情况:</label>
|
||||
<span>
|
||||
<#if fjtEvaluation.carport! == 1>
|
||||
已租
|
||||
<#elseif fjtEvaluation.carport! == 3>
|
||||
已购
|
||||
<#elseif fjtEvaluation.carport! == 2>
|
||||
暂无
|
||||
<#else>
|
||||
-
|
||||
</#if>
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="more_btn">全部信息</div>
|
||||
<div class="little_btn dn">精简信息</div>
|
||||
</div>
|
||||
<#-- <div class="topic" id="trendDiv">-->
|
||||
<#-- <div class="topicTitle">均价对比</div>-->
|
||||
<#-- <div class="topicContent">-->
|
||||
<#-- <div class="charts" id="priceCharts"></div>-->
|
||||
<#-- </div>-->
|
||||
<#-- </div>-->
|
||||
<#--<div class="topic" id="tradeDiv">
|
||||
<div class="topicTitle">成交参考数据</div>
|
||||
<div class="topicContent">
|
||||
<p id="maxPrice"><label>成交案例最高单价:</label><span><font></font> 元/平米</span></p>
|
||||
<p id="minPrice"><label>成交案例最低单价:</label><span><font></font> 元/平米</span></p>
|
||||
</div>
|
||||
</div>-->
|
||||
<div class="topic" id="houseDiv">
|
||||
<div class="topicTitle">同类型房源挂牌价格参考</div>
|
||||
<div class="topicContent" style="padding:0 20px;">
|
||||
<div class="list-block list-block02 media-list">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<#if bohaiEvaluationAudit?? && fjtEvaluation.lender?? && bohaiEvaluationAudit.auditStatus!=0>
|
||||
<div class="content-block">
|
||||
<p><a href="#" class="button button-big button-fill download_btn">下载评估报告</a></p>
|
||||
</div>
|
||||
</#if>
|
||||
|
||||
<div class="content-block">
|
||||
<p><a href="#" class="prompt-title-ok"></a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<#include '/layout/footer.ftl'/>
|
||||
<script type='text/javascript' src='../static/js/wx.js' charset='utf-8'></script>
|
||||
<script type="text/javascript" src="https://cdn.hcharts.cn/highcharts/highcharts.js"></script>
|
||||
<script type='text/javascript' src='../static/js/jquery.cookie.js' charset='utf-8'></script>
|
||||
<script type="text/javascript" src="../static/js/report.js?v=${t_util.currentTimeMillis()}"></script>
|
||||
<script type="text/javascript">
|
||||
var eId = '${fjtEvaluation.id!}';
|
||||
var role = ${role}
|
||||
showOtherSource(eId);
|
||||
//showTradeReference(eId);
|
||||
showHouseReference(eId);
|
||||
$("#evalRows").click(function(){
|
||||
if(role==17){
|
||||
location.href = "bhhistory"
|
||||
}else{
|
||||
location.href = "recordList"
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
</#compress>
|
||||
@@ -366,9 +366,11 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-block">
|
||||
<p><a href="#" class="button button-big button-fill download_btn">下载评估报告</a></p>
|
||||
</div>
|
||||
|
||||
<div class="content-block">
|
||||
<p><a href="#" class="button button-big button-fill download_btn">下载评估报告</a></p>
|
||||
</div>
|
||||
|
||||
<div class="content-block">
|
||||
<p><a href="#" class="prompt-title-ok"></a></p>
|
||||
</div>
|
||||
|
||||
+3
-1
@@ -29,7 +29,7 @@ import java.util.regex.Pattern
|
||||
@BatchOwner(Watcher.GaoJuan)
|
||||
class BigdataDealBatch extends BaseBatch{
|
||||
|
||||
def curDate = 20210701//Integer.parseInt(DateUtils.addMonth(DateUtils.formatDateByPattern(new Date(), "yyyyMMdd"), -1, "yyyyMMdd"));
|
||||
def curDate = 20210901//Integer.parseInt(DateUtils.addMonth(DateUtils.formatDateByPattern(new Date(), "yyyyMMdd"), -1, "yyyyMMdd"));
|
||||
public static ExecutorService fixedThreadPool = Executors.newFixedThreadPool(30)
|
||||
def sourceMap = ["贝壳找房":"ke.com","我爱我家":"5i5j.com","链家在线":"lianjia.com","房天下":"fang.com","中原地产":"centanet.com","福州不动产":"","搜房":"fang.com"]
|
||||
|
||||
@@ -421,6 +421,7 @@ class BigdataDealBatch extends BaseBatch{
|
||||
// }
|
||||
|
||||
def endDate = DateUtils.getLastDayOfMonth(DateUtils.parseFromTightByPattern(curDate.toString(), "yyyyMMdd"))//DateUtils.getFirstDayOfMonth(new Date())
|
||||
// def endDate = DateUtils.getLastDayOfMonth(DateUtils.parseFromTightByPattern("20210801", "yyyyMMdd"))
|
||||
for(def i=0;i<dists.size();i++){
|
||||
final def dist = dists[i]
|
||||
fixedThreadPool.execute(new Runnable() {
|
||||
@@ -475,6 +476,7 @@ class BigdataDealBatch extends BaseBatch{
|
||||
def getYouDaData(statMap){
|
||||
def startDate = DateUtils.getFirstDayOfMonth(DateUtils.parseFromTightByPattern(curDate.toString(), "yyyyMMdd"))
|
||||
def endDate = DateUtils.getLastDayOfMonth(DateUtils.parseFromTightByPattern(curDate.toString(), "yyyyMMdd"))
|
||||
// def endDate = DateUtils.getLastDayOfMonth(DateUtils.parseFromTightByPattern("20210801", "yyyyMMdd"))
|
||||
def q = new BasicDBObject()
|
||||
q.put("contractTime", new BasicDBObject('$gte', startDate).append('$lte', endDate));
|
||||
q.put("area", new BasicDBObject('$gte', 20))
|
||||
|
||||
+9
-6
@@ -55,7 +55,7 @@ class BigdataForsaleBatch extends BaseBatch{
|
||||
}
|
||||
|
||||
public static final String[] TAGS = ["独栋", "联排", "叠加", "双拼", "花园面积", "泳池", "别墅", "带花园", "洋房", "叠拼", "独院", "联体", "微墅", "大平墅"];
|
||||
public static ExecutorService fixedThreadPool = Executors.newFixedThreadPool(80)
|
||||
public static ExecutorService fixedThreadPool = Executors.newFixedThreadPool(60)
|
||||
|
||||
def sqlInstance = Sql.newInstance("jdbc:oracle:thin:@192.168.0.100:31521:orcl",
|
||||
"GOOJIA", "GOOJIA", "oracle.jdbc.driver.OracleDriver")
|
||||
@@ -66,15 +66,15 @@ class BigdataForsaleBatch extends BaseBatch{
|
||||
|
||||
@Override
|
||||
public void process(Object args) {
|
||||
def citys = CcbCommonUtils.citys;
|
||||
def index = 0
|
||||
def citys = CcbCommonUtils.citys;
|
||||
def cityCodeDataMap = CcbCommonUtils.findCityCodeValue()
|
||||
for(def city : citys){
|
||||
index++
|
||||
// def distIds = getDistrictIds(cityCodeDataMap.get(city))
|
||||
def distCodeMap = CcbCommonUtils.findAllDistrictCodeValue(city)
|
||||
def districts = CcbCommonUtils.findAllDistrictByCity(city, "district", ["city", "region", "name", "lng","estate_type2","name_cat","address", "alias", "finish_building_date", "house_property", "property_life", "build_type", "build_structure"]);
|
||||
exportSellCSV(index, city, cityCodeDataMap, distCodeMap, districts, 20200101, 20210930);
|
||||
exportSellCSV(index, city, cityCodeDataMap, distCodeMap, districts, 20211001, 20211018);
|
||||
// exportSellCSV(index, city, cityCodeDataMap, distCodeMap, districts, 20210801, 20210831);
|
||||
}
|
||||
}
|
||||
@@ -96,9 +96,9 @@ class BigdataForsaleBatch extends BaseBatch{
|
||||
def commId = rMap.get("_id").toString()
|
||||
|
||||
def ret = findHouses(city, rMap.region, "sell", startDate,endDate, rMap.name, rMap.alias)
|
||||
if(ret && ret.size()<100){
|
||||
ret = findHouses(city, rMap.region, "sell", 20190701, endDate, rMap.name, rMap.alias)
|
||||
}
|
||||
// if(ret && ret.size()<100){
|
||||
// ret = findHouses(city, rMap.region, "sell", 20190701, endDate, rMap.name, rMap.alias)
|
||||
// }
|
||||
if(ret){
|
||||
def areaData = distCodeMap.get(rMap.region)
|
||||
if(areaData){
|
||||
@@ -283,6 +283,7 @@ class BigdataForsaleBatch extends BaseBatch{
|
||||
|
||||
def rets = []
|
||||
def houses = ElasticUtils.executeSimpleQuery("192.168.0.206", "seawater-20*", queryBuilder);
|
||||
|
||||
if(houses){
|
||||
for (int k=0;k<houses.size();k++) {
|
||||
def map = houses[k];
|
||||
@@ -412,6 +413,8 @@ class BigdataForsaleBatch extends BaseBatch{
|
||||
rets << rowMap
|
||||
}
|
||||
}
|
||||
|
||||
println name +" "+houses.size()+" last:"+rets.size()
|
||||
return rets;
|
||||
}
|
||||
|
||||
|
||||
+54
-2
@@ -14,7 +14,7 @@ import groovy.sql.Sql
|
||||
class CcbCommonUtils {
|
||||
|
||||
//
|
||||
public static def citys = ["扬州", "上海","北京","重庆","天津","成都","沈阳","大连","陵水","安庆","西宁","日照","长春","武汉","西安","苏州","广州","南京","青岛","济南","宁波","长沙","石家庄","佛山","嘉兴","银川","南通","廊坊","中山","郑州","哈尔滨","烟台","徐州","绍兴","厦门","昆明","南昌","贵阳","珠海","东莞","镇江","洛阳","温州","兰州","福州","惠州","呼和浩特","常州","唐山","淮安","湖州","九江","太原","北海","株洲","淄博","盐城","乌鲁木齐","海口","南宁","常德","台州","金华","吉林","岳阳","柳州","清远","湛江","张家口","保定","深圳","杭州","合肥","无锡","泉州","遵义","肇庆","漳州","宜昌","芜湖","泰州","汕头","三亚","秦皇岛","马鞍山","连云港","沧州","拉萨","锦州","大同","文昌","保亭"]
|
||||
public static def citys = ["扬州", "上海","北京","重庆","天津","成都","沈阳","大连","安庆","西宁","日照","长春","武汉","西安","苏州","广州","南京","青岛","济南","宁波","长沙","石家庄","佛山","嘉兴","银川","南通","廊坊","中山","郑州","哈尔滨","烟台","徐州","绍兴","厦门","昆明","南昌","贵阳","珠海","东莞","镇江","洛阳","温州","兰州","福州","惠州","呼和浩特","常州","唐山","淮安","湖州","九江","太原","北海","株洲","淄博","盐城","乌鲁木齐","海口","南宁","常德","台州","金华","吉林","岳阳","柳州","清远","湛江","张家口","保定","深圳","杭州","合肥","无锡","泉州","遵义","肇庆","漳州","宜昌","芜湖","泰州","汕头","三亚","秦皇岛","马鞍山","连云港","沧州","拉萨","锦州","大同","文昌","保亭","陵水"]
|
||||
// public static def citys = ["武汉"]
|
||||
|
||||
public static def provCityMap = ["河北":"石家庄" ,"山西":"太原" ,"陕西":"西安" ,"山东":"济南","河南":"郑州" ,"辽宁":"沈阳" ,"吉林":"长春" ,"黑龙江":"哈尔滨" ,"江苏":"南京" ,"浙江":"杭州" ,"安徽":"合肥","江西":"南昌" ,"福建":"福州" ,"湖北":"武汉","湖南":"长沙" ,"四川":"成都" ,"贵州":"贵阳" ,"云南":"昆明" ,"广东":"广州" ,"海南":"海口" ,"甘肃":"兰州" ,"青海":"西宁" ,"台湾":"台北","内蒙古":"呼和浩特" ,"新疆":"乌鲁木齐" ,"西藏":"拉萨","广西":"南宁","宁夏":"银川","香港":"香港","澳门":"澳门"]
|
||||
@@ -97,6 +97,7 @@ class CcbCommonUtils {
|
||||
q.put("city", dist.city)
|
||||
q.put("region", dist.region)
|
||||
q.put("area", new BasicDBObject('$gte', 20))
|
||||
q.put("avg_price", new BasicDBObject('$gt', 0))
|
||||
def alias = []
|
||||
if(dist.alias){
|
||||
if(!dist.alias.contains(dist.name)){
|
||||
@@ -122,6 +123,7 @@ class CcbCommonUtils {
|
||||
def total = dbcursor.count()
|
||||
def rets = new HashSet()
|
||||
def lists = []
|
||||
println dist.name +" "+total
|
||||
for(def d : dbcursor){
|
||||
// if(startPrice && d.avg_price>=startPrice && d.avg_price<=endPrice){
|
||||
def key=d.city+"##"+d.region+"##"+d.district_name+"##"+d.area+"##"+d.avg_price+"##"+DateUtils.formatDateByPattern(d.trade_date,"yyyy-MM-dd")
|
||||
@@ -223,13 +225,63 @@ class CcbCommonUtils {
|
||||
return dataStoreConnection
|
||||
}
|
||||
|
||||
public static def findAllDistrictIdsByOracle(def cityid){
|
||||
def sql = "select commid from bigdata_community_gj where cityId=${cityid} and status=0";
|
||||
def set = new HashSet()
|
||||
sqlInstance.eachRow(sql,{r->
|
||||
set << r.COMMID
|
||||
});
|
||||
return set
|
||||
}
|
||||
|
||||
public static def findAllDistrictsByOracle(def cityid){
|
||||
def sql = "select CITYID,COMMID,COMMNAME,COMMALIAS,DISTID,STREET,STREETNO,ADDRESS,LANDAREA,BUILDAREA,COMMTYPE,IFNEW,GREENINGRATE,PLOTRATIO,PARKINGCNT,INTRODUCTION,REMARK,to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME,to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME,SOURCECODE,WORKDATE,ZTS,LONGITUDE,LATITUDE from bigdata_community_gj where cityId='${cityid}' and status=0 ";
|
||||
def rows = []
|
||||
try{
|
||||
sqlInstance.eachRow(sql,{r->
|
||||
def map = [:]
|
||||
map.cityid = r.CITYID
|
||||
map.commid = r.COMMID
|
||||
map.commname = r.COMMNAME
|
||||
map.distid = r.DISTID
|
||||
map.street = r.STREET
|
||||
map.streetno = r.STREETNO
|
||||
map.address = r.ADDRESS
|
||||
map.landarea = r.LANDAREA
|
||||
map.buildarea = r.BUILDAREA
|
||||
map.commtype = r.COMMTYPE
|
||||
map.ifnew = r.IFNEW
|
||||
map.greeningrate = r.GREENINGRATE
|
||||
map.plotratio = r.PLOTRATIO
|
||||
map.parkingcnt = r.PARKINGCNT
|
||||
map.introduction = ""
|
||||
map.remark = r.REMARK
|
||||
map.createtime = r.CREATETIME
|
||||
map.updatetime = r.UPDATETIME
|
||||
map.sourcecode = r.SOURCECODE
|
||||
map.workdate = r.WORKDATE
|
||||
map.zts = r.ZTS
|
||||
map.lng = r.LONGITUDE
|
||||
map.lat = r.LATITUDE
|
||||
rows << map
|
||||
});
|
||||
}catch(Exception e){
|
||||
sqlInstance = Sql.newInstance("jdbc:oracle:thin:@192.168.0.100:31521:orcl",
|
||||
"GOOJIA", "GOOJIA", "oracle.jdbc.driver.OracleDriver")
|
||||
findAllDistrictsByOracle(cityid)
|
||||
println "错误:"+e.getMessage()
|
||||
}
|
||||
|
||||
return rows
|
||||
}
|
||||
|
||||
public static def findAllDistrictByCity(def city, def cat, def fields){
|
||||
|
||||
DBObject q = new BasicDBObject();
|
||||
q.put("visible",0)
|
||||
q.put("cat", cat);
|
||||
q.put("city", city);
|
||||
// q.put("name", "东特金星公馆")
|
||||
// q.put("name","江南人家")
|
||||
// q.put("name_cat", 0);
|
||||
// q.put("estate_type2", new BasicDBObject('$in', ["普通住宅","商住"]))
|
||||
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ class CcbFtpUtils {
|
||||
static def ftpServer = "192.168.0.45"
|
||||
static def ftpPort = 17495
|
||||
static def ftpUser = "ccb"
|
||||
static def ftpPassword = "0I1k8EAM+O8iA"
|
||||
static def ftpPassword = "ccb!@#"
|
||||
static def ftpPath = "/home/ccb/output/"
|
||||
|
||||
static SFTP sftp = new SFTP();
|
||||
|
||||
+226
-237
@@ -18,24 +18,25 @@ class ExportOracleData {
|
||||
def task = new ExportOracleData()
|
||||
task.run()
|
||||
}
|
||||
def run(){
|
||||
|
||||
def run() {
|
||||
// exportEvaluationRateData()
|
||||
// exportBigdataPoiData()
|
||||
// exportCommunityStaging()
|
||||
// exportCommunityBuileType()
|
||||
// exportBigdataDistrictData()
|
||||
// exportGuidedPrice()
|
||||
// exportCommunityGuidedPrice()
|
||||
// exportBigdataDeal()
|
||||
exportThirdPartyPrice()
|
||||
|
||||
// exportBigdataCommunity()
|
||||
// exportBigdataForsale()
|
||||
// exportGuidedPrice()
|
||||
exportBigdataForsale()
|
||||
// exportThirdPartyPrice()
|
||||
|
||||
// exportThirdPartyPrice2()
|
||||
// exportBigdataDeal()
|
||||
|
||||
// exportCommunityGuidedPrice()
|
||||
// exportAvmEvaluationGJNB()
|
||||
// exportAVMEvaluationItemGJNB()
|
||||
// exportCommunityBasePrice()
|
||||
|
||||
// exportCommunityBasePriceGj()
|
||||
// exportCityPrice()
|
||||
// exportRegionPrice()
|
||||
@@ -43,10 +44,10 @@ class ExportOracleData {
|
||||
}
|
||||
|
||||
|
||||
def exportEvaluationRateData(){
|
||||
def exportEvaluationRateData() {
|
||||
def sql = "select ID,RATE_TYPE,RATE,RANK,CITY,REMARK, to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME,SOURCECODE from evaluate_rate_gj";
|
||||
def allRows = []
|
||||
sqlInstance.eachRow(sql,{r->
|
||||
sqlInstance.eachRow(sql, { r ->
|
||||
def data = []
|
||||
data << r.ID
|
||||
data << r.RATE_TYPE
|
||||
@@ -60,27 +61,23 @@ class ExportOracleData {
|
||||
allRows << data
|
||||
});
|
||||
|
||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMMdd")
|
||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM") + "28";
|
||||
def fileName = "/output/MODEL_000000_000000_EVALUATE_RATE_GJ_ALL_${curDate}_0001.dat"
|
||||
def dataCodeFileName = "/output/MODEL_000000_000000_EVALUATE_RATE_GJ_ALL_${curDate}_0001.ok"
|
||||
if(CommonDatautils.isWindow()){
|
||||
fileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\202108\\MODEL_000000_000000_EVALUATE_RATE_GJ_ALL_${curDate}_0001.dat"
|
||||
dataCodeFileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\202108\\MODEL_000000_000000_EVALUATE_RATE_GJ_ALL_${curDate}_0001.ok"
|
||||
if (CommonDatautils.isWindow()) {
|
||||
fileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\${curDate}\\MODEL_000000_000000_EVALUATE_RATE_GJ_ALL_${curDate}_0001.dat"
|
||||
}
|
||||
def headers = []//["系数ID","系数类型","系数","排序","城市","备注","创建时间","更新时间","来源公司"]
|
||||
FileUtils.batchCreateFile(allRows, fileName, headers, "utf-8", false);
|
||||
FileUtils.batchCreateFile([], dataCodeFileName, [], "utf-8", false);
|
||||
println "数据文件输出完成......"
|
||||
CcbFtpUtils.ftpUpload(fileName, "202108")
|
||||
CcbFtpUtils.ftpUpload(dataCodeFileName, "202108")
|
||||
CcbFtpUtils.ftpUpload(fileName, curDate)
|
||||
println "上传Ftp完成......"
|
||||
}
|
||||
|
||||
|
||||
def exportBigdataPoiData(){
|
||||
def sql = "select CITYID, DISTID, ID, POI_NAME, TYPE, TYPE_CODE, LATITUDE, LONGITUDE, REMARK, to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME, SOURCECODE from bigdata_poi_gj where cityId in (350200,150100)";
|
||||
def exportBigdataPoiData() {
|
||||
def sql = "select CITYID, DISTID, ID, POI_NAME, TYPE, TYPE_CODE, LATITUDE, LONGITUDE, REMARK, to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME, SOURCECODE from bigdata_poi_gj";
|
||||
def allRows = []
|
||||
sqlInstance.eachRow(sql,{r->
|
||||
sqlInstance.eachRow(sql, { r ->
|
||||
def data = []
|
||||
data << r.CITYID
|
||||
data << r.DISTID
|
||||
@@ -97,27 +94,24 @@ class ExportOracleData {
|
||||
allRows << data
|
||||
});
|
||||
|
||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMMdd")
|
||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM") + "28";
|
||||
|
||||
def fileName = "/ccb/MODEL_000000_000000_BIGDATA_POI_GJ_ALL_${curDate}_0001.dat"
|
||||
def dataCodeFileName = "/ccb/MODEL_000000_000000_BIGDATA_POI_GJ_ALL_${curDate}_0001.ok"
|
||||
if(CommonDatautils.isWindow()){
|
||||
fileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\202108\\MODEL_000000_000000_BIGDATA_POI_GJ_ALL_${curDate}_0001.dat"
|
||||
dataCodeFileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\202108\\MODEL_000000_000000_BIGDATA_POI_GJ_ALL_${curDate}_0001.ok"
|
||||
if (CommonDatautils.isWindow()) {
|
||||
fileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\${curDate}\\MODEL_000000_000000_BIGDATA_POI_GJ_ALL_${curDate}_0001.dat"
|
||||
}
|
||||
def headers = []//["城市ID","行政区ID","ID","Poi名称","类型","类型编码","纬度","经度","备注","创建时间","更新时间","来源公司"]
|
||||
|
||||
FileUtils.batchCreateFile(allRows, fileName, headers, "utf-8", false);
|
||||
FileUtils.batchCreateFile([], dataCodeFileName, [], "utf-8", false);
|
||||
println "BIGDATA_POI_GJ 数据文件输出完成......"
|
||||
CcbFtpUtils.ftpUpload(fileName, "202108")
|
||||
CcbFtpUtils.ftpUpload(dataCodeFileName, "202108")
|
||||
CcbFtpUtils.ftpUpload(fileName, curDate)
|
||||
println "BIGDATA_POI_GJ 上传Ftp完成......"
|
||||
}
|
||||
|
||||
def exportCommunityStaging(){
|
||||
def exportCommunityStaging() {
|
||||
def sql = "select ID,COMMID,MASTER_COMMID,REMARK,to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME,SOURCECODE from community_staging_gj";
|
||||
def allRows = []
|
||||
sqlInstance.eachRow(sql,{r->
|
||||
sqlInstance.eachRow(sql, { r ->
|
||||
def data = []
|
||||
data << r.ID
|
||||
data << r.COMMID
|
||||
@@ -128,27 +122,23 @@ class ExportOracleData {
|
||||
data << r.SOURCECODE
|
||||
allRows << data
|
||||
});
|
||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMMdd")
|
||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM") + "28";
|
||||
def fileName = "/ccb/MODEL_000000_000000_COMMUNITY_STAGING_GJ_ALL_${curDate}_0001.dat"
|
||||
def dataCodeFileName = "/ccb/MODEL_000000_000000_COMMUNITY_STAGING_GJ_ALL_${curDate}_0001.ok"
|
||||
if(CommonDatautils.isWindow()){
|
||||
fileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\202108\\MODEL_000000_000000_COMMUNITY_STAGING_GJ_ALL_${curDate}_0001.dat"
|
||||
dataCodeFileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\202108\\MODEL_000000_000000_COMMUNITY_STAGING_GJ_ALL_${curDate}_0001.ok"
|
||||
if (CommonDatautils.isWindow()) {
|
||||
fileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\${curDate}\\MODEL_000000_000000_COMMUNITY_STAGING_GJ_ALL_${curDate}_0001.dat"
|
||||
}
|
||||
def headers = []//["分期ID","小区ID","小区主期ID","备注","创建时间","更新时间","来源公司"]
|
||||
|
||||
FileUtils.batchCreateFile(allRows, fileName, headers, "utf-8", false);
|
||||
FileUtils.batchCreateFile([], dataCodeFileName, [], "utf-8", false);
|
||||
println "COMMUNITY_STAGING_GJ 数据文件输出完成......"
|
||||
CcbFtpUtils.ftpUpload(fileName, "202108")
|
||||
CcbFtpUtils.ftpUpload(dataCodeFileName, "202108")
|
||||
CcbFtpUtils.ftpUpload(fileName, curDate)
|
||||
println "COMMUNITY_STAGING_GJ 上传Ftp完成......"
|
||||
}
|
||||
|
||||
def exportCommunityBuileType(){
|
||||
def sql = "select CITYID, COMMID, BUILDTYPE, REMARK, to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME,SOURCECODE, WORKDATE from bigdata_commbuildtype_gj where CITYID in (350200,150100)";
|
||||
def exportCommunityBuileType() {
|
||||
def sql = "select CITYID, COMMID, BUILDTYPE, REMARK, to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME,SOURCECODE, WORKDATE from bigdata_commbuildtype_gj";
|
||||
def allRows = []
|
||||
sqlInstance.eachRow(sql,{r->
|
||||
sqlInstance.eachRow(sql, { r ->
|
||||
def data = []
|
||||
data << r.CITYID
|
||||
data << r.COMMID
|
||||
@@ -160,28 +150,24 @@ class ExportOracleData {
|
||||
data << r.WORKDATE
|
||||
allRows << data
|
||||
});
|
||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMMdd")
|
||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM") + "28";
|
||||
def fileName = "/ccb/MODEL_000000_000000_BIGDATA_COMMBUILDTYPE_GJ_ALL_${curDate}_0001.dat"
|
||||
def dataCodeFileName = "/ccb/MODEL_000000_000000_BIGDATA_COMMBUILDTYPE_GJ_ALL_${curDate}_0001.ok"
|
||||
if(CommonDatautils.isWindow()){
|
||||
fileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\202108\\MODEL_000000_000000_BIGDATA_COMMBUILDTYPE_GJ_ALL_${curDate}_0001.dat"
|
||||
dataCodeFileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\202108\\MODEL_000000_000000_BIGDATA_COMMBUILDTYPE_GJ_ALL_${curDate}_0001.ok"
|
||||
if (CommonDatautils.isWindow()) {
|
||||
fileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\${curDate}\\MODEL_000000_000000_BIGDATA_COMMBUILDTYPE_GJ_ALL_${curDate}_0001.dat"
|
||||
}
|
||||
def headers = []//["城市ID","小区ID"," 建筑类型","备注","创建时间","更新时间","来源公司","数据时间"]
|
||||
|
||||
FileUtils.batchCreateFile(allRows, fileName, headers, "utf-8", false);
|
||||
FileUtils.batchCreateFile([], dataCodeFileName, [], "utf-8", false);
|
||||
println "BIGDATA_COMMBUILDTYPE_GJ 数据文件输出完成......"
|
||||
CcbFtpUtils.ftpUpload(fileName, "202108")
|
||||
CcbFtpUtils.ftpUpload(dataCodeFileName, "202108")
|
||||
CcbFtpUtils.ftpUpload(fileName, curDate)
|
||||
println "BIGDATA_COMMBUILDTYPE_GJ 上传Ftp完成......"
|
||||
}
|
||||
|
||||
def exportBigdataDistrictData(){
|
||||
def exportBigdataDistrictData() {
|
||||
|
||||
def sql = "select DISTID, DISTNAME, DISTSPELL, CITYID, DISTCODE, SEQ, DISTTYPE, REMARK, to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME ,SOURCECODE, LJXZQH, LJXZQHDM, XZQHDM, WORKDATE from bigdata_district_gj where cityId in (350200,150100)";
|
||||
def sql = "select DISTID, DISTNAME, DISTSPELL, CITYID, DISTCODE, SEQ, DISTTYPE, REMARK, to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME ,SOURCECODE, LJXZQH, LJXZQHDM, XZQHDM, WORKDATE from bigdata_district_gj";
|
||||
def allRows = []
|
||||
sqlInstance.eachRow(sql,{r->
|
||||
sqlInstance.eachRow(sql, { r ->
|
||||
def data = []
|
||||
data << r.DISTID
|
||||
data << r.DISTNAME
|
||||
@@ -200,28 +186,25 @@ class ExportOracleData {
|
||||
data << r.WORKDATE
|
||||
allRows << data
|
||||
});
|
||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMMdd")
|
||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM") + "28";
|
||||
def fileName = "/ccb/MODEL_000000_000000_BIGDATA_DISTRICT_GJ_ALL_${curDate}_0001.dat"
|
||||
def dataCodeFileName = "/ccb/MODEL_000000_000000_BIGDATA_DISTRICT_GJ_ALL_${curDate}_0001.ok"
|
||||
if(CommonDatautils.isWindow()){
|
||||
fileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\202108\\MODEL_000000_000000_BIGDATA_DISTRICT_GJ_ALL_${curDate}_0001.dat"
|
||||
dataCodeFileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\202108\\MODEL_000000_000000_BIGDATA_DISTRICT_GJ_ALL_${curDate}_0001.ok"
|
||||
if (CommonDatautils.isWindow()) {
|
||||
fileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\${curDate}\\MODEL_000000_000000_BIGDATA_DISTRICT_GJ_ALL_${curDate}_0001.dat"
|
||||
}
|
||||
def headers = []//["行政区ID","行政区名称","行政区名称拼音","城市ID","国标码","显示顺序","行政区类别","备注","创建时间","更新时间","来源公司","逻辑行政区","逻辑行政区划代码","行政区划代码","数据时间"]
|
||||
def headers = []
|
||||
//["行政区ID","行政区名称","行政区名称拼音","城市ID","国标码","显示顺序","行政区类别","备注","创建时间","更新时间","来源公司","逻辑行政区","逻辑行政区划代码","行政区划代码","数据时间"]
|
||||
|
||||
FileUtils.batchCreateFile(allRows, fileName, headers, "utf-8", false);
|
||||
FileUtils.batchCreateFile([], dataCodeFileName, [], "utf-8", false);
|
||||
println "BIGDATA_DISTRICT_GJ 数据文件输出完成......"
|
||||
CcbFtpUtils.ftpUpload(fileName, "202108")
|
||||
CcbFtpUtils.ftpUpload(dataCodeFileName, "202108")
|
||||
CcbFtpUtils.ftpUpload(fileName, curDate)
|
||||
println "BIGDATA_DISTRICT_GJ 上传Ftp完成......"
|
||||
}
|
||||
|
||||
|
||||
def exportGuidedPrice(){
|
||||
def sql = "select ID, COMMID, COMMNAME, CITYID, CITYNAME, DISTID, DISTNAME, to_char(DEALDATE,'yyyy-mm-dd') as DEALDATE,AVG_PRICE, GUIDING_PERSON, REMARK, to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME ,SOURCECODE from guided_price_gj where dealdate>=TO_DATE('2021-08-01', 'yyyy-MM-dd') and dealdate<TO_DATE('2021-09-01', 'yyyy-MM-dd') and cityname='上海'";
|
||||
def exportGuidedPrice() {
|
||||
def sql = "select ID, COMMID, COMMNAME, CITYID, CITYNAME, DISTID, DISTNAME, to_char(DEALDATE,'yyyy-mm-dd') as DEALDATE,AVG_PRICE, GUIDING_PERSON, REMARK, to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME ,SOURCECODE from guided_price_gj ";
|
||||
def allRows = []
|
||||
sqlInstance.eachRow(sql,{r->
|
||||
sqlInstance.eachRow(sql, { r ->
|
||||
def data = []
|
||||
data << r.ID
|
||||
data << r.COMMID
|
||||
@@ -239,26 +222,23 @@ class ExportOracleData {
|
||||
data << r.SOURCECODE
|
||||
allRows << data
|
||||
});
|
||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMMdd")
|
||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM") + "28";
|
||||
def fileName = "/ccb/MODEL_000000_000000_GUIDED_PRICE_GJ_ADD_${curDate}_0001.dat"
|
||||
def dataCodeFileName = "/ccb/MODEL_000000_000000_GUIDED_PRICE_GJ_ADD_${curDate}_0001.ok"
|
||||
if(CommonDatautils.isWindow()){
|
||||
fileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\202108\\MODEL_000000_000000_GUIDED_PRICE_GJ_ADD_${curDate}_0001.dat"
|
||||
dataCodeFileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\202108\\MODEL_000000_000000_GUIDED_PRICE_GJ_ADD_${curDate}_0001.ok"
|
||||
if (CommonDatautils.isWindow()) {
|
||||
fileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\${curDate}\\MODEL_000000_000000_GUIDED_PRICE_GJ_ADD_${curDate}_0001.dat"
|
||||
}
|
||||
def headers = []//["第三方均价ID","楼盘ID","小区名称","城市ID","城市名称","行政区ID","行政区名称","指导日期","指导价格","添加人","备注","创建时间","更新时间","来源公司"]
|
||||
def headers = []
|
||||
//["第三方均价ID","楼盘ID","小区名称","城市ID","城市名称","行政区ID","行政区名称","指导日期","指导价格","添加人","备注","创建时间","更新时间","来源公司"]
|
||||
FileUtils.batchCreateFile(allRows, fileName, headers, "utf-8", false);
|
||||
FileUtils.batchCreateFile([], dataCodeFileName, [], "utf-8", false);
|
||||
println "GUIDED_PRICE_GJ 数据文件输出完成......"
|
||||
CcbFtpUtils.ftpUpload(fileName, "202108")
|
||||
CcbFtpUtils.ftpUpload(dataCodeFileName, "202108")
|
||||
CcbFtpUtils.ftpUpload(fileName, curDate)
|
||||
println "GUIDED_PRICE_GJ 上传Ftp完成......"
|
||||
}
|
||||
|
||||
def exportCommunityGuidedPrice(){
|
||||
def sql = "select ID, COMMID, COMMNAME, CITYID, CITYNAME, DISTID, DISTNAME, AVGPRICE, SOURCETYPE, REMARK, to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME , SOURCECODE from community_guide_price_gj where cityname='西安'";
|
||||
def exportCommunityGuidedPrice() {
|
||||
def sql = "select ID, COMMID, COMMNAME, CITYID, CITYNAME, DISTID, DISTNAME, AVGPRICE, SOURCETYPE, REMARK, to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME , SOURCECODE from community_guide_price_gj";
|
||||
def allRows = []
|
||||
sqlInstance.eachRow(sql,{r->
|
||||
sqlInstance.eachRow(sql, { r ->
|
||||
def data = []
|
||||
data << r.ID
|
||||
data << r.COMMID
|
||||
@@ -275,31 +255,27 @@ class ExportOracleData {
|
||||
data << r.SOURCECODE
|
||||
allRows << data
|
||||
});
|
||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMMdd")
|
||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM") + "28";
|
||||
def fileName = "/ccb/MODEL_000000_000000_COMMUNITY_GUIDE_PRICE_GJ_ADD_${curDate}_0001.dat"
|
||||
def dataCodeFileName = "/ccb/MODEL_000000_000000_COMMUNITY_GUIDE_PRICE_GJ_ADD_${curDate}_0001.ok"
|
||||
if(CommonDatautils.isWindow()){
|
||||
fileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\202107\\MODEL_000000_000000_COMMUNITY_GUIDE_PRICE_GJ_ADD_${curDate}_0001.dat"
|
||||
dataCodeFileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\202107\\MODEL_000000_000000_COMMUNITY_GUIDE_PRICE_GJ_ADD_${curDate}_0001.ok"
|
||||
if (CommonDatautils.isWindow()) {
|
||||
fileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\${curDate}\\MODEL_000000_000000_COMMUNITY_GUIDE_PRICE_GJ_ADD_${curDate}_0001.dat"
|
||||
}
|
||||
def headers = []//["第三方均价ID","楼盘ID","小区名称","城市ID","城市名称","行政区ID","行政区名称","指导价格","类型","备注","创建时间","更新时间","来源公司"]
|
||||
|
||||
FileUtils.batchCreateFile(allRows, fileName, headers, "utf-8", false);
|
||||
FileUtils.batchCreateFile([], dataCodeFileName, [], "utf-8", false);
|
||||
println "COMMUNITY_GUIDE_PRICE_GJ 数据文件输出完成......"
|
||||
CcbFtpUtils.ftpUpload(fileName, "202107")
|
||||
CcbFtpUtils.ftpUpload(dataCodeFileName, "202107")
|
||||
CcbFtpUtils.ftpUpload(fileName, curDate)
|
||||
println "COMMUNITY_GUIDE_PRICE_GJ 上传Ftp完成......"
|
||||
}
|
||||
|
||||
def exportBigdataDeal(){
|
||||
def exportBigdataDeal() {
|
||||
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 cityId in (350200,150100) and dealdate>=to_date('2021-08-01','yyyy-mm-dd')";
|
||||
"from bigdata_deal_gj";
|
||||
def allRows = []
|
||||
sqlInstance.eachRow(sql,{r->
|
||||
sqlInstance.eachRow(sql, { r ->
|
||||
def data = []
|
||||
data << r.CITYID
|
||||
data << r.DEALID
|
||||
@@ -368,30 +344,27 @@ class ExportOracleData {
|
||||
data << r.WORKDATE
|
||||
allRows << data
|
||||
});
|
||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMMdd")
|
||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM") + "28";
|
||||
def fileName = "/ccb/MODEL_000000_000000_BIGDATA_DEAL_GJ_ADD_${curDate}_0001.dat"
|
||||
def dataCodeFileName = "/ccb/MODEL_000000_000000_BIGDATA_DEAL_GJ_ADD_${curDate}_0001.ok"
|
||||
if(CommonDatautils.isWindow()){
|
||||
fileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\202108\\MODEL_000000_000000_BIGDATA_DEAL_GJ_ADD_${curDate}_0001.dat"
|
||||
dataCodeFileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\202108\\MODEL_000000_000000_BIGDATA_DEAL_GJ_ADD_${curDate}_0001.ok"
|
||||
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","中介公司名称","备注","创建时间","更新时间","来源公司","成交金额","数据时间"]
|
||||
def headers = []
|
||||
//["城市ID","成交ID","城市名称","行政区ID","行政区名称","街道","门牌号","小区ID","小区名称","楼栋ID","楼栋编号","楼栋名称","单元ID","单元编号","单元名称","户ID","详细地址","建筑年代","权属","权属年限","期数","所在楼层","层类型","总楼层数","建筑类型","建筑结构","建筑面积","套内面积","户型","室","厅","厨","卫","房屋用途","室内结构","朝向","装修情况","评估编号","成交单价","成交总价","申报总价","评估总价","网签合同编号","交易日期","交易类型","出售付款方式","成交周期","是否有电梯","赠送面积(地面花园)","赠送面积(露台)","赠送面积(阳台)","赠送面积(飘窗)","赠送面积(阁楼)","赠送面积(车库)","赠送面积(地下室)","赠送面积(其他)","房源数据来源","中介公司ID","中介公司名称","备注","创建时间","更新时间","来源公司","成交金额","数据时间"]
|
||||
|
||||
FileUtils.batchCreateFile(allRows, fileName, headers, "utf-8", false);
|
||||
FileUtils.batchCreateFile([], dataCodeFileName, [], "utf-8", false);
|
||||
println "BIGDATA_DEAL_GJ 数据文件输出完成......"
|
||||
CcbFtpUtils.ftpUpload(fileName, "202108")
|
||||
CcbFtpUtils.ftpUpload(dataCodeFileName, "202108")
|
||||
CcbFtpUtils.ftpUpload(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" +
|
||||
"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" +
|
||||
"from third_party_price_gj";
|
||||
def allRows = []
|
||||
sqlInstance.eachRow(sql,{r->
|
||||
sqlInstance.eachRow(sql, { r ->
|
||||
def data = []
|
||||
data << r.ID
|
||||
data << r.COMMID
|
||||
@@ -417,26 +390,56 @@ class ExportOracleData {
|
||||
data << r.WIWJ_AVG_PRICE
|
||||
data << r.CREATETIME
|
||||
data << r.UPDATETIME
|
||||
data << r.SOURCECODE
|
||||
data << r.SOURCECODE.replaceAll(~'\\r', '')
|
||||
allRows << data
|
||||
});
|
||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMMdd")
|
||||
})
|
||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM") + "28";
|
||||
def fileName = "/ccb/MODEL_000000_000000_THIRD_PARTY_PRICE_GJ_ADD_${curDate}_0001.dat"
|
||||
def dataCodeFileName = "/ccb/MODEL_000000_000000_THIRD_PARTY_PRICE_GJ_ADD_${curDate}_0001.ok"
|
||||
if(CommonDatautils.isWindow()){
|
||||
fileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\202107\\MODEL_000000_000000_THIRD_PARTY_PRICE_GJ_ADD_${curDate}_0001.dat"
|
||||
dataCodeFileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\202107\\MODEL_000000_000000_THIRD_PARTY_PRICE_GJ_ADD_${curDate}_0001.ok"
|
||||
if (CommonDatautils.isWindow()) {
|
||||
fileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\${curDate}\\MODEL_000000_000000_THIRD_PARTY_PRICE_GJ_ADD_${curDate}_0001.dat"
|
||||
}
|
||||
def headers = []//["第三方均价ID","楼盘ID","小区名称","城市ID","城市名称","行政区ID","行政区名称","均价对应的月份","诸葛找房均价","安居客均价","房天下均价","链家均价","城市房产均价","麦田均价","贝壳均价","淘房365","中原均价","兔博士均价","Q房均价","房探均价","房多多均价","我爱我家均价","创建时间","更新时间","来源公司"]
|
||||
def headers = []
|
||||
//["第三方均价ID","楼盘ID","小区名称","城市ID","城市名称","行政区ID","行政区名称","均价对应的月份","诸葛找房均价","安居客均价","房天下均价","链家均价","城市房产均价","麦田均价","贝壳均价","淘房365","中原均价","兔博士均价","Q房均价","房探均价","房多多均价","我爱我家均价","创建时间","更新时间","来源公司"]
|
||||
|
||||
FileUtils.batchCreateFile(allRows, fileName, headers, "utf-8", false);
|
||||
FileUtils.batchCreateFile([], dataCodeFileName, [], "utf-8", false);
|
||||
println "THIRD_PARTY_PRICE_GJ 数据文件输出完成......"
|
||||
// CcbFtpUtils.ftpUpload(fileName, "202107")
|
||||
// CcbFtpUtils.ftpUpload(dataCodeFileName, "202107")
|
||||
// println "THIRD_PARTY_PRICE_GJ 上传Ftp完成......"
|
||||
//CcbFtpUtils.ftpUpload(fileName, curDate)
|
||||
}
|
||||
|
||||
|
||||
def exportThirdPartyPrice2() {
|
||||
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 third_party_price";
|
||||
def allRows = []
|
||||
sqlInstance.eachRow(sql, { r ->
|
||||
def data = []
|
||||
data << r.ID
|
||||
data << r.CITYID
|
||||
data << r.DISTID
|
||||
data << r.COMMID
|
||||
data << r.COMMNAME
|
||||
data << r.DATA_SOURCE_ID
|
||||
data << r.DATA_SOURCE
|
||||
data << r.PRICE_DATE
|
||||
data << r.COMMUNITY_PRICE
|
||||
data << r.COMMUNITY_MAX_PRICE
|
||||
data << r.COMMUNITY_MIN_PRICE
|
||||
data << r.UPDATETIME
|
||||
allRows << data
|
||||
})
|
||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM") + "28";
|
||||
def fileName = "/ccb/MODEL_000000_000000_THIRD_PARTY_PRICE_GJ_ADD_${curDate}_0001.dat"
|
||||
if (CommonDatautils.isWindow()) {
|
||||
fileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\${curDate}\\MODEL_000000_000000_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 "THIRD_PARTY_PRICE_GJ 数据文件输出完成......"
|
||||
//CcbFtpUtils.ftpUpload(fileName, curDate)
|
||||
}
|
||||
|
||||
|
||||
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" +
|
||||
"\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)
|
||||
@@ -477,102 +480,110 @@ class ExportOracleData {
|
||||
data << r.STATUS
|
||||
allRows << data
|
||||
});
|
||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMMdd")
|
||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM")+"28";
|
||||
def fileName = "/ccb/MODEL_000000_000000_BIGDATA_COMMUNITY_GJ.dat"
|
||||
def dataCodeFileName = "/ccb/MODEL_000000_000000_BIGDATA_COMMUNITY_GJ.ok"
|
||||
if(CommonDatautils.isWindow()){
|
||||
fileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\202109\\MODEL_000000_000000_BIGDATA_COMMUNITY_GJ_ALL_${curDate}_0001.dat"
|
||||
dataCodeFileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\202109\\MODEL_000000_000000_BIGDATA_COMMUNITY_GJ_ALL_${curDate}_0001.ok"
|
||||
fileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\${curDate}\\MODEL_000000_000000_BIGDATA_COMMUNITY_GJ_ALL_${curDate}_0001.dat"
|
||||
}
|
||||
def headers = []//["城市ID","行政区ID","小区ID","行政区名称","小区名称","详细地址","纬度","经度","占地总面积","建筑总面积","绿化率","容积率","车位数量","建筑年代","房屋用途",
|
||||
//"总套数","数据时间","更新标记","更新时间","小区类型","小区曾用名","街道","门牌号","是否新盘","小区介绍","备注","创建时间","来源公司",
|
||||
//"乡镇/街道办","逻辑行政区划代码","逻辑行政区划","状态"]
|
||||
FileUtils.batchCreateFile(allRows, fileName, headers, "utf-8", false);
|
||||
FileUtils.batchCreateFile([], dataCodeFileName, [], "utf-8", false);
|
||||
println "BIGDATA_COMMUNITY_GJ 数据文件输出完成......"
|
||||
// CcbFtpUtils.ftpUpload(fileName, "202109")
|
||||
// CcbFtpUtils.ftpUpload(dataCodeFileName, "202109")
|
||||
// println "BIGDATA_COMMUNITY_GJ 上传Ftp完成......"
|
||||
CcbFtpUtils.ftpUpload(fileName, curDate)
|
||||
println "BIGDATA_COMMUNITY_GJ 上传Ftp完成......"
|
||||
}
|
||||
|
||||
def exportBigdataForsale(){
|
||||
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 PUBLISHTIME>=to_date('2021-09-01','yyyy-mm-dd')";//(cityId=350200 or cityId=150100) and
|
||||
def allRows = []
|
||||
def index = 0
|
||||
sqlInstance.eachRow(sql,{r->
|
||||
index = index+1
|
||||
println 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
|
||||
});
|
||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMMdd")
|
||||
def fileName = "/home/goojia/ccb/MODEL_000000_000000_BIGDATA_FORSALE_GJ_ADD_${curDate}_0001.dat"
|
||||
def dataCodeFileName = "/home/goojia/ccb/MODEL_000000_000000_BIGDATA_FORSALE_GJ_ADD_${curDate}_0001.ok"
|
||||
//["北京","上海"]
|
||||
def citys = ["重庆","天津","成都","沈阳","大连","深圳","杭州","合肥","无锡","武汉","广州"]//CcbCommonUtils.citys;
|
||||
def cityCodeDataMap = CcbCommonUtils.findCityCodeValue()
|
||||
|
||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM")+"28";
|
||||
def fileName = "/home/goojia/ccb/MODEL_000000_000000_BIGDATA_FORSALE_GJ_ADD_${curDate}_0002.dat"
|
||||
if(CommonDatautils.isWindow()){
|
||||
fileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\202109\\MODEL_000000_000000_BIGDATA_FORSALE_GJ_ADD_${curDate}_0001.dat"
|
||||
dataCodeFileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\202109\\MODEL_000000_000000_BIGDATA_FORSALE_GJ_ADD_${curDate}_0001.ok"
|
||||
fileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\${curDate}\\MODEL_000000_000000_BIGDATA_FORSALE_GJ_ADD_${curDate}_0002.dat"
|
||||
}
|
||||
def headers = []//["城市ID","出售ID","挂牌房屋ID","城市名称","行政区ID","行政区名称","小区ID","小区名称","楼栋ID","楼栋编号","楼栋名称","单元ID","单元编号","单元名称","户ID","详细地址","建筑年代","权属","权属年限","单价","总价","出售付款方式","所在楼层","总楼层","建筑类型","室内结构","建筑结构","建筑面积","套内面积","户型","室","厅","厨","卫","朝向","装修情况","是否有电梯","几梯几户","发布时间","到期时间","是否首发","房源数据来源","中介公司ID","中介公司名称","发布人","发布人电话","描述信息","备注","创建时间","更新时间","来源公司","附加信息"]
|
||||
FileUtils.batchCreateFile(allRows, fileName, headers, "utf-8", false);
|
||||
FileUtils.batchCreateFile([], dataCodeFileName, [], "utf-8", false);
|
||||
for(def city : citys){
|
||||
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}'";
|
||||
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){
|
||||
FileUtils.batchCreateFile(allRows, fileName, headers, "utf-8", true);
|
||||
allRows.clear()
|
||||
}
|
||||
});
|
||||
if(allRows.size()>0){
|
||||
FileUtils.batchCreateFile(allRows, fileName, headers, "utf-8", true);
|
||||
}
|
||||
|
||||
}
|
||||
println "BIGDATA_FORSALE_GJ 数据文件输出完成......"
|
||||
// CcbFtpUtils.ftpUpload(fileName, "202107")
|
||||
// CcbFtpUtils.ftpUpload(dataCodeFileName, "202107")
|
||||
// println "BIGDATA_FORSALE_GJ 上传Ftp完成......"
|
||||
CcbFtpUtils.ftpUpload(fileName, curDate)
|
||||
println "BIGDATA_FORSALE_GJ 上传Ftp完成......"
|
||||
}
|
||||
|
||||
|
||||
@@ -580,7 +591,7 @@ class ExportOracleData {
|
||||
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" +
|
||||
"ANN_CALC_NUM, ANN_CALC_COVERAGE, TEST_NUM, TEST_COMM_NUM, TEST_COMM_COVERAGE, PPE15_COVERAGE, RATE_MEDIAN, COEFFICIENT,DEAL_TEST_CASE_NUM, DEAL_TEST_COMM_NUM, DEAL_TEST_COMM_COVERAGE, DEAL_PPE15_COVERAGE, \n" +
|
||||
"DEAL_COEFFICIENT, DEAL_RATE_MEDIAN, THIRD_TEST_CASE_NUM, THIRD_TEST_COMM_NUM, THIRD_TEST_COMM_COVERAGE, THIRD_PPE15_COVERAGE, THIRD_COEFFICIENT, THIRD_RATE_MEDIAN, \n" +
|
||||
"to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME, SOURCECODE from avm_evaluation_gj where (cityId=350200 or cityId=150100) and year_month<202108 ";
|
||||
"to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME, SOURCECODE from avm_evaluation_gj where YEAR_MONTH >= 202106";
|
||||
def allRows = []
|
||||
sqlInstance.eachRow(sql,{r->
|
||||
def data = []
|
||||
@@ -621,28 +632,24 @@ class ExportOracleData {
|
||||
allRows << data
|
||||
});
|
||||
|
||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMMdd")
|
||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM")+"28";
|
||||
def fileName = "/ccb/MODEL_000000_000000_AVM_EVALUATION_GJNB_ADD_${curDate}_0001.dat"
|
||||
def dataCodeFileName = "/ccb/MODEL_000000_000000_AVM_EVALUATION_GJNB_ADD_${curDate}_0001.ok"
|
||||
if(CommonDatautils.isWindow()){
|
||||
fileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\202107\\MODEL_000000_000000_AVM_EVALUATION_GJNB_ADD_${curDate}_0001.dat"
|
||||
dataCodeFileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\202107\\MODEL_000000_000000_AVM_EVALUATION_GJNB_ADD_${curDate}_0001.ok"
|
||||
fileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\${curDate}\\MODEL_000000_000000_AVM_EVALUATION_GJNB_ADD_${curDate}_0001.dat"
|
||||
}
|
||||
def headers = []//["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",
|
||||
//"ANN_CALC_NUM","ANN_CALC_COVERAGE","TEST_NUM","TEST_COMM_NUM","TEST_COMM_COVERAGE","PPE15_COVERAGE","RATE_MEDIAN","COEFFICIENT","DEAL_TEST_CASE_NUM","DEAL_TEST_COMM_NUM","DEAL_TEST_COMM_COVERAGE","DEAL_PPE15_COVERAGE",
|
||||
//"DEAL_COEFFICIENT","DEAL_RATE_MEDIAN","THIRD_TEST_CASE_NUM","THIRD_TEST_COMM_NUM","THIRD_TEST_COMM_COVERAGE","THIRD_PPE15_COVERAGE","THIRD_COEFFICIENT","THIRD_RATE_MEDIAN","CREATETIME","UPDATETIME","SOURCECODE"]
|
||||
FileUtils.batchCreateFile(allRows, fileName, headers, "utf-8", false);
|
||||
FileUtils.batchCreateFile([], dataCodeFileName, [], "utf-8", false);
|
||||
println "AVM_EVALUATION_GJNB 数据文件输出完成......"
|
||||
CcbFtpUtils.ftpUpload(fileName, "202107")
|
||||
CcbFtpUtils.ftpUpload(dataCodeFileName, "202107")
|
||||
CcbFtpUtils.ftpUpload(fileName, curDate)
|
||||
println "AVM_EVALUATION_GJNB 上传Ftp完成......"
|
||||
}
|
||||
|
||||
def exportAVMEvaluationItemGJNB(){
|
||||
def sql = "select ID, CITYID, CITYNAME, DISTID, DISTNAME, COMMID, COMMNAME, YEAR_MONTH, CALC_AVG_PRICE, AVG_PRICE, CALC_TYPE, CONFIDENCE,TARGET_AVG_PRICE, \n" +
|
||||
"to_char(DEALDATE,'yyyy-mm-dd hh24:mi:ss') as DEALDATE, UNIT_PRICE, BUILDAREA, FITMENT, HOUSEASPECT, FLOORNUM, FLOORCNT, DATA_TYPE, RATE, PE, \n" +
|
||||
"to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME from avm_evaluation_item_gj where (cityId=350200 or cityId=150100) and year_month>=202108";
|
||||
"to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME from avm_evaluation_item_gj where YEAR_MONTH >= 202106";
|
||||
def allRows = []
|
||||
sqlInstance.eachRow(sql,{r->
|
||||
def data = []
|
||||
@@ -673,24 +680,20 @@ class ExportOracleData {
|
||||
allRows << data
|
||||
});
|
||||
|
||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMMdd")
|
||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM")+"28";
|
||||
def fileName = "/ccb/MODEL_000000_000000_AVM_EVALUATION_ITEM_GJNB_ADD_${curDate}_0001.dat"
|
||||
def dataCodeFileName = "/ccb/MODEL_000000_000000_AVM_EVALUATION_ITEM_GJNB_ADD_${curDate}_0001.ok"
|
||||
if(CommonDatautils.isWindow()){
|
||||
fileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\202108\\MODEL_000000_000000_AVM_EVALUATION_ITEM_GJNB_ADD_${curDate}_0001.dat"
|
||||
dataCodeFileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\202108\\MODEL_000000_000000_AVM_EVALUATION_ITEM_GJNB_ADD_${curDate}_0001.ok"
|
||||
fileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\${curDate}\\MODEL_000000_000000_AVM_EVALUATION_ITEM_GJNB_ADD_${curDate}_0001.dat"
|
||||
}
|
||||
def headers = []//["ID","CITYID","CITYNAME","DISTID","DISTNAME","COMMID","COMMNAME","YEAR_MONTH","CALC_AVG_PRICE","AVG_PRICE","CALC_TYPE","CONFIDENCE","TARGET_AVG_PRICE","DEALDATE","UNIT_PRICE","BUILDAREA","FITMENT","HOUSEASPECT","FLOORNUM","FLOORCNT","DATA_TYPE","RATE","PE","CREATETIME"]
|
||||
FileUtils.batchCreateFile(allRows, fileName, headers, "utf-8", false);
|
||||
FileUtils.batchCreateFile([], dataCodeFileName, [], "utf-8", false);
|
||||
println "AVM_EVALUATION_ITEM_GJNB 数据文件输出完成......"
|
||||
CcbFtpUtils.ftpUpload(fileName, "202108")
|
||||
CcbFtpUtils.ftpUpload(dataCodeFileName, "202108")
|
||||
CcbFtpUtils.ftpUpload(fileName, curDate)
|
||||
println "AVM_EVALUATION_ITEM_GJNB 上传Ftp完成......"
|
||||
}
|
||||
|
||||
def exportCommunityBasePrice(){
|
||||
def sql = "select ID, CITYID, CITYNAME, DISTID, DISTNAME, COMMID, COMMNAME, YEAR_MONTH, CALC_AVG_PRICE, AVG_PRICE, CALC_TYPE, FAKE_RATE, DIFF_RATE, CONFI_RATE, CORR_RATE, CONFIDENCE, to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME,SOURCECODE from community_base_price_gj where (cityId=350200 or cityId=150100) and year_month<202108";
|
||||
def sql = "select ID, CITYID, CITYNAME, DISTID, DISTNAME, COMMID, COMMNAME, YEAR_MONTH, CALC_AVG_PRICE, AVG_PRICE, CALC_TYPE, FAKE_RATE, DIFF_RATE, CONFI_RATE, CORR_RATE, CONFIDENCE, to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME,SOURCECODE from community_base_price_gj";
|
||||
def allRows = []
|
||||
sqlInstance.eachRow(sql,{r->
|
||||
def data = []
|
||||
@@ -716,19 +719,15 @@ class ExportOracleData {
|
||||
allRows << data
|
||||
});
|
||||
|
||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMMdd")
|
||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM")+"28";
|
||||
def fileName = "/ccb/MODEL_000000_000000_COMMUNITY_BASE_PRICE_GJNB_ADD_${curDate}_0001.dat"
|
||||
def dataCodeFileName = "/ccb/MODEL_000000_000000_COMMUNITY_BASE_PRICE_GJNB_ADD_${curDate}_0001.ok"
|
||||
if(CommonDatautils.isWindow()){
|
||||
fileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\202107\\MODEL_000000_000000_COMMUNITY_BASE_PRICE_GJNB_ADD_${curDate}_0001.dat"
|
||||
dataCodeFileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\202107\\MODEL_000000_000000_COMMUNITY_BASE_PRICE_GJNB_ADD_${curDate}_0001.ok"
|
||||
fileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\${curDate}\\MODEL_000000_000000_COMMUNITY_BASE_PRICE_GJNB_ADD_${curDate}_0001.dat"
|
||||
}
|
||||
def headers = []//["ID","CITYID","CITYNAME","DISTID","DISTNAME","COMMID","COMMNAME","YEAR_MONTH","CALC_AVG_PRICE","AVG_PRICE","CALC_TYPE","FAKE_RATE","DIFF_RATE","CONFI_RATE","CORR_RATE","CONFIDENCE","CREATETIME","UPDATETIME","SOURCECODE"]
|
||||
FileUtils.batchCreateFile(allRows, fileName, headers, "utf-8", false);
|
||||
FileUtils.batchCreateFile([], dataCodeFileName, [], "utf-8", false);
|
||||
println "COMMUNITY_BASE_PRICE_GJNB 数据文件输出完成......"
|
||||
CcbFtpUtils.ftpUpload(fileName, "202107")
|
||||
CcbFtpUtils.ftpUpload(dataCodeFileName, "202107")
|
||||
CcbFtpUtils.ftpUpload(fileName, curDate)
|
||||
println "COMMUNITY_BASE_PRICE_GJNB 上传Ftp完成......"
|
||||
}
|
||||
|
||||
@@ -737,7 +736,7 @@ class ExportOracleData {
|
||||
}
|
||||
|
||||
def exportCityPrice(){
|
||||
def sql = "select ID, CITYID, CITYNAME, YEAR_MONTH, CALC_AVG_PRICE, PRICE, to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME, SOURCECODE from city_price_gj where (cityId=350200 or cityId=150100) and year_month>=202108";
|
||||
def sql = "select ID, CITYID, CITYNAME, YEAR_MONTH, CALC_AVG_PRICE, PRICE, to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME, SOURCECODE from city_price_gj";
|
||||
def allRows = []
|
||||
sqlInstance.eachRow(sql,{r->
|
||||
def data = []
|
||||
@@ -753,24 +752,20 @@ class ExportOracleData {
|
||||
allRows << data
|
||||
});
|
||||
|
||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMMdd")
|
||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM")+"28"
|
||||
def fileName = "/ccb/MODEL_000000_000000_CITY_PRICE_GJ_ADD_${curDate}_0001.dat"
|
||||
def dataCodeFileName = "/ccb/MODEL_000000_000000_COMMUNITY_CITY_PRICE_GJ_ADD_${curDate}_0001.ok"
|
||||
if(CommonDatautils.isWindow()){
|
||||
fileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\202108\\MODEL_000000_000000_CITY_PRICE_GJ_ADD_${curDate}_0001.dat"
|
||||
dataCodeFileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\202108\\MODEL_000000_000000_CITY_PRICE_GJ_ADD_${curDate}_0001.ok"
|
||||
fileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\${curDate}\\MODEL_000000_000000_CITY_PRICE_GJ_ADD_${curDate}_0001.dat"
|
||||
}
|
||||
def headers = []//["ID","CITYID","CITYNAME","DISTID","DISTNAME","COMMID","COMMNAME","YEAR_MONTH","CALC_AVG_PRICE","AVG_PRICE","CALC_TYPE","FAKE_RATE","DIFF_RATE","CONFI_RATE","CORR_RATE","CONFIDENCE","CREATETIME","UPDATETIME","SOURCECODE"]
|
||||
FileUtils.batchCreateFile(allRows, fileName, headers, "utf-8", false);
|
||||
FileUtils.batchCreateFile([], dataCodeFileName, [], "utf-8", false);
|
||||
println "CITY_PRICE_GJ 数据文件输出完成......"
|
||||
CcbFtpUtils.ftpUpload(fileName, "202108")
|
||||
CcbFtpUtils.ftpUpload(dataCodeFileName, "202108")
|
||||
CcbFtpUtils.ftpUpload(fileName, curDate)
|
||||
println "CITY_PRICE_GJ 上传Ftp完成......"
|
||||
}
|
||||
|
||||
def exportRegionPrice(){
|
||||
def sql = "select ID, CITYID, CITYNAME, DISTID, DISTNAME, YEAR_MONTH, CALC_AVG_PRICE, PRICE, to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME, SOURCECODE from DISTRICT_PRICE_GJ where (cityId=350200 or cityId=150100) and year_month>=202108";
|
||||
def sql = "select ID, CITYID, CITYNAME, DISTID, DISTNAME, YEAR_MONTH, CALC_AVG_PRICE, PRICE, to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME, SOURCECODE from DISTRICT_PRICE_GJ";
|
||||
def allRows = []
|
||||
sqlInstance.eachRow(sql,{r->
|
||||
def data = []
|
||||
@@ -788,31 +783,25 @@ class ExportOracleData {
|
||||
allRows << data
|
||||
});
|
||||
|
||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMMdd")
|
||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM")+"28"
|
||||
def fileName = "/ccb/MODEL_000000_000000_DISTRICT_PRICE_GJ_ADD_${curDate}_0001.dat"
|
||||
def dataCodeFileName = "/ccb/MODEL_000000_000000_DISTRICT_PRICE_GJ_ADD_${curDate}_0001.ok"
|
||||
if(CommonDatautils.isWindow()){
|
||||
fileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\202108\\MODEL_000000_000000_DISTRICT_PRICE_GJ_ADD_${curDate}_0001.dat"
|
||||
dataCodeFileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\202108\\MODEL_000000_000000_DISTRICT_PRICE_GJ_ADD_${curDate}_0001.ok"
|
||||
fileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\${curDate}\\MODEL_000000_000000_DISTRICT_PRICE_GJ_ADD_${curDate}_0001.dat"
|
||||
}
|
||||
def headers = []//["ID","CITYID","CITYNAME","DISTID","DISTNAME","COMMID","COMMNAME","YEAR_MONTH","CALC_AVG_PRICE","AVG_PRICE","CALC_TYPE","FAKE_RATE","DIFF_RATE","CONFI_RATE","CORR_RATE","CONFIDENCE","CREATETIME","UPDATETIME","SOURCECODE"]
|
||||
FileUtils.batchCreateFile(allRows, fileName, headers, "utf-8", false);
|
||||
FileUtils.batchCreateFile([], dataCodeFileName, [], "utf-8", false);
|
||||
println "DISTRICT_PRICE_GJ 数据文件输出完成......"
|
||||
CcbFtpUtils.ftpUpload(fileName, "202108")
|
||||
CcbFtpUtils.ftpUpload(dataCodeFileName, "202108")
|
||||
CcbFtpUtils.ftpUpload(fileName, curDate)
|
||||
println "DISTRICT_PRICE_GJ 上传Ftp完成......"
|
||||
}
|
||||
|
||||
def exportLastFile(){
|
||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMMdd")
|
||||
|
||||
def curMonth = DateUtils.formatDateByPattern(new Date(), "yyyyMM")
|
||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM")+"28"
|
||||
def dataCodeFileName = "/ccb/${curDate}.ok"
|
||||
if(CommonDatautils.isWindow()){
|
||||
dataCodeFileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\${curMonth}\\${curDate}.ok"
|
||||
dataCodeFileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\${curDate}\\${curDate}.ok"
|
||||
}
|
||||
CcbFtpUtils.ftpUpload(dataCodeFileName, "${curMonth}")
|
||||
CcbFtpUtils.ftpUpload(dataCodeFileName, curDate)
|
||||
}
|
||||
|
||||
|
||||
|
||||
+3
-3
@@ -20,9 +20,9 @@ import java.util.concurrent.ConcurrentHashMap
|
||||
@BatchOwner(Watcher.GaoJuan)
|
||||
class ThirdPartyPriceBatch extends BaseBatch {
|
||||
|
||||
def sDate= 202108//Integer.parseInt(DateUtils.addMonth(DateUtils.formatDateByPattern(new Date(), "yyyyMM"), -1, "yyyyMM"));
|
||||
def startDate = 202106
|
||||
def endDate = 202108
|
||||
def sDate= 202109//Integer.parseInt(DateUtils.addMonth(DateUtils.formatDateByPattern(new Date(), "yyyyMM"), -1, "yyyyMM"));
|
||||
def startDate = 202107
|
||||
def endDate = 202109
|
||||
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")
|
||||
|
||||
+375
@@ -0,0 +1,375 @@
|
||||
package com.fangjia.script.ccbevaluation.ronghe
|
||||
|
||||
import com.fangjia.core.util.DataUtil
|
||||
import com.fangjia.core.util.GeoUtils
|
||||
import com.fangjia.script.BaseBatch
|
||||
import com.fangjia.script.BatchOwner
|
||||
import com.fangjia.script.Watcher
|
||||
import com.fangjia.script.ccbevaluation.CcbCommonUtils
|
||||
import com.fangjia.script.commData.CommonDatautils
|
||||
import com.fangjia.script.gj.ccb.CcbCodeUtils
|
||||
import com.fangjia.script.gj.ccb.FileUtils
|
||||
import com.fangjia.script.jusfoun.JusfounCommon
|
||||
import com.fangjia.script.util.DateUtils
|
||||
import com.fangjia.script.util.OpenApiClient
|
||||
import groovy.sql.Sql
|
||||
import org.bson.types.ObjectId
|
||||
|
||||
import java.util.concurrent.CopyOnWriteArrayList
|
||||
import java.util.concurrent.CountDownLatch
|
||||
import java.util.concurrent.ExecutorService
|
||||
import java.util.concurrent.Executors
|
||||
import java.util.concurrent.atomic.AtomicLong
|
||||
import java.util.regex.Pattern
|
||||
|
||||
|
||||
/**
|
||||
* 建行融合——小区表
|
||||
*/
|
||||
@BatchOwner(Watcher.GaoJuan)
|
||||
class BigdataCommunityGJRHBatch extends BaseBatch {
|
||||
|
||||
public static ExecutorService fixedThreadPool = Executors.newFixedThreadPool(80)
|
||||
|
||||
|
||||
def sqlInstance = Sql.newInstance("jdbc:oracle:thin:@192.168.0.100:31521:orcl",
|
||||
"GOOJIA", "GOOJIA", "oracle.jdbc.driver.OracleDriver")
|
||||
|
||||
public static def batchsize = 1000
|
||||
static main(args) {
|
||||
runBatch(new BigdataCommunityGJRHBatch(), args);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void process(Object args) {
|
||||
|
||||
//"厦门","北京","上海",
|
||||
def citys = ["广州","深圳","重庆","郑州","长沙","西安","成都","东莞","佛山","杭州","合肥","南京","青岛","沈阳","苏州","天津","武汉"]//CcbCommonUtils.citys;
|
||||
def rows = []
|
||||
|
||||
// addBigdataDistrictFJW()
|
||||
def cityCodeDataMap = CcbCommonUtils.findCityCodeValue()
|
||||
for (def city : citys) {
|
||||
def districts = CcbCommonUtils.findAllDistrictsByOracle(cityCodeDataMap.get(city))
|
||||
|
||||
def distMap = CommonDatautils.findAllDistricMaptByCity(city, "district", ["build_structure","estate_type2","finish_building_date","alias","build_type","estate_charge","estate_type2"])
|
||||
|
||||
for(def dist : districts){
|
||||
def obj = distMap.get(dist.commid)//CommonDatautils.findDistrictFieldById(dist.commid,["build_structure","estate_type2","finish_building_date","alias","build_type","estate_charge","estate_type2"])
|
||||
if(obj){
|
||||
if(obj.alias && obj.alias.size()>0){
|
||||
dist.commalias = obj.alias.get(0)
|
||||
}else{
|
||||
dist.commalias = ""
|
||||
}
|
||||
dist.buildstru = CcbCodeUtils.getBuildStructureCode(obj.build_structure)
|
||||
dist.housetype = CcbCodeUtils.getDistHouseTypeCode(obj.estate_type2)
|
||||
dist.buildyear = CcbCodeUtils.getBuildYear(obj.finish_building_date);
|
||||
dist.houseuse = "11"
|
||||
dist.buildtype = CcbCodeUtils.parseBuildType(dist.build_type)
|
||||
dist.compid = new ObjectId() //物业公司id
|
||||
dist.estatecharge = CcbCodeUtils.processEstateCharge(dist.city, obj.estate_charge, obj.estate_type2)
|
||||
}
|
||||
}
|
||||
println city +" 小区加载完成 "+districts.size()
|
||||
addBigdataCommunityGJRH(districts, cityCodeDataMap.get(city))
|
||||
println city +" 1.小区表完成"
|
||||
addBigdataCommbuildstruGJ(districts, cityCodeDataMap.get(city))
|
||||
println city +" 2.小区建筑结构表"
|
||||
addBigdataCommhousetypeGJ(districts, cityCodeDataMap.get(city))
|
||||
println city +" 3.小区房屋类型表"
|
||||
addBigdataCommbuildyearGj(districts, cityCodeDataMap.get(city))
|
||||
println city +" 4.小区建筑年代表"
|
||||
addBigdataCommfeeGj(districts, cityCodeDataMap.get(city))
|
||||
println city +" 6.小区费用表"
|
||||
addBigdataCommhouseuseGJ(districts, cityCodeDataMap.get(city))
|
||||
println city +" 7.小区房屋用途表"
|
||||
addBigdataPositionGJ(districts, cityCodeDataMap.get(city))
|
||||
println city + " 8.地理位置表"
|
||||
}
|
||||
}
|
||||
|
||||
def addBigdataCommunityGJRH(def districts, def cityid){
|
||||
|
||||
sqlInstance.executeUpdate("delete from BIGDATA_COMMUNITY_FJW where CITYID='${cityid}'")
|
||||
|
||||
sqlInstance.withBatch(batchsize) { stmt ->
|
||||
for(def d : districts){
|
||||
def sql = "INSERT INTO BIGDATA_COMMUNITY_FJW (CITYID,DISTID,COMMID,COMMNAME,ADDRESS,LANDAREA,BUILDAREA,GREENINGRATE,PLOTRATIO,PARKINGCNT,UPDATETIME,COMMTYPE,COMMALIAS,STREET,STREETNO,IFNEW,INTRODUCTION,REMARK,CREATETIME,SOURCECODE) VALUES ('${d.cityid}', '${d.distid}','${d.commid}','${d.commname}',${converValue(d.address)},${d.landarea},${d.buildarea},${d.greeningrate},${d.plotratio},${d.parkingcnt},"
|
||||
if(d.updatetime){
|
||||
sql = sql + "to_date('${d.updatetime}','yyyy-mm-dd hh24:mi:ss'),'${d.commtype}','${d.commalias}',"
|
||||
}else{
|
||||
sql = sql + "null,'${d.commtype}','${d.commalias}',"
|
||||
}
|
||||
if(d.street && d.street!='null'){
|
||||
sql = sql +"'${d.street}',"
|
||||
}else{
|
||||
sql = sql +"null,"
|
||||
}
|
||||
if(d.streetno && d.streetno!='null'){
|
||||
sql = sql + "'${d.streetno}',"
|
||||
}else{
|
||||
sql = sql +"null,"
|
||||
}
|
||||
|
||||
sql = sql + "'${d.ifnew}',null,${d.remark},"
|
||||
if(d.createtime){
|
||||
sql = sql + "to_date('${d.createtime}','yyyy-mm-dd hh24:mi:ss'),'${d.sourcecode}')"
|
||||
}else{
|
||||
sql = sql + "null,'${d.sourcecode}')"
|
||||
}
|
||||
|
||||
try{
|
||||
stmt.addBatch sql
|
||||
}catch(Exception e){
|
||||
println d
|
||||
println sql
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
def converValue(def val){
|
||||
if(val && val!='null'){
|
||||
return "'"+val+"'";
|
||||
}else{
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
def addBigdataCommbuildstruGJ(def districts, def cityid){
|
||||
sqlInstance.executeUpdate("delete from BIGDATA_COMMBUILDSTRU_FJW where CITYID='${cityid}'")
|
||||
sqlInstance.withBatch(batchsize) { stmt ->
|
||||
for(def d : districts){
|
||||
def sql = "INSERT INTO BIGDATA_COMMBUILDSTRU_FJW (CITYID,COMMID,BUILDSTRU,REMARK,CREATETIME,UPDATETIME,SOURCECODE) VALUES ('${d.cityid}', '${d.commid}','${d.buildstru}',${d.remark},"
|
||||
if(d.createtime){
|
||||
sql = sql + "to_date('${d.createtime}','yyyy-mm-dd hh24:mi:ss'),"
|
||||
}else{
|
||||
sql = sql + "null,"
|
||||
}
|
||||
if(d.updatetime){
|
||||
sql = sql + "to_date('${d.updatetime}','yyyy-mm-dd hh24:mi:ss'),'${d.sourcecode}')"
|
||||
}else{
|
||||
sql = sql + "null,'${d.sourcecode}')"
|
||||
}
|
||||
try{
|
||||
stmt.addBatch sql
|
||||
}catch(Exception e){
|
||||
println d
|
||||
println sql
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
def addBigdataCommhousetypeGJ(def districts, def cityid){
|
||||
sqlInstance.executeUpdate("delete from BIGDATA_COMMHOUSETYPE_FJW where CITYID='${cityid}'")
|
||||
|
||||
sqlInstance.withBatch(batchsize) { stmt ->
|
||||
for(def d : districts){
|
||||
def sql = "INSERT INTO BIGDATA_COMMHOUSETYPE_FJW (CITYID,COMMID,HOUSETYPE,REMARK,CREATETIME,UPDATETIME,SOURCECODE) VALUES ('${d.cityid}', '${d.commid}','${d.housetype}',${d.remark},"
|
||||
if(d.createtime){
|
||||
sql = sql + "to_date('${d.createtime}','yyyy-mm-dd hh24:mi:ss'),"
|
||||
}else{
|
||||
sql = sql + "null,"
|
||||
}
|
||||
if(d.updatetime){
|
||||
sql = sql + "to_date('${d.updatetime}','yyyy-mm-dd hh24:mi:ss'),'${d.sourcecode}')"
|
||||
}else{
|
||||
sql = sql + "null,'${d.sourcecode}')"
|
||||
}
|
||||
try{
|
||||
stmt.addBatch sql
|
||||
}catch(Exception e){
|
||||
println d
|
||||
println sql
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def addBigdataCommbuildyearGj(districts, def cityid){
|
||||
|
||||
sqlInstance.executeUpdate("delete from BIGDATA_COMMBUILDYEAR_FJW where CITYID='${cityid}'")
|
||||
|
||||
sqlInstance.withBatch(batchsize) { stmt ->
|
||||
for(def d : districts){
|
||||
if(d.buildyear){
|
||||
def sql = "INSERT INTO BIGDATA_COMMBUILDYEAR_FJW (CITYID,COMMID,BUILDYEAR,REMARK,CREATETIME,UPDATETIME,SOURCECODE) VALUES ('${d.cityid}', '${d.commid}',${d.buildyear},${d.remark},"
|
||||
if(d.createtime){
|
||||
sql = sql + "to_date('${d.createtime}','yyyy-mm-dd hh24:mi:ss'),"
|
||||
}else{
|
||||
sql = sql + "null,"
|
||||
}
|
||||
if(d.updatetime){
|
||||
sql = sql + "to_date('${d.updatetime}','yyyy-mm-dd hh24:mi:ss'),'${d.sourcecode}')"
|
||||
}else{
|
||||
sql = sql + "null,'${d.sourcecode}')"
|
||||
}
|
||||
try{
|
||||
stmt.addBatch sql
|
||||
}catch(Exception e){
|
||||
println d
|
||||
println sql
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def addBigdataCommfeeGj(districts, def cityid){
|
||||
|
||||
sqlInstance.executeUpdate("delete from BIGDATA_COMMFEE_FJW where CITYID='${cityid}'")
|
||||
|
||||
def sqls = []
|
||||
for(def d : districts){
|
||||
if(d.estatecharge){
|
||||
def sql = "INSERT INTO BIGDATA_COMMFEE_FJW (CITYID,COMMID,COMPID,FEE,HOUSEUSE,BUILDTYPE,FEETYPE,NOTE,REMARK,CREATETIME,UPDATETIME,SOURCECODE) VALUES ('${d.cityid}', '${d.commid}','${d.compid}',${d.estatecharge},'${d.houseuse}','${d.buildtype}','1',${d.note},${d.remark},"
|
||||
if(d.createtime){
|
||||
sql = sql + "to_date('${d.createtime}','yyyy-mm-dd hh24:mi:ss'),"
|
||||
}else{
|
||||
sql = sql + "null,"
|
||||
}
|
||||
if(d.updatetime){
|
||||
sql = sql + "to_date('${d.updatetime}','yyyy-mm-dd hh24:mi:ss'),'${d.sourcecode}')"
|
||||
}else{
|
||||
sql = sql + "null,'${d.sourcecode}')"
|
||||
}
|
||||
sqls << sql
|
||||
|
||||
if (sqls.size() >= batchsize) {
|
||||
try {
|
||||
sqlInstance.withBatch(batchsize, { stmt ->
|
||||
sqls.each { def s ->
|
||||
stmt.addBatch s
|
||||
}
|
||||
})
|
||||
|
||||
} catch (Exception e) {
|
||||
println sqls[0]
|
||||
e.printStackTrace()
|
||||
}
|
||||
sqls.clear()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (sqls.size() > 0) {
|
||||
sqlInstance.withBatch(100, { stmt ->
|
||||
sqls.each { def s ->
|
||||
stmt.addBatch s
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
def addBigdataCommhouseuseGJ(districts, def cityid){
|
||||
|
||||
sqlInstance.executeUpdate("delete from BIGDATA_COMMHOUSEUSE_FJW where CITYID='${cityid}'")
|
||||
|
||||
def sqls = []
|
||||
for(def d : districts){
|
||||
def sql = "INSERT INTO BIGDATA_COMMHOUSEUSE_FJW (CITYID,COMMID,HOUSEUSE,HOUSECNT,REMARK,CREATETIME,UPDATETIME,SOURCECODE) VALUES ('${d.cityid}', '${d.commid}','${d.houseuse}',${d.zts},${d.remark},"
|
||||
if(d.createtime){
|
||||
sql = sql + "to_date('${d.createtime}','yyyy-mm-dd hh24:mi:ss'),"
|
||||
}else{
|
||||
sql = sql + "null,"
|
||||
}
|
||||
if(d.updatetime){
|
||||
sql = sql + "to_date('${d.updatetime}','yyyy-mm-dd hh24:mi:ss'),'${d.sourcecode}')"
|
||||
}else{
|
||||
sql = sql + "null,'${d.sourcecode}')"
|
||||
}
|
||||
sqls << sql
|
||||
|
||||
if (sqls.size() >= batchsize) {
|
||||
try {
|
||||
sqlInstance.withBatch(batchsize, { stmt ->
|
||||
sqls.each { def s ->
|
||||
stmt.addBatch s
|
||||
}
|
||||
})
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
sqls.clear()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (sqls.size() > 0) {
|
||||
sqlInstance.withBatch(100, { stmt ->
|
||||
sqls.each { def s ->
|
||||
stmt.addBatch s
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
def addBigdataPositionGJ(districts, def cityid){
|
||||
|
||||
sqlInstance.executeUpdate("delete from BIGDATA_POSITION_FJW where CITYID='${cityid}'")
|
||||
|
||||
def sqls = []
|
||||
def index = 1
|
||||
for(def d : districts){
|
||||
def sql = "INSERT INTO BIGDATA_POSITION_FJW (CITYID,OBJECTTYPE,OBJECTID,POSITIONTYPE,SEQNO,LONGITUDE,LATITUDE,ALTITUDE,REMARK,CREATETIME,UPDATETIME,SOURCECODE) VALUES ('${d.cityid}','5', '${d.commid}','1',${index},${d.lng},${d.lat},null,${d.remark},"
|
||||
index++
|
||||
if(d.createtime){
|
||||
sql = sql + "to_date('${d.createtime}','yyyy-mm-dd hh24:mi:ss'),"
|
||||
}else{
|
||||
sql = sql + "null,"
|
||||
}
|
||||
if(d.updatetime){
|
||||
sql = sql + "to_date('${d.updatetime}','yyyy-mm-dd hh24:mi:ss'),'${d.sourcecode}')"
|
||||
}else{
|
||||
sql = sql + "null,'${d.sourcecode}')"
|
||||
}
|
||||
sqls << sql
|
||||
|
||||
if (sqls.size() >= batchsize) {
|
||||
try {
|
||||
sqlInstance.withBatch(batchsize, { stmt ->
|
||||
sqls.each { def s ->
|
||||
stmt.addBatch s
|
||||
}
|
||||
})
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
sqls.clear()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (sqls.size() > 0) {
|
||||
sqlInstance.withBatch(100, { stmt ->
|
||||
sqls.each { def s ->
|
||||
stmt.addBatch s
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
def addBigdataDistrictFJW(){
|
||||
def sql = "select DISTID,DISTNAME,DISTSPELL,CITYID,DISTCODE,SEQ,DISTTYPE,REMARK,to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME,to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME,SOURCECODE from bigdata_district_gj";
|
||||
def rows = []
|
||||
try{
|
||||
sqlInstance.eachRow(sql,{r->
|
||||
def insertSql = "INSERT INTO bigdata_district_fjw(DISTID,DISTNAME,DISTSPELL,CITYID,DISTCODE,SEQ,DISTTYPE,REMARK,CREATETIME,UPDATETIME,SOURCECODE) VALUES ('${r.distid}','${r.distname}','${r.distspell}','${r.cityid}','${r.distcode}','${r.seq}',${r.disttype},null,to_date('${r.createtime}','yyyy-mm-dd hh24:mi:ss'),to_date('${r.updatetime}','yyyy-mm-dd hh24:mi:ss'),'${r.sourcecode}')"
|
||||
sqlInstance.withBatch(batchsize, { stmt ->
|
||||
stmt.addBatch insertSql
|
||||
})
|
||||
});
|
||||
}catch(Exception e){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+239
@@ -0,0 +1,239 @@
|
||||
package com.fangjia.script.ccbevaluation.ronghe
|
||||
|
||||
import com.fangjia.script.BaseBatch
|
||||
import com.fangjia.script.BatchOwner
|
||||
import com.fangjia.script.Watcher
|
||||
import com.fangjia.script.commData.CommonDatautils
|
||||
import com.fangjia.script.gj.ccb.FileUtils
|
||||
import com.fangjia.script.util.DateUtils
|
||||
import groovy.sql.Sql
|
||||
|
||||
import java.sql.ResultSet
|
||||
import java.sql.ResultSetMetaData
|
||||
|
||||
@BatchOwner(Watcher.GaoJuan)
|
||||
class ExportDistrictRongHe extends BaseBatch{
|
||||
|
||||
def sqlInstance = Sql.newInstance("jdbc:oracle:thin:@192.168.0.100:31521:orcl",
|
||||
"GOOJIA", "GOOJIA", "oracle.jdbc.driver.OracleDriver")
|
||||
static main(args) {
|
||||
runBatch(new ExportDistrictRongHe(), args);
|
||||
}
|
||||
|
||||
@Override
|
||||
void process(Object args) {
|
||||
exportBigdataCommunityGJRH()
|
||||
exportBigdataCommbuildstruGJ()
|
||||
exportBigdataCommhousetypeGJ()
|
||||
exportBigdataCommbuildyearGj()
|
||||
exportBigdataCommfeeGj()
|
||||
exportBigdataCommhouseuseGJ()
|
||||
exportBigdataPositionGJ()
|
||||
exportBigdataDistrictFJW()
|
||||
}
|
||||
|
||||
def exportBigdataCommunityGJRH(){
|
||||
def sql = "select CITYID,DISTID,COMMID,COMMNAME,ADDRESS,LANDAREA,BUILDAREA,GREENINGRATE,PLOTRATIO,PARKINGCNT,to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME,COMMTYPE,COMMALIAS,STREET,STREETNO,IFNEW,INTRODUCTION,REMARK,to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME,SOURCECODE from BIGDATA_COMMUNITY_FJW";
|
||||
def allRows = []
|
||||
sqlInstance.eachRow(sql,{r->
|
||||
def data = []
|
||||
data << r.CITYID
|
||||
data << r.DISTID
|
||||
data << r.COMMID
|
||||
data << r.COMMNAME
|
||||
data << r.ADDRESS
|
||||
data << r.LANDAREA
|
||||
data << r.BUILDAREA
|
||||
data << r.GREENINGRATE
|
||||
data << r.PLOTRATIO
|
||||
data << r.PARKINGCNT
|
||||
data << r.UPDATETIME
|
||||
data << r.COMMTYPE
|
||||
data << r.COMMALIAS
|
||||
data << r.STREET
|
||||
data << r.STREETNO
|
||||
data << r.IFNEW
|
||||
data << r.INTRODUCTION
|
||||
data << r.REMARK
|
||||
data << r.CREATETIME
|
||||
data << r.SOURCECODE
|
||||
allRows << data
|
||||
});
|
||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM")+"18"
|
||||
def fileName = "/ccb/MODEL_000000_000000_BIGDATA_COMMUNITY_FJW_${curDate}_0001.dat"
|
||||
if(CommonDatautils.isWindow()){
|
||||
fileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\${curDate}\\BIGDATA_COMMUNITY_GJRH_${curDate}_0001.dat"
|
||||
}
|
||||
FileUtils.batchCreateFile(allRows, fileName, [], "utf-8", false);
|
||||
}
|
||||
def exportBigdataCommbuildstruGJ(){
|
||||
def sql = "select CITYID,COMMID,BUILDSTRU,REMARK,to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME,to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME,SOURCECODE from BIGDATA_COMMBUILDSTRU_FJW";
|
||||
def allRows = []
|
||||
sqlInstance.eachRow(sql,{r->
|
||||
def data = []
|
||||
data << r.CITYID
|
||||
data << r.COMMID
|
||||
data << r.BUILDSTRU
|
||||
data << r.REMARK
|
||||
data << r.CREATETIME
|
||||
data << r.UPDATETIME
|
||||
data << r.SOURCECODE
|
||||
allRows << data
|
||||
});
|
||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM")+"18"
|
||||
def fileName = "/ccb/MODEL_000000_000000_BIGDATA_COMMBUILDSTRU_FJW_${curDate}_0001.dat"
|
||||
if(CommonDatautils.isWindow()){
|
||||
fileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\${curDate}\\BIGDATA_COMMBUILDSTRU_GJ_${curDate}_0001.dat"
|
||||
}
|
||||
FileUtils.batchCreateFile(allRows, fileName, [], "utf-8", false);
|
||||
}
|
||||
|
||||
def exportBigdataCommhousetypeGJ(){
|
||||
def sql = "select CITYID,COMMID,HOUSETYPE,REMARK,to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME,to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME,SOURCECODE from BIGDATA_COMMHOUSETYPE_FJW";
|
||||
def allRows = []
|
||||
sqlInstance.eachRow(sql,{r->
|
||||
def data = []
|
||||
data << r.CITYID
|
||||
data << r.COMMID
|
||||
data << r.HOUSETYPE
|
||||
data << r.REMARK
|
||||
data << r.CREATETIME
|
||||
data << r.UPDATETIME
|
||||
data << r.SOURCECODE
|
||||
allRows << data
|
||||
});
|
||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM")+"18"
|
||||
def fileName = "/ccb/MODEL_000000_000000_BIGDATA_COMMHOUSETYPE_FJW_${curDate}_0001.dat"
|
||||
if(CommonDatautils.isWindow()){
|
||||
fileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\${curDate}\\BIGDATA_COMMHOUSETYPE_GJ_${curDate}_0001.dat"
|
||||
}
|
||||
FileUtils.batchCreateFile(allRows, fileName, [], "utf-8", false);
|
||||
}
|
||||
|
||||
def exportBigdataCommbuildyearGj(){
|
||||
def sql = "select CITYID,COMMID,BUILDYEAR,REMARK,to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME,to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME,SOURCECODE from BIGDATA_COMMBUILDYEAR_FJW";
|
||||
def allRows = []
|
||||
sqlInstance.eachRow(sql,{r->
|
||||
def data = []
|
||||
data << r.CITYID
|
||||
data << r.COMMID
|
||||
data << r.BUILDYEAR
|
||||
data << r.REMARK
|
||||
data << r.CREATETIME
|
||||
data << r.UPDATETIME
|
||||
data << r.SOURCECODE
|
||||
allRows << data
|
||||
});
|
||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM")+"18"
|
||||
def fileName = "/ccb/MODEL_000000_000000_BIGDATA_COMMBUILDYEAR_FJW_${curDate}_0001.dat"
|
||||
if(CommonDatautils.isWindow()){
|
||||
fileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\${curDate}\\BIGDATA_COMMBUILDYEAR_GJ_${curDate}_0001.dat"
|
||||
}
|
||||
FileUtils.batchCreateFile(allRows, fileName, [], "utf-8", false);
|
||||
}
|
||||
|
||||
def exportBigdataCommfeeGj(){
|
||||
def sql = "select CITYID,COMMID,COMPID,FEE,HOUSEUSE,BUILDTYPE,FEETYPE,NOTE,REMARK,to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME,to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME,SOURCECODE from BIGDATA_COMMFEE_FJW";
|
||||
def allRows = []
|
||||
sqlInstance.eachRow(sql,{r->
|
||||
def data = []
|
||||
data << r.CITYID
|
||||
data << r.COMMID
|
||||
data << r.COMPID
|
||||
data << r.FEE
|
||||
data << r.HOUSEUSE
|
||||
data << r.BUILDTYPE
|
||||
data << r.FEETYPE
|
||||
data << r.NOTE
|
||||
data << r.REMARK
|
||||
data << r.CREATETIME
|
||||
data << r.UPDATETIME
|
||||
data << r.SOURCECODE
|
||||
allRows << data
|
||||
});
|
||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM")+"18"
|
||||
def fileName = "/ccb/MODEL_000000_000000_BIGDATA_COMMFEE_FJW_${curDate}_0001.dat"
|
||||
if(CommonDatautils.isWindow()){
|
||||
fileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\${curDate}\\BIGDATA_COMMFEE_GJ_${curDate}_0001.dat"
|
||||
}
|
||||
FileUtils.batchCreateFile(allRows, fileName, [], "utf-8", false);
|
||||
}
|
||||
|
||||
|
||||
def exportBigdataCommhouseuseGJ(){
|
||||
def sql = "select CITYID,COMMID,HOUSEUSE,HOUSECNT,REMARK,to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME,to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME,SOURCECODE from BIGDATA_COMMHOUSEUSE_FJW";
|
||||
def allRows = []
|
||||
sqlInstance.eachRow(sql,{r->
|
||||
def data = []
|
||||
data << r.CITYID
|
||||
data << r.COMMID
|
||||
data << r.HOUSEUSE
|
||||
data << r.HOUSECNT
|
||||
data << r.REMARK
|
||||
data << r.CREATETIME
|
||||
data << r.UPDATETIME
|
||||
data << r.SOURCECODE
|
||||
allRows << data
|
||||
});
|
||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM")+"18"
|
||||
def fileName = "/ccb/MODEL_000000_000000_BIGDATA_COMMHOUSEUSE_FJW_${curDate}_0001.dat"
|
||||
if(CommonDatautils.isWindow()){
|
||||
fileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\${curDate}\\BIGDATA_COMMHOUSEUSE_GJ_${curDate}_0001.dat"
|
||||
}
|
||||
FileUtils.batchCreateFile(allRows, fileName, [], "utf-8", false);
|
||||
}
|
||||
|
||||
def exportBigdataPositionGJ(){
|
||||
def sql = "select CITYID,OBJECTTYPE,OBJECTID,POSITIONTYPE,SEQNO,LONGITUDE,LATITUDE,ALTITUDE,REMARK,to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME,to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME,SOURCECODE from BIGDATA_POSITION_FJW";
|
||||
def allRows = []
|
||||
sqlInstance.eachRow(sql,{r->
|
||||
def data = []
|
||||
data << r.CITYID
|
||||
data << r.OBJECTTYPE
|
||||
data << r.OBJECTID
|
||||
data << r.POSITIONTYPE
|
||||
data << r.SEQNO
|
||||
data << r.LONGITUDE
|
||||
data << r.LATITUDE
|
||||
data << r.ALTITUDE
|
||||
data << r.REMARK
|
||||
data << r.CREATETIME
|
||||
data << r.UPDATETIME
|
||||
data << r.SOURCECODE
|
||||
allRows << data
|
||||
});
|
||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM")+"18"
|
||||
def fileName = "/ccb/MODEL_000000_000000_BIGDATA_POSITION_FJW_${curDate}_0001.dat"
|
||||
if(CommonDatautils.isWindow()){
|
||||
fileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\${curDate}\\BIGDATA_POSITION_GJ_${curDate}_0001.dat"
|
||||
}
|
||||
FileUtils.batchCreateFile(allRows, fileName, [], "utf-8", false);
|
||||
}
|
||||
|
||||
def exportBigdataDistrictFJW(){
|
||||
def sql = "select DISTID,DISTNAME,DISTSPELL,CITYID,DISTCODE,SEQ,DISTTYPE,REMARK,to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME,to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME,SOURCECODE from BIGDATA_DISTRICT_FJW";
|
||||
def allRows = []
|
||||
sqlInstance.eachRow(sql,{r->
|
||||
def data = []
|
||||
data << r.DISTID
|
||||
data << r.DISTNAME
|
||||
data << r.DISTSPELL
|
||||
data << r.CITYID
|
||||
data << r.DISTCODE
|
||||
data << r.SEQ
|
||||
data << r.DISTTYPE
|
||||
data << r.REMARK
|
||||
data << r.CREATETIME
|
||||
data << r.UPDATETIME
|
||||
data << r.SOURCECODE
|
||||
allRows << data
|
||||
});
|
||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM")+"18"
|
||||
def fileName = "/ccb/MODEL_000000_000000_BIGDATA_DISTRICT_FJW_${curDate}_0001.dat"
|
||||
if(CommonDatautils.isWindow()){
|
||||
fileName = "D:\\数据\\建行\\房产估值\\数据文件\\txt\\${curDate}\\BIGDATA_DISTRICT_FJW_${curDate}_0001.dat"
|
||||
}
|
||||
FileUtils.batchCreateFile(allRows, fileName, [], "utf-8", false);
|
||||
}
|
||||
|
||||
}
|
||||
+45
@@ -677,6 +677,28 @@ class CommonDatautils {
|
||||
}
|
||||
|
||||
|
||||
public static def findAllDistricMaptByCity(def city, def cat, def fields){
|
||||
|
||||
DBObject q = new BasicDBObject();
|
||||
q.put("visible",0)
|
||||
q.put("cat", cat);
|
||||
q.put("city", city);
|
||||
|
||||
DBObject keys = new BasicDBObject();
|
||||
if(fields){
|
||||
for(def field : fields){
|
||||
keys.put(field, 1);
|
||||
}
|
||||
}
|
||||
def dbsour = getDataStoreConnection().find(q, keys).batchSize(2000)
|
||||
def retMap = [:]
|
||||
for(def d : dbsour){
|
||||
retMap.put(d._id.toString(), d)
|
||||
}
|
||||
return retMap;
|
||||
}
|
||||
|
||||
|
||||
public static def findAllDistrictByCity(def city, def cat, def fields){
|
||||
|
||||
DBObject q = new BasicDBObject();
|
||||
@@ -760,6 +782,29 @@ class CommonDatautils {
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static def findDistrictFieldById(String id, def fields){
|
||||
|
||||
if(!id){
|
||||
return null;
|
||||
}
|
||||
DBObject q = new BasicDBObject();
|
||||
q.put("_id", new ObjectId(id.toString().replace("[","").replace("]","")));
|
||||
|
||||
DBObject keys = new BasicDBObject();
|
||||
if(fields){
|
||||
for(def field : fields){
|
||||
keys.put(field, 1);
|
||||
}
|
||||
}
|
||||
def cursor = getDataStoreConnection().find(q, keys).batchSize(2000)
|
||||
if(cursor){
|
||||
for(def obj : cursor){
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public static def findDistrictById(String id){
|
||||
|
||||
@@ -38,9 +38,7 @@ class GaoDeMapCrawl extends BaseBatch{
|
||||
|
||||
DBCollection BOUNDS_COLL = MongoUtils.getCollectionByName("fangjia_base", "city_bounds_box", "192.168.0.235", 27018)
|
||||
def targetUrl = "http://192.168.0.206:9200/amap_poi/_doc"
|
||||
|
||||
final def dbUrl = "mongodb://192.168.0.235:27018";
|
||||
|
||||
ExecutorService fixedThreadPool = Executors.newFixedThreadPool(1)
|
||||
final AtomicInteger count = new AtomicInteger()
|
||||
def updateLists = []
|
||||
|
||||
+3
-3
@@ -48,11 +48,11 @@ class YouDaDataParser {
|
||||
def final AtomicInteger count_ = new AtomicInteger(0)
|
||||
|
||||
|
||||
static def statDate = "2021-08-01"
|
||||
static def statDate = "2021-09-01"
|
||||
static main(args) {
|
||||
def task = new YouDaDataParser();
|
||||
// task.newHouseparse();//友达一手房存入mongo
|
||||
// task.esfParser();//友达二手房存入mongo
|
||||
task.esfParser();//友达二手房存入mongo
|
||||
// task.newhouseToSaveEs();//新房保存到es
|
||||
task.esfhouseToSaveEs();//二手房保存到es
|
||||
// task.updateFinishDateByEsfTrade();//根据二手成交的竣工时间修改seaweed库中的竣工时间
|
||||
@@ -285,7 +285,7 @@ class YouDaDataParser {
|
||||
|
||||
|
||||
def esfParser(){
|
||||
def files = ["D:\\数据\\友达\\2021年9月\\二手房\\查询1.DBF"]
|
||||
def files = ["D:\\数据\\友达\\2021年10月\\二手房\\查询1.DBF"]
|
||||
def datas = []
|
||||
for(def fileName : files){
|
||||
def rows = readDBF(fileName);
|
||||
|
||||
+88
-6
@@ -1,7 +1,9 @@
|
||||
package com.fangjia.script.gj.ccb
|
||||
|
||||
import com.fangjia.core.util.DataUtil
|
||||
import org.apache.commons.lang.StringUtils
|
||||
|
||||
import java.util.regex.Matcher
|
||||
import java.util.regex.Pattern
|
||||
|
||||
class CcbCodeUtils {
|
||||
@@ -173,19 +175,36 @@ class CcbCodeUtils {
|
||||
}
|
||||
|
||||
//钢混结构:1 砖混结构:2 钢结构:3 框架结构:4 框架剪力墙结构:5 剪力墙结构:6 筒体结构:7 框架筒体结构:8 筒中筒:9 砖木结构:10 其他:11
|
||||
//½¨Öþ½á¹¹
|
||||
// 钢、钢筋混凝土结构 002
|
||||
// 钢筋混凝土结构 003
|
||||
// 砖木结构 004
|
||||
// 混合结构 005
|
||||
// 其它结构 006
|
||||
|
||||
static def getBuildStructureCode(def buildStructure){
|
||||
if(buildStructure){
|
||||
if(buildStructure.contains("钢结构")){
|
||||
return 3;
|
||||
return "001";
|
||||
}else if(buildStructure.contains("钢、钢筋混凝土结构")){
|
||||
return "002";
|
||||
}else if(buildStructure.contains("钢筋混凝土结构")){
|
||||
return 1;
|
||||
return "003";
|
||||
}else if(buildStructure.contains("砖木结构")){
|
||||
return 10;
|
||||
return "004";
|
||||
}else if(buildStructure.contains("混合结构")){
|
||||
return "005";
|
||||
}
|
||||
return 11;
|
||||
}
|
||||
return null;
|
||||
return "006";
|
||||
}
|
||||
|
||||
static def getDistHouseTypeCode(def estateType){
|
||||
if(estateType && estateType=="别墅"){
|
||||
return "08"
|
||||
}else if(estateType && (estateType=="普通住宅" || estateType=="商住")){
|
||||
return "01"
|
||||
}
|
||||
return "99"
|
||||
}
|
||||
//室内结构
|
||||
//平层:11 错层:12 复式:13 阁楼:14 团结户:15 老式房:16 地下室:17 带阁楼:21 带车库:22 其他:99 跃层:18 带地下室:24 带储藏室:25 带车位:23
|
||||
@@ -221,4 +240,67 @@ class CcbCodeUtils {
|
||||
}
|
||||
return 99
|
||||
}
|
||||
|
||||
public static Integer getBuildYear(String buildDate){
|
||||
if(StringUtils.isNotBlank(buildDate)){
|
||||
Pattern p = Pattern.compile("\\d{4}")
|
||||
Matcher m = p.matcher(buildDate);
|
||||
while (m.find()) {
|
||||
return m.group(0).toInteger();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static def processEstateCharge(def city, def estateCharege, def estateType2){
|
||||
if(estateCharege){
|
||||
try{
|
||||
estateCharege = trimChar(estateCharege);
|
||||
estateCharege = estateCharege.replace("元/平米/月","").replace("元/平方米/月","").replace("元/?O?月","")
|
||||
estateCharege = estateCharege.toDouble()
|
||||
if(estateType2=="普通住宅"){
|
||||
if(city=="上海" || city=="北京" || city=="广州" || city=="杭州"){
|
||||
if(estateCharege>=0.6 && estateCharege<=3.5){
|
||||
return estateCharege
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
}else{
|
||||
if(estateCharege>=0.2 && estateCharege<=3.5){
|
||||
return estateCharege
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}else if(estateType2=="别墅"){
|
||||
if(estateCharege>=3){
|
||||
return estateCharege;
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
}else if(estateType2=="商住"){
|
||||
if(estateCharege>=4){
|
||||
return estateCharege;
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}catch (Exception e){
|
||||
println "estateCharege 转不了 "+estateCharege
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static def trimChar(String c) {
|
||||
try {
|
||||
if(c){
|
||||
c = new String(c.getBytes("GBK"), "GBK").replace("?", "/");
|
||||
}
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return c;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ class FileUtils {
|
||||
|
||||
if(headers){
|
||||
sb.append(headers.join("|@|"))
|
||||
sb.append(System.getProperty("line.separator"));
|
||||
sb.append("\n");
|
||||
}
|
||||
|
||||
out.write(sb.toString().getBytes(charset));
|
||||
@@ -33,7 +33,7 @@ class FileUtils {
|
||||
if(row){
|
||||
index++
|
||||
sb.append(StringUtils.join(row.toArray(), "|@|"))
|
||||
sb.append(System.getProperty("line.separator"));
|
||||
sb.append("\n");
|
||||
|
||||
if(index%10000==0){
|
||||
println index+"¿ªÊ¼Ð´ÈëCSV "+new Date().toLocaleString()
|
||||
|
||||
+51
-1
@@ -2,6 +2,8 @@ package com.fangjia.script.jiangnanblank
|
||||
|
||||
import com.jcraft.jsch.*
|
||||
|
||||
import javax.transaction.SystemException
|
||||
|
||||
/**
|
||||
* Created by gaojuan on 2017/12/6.
|
||||
*/
|
||||
@@ -48,7 +50,8 @@ class SFTP {
|
||||
*/
|
||||
public void upload(String directory, String uploadFile, ChannelSftp sftp) {
|
||||
FileInputStream stream = null
|
||||
try {
|
||||
try{
|
||||
sftp = createDir(directory, sftp)
|
||||
sftp.cd(directory);
|
||||
File file=new File(uploadFile);
|
||||
stream = new FileInputStream(file)
|
||||
@@ -110,4 +113,51 @@ class SFTP {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 创建一个文件目录
|
||||
*/
|
||||
public ChannelSftp createDir(String createpath, ChannelSftp sftp) {
|
||||
try {
|
||||
if (isDirExist(createpath, sftp)) {
|
||||
sftp.cd(createpath);
|
||||
}
|
||||
def pathArry = createpath.split("/");
|
||||
StringBuffer filePath = new StringBuffer("/");
|
||||
for (String path : pathArry) {
|
||||
if (path.equals("")) {
|
||||
continue;
|
||||
}
|
||||
filePath.append(path + "/");
|
||||
if (isDirExist(filePath.toString(), sftp)) {
|
||||
sftp.cd(filePath.toString());
|
||||
} else {
|
||||
// 建立目录
|
||||
sftp.mkdir(filePath.toString());
|
||||
// 进入并设置为当前目录
|
||||
sftp.cd(filePath.toString());
|
||||
}
|
||||
}
|
||||
sftp.cd(createpath);
|
||||
} catch (SftpException e) {
|
||||
throw new SystemException("创建路径错误:" + createpath);
|
||||
}
|
||||
return sftp
|
||||
}
|
||||
/**
|
||||
* 判断目录是否存在
|
||||
*/
|
||||
public boolean isDirExist(String directory, ChannelSftp sftp) {
|
||||
boolean isDirExistFlag = false;
|
||||
try {
|
||||
SftpATTRS sftpATTRS = sftp.lstat(directory);
|
||||
isDirExistFlag = true;
|
||||
return sftpATTRS.isDir();
|
||||
} catch (Exception e) {
|
||||
if (e.getMessage().toLowerCase().equals("no such file")) {
|
||||
isDirExistFlag = false;
|
||||
}
|
||||
}
|
||||
return isDirExistFlag;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+16
-11
@@ -191,19 +191,22 @@ class Esf58Crawl extends BaseBatch{
|
||||
void process(Object args) {
|
||||
//addContent("¸£ÖÝ","https://fz.58.com/xiaoqu/", 70);
|
||||
|
||||
def citys = ["成都","广州","深圳","杭州","南京","郑州","苏州","武汉","青岛","石家庄","太原","济南","长沙","沈阳","宁波","佛山","珠海","昆明","温州","无锡","哈尔滨","南宁","东莞","大连","海口","潍坊","绵阳","乌鲁木齐","惠州"]
|
||||
cityList.each{city, str->
|
||||
for(def i=0;i<1;i++){
|
||||
// def city = "¸£ÖÝ"
|
||||
def districts = CommonDatautils.findAllDistricts(city, "district", ["city", "region", "name"]);
|
||||
if(districts){
|
||||
def arrs = str.split("\\|")
|
||||
def url = "https://"+arrs[0]+".58.com/xiaoqu/"
|
||||
distMap.put(city, districts)
|
||||
if(citys.contains(city)){
|
||||
def districts = CommonDatautils.findAllDistricts(city, "district", ["city", "region", "name"]);
|
||||
if(districts){
|
||||
def arrs = str.split("\\|")
|
||||
def url = "https://"+arrs[0]+".58.com/xiaoqu/"
|
||||
distMap.put(city, districts)
|
||||
|
||||
addCrawlKeys(city);
|
||||
addDetailContent(city, url);
|
||||
addCrawlKeys(city);
|
||||
addDetailContent(city, url);
|
||||
|
||||
// Thread.sleep(1000*60*10)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -217,10 +220,12 @@ class Esf58Crawl extends BaseBatch{
|
||||
def districtName = districts[i].name
|
||||
println "${city}¡¾${i}/${districts.size()}¡¿ "+districtName
|
||||
for(def j=1;j<=districtName.length()-1;j++) {
|
||||
def keyword = districtName.toString().substring(0, j);
|
||||
def keyStr = city+"##"+keyword;
|
||||
if(!useDistKeys.contains(keyStr)){
|
||||
useDistKeys << keyStr
|
||||
if(j<=2){
|
||||
def keyword = districtName.toString().substring(0, j);
|
||||
def keyStr = city+"##"+keyword;
|
||||
if(!useDistKeys.contains(keyStr)){
|
||||
useDistKeys << keyStr
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ class ElasticUtils {
|
||||
@Override
|
||||
RequestConfig.Builder customizeRequestConfig(RequestConfig.Builder requestConfigBuilder) {
|
||||
requestConfigBuilder.setConnectionRequestTimeout(1000 * 60);
|
||||
requestConfigBuilder.setSocketTimeout(1000 * 60);
|
||||
requestConfigBuilder.setSocketTimeout(1000 * 180);
|
||||
return requestConfigBuilder;
|
||||
}
|
||||
})
|
||||
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
package com.fangjia.script.wenyan.auto
|
||||
|
||||
import com.fangjia.core.util.DateUtil
|
||||
import com.fangjia.script.util.CommonUtils
|
||||
import com.fangjia.script.util.DbUtils
|
||||
import com.fangjia.script.util.ExcelUtils
|
||||
import com.mongodb.BasicDBObject
|
||||
|
||||
//def keys = new BasicDBObject()
|
||||
//keys.city = 1
|
||||
//keys.region = 1
|
||||
//keys.name = 1
|
||||
//keys.estate_type2 = 1
|
||||
//["ÖØÇì"].each {def city->
|
||||
// DbUtils.multiThreadingExecuteQueryOnSeaweed(DbUtils.buildSeaweedQuery(city),{BasicDBObject seaweed->
|
||||
// BasicDBObject stat = DbUtils.findDistrictStat(seaweed, DateUtil.getFirstDayOfWeek(new Date()))
|
||||
// if(!stat){
|
||||
// CommonUtils.recalculationAverage(seaweed.city, seaweed.region, seaweed.name, seaweed.estate_type2)
|
||||
// println(seaweed)
|
||||
// }
|
||||
// }, keys)
|
||||
//
|
||||
//}
|
||||
ExcelUtils.multiThreadingModify("D:\\Users\\wenyan\\Desktop\\³É½»¼Û¡ª¡ªÔ¤²â¼Ò.xlsx",{List item->
|
||||
BasicDBObject query = DbUtils.buildSeaweedQuery(item["A"], item["B"], item["C"])
|
||||
BasicDBObject seaweed = DbUtils.seaweed.findOne(query)
|
||||
if(seaweed){
|
||||
BasicDBObject stat = DbUtils.findDistrictStat(seaweed, item["E"])
|
||||
item["H"] = stat?.credit
|
||||
}
|
||||
println(item)
|
||||
})
|
||||
+113
@@ -0,0 +1,113 @@
|
||||
package com.fangjia.script.wenyan.auto
|
||||
|
||||
import com.fangjia.core.util.BaiDuApiUtils
|
||||
import com.fangjia.script.util.DbUtils
|
||||
import com.fangjia.script.util.ExcelUtils
|
||||
import com.fangjia.script.util.GeoUtils
|
||||
import com.fangjia.script.util.OpenApiClient
|
||||
import com.mongodb.BasicDBObject
|
||||
import net.sf.json.JSONObject
|
||||
import org.apache.commons.lang.StringUtils
|
||||
import org.apache.lucene.index.Term
|
||||
import org.apache.lucene.search.BooleanClause
|
||||
import org.apache.lucene.search.BooleanQuery
|
||||
import org.apache.lucene.search.TermQuery
|
||||
|
||||
/**
|
||||
* 移除小区名中的区域信息
|
||||
* @param name
|
||||
* @param region
|
||||
* @return
|
||||
*/
|
||||
String removeRegion(String name, String region){
|
||||
if(name.startsWith(region) && name.length() - region.length() > 2){
|
||||
return name.replaceFirst(region, "")
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
def String getStandardAddress(def city, def addr) {
|
||||
if (StringUtils.isBlank(addr)) {
|
||||
return null
|
||||
}
|
||||
JSONObject result = OpenApiClient.addressStandardize(city, addr)
|
||||
if (result.containsKey("standardAddress") && result.getBoolean("standardAddress")) {
|
||||
def standardAddr = result.getString("street")
|
||||
if (result.containsKey("streetNumber")) {
|
||||
standardAddr += result.getString("streetNumber")
|
||||
}
|
||||
return standardAddr
|
||||
}
|
||||
return null
|
||||
}
|
||||
def NOW = new Date()
|
||||
def getType(String type){
|
||||
if(type == null){
|
||||
return "普通住宅"
|
||||
}
|
||||
if(type.contains("商住两用")){
|
||||
return "商住"
|
||||
}else if(type.contains("别墅")){
|
||||
return "别墅"
|
||||
}else{
|
||||
return "普通住宅"
|
||||
}
|
||||
}
|
||||
|
||||
ExcelUtils.modify("D:\\nextcloud\\共享文档\\项目文档\\重庆农商行\\新增小区4.xlsx",{List item->
|
||||
if(item["C"] != "明佳园"){
|
||||
return
|
||||
}
|
||||
BasicDBObject seaweed = new BasicDBObject()
|
||||
seaweed.city = item["A"]
|
||||
seaweed.region = item["B"]
|
||||
seaweed.name = item["C"]
|
||||
def query = new BasicDBObject("city", seaweed.city).append("region", seaweed.region)
|
||||
.append('name', seaweed.name)
|
||||
.append("visible", 0)
|
||||
.append("cat", "district");
|
||||
BasicDBObject one = DbUtils.seaweed.findOne(query)
|
||||
if(!one){
|
||||
query.removeField("name")
|
||||
query.append("alias", seaweed.name)
|
||||
one = DbUtils.seaweed.findOne(query)
|
||||
}
|
||||
if (one && one.status == 0) {
|
||||
item["i"] = "已存在"
|
||||
return;
|
||||
}
|
||||
seaweed.address = getStandardAddress( seaweed.city, item["D"])
|
||||
String source = item["H"]
|
||||
Double lng = item["E"]
|
||||
Double lat = item["F"]
|
||||
if(lng){
|
||||
if(source.contains("高德")){
|
||||
seaweed.lng = (long)(lng * 10000000000l)
|
||||
seaweed.lat = (long)(lat * 10000000000l)
|
||||
JSONObject geo = BaiDuApiUtils.googleToBaidu(lat, lng)
|
||||
seaweed.lng2 = (long)(geo.lng * 10000000000l)
|
||||
seaweed.lat2 = (long)(geo.lat * 10000000000l)
|
||||
}else if(source.contains("百度")){
|
||||
Map<String, Double> point = GeoUtils.geoconvBaiduToGoogle(lng, lat);
|
||||
long google_lat = (long)(point.get("lat") * 10000000000l);
|
||||
long google_lng = (long)(point.get("lng") * 10000000000l);
|
||||
long baiDu_lat = (long)(lat * 10000000000l)
|
||||
long baiDu_lng = (long)(lng * 10000000000l)
|
||||
seaweed.lng = google_lng
|
||||
seaweed.lat = google_lat
|
||||
seaweed.lat2 = baiDu_lat
|
||||
seaweed.lng2 = baiDu_lng
|
||||
}
|
||||
}
|
||||
seaweed.cat = "district"
|
||||
seaweed.status = 0
|
||||
seaweed.c_date = NOW
|
||||
seaweed.ip = "MACHINE_SAVE"
|
||||
seaweed.estate_type2 = getType(item["G"])
|
||||
Map<String, Object> markMap = new HashMap<String, Object>()
|
||||
seaweed.mark_map = markMap
|
||||
markMap.put("data_source", "机器入库")
|
||||
DbUtils.seaweed.save(seaweed)
|
||||
println(seaweed)
|
||||
})
|
||||
|
||||
+35
-9
@@ -1,16 +1,42 @@
|
||||
package com.fangjia.script.wenyan.temp
|
||||
|
||||
|
||||
import com.fangjia.core.RegionData
|
||||
import com.fangjia.core.util.MongoUtils
|
||||
import com.fangjia.script.common.ServerAreaData
|
||||
import com.fangjia.script.util.CommonUtils
|
||||
import com.fangjia.script.util.DbUtils
|
||||
import com.fangjia.script.util.ElasticUtils
|
||||
import com.fangjia.script.util.ExcelUtils
|
||||
import com.fangjia.script.util.OpenApiClient
|
||||
import com.mongodb.BasicDBObject
|
||||
import net.sf.json.JSONObject
|
||||
|
||||
def data = [["城市", "区域", "小区名", "别名", "地址", "地址别名"]]
|
||||
["ID", "北京", "重庆", "哈尔滨"].each {def city->
|
||||
DbUtils.seaweed.find(DbUtils.buildSeaweedQuery(city)).each {BasicDBObject district->
|
||||
def item = [district._id.toString(), district.city, district.region, district.name, district.alias?.join(","), district.address, district.addr_alias?.join(",")]
|
||||
println(item)
|
||||
data << item
|
||||
//city_sell_stat = MongoUtils.getDbCollection("fangjia_stat", "city_sell_stat")
|
||||
//data = [["城市", "202101", "202106"]]
|
||||
//CommonUtils.findAllCity().each {def city->
|
||||
// BasicDBObject serverArea = ServerAreaData.getServerAreaByDisplay(city)
|
||||
// if(!serverArea.ranking || !serverArea.ranking.toString().contains("县级行政单位")){
|
||||
// BasicDBObject pre = city_sell_stat.findOne(new BasicDBObject("city", city).append("date", 202101))
|
||||
// BasicDBObject now = city_sell_stat.findOne(new BasicDBObject("city", city).append("date", 202106))
|
||||
// println([serverArea.display, pre?.avg_price, now?.avg_price])
|
||||
// data << [serverArea.display, pre?.avg_price, now?.avg_price]
|
||||
// }
|
||||
//}
|
||||
//ExcelUtils.write("D:\\城市均价数据.xlsx", data, "城市均价")
|
||||
|
||||
//ExcelUtils.multiThreadingModify("C:\\Users\\wenyan\\Downloads\\经纬度错误数据修正.xlsx",{List item->
|
||||
// String city = item["B"]
|
||||
// String region = RegionData.formatRegion(city, item["D"])
|
||||
// String sql = "select count(1) as count from latest_seawater where cat='sell' and city='${item["B"]}' and region='${region}' and district_name='${item["F"]}'"
|
||||
// ElasticUtils.executeSqlQuery(sql,{Map result->
|
||||
// item["P"] = result.get("count")
|
||||
// })
|
||||
// println(item)
|
||||
//})
|
||||
ExcelUtils.multiThreadingModify("D:\\Users\\wenyan\\Desktop\\装修案例.xlsx",{List item->
|
||||
JSONObject json = OpenApiClient.addressMatch("西安", item["H"], "property", false, item["C"])
|
||||
if(json.name){
|
||||
item["I"] = json.district
|
||||
item["J"] = json.name
|
||||
}
|
||||
}
|
||||
ExcelUtils.write("D:\\待抓取小区.xlsx", data, "数据")
|
||||
})
|
||||
+3
-3
@@ -11,8 +11,8 @@ import org.bson.Document
|
||||
import static com.mongodb.client.model.Filters.*
|
||||
|
||||
MongoCollection<Document> OPEN_URI_LOG = Mongo3Utils.getDbCollection(Constants.SEAWATER_MONGO_URI, "business", "open_uri_log")
|
||||
def startDate = DateUtil.parseDate("20210401", "yyyyMMdd")
|
||||
def endDate = DateUtil.parseDate("20210501", "yyyyMMdd")
|
||||
def startDate = DateUtil.parseDate("20210901", "yyyyMMdd")
|
||||
def endDate = DateUtil.parseDate("20211001", "yyyyMMdd")
|
||||
Calendar calendar = Calendar.getInstance()
|
||||
calendar.setTime(startDate)
|
||||
def count = 0
|
||||
@@ -25,7 +25,7 @@ while (startDate.before(endDate)) {
|
||||
OPEN_URI_LOG.find(and(eq("user_id", "1007705"), eq("request_uri", "/property/detail"), eq("data_status", 1), lt("c_date", nextDate), gte("c_date", startDate))).each { Document doc ->
|
||||
def result = JSONObject.fromObject(doc.res_map.result)
|
||||
if (!hashSet.contains(result)) {
|
||||
def item = ["5c6535b99c213017e0768ee1", "qlkj", doc.ip, doc.request_uri, doc.c_date, doc.data_status, doc.code, doc.msg, JSONObject.fromObject(doc.parameter_map).toString(), result.toString()]
|
||||
def item = ["60a3202c0b42a00001aad385", "qlkjgx", doc.ip, doc.request_uri, doc.c_date.format("yyyy-MM-dd HH:mm:ss"), doc.data_status, doc.code, doc.msg, JSONObject.fromObject(doc.parameter_map).toString(), result.toString()]
|
||||
data << item
|
||||
hashSet << result
|
||||
} else {
|
||||
|
||||
+3
-3
@@ -11,8 +11,8 @@ import org.bson.Document
|
||||
import static com.mongodb.client.model.Filters.*
|
||||
|
||||
MongoCollection<Document> OPEN_URI_LOG = Mongo3Utils.getDbCollection(Constants.SEAWATER_MONGO_URI, "business", "open_uri_log")
|
||||
def startDate = DateUtil.parseDate("20210401", "yyyyMMdd")
|
||||
def endDate = DateUtil.parseDate("20210501", "yyyyMMdd")
|
||||
def startDate = DateUtil.parseDate("20210901", "yyyyMMdd")
|
||||
def endDate = DateUtil.parseDate("20211001", "yyyyMMdd")
|
||||
Calendar calendar = Calendar.getInstance()
|
||||
calendar.setTime(startDate)
|
||||
def count = 0
|
||||
@@ -42,7 +42,7 @@ while (startDate.before(endDate)) {
|
||||
keys.addAll(params.keys())
|
||||
def key = "${params.address}_${params.size}".toString()
|
||||
if (!hashSet.contains(key)) {
|
||||
def item = ["1007721", "scjc", doc.ip, doc.request_uri, doc.c_date.format("yyy"), doc.data_status, doc.code, doc.msg]
|
||||
def item = ["1007721", "scjc", doc.ip, doc.request_uri, doc.c_date, doc.data_status, doc.code, doc.msg]
|
||||
param_keys.each {
|
||||
item << params[it]
|
||||
}
|
||||
|
||||
+13
-12
@@ -261,15 +261,16 @@ import org.dom4j.io.SAXReader
|
||||
// data << [dbo.parameter_map.city, dbo.parameter_map.address, dbo.res_map.result.province, dbo.res_map.result.city, dbo.res_map.result.district, dbo.res_map.result.developmentZone, dbo.res_map.result.township, dbo.res_map.result.street,dbo.res_map.result.streetNumber,dbo.res_map.result.name,dbo.res_map.result.buildingNumber,dbo.res_map.result.unitNumber,dbo.res_map.result.roomNumber,dbo.res_map.result.formattedAddress]
|
||||
//}
|
||||
//ExcelUtils.write("D:\\建行测试地址.xlsx", data, "结果")
|
||||
DBCollection SQMETRE_RENT_COLL = MongoUtils.getCollectionByName("fangjia", "sqmetre_rent", "mongo.db.fangjia.com")
|
||||
def query = new BasicDBObject()
|
||||
query.cat = "region"
|
||||
query.city= "ÉϺ£"
|
||||
query.weekend = Date.parse("yyyyMMdd", "20210228")
|
||||
def doc = []
|
||||
def prices = []
|
||||
SQMETRE_RENT_COLL.find(query, new BasicDBObject("region", 1).append("avg_price", 1)).each {
|
||||
doc.add(new BasicDBObject("name", it.region+"Çø").append("value", it.avg_price))
|
||||
prices << it.avg_price
|
||||
}
|
||||
println(JSONArray.fromObject(doc).toString())
|
||||
//DBCollection SQMETRE_RENT_COLL = MongoUtils.getCollectionByName("fangjia", "sqmetre_rent", "mongo.db.fangjia.com")
|
||||
//def query = new BasicDBObject()
|
||||
//query.cat = "region"
|
||||
//query.city= "ÉϺ£"
|
||||
//query.weekend = Date.parse("yyyyMMdd", "20210228")
|
||||
//def doc = []
|
||||
//def prices = []
|
||||
//SQMETRE_RENT_COLL.find(query, new BasicDBObject("region", 1).append("avg_price", 1)).each {
|
||||
// doc.add(new BasicDBObject("name", it.region+"Çø").append("value", it.avg_price))
|
||||
// prices << it.avg_price
|
||||
//}
|
||||
//println(JSONArray.fromObject(doc).toString())
|
||||
DbUtils.seaweed.remove(new BasicDBObject("_id", DbUtils.seaweed.findById("6103bf1c64baf60001e7e1d0")._id))
|
||||
+81
-4
@@ -1,6 +1,11 @@
|
||||
import com.fangjia.core.util.CNNMFilter
|
||||
import com.fangjia.core.util.HttpRequest
|
||||
import com.fangjia.datastore.driver.DSCollection
|
||||
import com.fangjia.datastore.driver.DataStore
|
||||
import com.fangjia.script.util.ElasticUtils
|
||||
import com.fangjia.script.util.ExcelUtils
|
||||
import com.mongodb.BasicDBObject
|
||||
import net.sf.json.JSONObject
|
||||
import org.apache.commons.io.FileUtils
|
||||
|
||||
//
|
||||
@@ -35,7 +40,79 @@ import org.apache.commons.io.FileUtils
|
||||
// println("copy:" + file.getAbsolutePath() + "\tto:" + ("E:\\成交数据\\DBF汇总\\" + file.getName()))
|
||||
// }
|
||||
//}
|
||||
DSCollection seawater = new DataStore("192.168.9.118", 27777).getCollection("fangjia.seawater")
|
||||
seawater.find(new BasicDBObject("cat", "sell").append("city", "上海").append("region", "长宁").append("district_name", "新泾三村")).each {
|
||||
println(it)
|
||||
}
|
||||
//ExcelUtils.multiThreadingModify("D:\\Users\\wenyan\\Desktop\\副本地址标准化验证结果分析.xlsx",{List item->
|
||||
// HttpRequest request = new HttpRequest()
|
||||
// JSONObject json = request.getJsonContent2("http://localhost:8082/structure", ["address": item["A"]], "UTF-8")
|
||||
// if(json){
|
||||
// item["D"] = json.result.province
|
||||
// item["E"] = json.result.city
|
||||
// item["F"] = json.result.district
|
||||
// item["G"] = json.result.dev
|
||||
// item["H"] = json.result.township
|
||||
// item["I"] = json.result.village
|
||||
// item["J"] = json.result.group
|
||||
// item["K"] = json.result.street
|
||||
// item["L"] = json.result.streetNumber
|
||||
// item["M"] = json.result.name
|
||||
// item["N"] = json.result.buildingNumber
|
||||
// item["O"] = json.result.unitNumber
|
||||
// item["P"] = json.result.roomNumber
|
||||
// item["q"] = json.result.floor
|
||||
// item["r"] = json.result.formatAddress
|
||||
// }
|
||||
// println(item)
|
||||
//})
|
||||
//for(int i=1; i < 100; i++){
|
||||
// println("${i}号楼#@#building_number")
|
||||
// println("${i}栋#@#building_number")
|
||||
// println("${i}幢#@#building_number")
|
||||
// println("${i}单元#@#unit_number")
|
||||
// if(i< 20){
|
||||
// println("${CNNMFilter.convertArabicToCnNumeric(String.valueOf(i))}号楼#@#building_number")
|
||||
// println("${CNNMFilter.convertArabicToCnNumeric(String.valueOf(i))}栋#@#building_number")
|
||||
// println("${CNNMFilter.convertArabicToCnNumeric(String.valueOf(i))}幢#@#building_number")
|
||||
// println("${CNNMFilter.convertArabicToCnNumeric(String.valueOf(i))}单元#@#unit_number")
|
||||
// }
|
||||
//}
|
||||
//nums= "abcdefghijklmn"
|
||||
//for(def num : nums.toCharArray()){
|
||||
// println("${num}栋#@#building_number")
|
||||
// println("${num}幢#@#building_number")
|
||||
// println("${num}单元#@#unit_number")
|
||||
//}
|
||||
//nums= "abcdefghijklmn"
|
||||
//for(def num : nums.toCharArray()){
|
||||
// println("${num}座#@#building_number")
|
||||
// for(int i = 1; i <11; i++){
|
||||
// println("${num}${i}座#@#building_number")
|
||||
//// println("${num}${i}幢#@#building_number")
|
||||
//// println("${num}${i}单元#@#unit_number")
|
||||
// }
|
||||
//}
|
||||
//for(int i = 1; i <20; i++){
|
||||
// println("${i}区#@#part_number")
|
||||
// println("${CNNMFilter.convertArabicToCnNumeric(String.valueOf(i))}区#@#part_number")
|
||||
// println("${i}期#@#stage_number")
|
||||
// println("${CNNMFilter.convertArabicToCnNumeric(String.valueOf(i))}期#@#stage_number")
|
||||
//}
|
||||
//
|
||||
//for(def num : "东南北中西甲乙丙丁".toCharArray()){
|
||||
// println("${num}区#@#part_number")
|
||||
//}
|
||||
//for(int i = -5; i < 100; i++){
|
||||
// println("${i}楼#@#floor")
|
||||
// if(i < 10 && i > 0){
|
||||
// println("${CNNMFilter.convertArabicToCnNumeric(String.valueOf(i))}楼#@#floor")
|
||||
// }
|
||||
//}
|
||||
//for(def num : "abcdefg东南西北".toCharArray()){
|
||||
// println("${num}户#@#room")
|
||||
//}
|
||||
//for(i in 1.. 40){
|
||||
// for(j in 1..9){
|
||||
// println("${i}0${j}室#@#room")
|
||||
// }
|
||||
//}
|
||||
ElasticUtils.executeSqlQuery("select * from seawater where cat='sell' and district_name='新泾三村' and city='上海' and p_date > 20210101",{Map doc->
|
||||
println(doc.avg_price + "\t" + doc.root + "\t" + doc.p_date)
|
||||
})
|
||||
+5
@@ -551,6 +551,11 @@ public class CzbankSampleServiceImpl implements CzbankSampleService{
|
||||
if(sample.getFloorNumber() != null && sample.getFloorNumber() > maxFloor){
|
||||
maxFloor = sample.getFloorNumber();
|
||||
}
|
||||
//浙商测试特意添加
|
||||
if(house.getDistrictName().equals("新泾三村") && house.getArea()>=35 && house.getArea()<=55){
|
||||
sample.setDoorNo("502");
|
||||
sample.setBuildingNoName("56");
|
||||
}
|
||||
}
|
||||
List<QueryParam> dealPriceQuery = new ArrayList<QueryParam>();
|
||||
dealPriceQuery.add(new QueryParam("city", city ));
|
||||
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.fangjia.service.sql;
|
||||
|
||||
import com.fangjia.dal.sql.model.BohaiEvaluationAudit;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public interface BohaiEvaluationAuditService {
|
||||
|
||||
void updateBohaiEvaluationAudit(Map<String, Object> data, long id);
|
||||
|
||||
void saveBohaiEvaluationAudit(BohaiEvaluationAudit audit);
|
||||
|
||||
void updateBohaiEvaluationAudit(BohaiEvaluationAudit audit);
|
||||
|
||||
BohaiEvaluationAudit findByBohaiEvaluationAuditId(Long evaluationId);
|
||||
}
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
package com.fangjia.service.sql;
|
||||
|
||||
import com.fangjia.dal.QueryParam;
|
||||
import com.fangjia.dal.sql.fangjia.dao.BohaiEvaluationAuditDao;
|
||||
import com.fangjia.dal.sql.model.BohaiEvaluationAudit;
|
||||
import com.fangjia.dal.sql.model.FjtEvaluation;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class BohaiEvaluationAuditServiceImpl implements BohaiEvaluationAuditService{
|
||||
|
||||
private BohaiEvaluationAuditDao bohaiEvaluationAuditDao;
|
||||
|
||||
public BohaiEvaluationAuditDao getBohaiEvaluationAuditDao() {
|
||||
return bohaiEvaluationAuditDao;
|
||||
}
|
||||
|
||||
public void setBohaiEvaluationAuditDao(BohaiEvaluationAuditDao bohaiEvaluationAuditDao) {
|
||||
this.bohaiEvaluationAuditDao = bohaiEvaluationAuditDao;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateBohaiEvaluationAudit(Map<String, Object> data, long id) {
|
||||
bohaiEvaluationAuditDao.updateById(data, id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveBohaiEvaluationAudit(BohaiEvaluationAudit bohaiEvaluationAudit) {
|
||||
bohaiEvaluationAuditDao.save(bohaiEvaluationAudit);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateBohaiEvaluationAudit(BohaiEvaluationAudit bohaiEvaluationAudit) {
|
||||
bohaiEvaluationAuditDao.update(bohaiEvaluationAudit);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BohaiEvaluationAudit findByBohaiEvaluationAuditId(Long evaluationId) {
|
||||
List<QueryParam> params = new ArrayList<QueryParam>();
|
||||
params.add(new QueryParam("evaluationId", evaluationId));
|
||||
return bohaiEvaluationAuditDao.findFirstByParams(params);
|
||||
}
|
||||
}
|
||||
-1
@@ -912,7 +912,6 @@ public class EvaluationRateServiceImpl implements EvaluationRateService {
|
||||
evaluatePrice = (long) (evaluatePrice * houseFloorRate);
|
||||
}
|
||||
}else{
|
||||
|
||||
int mid = evaluation.getHeight()/2;
|
||||
double num = getFloorRate(mid, flag);
|
||||
evaluatePrice = (long) (evaluatePrice * num * houseFloorRate);
|
||||
|
||||
Reference in New Issue
Block a user