From 8dbd0c5af65835a1f99a2ac359660d1fa964d945 Mon Sep 17 00:00:00 2001
From: Administrator <Administrator@DESKTOP-5BIMHQ3>
Date: 星期二, 25 六月 2024 11:44:12 +0800
Subject: [PATCH] 修改问题

---
 Wms/WMS.BLL/DataServer/StockDetailServer.cs |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/Wms/WMS.BLL/DataServer/StockDetailServer.cs b/Wms/WMS.BLL/DataServer/StockDetailServer.cs
index 6b1cfdc..530330e 100644
--- a/Wms/WMS.BLL/DataServer/StockDetailServer.cs
+++ b/Wms/WMS.BLL/DataServer/StockDetailServer.cs
@@ -9,6 +9,7 @@
 using WMS.Entity.BllQualityEntity;
 using WMS.Entity.Context;
 using WMS.Entity.DataEntity;
+using WMS.Entity.SysEntity;
 using WMS.IBLL.IDataServer;
 
 namespace WMS.BLL.DataServer
@@ -437,6 +438,13 @@
                 {
                     throw new Exception($"搴撳瓨涓凡鏈夌紪鍙蜂负锛歿PalletNo}鐨勬槑缁嗭紝璇峰嬁閲嶅娣诲姞!");
                 }
+                //鐩爣鍌ㄤ綅淇℃伅
+                var locatInfo = Db.Queryable<SysStorageLocat>().First(w => w.LocatNo == LocatNo && w.Status == "0" && w.IsDel == "0");
+                if (locatInfo == null)
+                {
+                    throw new Exception("鍌ㄤ綅鍦板潃涓嶅瓨鍦�!");
+                }
+                
                 Db.BeginTran();
 
                 var comTime = DateTime.Now;
@@ -474,6 +482,10 @@
                 //鎻掑叆搴撳瓨鏄庣粏
                 Db.Insertable(model).ExecuteCommand();
 
+                locatInfo.Status = "1";//鏈夌墿鍝�
+                //淇敼鐩爣鍌ㄤ綅鐘舵��
+                Db.Updateable(locatInfo).ExecuteCommand();
+
                 Db.CommitTran();
             }
             catch (Exception e)

--
Gitblit v1.8.0