|
|
|
@@ -136,22 +136,27 @@ public class WxRentContractServiceImpl implements WxRentContractService { |
|
|
|
Double rentPrice = rentInfoObject.getDouble("rentPrice"); |
|
|
|
Long price = wxRentContract.getPrice()/100; |
|
|
|
if(rentPrice == null){ |
|
|
|
Double rentArea = Double.parseDouble(wxRentContract.getRentArea()); |
|
|
|
rentPrice = new BigDecimal((float)price/rentArea).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); |
|
|
|
rentInfoObject.put("rentPrice",rentPrice); |
|
|
|
if(wxRentContract.getRentArea() != null) { |
|
|
|
Double rentArea = Double.parseDouble(wxRentContract.getRentArea()); |
|
|
|
rentPrice = new BigDecimal((float) price / rentArea).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); |
|
|
|
rentInfoObject.put("rentPrice", rentPrice); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
wxRentContract.setRentInfo(rentInfoArray.toJSONString()); |
|
|
|
}else{ |
|
|
|
if(wxRentContract.getRentPrice() == null || "0".equals(wxRentContract.getRentPrice())){ |
|
|
|
Long price = wxRentContract.getPrice()/100; |
|
|
|
Double rentArea = Double.parseDouble(wxRentContract.getRentArea()); |
|
|
|
Double rentPrice = new BigDecimal((float)price/rentArea).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); |
|
|
|
if(rentPrice > 0){ |
|
|
|
wxRentContract.setRentPrice(rentPrice.toString()); |
|
|
|
}else{ |
|
|
|
wxRentContract.setRentPrice("0"); |
|
|
|
if(wxRentContract.getRentArea() != null){ |
|
|
|
Long price = wxRentContract.getPrice()/100; |
|
|
|
Double rentArea = Double.parseDouble(wxRentContract.getRentArea()); |
|
|
|
Double rentPrice = new BigDecimal((float)price/rentArea).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); |
|
|
|
if(rentPrice > 0){ |
|
|
|
wxRentContract.setRentPrice(rentPrice.toString()); |
|
|
|
}else{ |
|
|
|
wxRentContract.setRentPrice("0"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
if(wxRentContract.getPriceUnit() == null){ |
|
|
|
|