222
schangxiang@126.com
2024-12-12 9f61c92fe6864d536a0e3a6e041cbd788dcec752
LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsCommonnQuery/WmsCommonnQueryService.cs
@@ -687,7 +687,7 @@
            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}的数据");
@@ -700,11 +700,39 @@
        }
        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>
    /// 首页 本周下线物料信息