| | |
| | | /// </summary> |
| | | public class In_BIZ_U9_RECEIPT : WmsTask, IIn_BIZ_U9_RECEIPT |
| | | { |
| | | |
| | | public IIn_BIZ_U9_RECEIPT Init(string id, string userCode, string apiHost, string orgCode) |
| | | { |
| | | base.Init(id, userCode, apiHost, orgCode); |
| | |
| | | action.LocaleMsg = Biz.L("WMS.Default.ScanItem.SnEmptyFailure"); |
| | | return SetOutPutMqttMsg(action, input.Locale); |
| | | } |
| | | //判断扫描的是否货架 |
| | | //判断扫描的是否货架/储位 |
| | | var whUnit = await MainDB.Queryable<V_WH_UNIT>().Where(t => (t.SHELF_CODE.ToUpper() == input.SN || t.LOCATION_CODE.ToUpper() == input.SN) && t.AUTH_ORG == OrgCode).IncludesAllFirstLayer().FirstAsync(); |
| | | //if (string.IsNullOrEmpty(CurScanShelf?.ShelfCode)) |
| | | if (!whUnit.IsNullOrEmpty() || string.IsNullOrEmpty(CurScanShelf?.ShelfCode)) |
| | |
| | | sn.STATUS = WMS_ITEM.STATUSs.InStore.GetValue(); |
| | | sn.IS_IN = "Y"; |
| | | } |
| | | //设置当前物料的默认储位 |
| | | if (CurInvItem.ItemInfo.DEFAULT_LOCATION.IsNullOrEmpty()) |
| | | { |
| | | SetDefaultLocation(MainDB, CurInvItem.ItemInfo, nLocation, receiptDtl.ID.ToInt64()); |
| | | } |
| | | //如果当前行上架完成标记为待审核 |
| | | receiptDtl.QTY_IN = receipt.SnList.Where(q => q.LINE_NO == receiptDtl.LINE_NO && q.STATUS == WMS_ITEM.STATUSs.InStore.GetValue()).Sum(q => q.QTY); |
| | | if (receiptDtl.QTY_IN == receiptDtl.QTY_OK) |
| | |
| | | }); |
| | | |
| | | //完成所有处理后使用事务保存数据 |
| | | action = DoIfFinish(action, input.Locale, () => |
| | | { |
| | | //设置当前物料的默认储位 |
| | | if (CurInvItem.ItemInfo.DEFAULT_LOCATION.IsNullOrEmpty()) |
| | | { |
| | | SetDefaultLocation(MainDB, CurInvItem.ItemInfo, nLocation, receiptDtl.ID.ToInt64()); |
| | | } |
| | | }); |
| | | action = DoIfFinish(action, input.Locale |
| | | //, () => |
| | | //{ |
| | | // //设置当前物料的默认储位 |
| | | // if (CurInvItem.ItemInfo.DEFAULT_LOCATION.IsNullOrEmpty()) |
| | | // { |
| | | // SetDefaultLocation(MainDB, CurInvItem.ItemInfo, nLocation, receiptDtl.ID.ToInt64()); |
| | | // } |
| | | //} |
| | | ); |
| | | //if (!action.Data.Data.IsNullOrEmpty() && action.Data.Data is DefaultInStoreOutput) |
| | | //{ |
| | | // (action.Data.Data as DefaultInStoreOutput).OrderInfo = receipt; |