|
|
|
@@ -8,6 +8,8 @@ import com.iformall.common.SortColumn; |
|
|
|
import com.iformall.domain.po.base.TenantEntity; |
|
|
|
import com.iformall.enums.EnumPriceUnit; |
|
|
|
import com.iformall.enums.EnumRentContractAdjustPeriod; |
|
|
|
import com.iformall.enums.EnumRentContractType; |
|
|
|
|
|
|
|
import lombok.Data; |
|
|
|
import lombok.EqualsAndHashCode; |
|
|
|
import lombok.ToString; |
|
|
|
@@ -450,8 +452,11 @@ public class WxRentContract extends TenantEntity { |
|
|
|
// } |
|
|
|
|
|
|
|
public void calcutePrice() { |
|
|
|
if (StringUtils.isNoneBlank(this.rentArea) && StringUtils.isNotBlank(this.rentPrice)) { |
|
|
|
this.price = new BigDecimal(this.rentArea).multiply(new BigDecimal(this.rentPrice)).setScale(this.decimalSize, RoundingMode.HALF_UP).toPlainString(); |
|
|
|
//如果是按铺位数算,price不用计算,是填写的值 |
|
|
|
if (!this.type.equals(EnumRentContractType.RENT_BY_COUNT.getCode())) { |
|
|
|
if (StringUtils.isNoneBlank(this.rentArea) && StringUtils.isNotBlank(this.rentPrice)) { |
|
|
|
this.price = new BigDecimal(this.rentArea).multiply(new BigDecimal(this.rentPrice)).setScale(this.decimalSize, RoundingMode.HALF_UP).toPlainString(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|