| | |
| | | using WMS.Entity.BllQualityEntity; |
| | | using WMS.Entity.Context; |
| | | using WMS.Entity.DataEntity; |
| | | using WMS.Entity.SysEntity; |
| | | using WMS.IBLL.IDataServer; |
| | | |
| | | namespace WMS.BLL.DataServer |
| | |
| | | /// <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 |
| | | { |
| | |
| | | { |
| | | 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; |
| | |
| | | IsBale = "0", |
| | | IsBelt = "0", |
| | | |
| | | SkuNo = SkuNo, |
| | | SkuName = SkuName, |
| | | LotNo = LotNo, |
| | | |
| | | PalletStatus = PalletStatus, |
| | | |
| | | IsDel = "0", |
| | |
| | | //插入库存明细 |
| | | Db.Insertable(model).ExecuteCommand(); |
| | | |
| | | locatInfo.Status = "1";//有物品 |
| | | //修改目标储位状态 |
| | | Db.Updateable(locatInfo).ExecuteCommand(); |
| | | |
| | | Db.CommitTran(); |
| | | } |
| | | catch (Exception e) |