服务端的TigerApi 框架,基于.NET6 2024 版本
Ben Lin
2 天以前 3ab68d4877acffcb9677ecf369e15210e5db6981
Tiger.Controllers.WMS/Controllers/WMSController.Print_BIZ_U9_ASN.cs
@@ -137,6 +137,45 @@
            return Ok(response);
        }
        [HttpPost]
        [Route("api/[controller]/Print_U9Asn/GetOrderList")]
        public async Task<IActionResult> Print_BIZ_U9_ASN_GetOrderListAsync([FromBody] ApiAction<BaseInput> action)
        {
            ApiAction response;
            IPrint_BIZ_U9_ASN trans = null;
            try
            {
                if (iBiz.WMS.Context.GetTransDic().ContainsKey(action.ID))
                {
                    trans = iBiz.WMS.Context.GetTransDic()[action.ID] as IPrint_BIZ_U9_ASN;
                    if (!trans.IsFinished)
                    {
                        if (action.IsAsync)
                        {
                            response = action.GetResponse(await trans.Scan(action.Data));
                        }
                        else
                        {
                            lock (trans.TransLock) { response = action.GetResponse(trans.GetOrderList().Result); }
                        }
                    }
                    else
                    {
                        response = action.GetResponse($"Transaction Error: (U9)来料打印清点事务[ID:{action.ID}]已经关闭,请重新打开(U9)来料打印清点功能", false);
                    }
                }
                else
                {
                    response = action.GetResponse($"Transaction Error: (U9)来料打印清点事务[ID:{action.ID}]数据丢失,请重新打开(U9)来料打印清点功能", false);
                }
            }
            catch (System.Exception ex)
            {
                response = action.GetResponse().CatchExceptionWithLog(ex);
            }
            trans?.AddHistory(Request, action);
            return Ok(response);
        }
        /// <summary>
        /// GenerateReceipt(ApiAction(BaseInput(Data:OrderNo)))
@@ -145,7 +184,7 @@
        /// <param name="action"></param>
        /// <returns></returns>
        [HttpPost]
        [Route("api/[controller]/Count_U9ASN/GenerateReceipt")]
        [Route("api/[controller]/Print_U9Asn/GenerateReceipt")]
        public async Task<IActionResult> Print_BIZ_U9_ASN_GenerateReceiptAsync([FromBody] ApiAction<BaseInput> action)
        {
            ApiAction response;