public BasicResponse <List <JC_AlarmNotificationPersonnelConfigInfo> > GetJC_AlarmNotificationPersonnelConfigList(AlarmNotificationPersonnelConfigGetListRequest jC_Alarmnotificationpersonnelconfigrequest)
 {
     return(_AlarmNotificationPersonnelConfigService.GetJC_AlarmNotificationPersonnelConfigList(jC_Alarmnotificationpersonnelconfigrequest));
 }
 public BasicResponse <List <JC_AlarmNotificationPersonnelConfigInfo> > GetAlarmNotificationPersonnelListByAnalysisModeName(AlarmNotificationPersonnelConfigGetListRequest getListByAnalysisModelIdRequest)
 {
     return(_AlarmNotificationPersonnelConfigService.GetAlarmNotificationPersonnelListByAnalysisModeName(getListByAnalysisModelIdRequest));
 }
示例#3
0
        /// <summary>
        /// 根据模型名称模糊查询报警推送配置信息
        /// </summary>
        /// <param name="getListByAnalysisModelIdRequest"></param>
        /// <returns></returns>
        public BasicResponse <List <JC_AlarmNotificationPersonnelConfigInfo> > GetAlarmNotificationPersonnelListByAnalysisModeName(AlarmNotificationPersonnelConfigGetListRequest getListByAnalysisModelIdRequest)
        {
            var JC_AlarmNotificationPersonnelConfigInforesponse = new BasicResponse <List <JC_AlarmNotificationPersonnelConfigInfo> >();

            getListByAnalysisModelIdRequest.PagerInfo.PageIndex = getListByAnalysisModelIdRequest.PagerInfo.PageIndex - 1;
            if (getListByAnalysisModelIdRequest.PagerInfo.PageIndex < 0)
            {
                getListByAnalysisModelIdRequest.PagerInfo.PageIndex = 0;
            }
            int rowcount  = 0;
            int pageIndex = getListByAnalysisModelIdRequest.PagerInfo.PageIndex;
            int pageSize  = getListByAnalysisModelIdRequest.PagerInfo.PageSize;

            rowcount = getListByAnalysisModelIdRequest.PagerInfo.RowCount;
            try
            {
                StringBuilder sqlWhere = new StringBuilder();
                if (!string.IsNullOrWhiteSpace(getListByAnalysisModelIdRequest.AnalysisModeName))
                {
                    sqlWhere.Append(" and b.Name like '%");
                    sqlWhere.Append(getListByAnalysisModelIdRequest.AnalysisModeName.Trim());
                    sqlWhere.Append("%'");
                }

                DataTable dataTable = _Repository.QueryTable("global_AlarmNotificationPersonnelService_GetAlarmNotificationPersonnelListByAnalysisModeName", sqlWhere.ToString());
                if (dataTable != null && dataTable.Rows.Count > 0)
                {
                    List <JC_AlarmNotificationPersonnelConfigInfo> listResult = ObjectConverter.Copy <JC_AlarmNotificationPersonnelConfigInfo>(dataTable);

                    rowcount = listResult.Count();
                    if (pageSize == 0)
                    {//查询所有数据
                        JC_AlarmNotificationPersonnelConfigInforesponse.Data = listResult.OrderByDescending(t => t.UpdatedTime).ToList();
                    }
                    else
                    {
                        JC_AlarmNotificationPersonnelConfigInforesponse.Data = listResult.OrderByDescending(t => t.UpdatedTime).Skip(pageIndex * pageSize).Take(pageSize).ToList();
                    }
                    if (JC_AlarmNotificationPersonnelConfigInforesponse.Data != null && JC_AlarmNotificationPersonnelConfigInforesponse.Data.Count > 0)
                    {
                        JC_AlarmNotificationPersonnelConfigInforesponse.PagerInfo.PageIndex = pageIndex;
                        JC_AlarmNotificationPersonnelConfigInforesponse.PagerInfo.PageSize  = pageSize;
                        JC_AlarmNotificationPersonnelConfigInforesponse.PagerInfo.RowCount  = rowcount;
                    }
                }
                else
                {
                    JC_AlarmNotificationPersonnelConfigInforesponse.Data = new List <JC_AlarmNotificationPersonnelConfigInfo>();
                }
            }
            catch
            {
                JC_AlarmNotificationPersonnelConfigInforesponse.Data = new List <JC_AlarmNotificationPersonnelConfigInfo>();
            }
            return(JC_AlarmNotificationPersonnelConfigInforesponse);
        }
示例#4
0
        public BasicResponse <List <JC_AlarmNotificationPersonnelConfigInfo> > GetAlarmNotificationPersonnelConfigByAnalysisModelId(AlarmNotificationPersonnelConfigGetListRequest getListByAnalysisModelIdRequest)
        {
            var response = new BasicResponse <List <JC_AlarmNotificationPersonnelConfigInfo> >();
            IList <JC_AlarmnotificationpersonnelconfigModel> alarmNotificationPersonnelConfigModelList = _Repository.GetAlarmNotificationPersonnelConfigByAnalysisModelId(getListByAnalysisModelIdRequest.AnalysisModelId);

            if (alarmNotificationPersonnelConfigModelList != null)
            {
                response.Data = ObjectConverter.CopyList <JC_AlarmnotificationpersonnelconfigModel, JC_AlarmNotificationPersonnelConfigInfo>(alarmNotificationPersonnelConfigModelList).ToList();
            }
            return(response);
        }
示例#5
0
        public BasicResponse <List <JC_AlarmNotificationPersonnelConfigInfo> > GetJC_AlarmNotificationPersonnelConfigList(AlarmNotificationPersonnelConfigGetListRequest jC_Alarmnotificationpersonnelconfigrequest)
        {
            var jC_Alarmnotificationpersonnelconfigresponse = new BasicResponse <List <JC_AlarmNotificationPersonnelConfigInfo> >();

            jC_Alarmnotificationpersonnelconfigrequest.PagerInfo.PageIndex = jC_Alarmnotificationpersonnelconfigrequest.PagerInfo.PageIndex - 1;
            if (jC_Alarmnotificationpersonnelconfigrequest.PagerInfo.PageIndex < 0)
            {
                jC_Alarmnotificationpersonnelconfigrequest.PagerInfo.PageIndex = 0;
            }
            int rowcount = 0;
            var jC_AlarmnotificationpersonnelconfigModelLists = _Repository.GetJC_AlarmNotificationPersonnelConfigList(jC_Alarmnotificationpersonnelconfigrequest.PagerInfo.PageIndex, jC_Alarmnotificationpersonnelconfigrequest.PagerInfo.PageSize, out rowcount);
            var jC_AlarmnotificationpersonnelconfigInfoLists  = new List <JC_AlarmNotificationPersonnelConfigInfo>();

            foreach (var item in jC_AlarmnotificationpersonnelconfigModelLists)
            {
                var JC_AlarmNotificationPersonnelConfigInfo = ObjectConverter.Copy <JC_AlarmnotificationpersonnelconfigModel, JC_AlarmNotificationPersonnelConfigInfo>(item);
                jC_AlarmnotificationpersonnelconfigInfoLists.Add(JC_AlarmNotificationPersonnelConfigInfo);
            }
            jC_Alarmnotificationpersonnelconfigresponse.Data = jC_AlarmnotificationpersonnelconfigInfoLists;
            return(jC_Alarmnotificationpersonnelconfigresponse);
        }
        public BasicResponse <List <JC_AlarmNotificationPersonnelConfigInfo> > GetAlarmNotificationPersonnelListByAnalysisModeName(AlarmNotificationPersonnelConfigGetListRequest getListByAnalysisModelIdRequest)
        {
            var responseStr = HttpClientHelper.Post(Webapi + "/v1/AlarmNotificationPersonnelConfig/GetAlarmNotificationPersonnelListByAnalysisModeName?token=" + Token, JSONHelper.ToJSONString(getListByAnalysisModelIdRequest));

            return(JSONHelper.ParseJSONString <BasicResponse <List <JC_AlarmNotificationPersonnelConfigInfo> > >(responseStr));
        }
        public BasicResponse <List <JC_AlarmNotificationPersonnelConfigInfo> > GetJC_AlarmNotificationPersonnelConfigList(AlarmNotificationPersonnelConfigGetListRequest jC_Alarmnotificationpersonnelconfigrequest)
        {
            var responseStr = HttpClientHelper.Post(Webapi + "/v1/AlarmNotificationPersonnelConfig/GetJC_AlarmNotificationPersonnelConfigList?token=" + Token, JSONHelper.ToJSONString(jC_Alarmnotificationpersonnelconfigrequest));

            return(JSONHelper.ParseJSONString <BasicResponse <List <JC_AlarmNotificationPersonnelConfigInfo> > >(responseStr));
        }