|
|
@@ -2233,10 +2233,15 @@ public class WxRentContractServiceImpl implements WxRentContractService { |
|
|
SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
int [] diffs = DateUtils.getDiff(rentContract.getRentalStartDate(),rentContract.getRentalEndDate());
|
|
|
int [] diffs = DateUtils.getDiff(rentContract.getRentalStartDate(),rentContract.getRentalEndDate());
|
|
|
int months = diffs[0];
|
|
|
int months = diffs[0];
|
|
|
|
|
|
int days = diffs[1];
|
|
|
int ext = months % 12;
|
|
|
int ext = months % 12;
|
|
|
int years = months/12;
|
|
|
int years = months/12;
|
|
|
if (ext > 0 ) {
|
|
|
if (ext > 0 ) {
|
|
|
years = years + 1;
|
|
|
years = years + 1;
|
|
|
|
|
|
}else {
|
|
|
|
|
|
if (days > 0 ) {
|
|
|
|
|
|
years = years + 1;
|
|
|
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
//合同以什么日期来计算开始计租日期
|
|
|
//合同以什么日期来计算开始计租日期
|
|
|
if(rentContract.getRentStartType()!=null &&rentContract.getRentStartType().equals(EnumRentStartType.STARTTIME.getCode())){
|
|
|
if(rentContract.getRentStartType()!=null &&rentContract.getRentStartType().equals(EnumRentStartType.STARTTIME.getCode())){
|
|
|
|