| | |
| | | import com.dy.pipIrrStatistics.intake.qo.BatteryVoltQO; |
| | | import com.dy.pipIrrGlobal.voSt.VoIntakeOpenCount; |
| | | import com.dy.pipIrrStatistics.intake.qo.CumulativeFlowQO; |
| | | import com.dy.pipIrrStatistics.intake.qo.IntakeQO; |
| | | import com.dy.pipIrrStatistics.intake.qo.SignalIntensityQO; |
| | | import com.dy.pipIrrStatistics.intake.qo.IntakeCountValueQO; |
| | | import com.dy.pipIrrStatistics.result.StatisticlResultCode; |
| | |
| | | |
| | | |
| | | /** |
| | | * 指定时间段内累积流量(定时报里的累积流量)超过指定值的取水口 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @GetMapping(path = "/getTotalFlowGtValueIntakes") |
| | | @SsoAop() |
| | | public BaseResponse<QueryResultVo<List<VoIntakeAccumulateAmount>>> getTotalFlowGtValueIntakes(IntakeAmountValueQO qo) { |
| | | try { |
| | | QueryResultVo<List<VoIntakeAccumulateAmount>> res = intakeSv.getTotalFlowGtValueIntakes(qo); |
| | | if(res.itemTotal == 0) { |
| | | return BaseResponseUtils.buildErrorMsg(StatisticlResultCode.NO_RECORDS.getMessage()); |
| | | } |
| | | return BaseResponseUtils.buildSuccess(res); |
| | | } catch (Exception e) { |
| | | log.error("获取记录异常", e); |
| | | return BaseResponseUtils.buildException(e.getMessage()) ; |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 指定时间段内用水量超过指定值的取水口 |
| | | * @param |
| | | * @return |
| | |
| | | return BaseResponseUtils.buildException(e.getMessage()) ; |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 指定时间段内消费金额超过指定值的取水口 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @GetMapping(path = "/getExpenseGtValueIntakes") |
| | | @SsoAop() |
| | | public BaseResponse<QueryResultVo<List<VoIntakeAccumulateAmount>>> getExpenseGtValueIntakes(IntakeAmountValueQO qo) { |
| | | try { |
| | | QueryResultVo<List<VoIntakeAccumulateAmount>> res = intakeSv.getExpenseGtValueIntakes(qo); |
| | | if(res.itemTotal == 0) { |
| | | return BaseResponseUtils.buildErrorMsg(StatisticlResultCode.NO_RECORDS.getMessage()); |
| | | } |
| | | return BaseResponseUtils.buildSuccess(res); |
| | | } catch (Exception e) { |
| | | log.error("获取记录异常", e); |
| | | return BaseResponseUtils.buildException(e.getMessage()) ; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 指定时间段内用水时长超过指定值的取水口 |
| | | * @param |
| | | * @return |
| | | */ |
| | | @GetMapping(path = "/getUseWaterDurationGtValueIntakes") |
| | | @SsoAop() |
| | | public BaseResponse<QueryResultVo<List<VoIntakeOpenCount>>> getUseWaterDurationGtValueIntakes(IntakeCountValueQO qo) { |
| | | try { |
| | | QueryResultVo<List<VoIntakeOpenCount>> res = intakeSv.getUseWaterDurationGtValueIntakes(qo); |
| | | if(res.itemTotal == 0) { |
| | | return BaseResponseUtils.buildErrorMsg(StatisticlResultCode.NO_RECORDS.getMessage()); |
| | | } |
| | | return BaseResponseUtils.buildSuccess(res); |
| | | } catch (Exception e) { |
| | | log.error("获取记录异常", e); |
| | | return BaseResponseUtils.buildException(e.getMessage()) ; |
| | | } |
| | | } |
| | | } |