服务端的TigerApi 框架,基于.NET6 2024 版本
Rodney Chen
2025-04-01 08343d90d3aa73dd5ec89aaf7b3815e22eba0eb1
Tiger.Business.WMS/Transaction/In_Default.cs
@@ -83,7 +83,7 @@
                if (CurInvItem.IsNullOrEmpty())
                {
                    //解析条码
                    Result<IInventory> result = WMS_ITEM_Biz.WmsItem.Get(input.SN, input.AuthOption, true);
                    Result<IInventory> result = GetInventory(input.SN, input.AuthOption, true);
                   if (!result.IsSuccessed)
                   {
                       action.IsSuccessed = false;
@@ -111,11 +111,7 @@
                    if (inv.Items.Count == 0)
                    {
                        List<WMS_ITEM_HIS> ItemHistorys = new List<WMS_ITEM_HIS>();
                        WMS_ITEM Item;
                        WMS_ITEM_PKG ItemPkgs;
                        Item = new()
                        var newItem = new WMS_ITEM()
                        {
                            SN = inv.Barcode.SN,
                            ITEM_CODE = inv.Barcode.ItemCode,
@@ -127,9 +123,8 @@
                            UNIT = inv.Barcode.Unit,
                        };
                        WMS_ITEM_HIS his = new(Item, $"标准上架入库");
                        ItemHistorys.Add(his);
                        ItemPkgs = new()
                        WMS_ITEM_HIS his = new(newItem, $"标准上架入库");
                        var newPkg = new WMS_ITEM_PKG()
                        {
                            SN = inv.Barcode.SN,
                            AUTH_ORG = input.AuthOption.CurOrg,
@@ -141,19 +136,19 @@
                        var noExt = inv.Items.Where(q => !inv.ItemsExt.Any(s => s.SN == q.SN)).ToList();
                        //扩展表不存在时新建
                        foreach (var item in noExt)
                        foreach (var ext in noExt)
                        {
                            inv.ItemsExt.Add(new()
                            {
                                SN = item.SN,
                                SN = ext.SN,
                                META_SN = inv.Barcode.MetaSn,
                                QR_CODE = inv.Barcode.MetaSn
                            });
                        }
                        inv.Items.Add(Item);
                        inv.Items.Add(newItem);
                        inv.History.Add(his);
                        inv.Packages.Add(ItemPkgs);
                        inv.Packages.Add(newPkg);
                    }
                    //雅达不从条码上更新数量
                    //else if (inv.Items.Count == 1)
@@ -288,6 +283,11 @@
                    item.TRANS_CODE = "In_Default";
                    item.TRANS_NO = $"In_Default_{DateTime.Now:yyyyMMdd}";
                }
                foreach (var item in CurInvItem.Packages)
                {
                    item.TRANS_CODE = "In_Default";
                    item.TRANS_NO = $"In_Default_{DateTime.Now:yyyyMMdd}";
                }
                Result putonResult = PutOn(input.AuthOption, nLocation.LOCATION_CODE);
                if (!putonResult.IsSuccessed)
                {