From aec4636e4fb430055feb66751da0e6c05bb864df Mon Sep 17 00:00:00 2001
From: zuoxiao <470321431@qq.com>
Date: 星期三, 30 四月 2025 16:25:30 +0800
Subject: [PATCH] fix(irrigatePlan): 修复终止灌溉计划时长设置错误- 将终止计划的默认时长从 9999 修改为 0 - 此修改确保在终止灌溉计划时,不会出现时长设置过长的问题
---
pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/local/ReturnCommand.java | 43 +++++++++++++++++++++++++++++++++++++++++++
1 files changed, 43 insertions(+), 0 deletions(-)
diff --git a/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/local/ReturnCommand.java b/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/local/ReturnCommand.java
new file mode 100644
index 0000000..f07c999
--- /dev/null
+++ b/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/local/ReturnCommand.java
@@ -0,0 +1,43 @@
+package com.dy.rtuMw.server.local;
+
+
+import com.dy.common.mw.protocol.Command;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+/**
+ * @Author liurunyu
+ * @Date 2023/12/21 15:17
+ * @LastEditTime 2023/12/21 15:17
+ * @Description
+ */
+public class ReturnCommand {
+
+ private static Logger log = LogManager.getLogger(ReturnCommand.class) ;
+
+ /**
+ * 澶勭悊鍛戒护鎴愬姛
+ * @param message
+ */
+ public static Command successed(String message, String commandId, String code, Object attachment){
+ log.info(message) ;
+ Command command = new Command().createReturnSuccessCommand(message, commandId, code) ;
+ command.setAttachment(attachment) ;
+ return command ;
+ }
+ /**
+ * 澶勭悊鍛戒护鎴愬姛
+ * @param message
+ */
+ public static Command successed(String message, String commandId, String code){
+ log.info(message) ;
+ return new Command().createReturnSuccessCommand(message, commandId, code) ;
+ }
+ /**
+ * 澶勭悊鍛戒护鍙戠敓閿欒
+ * @param message
+ */
+ public static Command errored(String message, String commandId, String code){
+ log.error(message) ;
+ return new Command().createReturnErrorCommand(message, commandId, code) ;
+ }
+}
--
Gitblit v1.8.0