From 3a925497a3f6a776fb2e28b6280822fcaca5430c Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期二, 29 十月 2024 09:53:47 +0800 Subject: [PATCH] 把原来的pj(片角)配置改为sp(沙盘)配置 --- pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/client/ClientCtrl.java | 100 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 100 insertions(+), 0 deletions(-) diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/client/ClientCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/client/ClientCtrl.java index 2d43649..bd809b3 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/client/ClientCtrl.java +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/java/com/dy/pipIrrStatistics/client/ClientCtrl.java @@ -6,6 +6,7 @@ import com.dy.common.webUtil.QueryResultVo; import com.dy.pipIrrGlobal.voSt.*; import com.dy.pipIrrStatistics.card.IcCardqo.CommonQO; +import com.dy.pipIrrStatistics.card.qo.CardUsageQO; import com.dy.pipIrrStatistics.client.qo.*; import com.dy.pipIrrStatistics.intake.qo.ClientAmountQO; import com.dy.pipIrrStatistics.result.StatisticlResultCode; @@ -96,6 +97,26 @@ } /** + * 鑾峰彇鎸囧畾鏃堕棿娈靛唴鐢ㄦ按閲忎綆浜庢寚瀹氬�肩殑鍐滄埛 + * @param qo + * @param bindingResult + * @return + */ + @GetMapping(path = "/getSmallWaterConsumptionClients") + @SsoAop() + public BaseResponse<QueryResultVo<List<VoClient>>> getSmallWaterConsumptionClients(@Valid WaterConsumptionQO qo, BindingResult bindingResult) { + if(bindingResult != null && bindingResult.hasErrors()){ + return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); + } + try { + return BaseResponseUtils.buildSuccess(clientSv.getSmallWaterConsumptionClients(qo)); + } catch (Exception e) { + log.error("鑾峰彇璁板綍寮傚父", e); + return BaseResponseUtils.buildException(e.getMessage()) ; + } + } + + /** * 鑾峰彇鎸囧畾鏃堕棿娈靛唴娑堣垂閲戦瓒呰繃鎸囧畾鍊肩殑鍐滄埛 * @param qo * @param bindingResult @@ -116,6 +137,26 @@ } /** + * 鑾峰彇鎸囧畾鏃堕棿娈靛唴娑堣垂閲戦浣庝簬鎸囧畾鍊肩殑鍐滄埛 + * @param qo + * @param bindingResult + * @return + */ + @GetMapping(path = "/getSmallAmountSpentClients") + @SsoAop() + public BaseResponse<QueryResultVo<List<VoClient>>> getSmallAmountSpentClients(@Valid AmountSpentQO qo, BindingResult bindingResult) { + if(bindingResult != null && bindingResult.hasErrors()){ + return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); + } + try { + return BaseResponseUtils.buildSuccess(clientSv.getSmallAmountSpentClients(qo)); + } catch (Exception e) { + log.error("鑾峰彇璁板綍寮傚父", e); + return BaseResponseUtils.buildException(e.getMessage()) ; + } + } + + /** * 鑾峰彇鎸囧畾鏃堕棿娈靛唴鐢ㄦ按鏃堕暱瓒呰繃鎸囧畾鍊肩殑鍐滄埛 * @param qo * @param bindingResult @@ -129,6 +170,26 @@ } try { return BaseResponseUtils.buildSuccess(clientSv.getLargeWaterDurationClients(qo)); + } catch (Exception e) { + log.error("鑾峰彇寮�鍗¤褰曞紓甯�", e); + return BaseResponseUtils.buildException(e.getMessage()) ; + } + } + + /** + * 鑾峰彇鎸囧畾鏃堕棿娈靛唴鐢ㄦ按鏃堕暱浣庝簬鎸囧畾鍊肩殑鍐滄埛 + * @param qo + * @param bindingResult + * @return + */ + @GetMapping(path = "/getSmallWaterDurationClients") + @SsoAop() + public BaseResponse<QueryResultVo<List<VoClient>>> getSmallWaterDurationClients(@Valid WaterDurationQO qo, BindingResult bindingResult) { + if(bindingResult != null && bindingResult.hasErrors()){ + return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); + } + try { + return BaseResponseUtils.buildSuccess(clientSv.getSmallWaterDurationClients(qo)); } catch (Exception e) { log.error("鑾峰彇寮�鍗¤褰曞紓甯�", e); return BaseResponseUtils.buildException(e.getMessage()) ; @@ -238,4 +299,43 @@ } } + + /** + * 鏈�杩戞湭鍏呭�肩殑鍐滄埛 + * + * @param qo + * @return + */ + @GetMapping(path = "/getNotRechargeLastClients") + @SsoAop() + public BaseResponse<QueryResultVo<List<VoClient>>> getNotRechargeLastClients(CommonQO qo) { + try { + QueryResultVo<List<VoClient>> res = clientSv.getNotRechargeLastClients(qo); + return BaseResponseUtils.buildSuccess(res); + }catch (Exception e){ + log.error("鑾峰彇璁板綍寮傚父", e); + return BaseResponseUtils.buildException(e.getMessage()); + } + } + + /** + * 鑾峰彇鎸囧畾鏃堕棿娈靛啘鎴凤細鍏呭�煎悎璁°�佹秷璐瑰悎璁°�佷綑棰� + * @param qo + //* @param bindingResult + * @return + */ + @GetMapping(path = "/client_usage") + @SsoAop() + public BaseResponse<QueryResultVo<List<VoCardUsage>>> getClientUsages(@Valid CardUsageQO qo, BindingResult bindingResult) { + if(bindingResult != null && bindingResult.hasErrors()){ + return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); + } + + try { + return BaseResponseUtils.buildSuccess(clientSv.getClientUsages(qo)); + } catch (Exception e) { + log.error("鑾峰彇寮�鍗¤褰曞紓甯�", e); + return BaseResponseUtils.buildException(e.getMessage()) ; + } + } } -- Gitblit v1.8.0