From 9259b0ad7bade1b5a6cfc205e220003cd31777a6 Mon Sep 17 00:00:00 2001 From: luozukai Date: Wed, 21 Aug 2019 14:51:48 +0800 Subject: [PATCH] =?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 --- .../service/impl/WxBillRentServiceImpl.java | 14 +++++++------- .../service/impl/WxRentContractServiceImpl.java | 8 +++++--- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxBillRentServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxBillRentServiceImpl.java index 2faf2b87d..c7185de36 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxBillRentServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxBillRentServiceImpl.java @@ -275,9 +275,10 @@ public class WxBillRentServiceImpl implements WxBillRentService { * @param record */ public Integer getPayRatio(WxBillRent record,WxRentContract wxRentContract,EnumMissTimeType timeType){ - if(wxRentContract.getPayRatio() != null && wxRentContract.getPayRatio().intValue() > 0){ - return wxRentContract.getPayRatio(); - } +// if(wxRentContract.getPayRatio() != null && wxRentContract.getPayRatio().intValue() > 0){ +// return wxRentContract.getPayRatio(); +// } + wxRentContract.setPayRatio(0); BigDecimal revenue = new BigDecimal(record.getRevenue()).divide(new BigDecimal(1000000)).setScale(4, RoundingMode.HALF_EVEN); List ratioList = JSONArray.parseArray(wxRentContract.getBusDiscountRatio(), String.class); long dayCount = DateUtils.startToEnd(record.getStarttime(),record.getEndtime()); @@ -332,10 +333,10 @@ public class WxBillRentServiceImpl implements WxBillRentService { int endInt = Integer.parseInt(sdD.format(DateUtils.getDaySet(wxBillRent.getEndtime(),Calendar.DATE,1))); int months = getMonths(sdM.format(wxBillRent.getStarttime())+"-01",sdM.format(DateUtils.getDaySet(wxBillRent.getEndtime(),Calendar.DATE,1))+"-01"); + wxBillRent.setRevenue(record.getRevenue()); + Integer ratio = 0; - if(wxRentContract.getPayRatio() != null && wxRentContract.getPayRatio().intValue() >0){ - ratio = getPayRatio(wxBillRent,wxRentContract,EnumMissTimeType.OTHER); - }else if(StringUtils.isNotBlank(wxRentContract.getBusDiscountRatio())){ + if(StringUtils.isNotBlank(wxRentContract.getBusDiscountRatio())){ if(EnumBusRatioTime.YEAR.getCode().equals(wxRentContract.getBusDiscountTime())){ if(startInt == endInt && months == 12){ //刚好1年 @@ -364,7 +365,6 @@ public class WxBillRentServiceImpl implements WxBillRentService { Long oldPrice = wxBillRent.getReceivePay(); Long newPrice = newReceivePay; - wxBillRent.setRevenue(record.getRevenue()); //wxBillRent.setReceivePay(oldPrice.equals(newPrice) ? oldPrice : newPrice); wxBillRent.setUpdatetime(new Date()); 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 fcb2af203..8fe9941c5 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java @@ -250,13 +250,15 @@ public class WxRentContractServiceImpl implements WxRentContractService { /** * 获取设置的跳点率 + * 合同这,不需要年份月份转换 * ["1000-1200:10",">3000:20"] * @param record */ public void getPayRatio(WxRentContract record){ - if(record.getPayRatio() != null && record.getPayRatio().intValue() >0){ - return; - } +// if(record.getPayRatio() != null && record.getPayRatio().intValue() >0){ +// return; +// } + record.setPayRatio(0); if(StringUtils.isBlank(record.getBusDiscountRatio())){ return; }