From 7b866428a3aff80684f04f38361b7efb31097f47 Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期五, 10 一月 2025 10:05:09 +0800 Subject: [PATCH] 新增 ReprintBarcode 类和接口,更新注释 --- Tiger.IBusiness.WMS/Transaction/IReprintBarcode.cs | 22 +++++++ Tiger.Api/Language.db | 0 Tiger.Business.WMS/Transaction/ItemQuery.cs | 2 Tiger.Business.WMS/Transaction/ReprintBarcode.cs | 100 +++++++++++++++++++++++++++++++++ 4 files changed, 123 insertions(+), 1 deletions(-) diff --git a/Tiger.Api/Language.db b/Tiger.Api/Language.db index 7a3f82b..f40c99a 100644 --- a/Tiger.Api/Language.db +++ b/Tiger.Api/Language.db Binary files differ diff --git a/Tiger.Business.WMS/Transaction/ItemQuery.cs b/Tiger.Business.WMS/Transaction/ItemQuery.cs index 89492a2..7a99260 100644 --- a/Tiger.Business.WMS/Transaction/ItemQuery.cs +++ b/Tiger.Business.WMS/Transaction/ItemQuery.cs @@ -18,7 +18,7 @@ namespace Tiger.Business.WMS.Transaction { /// <summary> - /// 鐢熶骇棰嗘枡浜嬪姟 + /// 搴撳瓨鏌ヨ浜嬪姟 /// </summary> public class ItemQuery : WMSTransactionBase, IItemQuery { diff --git a/Tiger.Business.WMS/Transaction/ReprintBarcode.cs b/Tiger.Business.WMS/Transaction/ReprintBarcode.cs new file mode 100644 index 0000000..fadc30b --- /dev/null +++ b/Tiger.Business.WMS/Transaction/ReprintBarcode.cs @@ -0,0 +1,100 @@ +锘縰sing Rhea.Common; +using Tiger.Model.Minsun; +using Microsoft.AspNetCore.Http; +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Expressions; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Tiger.Model; +using Apache.NMS; +using System.Drawing.Drawing2D; +using Tiger.Model.Sharetronic.Shelf; +using Tiger.IBusiness; + +namespace Tiger.Business.WMS.Transaction +{ + /// <summary> + /// 鏌ュ偍浣嶈ˉ鍗版潯鐮佷簨鍔� + /// </summary> + public class ReprintBarcode : WMSTransactionBase, IReprintBarcode + { + public IReprintBarcode Init(string id, string userCode, string apiHost, string orgCode) + { + TransID = id; + UserCode = userCode; + ApiHost = apiHost; + OrgCode = orgCode; + Logger.Console.Info($"Start {this.GetType().Name} Transaction[ID: {TransID}]"); + return this; + } + + #region Propertys & Variables + public string UserCode { get; set; } + public long UserId { get; set; } + public string OrgCode { get; set; } + public List<SuggestItem> Suggests { get; set; } = new(); + public List<V_WMS_ITEM> Vitem { get; set; } = new(); + public List<WMS_ITEM_POOL> CurPoolList => Suggests.Where(q => !q.poolItem.IsNullOrEmpty()).Select(q => q.poolItem).ToList(); + public Inventory CurInv { get; set; } + public BIZ_ERP_PROD_OUT req { get; set; } + public ReqType CurReqType { get; set; } + public List<BIZ_ERP_PROD_OUT_DTL> dtls { get; set; } = new(); + public bool isExceed { get; set; } + public ProductionPickToMes toMes { get; set; } + public bool his_isComplete { get; set; } + public bool isCutting { get; set; } + public decimal cutQty { get; set; } + + public BIZ_WMS_TRANSFER transferH = null; + public BIZ_WMS_TRANSFER cTransferH = null; + public BIZ_WMS_TRANSFER_DTL transferDtl = null; + public BIZ_WMS_TRANSFER_SN transferSn = null; + #endregion + + #region Functions + /// <summary> + /// 鎵弿鍏ュ彛 + /// </summary> + public async Task<ApiAction<ScanOutput>> Scan(BaseInput input) + { + var action = new ApiAction<ScanOutput>(); + try + { + if (input.SN.IsNullOrEmpty()) + { + action.IsSuccessed = false; + 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(); + + + } + catch (Exception ex) + { + //鍙栨秷褰撳墠鎿嶄綔 + ResetInfo(); + //action.CatchExceptionWithLog(ex, $"鎵弿[{input.SN}]寮傚父"); + action.CatchExceptionWithLog(ex, Biz.L("WMS.Default.Scan.ScanException", input.SN)); + } + return SetOutPutMqttMsg(action, input.Locale); + } + + #endregion + + public override bool Close(bool needSaveHistoryLog = false) + { + needSaveHistoryLog = true; + //淇濆瓨鎿嶄綔鏃ュ織 + + this.IsFinished = true; + return IsFinished ? base.Close(needSaveHistoryLog) : IsFinished; + } + + }//endClass +} diff --git a/Tiger.IBusiness.WMS/Transaction/IReprintBarcode.cs b/Tiger.IBusiness.WMS/Transaction/IReprintBarcode.cs new file mode 100644 index 0000000..0d6b7f1 --- /dev/null +++ b/Tiger.IBusiness.WMS/Transaction/IReprintBarcode.cs @@ -0,0 +1,22 @@ +锘縰sing Rhea.Common; +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Security.Policy; +using System.Text; +using System.Threading.Tasks; +using Tiger.Model; +using Tiger.Model.Sharetronic.Shelf; + +namespace Tiger.IBusiness +{ + public interface IReprintBarcode : IWMSTransaction + { + public IReprintBarcode Init(string id, string userCode, string apiHost, string orgCode); + public Task<ApiAction<ScanOutput>> Scan(BaseInput input); + + + public bool Close(bool needSaveHistoryLog = false); + } +} -- Gitblit v1.9.3