Просмотр исходного кода

[BUG][修改][dev version:.1465.1929:多经点位的物业账单-物业单价提交多除以100]

release_toaliyun_real
gongbiao 7 лет назад
Родитель
Сommit
bad5f32046
1 измененных файлов: 5 добавлений и 4 удалений
  1. +5
    -4
      mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java

+ 5
- 4
mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java Просмотреть файл

@@ -118,7 +118,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService
if(rentPrice == null){ if(rentPrice == null){
if(StringUtils.isNotBlank(wxPropertyContract.getRentArea()) && !"0".equals(wxPropertyContract.getRentArea()) && !"0.00".equals(wxPropertyContract.getRentArea())&& !"0.0".equals(wxPropertyContract.getRentArea()) ) { if(StringUtils.isNotBlank(wxPropertyContract.getRentArea()) && !"0".equals(wxPropertyContract.getRentArea()) && !"0.00".equals(wxPropertyContract.getRentArea())&& !"0.0".equals(wxPropertyContract.getRentArea()) ) {
Double rentArea = Double.parseDouble(wxPropertyContract.getRentArea()); Double rentArea = Double.parseDouble(wxPropertyContract.getRentArea());
rentPrice = new BigDecimal((float) price / rentArea).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
rentPrice = new BigDecimal((double) price / rentArea).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
rentInfoObject.put("rentPrice", rentPrice); rentInfoObject.put("rentPrice", rentPrice);
} }
} }
@@ -127,9 +127,10 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService
}else{ }else{
if(StringUtils.isNotBlank(wxPropertyContract.getRentArea()) && !"0".equals(wxPropertyContract.getRentArea()) && !"0.00".equals(wxPropertyContract.getRentArea())&& !"0.0".equals(wxPropertyContract.getRentArea()) ) { if(StringUtils.isNotBlank(wxPropertyContract.getRentArea()) && !"0".equals(wxPropertyContract.getRentArea()) && !"0.00".equals(wxPropertyContract.getRentArea())&& !"0.0".equals(wxPropertyContract.getRentArea()) ) {
if(StringUtils.isNotBlank(wxPropertyContract.getRentArea()) && !"0".equals(wxPropertyContract.getRentArea()) && !"0.00".equals(wxPropertyContract.getRentArea())) { if(StringUtils.isNotBlank(wxPropertyContract.getRentArea()) && !"0".equals(wxPropertyContract.getRentArea()) && !"0.00".equals(wxPropertyContract.getRentArea())) {
Long price = wxPropertyContract.getPrice() / 100;
Double rentArea = Double.parseDouble(wxPropertyContract.getRentArea());
Double rentPrice = new BigDecimal((float) price / rentArea).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
Long price = wxPropertyContract.getPrice();
Double rentArea = Double.parseDouble(wxPropertyContract.getRentArea()) * 100;
Double rentPrice = new BigDecimal((double) price / rentArea).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
rentPrice = rentPrice * 100;
if (rentPrice > 0) { if (rentPrice > 0) {
wxPropertyContract.setRentPrice(rentPrice.toString()); wxPropertyContract.setRentPrice(rentPrice.toString());
} else { } else {


Загрузка…
Отмена
Сохранить