| | |
| | | { |
| | | 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())) |
| | | var shipList = db.Queryable<mes_ShipList>().Where(q => q.MoDoc.Equals(wo) && SqlFunc.DateIsSame(q.BusinessDate, DateTime.Now) && q.Status == 2 && q.Org == org.ID.ToInt64()).ToList(); |
| | | if (shipList.Any()) |
| | | { |
| | | result.Data = "Customer"; |
| | | result.Data = shipList[0].ShipQty; |
| | | result.LocaleMsg = new($"出货信息存在!"); |
| | | } |
| | | else |
| | |
| | | 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(); |
| | | var wipList = await Biz.Db.Queryable<MES_WIP_DATA>().Where(q => q.SN.Equals(input.SN) || q.FLOW_SN.Equals(input.SN) || q.CARTON_SN == input.SN).ToListAsync(); |
| | | if (wipList.Count == 0) |
| | | { |
| | | result.IsSuccessed = false; |