From e1534c601e1310575264a0ddc5266bdd2c47750b Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期三, 09 七月 2025 09:48:34 +0800 Subject: [PATCH] 萤石云视频监控,增加livePc模式 --- pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/mqttSd1/soil/SoilCtrl.java | 44 ++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 40 insertions(+), 4 deletions(-) diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/mqttSd1/soil/SoilCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/mqttSd1/soil/SoilCtrl.java index 90468c2..e3e2cb6 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/mqttSd1/soil/SoilCtrl.java +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/mqttSd1/soil/SoilCtrl.java @@ -63,6 +63,36 @@ } /** + * 鏍规嵁鎸囧畾鏉′欢鏌ヨ鏌愭皵璞$珯鏌愪竴鏃ヨ褰� + * @param soilId + * @param yyyy_MM + * @return + */ + @GetMapping(path = "oneDayByMonth") + @SsoAop() + public BaseResponse<List<VoSoilDay>> oneDayByMonth(Long soilId, String yyyy_MM){ + try { + if(soilId == null){ + return BaseResponseUtils.buildFail("澧掓儏绔檌d涓嶈兘涓虹┖") ; + } + if(yyyy_MM == null || yyyy_MM.trim().equals("")){ + return BaseResponseUtils.buildFail("鏌ヨ鏈堜唤涓嶈兘涓虹┖") ; + } + String ymdStr = yyyy_MM.replaceAll("-", "") ; + if(!NumUtil.isPlusIntNumber(ymdStr)){ + return BaseResponseUtils.buildFail("鏌ヨ鏃ユ湡鏍煎紡涓嶆纭紝鏍煎紡瑙勫畾涓簓yyy-MM-dd") ; + } + Integer ymStart = Integer.parseInt(ymdStr) * 100; + Integer ymEnd = Integer.parseInt(ymdStr) * 100 + 31; + return BaseResponseUtils.buildSuccess(sv.oneDayByMonth(soilId, ymStart, ymEnd)); + } catch (Exception e) { + return BaseResponseUtils.buildException(e.getMessage()) ; + } + } + + + + /** * 鏍规嵁鎸囧畾鏉′欢鏌ヨ鏌愭皵璞$珯涓�浜涙棩璁板綍 * @param qo * @return @@ -74,6 +104,7 @@ if(qo.soilId == null){ return BaseResponseUtils.buildFail("澧掓儏绔檌d涓嶈兘涓虹┖") ; } + qo.completionTime(); return BaseResponseUtils.buildSuccess(sv.someDay(qo)); } catch (Exception e) { return BaseResponseUtils.buildException(e.getMessage()) ; @@ -112,15 +143,18 @@ /** * 鏍规嵁鎸囧畾鏉′欢鏌ヨ鍘嗗彶璁板綍 - * @param soilId + * @param qo * @return */ @GetMapping(path = "oneHistory") @SsoAop() - public BaseResponse<QueryResultVo<List<VoSoil>>> oneHistory(Long soilId){ + public BaseResponse<QueryResultVo<List<VoSoil>>> oneHistory(SoilQo qo){ try { - - return BaseResponseUtils.buildSuccess(sv.oneHistory(soilId)); + if(qo.soilId == null){ + return BaseResponseUtils.buildFail("澧掓儏绔檌d涓嶈兘涓虹┖") ; + } + qo.completionTime(); + return BaseResponseUtils.buildSuccess(sv.oneHistory(qo)); } catch (Exception e) { return BaseResponseUtils.buildException(e.getMessage()) ; } @@ -136,6 +170,7 @@ @SsoAop() public BaseResponse<QueryResultVo<List<VoSoil>>> someLast(SoilQo qo){ try { + qo.completionTime(); return BaseResponseUtils.buildSuccess(sv.someLast(qo)); } catch (Exception e) { return BaseResponseUtils.buildException(e.getMessage()) ; @@ -151,6 +186,7 @@ @SsoAop() public BaseResponse<QueryResultVo<List<VoSoil>>> someHistory(SoilQo qo){ try { + qo.completionTime(); return BaseResponseUtils.buildSuccess(sv.someHistory(qo)); } catch (Exception e) { return BaseResponseUtils.buildException(e.getMessage()) ; -- Gitblit v1.8.0