Merge branch 'master' of http://gitlab.fangjia.com/dev0/main into script_gj

This commit is contained in:
2022-10-12 09:42:50 +08:00
2 changed files with 32 additions and 32 deletions
@@ -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){
@@ -309,7 +309,7 @@ public class HouseToCController {
params.put("token", token); params.put("token", token);
params.put("size", query.getArea()); params.put("size", query.getArea());
params.put("app", "youda");// open保存估价记录 params.put("app", "youda");// open保存估价记录
params.put("youDa", true); //params.put("youDa", true);
if (houseInfo.getFloor() != 0 && houseInfo.getHeight() != 0) { if (houseInfo.getFloor() != 0 && houseInfo.getHeight() != 0) {
params.put("floor", houseInfo.getFloor()); params.put("floor", houseInfo.getFloor());
params.put("maxFloor", houseInfo.getHeight()); params.put("maxFloor", houseInfo.getHeight());
@@ -601,7 +601,7 @@ public class HouseToCController {
params.put("name", name); params.put("name", name);
params.put("type", type * (-1)); params.put("type", type * (-1));
params.put("evalDate", DateUtils.date2Str(houseInfo.getEvalTime())); params.put("evalDate", DateUtils.date2Str(houseInfo.getEvalTime()));
params.put("youDa", true); //params.put("youDa", true);
DistrictEvaluateSingleDto result = openApiProxyService.getProxyService(FshApiRemoteService.class) DistrictEvaluateSingleDto result = openApiProxyService.getProxyService(FshApiRemoteService.class)
.getFshDistPriceTrends(params); .getFshDistPriceTrends(params);