/// <summary> /// 根据模型ID查询报警推送人员配置信息 /// </summary> /// <param name="jC_AlarmNotificationPersonnelrequest"></param> /// <returns>报警配置相关的人员信息</returns> public BasicResponse <List <JC_AlarmNotificationPersonnelInfo> > GetAlarmNotificationPersonnelByAnalysisModelId(AlarmNotificationPersonnelGetListByAlarmConfigIdRequest jC_AlarmNotificationPersonnelListByAlarmConfigIdRequest) { DataTable dataTable = _Repository.QueryTable("global_AlarmNotificationPersonnelService_GetAlarmNotificationPersonnelByAnalysisModelId", jC_AlarmNotificationPersonnelListByAlarmConfigIdRequest.AnalysisModelId); List <JC_AlarmNotificationPersonnelInfo> listResult = new List <JC_AlarmNotificationPersonnelInfo>(); List <UserInfo> UserInfolist = ObjectConverter.CopyList <UserModel, UserInfo>(_userRepository.GetUserList()).ToList(); if (UserInfolist != null && UserInfolist.Count > 0) { foreach (var item in UserInfolist) { JC_AlarmNotificationPersonnelInfo JC_AlarmNotificationPersonnelInfo = new JC_AlarmNotificationPersonnelInfo(); bool stateCheck = false; if (dataTable == null || dataTable.Rows.Count == 0) { stateCheck = false; } else { for (int i = 0; i < dataTable.Rows.Count; i++) { if (dataTable.Rows[i]["UserID"].ToString() == item.UserID) { stateCheck = true; break; } } } JC_AlarmNotificationPersonnelInfo.UserID = item.UserID; JC_AlarmNotificationPersonnelInfo.UserCode = item.UserCode; JC_AlarmNotificationPersonnelInfo.UserName = item.UserName; JC_AlarmNotificationPersonnelInfo.IsCheck = stateCheck; listResult.Add(JC_AlarmNotificationPersonnelInfo); } } var jC_AnalyticalExpressionresponse = new BasicResponse <List <JC_AlarmNotificationPersonnelInfo> >(); jC_AnalyticalExpressionresponse.Data = listResult; return(jC_AnalyticalExpressionresponse); }
public Basic.Framework.Web.BasicResponse <List <Sys.Safety.DataContract.JC_AlarmNotificationPersonnelInfo> > GetAlarmNotificationPersonnelByAnalysisModelId(AlarmNotificationPersonnelGetListByAlarmConfigIdRequest jC_AlarmNotificationPersonnelListByAlarmConfigIdRequest) { return(_AlarmNotificationPersonnelService.GetAlarmNotificationPersonnelByAnalysisModelId(jC_AlarmNotificationPersonnelListByAlarmConfigIdRequest)); }
/// <summary> /// 获取报警配置相关的人员信息 /// </summary> /// <param name="jC_AlarmNotificationPersonnelrequest">获取报警配置相关的人员信息请求对象</param> /// <returns>报警配置相关的人员信息</returns> public BasicResponse <List <JC_AlarmNotificationPersonnelInfo> > GetJC_AlarmNotificationPersonnelListByAlarmConfigId(AlarmNotificationPersonnelGetListByAlarmConfigIdRequest jC_AlarmNotificationPersonnelListByAlarmConfigIdRequest) { var result = _Repository.GetJC_AlarmNotificationPersonnelListByAlarmConfigId(jC_AlarmNotificationPersonnelListByAlarmConfigIdRequest.AlarmConfigId); var jC_AlarmNotificationPersonnelresponse = new BasicResponse <List <JC_AlarmNotificationPersonnelInfo> >(); IList <JC_AlarmNotificationPersonnelInfo> responseData = ObjectConverter.CopyList <JC_AlarmNotificationPersonnelModel, JC_AlarmNotificationPersonnelInfo>(result); jC_AlarmNotificationPersonnelresponse.Data = responseData.ToList(); return(jC_AlarmNotificationPersonnelresponse); }