From 527f2222ec9b268e5429326417a37a81bdaf5037 Mon Sep 17 00:00:00 2001
From: Administrator <Administrator@DESKTOP-5BIMHQ3>
Date: 星期四, 04 七月 2024 10:17:53 +0800
Subject: [PATCH] 修改问题
---
Wms/WMS.BLL/DataServer/StockDetailServer.cs | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/Wms/WMS.BLL/DataServer/StockDetailServer.cs b/Wms/WMS.BLL/DataServer/StockDetailServer.cs
index 6b1cfdc..9d629d2 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
@@ -408,7 +409,7 @@
/// <summary>
/// 娣诲姞鎵樼洏搴撳瓨鏄庣粏
/// </summary>
- public void InsertStockDetail(string PalletNo,string WareHouseNo,string AreaNo,string LocatNo, string PalletStatus,int userId)
+ public void InsertStockDetail(string PalletNo,string WareHouseNo,string AreaNo,string LocatNo, string PalletStatus, string SkuNo, string SkuName, string LotNo, int userId)
{
try
{
@@ -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;
@@ -465,6 +473,10 @@
IsBale = "0",
IsBelt = "0",
+ SkuNo = SkuNo,
+ SkuName = SkuName,
+ LotNo = LotNo,
+
PalletStatus = PalletStatus,
IsDel = "0",
@@ -474,6 +486,10 @@
//鎻掑叆搴撳瓨鏄庣粏
Db.Insertable(model).ExecuteCommand();
+ locatInfo.Status = "1";//鏈夌墿鍝�
+ //淇敼鐩爣鍌ㄤ綅鐘舵��
+ Db.Updateable(locatInfo).ExecuteCommand();
+
Db.CommitTran();
}
catch (Exception e)
--
Gitblit v1.8.0