From 593e2dd97102a066fd850d0443bd288cb25b7875 Mon Sep 17 00:00:00 2001 From: tq <1916474859@qq,com> Date: Fri, 19 Jul 2024 15:01:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=A5=E8=AD=A6=E5=88=97=E8=A1=A8=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E8=8C=83=E5=9B=B4=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Entity/Api/Req/QueryAlarmReq.cs | 3 +++ Service/Station/EquipAlarmRecordService.cs | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Entity/Api/Req/QueryAlarmReq.cs b/Entity/Api/Req/QueryAlarmReq.cs index 0e72afa..a568110 100644 --- a/Entity/Api/Req/QueryAlarmReq.cs +++ b/Entity/Api/Req/QueryAlarmReq.cs @@ -10,4 +10,7 @@ public class QueryAlarmReq : QueryPageModel public string? ErrorLevel { get; set; } public DateTime? StartTime { get; set; } + + public DateTime? ProcessTime { get; set; } + } diff --git a/Service/Station/EquipAlarmRecordService.cs b/Service/Station/EquipAlarmRecordService.cs index dcc2d93..2023a98 100644 --- a/Service/Station/EquipAlarmRecordService.cs +++ b/Service/Station/EquipAlarmRecordService.cs @@ -92,8 +92,8 @@ public class EquipAlarmRecordService : BaseServices .WhereIF(reqTypeCode != -1, it => it.EquipTypeCode == reqTypeCode) .WhereIF(ObjUtils.IsNotNullOrWhiteSpace(equipCode), it => it.EquipCode == equipCode) .WhereIF(ObjUtils.IsNotNullOrWhiteSpace(errorLevel), it => it.ErrorLevel == errorLevel) - .WhereIF(req.StartTime.HasValue, it => it.StartTime == req.StartTime) - .OrderBy(it => it.CreatedTime, OrderByType.Desc) + .WhereIF(req.StartTime.HasValue && req.ProcessTime.HasValue, + it => it.StartTime >= req.StartTime && it.ProcessTime <= req.ProcessTime) .OrderBy(it => it.CreatedTime, OrderByType.Desc) .ToPageList(req.PageNum, req.PageSize, ref totalCount); PageResult result = new PageResult()