| @@ -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 { | ||||