服务端的TigerApi 框架,基于.NET6 2024 版本
Ben Lin
2025-01-17 aa7d6bef3b1f3437b69ef21f8af4ace39939d2b9
Tiger.Business.WMS/Transaction/ReprintLabel.cs
@@ -15,6 +15,7 @@
using Tiger.IBusiness;
using Tiger.Model.MES.Yada;
using Apache.NMS.ActiveMQ.Commands;
using System.Diagnostics;
namespace Tiger.Business.WMS.Transaction
{
@@ -58,7 +59,8 @@
                    action.LocaleMsg = Biz.L("WMS.RePrint.ScanItem.SnEmptyFailure");
                    return SetOutPutMqttMsg(action, input.Locale);
                }
                var LotNos = Biz.DataSource["YadaU9C"].Client.Queryable<mes_WhLotCodeQtyInfo>().Where(t => t.Bin == input.SN).ToList();
                var LotNos = Biz.DataSource["YadaU9C"].Client.Ado.SqlQuery<mes_WhLotCodeQtyInfo>($"select *,'' as ID from mes_WhLotCodeQtyInfo where Bin = '{input.SN}'");
                //Biz.DataSource["YadaU9C"].Client.Queryable<mes_WhLotCodeQtyInfo>().Where(t => t.Bin == input.SN).ToList();
                CurScanShelf = new ScanShelfInfo();
                // 查询货架信息
                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();
@@ -91,6 +93,12 @@
                    CurScanShelf.IsSmartRack = false;
                    LocationCode = whUnit.LOCATION_CODE;
                }
                else {
                    action.IsSuccessed = false;
                    //action.LocaleMsg = Biz.L("请输入或扫描有效的货架/储位码");
                    action.LocaleMsg = Biz.L("WMS.Default.ScanShelf.ShelfCanNotEmpty");
                    return action;
                }
                var temps = new List<TemplateInput>();
                foreach (var item in LotNos)
                {
@@ -106,7 +114,12 @@
                    };
                    temps.Add(temp);
                }
                Biz.Db.Storageable(LotNos, UserCode).ExecuteCommand();
                var y = Biz.Db.Storageable(LotNos, UserCode)
                               .WhereColumns(t => new { t.ItemCode, t.LotCode })
                               .ToStorage();
                y.AsInsertable.ExecuteCommand();
                y.AsUpdateable.IgnoreColumns(x => x.ID).ExecuteCommand();
                action.Data.Data = temps;
                action.LocaleMsg = Biz.L("WMS.RePrint.ScanItem.ScanSuccessed");
            }
@@ -314,7 +327,6 @@
                        throw dbTran.ErrorException;
                    }
                    LocationCode = "";
                    action.Data.Data = rePrints;
                    action.LocaleMsg = Biz.L("库位批次条码上架成功");
                }