From 8745fb2b4824979aad955a9835decdb849fe278d Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期日, 03 十一月 2024 22:24:01 +0800 Subject: [PATCH] 更新箱号,获取箱号 --- Tiger.Business.MES/BIZ/BizBasRule.cs | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/Tiger.Business.MES/BIZ/BizBasRule.cs b/Tiger.Business.MES/BIZ/BizBasRule.cs index cce51a1..39a2754 100644 --- a/Tiger.Business.MES/BIZ/BizBasRule.cs +++ b/Tiger.Business.MES/BIZ/BizBasRule.cs @@ -14,6 +14,7 @@ using Tiger.Model.Entitys.MES.BizMesWoBatch; using Tiger.Model.Entitys.MES.BizMesWo; using Tiger.Model.Entitys.MES.BizBasPkgRule; +using Tiger.Model.Entitys.MES.Position; namespace Tiger.Business.MES { @@ -109,5 +110,24 @@ } return result; } + + /// <summary> + /// 鑾峰彇绠卞彿 + /// </summary> + /// <param name="input"></param> + /// <returns></returns> + public async Task<ApiAction> GetCardOrBoxCode(GetCodeInput input) + { + var result = new ApiAction(); + try + { + result.Data = Biz.CodeRule[input.Code]?.Generate(input.Prefix, $"{input.BatchNo}-{input.Qty}-").Data.ToString() ?? ""; + } + catch (Exception ex) + { + result.CatchExceptionWithLog(ex, "鑾峰彇绠卞彿寮傚父"); + } + return result; + } } } -- Gitblit v1.9.3