服务端的TigerApi 框架,基于.NET6 2024 版本
Ben Lin
2025-01-10 dc203bafb60dc9985c805c6a4ec5f8018f3d3cf6
更新 Scan 方法和 ReprintLabel 相关逻辑

在 In_Default.cs 和 Out_Default.cs 文件中,Scan 方法的 ApiAction 对象初始化时,增加了 ScanOutput 的实例。
在 ReprintLabel.cs 文件中,删除了多个属性和变量,包括 Suggests、CurPoolList、req、CurReqType、dtls、isExceed、toMes、his_isComplete、isCutting、cutQty、transferH、cTransferH、transferDtl 和 transferSn。同时,Scan 方法的 ApiAction 对象初始化时,增加了 ScanOutput 的实例。
在 ReprintLabel.cs 文件中,删除了 catch 块中的 ResetInfo 方法调用。
在 WMSController.RePrintLabel.cs 文件中,修改了 RePrintLabel_ScanItemAsync 方法的路由,从 api/[controller]/RePrintLabel/ScanItem 改为 api/[controller]/RePrintLabel/Scan。
已修改4个文件
25 ■■■■ 文件已修改
Tiger.Business.WMS/Transaction/In_Default.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Business.WMS/Transaction/Out_Default.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Business.WMS/Transaction/ReprintLabel.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Controllers.WMS/Controllers/WMSController.RePrintLabel.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Tiger.Business.WMS/Transaction/In_Default.cs
@@ -48,7 +48,7 @@
        /// </summary>
        public async Task<ApiAction<ScanOutput>> Scan(BaseInput input)
        {
            var action = new ApiAction<ScanOutput>();
            var action = new ApiAction<ScanOutput>(new ScanOutput());
            try
            {
                if (input.SN.IsNullOrEmpty())
Tiger.Business.WMS/Transaction/Out_Default.cs
@@ -45,7 +45,7 @@
        /// </summary>
        public async Task<ApiAction<ScanOutput>> Scan(BaseInput input)
        {
            var action = new ApiAction<ScanOutput>();
            var action = new ApiAction<ScanOutput>(new ScanOutput());
            try
            {
                if (input.SN.IsNullOrEmpty())
Tiger.Business.WMS/Transaction/ReprintLabel.cs
@@ -36,23 +36,9 @@
        public string UserCode { get; set; }
        public long UserId { get; set; }
        public string OrgCode { get; set; }
        public List<SuggestItem> Suggests { get; set; } = new();
        public List<V_WMS_ITEM> Vitem { get; set; } = new();
        public List<WMS_ITEM_POOL> CurPoolList => Suggests.Where(q => !q.poolItem.IsNullOrEmpty()).Select(q => q.poolItem).ToList();
        public Inventory CurInv { get; set; }
        public BIZ_ERP_PROD_OUT req { get; set; }
        public ReqType CurReqType { get; set; }
        public List<BIZ_ERP_PROD_OUT_DTL> dtls { get; set; } = new();
        public bool isExceed { get; set; }
        public ProductionPickToMes toMes { get; set; }
        public bool his_isComplete { get; set; }
        public bool isCutting { get; set; }
        public decimal cutQty { get; set; }
        public BIZ_WMS_TRANSFER transferH = null;
        public BIZ_WMS_TRANSFER cTransferH = null;
        public BIZ_WMS_TRANSFER_DTL transferDtl = null;
        public BIZ_WMS_TRANSFER_SN transferSn = null;
        #endregion
        #region Functions
@@ -61,7 +47,7 @@
        /// </summary>
        public async Task<ApiAction<ScanOutput>> Scan(BaseInput input)
        {
            var action = new ApiAction<ScanOutput>();
            var action = new ApiAction<ScanOutput>(new ScanOutput());
            try
            {
                if (input.SN.IsNullOrEmpty())
@@ -73,12 +59,9 @@
                
                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();
                
            }
            catch (Exception ex)
            {
                //取消当前操作
                ResetInfo();
                //action.CatchExceptionWithLog(ex, $"扫描[{input.SN}]异常");
                action.CatchExceptionWithLog(ex, Biz.L("WMS.Default.Scan.ScanException", input.SN));
            }
Tiger.Controllers.WMS/Controllers/WMSController.RePrintLabel.cs
@@ -98,7 +98,7 @@
        /// <param name="action"></param>
        /// <returns></returns>
        [HttpPost]
        [Route("api/[controller]/RePrintLabel/ScanItem")]
        [Route("api/[controller]/RePrintLabel/Scan")]
        public async Task<IActionResult> RePrintLabel_ScanItemAsync([FromBody] ApiAction<BaseInput> action)
        {
            ApiAction response;