Merge branch 'open_bohai' into 'master'

去友达参数

See merge request !401
This commit is contained in:
2022-10-11 21:25:59 +08:00
@@ -386,24 +386,24 @@ public class FshController {
Double oneMonthMarkup = null; Double oneMonthMarkup = null;
Evaluation evaluation = null; Evaluation evaluation = null;
if(model.isYouDa()){ if(model.isYouDa()){
if("上海".equals(model.getCity())){ // if("上海".equals(model.getCity())){
YdDealPrice ydDealPrice = ydDealPriceService.findYdDealPrice(model.getCity(), model.getDistrict(), model.getName()); // YdDealPrice ydDealPrice = ydDealPriceService.findYdDealPrice(model.getCity(), model.getDistrict(), model.getName());
if(ydDealPrice == null){ // if(ydDealPrice == null){
mav.setModel(BasicModel.buildOKModel().setMsg("该小区暂不支持估价").markNoData()); // mav.setModel(BasicModel.buildOKModel().setMsg("该小区暂不支持估价").markNoData());
return mav; // return mav;
}else{ // }else{
evaluation = evaluationService.ydEvaluate(district, buildYdEvaluation(model, request), model.getCalDate(),ydDealPrice.getPrice()); // evaluation = evaluationService.ydEvaluate(district, buildYdEvaluation(model, request), model.getCalDate(),ydDealPrice.getPrice());
//近30天的涨跌幅:取最近1个月至3个月之间最近的那期价格和当前均价相比 // //近30天的涨跌幅:取最近1个月至3个月之间最近的那期价格和当前均价相比
Date end = DateUtil.getDateOfLastMonth(new Date(),-1); // Date end = DateUtil.getDateOfLastMonth(new Date(),-1);
Date start = DateUtil.getDateOfLastMonth(new Date(),-3); // Date start = DateUtil.getDateOfLastMonth(new Date(),-3);
List<YdDealPrice> ydDealPrices = ydDealPriceService.findYdDealPrices(model.getCity(), model.getDistrict(), model.getName(),start,end); // List<YdDealPrice> ydDealPrices = ydDealPriceService.findYdDealPrices(model.getCity(), model.getDistrict(), model.getName(),start,end);
if(ydDealPrices!=null && ydDealPrices.size()>0){ // if(ydDealPrices!=null && ydDealPrices.size()>0){
oneMonthMarkup = (double)(ydDealPrices.get(0).getPrice()-ydDealPrice.getPrice())/ydDealPrice.getPrice(); // oneMonthMarkup = (double)(ydDealPrices.get(0).getPrice()-ydDealPrice.getPrice())/ydDealPrice.getPrice();
} // }
} // }
}else{ // }else{
evaluation = evaluationService.evaluate(district, buildYdEvaluation(model, request), model.getCalDate()); evaluation = evaluationService.evaluate(district, buildYdEvaluation(model, request), model.getCalDate());
} // }
}else{ }else{
evaluation = evaluationService.evaluate(district, buildEvaluation(model, request), model.getCalDate()); 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) { private Map<String, Integer> buildDistrictAvgZouShiByMonth(DistrictModel model,DistrictKey districtKey, Date end, Date start) {
Map<String, List<Integer>> avgPriceDetailMap = new HashMap<String, List<Integer>>(); Map<String, List<Integer>> avgPriceDetailMap = new HashMap<String, List<Integer>>();
if(model.isYouDa() && "上海".equals(model.getCityName())){ // if(model.isYouDa() && "上海".equals(model.getCityName())){
List<YdDealPrice> list = ydDealPriceService.findYdDealPrices(districtKey.getCity(), districtKey.getRegion(), districtKey.getName(), start, end); // List<YdDealPrice> list = ydDealPriceService.findYdDealPrices(districtKey.getCity(), districtKey.getRegion(), districtKey.getName(), start, end);
for (YdDealPrice stat : list) { // for (YdDealPrice stat : list) {
String ws = DateUtil.formatByPattern(stat.getWeekend(), "yyyy-MM"); // String ws = DateUtil.formatByPattern(stat.getWeekend(), "yyyy-MM");
List<Integer> prices = avgPriceDetailMap.get(ws); // List<Integer> prices = avgPriceDetailMap.get(ws);
if(null == prices){ // if(null == prices){
prices = new ArrayList<Integer>(); // prices = new ArrayList<Integer>();
avgPriceDetailMap.put(ws, prices); // avgPriceDetailMap.put(ws, prices);
} // }
prices.add(stat.getPrice()); // prices.add(stat.getPrice());
} // }
}else{ // }else{
List<DistrictStat> list = districtStatService.findDistrictPrice(districtKey.getCity(), districtKey.getRegion(), districtKey.getName(), start, end); List<DistrictStat> list = districtStatService.findDistrictPrice(districtKey.getCity(), districtKey.getRegion(), districtKey.getName(), start, end);
for (DistrictStat stat : list) { for (DistrictStat stat : list) {
String ws = DateUtil.formatByPattern(stat.getWeekend(), "yyyy-MM"); String ws = DateUtil.formatByPattern(stat.getWeekend(), "yyyy-MM");
@@ -1185,7 +1185,7 @@ public class FshController {
} }
prices.add(stat.getAvgPrice()); prices.add(stat.getAvgPrice());
} }
} // }
Map<String, Integer> districtMap = new HashMap<String, Integer>(); Map<String, Integer> districtMap = new HashMap<String, Integer>();
if(null != avgPriceDetailMap){ if(null != avgPriceDetailMap){