| | |
| | | { |
| | | return MonitorPointCacheHelper.GetSet(projectId, () => |
| | | { |
| | | var entities = _dal.QueryAll(projectId); |
| | | var entities = _dal.GetAll(projectId); |
| | | var models = Entity2Models(entities); |
| | | if (models == null) |
| | | { |
| | |
| | | //根据 Id 更新缓存 |
| | | private void UpdateProjectCache(long projectId, long Id) |
| | | { |
| | | var entity_ds = _dal.QueryById(projectId, Id); |
| | | var entity_ds = _dal.GetById(projectId, Id); |
| | | var model_ds = Entity2Model(entity_ds); |
| | | var all = GetProjectCache(projectId); |
| | | var model = all.Find(x => x.Id == Id); |
| | |
| | | { |
| | | if (Ids == null || Ids.Count() < 1) |
| | | return; |
| | | var entities = _dal.QueryByIds(projectId, Ids); |
| | | var entities = _dal.GetByIds(projectId, Ids); |
| | | var models = Entity2Models(entities); |
| | | var all = GetProjectCache(projectId); |
| | | all.RemoveAll(x => Ids.Contains(x.Id)); |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region Query |
| | | #region Get |
| | | |
| | | #region 测点 |
| | | |
| | |
| | | /// <summary> |
| | | /// 查询全部 |
| | | /// </summary> |
| | | public List<Model.MonitorPoint> QueryAll(long projectId) |
| | | public List<Model.MonitorPoint> GetAll(long projectId) |
| | | { |
| | | var all = GetProjectCache(projectId); |
| | | return all.OrderBy(x => x.SortCode).ToList(); |
| | |
| | | /// <summary> |
| | | /// 根据 Id查询 |
| | | /// </summary> |
| | | public Model.MonitorPoint QueryById(long projectId, long Id) |
| | | public Model.MonitorPoint GetById(long projectId, long Id) |
| | | { |
| | | var all = QueryAll(projectId); |
| | | var all = GetAll(projectId); |
| | | return all.Find(x => x.Id == Id); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 根据 Ids 查询 |
| | | /// </summary> |
| | | public List<Model.MonitorPoint> QueryByIds(long projectId, IEnumerable<long> Ids) |
| | | public List<Model.MonitorPoint> GetByIds(long projectId, IEnumerable<long> Ids) |
| | | { |
| | | if (Ids == null || Ids.Count() < 1) |
| | | return default; |
| | | var all = QueryAll(projectId); |
| | | var all = GetAll(projectId); |
| | | return all.Where(x => Ids.Contains(x.Id)).ToList(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 根据 Ids 查询 |
| | | /// </summary> |
| | | public List<Model.MonitorPoint> QueryByIds |
| | | public List<Model.MonitorPoint> GetByIds |
| | | (long projectId, IEnumerable<long> ids, Model.eMonitorType monitorType, Model.Monitor.eCronType cronType) |
| | | { |
| | | if (ids == null || ids.Count() < 1) |
| | |
| | | /// <summary> |
| | | /// 根据 BelongType 和 BelongId 查询 |
| | | /// </summary> |
| | | public List<Model.MonitorPoint> QueryByBelongTypeAndBelongId(long projectId, string belongType, long belongId) |
| | | public List<Model.MonitorPoint> GetByBelongTypeAndBelongId(long projectId, string belongType, long belongId) |
| | | { |
| | | var all = GetProjectCache(projectId); |
| | | all = all.Where(x => x.BelongType == belongType && x.BelongId == belongId).ToList(); |
| | |
| | | /// <summary> |
| | | /// 根据 BelongType 和 BelongId 查询 |
| | | /// </summary> |
| | | public List<Model.MonitorPoint> QueryByBelongTypeAndBelongId |
| | | public List<Model.MonitorPoint> GetByBelongTypeAndBelongId |
| | | (long projectId, string belongType, long belongId, Model.eMonitorType monitorType) |
| | | { |
| | | var all = GetProjectCache(projectId); |
| | |
| | | /// <summary> |
| | | /// 根据 BelongType 和 BelongId 查询 |
| | | /// </summary> |
| | | public List<Model.MonitorPoint> QueryByBelongTypeAndBelongId |
| | | public List<Model.MonitorPoint> GetByBelongTypeAndBelongId |
| | | (long projectId, string belongType, long belongId, Model.eMonitorType monitorType, Model.Monitor.eCronType cronType) |
| | | { |
| | | var all = GetProjectCache(projectId); |
| | |
| | | /// <summary> |
| | | /// 根据 BelongType 和 BelongId 查询 |
| | | /// </summary> |
| | | public List<Model.MonitorPoint> QueryByBelongTypeAndBelongId |
| | | public List<Model.MonitorPoint> GetByBelongTypeAndBelongId |
| | | (long projectId, string belongType, long belongId, Model.Monitor.eCronType cronType) |
| | | { |
| | | var all = GetProjectCache(projectId); |
| | |
| | | /// <summary> |
| | | /// 根据 BelongType 和 BelongIds 查询 |
| | | /// </summary> |
| | | public List<Model.MonitorPoint> QueryByBelongTypeAndBelongIds(long projectId, string belongType, IEnumerable<long> belongIds) |
| | | public List<Model.MonitorPoint> GetByBelongTypeAndBelongIds(long projectId, string belongType, IEnumerable<long> belongIds) |
| | | { |
| | | if (belongIds == null || belongIds.Count() < 1) |
| | | return default; |
| | |
| | | /// <summary> |
| | | /// 根据 groupId 查询 |
| | | /// </summary> |
| | | public List<Model.MonitorPoint> QueryByGroupId(long projectId, long groupId) |
| | | public List<Model.MonitorPoint> GetByGroupId(long projectId, long groupId) |
| | | { |
| | | var all = GetProjectCache(projectId); |
| | | all = all.Where(x => x.GroupId == groupId).ToList(); |
| | |
| | | /// <summary> |
| | | /// 根据 groupId 查询 |
| | | /// </summary> |
| | | public List<Model.MonitorPoint> QueryByGroupId |
| | | public List<Model.MonitorPoint> GetByGroupId |
| | | (long projectId, long groupId, Model.eMonitorType monitorType) |
| | | { |
| | | var all = GetProjectCache(projectId); |
| | |
| | | /// <summary> |
| | | /// 根据 groupId 查询 |
| | | /// </summary> |
| | | public List<Model.MonitorPoint> QueryByGroupId |
| | | public List<Model.MonitorPoint> GetByGroupId |
| | | (long projectId, long groupId, Model.Monitor.eCronType cronType) |
| | | { |
| | | var all = GetProjectCache(projectId); |
| | |
| | | /// <summary> |
| | | /// 根据 groupId 查询 |
| | | /// </summary> |
| | | public List<Model.MonitorPoint> QueryByGroupId |
| | | public List<Model.MonitorPoint> GetByGroupId |
| | | (long projectId, long groupId, Model.eMonitorType monitorType, Model.Monitor.eCronType cronType) |
| | | { |
| | | var all = GetProjectCache(projectId); |
| | |
| | | /// <summary> |
| | | /// 根据 groupIds 查询 |
| | | /// </summary> |
| | | public List<Model.MonitorPoint> QueryByGroupIds(long projectId, IEnumerable<long> groupIds) |
| | | public List<Model.MonitorPoint> GetByGroupIds(long projectId, IEnumerable<long> groupIds) |
| | | { |
| | | if (groupIds == null || groupIds.Count() < 1) |
| | | return default; |
| | |
| | | /// <summary> |
| | | /// 根据 groupIds 查询 |
| | | /// </summary> |
| | | public List<Model.MonitorPoint> QueryByGroupIds |
| | | public List<Model.MonitorPoint> GetByGroupIds |
| | | (long projectId, IEnumerable<long> groupIds, Model.eMonitorType monitorType, Model.Monitor.eCronType cronType) |
| | | { |
| | | if (groupIds == null || groupIds.Count() < 1) |
| | |
| | | /// <summary> |
| | | /// 根据 MonitorType 和 CronType 查询 |
| | | /// </summary> |
| | | public List<Model.MonitorPoint> QueryByMonitorTypeAndCronType |
| | | public List<Model.MonitorPoint> GetByMonitorTypeAndCronType |
| | | (long projectId, Model.eMonitorType monitorType, Model.Monitor.eCronType cronType) |
| | | { |
| | | var all = GetProjectCache(projectId); |
| | |
| | | /// <summary> |
| | | /// 查询所有 |
| | | /// </summary> |
| | | public List<Model.MonitorPointExSignalList> QueryExSignalList(long projectId) |
| | | public List<Model.MonitorPointExSignalList> GetExSignalList(long projectId) |
| | | { |
| | | var allMonitorList = QueryAll(projectId); |
| | | var allMonitorList = GetAll(projectId); |
| | | if (allMonitorList == null || allMonitorList.Count() < 1) |
| | | return default; |
| | | var allSignalList = new Signal().QueryAll(projectId); |
| | | var allSignalList = new Signal().GetAll(projectId); |
| | | if (allSignalList == null || allSignalList.Count() < 1) |
| | | return default; |
| | | var vmList = new List<Model.MonitorPointExSignalList>(); |
| | |
| | | /// <summary> |
| | | /// 根据 BelongType 和 BelongId 查询 |
| | | /// </summary> |
| | | public List<Model.MonitorPointExSignalList> QueryExSignalListByBelongTypeAndBelongId(long projectId, string belongType, long belongId) |
| | | public List<Model.MonitorPointExSignalList> GetExSignalListByBelongTypeAndBelongId(long projectId, string belongType, long belongId) |
| | | { |
| | | var allMonitorList = QueryByBelongTypeAndBelongId(projectId, belongType, belongId); |
| | | var allMonitorList = GetByBelongTypeAndBelongId(projectId, belongType, belongId); |
| | | if (allMonitorList == null || allMonitorList.Count < 1) |
| | | return default; |
| | | var allSignalList = new Signal().QueryByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id)); |
| | | var allSignalList = new Signal().GetByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id)); |
| | | if (allSignalList == null || allSignalList.Count < 1) |
| | | return default; |
| | | var vmList = new List<Model.MonitorPointExSignalList>(); |
| | |
| | | /// <summary> |
| | | /// 根据 BelongType 和 BelongId 查询 |
| | | /// </summary> |
| | | public List<Model.MonitorPointExSignalList> QueryExSignalListByBelongTypeAndBelongId |
| | | public List<Model.MonitorPointExSignalList> GetExSignalListByBelongTypeAndBelongId |
| | | (long projectId, string belongType, long belongId, Model.eMonitorType monitorType) |
| | | { |
| | | var allMonitorList = QueryByBelongTypeAndBelongId(projectId, belongType, belongId, monitorType); |
| | | var allMonitorList = GetByBelongTypeAndBelongId(projectId, belongType, belongId, monitorType); |
| | | if (allMonitorList == null || allMonitorList.Count < 1) |
| | | return default; |
| | | var allSignalList = new Signal().QueryByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id)); |
| | | var allSignalList = new Signal().GetByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id)); |
| | | if (allSignalList == null || allSignalList.Count < 1) |
| | | return default; |
| | | var vmList = new List<Model.MonitorPointExSignalList>(); |
| | |
| | | /// <summary> |
| | | /// 根据 BelongType 和 BelongId 查询 |
| | | /// </summary> |
| | | public List<Model.MonitorPointExSignalList> QueryExSignalListByBelongTypeAndBelongId |
| | | public List<Model.MonitorPointExSignalList> GetExSignalListByBelongTypeAndBelongId |
| | | (long projectId, string belongType, long belongId, Model.eMonitorType monitorType, Model.Monitor.eCronType cronType) |
| | | { |
| | | var allMonitorList = QueryByBelongTypeAndBelongId(projectId, belongType, belongId, monitorType, cronType); |
| | | var allMonitorList = GetByBelongTypeAndBelongId(projectId, belongType, belongId, monitorType, cronType); |
| | | if (allMonitorList == null || allMonitorList.Count < 1) |
| | | return default; |
| | | var allSignalList = new Signal().QueryByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id)); |
| | | var allSignalList = new Signal().GetByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id)); |
| | | if (allSignalList == null || allSignalList.Count < 1) |
| | | return default; |
| | | var vmList = new List<Model.MonitorPointExSignalList>(); |
| | |
| | | /// <summary> |
| | | /// 根据 BelongType 和 BelongIds 查询 |
| | | /// </summary> |
| | | public List<Model.MonitorPointExSignalList> QueryExSignalListByBelongTypeAndBelongIds(long projectId, string belongType, IEnumerable<long> belongIds) |
| | | public List<Model.MonitorPointExSignalList> GetExSignalListByBelongTypeAndBelongIds(long projectId, string belongType, IEnumerable<long> belongIds) |
| | | { |
| | | if (belongIds == null || belongIds.Count() < 1) |
| | | return default; |
| | | var allMonitorList = QueryByBelongTypeAndBelongIds(projectId, belongType, belongIds); |
| | | var allMonitorList = GetByBelongTypeAndBelongIds(projectId, belongType, belongIds); |
| | | if (allMonitorList == null || allMonitorList.Count < 1) |
| | | return default; |
| | | var allSignalList = new Signal().QueryByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id)); |
| | | var allSignalList = new Signal().GetByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id)); |
| | | if (allSignalList == null || allSignalList.Count < 1) |
| | | return default; |
| | | var vmList = new List<Model.MonitorPointExSignalList>(); |
| | |
| | | /// <summary> |
| | | /// 根据 groupId 查询 |
| | | /// </summary> |
| | | public List<Model.MonitorPointExSignalList> QueryExSignalListByGroupId(long projectId, long groupId) |
| | | public List<Model.MonitorPointExSignalList> GetExSignalListByGroupId(long projectId, long groupId) |
| | | { |
| | | var allMonitorList = QueryByGroupId(projectId, groupId); |
| | | var allMonitorList = GetByGroupId(projectId, groupId); |
| | | if (allMonitorList == null || allMonitorList.Count < 1) |
| | | return default; |
| | | var allSignalList = new Signal().QueryByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id)); |
| | | var allSignalList = new Signal().GetByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id)); |
| | | if (allSignalList == null || allSignalList.Count < 1) |
| | | return default; |
| | | var vmList = new List<Model.MonitorPointExSignalList>(); |
| | |
| | | /// <summary> |
| | | /// 根据 GroupIds 查询 |
| | | /// </summary> |
| | | public List<Model.MonitorPointExSignalList> QueryExSignalListByGroupIds(long projectId, IEnumerable<long> groupIds) |
| | | public List<Model.MonitorPointExSignalList> GetExSignalListByGroupIds(long projectId, IEnumerable<long> groupIds) |
| | | { |
| | | if (groupIds == null || groupIds.Count() < 1) |
| | | return default; |
| | | var allMonitorList = QueryByGroupIds(projectId, groupIds); |
| | | var allMonitorList = GetByGroupIds(projectId, groupIds); |
| | | if (allMonitorList == null || allMonitorList.Count < 1) |
| | | return default; |
| | | var allSignalList = new Signal().QueryByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id)); |
| | | var allSignalList = new Signal().GetByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id)); |
| | | if (allSignalList == null || allSignalList.Count < 1) |
| | | return default; |
| | | var vmList = new List<Model.MonitorPointExSignalList>(); |
| | |
| | | /// <summary> |
| | | /// 根据 id 查询 |
| | | /// </summary> |
| | | public Model.MonitorPointExSignalList QueryExSignalListById(long projectId, long id) |
| | | public Model.MonitorPointExSignalList GetExSignalListById(long projectId, long id) |
| | | { |
| | | var monitor = QueryById(projectId, id); |
| | | var monitor = GetById(projectId, id); |
| | | if (monitor == null) |
| | | return default; |
| | | var signalList = new Signal().QueryByMonitorPointId(projectId, id); |
| | | var signalList = new Signal().GetByMonitorPointId(projectId, id); |
| | | if (signalList == null || signalList.Count < 1) |
| | | return default; |
| | | return new Model.MonitorPointExSignalList(monitor, signalList); |
| | |
| | | /// <summary> |
| | | /// 根据 ids 查询 |
| | | /// </summary> |
| | | public List<Model.MonitorPointExSignalList> QueryExSignalListByIds(long projectId, IEnumerable<long> ids) |
| | | public List<Model.MonitorPointExSignalList> GetExSignalListByIds(long projectId, IEnumerable<long> ids) |
| | | { |
| | | if (ids == null || ids.Count() < 1) |
| | | return default; |
| | | var allMonitorList = QueryByIds(projectId, ids); |
| | | var allMonitorList = GetByIds(projectId, ids); |
| | | if (allMonitorList == null || allMonitorList.Count < 1) |
| | | return default; |
| | | var allSignalList = new Signal().QueryByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id)); |
| | | var allSignalList = new Signal().GetByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id)); |
| | | if (allSignalList == null || allSignalList.Count < 1) |
| | | return default; |
| | | var vmList = new List<Model.MonitorPointExSignalList>(); |
| | |
| | | /// <summary> |
| | | /// 根据 Id 查询 |
| | | /// </summary> |
| | | public Model.MonitorPoint_Signal_SignalType QueryExSignalWithSignalTypeById |
| | | public Model.MonitorPoint_Signal_SignalType GetExSignalWithSignalTypeById |
| | | (long projectId, long id) |
| | | { |
| | | var monitor = QueryById(projectId, id); |
| | | var monitor = GetById(projectId, id); |
| | | if (monitor == null) |
| | | return default; |
| | | var signalList = new Signal().QueryExSignalTypeByMonitorPointId(projectId, monitor.Id); |
| | | var signalList = new Signal().GetExSignalTypeByMonitorPointId(projectId, monitor.Id); |
| | | if (signalList == null || signalList.Count() < 1) |
| | | return default; |
| | | var vm = new Model.MonitorPoint_Signal_SignalType(monitor, signalList); |
| | |
| | | /// <summary> |
| | | /// 根据 Ids 查询 |
| | | /// </summary> |
| | | public List<Model.MonitorPoint_Signal_SignalType> QueryExSignalWithSignalTypeByIds |
| | | public List<Model.MonitorPoint_Signal_SignalType> GetExSignalWithSignalTypeByIds |
| | | (long projectId, IEnumerable<long> ids) |
| | | { |
| | | if (ids == null || ids.Count() < 1) |
| | | return default; |
| | | var allMonitorList = QueryByIds(projectId, ids); |
| | | var allMonitorList = GetByIds(projectId, ids); |
| | | if (allMonitorList == null || allMonitorList.Count < 1) |
| | | return default; |
| | | var allSignalList = new Signal().QueryExSignalTypeByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id).Distinct()); |
| | | var allSignalList = new Signal().GetExSignalTypeByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id).Distinct()); |
| | | if (allSignalList == null || allSignalList.Count < 1) |
| | | return default; |
| | | var vmList = new List<Model.MonitorPoint_Signal_SignalType>(); |
| | |
| | | /// <summary> |
| | | /// 根据 Ids 查询 |
| | | /// </summary> |
| | | public List<Model.MonitorPoint_Signal_SignalType> QueryExSignalWithSignalTypeByIds |
| | | public List<Model.MonitorPoint_Signal_SignalType> GetExSignalWithSignalTypeByIds |
| | | (long projectId, IEnumerable<long> ids, Model.eMonitorType monitorType, Model.Monitor.eCronType cronType) |
| | | { |
| | | if (ids == null || ids.Count() < 1) |
| | | return default; |
| | | var allMonitorList = QueryByIds(projectId, ids, monitorType, cronType); |
| | | var allMonitorList = GetByIds(projectId, ids, monitorType, cronType); |
| | | if (allMonitorList == null || allMonitorList.Count < 1) |
| | | return default; |
| | | var allSignalList = new Signal().QueryExSignalTypeByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id).Distinct()); |
| | | var allSignalList = new Signal().GetExSignalTypeByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id).Distinct()); |
| | | if (allSignalList == null || allSignalList.Count < 1) |
| | | return default; |
| | | var vmList = new List<Model.MonitorPoint_Signal_SignalType>(); |
| | |
| | | /// <summary> |
| | | /// 根据 GroupId 查询 |
| | | /// </summary> |
| | | public List<Model.MonitorPoint_Signal_SignalType> QueryExSignalWithSignalTypeByGroupId |
| | | public List<Model.MonitorPoint_Signal_SignalType> GetExSignalWithSignalTypeByGroupId |
| | | (long projectId, long groupId) |
| | | { |
| | | var allMonitorList = QueryByGroupId(projectId, groupId); |
| | | var allMonitorList = GetByGroupId(projectId, groupId); |
| | | if (allMonitorList == null || allMonitorList.Count < 1) |
| | | return default; |
| | | var allSignalList = new Signal().QueryExSignalTypeByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id).Distinct()); |
| | | var allSignalList = new Signal().GetExSignalTypeByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id).Distinct()); |
| | | if (allSignalList == null || allSignalList.Count < 1) |
| | | return default; |
| | | var vmList = new List<Model.MonitorPoint_Signal_SignalType>(); |
| | |
| | | /// <summary> |
| | | /// 根据 GroupId 查询 |
| | | /// </summary> |
| | | public List<Model.MonitorPoint_Signal_SignalType> QueryExSignalWithSignalTypeByGroupId |
| | | public List<Model.MonitorPoint_Signal_SignalType> GetExSignalWithSignalTypeByGroupId |
| | | (long projectId, long groupId, Model.eMonitorType monitorType) |
| | | { |
| | | var allMonitorList = QueryByGroupId(projectId, groupId, monitorType); |
| | | var allMonitorList = GetByGroupId(projectId, groupId, monitorType); |
| | | if (allMonitorList == null || allMonitorList.Count < 1) |
| | | return default; |
| | | var allSignalList = new Signal().QueryExSignalTypeByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id).Distinct()); |
| | | var allSignalList = new Signal().GetExSignalTypeByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id).Distinct()); |
| | | if (allSignalList == null || allSignalList.Count < 1) |
| | | return default; |
| | | var vmList = new List<Model.MonitorPoint_Signal_SignalType>(); |
| | |
| | | /// <summary> |
| | | /// 根据 GroupId 查询 |
| | | /// </summary> |
| | | public List<Model.MonitorPoint_Signal_SignalType> QueryExSignalWithSignalTypeByGroupId |
| | | public List<Model.MonitorPoint_Signal_SignalType> GetExSignalWithSignalTypeByGroupId |
| | | (long projectId, long groupId, Model.Monitor.eCronType cronType) |
| | | { |
| | | var allMonitorList = QueryByGroupId(projectId, groupId, cronType); |
| | | var allMonitorList = GetByGroupId(projectId, groupId, cronType); |
| | | if (allMonitorList == null || allMonitorList.Count < 1) |
| | | return default; |
| | | var allSignalList = new Signal().QueryExSignalTypeByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id).Distinct()); |
| | | var allSignalList = new Signal().GetExSignalTypeByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id).Distinct()); |
| | | if (allSignalList == null || allSignalList.Count < 1) |
| | | return default; |
| | | var vmList = new List<Model.MonitorPoint_Signal_SignalType>(); |
| | |
| | | /// <summary> |
| | | /// 根据 GroupId 查询 |
| | | /// </summary> |
| | | public List<Model.MonitorPoint_Signal_SignalType> QueryExSignalWithSignalTypeByGroupId |
| | | public List<Model.MonitorPoint_Signal_SignalType> GetExSignalWithSignalTypeByGroupId |
| | | (long projectId, long groupId, Model.eMonitorType monitorType, Model.Monitor.eCronType cronType) |
| | | { |
| | | var allMonitorList = QueryByGroupId(projectId, groupId, monitorType, cronType); |
| | | var allMonitorList = GetByGroupId(projectId, groupId, monitorType, cronType); |
| | | if (allMonitorList == null || allMonitorList.Count < 1) |
| | | return default; |
| | | var allSignalList = new Signal().QueryExSignalTypeByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id).Distinct()); |
| | | var allSignalList = new Signal().GetExSignalTypeByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id).Distinct()); |
| | | if (allSignalList == null || allSignalList.Count < 1) |
| | | return default; |
| | | var vmList = new List<Model.MonitorPoint_Signal_SignalType>(); |
| | |
| | | /// <summary> |
| | | /// 根据 GroupIds 查询 |
| | | /// </summary> |
| | | public List<Model.MonitorPoint_Signal_SignalType> QueryExSignalWithSignalTypeByGroupIds |
| | | public List<Model.MonitorPoint_Signal_SignalType> GetExSignalWithSignalTypeByGroupIds |
| | | (long projectId, IEnumerable<long> groupIds) |
| | | { |
| | | if (groupIds == null || groupIds.Count() < 1) |
| | | return default; |
| | | var allMonitorList = QueryByGroupIds(projectId, groupIds); |
| | | var allMonitorList = GetByGroupIds(projectId, groupIds); |
| | | if (allMonitorList == null || allMonitorList.Count < 1) |
| | | return default; |
| | | var allSignalList = new Signal().QueryExSignalTypeByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id).Distinct()); |
| | | var allSignalList = new Signal().GetExSignalTypeByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id).Distinct()); |
| | | if (allSignalList == null || allSignalList.Count < 1) |
| | | return default; |
| | | var vmList = new List<Model.MonitorPoint_Signal_SignalType>(); |
| | |
| | | /// <summary> |
| | | /// 根据 GroupIds 查询 |
| | | /// </summary> |
| | | public List<Model.MonitorPoint_Signal_SignalType> QueryExSignalWithSignalTypeByGroupIds |
| | | public List<Model.MonitorPoint_Signal_SignalType> GetExSignalWithSignalTypeByGroupIds |
| | | (long projectId, IEnumerable<long> groupIds, Model.eMonitorType monitorType, Model.Monitor.eCronType cronType) |
| | | { |
| | | if (groupIds == null || groupIds.Count() < 1) |
| | | return default; |
| | | var allMonitorList = QueryByGroupIds(projectId, groupIds, monitorType, cronType); |
| | | var allMonitorList = GetByGroupIds(projectId, groupIds, monitorType, cronType); |
| | | if (allMonitorList == null || allMonitorList.Count < 1) |
| | | return default; |
| | | var allSignalList = new Signal().QueryExSignalTypeByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id).Distinct()); |
| | | var allSignalList = new Signal().GetExSignalTypeByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id).Distinct()); |
| | | if (allSignalList == null || allSignalList.Count < 1) |
| | | return default; |
| | | var vmList = new List<Model.MonitorPoint_Signal_SignalType>(); |
| | |
| | | /// <summary> |
| | | /// 根据 BelongType 和 BelongId 查询 测点+信号+信号类型 |
| | | /// </summary> |
| | | public List<Model.MonitorPoint_Signal_SignalType> QueryExSignalWithSignalTypeByBelongTypeAndBelongId |
| | | public List<Model.MonitorPoint_Signal_SignalType> GetExSignalWithSignalTypeByBelongTypeAndBelongId |
| | | (long projectId, string belongType, long belongId) |
| | | { |
| | | var allMonitorList = QueryByBelongTypeAndBelongId(projectId, belongType, belongId); |
| | | var allMonitorList = GetByBelongTypeAndBelongId(projectId, belongType, belongId); |
| | | if (allMonitorList == null || allMonitorList.Count < 1) |
| | | return default; |
| | | var allSignalList = new Signal().QueryExSignalTypeByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id).Distinct()); |
| | | var allSignalList = new Signal().GetExSignalTypeByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id).Distinct()); |
| | | if (allSignalList == null || allSignalList.Count < 1) |
| | | return default; |
| | | var vmList = new List<Model.MonitorPoint_Signal_SignalType>(); |
| | |
| | | /// <summary> |
| | | /// 根据 BelongType 和 BelongId 查询 测点+信号+信号类型 |
| | | /// </summary> |
| | | public List<Model.MonitorPoint_Signal_SignalType> QueryExSignalWithSignalTypeByBelongTypeAndBelongId |
| | | public List<Model.MonitorPoint_Signal_SignalType> GetExSignalWithSignalTypeByBelongTypeAndBelongId |
| | | (long projectId, string belongType, long belongId, Model.eMonitorType monitorType) |
| | | { |
| | | var allMonitorList = QueryByBelongTypeAndBelongId(projectId, belongType, belongId, monitorType); |
| | | var allMonitorList = GetByBelongTypeAndBelongId(projectId, belongType, belongId, monitorType); |
| | | if (allMonitorList == null || allMonitorList.Count < 1) |
| | | return default; |
| | | var allSignalList = new Signal().QueryExSignalTypeByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id).Distinct()); |
| | | var allSignalList = new Signal().GetExSignalTypeByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id).Distinct()); |
| | | if (allSignalList == null || allSignalList.Count < 1) |
| | | return default; |
| | | var vmList = new List<Model.MonitorPoint_Signal_SignalType>(); |
| | |
| | | /// <summary> |
| | | /// 根据 BelongType 和 BelongId 查询 测点+信号+信号类型 |
| | | /// </summary> |
| | | public List<Model.MonitorPoint_Signal_SignalType> QueryExSignalWithSignalTypeByBelongTypeAndBelongId |
| | | public List<Model.MonitorPoint_Signal_SignalType> GetExSignalWithSignalTypeByBelongTypeAndBelongId |
| | | (long projectId, string belongType, long belongId, Model.Monitor.eCronType cronType) |
| | | { |
| | | var allMonitorList = QueryByBelongTypeAndBelongId(projectId, belongType, belongId, cronType); |
| | | var allMonitorList = GetByBelongTypeAndBelongId(projectId, belongType, belongId, cronType); |
| | | if (allMonitorList == null || allMonitorList.Count < 1) |
| | | return default; |
| | | var allSignalList = new Signal().QueryExSignalTypeByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id).Distinct()); |
| | | var allSignalList = new Signal().GetExSignalTypeByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id).Distinct()); |
| | | if (allSignalList == null || allSignalList.Count < 1) |
| | | return default; |
| | | var vmList = new List<Model.MonitorPoint_Signal_SignalType>(); |
| | |
| | | /// <summary> |
| | | /// 根据 BelongType 和 BelongId 查询 测点+信号+信号类型 |
| | | /// </summary> |
| | | public List<Model.MonitorPoint_Signal_SignalType> QueryExSignalWithSignalTypeByBelongTypeAndBelongId |
| | | public List<Model.MonitorPoint_Signal_SignalType> GetExSignalWithSignalTypeByBelongTypeAndBelongId |
| | | (long projectId, string belongType, long belongId, Model.eMonitorType monitorType, Model.Monitor.eCronType cronType) |
| | | { |
| | | var allMonitorList = QueryByBelongTypeAndBelongId(projectId, belongType, belongId, monitorType, cronType); |
| | | var allMonitorList = GetByBelongTypeAndBelongId(projectId, belongType, belongId, monitorType, cronType); |
| | | if (allMonitorList == null || allMonitorList.Count < 1) |
| | | return default; |
| | | var allSignalList = new Signal().QueryExSignalTypeByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id).Distinct()); |
| | | var allSignalList = new Signal().GetExSignalTypeByMonitorPointIds(projectId, allMonitorList.Select(x => x.Id).Distinct()); |
| | | if (allSignalList == null || allSignalList.Count < 1) |
| | | return default; |
| | | var vmList = new List<Model.MonitorPoint_Signal_SignalType>(); |
| | |
| | | /// </summary> |
| | | public bool IsExistById(long projectId, long Id) |
| | | { |
| | | var all = QueryAll(projectId); |
| | | var all = GetAll(projectId); |
| | | return all.Exists(x => x.Id == Id); |
| | | } |
| | | #endregion |