Merge branch 'master' of http://gitlab.fangjia.com/dev0/main into script_gj
This commit is contained in:
+30
-30
@@ -386,24 +386,24 @@ public class FshController {
|
||||
Double oneMonthMarkup = null;
|
||||
Evaluation evaluation = null;
|
||||
if(model.isYouDa()){
|
||||
if("上海".equals(model.getCity())){
|
||||
YdDealPrice ydDealPrice = ydDealPriceService.findYdDealPrice(model.getCity(), model.getDistrict(), model.getName());
|
||||
if(ydDealPrice == null){
|
||||
mav.setModel(BasicModel.buildOKModel().setMsg("该小区暂不支持估价").markNoData());
|
||||
return mav;
|
||||
}else{
|
||||
evaluation = evaluationService.ydEvaluate(district, buildYdEvaluation(model, request), model.getCalDate(),ydDealPrice.getPrice());
|
||||
//近30天的涨跌幅:取最近1个月至3个月之间最近的那期价格和当前均价相比
|
||||
Date end = DateUtil.getDateOfLastMonth(new Date(),-1);
|
||||
Date start = DateUtil.getDateOfLastMonth(new Date(),-3);
|
||||
List<YdDealPrice> ydDealPrices = ydDealPriceService.findYdDealPrices(model.getCity(), model.getDistrict(), model.getName(),start,end);
|
||||
if(ydDealPrices!=null && ydDealPrices.size()>0){
|
||||
oneMonthMarkup = (double)(ydDealPrices.get(0).getPrice()-ydDealPrice.getPrice())/ydDealPrice.getPrice();
|
||||
}
|
||||
}
|
||||
}else{
|
||||
// if("上海".equals(model.getCity())){
|
||||
// YdDealPrice ydDealPrice = ydDealPriceService.findYdDealPrice(model.getCity(), model.getDistrict(), model.getName());
|
||||
// if(ydDealPrice == null){
|
||||
// mav.setModel(BasicModel.buildOKModel().setMsg("该小区暂不支持估价").markNoData());
|
||||
// return mav;
|
||||
// }else{
|
||||
// evaluation = evaluationService.ydEvaluate(district, buildYdEvaluation(model, request), model.getCalDate(),ydDealPrice.getPrice());
|
||||
// //近30天的涨跌幅:取最近1个月至3个月之间最近的那期价格和当前均价相比
|
||||
// Date end = DateUtil.getDateOfLastMonth(new Date(),-1);
|
||||
// Date start = DateUtil.getDateOfLastMonth(new Date(),-3);
|
||||
// List<YdDealPrice> ydDealPrices = ydDealPriceService.findYdDealPrices(model.getCity(), model.getDistrict(), model.getName(),start,end);
|
||||
// if(ydDealPrices!=null && ydDealPrices.size()>0){
|
||||
// oneMonthMarkup = (double)(ydDealPrices.get(0).getPrice()-ydDealPrice.getPrice())/ydDealPrice.getPrice();
|
||||
// }
|
||||
// }
|
||||
// }else{
|
||||
evaluation = evaluationService.evaluate(district, buildYdEvaluation(model, request), model.getCalDate());
|
||||
}
|
||||
// }
|
||||
}else{
|
||||
evaluation = evaluationService.evaluate(district, buildEvaluation(model, request), model.getCalDate());
|
||||
}
|
||||
@@ -1163,18 +1163,18 @@ public class FshController {
|
||||
|
||||
private Map<String, Integer> buildDistrictAvgZouShiByMonth(DistrictModel model,DistrictKey districtKey, Date end, Date start) {
|
||||
Map<String, List<Integer>> avgPriceDetailMap = new HashMap<String, List<Integer>>();
|
||||
if(model.isYouDa() && "上海".equals(model.getCityName())){
|
||||
List<YdDealPrice> list = ydDealPriceService.findYdDealPrices(districtKey.getCity(), districtKey.getRegion(), districtKey.getName(), start, end);
|
||||
for (YdDealPrice stat : list) {
|
||||
String ws = DateUtil.formatByPattern(stat.getWeekend(), "yyyy-MM");
|
||||
List<Integer> prices = avgPriceDetailMap.get(ws);
|
||||
if(null == prices){
|
||||
prices = new ArrayList<Integer>();
|
||||
avgPriceDetailMap.put(ws, prices);
|
||||
}
|
||||
prices.add(stat.getPrice());
|
||||
}
|
||||
}else{
|
||||
// if(model.isYouDa() && "上海".equals(model.getCityName())){
|
||||
// List<YdDealPrice> list = ydDealPriceService.findYdDealPrices(districtKey.getCity(), districtKey.getRegion(), districtKey.getName(), start, end);
|
||||
// for (YdDealPrice stat : list) {
|
||||
// String ws = DateUtil.formatByPattern(stat.getWeekend(), "yyyy-MM");
|
||||
// List<Integer> prices = avgPriceDetailMap.get(ws);
|
||||
// if(null == prices){
|
||||
// prices = new ArrayList<Integer>();
|
||||
// avgPriceDetailMap.put(ws, prices);
|
||||
// }
|
||||
// prices.add(stat.getPrice());
|
||||
// }
|
||||
// }else{
|
||||
List<DistrictStat> list = districtStatService.findDistrictPrice(districtKey.getCity(), districtKey.getRegion(), districtKey.getName(), start, end);
|
||||
for (DistrictStat stat : list) {
|
||||
String ws = DateUtil.formatByPattern(stat.getWeekend(), "yyyy-MM");
|
||||
@@ -1185,7 +1185,7 @@ public class FshController {
|
||||
}
|
||||
prices.add(stat.getAvgPrice());
|
||||
}
|
||||
}
|
||||
// }
|
||||
|
||||
Map<String, Integer> districtMap = new HashMap<String, Integer>();
|
||||
if(null != avgPriceDetailMap){
|
||||
|
||||
+2
-2
@@ -309,7 +309,7 @@ public class HouseToCController {
|
||||
params.put("token", token);
|
||||
params.put("size", query.getArea());
|
||||
params.put("app", "youda");// open保存估价记录
|
||||
params.put("youDa", true);
|
||||
//params.put("youDa", true);
|
||||
if (houseInfo.getFloor() != 0 && houseInfo.getHeight() != 0) {
|
||||
params.put("floor", houseInfo.getFloor());
|
||||
params.put("maxFloor", houseInfo.getHeight());
|
||||
@@ -601,7 +601,7 @@ public class HouseToCController {
|
||||
params.put("name", name);
|
||||
params.put("type", type * (-1));
|
||||
params.put("evalDate", DateUtils.date2Str(houseInfo.getEvalTime()));
|
||||
params.put("youDa", true);
|
||||
//params.put("youDa", true);
|
||||
|
||||
DistrictEvaluateSingleDto result = openApiProxyService.getProxyService(FshApiRemoteService.class)
|
||||
.getFshDistPriceTrends(params);
|
||||
|
||||
Reference in New Issue
Block a user