From 98958cdd70d3a63a562e9238ddecb9c6c6865e95 Mon Sep 17 00:00:00 2001
From: zjh <2207896513@qq.com>
Date: 星期五, 12 十二月 2025 21:02:14 +0800
Subject: [PATCH] 添加接口,查询栈板码是否入库,返回消息,是否允许解绑

---
 StandardPda/MESApplication/Controllers/Warehouse/womdaaController.cs |   43 +++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 43 insertions(+), 0 deletions(-)

diff --git a/StandardPda/MESApplication/Controllers/Warehouse/womdaaController.cs b/StandardPda/MESApplication/Controllers/Warehouse/womdaaController.cs
index 9d92d76..5387eb8 100644
--- a/StandardPda/MESApplication/Controllers/Warehouse/womdaaController.cs
+++ b/StandardPda/MESApplication/Controllers/Warehouse/womdaaController.cs
@@ -1,6 +1,7 @@
 锘縰sing System.Dynamic;
 using AngleSharp.Text;
 using MES.Service.Dto.service;
+using MES.Service.Dto.webApi;
 using MES.Service.Modes;
 using MES.Service.service;
 using MES.Service.service.Warehouse;
@@ -265,4 +266,46 @@
             return ResponseResult.ResponseError(ex);
         }
     }
+
+    /// <summary>
+    ///     鏌ヨ鏍堟澘鐮佺姸鎬�
+    /// </summary>
+    /// <returns></returns>
+    [HttpPost("GetStackCodeState")]
+    public ResponseResult GetStackCodeState(StackCodeStateDto request)
+    {
+        var entity = new MessageCenter();
+        entity.TableName = TableName;
+        entity.Url = URL + "GetStackCodeState";
+        entity.Method = METHOD;
+        entity.Data = JsonConvert.SerializeObject(request);
+        entity.Status = 1;
+        entity.CreateBy = "PL017";
+        try
+        {
+            dynamic resultInfos = new ExpandoObject();
+            var state = m.GetStackCodeState(request.StackCode);
+            resultInfos.state = state;
+
+            entity.Result = 1;
+            entity.DealWith = 1;
+            _manager.save(entity);
+
+            return new ResponseResult
+            {
+                status = state,
+                message = state == 1 ? "璇ユ爤鏉跨爜宸插叆搴擄紝涓嶅厑璁歌В缁�" : "鍏佽瑙g粦",
+                data = resultInfos
+            };
+        }
+        catch (Exception ex)
+        {
+            entity.Result = 0;
+            entity.DealWith = 0;
+            entity.ResultData = ex.Message;
+            _manager.save(entity);
+
+            return ResponseResult.ResponseError(ex);
+        }
+    }
 }
\ No newline at end of file

--
Gitblit v1.9.3