Browse Source

fix

release_toaliyun_real
winter 2 years ago
parent
commit
7238829f52
3 changed files with 13 additions and 8 deletions
  1. +9
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java
  2. +4
    -4
      mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java
  3. +0
    -4
      mallinkService/src/main/resources/mapper/WxBillActionMapper.xml

+ 9
- 0
mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java View File

@@ -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")


+ 4
- 4
mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java View File

@@ -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());
}


+ 0
- 4
mallinkService/src/main/resources/mapper/WxBillActionMapper.xml View File

@@ -49,10 +49,6 @@
and `action` = #{action}
</if>

<if test="null == action ">
and `action` != 7
</if>
<if test=" null != billId ">
and `bill_id` = #{billId}
</if>


Loading…
Cancel
Save