| | |
| | | throw Oops.Oh("参数不能为空"); |
| | | } |
| | | |
| | | var singleUpi = await _mesBatchOrderUpiRep.AsQueryable().Where(x => x.UPI == input.Upi).FirstAsync(); |
| | | var singleUpi = await _mesBatchOrderUpiRep.AsQueryable().Where(x => x.UPI == input.Upi || x.PackageCode == input.Upi).FirstAsync(); |
| | | if (singleUpi == null) |
| | | { |
| | | throw Oops.Oh($"没有找到部件条码{input.Upi}的数据"); |
| | |
| | | } |
| | | |
| | | var upiList = await _mesBatchOrderUpiRep.AsQueryable().Where(x => x.PackageCode == singleUpi.PackageCode).ToListAsync(); |
| | | upiList = upiList.OrderBy(x => x.Shelf).ToList(); |
| | | |
| | | return upiList; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 根据某个Upi,查询板件数据 |
| | | /// </summary> |
| | | /// <param name="input"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | [ApiDescriptionSettings(Name = "QuerySingleUpiByUpi")] |
| | | [Description("WmsCommonnQuery/QuerySingleUpiByUpi")] |
| | | public async Task<List<Mes_BatchOrderUPI_New>> QuerySingleUpiByUpi(QueryUpiListByUpiInput input) |
| | | { |
| | | if (input == null || input.Upi == null) |
| | | { |
| | | throw Oops.Oh("参数不能为空"); |
| | | } |
| | | |
| | | var singleUpi = await _mesBatchOrderUpiRep.AsQueryable().Where(x => x.UPI == input.Upi).FirstAsync(); |
| | | if (singleUpi == null) |
| | | { |
| | | throw Oops.Oh($"没有找到部件条码{input.Upi}的数据"); |
| | | } |
| | | |
| | | List<Mes_BatchOrderUPI_New> upiList = new List<Mes_BatchOrderUPI_New>(); |
| | | upiList.Add(singleUpi); |
| | | return upiList; |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 首页 本周下线物料信息 |