| | |
| | | } |
| | | |
| | | /** |
| | | * 获取指定时间段内用水量低于指定值的农户 |
| | | * @param qo |
| | | * @return |
| | | */ |
| | | public QueryResultVo<List<VoClient>> getSmallWaterConsumptionClients(WaterConsumptionQO qo) { |
| | | /** |
| | | * 补齐起止时间 |
| | | */ |
| | | String timeStart = qo.getTimeStart(); |
| | | String timeStop = qo.getTimeStop(); |
| | | if(timeStart != null && timeStart != "") { |
| | | timeStart = timeStart + " 00:00:00"; |
| | | } |
| | | if(timeStop != null && timeStop != "") { |
| | | timeStop = timeStop + " 23:59:59"; |
| | | } |
| | | qo.setTimeStart(timeStart); |
| | | qo.setTimeStop(timeStop); |
| | | |
| | | // 生成查询参数 |
| | | Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(qo) ; |
| | | |
| | | // 获取符合条件的记录数 |
| | | Long itemTotal = Optional.ofNullable(rmOpenCloseValveHistoryMapper.getSmallWaterConsumptionClientsCount(params)).orElse(0L); |
| | | |
| | | QueryResultVo<List<VoClient>> rsVo = new QueryResultVo<>() ; |
| | | |
| | | rsVo.pageSize = qo.pageSize ; |
| | | rsVo.pageCurr = qo.pageCurr ; |
| | | |
| | | rsVo.calculateAndSet(itemTotal, params); |
| | | rsVo.obj = rmOpenCloseValveHistoryMapper.getSmallWaterConsumptionClients(params); |
| | | return rsVo ; |
| | | } |
| | | |
| | | /** |
| | | * 获取指定时间段内消费金额超过指定值的农户 |
| | | * @param qo |
| | | * @return |
| | |
| | | } |
| | | |
| | | /** |
| | | * 获取指定时间段内消费金额低于指定值的农户 |
| | | * @param qo |
| | | * @return |
| | | */ |
| | | public QueryResultVo<List<VoClient>> getSmallAmountSpentClients(AmountSpentQO qo) { |
| | | /** |
| | | * 补齐起止时间,如果开始时间为空,则默认为当前日期 |
| | | */ |
| | | String timeStart = qo.getTimeStart(); |
| | | String timeStop = qo.getTimeStop(); |
| | | if(timeStart != null && timeStart != "") { |
| | | timeStart = timeStart + " 00:00:00"; |
| | | } |
| | | if(timeStop != null && timeStop != "") { |
| | | timeStop = timeStop + " 23:59:59"; |
| | | } |
| | | qo.setTimeStart(timeStart); |
| | | qo.setTimeStop(timeStop); |
| | | |
| | | // 生成查询参数 |
| | | Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(qo) ; |
| | | |
| | | // 获取符合条件的记录数 |
| | | Long itemTotal = Optional.ofNullable(rmOpenCloseValveHistoryMapper.getSmallAmountSpentClientsCount(params)).orElse(0L); |
| | | |
| | | QueryResultVo<List<VoClient>> rsVo = new QueryResultVo<>() ; |
| | | |
| | | rsVo.pageSize = qo.pageSize ; |
| | | rsVo.pageCurr = qo.pageCurr ; |
| | | |
| | | rsVo.calculateAndSet(itemTotal, params); |
| | | rsVo.obj = rmOpenCloseValveHistoryMapper.getSmallAmountSpentClients(params); |
| | | return rsVo ; |
| | | } |
| | | |
| | | /** |
| | | * 获取指定时间段内用水时长超过指定值的农户 |
| | | * @param qo |
| | | * @return |
| | |
| | | } |
| | | |
| | | /** |
| | | * 获取指定时间段内用水时长低于指定值的农户 |
| | | * @param qo |
| | | * @return |
| | | */ |
| | | public QueryResultVo<List<VoClient>> getSmallWaterDurationClients(WaterDurationQO qo) { |
| | | /** |
| | | * 补齐起止时间,如果开始时间为空,则默认为当前日期 |
| | | */ |
| | | String timeStart = qo.getTimeStart(); |
| | | String timeStop = qo.getTimeStop(); |
| | | if(timeStart != null && timeStart != "") { |
| | | timeStart = timeStart + " 00:00:00"; |
| | | } |
| | | if(timeStop != null && timeStop != "") { |
| | | timeStop = timeStop + " 23:59:59"; |
| | | } |
| | | qo.setTimeStart(timeStart); |
| | | qo.setTimeStop(timeStop); |
| | | |
| | | // 生成查询参数 |
| | | Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(qo) ; |
| | | |
| | | // 获取符合条件的记录数 |
| | | Long itemTotal = Optional.ofNullable(rmOpenCloseValveHistoryMapper.getSmallWaterDurationClientsCount(params)).orElse(0L); |
| | | |
| | | QueryResultVo<List<VoClient>> rsVo = new QueryResultVo<>() ; |
| | | |
| | | rsVo.pageSize = qo.pageSize ; |
| | | rsVo.pageCurr = qo.pageCurr ; |
| | | |
| | | rsVo.calculateAndSet(itemTotal, params); |
| | | rsVo.obj = rmOpenCloseValveHistoryMapper.getSmallWaterDurationClients(params); |
| | | return rsVo ; |
| | | } |
| | | |
| | | /** |
| | | * 指定时间段内开物理卡农户 |
| | | * @param qo |
| | | * @return |