Browse Source

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

release_toaliyun_real
luozukai 7 years ago
parent
commit
5cd04058b2
2 changed files with 23 additions and 2 deletions
  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 View File

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

@@ -735,7 +735,7 @@ public class WxRentContractServiceImpl implements WxRentContractService {
//按月计租
// if (wxRentContract.getAdjustPeriod().equals(EnumRentContractAdjustPeriod.ADJUST_PERIOD_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 {
// //如果按日
// 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(isFirstDay(billTimeVo.getStartDate())){
int months = getMonths(sdM.format(billTimeVo.getStartDate())+"-01",sdM.format(billTimeVo.getEndDate())+"-01");
months++;
needpay = new Double(months * priceD).longValue();
}else{
needpay = new Double(getMonthNeedPay(priceD, billTimeVo.getStartDate(), billTimeVo.getEndDate())).longValue();
}
}else{
int months = getMonths(sdM.format(billTimeVo.getStartDate())+"-01",sdM.format(billTimeVo.getEndDate())+"-01");
if(isFirstDay(billTimeVo.getStartDate())){
months++;
}
needpay = new Double(months * priceD).longValue();
}
}else if(i == billTimeVoList.size()-1){//最后
needpay = new Double(getMonthNeedPay(priceD,billTimeVo.getStartDate(),billTimeVo.getEndDate())).longValue();
}else{//中间
int months = getMonths(sdM.format(billTimeVo.getStartDate())+"-01",sdM.format(billTimeVo.getEndDate())+"-01");
if(isFirstDay(billTimeVo.getStartDate())){
months++;
}
needpay = new Double(months * priceD).longValue();
}
}
@@ -1806,6 +1813,9 @@ public class WxRentContractServiceImpl implements WxRentContractService {
Double total = new Double(0);
int[] diff;

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






Loading…
Cancel
Save