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

[合同][修改][修改合同金额不正确]

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

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

@@ -662,7 +662,13 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService


SimpleDateFormat sdM = new SimpleDateFormat("yyyy-MM"); SimpleDateFormat sdM = new SimpleDateFormat("yyyy-MM");
if(i == billTimeVoList.size()-1){//最后 if(i == billTimeVoList.size()-1){//最后
needpay = new Double(WxRentContractServiceImpl.getMonthNeedPay(priceD,billTimeVo.getStartDate(),billTimeVo.getEndDate())).longValue();
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 if(i == 0){//第一期 }else if(i == 0){//第一期
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())){


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

@@ -1059,7 +1059,13 @@ public class WxRentContractServiceImpl implements WxRentContractService {


SimpleDateFormat sdM = new SimpleDateFormat("yyyy-MM"); SimpleDateFormat sdM = new SimpleDateFormat("yyyy-MM");
if(i == billTimeVoList.size()-1){//最后 if(i == billTimeVoList.size()-1){//最后
needpay = new Double(getMonthNeedPay(priceD,billTimeVo.getStartDate(),billTimeVo.getEndDate())).longValue();
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 if(i == 0){//第一期 }else if(i == 0){//第一期
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())){
@@ -1998,6 +2004,14 @@ public class WxRentContractServiceImpl implements WxRentContractService {
return total; return total;
} }


public static void main(String[] args) throws Exception{
SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd");
int[] a= DateUtils.getDiff(sd.parse("2020-11-01"),sd.parse("2021-04-30"));
System.out.println(a[0]);
System.out.println(a[1]);
}


/** /**
* 按日计租 根据每月的日期总数计算needpay * 按日计租 根据每月的日期总数计算needpay
* @param monthPrice * @param monthPrice


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