winter 2 лет назад
Родитель
Сommit
7238829f52
3 измененных файлов: 13 добавлений и 8 удалений
  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 Просмотреть файл

@@ -227,6 +227,8 @@ public class WxRentContract extends TenantEntity {
private Long merchantId; private Long merchantId;
@io.swagger.annotations.ApiModelProperty(value = "月租金/分成(元)", name = "price") @io.swagger.annotations.ApiModelProperty(value = "月租金/分成(元)", name = "price")
private String price; private String price;
@TableField(exist = false)
private String priceTwoDecimal;//2位小数
@io.swagger.annotations.ApiModelProperty(value = "起租开始时间", name = "rentalStartDate") @io.swagger.annotations.ApiModelProperty(value = "起租开始时间", name = "rentalStartDate")
private Date rentalStartDate; private Date rentalStartDate;
@io.swagger.annotations.ApiModelProperty(value = "", name = "rentalEndDate") @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") @io.swagger.annotations.ApiModelProperty(value = "合同类型", name = "contractType")


+ 4
- 4
mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java Просмотреть файл

@@ -439,10 +439,10 @@ public class WxRentContractServiceImpl implements WxRentContractService {
record.setPrice("0"); record.setPrice("0");
}else{ }else{
if(record.getPayRatio()!=null && record.getPayRatio().intValue() > 0){ 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{ }else{
int dayCount = record.getReceivePeriod() * 30; 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.setPayRatio(ratioVo.getRatio());
record.setPrice(ratioVo.getPrice()); record.setPrice(ratioVo.getPrice());
} }
@@ -791,10 +791,10 @@ public class WxRentContractServiceImpl implements WxRentContractService {
if(!EnumFromType.SWITCH.getCode().equals(from)){ if(!EnumFromType.SWITCH.getCode().equals(from)){
if (record.getType() != null && record.getType().equals(EnumRentContractType.RENT_BY_JOINT.getCode())) { if (record.getType() != null && record.getType().equals(EnumRentContractType.RENT_BY_JOINT.getCode())) {
if(record.getPayRatio()!=null && record.getPayRatio().intValue() > 0){ 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{ }else{
int dayCount = record.getReceivePeriod() * 30; 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.setPayRatio(ratioVo.getRatio());
record.setPrice(ratioVo.getPrice()); record.setPrice(ratioVo.getPrice());
} }


+ 0
- 4
mallinkService/src/main/resources/mapper/WxBillActionMapper.xml Просмотреть файл

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


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


Загрузка…
Отмена
Сохранить