修复总价BUG
This commit is contained in:
-42
@@ -755,48 +755,6 @@ public class ComprehensiveQueryController {
|
||||
Long totalPrice = new BigDecimal((Integer)districtPriceMap.get("avgPrice")).multiply(new BigDecimal(evaluation.getArea())).longValue();
|
||||
districtPriceMap.put("totalPrice", totalPrice);
|
||||
|
||||
// 根据城市等 级设置D级可信度
|
||||
ApiUserAuthority apiUserAuthority = apiUserAuthorityService
|
||||
.findByUserId(Long.valueOf(evaluation.getFromUserId()));
|
||||
if (apiUserAuthority != null && null != apiUserAuthority.getCreditLevelStatus()
|
||||
&& apiUserAuthority.getCreditLevelStatus() == 1) {
|
||||
double dCredit = 0.61;
|
||||
if (null != apiUserAuthority.getPriceRatingMap()) {
|
||||
ServerArea serverArea = serverAreaService.findByDisplay(evaluation.getCity());
|
||||
Map<String, Double> rateMap = apiUserAuthority.getPriceRatingMap();
|
||||
if (null != rateMap) {
|
||||
dCredit = rateMap.get(CITYLEVEL_MAP.get(serverArea.getNewCityGrade().toString()));
|
||||
}
|
||||
}
|
||||
Map<String, Object> rMap = getLastEvaluationPrice(district, evaluation, dCredit);
|
||||
|
||||
if (model.getScope() == EVALUATE_SHOW_DETAIL) {
|
||||
if (null != rMap) {
|
||||
if (rMap.containsKey("level")) {
|
||||
districtPriceMap.put("level", rMap.get("level"));
|
||||
}
|
||||
if (rMap.containsKey("other_price")) {
|
||||
districtPriceMap.put("other_price", rMap.get("other_price"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Long lastPrice = (Long) rMap.get("lastPrice");
|
||||
|
||||
if (null != lastPrice) {
|
||||
districtPriceMap.put("totalPrice", lastPrice);
|
||||
if (lastPrice > 0 && lastPrice != evaluation.getBigTotalPrice()) {
|
||||
districtPriceMap.put("avgPrice", (int) (lastPrice / evaluation.getArea()));
|
||||
}
|
||||
} else {
|
||||
mav.setModel(BasicModel.buildOKModel().setMsg("暂时不支持该小区的估价").markNoData());
|
||||
return mav;
|
||||
}
|
||||
|
||||
} else {
|
||||
districtPriceMap.put("totalPrice", evaluation.getBigTotalPrice());
|
||||
}
|
||||
|
||||
if (model.getScope() == EVALUATE_SHOW_DETAIL) {
|
||||
districtPriceMap.put("evaluateWay", evaluation.getEvaluateWay());
|
||||
districtPriceMap.put("credit", evaluation.getCredit());
|
||||
|
||||
Reference in New Issue
Block a user