修复总价BUG
This commit is contained in:
+4
-3
@@ -747,8 +747,6 @@ public class ComprehensiveQueryController {
|
|||||||
districtPriceMap.put("city", district.getCity());
|
districtPriceMap.put("city", district.getCity());
|
||||||
districtPriceMap.put("district", district.getRegion());
|
districtPriceMap.put("district", district.getRegion());
|
||||||
districtPriceMap.put("name", district.getName());
|
districtPriceMap.put("name", district.getName());
|
||||||
// 修复总价BUG
|
|
||||||
//districtPriceMap.put("totalPrice", evaluation.getBigTotalPrice());
|
|
||||||
if (evaluation.getAvgPrice2b() != null && evaluation.getAvgPrice2b() != 0) {
|
if (evaluation.getAvgPrice2b() != null && evaluation.getAvgPrice2b() != 0) {
|
||||||
districtPriceMap.put("avgPrice", evaluation.getAvgPrice2b());
|
districtPriceMap.put("avgPrice", evaluation.getAvgPrice2b());
|
||||||
} else {
|
} else {
|
||||||
@@ -815,7 +813,10 @@ public class ComprehensiveQueryController {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
// 根据单价重新计算总价
|
||||||
|
Integer avgPrice = (Integer) districtPriceMap.get("avgPrice");
|
||||||
|
totalPrice = new BigDecimal(avgPrice).multiply(new BigDecimal(evaluation.getArea())).longValue();
|
||||||
|
districtPriceMap.put("totalPrice", totalPrice);
|
||||||
return mav;
|
return mav;
|
||||||
} else {
|
} else {
|
||||||
evaluationService.remove(evaluation.getId());
|
evaluationService.remove(evaluation.getId());
|
||||||
|
|||||||
Reference in New Issue
Block a user