This commit is contained in:
qianhao.xu
2024-11-01 14:47:01 +08:00
parent 1f17ff190a
commit 9f3bfdf236
9 changed files with 61 additions and 2 deletions

View File

@@ -71,7 +71,10 @@ namespace DOAN.Service.PBL
/// <returns></returns>
private static Expressionable<LightLog> QueryExp(LightLogQueryDto parm)
{
var predicate = Expressionable.Create<LightLog>();
var predicate = Expressionable.Create<LightLog>()
.AndIF(parm.TimeRange[0]>DateTime.MinValue, it => it.CreatedTime >=parm.TimeRange[0])
.AndIF(parm.TimeRange[1]>DateTime.MinValue, it => it.CreatedTime <=parm.TimeRange[1])
;
return predicate;
}

View File

@@ -4,6 +4,7 @@ using DOAN.Model.PBL.Dto;
using DOAN.Model.PBL;
using DOAN.Repository;
using DOAN.Service.PBL.IPBLService;
using SqlSugar.SplitTableExtensions;
namespace DOAN.Service.PBL
{
@@ -71,7 +72,11 @@ namespace DOAN.Service.PBL
/// <returns></returns>
private static Expressionable<MesInterationLog> QueryExp(MesInterationLogQueryDto parm)
{
var predicate = Expressionable.Create<MesInterationLog>();
var predicate = Expressionable.Create<MesInterationLog>()
.AndIF(string.IsNullOrEmpty(parm.Workorder),it=>it.Workorder.Contains(parm.Workorder))
.AndIF(parm.TimeRange[0]>DateTime.MinValue, it => it.CreatedTime >=parm.TimeRange[0])
.AndIF(parm.TimeRange[1]>DateTime.MinValue, it => it.CreatedTime <=parm.TimeRange[1])
;
return predicate;
}