| | |
| | | using Tiger.Business.WMS.Sharetronic.Shelf; |
| | | using Tiger.Model.Entitys.MES.U9C; |
| | | using Tiger.Model.MES.Yada; |
| | | using static IronPython.Modules._ast; |
| | | |
| | | namespace Tiger.Business.WMS.Transaction |
| | | { |
| | |
| | | action.LocaleMsg = Biz.L("WMS.Default.ScanItem.ItemCodeNotExistsOrNotActive", inv.ItemInfo.ITEM_CODE.IsNullOrEmpty(inv.Barcode.ItemCode)); |
| | | return SetOutPutMqttMsg(action, input.Locale); |
| | | } |
| | | //默认储位验证 |
| | | if (!inv.ItemInfo.DEFAULT_LOCATION.IsNullOrEmpty() && inv.ItemInfo.DEFAULT_LOCATION != CurScanShelf.LocationCode) |
| | | { |
| | | action.IsSuccessed = false; |
| | | //action.LocaleMsg = Biz.L("物料[{0}]只允许上架到储位[{0}],请重新扫描储位"); |
| | | action.LocaleMsg = Biz.L("WMS.Default.ScanItem.DefaultLocationError", inv.ItemInfo.ITEM_CODE, inv.ItemInfo.DEFAULT_LOCATION); |
| | | return SetOutPutMqttMsg(action, input.Locale); |
| | | } |
| | | CurInvItem = inv; |
| | | } |
| | | |
| | |
| | | action.LocaleMsg = Biz.L($"WMS.Default.ScanShelf.ItemAlreadyExistsInLocation", nLocation.LOCATION_CODE, locationData.SN); |
| | | return SetOutPutMqttMsg(action, input.Locale); |
| | | } |
| | | CurScanShelf.Location = nLocation; |
| | | CurScanShelf.LocationCode = nLocation.LOCATION_CODE; |
| | | } |
| | | else |
| | |
| | | }); |
| | | |
| | | //完成所有处理后使用事务保存数据 |
| | | action = DoIfFinish(action, input.Locale); |
| | | action = DoIfFinish(action, input.Locale, () => { |
| | | //设置当前物料的默认储位 |
| | | if (CurInvItem.ItemInfo.DEFAULT_LOCATION.IsNullOrEmpty()) |
| | | { |
| | | SetDefaultLocation(MainDB, CurInvItem.ItemInfo, nLocation); |
| | | } |
| | | }); |
| | | } |
| | | catch (Exception ex) |
| | | { |