服务端的TigerApi 框架,基于.NET6 2024 版本
Ben Lin
2025-03-08 a259e40ee315f068bd9b96f857f1f80ea137e89d
Tiger.Business.MES/BIZ/BizBasRule.cs
@@ -121,6 +121,11 @@
            var result = new ApiAction();
            try
            {
                if (input.BatchNo.IsNullOrEmpty())
                {
                    result.IsSuccessed = false;
                    result.LocaleMsg = new($"工单批次号不能为空,是否未扫描工单?");
                }
                result.Data = input.IsTry == "Y" ? Cache.CodeRule[input.Code]?.TryGenerate(input.Prefix, $"{input.BatchNo}-{input.Qty}-").Data.ToString() ?? "" : Cache.CodeRule[input.Code]?.Generate(input.Prefix, $"{input.BatchNo}-{input.Qty}-").Data.ToString() ?? "";
            }
            catch (Exception ex)