Przeglądaj źródła

Merge branch 'develop' of https://git.youlane.cn/server/formallProject into develop

release_toaliyun_real
Burce 6 lat temu
rodzic
commit
a925440c53
1 zmienionych plików z 5 dodań i 9 usunięć
  1. +5
    -9
      mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java

+ 5
- 9
mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java Wyświetl plik

@@ -254,16 +254,12 @@ public class WxRentContractServiceImpl implements WxRentContractService {
* @param revenueLong
* @return
*/
public static Long countPrice(Integer ratio,Long revenueLong,int timeType){
public static Long countPrice(Integer ratio,Long revenueLong){
BigDecimal hundred = new BigDecimal(100);
BigDecimal revenue = new BigDecimal(revenueLong == null ? 0 : revenueLong).divide(hundred);
BigDecimal payRatio = new BigDecimal(ratio == null ? 0 : ratio).divide(new BigDecimal(10000));
BigDecimal price;
if(EnumMissTimeType.YEAR.getCode().equals(timeType)){
price = revenue.multiply(payRatio).divide(new BigDecimal(12),2, RoundingMode.HALF_EVEN);
}else{
price = revenue.multiply(payRatio).setScale(2, RoundingMode.HALF_EVEN);
}
price = revenue.multiply(payRatio).setScale(2, RoundingMode.HALF_EVEN);
return price.multiply(hundred).longValue();
}

@@ -311,7 +307,7 @@ public class WxRentContractServiceImpl implements WxRentContractService {

if (revenue.compareTo(start) >= 0 && revenue.compareTo(end)<= 0){
ratioVo.setRatio(ratio);
ratioVo.setPrice(countPrice(ratioVo.getRatio(),revenueLong,timeType));
ratioVo.setPrice(countPrice(ratioVo.getRatio(),revenueLong));
break;
}
}else if(e.indexOf(">") >= 0){
@@ -387,7 +383,7 @@ public class WxRentContractServiceImpl implements WxRentContractService {
record.setPrice(0l);
}else{
if(record.getPayRatio()!=null && record.getPayRatio().intValue() > 0){
record.setPrice(countPrice(record.getPayRatio(),record.getRevenue(),EnumMissTimeType.OTHER.getCode()));
record.setPrice(countPrice(record.getPayRatio(),record.getRevenue()));
}else{
int dayCount = record.getReceivePeriod() * 30;
RatioVo ratioVo = getPayRatio(EnumGetRatioFrom.RENT.getCode(),record.getRevenue(),record.getBusDiscountRatio(),record.getBusDiscountTime(),dayCount,record.getReceivePeriod());
@@ -620,7 +616,7 @@ public class WxRentContractServiceImpl implements WxRentContractService {
if(!EnumFromType.SWITCH.getCode().equals(from)){
if (record.getType().equals(EnumRentContractType.RENT_BY_JOINT.getCode())) {
if(record.getPayRatio()!=null && record.getPayRatio().intValue() > 0){
record.setPrice(countPrice(record.getPayRatio(),record.getRevenue(),EnumMissTimeType.OTHER.getCode()));
record.setPrice(countPrice(record.getPayRatio(),record.getRevenue()));
}else{
int dayCount = record.getReceivePeriod() * 30;
RatioVo ratioVo = getPayRatio(EnumGetRatioFrom.RENT.getCode(),record.getRevenue(),record.getBusDiscountRatio(),record.getBusDiscountTime(),dayCount,record.getReceivePeriod());


Ładowanie…
Anuluj
Zapisz