|  |  |  | 
|---|
|  |  |  | List<VoIcConsumeStatistics> list = rmOpenCloseValveHistoryMapper.statisticsByIc(statisticsStartDt, statisticsEndDt) ; | 
|---|
|  |  |  | if(list != null && list.size() > 0){ | 
|---|
|  |  |  | for(VoIcConsumeStatistics vo : list){ | 
|---|
|  |  |  | StConsumeIcDay po = this.stConsumeIcDayMapper.selectByClientAndCardAndYearAndMonth(vo.clientId, vo.cardId, statisticsYear, statisticsMonth) ; | 
|---|
|  |  |  | List<StConsumeIcDay> listOfDay = this.stConsumeIcDayMapper.selectByClientAndCardAndYearAndMonth(vo.clientId, vo.cardId, statisticsYear, statisticsMonth) ; | 
|---|
|  |  |  | StConsumeIcDay po = null ; | 
|---|
|  |  |  | if(listOfDay != null && listOfDay.size() > 0){ | 
|---|
|  |  |  | //程序逻辑控制上,集合中只有一个对象 | 
|---|
|  |  |  | po = listOfDay.get(0) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if(po == null){ | 
|---|
|  |  |  | po = new StConsumeIcDay() ; | 
|---|
|  |  |  | po.clientId = vo.clientId ; | 
|---|
|  |  |  | 
|---|
|  |  |  | List<VoIcConsumeStatistics> list = stConsumeIcDayMapper.statisticsByIc(statisticsYear, statisticsMonth) ; | 
|---|
|  |  |  | if(list != null && list.size() > 0){ | 
|---|
|  |  |  | for(VoIcConsumeStatistics vo : list){ | 
|---|
|  |  |  | StConsumeIcMonth po = this.stConsumeIcMonthMapper.selectByClientAndCardAndYear(vo.clientId, vo.cardId, statisticsYear) ; | 
|---|
|  |  |  | List<StConsumeIcMonth> listOfMonth = this.stConsumeIcMonthMapper.selectByClientAndCardAndYear(vo.clientId, vo.cardId, statisticsYear) ; | 
|---|
|  |  |  | StConsumeIcMonth po = null ; | 
|---|
|  |  |  | if(listOfMonth != null && listOfMonth.size() > 0){ | 
|---|
|  |  |  | //程序逻辑控制上,集合中只有一个对象 | 
|---|
|  |  |  | po = listOfMonth.get(0) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if(po == null){ | 
|---|
|  |  |  | po = new StConsumeIcMonth() ; | 
|---|
|  |  |  | po.clientId = vo.clientId ; | 
|---|
|  |  |  | 
|---|
|  |  |  | List<VoIcConsumeStatistics> list = stConsumeIcMonthMapper.statisticsByIc(statisticsYear) ; | 
|---|
|  |  |  | if(list != null && list.size() > 0){ | 
|---|
|  |  |  | for(VoIcConsumeStatistics vo : list){ | 
|---|
|  |  |  | StConsumeIcYear po = this.stConsumeIcYearMapper.selectByClientAndCardAndYear(vo.clientId, vo.cardId, statisticsYear) ; | 
|---|
|  |  |  | List<StConsumeIcYear> listOfYear = this.stConsumeIcYearMapper.selectByClientAndCardAndYear(vo.clientId, vo.cardId, statisticsYear) ; | 
|---|
|  |  |  | StConsumeIcYear po = null ; | 
|---|
|  |  |  | if(listOfYear != null && listOfYear.size() > 0){ | 
|---|
|  |  |  | //程序逻辑控制上,集合中只有一个对象 | 
|---|
|  |  |  | po = listOfYear.get(0) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if(po == null){ | 
|---|
|  |  |  | po = new StConsumeIcYear() ; | 
|---|
|  |  |  | po.clientId = vo.clientId ; | 
|---|