|  |  | 
 |  |  | package com.dy.pipIrrStatistics.stClient; | 
 |  |  |  | 
 |  |  | import com.alibaba.fastjson2.JSON; | 
 |  |  | import com.dy.common.webUtil.QueryResultVo; | 
 |  |  | import com.dy.pipIrrGlobal.daoSt.StClientAmountDayMapper ; | 
 |  |  | import com.dy.pipIrrGlobal.daoSt.StClientAmountMonthMapper ; | 
 |  |  | 
 |  |  |             rsVo.pageCurr = qo.pageCurr; | 
 |  |  |             rsVo.calculateAndSet(itemTotal, params); | 
 |  |  |  | 
 |  |  |             List<VoStClientIdAmountYearRecord> clientIds = stClientAmountDayDao.selectClientIds4DayStatistics(params); | 
 |  |  |             String clientIdsJson = JSON.toJSONString(clientIds) ; | 
 |  |  |             params.put("clientIdsJson", clientIdsJson); | 
 |  |  |  | 
 |  |  |             rsVo.obj = stClientAmountDayDao.selectDayStatistics(params); | 
 |  |  |         } | 
 |  |  |         return rsVo ; | 
 |  |  | 
 |  |  |             rsVo.pageCurr = qo.pageCurr; | 
 |  |  |             rsVo.calculateAndSet(itemTotal, params); | 
 |  |  |  | 
 |  |  |             List<VoStClientIdAmountYearRecord> clientIds = stClientAmountMonthDao.selectClientIds4MonthStatistics(params); | 
 |  |  |             String clientIdsJson = JSON.toJSONString(clientIds) ; | 
 |  |  |             params.put("clientIdsJson", clientIdsJson); | 
 |  |  |  | 
 |  |  |             rsVo.obj = stClientAmountMonthDao.selectMonthStatistics(params); | 
 |  |  |         } | 
 |  |  |         return rsVo ; | 
 |  |  | 
 |  |  |         rsVo.yearGrp = yearGrp ; | 
 |  |  |         rsQrVo.obj = rsVo ; | 
 |  |  |  | 
 |  |  |         boolean oneYear = yearGrp.size() == 1? true : false ; | 
 |  |  |         // 生成查询参数 | 
 |  |  |         Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(qo) ; | 
 |  |  |         // 获取符合条件的记录数 | 
 |  |  | 
 |  |  |             rsQrVo.pageCurr = qo.pageCurr; | 
 |  |  |             rsQrVo.calculateAndSet(itemTotal, params); | 
 |  |  |  | 
 |  |  |             List<VoStClientIdAmountYearRecord> clientIds = stClientAmountYearDao.selectClientIds4YearStatistics(params); | 
 |  |  |             String clientIdsJson = JSON.toJSONString(clientIds) ; | 
 |  |  |  | 
 |  |  |             List<VoStClientAmountYearRecords> group = new ArrayList<>(); | 
 |  |  |             int count = 1 ; | 
 |  |  |             for(int year: yearGrp){ | 
 |  |  |                 params.put("year", year); | 
 |  |  |                 params.put("clientIdsJson", clientIdsJson); | 
 |  |  |                 List<VoStClientAmountYearRecord> list = stClientAmountYearDao.selectYearStatistics(params); | 
 |  |  |                 if(group.isEmpty()){ | 
 |  |  |                     this.completion(group, list); |