diff --git a/projects/fangjia-coresite/src/main/webapp/company/about.ftl b/projects/fangjia-coresite/src/main/webapp/company/about.ftl
index 39fee4100..778557075 100644
--- a/projects/fangjia-coresite/src/main/webapp/company/about.ftl
+++ b/projects/fangjia-coresite/src/main/webapp/company/about.ftl
@@ -54,7 +54,6 @@
房价网æˆ�立于2006年,隶属于上海估家网络科技有é™�å…¬å�¸ï¼Œè‡´åŠ›äºŽå»ºç«‹ä¸å›½é¢†å…ˆçš„æˆ¿äº§å¤§æ•°æ�®åº“CPDBå�ŠæŽ¨åŠ¨åŸºäºŽåœ°ç�†ä½�置的人工智能的å�‘展和应用。公å�¸ä»¥â€œå�‘现地å�€ä»·å€¼â€�为使命,始终秉承客观严谨的æ€�度为政府ã€�银行ã€�金èž�机构ç‰å®¢æˆ·æ��供大数æ�®ã€�建模ã€�å’¨è¯¢ç‰æœ�务。目å‰�,所积累的房产数æ�®å·²è¦†ç›–全国367个城市å�Šåœ°åŒºï¼ŒæŠ€æœ¯åŠ›é‡�强大,客户查询é‡�行业领先。
å…¬å�¸åœ¨è´·å‰�估值ã€�内评系统ã€�è´·å�Žæ‰¹é‡�å¤�ä¼°ã€�信贷授信ã€�地å�€å��欺诈ã€�æ•°æ�®æ²»ç�†ã€�精准è�¥é”€ç‰é¢†åŸŸéƒ½æœ‰ç�€ä¸°å¯Œçš„ç»�验,拥有多项专利,被评为高新技术ä¼�业,赢得了国家统计局ã€�建设银行ã€�农业银行ã€�平安集团ã€�微众银行ç‰ä¼—多客户的信赖。
-
2020年,å�—京三悦网络科技有é™�å…¬å�¸ä¸Žæˆ‘å�¸è¾¾æˆ�å…¨é�¢æˆ˜ç•¥å�ˆä½œï¼Œå¹¶æŽ¥å�—我å�¸å§”托,全æ�ƒè´Ÿè´£æˆ‘å�¸äº§å“�手机版“房价网â€�公众å�·å’Œç”µè„‘版的“房价通â€�的市场推广ã€�客户开å�‘与售å�Žæœ�务;有æ�ƒç›´æŽ¥ä¸Žå®¢æˆ·ç¾è®¢ä¸Šè¿°äº§å“�的销售å�ˆå�Œï¼›æˆ‘å�¸å¯¹å…¶æ‰€æœ‰ç”¨æˆ·å…¨é�¢æ��供产å“�å�‡çº§ã€�æ•°æ�®æ›´æ–°å�Šçº¿ä¸Šå”®å�Žç‰æœ�务。
数�为大众�务
diff --git a/projects/fangjia-dal/src/main/java/com/fangjia/dal/sql/fangjia/dao/BohaiEvaluationAuditDao.java b/projects/fangjia-dal/src/main/java/com/fangjia/dal/sql/fangjia/dao/BohaiEvaluationAuditDao.java
new file mode 100644
index 000000000..4f8c7d26b
--- /dev/null
+++ b/projects/fangjia-dal/src/main/java/com/fangjia/dal/sql/fangjia/dao/BohaiEvaluationAuditDao.java
@@ -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 {
+}
diff --git a/projects/fangjia-dal/src/main/java/com/fangjia/dal/sql/fangjia/dao/BohaiEvaluationAuditDaoImpl.java b/projects/fangjia-dal/src/main/java/com/fangjia/dal/sql/fangjia/dao/BohaiEvaluationAuditDaoImpl.java
new file mode 100644
index 000000000..1035be137
--- /dev/null
+++ b/projects/fangjia-dal/src/main/java/com/fangjia/dal/sql/fangjia/dao/BohaiEvaluationAuditDaoImpl.java
@@ -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 implements BohaiEvaluationAuditDao{
+}
diff --git a/projects/fangjia-dal/src/main/java/com/fangjia/dal/sql/model/BohaiEvaluationAudit.java b/projects/fangjia-dal/src/main/java/com/fangjia/dal/sql/model/BohaiEvaluationAudit.java
new file mode 100644
index 000000000..adb5b7be6
--- /dev/null
+++ b/projects/fangjia-dal/src/main/java/com/fangjia/dal/sql/model/BohaiEvaluationAudit.java
@@ -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;
+ }
+}
diff --git a/projects/fangjia-dal/src/main/java/com/fangjia/dal/sql/model/FjtEvaluation.java b/projects/fangjia-dal/src/main/java/com/fangjia/dal/sql/model/FjtEvaluation.java
index 4ca4a7f59..c5991df90 100644
--- a/projects/fangjia-dal/src/main/java/com/fangjia/dal/sql/model/FjtEvaluation.java
+++ b/projects/fangjia-dal/src/main/java/com/fangjia/dal/sql/model/FjtEvaluation.java
@@ -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{" +
diff --git a/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/AddressController.java b/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/AddressController.java
index 953611a47..b426d1e8e 100644
--- a/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/AddressController.java
+++ b/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/AddressController.java
@@ -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++) {
diff --git a/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/weixin/DistrictController.java b/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/weixin/DistrictController.java
index a09518625..4cc728b6a 100644
--- a/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/weixin/DistrictController.java
+++ b/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/weixin/DistrictController.java
@@ -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 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 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;
diff --git a/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/weixin/ReportController.java b/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/weixin/ReportController.java
index 3fdb01671..2c75d331e 100644
--- a/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/weixin/ReportController.java
+++ b/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/weixin/ReportController.java
@@ -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;
+ }
}
diff --git a/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/weixin/WeiXinEvaluationController.java b/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/weixin/WeiXinEvaluationController.java
index 7507185f8..6ed2a56fd 100644
--- a/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/weixin/WeiXinEvaluationController.java
+++ b/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/weixin/WeiXinEvaluationController.java
@@ -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 addrAlias = new ArrayList();
+ 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 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 bhDists = BHBankUtils.getDistrictByBhbank(evaluation.getAddress());
+ if(bhDists.size()<1){
+ bhDists = BHBankUtils.getDistrictByBhbank(district.getName());
+ }
+ Map bhMatchMap = new HashMap();
+ 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 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 data = new HashMap();
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 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 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 dataMap = new HashMap();
+ 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;
+ }
}
diff --git a/projects/fangjia-open/src/main/java/com/fangjia/open/model/weixin/DistrictModel.java b/projects/fangjia-open/src/main/java/com/fangjia/open/model/weixin/DistrictModel.java
index 3f0b81226..5f9c5a223 100644
--- a/projects/fangjia-open/src/main/java/com/fangjia/open/model/weixin/DistrictModel.java
+++ b/projects/fangjia-open/src/main/java/com/fangjia/open/model/weixin/DistrictModel.java
@@ -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;//²³º£½Ó¿Ú--µØÖ·
/**
* ÅжÏÊDz»ÊÇÓÑ´ï
@@ -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;
+// }
}
diff --git a/projects/fangjia-open/src/main/java/com/fangjia/open/model/weixin/EvaluationModel.java b/projects/fangjia-open/src/main/java/com/fangjia/open/model/weixin/EvaluationModel.java
index 1282b227f..f6cd5a7fd 100644
--- a/projects/fangjia-open/src/main/java/com/fangjia/open/model/weixin/EvaluationModel.java
+++ b/projects/fangjia-open/src/main/java/com/fangjia/open/model/weixin/EvaluationModel.java
@@ -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 evaluations;
@@ -40,6 +42,12 @@ public class EvaluationModel extends BaseModel{
private Integer role;
private String cardId;
private Map 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 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;
+// }
}
diff --git a/projects/fangjia-open/src/main/java/com/fangjia/open/util/BHBankUtils.java b/projects/fangjia-open/src/main/java/com/fangjia/open/util/BHBankUtils.java
new file mode 100644
index 000000000..06d9f05f6
--- /dev/null
+++ b/projects/fangjia-open/src/main/java/com/fangjia/open/util/BHBankUtils.java
@@ -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 regionCodeMap = new HashMap(){{
+ 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 getDistrictByBhbank(String address){
+
+ List list = new ArrayList();
+ 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 bhMatchMap, UsersDetail usersDetail, int fjwTotalPrice){
+ List list = new ArrayList();
+ 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 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 list = new ArrayList();
+ 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 list = new ArrayList();
+ Map params = new HashMap();
+ params.put("queryId",queryId);
+ params.put("userName",name);
+ params.put("feedbackMsg","ÆÚÍû¼Û£º"+hopePrice+"Íò");
+
+ List 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 list = new ArrayList();
+ 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;
+ }
+}
diff --git a/projects/fangjia-open/src/main/resources/persistence-goojia-fangjia.xml b/projects/fangjia-open/src/main/resources/persistence-goojia-fangjia.xml
index fea498f8a..a853e4c82 100644
--- a/projects/fangjia-open/src/main/resources/persistence-goojia-fangjia.xml
+++ b/projects/fangjia-open/src/main/resources/persistence-goojia-fangjia.xml
@@ -15,6 +15,7 @@
com.fangjia.dal.sql.model.UsersDetail
com.fangjia.dal.sql.model.EvaluationAudit
com.fangjia.dal.sql.model.GoldLogs
+ com.fangjia.dal.sql.model.BohaiEvaluationAudit
true
\ No newline at end of file
diff --git a/projects/fangjia-open/src/main/webapp/district/weXinList.ftl b/projects/fangjia-open/src/main/webapp/district/weXinList.ftl
index 62e8a4f8d..3e07b5ef4 100644
--- a/projects/fangjia-open/src/main/webapp/district/weXinList.ftl
+++ b/projects/fangjia-open/src/main/webapp/district/weXinList.ftl
@@ -50,7 +50,12 @@
<#if type?? && type == 'b'>