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; }