zhaowc
2024-06-25 17ac8fc54b24cdabd3344fd0fdbb1b7d98c9fab2
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)