From d9ca91aa2cef4226af8ba949509a9da589b5a5ef Mon Sep 17 00:00:00 2001 From: tq <1916474859@qq,com> Date: Tue, 24 Sep 2024 13:54:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E6=95=85=E9=9A=9C=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Entity/Api/Req/QueryAlarmReq.cs | 2 +- Service/Station/EquipAlarmRecordService.cs | 4 ++-- .../Controllers/EquipAlarmRecordController.cs | 16 ++++++++-------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Entity/Api/Req/QueryAlarmReq.cs b/Entity/Api/Req/QueryAlarmReq.cs index 9875589..067eeac 100644 --- a/Entity/Api/Req/QueryAlarmReq.cs +++ b/Entity/Api/Req/QueryAlarmReq.cs @@ -4,7 +4,7 @@ namespace Entity.Api.Req; public class QueryAlarmReq : QueryPageModel { - public int TypeCode { get; set; } = -1; + public int EquipTypeCode { get; set; } = -1; public string? EquipCode { get; set; } public string? ErrorLevel { get; set; } diff --git a/Service/Station/EquipAlarmRecordService.cs b/Service/Station/EquipAlarmRecordService.cs index 766128a..343e150 100644 --- a/Service/Station/EquipAlarmRecordService.cs +++ b/Service/Station/EquipAlarmRecordService.cs @@ -31,7 +31,7 @@ public class EquipAlarmRecordService : BaseServices public Result> QueryEquipAlarmPage(QueryAlarmReq req) { int totalCount = 0; - int reqTypeCode = req.TypeCode; + int reqTypeCode = req.EquipTypeCode; var equipCode = req.EquipCode; var errorLevel = req.ErrorLevel; List list = BaseDal.Queryable() @@ -62,7 +62,7 @@ public class EquipAlarmRecordService : BaseServices public Result> QueryEquipAlarmProcessPage(QueryAlarmReq req) { int totalCount = 0; - int reqTypeCode = req.TypeCode; + int reqTypeCode = req.EquipTypeCode; var equipCode = req.EquipCode; var errorLevel = req.ErrorLevel; List list = ProcessRecordRepository.Queryable() diff --git a/WebStarter/Controllers/EquipAlarmRecordController.cs b/WebStarter/Controllers/EquipAlarmRecordController.cs index cfe8dd5..2cfce97 100644 --- a/WebStarter/Controllers/EquipAlarmRecordController.cs +++ b/WebStarter/Controllers/EquipAlarmRecordController.cs @@ -68,9 +68,9 @@ public class EquipAlarmRecordController : ControllerBase Expression> predicate = it => true; // 动态添加查询条件 - if (req.TypeCode != -1) + if (req.EquipTypeCode != -1) { - predicate = predicate.And(it => it.EquipTypeCode == req.TypeCode); + predicate = predicate.And(it => it.EquipTypeCode == req.EquipTypeCode); } if (!string.IsNullOrWhiteSpace(req.EquipCode)) { @@ -112,7 +112,7 @@ public class EquipAlarmRecordController : ControllerBase IMapper mapper = config.CreateMapper(); - if (req.TypeCode==(int)EquipmentType.Plc) + if (req.EquipTypeCode==(int)EquipmentType.Plc) { if (language == "en") { @@ -131,7 +131,7 @@ public class EquipAlarmRecordController : ControllerBase { FileDownloadName = DateTime.Now.ToString("yyyyMMddHHmm") + "未处理报警日志.xlsx" }; } } - if (req.TypeCode==(int)EquipmentType.Charger) + if (req.EquipTypeCode==(int)EquipmentType.Charger) { if (language == "en") { @@ -207,9 +207,9 @@ public class EquipAlarmRecordController : ControllerBase Expression> predicate = it => true; // 动态添加查询条件 - if (req.TypeCode != -1) + if (req.EquipTypeCode != -1) { - predicate = predicate.And(it => it.EquipTypeCode == req.TypeCode); + predicate = predicate.And(it => it.EquipTypeCode == req.EquipTypeCode); } if (!string.IsNullOrWhiteSpace(req.EquipCode)) { @@ -251,7 +251,7 @@ public class EquipAlarmRecordController : ControllerBase IMapper mapper = config.CreateMapper(); - if (req.TypeCode==(int)EquipmentType.Plc) + if (req.EquipTypeCode==(int)EquipmentType.Plc) { if (language == "en") { @@ -271,7 +271,7 @@ public class EquipAlarmRecordController : ControllerBase } } - if (req.TypeCode==(int)EquipmentType.Charger) + if (req.EquipTypeCode==(int)EquipmentType.Charger) { if (language == "en") {