| | |
| | | using System.Drawing.Drawing2D; |
| | | using Tiger.Model.Sharetronic.Shelf; |
| | | using Tiger.IBusiness; |
| | | using Tiger.Model.MES.Yada; |
| | | |
| | | namespace Tiger.Business.WMS.Transaction |
| | | { |
| | |
| | | action.LocaleMsg = Biz.L("WMS.RePrint.ScanItem.SnEmptyFailure"); |
| | | return SetOutPutMqttMsg(action, input.Locale); |
| | | } |
| | | |
| | | var whUnit = await Biz.Db.Queryable<V_WH_UNIT>().Where(t => (t.SHELF_CODE.ToUpper() == input.SN || t.LOCATION_CODE.ToUpper() == input.SN) && t.AUTH_ORG == OrgCode).IncludesAllFirstLayer().FirstAsync(); |
| | | |
| | | var LotNos = Biz.DataSource["YadaU9C"].Client.Queryable<mes_WhLotCodeQtyInfo>().Where(t => t.Bin == input.SN).ToList(); |
| | | //var whUnit = await Biz.Db.Queryable<V_WH_UNIT>().Where(t => t.LOCATION_CODE.ToUpper() == input.SN && t.AUTH_ORG == OrgCode).IncludesAllFirstLayer().FirstAsync(); |
| | | var items = LotNos.Select(q => q.ItemCode); |
| | | var ItemList = Biz.Db.Queryable<BAS_ITEM>().Where(t => t.AUTH_ORG == OrgCode && items.Contains(t.ITEM_CODE)).IncludesAllFirstLayer().ToList(); |
| | | var temps = new List<TemplateInput>(); |
| | | foreach (var item in LotNos) |
| | | { |
| | | var temp = new TemplateInput |
| | | { |
| | | custCode="", |
| | | itemCode= item.ItemCode, |
| | | itemDesc= ItemList.Where(q => q.ITEM_CODE == item.ItemCode).FirstOrDefault()?.ITEM_DESC, |
| | | sapItemCode= ItemList.Where(q => q.ITEM_CODE == item.ItemCode).FirstOrDefault()?.ExtInfo?.SapCode, |
| | | WoBatch = item.LotCode, |
| | | batchQty= item.StoreQty, |
| | | qrCode="", |
| | | }; |
| | | temps.Add(temp); |
| | | } |
| | | action.Data.Data = temps; |
| | | action.LocaleMsg = Biz.L("WMS.RePrint.ScanItem.ScanSuccessed"); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | //action.CatchExceptionWithLog(ex, $"扫描[{input.SN}]异常"); |
| | | action.CatchExceptionWithLog(ex, Biz.L("WMS.Default.Scan.ScanException", input.SN)); |
| | | action.CatchExceptionWithLog(ex, Biz.L("WMS.RePrint.Scan.ScanException", input.SN)); |
| | | } |
| | | return SetOutPutMqttMsg(action, input.Locale); |
| | | } |