服务端的TigerApi 框架,基于.NET6 2024 版本
Rodney Chen
2025-02-25 3fdb8a625910524134a95fb47547b9ab47fd950b
Tiger.Business.WMS/Transaction/PrintSemiProdLabel.cs
@@ -58,7 +58,7 @@
                    return SetOutPutMqttMsg(action, input.Locale);
                }
                var DocLines = Biz.DataSource["YadaU9C"].Client.Ado.SqlQuery<mes_RcvRptDocLine>($"select * from mes_RcvRptDocLine where DocNo = '{input.SN}'");
                var temps = new List<TemplateInput>();
                foreach (var item in DocLines)
                {
@@ -87,40 +87,9 @@
            catch (Exception ex)
            {
                //action.CatchExceptionWithLog(ex, $"扫描[{input.SN}]异常");
                action.CatchExceptionWithLog(ex, Biz.L("WMS.RePrint.Scan.ScanException", input.SN));
                action.CatchExceptionWithLog(ex, Biz.L("WMS.PrintSemiProdLabel.Scan.ScanException", input.SN));
            }
            return SetOutPutMqttMsg(action, input.Locale);
        }
        public async Task<ApiAction<ScanOutput>> ScanItem(BaseInput input)
        {
            var action = new ApiAction<ScanOutput>(new ScanOutput());
            try
            {
                List<WMS_ITEM> items = new List<WMS_ITEM>();
                List<WMS_ITEM_HIS> itemhiss = new List<WMS_ITEM_HIS>();
                List<WMS_ITEM_PKG> itemPkgs = new List<WMS_ITEM_PKG>();
                List<WMS_ITEM_EXT> itemExts = new List<WMS_ITEM_EXT>();
                var rePrints = (input.Data ?? "").JsonToObject<PrintSemiProdLabelEntity>() ?? new PrintSemiProdLabelEntity();
                if (!rePrints.SnList.Any() || rePrints.SnList.Any(q => q.Qty <= 0))
                {
                    action.IsSuccessed = false;
                    //action.LocaleMsg = Biz.L("数量不能小于等于零,请重新确认条码[{0}]的数量");
                    action.LocaleMsg = Biz.L("WMS.Default.ScanItem.ReComfirmQty", input.SN);
                    return action;
                }
                else
                {
                    action.Data.Data = rePrints;
                    action.LocaleMsg = Biz.L("半成品打印标签成功");
                }
            }
            catch (Exception ex)
            {
                action.CatchExceptionWithLog(ex, Biz.L("半成品打印标签失败"));
            }
            return action;
        }
        #endregion