Administrator
2024-06-28 8db84793a19b02df61c8fb9e5d539c57b827da45
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)