From 44a78bc47ab66d6492bc0579f58f24dc1921b5d5 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期四, 03 四月 2025 15:44:30 +0800
Subject: [PATCH] 1、webSocket相关代码进行了注解优化; 2、通信中间件把阀控器上报的阀门状态进行消息推送,前端、小程序可能用到(webSocket推送)。
---
pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/IrrigatePlanCtrl.java | 33 ++++++++++++++++++++++-----------
1 files changed, 22 insertions(+), 11 deletions(-)
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/IrrigatePlanCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/IrrigatePlanCtrl.java
index e60cbae..59708ae 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/IrrigatePlanCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/IrrigatePlanCtrl.java
@@ -273,7 +273,7 @@
automaticClose.setOperator(operatorId);
automaticClose.setOpenType(Byte.valueOf("1"));
- commandSv.planedOpenTimedClose(automaticClose, schedule.getStartTime(), schedule.getDuration());
+ commandSv.planedOpenTimedClose(automaticClose, planId, schedule.getStartTime(), schedule.getDuration());
}
}
@@ -281,18 +281,29 @@
}
/**
- * 鑾峰彇鐏屾簤璁″垝鍒楄〃
- * @param vo
+ * 缁堟鐏屾簤璁″垝
+ * @param planSimple
+ * @param bindingResult
* @return
*/
- //@GetMapping(path = "/getIrrigatePlans")
- //public BaseResponse<QueryResultVo<List<VoIrrigatePlan>>> getIrrigatePlans(QoIrrigatePlan vo) {
- // try {
- // QueryResultVo<List<VoIrrigatePlan>> res = irrigatePlanSv.getIrrigatePlans(vo);
- // return BaseResponseUtils.buildSuccess(res);
- // } catch (Exception e) {
- // log.error("鑾峰彇杞亴缁勮褰曞紓甯�", e);
- // return BaseResponseUtils.buildException(e.getMessage());
+ //@PostMapping(path = "terminatePlan", consumes = MediaType.APPLICATION_JSON_VALUE)
+ //@Transactional(rollbackFor = Exception.class)
+ //public BaseResponse<Boolean> terminatePlan(@RequestBody @Valid PlanSimple planSimple, BindingResult bindingResult){
+ // if(bindingResult != null && bindingResult.hasErrors()){
+ // return BaseResponseUtils.buildErrorMsg(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
// }
+ //
+ // Long planId = planSimple.getPlanId();
+ // Long operatorId = planSimple.getOperatorId();
+ //
+ // IrIrrigatePlan iIrrigatePlan = new IrIrrigatePlan();
+ // iIrrigatePlan.setId(planId);
+ // iIrrigatePlan.setExecutingState((byte)3);
+ // if(irrigatePlanSv.updatePlan(iIrrigatePlan) == 0){
+ // return BaseResponseUtils.buildErrorMsg("缁堟璁″垝鐘舵�佸け璐�");
+ // }
+ //
+ //
+ //
//}
}
--
Gitblit v1.8.0