|
|
|
@@ -584,7 +584,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService |
|
|
|
long needpay; |
|
|
|
|
|
|
|
//按日 |
|
|
|
if(wxPropertyContract.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_DAY.getCode())){ |
|
|
|
if (wxPropertyContract.getPriceUnit().equals(EnumPriceUnit.D.getCode())){ |
|
|
|
double needpayD = WxRentContractServiceImpl.getNeedPay(0,price,wxBillProperty.getStarttime(),wxBillProperty.getEndtime()); |
|
|
|
needpay = new Double(needpayD).longValue(); |
|
|
|
}else{ |
|
|
|
@@ -675,16 +675,16 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService |
|
|
|
} |
|
|
|
|
|
|
|
//按月计租 |
|
|
|
if (propertyContract.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_MONTH.getCode()) |
|
|
|
||propertyContract.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_NAR_MONTH.getCode())) { |
|
|
|
// if (propertyContract.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_MONTH.getCode()) |
|
|
|
// ||propertyContract.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_NAR_MONTH.getCode())) { |
|
|
|
result = buildRentMonth(wxMerchant, userId, propertyContract, receivePeriod, lease, rentalStartDate, price,isPreview); |
|
|
|
} else { |
|
|
|
//如果按日 |
|
|
|
List<Date> yearList = new ArrayList<>(); |
|
|
|
yearList.add(rentalStartDate); |
|
|
|
Map<String, Object> resultMap = buildRent(receivePeriod,new long[]{price}, yearList, Calendar.DAY_OF_MONTH, propertyContract, userId, wxMerchant, 0, isPreview, null); |
|
|
|
result = (List<WxBillProperty>)resultMap.get("billList"); |
|
|
|
} |
|
|
|
// } else { |
|
|
|
// //如果按日 |
|
|
|
// List<Date> yearList = new ArrayList<>(); |
|
|
|
// yearList.add(rentalStartDate); |
|
|
|
// Map<String, Object> resultMap = buildRent(receivePeriod,new long[]{price}, yearList, Calendar.DAY_OF_MONTH, propertyContract, userId, wxMerchant, 0, isPreview, null); |
|
|
|
// result = (List<WxBillProperty>)resultMap.get("billList"); |
|
|
|
// } |
|
|
|
} |
|
|
|
for (int i = 0; i < result.size(); i++) { |
|
|
|
result.get(i).setPeriod(i+1); |
|
|
|
|