using Entity.Ammeter; using Entity.DbModel; using Entity.DbModel.Station; using HybirdFrameworkCore.Autofac.Attribute; using Repository.Ammeter; using Repository.Station; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using AutoMapper; using Entity.Dto.Req; using Entity.Dto.Resp; using HybirdFrameworkCore.Entity; using Mapster; using SqlSugar; namespace Service.Station; [Scope("SingleInstance")] public class SysRunningFaultService : BaseServices { private SysRunningFaultRepository _sysRunningFaultRep; public SysRunningFaultService(SysRunningFaultRepository sysRunningFaultRep) { _sysRunningFaultRep = sysRunningFaultRep; this.BaseDal = sysRunningFaultRep; } /// /// 获取系统运行时故障信息 /// /// /// public async Task> Page(int pageSize) { PageResult pageResult = new PageResult(); List sysRunningFaultList = await _sysRunningFaultRep.QueryListByClauseAsync(i=>i.FaultDescribe!=""); if (sysRunningFaultList.Count > 0) { pageResult.PageNum = sysRunningFaultList.Count/pageSize+1; pageResult.ToTal = sysRunningFaultList.Count; pageResult.Rows = sysRunningFaultList; } else { pageResult.PageNum = 0; pageResult.ToTal = 0; } pageResult.PageSize = pageSize; return pageResult; } }