47 lines
1.4 KiB
C#
47 lines
1.4 KiB
C#
using WcsMain.Common;
|
|
using WcsMain.DataBase.TableEntity;
|
|
using WcsMain.WcsAttribute.AutoFacAttribute;
|
|
|
|
namespace WcsMain.DataBase.Dao;
|
|
|
|
|
|
[Component]
|
|
public class AppConveyStandDao
|
|
{
|
|
/// <summary>
|
|
/// 查询
|
|
/// </summary>
|
|
/// <param name="conveyStand"></param>
|
|
/// <returns></returns>
|
|
public List<AppConveyStand>? Query(AppConveyStand conveyStand)
|
|
{
|
|
try
|
|
{
|
|
var sqlFuc = CommonTool.DbServe.Queryable<AppConveyStand>()
|
|
.WhereIF(conveyStand.StandId != default, w => w.StandId == conveyStand.StandId)
|
|
.WhereIF(conveyStand.StandType != default, w => w.StandType == conveyStand.StandType)
|
|
.WhereIF(conveyStand.StandStatus != default, w => w.StandStatus == conveyStand.StandStatus)
|
|
.WhereIF(conveyStand.Area != default, w => w.Area == conveyStand.Area)
|
|
.WhereIF(conveyStand.VehicleNo != default, w => w.VehicleNo == conveyStand.VehicleNo)
|
|
.WhereIF(conveyStand.Tag != default, w => w.Tag == conveyStand.Tag)
|
|
.WhereIF(conveyStand.Remark != default, w => w.Remark == conveyStand.Remark);
|
|
return sqlFuc.ToList();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
_ = ex;
|
|
return default;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 查询所有
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public List<AppConveyStand>? Query() => Query(new AppConveyStand());
|
|
|
|
|
|
|
|
|
|
}
|