From 930516225f83ebbd9afcf94bbab130dbaacff6ec Mon Sep 17 00:00:00 2001 From: luozukai Date: Wed, 28 Aug 2019 16:53:33 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[=E5=90=88=E5=90=8C][=E4=BF=AE=E6=94=B9][?= =?UTF-8?q?=E5=BC=80=E5=8F=91=E8=B4=A6=E5=8D=95=E7=BB=93=E7=AE=97]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iformall/service/impl/WxRentContractServiceImpl.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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 4adb63d2c..8d503d1da 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java @@ -259,11 +259,7 @@ public class WxRentContractServiceImpl implements WxRentContractService { 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(); } From 95496f194d295680d162ed25c79b0c1a048c1b52 Mon Sep 17 00:00:00 2001 From: luozukai Date: Wed, 28 Aug 2019 16:54:20 +0800 Subject: [PATCH 2/2] =?UTF-8?q?[=E5=90=88=E5=90=8C][=E4=BF=AE=E6=94=B9][?= =?UTF-8?q?=E5=BC=80=E5=8F=91=E8=B4=A6=E5=8D=95=E7=BB=93=E7=AE=97]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iformall/service/impl/WxRentContractServiceImpl.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 8d503d1da..839ff0441 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java @@ -254,7 +254,7 @@ 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)); @@ -307,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){ @@ -383,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()); @@ -616,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());