|
|
|
@@ -111,7 +111,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService |
|
|
|
Double rentPrice = rentInfoObject.getDouble("rentPrice"); |
|
|
|
Long price = wxPropertyContract.getPrice()/100; |
|
|
|
if(rentPrice == null){ |
|
|
|
if(StringUtils.isNotBlank(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()); |
|
|
|
rentPrice = new BigDecimal((float) price / rentArea).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); |
|
|
|
rentInfoObject.put("rentPrice", rentPrice); |
|
|
|
@@ -120,8 +120,8 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService |
|
|
|
} |
|
|
|
wxPropertyContract.setRentInfo(rentInfoArray.toJSONString()); |
|
|
|
}else{ |
|
|
|
if(wxPropertyContract.getRentPrice() == null || "0".equals(wxPropertyContract.getRentPrice())){ |
|
|
|
if(StringUtils.isNotBlank(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())) { |
|
|
|
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(); |
|
|
|
|