From 0b5ccdca6263cf7a2cee460f30c76ef1efea2811 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期六, 27 四月 2024 17:47:27 +0800
Subject: [PATCH] 人工出库,人工入库,人工移库,PDA扫码确认外协物料已被取走接口

---
 代码管理/WMS/WMS_Server/WIDESEA_WMS/ToMes/AddToFloat3.cs |   34 ++++++++++++++++++++++++++++++++++
 1 files changed, 34 insertions(+), 0 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_WMS/ToMes/AddToFloat3.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_WMS/ToMes/AddToFloat3.cs"
index f281e92..f6c14a3 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_WMS/ToMes/AddToFloat3.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Server/WIDESEA_WMS/ToMes/AddToFloat3.cs"
@@ -3,10 +3,13 @@
 using WIDESEA_Comm;
 using WIDESEA_Comm.LogInfo;
 using WIDESEA_Common;
+using WIDESEA_Core.EFDbContext;
 using WIDESEA_Core.ManageUser;
 using WIDESEA_Core.Utilities;
 using WIDESEA_Entity.DomainModels;
 using WIDESEA_Entity.DomainModels.Mes;
+using WIDESEA_WMS.IRepositories;
+using WIDESEA_WMS.Repositories;
 
 namespace WIDESEA_WMS
 {
@@ -73,5 +76,36 @@
             }
             return content;
         }
+
+        /// <summary>
+        /// 澶栧崗璐т綅鎵爜纭鐗╂枡宸茶鍙栬蛋
+        /// </summary>
+        /// <param name="saveModel"></param>
+        /// <returns></returns>
+        public WebResponseContent Confirmedcut(SaveModel saveModel)
+        {
+            WebResponseContent content = new WebResponseContent();
+            try
+            {
+                VOLContext context = new VOLContext();
+                Idt_stationinfoRepository stationinfoRepository = new dt_stationinfoRepository(context);
+                string sn = saveModel.MainData["from_address"].ToString();
+                var station = stationinfoRepository.Find(x => x.bindSN.Contains(sn) && (x.stationCode.Contains("W01001001") || x.stationCode.Contains("W01001002") || x.stationCode.Contains("W01001003"))).FirstOrDefault();
+                if (station == null) throw new Exception($"鏈壘鍒拌溅杞甋N鍙�:{sn}鐨勫鍗忚揣浣嶄俊鎭紒");
+                station.Number = string.Empty;
+                station.billetID = string.Empty;
+                station.heatNumber = string.Empty;
+                station.stationType = string.Empty;
+                station.tray_status = "EmptyTray";
+                station.lastUpdateTime = DateTime.Now;
+                stationinfoRepository.Update(station, true);
+                content.OK();
+            }
+            catch (Exception ex)
+            {
+                content.Message = ex.Message;
+            }
+            return content;
+        }
     }
 }

--
Gitblit v1.9.3