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