Browse Source

[合同][修改][修改预览账单生成逻辑]

release_toaliyun_real
luozukai 6 years ago
parent
commit
aae4530822
1 changed files with 11 additions and 4 deletions
  1. +11
    -4
      mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java

+ 11
- 4
mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java View File

@@ -1138,12 +1138,19 @@ public class WxRentContractServiceImpl implements WxRentContractService {

SimpleDateFormat sdMR = new SimpleDateFormat("MM-dd");
SimpleDateFormat sdM = new SimpleDateFormat("yyyy-MM");
SimpleDateFormat sdD = new SimpleDateFormat("d");
SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd");
System.out.println(sd.format(startDate));
System.out.println(sd.format(endDate));

if(i == billTimeVoListSize - 1){//最后
if(sdMR.format(startDate).equals(sdMR.format(wxRentContract.getRentalStartDate())) && sdMR.format(endDate).equals(sdMR.format(wxRentContract.getRentalEndDate())) ){
int months = getMonths(sdM.format(startDate)+"-01",sdM.format(endDate)+"-01");
months++;
//判断是否满足整月
int startInt = Integer.parseInt(sdD.format(startDate));
int endInt = Integer.parseInt(sdD.format(DateUtils.getDaySet(endDate,Calendar.DATE,1)));
if(startInt == endInt){
int months = getMonths(sdM.format(startDate)+"-01",sdM.format(DateUtils.getDaySet(endDate,Calendar.DATE,1))+"-01");
needpay = new Double(months * priceD).longValue();
}else {
}else{
needpay = new Double(getMonthNeedPay(priceD, startDate, endDate)).longValue();
}
}else if(i == 0){//第一期


Loading…
Cancel
Save