From e7821f087f3d1d39c945fb9772ca97f6ef24de95 Mon Sep 17 00:00:00 2001
From: wuzeyu <1223318623@qq.com>
Date: 星期五, 19 七月 2024 11:41:47 +0800
Subject: [PATCH] 作物相关接口、作物灌溉制度相关接口、轮灌组相关接口、灌溉单元相关接口修改完善失败响应信息并配置相应枚举类

---
 pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/common/CommandResultCtrl.java |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/common/CommandResultCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/common/CommandResultCtrl.java
index 1ef8c8d..d9d64c5 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/common/CommandResultCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/common/CommandResultCtrl.java
@@ -3,6 +3,7 @@
 import com.dy.common.mw.protocol.Data;
 import com.dy.common.webUtil.BaseResponse;
 import com.dy.common.webUtil.BaseResponseUtils;
+import com.dy.pipIrrGlobal.command.ComSupport;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.http.MediaType;
 import org.springframework.web.bind.annotation.PostMapping;
@@ -25,13 +26,16 @@
 public class CommandResultCtrl extends ComSupport {
     @PostMapping(path = "receive", consumes = MediaType.APPLICATION_JSON_VALUE)
     public BaseResponse<String> receive(@RequestBody Data data) {
-        String comId = "0";
+        Long comId = 0L;
         if(data.getCommandId() != null) {
-            comId = data.getCommandId();
+            comId = Long.parseLong(data.getCommandId());
         }
+
         CompletableFuture<Data> feature = (CompletableFuture<Data>) features.get(comId);
         if(feature != null) {
             feature.complete(data);
+        }else{
+            log.error("feature is null");
         }
         return BaseResponseUtils.buildSuccess("ok");
     }

--
Gitblit v1.8.0