| | |
| | | protected StClientAmountYearMapper stClientAmountYearDao ; |
| | | |
| | | /** |
| | | * 月统计---漏损 |
| | | * 月统计---农户用水量及金额 |
| | | */ |
| | | @Transactional |
| | | protected void statisticsMonth(Integer statisticsYear, Integer statisticsMonth, Long statisticsStartId, Long statisticsEndId){ |
| | | List<VoClientAmountStatistics> list = rmClientAmountDayDao.statisticsByClient(statisticsStartId, statisticsEndId) ; |
| | | if(list != null && list.size() > 0){ |
| | | for(VoClientAmountStatistics vo : list){ |
| | | StClientAmountMonth po = stClientAmountMonthDao.selectByClientIdAndYearAndMonth(vo.clientId, statisticsYear, statisticsMonth) ; |
| | | List<StClientAmountMonth> listOfMonth = stClientAmountMonthDao.selectByClientIdAndYearAndMonth(vo.clientId, statisticsYear, statisticsMonth) ; |
| | | StClientAmountMonth po = null ; |
| | | if(listOfMonth != null && listOfMonth.size() > 0){ |
| | | //程序逻辑控制上,集合中只有一个对象 |
| | | po = listOfMonth.get(0) ; |
| | | } |
| | | if(po == null) { |
| | | po = new StClientAmountMonth(); |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * 年统计---漏损 |
| | | * 年统计---农户用水量及金额 |
| | | */ |
| | | @Transactional |
| | | protected void statisticsYear(Integer statisticsYear){ |
| | | List<VoClientAmountStatistics> list = stClientAmountMonthDao.statisticsByClient(statisticsYear) ; |
| | | if(list != null && list.size() > 0){ |
| | | for(VoClientAmountStatistics vo : list){ |
| | | StClientAmountYear po = stClientAmountYearDao.selectByClientIdAndYear(vo.clientId, statisticsYear) ; |
| | | List<StClientAmountYear> listOfYear = stClientAmountYearDao.selectByClientIdAndYear(vo.clientId, statisticsYear) ; |
| | | StClientAmountYear po = null ; |
| | | if(listOfYear != null && listOfYear.size() > 0){ |
| | | //程序逻辑控制上,集合中只有一个对象 |
| | | po = listOfYear.get(0) ; |
| | | } |
| | | if(po == null) { |
| | | po = new StClientAmountYear(); |
| | | } |