服务端的TigerApi 框架,基于.NET6 2024 版本
Ben Lin
2024-10-30 fc8149ced60fcf3e91c2012188a814ea0f55d017
Tiger.Business.MES/BIZ/BIZ_MES_WO.cs
@@ -17,6 +17,7 @@
using Microsoft.AspNetCore.Mvc.RazorPages;
using System.Drawing.Printing;
using System.Net.NetworkInformation;
using Tiger.Model.MES.Yada;
namespace Tiger.Business.MES
{
@@ -481,5 +482,34 @@
            }
            return result;
        }
        /// <summary>
        /// 获取出货信息
        /// </summary>
        /// <param name="wo"></param>
        /// <returns></returns>
        public async Task<ApiAction> GetShipList(string wo, string orgCode)
        {
            var result = new ApiAction();
            try
            {
                DbClient db = Biz.DataSource["YadaU9C"].Client;
                var org = await Biz.Db.Queryable<SYS_ORGANIZATION>().Where(q=>q.ORG_CODE == orgCode).FirstAsync();
                if (db.Queryable<mes_ShipList>().Any(q => q.MoDoc.Equals(wo) && SqlFunc.DateIsSame(q.BusinessDate, DateTime.Now) && q.Status == 2 && q.Org == org.ID.ToInt64()))
                {
                    result.Data = "Customer";
                }
                else
                {
                    result.LocaleMsg = new($"出货信息存在!");
                    result.Data = "InStore";
                }
            }
            catch (Exception ex)
            {
                result.CatchExceptionWithLog(ex, "获取出货信息异常");
            }
            return result;
        }
    }
}