|
|
|
@@ -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<String> 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()); |
|
|
|
|
|
|
|
|