Merge remote-tracking branch 'origin/master'
This commit is contained in:
+4
-2
@@ -3665,12 +3665,14 @@ public Object checkUserAction(EvaluationModel model, HttpServletRequest req, Htt
|
|||||||
SimpleDateFormat format = new SimpleDateFormat("yyyy.MM");
|
SimpleDateFormat format = new SimpleDateFormat("yyyy.MM");
|
||||||
for (Date key : districtStatMap.keySet()) {
|
for (Date key : districtStatMap.keySet()) {
|
||||||
DistrictStat ds = districtStatMap.get(key);
|
DistrictStat ds = districtStatMap.get(key);
|
||||||
districtMap.put(format.format(ds.getWeekend()),ds.getAvgPrice());
|
Integer avgPrice = ds.getAvg_price_2b() != null ? ds.getAvg_price_2b() : ds.getAvgPrice();
|
||||||
|
districtMap.put(format.format(ds.getWeekend()), avgPrice);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Date key : villaDistrictStatMap.keySet()) {
|
for (Date key : villaDistrictStatMap.keySet()) {
|
||||||
DistrictStat ds = villaDistrictStatMap.get(key);
|
DistrictStat ds = villaDistrictStatMap.get(key);
|
||||||
districtMap.put(format.format(ds.getWeekend()),ds.getAvgPrice());
|
Integer avgPrice = ds.getAvg_price_2b() != null ? ds.getAvg_price_2b() : ds.getAvgPrice();
|
||||||
|
districtMap.put(format.format(ds.getWeekend()), avgPrice);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+7
-2
@@ -1,5 +1,6 @@
|
|||||||
package com.fangjia.service.datastore;
|
package com.fangjia.service.datastore;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
@@ -338,7 +339,10 @@ public class EvaluationServiceImpl implements EvaluationService {
|
|||||||
if(useAvgMode) {
|
if(useAvgMode) {
|
||||||
DistrictStatBo districtStatBo = districtStatService.findDistrictStat(districtKey);
|
DistrictStatBo districtStatBo = districtStatService.findDistrictStat(districtKey);
|
||||||
if (districtStatBo != null && districtStatBo.getDefaultDistrictStat() != null && districtStatBo.getDefaultDistrictStat().getAvgPrice() > 0) {
|
if (districtStatBo != null && districtStatBo.getDefaultDistrictStat() != null && districtStatBo.getDefaultDistrictStat().getAvgPrice() > 0) {
|
||||||
long totalPrice = evaluationRateService.evaluation(districtStatBo.getDefaultDistrictStat().getAvgPrice(), evaluation);
|
Double avgPrice = (double) (districtStatBo.getDefaultDistrictStat().getAvg_price_2b() != null ? districtStatBo.getDefaultDistrictStat().getAvg_price_2b() : districtStatBo.getDefaultDistrictStat().getAvgPrice());
|
||||||
|
// 均价乘以系数
|
||||||
|
avgPrice *= 1.04;
|
||||||
|
long totalPrice = evaluationRateService.evaluation(BigDecimal.valueOf(avgPrice).setScale(0, BigDecimal.ROUND_HALF_UP).intValue(), evaluation);
|
||||||
avgModeValue = ((Number) (totalPrice)).intValue();
|
avgModeValue = ((Number) (totalPrice)).intValue();
|
||||||
avgModeCredit = districtStatBo.getDefaultDistrictStat().getCredit();
|
avgModeCredit = districtStatBo.getDefaultDistrictStat().getCredit();
|
||||||
}
|
}
|
||||||
@@ -1898,7 +1902,8 @@ public class EvaluationServiceImpl implements EvaluationService {
|
|||||||
private void buildWeekAvgPrice(EvaluationBeforeLoanBean dto, Evaluation evaluation) {
|
private void buildWeekAvgPrice(EvaluationBeforeLoanBean dto, Evaluation evaluation) {
|
||||||
DistrictStatBo bo = getNearestDistrictStat(new DistrictKey(evaluation.getCity(), evaluation.getRegion(), evaluation.getDistrictName()));
|
DistrictStatBo bo = getNearestDistrictStat(new DistrictKey(evaluation.getCity(), evaluation.getRegion(), evaluation.getDistrictName()));
|
||||||
if (bo != null) {
|
if (bo != null) {
|
||||||
dto.setWeekAvgPrice(bo.getDistrictStat().getAvgPrice());
|
Integer avgPrice = bo.getDistrictStat().getAvg_price_2b() != null ? bo.getDistrictStat().getAvg_price_2b() : bo.getDistrictStat().getAvgPrice();
|
||||||
|
dto.setWeekAvgPrice(avgPrice);
|
||||||
dto.setTopWeekUpDownRange(bo.getDistrictStat().getWeekendMarkup());
|
dto.setTopWeekUpDownRange(bo.getDistrictStat().getWeekendMarkup());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user