服务端的TigerApi 框架,基于.NET6 2024 版本
YangYuGang
2025-03-21 9984bb1eb673f4ea6d952e191040a674583d2f20
Tiger.Business.WMS/Transaction/Out_Default.cs
@@ -9,6 +9,7 @@
using System.Threading.Tasks;
using Tiger.Model;
using Tiger.IBusiness;
using Tiger.Model.Entitys.MES.Position;
namespace Tiger.Business.WMS.Transaction
{
@@ -75,7 +76,7 @@
                    {
                        action.IsSuccessed = false;
                        action.LocaleMsg = result.LocaleMsg;
                        return action;
                        return SetOutPutMqttMsg(action, input.Locale);
                    }
                    var inv = result.Data as Inventory;
@@ -85,7 +86,7 @@
                        action.IsSuccessed = false;
                        //action.LocaleMsg = Biz.L($"状态[{0}]异常,请重新扫描");
                        action.LocaleMsg = Biz.L("WMS.Default.ScanItem.StatusException", string.Join(',', inv.StatusList.Select(x => x.GetDesc())));
                        return action;
                        return SetOutPutMqttMsg(action, input.Locale);
                    }
                    //储位验证
                    if (inv.Location.IsNullOrEmpty())
@@ -93,7 +94,7 @@
                        action.IsSuccessed = false;
                        //action.LocaleMsg = Biz.L($"条码[{0}]库存信息异常: 没有储位信息,请先上架后再扫描(储位Id: {1})");
                        action.LocaleMsg = Biz.L("WMS.Default.ScanItem.LocationIsNull", inv.CurPkg.SN, inv.CurPkg.LOCATION_ID);
                        return action;
                        return SetOutPutMqttMsg(action, input.Locale);
                    }
                    //物料验证
                    if (inv.ItemInfo.IsNullOrEmpty() || inv.ItemInfo.IS_ACTIVE == "N")
@@ -101,7 +102,7 @@
                        action.IsSuccessed = false;
                        //action.LocaleMsg = Biz.L($"物料编码[{0}]不存在或者该物料未启用");
                        action.LocaleMsg = Biz.L("WMS.Default.ScanItem.ItemCodeNotExistsOrNotActive", inv.ItemInfo.ITEM_CODE.IsNullOrEmpty(inv.Barcode.ItemCode));
                        return action;
                        return SetOutPutMqttMsg(action, input.Locale);
                    }
                    CurInvItem = inv;
@@ -112,7 +113,7 @@
                        action.Data.Command = Command = "ComfirmQty";
                        //action.LocaleMsg = Biz.L("请确认条码[{0}]要下架的数量");
                        action.LocaleMsg = Biz.L("WMS.Default.ScanItem.ComfirmOutQty", input.SN);
                        return action;
                        return SetOutPutMqttMsg(action, input.Locale);
                    }
                }
@@ -128,7 +129,7 @@
                        action.Data.Command = Command = "ComfirmQty";
                        //action.LocaleMsg = Biz.L("下架数量不能小于等于零,请重新确认条码[{0}]的下架数量");
                        action.LocaleMsg = Biz.L("WMS.Default.ScanItem.ReComfirmOutQty", input.SN);
                        return action;
                        return SetOutPutMqttMsg(action, input.Locale);
                    }
                    else if (qtyList.Any(q => q.QTY > CurInvItem.Items.First(i => i.SN == q.SN).QTY))
                    {
@@ -137,7 +138,7 @@
                        action.Data.Command = Command = "ComfirmQty";
                        //action.LocaleMsg = Biz.L("下架数量不能超过原条码数量,请重新确认条码[{0}]的下架数量");
                        action.LocaleMsg = Biz.L("WMS.Default.ScanItem.ReComfirmExceedOutQty", input.SN);
                        return action;
                        return SetOutPutMqttMsg(action, input.Locale);
                    }
                    else
                    {
@@ -158,7 +159,7 @@
                    action.IsSuccessed = false;
                    action.LocaleMsg = downResult.LocaleMsg;
                    ResetScan();
                    return action;
                    return SetOutPutMqttMsg(action, input.Locale);
                }
                //灭灯
@@ -176,7 +177,7 @@
                //action.CatchExceptionWithLog(ex, $"扫描条码[{input.SN}]复核异常");
                action.CatchExceptionWithLog(ex, Biz.L("WMS.Default.ScanItem.ScanException", input.SN));
            }
            return action;
               return SetOutPutMqttMsg(action, input.Locale);
        }
        /// <summary>
@@ -292,7 +293,7 @@
            //重置工序
            ResetScan();
            return action;
            return SetOutPutMqttMsg(action, locale);
        }
        #endregion