修复BUG
This commit is contained in:
+15
-13
@@ -300,20 +300,22 @@ public class OfficeServiceImpl implements OfficeService {
|
||||
|
||||
// 第二步:基准价*楼层系数*装修系数*朝向系数
|
||||
OfficeSellStat officeSellStat = officeSellStatDao.findFirstByParams(params);
|
||||
Double avgPrice = Double.valueOf(officeSellStat.getAvgPrice());
|
||||
if (avgPrice != null) {
|
||||
Double factor = 1.0;
|
||||
if (evaluation.getFitment() != null) {
|
||||
factor *= FITMENT_FACTOR.get(FITMENT_MAP.get(evaluation.getFitment()));
|
||||
if (officeSellStat != null) {
|
||||
Double avgPrice = Double.valueOf(officeSellStat.getAvgPrice());
|
||||
if (avgPrice != null) {
|
||||
Double factor = 1.0;
|
||||
if (evaluation.getFitment() != null) {
|
||||
factor *= FITMENT_FACTOR.get(FITMENT_MAP.get(evaluation.getFitment()));
|
||||
}
|
||||
if (floorDesc != null) {
|
||||
factor *= FLOOR_FACTOR.get(floorDesc);
|
||||
}
|
||||
if (evaluation.getDirection() != null) {
|
||||
factor *= DIRECTION_FACTOR.get(DIRECTION_MAP.get(evaluation.getDirection()));
|
||||
}
|
||||
avgPrice = avgPrice * factor;
|
||||
return getOfficeEvaluationDtoWithAvgPrice(avgPrice, evaluation, "office_sell");
|
||||
}
|
||||
if (floorDesc != null) {
|
||||
factor *= FLOOR_FACTOR.get(floorDesc);
|
||||
}
|
||||
if (evaluation.getDirection() != null) {
|
||||
factor *= DIRECTION_FACTOR.get(DIRECTION_MAP.get(evaluation.getDirection()));
|
||||
}
|
||||
avgPrice = avgPrice * factor;
|
||||
return getOfficeEvaluationDtoWithAvgPrice(avgPrice, evaluation, "office_sell");
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user