|  |  |  | 
|---|
|  |  |  | List<VoClientConsumeStatistics> list = rmOpenCloseValveHistoryMapper.statisticsByClient(statisticsStartDt, statisticsEndDt) ; | 
|---|
|  |  |  | if(list != null && list.size() > 0){ | 
|---|
|  |  |  | for(VoClientConsumeStatistics vo : list){ | 
|---|
|  |  |  | StConsumeClientDay po = this.stConsumeClientDayMapper.selectByClientAndYearAndMonth(vo.clientId, statisticsYear, statisticsMonth) ; | 
|---|
|  |  |  | List<StConsumeClientDay> listOfDay = this.stConsumeClientDayMapper.selectByClientAndYearAndMonth(vo.clientId, statisticsYear, statisticsMonth) ; | 
|---|
|  |  |  | StConsumeClientDay po = null ; | 
|---|
|  |  |  | if(listOfDay != null && listOfDay.size() > 0){ | 
|---|
|  |  |  | //程序逻辑控制上,集合中只有一个对象 | 
|---|
|  |  |  | po = listOfDay.get(0) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if(po == null){ | 
|---|
|  |  |  | po = new StConsumeClientDay() ; | 
|---|
|  |  |  | po.clientId = vo.clientId ; | 
|---|
|  |  |  | 
|---|
|  |  |  | List<VoClientConsumeStatistics> list = stConsumeClientDayMapper.statisticsByClient(statisticsYear, statisticsMonth) ; | 
|---|
|  |  |  | if(list != null && list.size() > 0){ | 
|---|
|  |  |  | for(VoClientConsumeStatistics vo : list){ | 
|---|
|  |  |  | StConsumeClientMonth po = this.stConsumeClientMonthMapper.selectByClientAndYear(vo.clientId, statisticsYear) ; | 
|---|
|  |  |  | List<StConsumeClientMonth> listOfMonth = this.stConsumeClientMonthMapper.selectByClientAndYear(vo.clientId, statisticsYear) ; | 
|---|
|  |  |  | StConsumeClientMonth po = null ; | 
|---|
|  |  |  | if(listOfMonth != null && listOfMonth.size() > 0){ | 
|---|
|  |  |  | //程序逻辑控制上,集合中只有一个对象 | 
|---|
|  |  |  | po = listOfMonth.get(0) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if(po == null){ | 
|---|
|  |  |  | po = new StConsumeClientMonth() ; | 
|---|
|  |  |  | po.clientId = vo.clientId ; | 
|---|
|  |  |  | 
|---|
|  |  |  | List<VoClientConsumeStatistics> list = stConsumeClientMonthMapper.statisticsByClient(statisticsYear) ; | 
|---|
|  |  |  | if(list != null && list.size() > 0){ | 
|---|
|  |  |  | for(VoClientConsumeStatistics vo : list){ | 
|---|
|  |  |  | StConsumeClientYear po = this.stConsumeClientYearMapper.selectByClientAndYear(vo.clientId, statisticsYear) ; | 
|---|
|  |  |  | List<StConsumeClientYear> listOfYear = this.stConsumeClientYearMapper.selectByClientAndYear(vo.clientId, statisticsYear) ; | 
|---|
|  |  |  | StConsumeClientYear po = null ; | 
|---|
|  |  |  | if(listOfYear != null && listOfYear.size() > 0){ | 
|---|
|  |  |  | //程序逻辑控制上,集合中只有一个对象 | 
|---|
|  |  |  | po = listOfYear.get(0) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if(po == null){ | 
|---|
|  |  |  | po = new StConsumeClientYear() ; | 
|---|
|  |  |  | po.clientId = vo.clientId ; | 
|---|