diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java b/mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java
index 1d22bdca0..6ac2f71fb 100644
--- a/mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java
+++ b/mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java
@@ -227,6 +227,8 @@ public class WxRentContract extends TenantEntity {
private Long merchantId;
@io.swagger.annotations.ApiModelProperty(value = "月租金/分成(元)", name = "price")
private String price;
+ @TableField(exist = false)
+ private String priceTwoDecimal;//2位小数
@io.swagger.annotations.ApiModelProperty(value = "起租开始时间", name = "rentalStartDate")
private Date rentalStartDate;
@io.swagger.annotations.ApiModelProperty(value = "", name = "rentalEndDate")
@@ -463,6 +465,13 @@ public class WxRentContract extends TenantEntity {
}
}
}
+
+ public String getPriceTwoDecimal() {
+ if (StringUtils.isNotBlank(price)) {
+ this.priceTwoDecimal = new BigDecimal(price).setScale(Constant.default_short_decimal_size, RoundingMode.HALF_UP).toPlainString();
+ }
+ return priceTwoDecimal;
+ }
@io.swagger.annotations.ApiModelProperty(value = "合同类型", name = "contractType")
diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java
index 47e9c1afb..296623ec5 100644
--- a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java
+++ b/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java
@@ -439,10 +439,10 @@ public class WxRentContractServiceImpl implements WxRentContractService {
record.setPrice("0");
}else{
if(record.getPayRatio()!=null && record.getPayRatio().intValue() > 0){
- record.setPrice(countPrice(record.getDecimalSize(),record.getPayRatio(),record.getRevenue(),EnumMissTimeType.OTHER.getCode(),record.getAdjustPeriod(),EnumGetRatioFrom.RENT.getCode()).toPlainString());
+ record.setPrice(countPrice(Constant.default_long_decimal_size,record.getPayRatio(),record.getRevenue(),EnumMissTimeType.OTHER.getCode(),record.getAdjustPeriod(),EnumGetRatioFrom.RENT.getCode()).toPlainString());
}else{
int dayCount = record.getReceivePeriod() * 30;
- RatioVo ratioVo = getPayRatio(record.getDecimalSize(),EnumGetRatioFrom.RENT.getCode(),record.getRevenue(),record.getBusDiscountRatio(),record.getBusDiscountTime(),dayCount,record.getReceivePeriod());
+ RatioVo ratioVo = getPayRatio(Constant.default_long_decimal_size,EnumGetRatioFrom.RENT.getCode(),record.getRevenue(),record.getBusDiscountRatio(),record.getBusDiscountTime(),dayCount,record.getReceivePeriod());
//record.setPayRatio(ratioVo.getRatio());
record.setPrice(ratioVo.getPrice());
}
@@ -791,10 +791,10 @@ public class WxRentContractServiceImpl implements WxRentContractService {
if(!EnumFromType.SWITCH.getCode().equals(from)){
if (record.getType() != null && record.getType().equals(EnumRentContractType.RENT_BY_JOINT.getCode())) {
if(record.getPayRatio()!=null && record.getPayRatio().intValue() > 0){
- record.setPrice(countPrice(record.getDecimalSize(),record.getPayRatio(),record.getRevenue(),EnumMissTimeType.OTHER.getCode(),record.getAdjustPeriod(),from).toPlainString());
+ record.setPrice(countPrice(Constant.default_long_decimal_size,record.getPayRatio(),record.getRevenue(),EnumMissTimeType.OTHER.getCode(),record.getAdjustPeriod(),from).toPlainString());
}else{
int dayCount = record.getReceivePeriod() * 30;
- RatioVo ratioVo = getPayRatio(record.getDecimalSize(),EnumGetRatioFrom.RENT.getCode(),record.getRevenue(),record.getBusDiscountRatio(),record.getBusDiscountTime(),dayCount,record.getReceivePeriod());
+ RatioVo ratioVo = getPayRatio(Constant.default_long_decimal_size,EnumGetRatioFrom.RENT.getCode(),record.getRevenue(),record.getBusDiscountRatio(),record.getBusDiscountTime(),dayCount,record.getReceivePeriod());
//record.setPayRatio(ratioVo.getRatio());
record.setPrice(ratioVo.getPrice());
}
diff --git a/mallinkService/src/main/resources/mapper/WxBillActionMapper.xml b/mallinkService/src/main/resources/mapper/WxBillActionMapper.xml
index 2272a26df..0c053ebbb 100644
--- a/mallinkService/src/main/resources/mapper/WxBillActionMapper.xml
+++ b/mallinkService/src/main/resources/mapper/WxBillActionMapper.xml
@@ -49,10 +49,6 @@
and `action` = #{action}
-
- and `action` != 7
-
-
and `bill_id` = #{billId}