| | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 验证储位地址(地码)是否可用 |
| | | /// </summary> |
| | | /// <param name="locatNo">储位编码</param> |
| | | /// <returns></returns> |
| | | public string CheckLocatNo(string locatNo) |
| | | { |
| | | try |
| | | { |
| | | string strMsg = ""; |
| | | var storageLocat = Db.Queryable<SysStorageLocat>().First(w => w.IsDel == "0" && w.LocatNo == locatNo && w.Status == "0" && w.WareHouseNo == "W02"); |
| | | if (storageLocat == null) |
| | | { |
| | | throw new Exception("-1:地码(储位信息)不存在或非空闲状态,请核查!"); |
| | | } |
| | | |
| | | return strMsg; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw new Exception(ex.Message); |
| | | } |
| | | } |
| | | |
| | | //根据箱码获取物料、批次、数量等信息 |
| | | public PdaPalletNoCheckDto GetBoxInfoByBoxNo(string boxNo) |
| | | { |
| | |
| | | throw new Exception("-1:当前托盘正在执行中,绑定失败,请核实!"); |
| | | } |
| | | bindId = bind.Id; |
| | | bind.Qty += model.SkuQty; |
| | | } |
| | | |
| | | #region 箱码信息 |
| | |
| | | |
| | | // 更改箱支关系表 |
| | | decimal factQty = 0.00m;//托盘总数量 |
| | | //成品组托 |
| | | if (model.SkuQty == 0) |
| | | { |
| | | var boxGroup = boxInfoList.GroupBy(m => m.BoxNo).ToList(); |
| | |
| | | var sqlString = string.Empty; |
| | | if (factQty == 0) |
| | | { |
| | | sqlString += $"update BllArrivalNoticeDetail set FactQty = FactQty + '{bind.Qty}' where id = '{model.AsnDetailId}';"; |
| | | sqlString += $"update BllArrivalNoticeDetail set FactQty = FactQty + '{model.SkuQty}' where id = '{model.AsnDetailId}';"; |
| | | } |
| | | else |
| | | { |