| | |
| | | using Microsoft.AspNetCore.Mvc.RazorPages; |
| | | using System.Drawing.Printing; |
| | | using System.Net.NetworkInformation; |
| | | using Tiger.Model.MES.Yada; |
| | | |
| | | namespace Tiger.Business.MES |
| | | { |
| | |
| | | } |
| | | 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; |
| | | } |
| | | } |
| | | } |