50 lines
1.7 KiB
C#
50 lines
1.7 KiB
C#
using WcsMain.Common;
|
|
using WcsMain.DataBase.TableEntity;
|
|
using WcsMain.Constant.WcsAttribute.AutoFacAttribute;
|
|
|
|
namespace WcsMain.DataBase.Dao;
|
|
|
|
[Component]
|
|
public class AppStackerConveyDao
|
|
{
|
|
|
|
/// <summary>
|
|
/// 条件查询
|
|
/// </summary>
|
|
/// <param name="queryEntity"></param>
|
|
/// <returns></returns>
|
|
public List<AppStackerConvey>? Query(AppStackerConvey queryEntity)
|
|
{
|
|
try
|
|
{
|
|
var sqlFuc = CommonTool.DbServe.Queryable<AppStackerConvey>()
|
|
.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;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 查询所有
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public List<AppStackerConvey>? Query() => Query(new AppStackerConvey());
|
|
|
|
|
|
|
|
|
|
|
|
}
|