渤海修改

This commit is contained in:
2021-11-09 14:12:36 +08:00
parent 166ca8f710
commit 0fd52bd622
21 changed files with 2111 additions and 53 deletions
@@ -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> {
}
@@ -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{
}
@@ -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{" +
@@ -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;
@@ -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;
}
}
@@ -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;
// }
}
@@ -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>&nbsp;万元</span></p><p><label>报告收费:</label><span>" + (this.bgsf!=null?this.bgsf+"&nbsp;元":'-') + "</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 += "&nbsp;万元</span></p><p><label>参考价:</label><span>" + this.ckj;
html += "&nbsp;万元</span></p><p><label>期望价:</label><span>" + this.qwj;
}
if (this.ckj == "-") {
if (this.qwj == "-") {
html += "</span></p><p><label>终审价:</label><span>";
} else {
html += "&nbsp;万元</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 + "&nbsp;平米</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 += "&nbsp;万元</span></p><p><label>期望价:</label><span>" + this.ckj;
}
if (this.ckj == "-") {
html += "</span></p><p><label>终审价:</label><span>";
} else {
html += "&nbsp;万元</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>&nbsp;万元</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>&nbsp;万元</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 + "&nbsp;平米</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,430 @@
<#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;">重新评估&nbsp;></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>&nbsp;万元</#if></p>
<p>评估单价:<#if bohaiEvaluationAudit.inquirePrice gt 0>${(bohaiEvaluationAudit.inquirePrice/fjtEvaluation.houseArea)?int}</#if>&nbsp;元/平米</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">估价记录&nbsp;></a>
</div>
</div>
<#if bohaiEvaluationAudit?? && bohaiEvaluationAudit.auditStatus!=0>
<#if role?? && (role==12 || role==16 || role==17)>
<#if bohaiEvaluationAudit?? && 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>&nbsp;万元</span><br>
<span style="display:block;margin-top:-10px;">期望价:${(bohaiEvaluationAudit.hopePrice!/10000)?int}&nbsp;万元</span>
</div>
</div>
<#else>
<#if bohaiEvaluationAudit?? && bohaiEvaluationAudit.hopePrice??>
<div class="topic inputTopic01" id="inputTopic01b">
<div class="topicTitle topicTitle01">
<span>期望价:${(bohaiEvaluationAudit.hopePrice!/10000)?int}&nbsp;万元</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">&nbsp;万元
<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>&nbsp;万元</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>备&nbsp;&nbsp;&nbsp;&nbsp;注:</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.##')}&nbsp;平米</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>&nbsp;元/平米</span></p>
<p id="minPrice"><label>成交案例最低单价:</label><span><font></font>&nbsp;元/平米</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>
@@ -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);
}
@@ -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);
}
}