using WmsMobileServe.Annotation;
using WmsMobileServe.DataBase.Base.Po;

namespace WmsMobileServe.DataBase.Base.Dao;

/// <summary>
/// 库存表操作
/// </summary>
[Component]
public class TMiStockDao(DataBaseClient client)
{

    /// <summary>
    /// 根据载具号查询库存
    /// </summary>
    /// <param name="vehicleNo"></param>
    /// <returns></returns>
    public List<TMiStock>? SelectWithVehicleNo(string vehicleNo)
    {
        try
        {
            return client.Instance().Queryable<TMiStock>()
                .Where(w => w.Ctl == vehicleNo).ToList();
        }
        catch (Exception ex)
        {
            _ = ex;
            return default;
        }
    }


}
