| | |
| | | SupplierLot = stocks.First().SupplierLot, |
| | | IsWave = "0", |
| | | WaveNo = "", |
| | | IsIssueLotNo = string.IsNullOrWhiteSpace(d.LotNo)? "0":"1", |
| | | |
| | | CreateUser = 0, |
| | | }; |
| | |
| | | |
| | | //获取储位信息 |
| | | var locat = Db.Queryable<SysStorageLocat>().First(a => a.IsDel == "0" && a.WareHouseNo == "W01" && a.LocatNo == task.StartLocat); |
| | | |
| | | //获取移库任务对应目标储位信息 |
| | | SysStorageLocat endlocat = new SysStorageLocat(); |
| | | if (task.Type == "2") |
| | | { |
| | | endlocat = Db.Queryable<SysStorageLocat>().First(a => a.IsDel == "0" && a.WareHouseNo == "W03" && a.LocatNo == task.EndLocat); |
| | | if (endlocat == null) |
| | | { |
| | | throw new Exception("未查询到目标储位信息"); |
| | | } |
| | | } |
| | | if (locat == null) |
| | | { |
| | | Db.RollbackTran(); |
| | |
| | | } |
| | | locat.Status = "1"; //有物品 |
| | | Db.Updateable(locat).ExecuteCommand(); |
| | | if (endlocat != null) |
| | | { |
| | | endlocat.Status = "0"; //空储位 0 |
| | | Db.Updateable(endlocat).ExecuteCommand(); |
| | | } |
| | | |
| | | if (noticeDetail.FactQty == 0) |
| | | { |
| | |
| | | d.Status = "0"; |
| | | d.UpdateUser = userId; |
| | | d.UpdateTime = DateTime.Now; |
| | | |
| | | if (notice.Type == "1" || notice.Type == "5" || notice.Type == "6" || notice.Type == "7" || notice.Type == "8")//1:领料出库、 |
| | | { |
| | | if (d.IsIssueLotNo != "1") |
| | | { |
| | | d.LotNo = ""; |
| | | } |
| | | |
| | | } |
| | | } |
| | | notice.Status = "0"; |
| | | notice.UpdateUser = userId; |