using WcsMain.Common;
using WcsMain.DataBase.TableEntity;
using WcsMain.WcsAttribute.AutoFacAttribute;
namespace WcsMain.DataBase.Dao;
[Component]
public class AppStackerConveyDao
{
///
/// 条件查询
///
///
///
public List? Query(AppStackerConvey queryEntity)
{
try
{
var sqlFuc = CommonTool.DbServe.Queryable()
.WhereIF(queryEntity.WcsLocation != default, it => it.WcsLocation == queryEntity.WcsLocation)
.WhereIF(queryEntity.WmsLocation != default, it => it.WmsLocation == queryEntity.WmsLocation)
.WhereIF(queryEntity.LocationName != default, it => it.LocationName == queryEntity.LocationName)
.WhereIF(queryEntity.PlcLocation != default, it => it.PlcLocation == queryEntity.PlcLocation)
.WhereIF(queryEntity.Area != default, it => it.Area == queryEntity.Area)
.WhereIF(queryEntity.LocationType != default, it => it.LocationType == queryEntity.LocationType)
.WhereIF(queryEntity.LocationStatus != default, it => it.LocationStatus == queryEntity.LocationStatus)
.WhereIF(queryEntity.WriteType != default, it => it.WriteType == queryEntity.WriteType)
.WhereIF(queryEntity.Remark != default, it => it.Remark == queryEntity.Remark);
return sqlFuc.ToList();
}
catch(Exception ex)
{
_ = ex;
return default;
}
}
///
/// 查询所有
///
///
public List? Query() => Query(new AppStackerConvey());
}