修复BUG

This commit is contained in:
沈健
2025-06-26 11:11:22 +08:00
parent 85ef70cca9
commit 3aa2016746
@@ -300,20 +300,22 @@ public class OfficeServiceImpl implements OfficeService {
// 第二步:基准价*楼层系数*装修系数*朝向系数 // 第二步:基准价*楼层系数*装修系数*朝向系数
OfficeSellStat officeSellStat = officeSellStatDao.findFirstByParams(params); OfficeSellStat officeSellStat = officeSellStatDao.findFirstByParams(params);
Double avgPrice = Double.valueOf(officeSellStat.getAvgPrice()); if (officeSellStat != null) {
if (avgPrice != null) { Double avgPrice = Double.valueOf(officeSellStat.getAvgPrice());
Double factor = 1.0; if (avgPrice != null) {
if (evaluation.getFitment() != null) { Double factor = 1.0;
factor *= FITMENT_FACTOR.get(FITMENT_MAP.get(evaluation.getFitment())); 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; return null;