Przeglądaj źródła

fix

release_toaliyun_real
winter 1 rok temu
rodzic
commit
5605915749
1 zmienionych plików z 23 dodań i 10 usunięć
  1. +23
    -10
      mallinkAdmin/src/main/java/com/iformall/controller/contract/WxRentContractController.java

+ 23
- 10
mallinkAdmin/src/main/java/com/iformall/controller/contract/WxRentContractController.java Wyświetl plik

@@ -919,18 +919,31 @@ public class WxRentContractController extends WxContractBaseController {
List<Date> yearList = wxRentContractService.getYearList(years, 12, rentContract.getRentalStartDate(),endcontract);
if (null != yearList && yearList.size() > 0) {
List<WxRentContractYearsVo> retList = new ArrayList<WxRentContractYearsVo>();
Date begin = null;
for (int i = 0 ; i < yearList.size()-1 ; i ++) {
int yearindex = i+1;
begin = yearList.get(i);
Date end = yearList.get(i+1);
Date realEnd = DateUtils.getDaySet(end, Calendar.SECOND, -1);
if (yearList.size() == 1) {
WxRentContractYearsVo vo = new WxRentContractYearsVo();
vo.setStart(begin);
vo.setEnd(realEnd);
vo.setRemark("第"+yearindex+"年度");
vo.setStart(yearList.get(0));
vo.setEnd(rentContract.getRentalEndDate());
vo.setRemark("第1年度");
retList.add(vo);
begin = end;
}else {
Date begin = null;
for (int i = 0 ; i < yearList.size()-1 ; i ++) {
int yearindex = i+1;
begin = yearList.get(i);
Date end = yearList.get(i+1);
Date realEnd = DateUtils.getDaySet(end, Calendar.SECOND, -1);
WxRentContractYearsVo vo = new WxRentContractYearsVo();
vo.setStart(begin);
vo.setEnd(realEnd);
vo.setRemark("第"+yearindex+"年度");
retList.add(vo);
begin = end;
}
WxRentContractYearsVo vo = new WxRentContractYearsVo();
vo.setStart(yearList.get(yearList.size()-1));
vo.setEnd(rentContract.getRentalEndDate());
vo.setRemark("第"+yearList.size()+"年度");
retList.add(vo);
}
return new ResultData(retList);
}


Ładowanie…
Anuluj
Zapisz