服务端的TigerApi 框架,基于.NET6 2024 版本
Ben Lin
2025-01-15 a3b21ee43b13ad79302aceb9a68405b45e6467a4
更新 ReprintLabel 逻辑,增加 TemplateInput 类

在 ReprintLabel.cs 文件中:
- 增加了 using Tiger.Model.MES.Yada 的引用。
- 修改了代码逻辑,移除对 V_WH_UNIT 的查询,增加对 mes_WhLotCodeQtyInfo 和 BAS_ITEM 的查询。
- 增加了 TemplateInput 类型的列表 temps,并填充数据。
- 修改了 action.LocaleMsg 的值。

在 RePrint_Entitys.cs 文件中:
- 增加了 TemplateInput 类,包含多个属性。

在 Tiger.Model.Net.csproj 文件中:
- 增加了对 Entitys\WMS\Api\RePrint_Entitys.cs 文件的编译引用。
已修改3个文件
已添加1个文件
53 ■■■■■ 文件已修改
Tiger.Api/Language.db 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Business.WMS/Transaction/ReprintLabel.cs 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Model.Net/Entitys/WMS/Api/RePrint_Entitys.cs 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Model.Net/Tiger.Model.Net.csproj 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Api/Language.db
Binary files differ
Tiger.Business.WMS/Transaction/ReprintLabel.cs
@@ -14,6 +14,7 @@
using System.Drawing.Drawing2D;
using Tiger.Model.Sharetronic.Shelf;
using Tiger.IBusiness;
using Tiger.Model.MES.Yada;
namespace Tiger.Business.WMS.Transaction
{
@@ -56,14 +57,32 @@
                    action.LocaleMsg = Biz.L("WMS.RePrint.ScanItem.SnEmptyFailure");
                    return SetOutPutMqttMsg(action, input.Locale);
                }
                var whUnit = await Biz.Db.Queryable<V_WH_UNIT>().Where(t => (t.SHELF_CODE.ToUpper() == input.SN || t.LOCATION_CODE.ToUpper() == input.SN) && t.AUTH_ORG == OrgCode).IncludesAllFirstLayer().FirstAsync();
                var LotNos = Biz.DataSource["YadaU9C"].Client.Queryable<mes_WhLotCodeQtyInfo>().Where(t => t.Bin == input.SN).ToList();
                //var whUnit = await Biz.Db.Queryable<V_WH_UNIT>().Where(t => t.LOCATION_CODE.ToUpper() == input.SN && t.AUTH_ORG == OrgCode).IncludesAllFirstLayer().FirstAsync();
                var items = LotNos.Select(q => q.ItemCode);
                var ItemList = Biz.Db.Queryable<BAS_ITEM>().Where(t => t.AUTH_ORG == OrgCode && items.Contains(t.ITEM_CODE)).IncludesAllFirstLayer().ToList();
                var temps = new List<TemplateInput>();
                foreach (var item in LotNos)
                {
                    var temp = new TemplateInput
                    {
                        custCode="",
                        itemCode= item.ItemCode,
                        itemDesc= ItemList.Where(q => q.ITEM_CODE == item.ItemCode).FirstOrDefault()?.ITEM_DESC,
                        sapItemCode= ItemList.Where(q => q.ITEM_CODE == item.ItemCode).FirstOrDefault()?.ExtInfo?.SapCode,
                        WoBatch = item.LotCode,
                        batchQty= item.StoreQty,
                        qrCode="",
                    };
                    temps.Add(temp);
                }
                action.Data.Data = temps;
                action.LocaleMsg = Biz.L("WMS.RePrint.ScanItem.ScanSuccessed");
            }
            catch (Exception ex)
            {
                //action.CatchExceptionWithLog(ex, $"鎵弿[{input.SN}]寮傚父");
                action.CatchExceptionWithLog(ex, Biz.L("WMS.Default.Scan.ScanException", input.SN));
                action.CatchExceptionWithLog(ex, Biz.L("WMS.RePrint.Scan.ScanException", input.SN));
            }
            return SetOutPutMqttMsg(action, input.Locale);
        }
Tiger.Model.Net/Entitys/WMS/Api/RePrint_Entitys.cs
对比新文件
@@ -0,0 +1,25 @@
锘縰sing System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tiger.Model.Minsun;
namespace Tiger.Model
{
    public class TemplateInput
    {
        /// <summary>
        ///
        /// </summary>
        public string custCode { get; set; }
        public string itemCode { get; set; }
        public string sapItemCode { get; set; }
        public string itemDesc { get; set; }
        public string WoBatch { get; set; }
        public decimal batchQty { get; set; }
        public decimal qty { get; set; }
        public string qrCode { get; set; }
    }
}
Tiger.Model.Net/Tiger.Model.Net.csproj
@@ -240,6 +240,7 @@
    <Compile Include="Entitys\SYS\SYS_CS_LOGIN.cs" />
    <Compile Include="Entitys\SYS\SYS_LOW_CODE.cs" />
    <Compile Include="Entitys\SYS\SYS_PDA_LOGIN.cs" />
    <Compile Include="Entitys\WMS\Api\RePrint_Entitys.cs" />
    <Compile Include="Entitys\WMS\Api\Input_Entitys.cs" />
    <Compile Include="Entitys\WMS\Api\Output_Entitys.cs" />
    <Compile Include="Entitys\WMS\Api\Resell.cs" />