Просмотр исходного кода

[预览账单][修改][修改预账单金额问题]

release_toaliyun_real
luozukai 7 лет назад
Родитель
Сommit
5cd04058b2
2 измененных файлов: 23 добавлений и 2 удалений
  1. +10
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java
  2. +13
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java

+ 10
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java Просмотреть файл

@@ -565,18 +565,25 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService
if(wxPropertyContract.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_NAR_MONTH.getCode())){ if(wxPropertyContract.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_NAR_MONTH.getCode())){
if(isFirstDay(billTimeVo.getStartDate())){ if(isFirstDay(billTimeVo.getStartDate())){
int months = WxRentContractServiceImpl.getMonths(sdM.format(billTimeVo.getStartDate())+"-01",sdM.format(billTimeVo.getEndDate())+"-01"); int months = WxRentContractServiceImpl.getMonths(sdM.format(billTimeVo.getStartDate())+"-01",sdM.format(billTimeVo.getEndDate())+"-01");
months++;
needpay = new Double(months * priceD).longValue(); needpay = new Double(months * priceD).longValue();
}else{ }else{
needpay = new Double(WxRentContractServiceImpl.getMonthNeedPay(priceD, billTimeVo.getStartDate(), billTimeVo.getEndDate())).longValue(); needpay = new Double(WxRentContractServiceImpl.getMonthNeedPay(priceD, billTimeVo.getStartDate(), billTimeVo.getEndDate())).longValue();
} }
}else{ }else{
int months = WxRentContractServiceImpl.getMonths(sdM.format(billTimeVo.getStartDate())+"-01",sdM.format(billTimeVo.getEndDate())+"-01"); int months = WxRentContractServiceImpl.getMonths(sdM.format(billTimeVo.getStartDate())+"-01",sdM.format(billTimeVo.getEndDate())+"-01");
if(isFirstDay(billTimeVo.getStartDate())){
months++;
}
needpay = new Double(months * priceD).longValue(); needpay = new Double(months * priceD).longValue();
} }
}else if(i == billTimeVoList.size()-1){//最后 }else if(i == billTimeVoList.size()-1){//最后
needpay = new Double(WxRentContractServiceImpl.getMonthNeedPay(priceD,billTimeVo.getStartDate(),billTimeVo.getEndDate())).longValue(); needpay = new Double(WxRentContractServiceImpl.getMonthNeedPay(priceD,billTimeVo.getStartDate(),billTimeVo.getEndDate())).longValue();
}else{//中间 }else{//中间
int months = WxRentContractServiceImpl.getMonths(sdM.format(billTimeVo.getStartDate())+"-01",sdM.format(billTimeVo.getEndDate())+"-01"); int months = WxRentContractServiceImpl.getMonths(sdM.format(billTimeVo.getStartDate())+"-01",sdM.format(billTimeVo.getEndDate())+"-01");
if(isFirstDay(billTimeVo.getStartDate())){
months++;
}
needpay = new Double(months * priceD).longValue(); needpay = new Double(months * priceD).longValue();
} }
} }
@@ -666,7 +673,7 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService
//按月计租 //按月计租
// if (propertyContract.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_MONTH.getCode()) // if (propertyContract.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_MONTH.getCode())
// ||propertyContract.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_NAR_MONTH.getCode())) { // ||propertyContract.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_NAR_MONTH.getCode())) {
result = buildRentMonth(wxMerchant, userId, propertyContract, receivePeriod, lease, rentalStartDate, price,isPreview);
result = buildRentMonth(wxMerchant, userId, propertyContract, receivePeriod, lease, rentalStartDate, price,isPreview);
// } else { // } else {
// //如果按日 // //如果按日
// List<Date> yearList = new ArrayList<>(); // List<Date> yearList = new ArrayList<>();
@@ -932,3 +939,5 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService
} }







+ 13
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java Просмотреть файл

@@ -735,7 +735,7 @@ public class WxRentContractServiceImpl implements WxRentContractService {
//按月计租 //按月计租
// if (wxRentContract.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_MONTH.getCode()) // if (wxRentContract.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_MONTH.getCode())
// ||wxRentContract.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_NAR_MONTH.getCode())) { // ||wxRentContract.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_NAR_MONTH.getCode())) {
rentList = buildRentMonth(wxMerchant, userId, wxRentContract, receivePeriod, lease, rentalStartDate, price,isPreview);
rentList = buildRentMonth(wxMerchant, userId, wxRentContract, receivePeriod, lease, rentalStartDate, price,isPreview);
// } else { // } else {
// //如果按日 // //如果按日
// List<Date> yearList = new ArrayList<>(); // List<Date> yearList = new ArrayList<>();
@@ -955,18 +955,25 @@ public class WxRentContractServiceImpl implements WxRentContractService {
if(wxRentContract.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_NAR_MONTH.getCode())){ if(wxRentContract.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_NAR_MONTH.getCode())){
if(isFirstDay(billTimeVo.getStartDate())){ if(isFirstDay(billTimeVo.getStartDate())){
int months = getMonths(sdM.format(billTimeVo.getStartDate())+"-01",sdM.format(billTimeVo.getEndDate())+"-01"); int months = getMonths(sdM.format(billTimeVo.getStartDate())+"-01",sdM.format(billTimeVo.getEndDate())+"-01");
months++;
needpay = new Double(months * priceD).longValue(); needpay = new Double(months * priceD).longValue();
}else{ }else{
needpay = new Double(getMonthNeedPay(priceD, billTimeVo.getStartDate(), billTimeVo.getEndDate())).longValue(); needpay = new Double(getMonthNeedPay(priceD, billTimeVo.getStartDate(), billTimeVo.getEndDate())).longValue();
} }
}else{ }else{
int months = getMonths(sdM.format(billTimeVo.getStartDate())+"-01",sdM.format(billTimeVo.getEndDate())+"-01"); int months = getMonths(sdM.format(billTimeVo.getStartDate())+"-01",sdM.format(billTimeVo.getEndDate())+"-01");
if(isFirstDay(billTimeVo.getStartDate())){
months++;
}
needpay = new Double(months * priceD).longValue(); needpay = new Double(months * priceD).longValue();
} }
}else if(i == billTimeVoList.size()-1){//最后 }else if(i == billTimeVoList.size()-1){//最后
needpay = new Double(getMonthNeedPay(priceD,billTimeVo.getStartDate(),billTimeVo.getEndDate())).longValue(); needpay = new Double(getMonthNeedPay(priceD,billTimeVo.getStartDate(),billTimeVo.getEndDate())).longValue();
}else{//中间 }else{//中间
int months = getMonths(sdM.format(billTimeVo.getStartDate())+"-01",sdM.format(billTimeVo.getEndDate())+"-01"); int months = getMonths(sdM.format(billTimeVo.getStartDate())+"-01",sdM.format(billTimeVo.getEndDate())+"-01");
if(isFirstDay(billTimeVo.getStartDate())){
months++;
}
needpay = new Double(months * priceD).longValue(); needpay = new Double(months * priceD).longValue();
} }
} }
@@ -1806,6 +1813,9 @@ public class WxRentContractServiceImpl implements WxRentContractService {
Double total = new Double(0); Double total = new Double(0);
int[] diff; int[] diff;


if(sd.format(start).equals("2019-07-01")){
System.out.println();
}
//同一天 //同一天
if(sd.format(start).equals(sd.format(end))){ if(sd.format(start).equals(sd.format(end))){
int dayCount = DateUtils.getMonthDayCount(start); int dayCount = DateUtils.getMonthDayCount(start);
@@ -1987,3 +1997,5 @@ public class WxRentContractServiceImpl implements WxRentContractService {









Загрузка…
Отмена
Сохранить