| | |
| | | List<VoClientAmountStatistics> list = rmClientAmountDayDao.statisticsByClient(statisticsStartId, statisticsEndId) ; |
| | | if(list != null && list.size() > 0){ |
| | | for(VoClientAmountStatistics vo : list){ |
| | | StClientAmountMonth po = new StClientAmountMonth() ; |
| | | StClientAmountMonth po = stClientAmountMonthDao.selectByClientIdAndYearAndMonth(vo.clientId, statisticsYear, statisticsMonth) ; |
| | | if(po == null) { |
| | | po = new StClientAmountMonth(); |
| | | } |
| | | po.clientId = vo.clientId ; |
| | | po.year = statisticsYear ; |
| | | po.month = statisticsMonth ; |
| | | po.amount = vo.amount; |
| | | stClientAmountMonthDao.insert(po) ; |
| | | if(po.id == null) { |
| | | stClientAmountMonthDao.insert(po); |
| | | }else{ |
| | | stClientAmountMonthDao.updateByPrimaryKey(po) ; |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | List<VoClientAmountStatistics> list = stClientAmountMonthDao.statisticsByClient(statisticsYear) ; |
| | | if(list != null && list.size() > 0){ |
| | | for(VoClientAmountStatistics vo : list){ |
| | | StClientAmountYear po = new StClientAmountYear() ; |
| | | StClientAmountYear po = stClientAmountYearDao.selectByClientIdAndYear(vo.clientId, statisticsYear) ; |
| | | if(po == null) { |
| | | po = new StClientAmountYear(); |
| | | } |
| | | po.clientId = vo.clientId ; |
| | | po.year = statisticsYear ; |
| | | po.amount = vo.amount; |
| | | stClientAmountYearDao.insert(po) ; |
| | | if(po.id == null) { |
| | | stClientAmountYearDao.insert(po); |
| | | }else{ |
| | | stClientAmountYearDao.updateByPrimaryKey(po) ; |
| | | } |
| | | } |
| | | } |
| | | } |