| | |
| | | using System.Drawing.Printing; |
| | | using System.Net.NetworkInformation; |
| | | using Tiger.Model.MES.Yada; |
| | | using static Microsoft.CodeAnalysis.CSharp.SyntaxTokenParser; |
| | | |
| | | namespace Tiger.Business.MES |
| | | { |
| | |
| | | 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"; |
| | | result.LocaleMsg = new($"出货信息存在!"); |
| | | } |
| | | else |
| | | { |
| | | result.LocaleMsg = new($"出货信息存在!"); |
| | | result.Data = "InStoreLabel"; |
| | | } |
| | | } |
| | |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="SN"></param> |
| | | /// <param name="user"></param> |
| | | /// <returns></returns> |
| | | public async Task<ApiAction> UnbindWipSnFromWO(UnbindWipSnInput input) |
| | | { |
| | | var result = new ApiAction(); |
| | | try |
| | | { |
| | | var wipList = await Biz.Db.Queryable<MES_WIP_DATA>().Where(q => q.SN.Equals(input.SN) || q.FLOW_SN.Equals(input.SN)).ToListAsync(); |
| | | if (wipList.Count == 0) |
| | | { |
| | | result.IsSuccessed = false; |
| | | result.LocaleMsg = new($"解绑的条码不存在当前操作表中!"); |
| | | } |
| | | var wo = await Biz.Db.Queryable<BIZ_MES_WO>().Where(q => q.ORDER_NO == wipList[0].WORK_ORDER).FirstAsync(); |
| | | result = WorkBatch.UnbindWipSnFromWO(wo, wipList, input.user); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | result.CatchExceptionWithLog(ex, "解绑条码异常"); |
| | | } |
| | | return result; |
| | | } |
| | | } |
| | | } |