处理故障查询修改

master
tq 2 months ago
parent 71c5d519ae
commit d9ca91aa2c

@ -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; }

@ -31,7 +31,7 @@ public class EquipAlarmRecordService : BaseServices<EquipAlarmRecord>
public Result<PageResult<EquipAlarmRecord>> QueryEquipAlarmPage(QueryAlarmReq req)
{
int totalCount = 0;
int reqTypeCode = req.TypeCode;
int reqTypeCode = req.EquipTypeCode;
var equipCode = req.EquipCode;
var errorLevel = req.ErrorLevel;
List<EquipAlarmRecord> list = BaseDal.Queryable()
@ -62,7 +62,7 @@ public class EquipAlarmRecordService : BaseServices<EquipAlarmRecord>
public Result<PageResult<EquipAlarmProcessRecord>> QueryEquipAlarmProcessPage(QueryAlarmReq req)
{
int totalCount = 0;
int reqTypeCode = req.TypeCode;
int reqTypeCode = req.EquipTypeCode;
var equipCode = req.EquipCode;
var errorLevel = req.ErrorLevel;
List<EquipAlarmProcessRecord> list = ProcessRecordRepository.Queryable()

@ -68,9 +68,9 @@ public class EquipAlarmRecordController : ControllerBase
Expression<Func<EquipAlarmRecord, bool>> 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<Func<EquipAlarmProcessRecord, bool>> 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")
{

Loading…
Cancel
Save