服务端的TigerApi 框架,基于.NET6 2024 版本
YangYuGang
2025-03-21 9984bb1eb673f4ea6d952e191040a674583d2f20
Tiger.Business.WMS/Transaction/Yada/In_BIZ_U9_RECEIPT.cs
@@ -12,6 +12,7 @@
using Tiger.Model.Sharetronic.Shelf;
using Tiger.Business.WMS.Sharetronic.Shelf;
using Tiger.Model.Entitys.MES.U9C;
using Tiger.Model.Entitys.MES.Position;
namespace Tiger.Business.WMS.Transaction
{
@@ -85,7 +86,7 @@
                   {
                       action.IsSuccessed = false;
                       action.LocaleMsg = result.LocaleMsg;
                       return action;
                       return SetOutPutMqttMsg(action, input.Locale);
                   }
                   var inv = result.Data as Inventory;
@@ -95,7 +96,7 @@
                        action.IsSuccessed = false;
                        //action.LocaleMsg = Biz.L("状态[{0}]异常,请重新扫描");
                        action.LocaleMsg = Biz.L("WMS.Default.ScanItem.StatusException", string.Join(',', inv.StatusList.Select(q => q.GetDesc())));
                        return action;
                        return SetOutPutMqttMsg(action, input.Locale);
                    }
                    //物料验证
                    if (inv.ItemInfo.IsNullOrEmpty() || inv.ItemInfo.IS_ACTIVE == "N")
@@ -103,7 +104,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;
                }
@@ -114,7 +115,7 @@
                    action.IsSuccessed = false;
                    //action.LocaleMsg = Biz.L("收货单中找不到条码所属的单据[{0}]信息,请重新扫描收货单的条码或选择正确的功能上架");
                    action.LocaleMsg = Biz.L("WMS.In_BIZ_U9_RECEIPT.ScanItem.ReceiptNotExists", CurInvItem.Items.First().TRANS_NO);
                    return action;
                    return SetOutPutMqttMsg(action, input.Locale);
                }
                var receiptDtl = receipt.Details.First(q => q.LINE_NO == CurInvItem.Items.First().TRANS_LINE);
                if (receiptDtl.STATUS > BIZ_U9_RECEIPT.STATUSs.Storing.GetValue())
@@ -122,7 +123,7 @@
                    action.IsSuccessed = false;
                    //action.LocaleMsg = Biz.L("收货单中行[{0}]状态[{1}]异常,请扫描正确的条码");
                    action.LocaleMsg = Biz.L("WMS.In_BIZ_U9_RECEIPT.ScanItem.ReceiptDtlStatusException", receiptDtl.LINE_NO, receiptDtl.STATUS.GetEnumDesc<BIZ_U9_RECEIPT.STATUSs>());
                    return action;
                    return SetOutPutMqttMsg(action, input.Locale);
                }
                var receiptSn = receipt.SnList.Where(q => CurInvItem.Items.Any(i => i.SN == q.SN)).ToList();
                if (receiptSn.Any(q => q.STATUS != WMS_ITEM.STATUSs.WaitIn.GetValue()))
@@ -130,7 +131,7 @@
                    action.IsSuccessed = false;
                    //action.LocaleMsg = Biz.L("收货单中条码[{0}]状态[{1}]异常,请扫描正确的条码");
                    action.LocaleMsg = Biz.L("WMS.In_BIZ_U9_RECEIPT.ScanItem.ReceiptSnStatusException", CurInvItem.SN, receiptSn.First(q => q.STATUS != WMS_ITEM.STATUSs.WaitIn.GetValue()).STATUS.GetEnumDesc<WMS_ITEM.STATUSs>());
                    return action;
                    return SetOutPutMqttMsg(action, input.Locale);
                }
                var nLocation = new WMS_LOCATION();
@@ -142,7 +143,7 @@
                    {
                        action.IsSuccessed = false;
                        action.LocaleMsg = Biz.L(shelfApiResult.GetData<string>());
                        return action;
                        return SetOutPutMqttMsg(action, input.Locale);
                    }
                    var reaultShelf = shelfApiResult.GetData<ShelfChangeModel>();
@@ -152,7 +153,7 @@
                        action.IsSuccessed = false;
                        //action.LocaleMsg = Biz.L($"货架[{0}]中不存在id为[{1}]的储位,请先维护货架信息");
                        action.LocaleMsg = Biz.L("WMS.Default.ScanItem.LocationNotExistsInShelf", CurScanShelf.Shelf.SHELF_CODE, reaultShelf.ledAddr);
                        return action;
                        return SetOutPutMqttMsg(action, input.Locale);
                    }
                    var locationData = MainDB.Queryable<WMS_ITEM>().Where(q => q.LOCATION_ID == nLocation.ID).First();
                    if (!locationData.IsNullOrEmpty())
@@ -160,7 +161,7 @@
                        action.IsSuccessed = false;
                        //action.LocaleMsg = Biz.L("储位[{0}]已存有物料[{1}],请检查系统库存信息");
                        action.LocaleMsg = Biz.L($"WMS.Default.ScanShelf.ItemAlreadyExistsInLocation", nLocation.LOCATION_CODE, locationData.SN);
                        return action;
                        return SetOutPutMqttMsg(action, input.Locale);
                    }
                    CurScanShelf.LocationCode = nLocation.LOCATION_CODE;
                }
@@ -171,7 +172,7 @@
                        action.IsSuccessed = false;
                        //action.LocaleMsg = Biz.L("请输入或扫描有效的货架/储位码");
                        action.LocaleMsg = Biz.L("WMS.Default.ScanShelf.ShelfCanNotEmpty");
                        return action;
                        return SetOutPutMqttMsg(action, input.Locale);
                    }
                    nLocation = await MainDB.Queryable<WMS_LOCATION>().Where(t => t.LOCATION_CODE == CurScanShelf.LocationCode && t.AUTH_ORG == OrgCode).FirstAsync();
@@ -184,7 +185,7 @@
                    //action.LocaleMsg = Biz.L("储位[{0}]只能存放一个物料");
                    action.LocaleMsg = Biz.L("WMS.Default.ScanItem.LocationSingleFailure", nLocation.LOCATION_CODE);
                    ResetScan();
                    return action;
                    return SetOutPutMqttMsg(action, input.Locale);
                }
                //执行上架数据处理
@@ -206,7 +207,7 @@
                    action.IsSuccessed = false;
                    action.LocaleMsg = putonResult.LocaleMsg;
                    ResetScan();
                    return action;
                    return SetOutPutMqttMsg(action, input.Locale);
                }
                //更新单据信息
@@ -238,7 +239,7 @@
                    {
                        action.IsSuccessed = false;
                        action.LocaleMsg = result.LocaleMsg;
                        return action;
                        return SetOutPutMqttMsg(action, input.Locale);
                    }
                }
                else
@@ -277,7 +278,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>
@@ -401,7 +402,7 @@
            //重置工序
            ResetScanInfo();
            return action;
            return SetOutPutMqttMsg(action, locale);
        }
        #endregion