Example #1
0
        public JsonResult GetUnDistributeTaskList(QueryFilter queryFilter)
        {
            string sql = @"SELECT dt.distributiontaskid, pro.displayname AS ProviderDisplayName,svc.displayname AS ServiceInfoDisplayName,dt.methodname,
                           case dt.distributionstrategy when 0 then '作业分发' when 1 then '实时分发'
                           end as DistributionStrategy, case dt.distributionstatus when 1
                           then '等待' when 2 then '挂起' when 3 then '就绪' when 4 then '分发中' when 5
                           then '失败' else '成功' end as distributionstatus , dt.distributionresult
                           , distributiontime,dt.eventdatetime
                           FROM dbo.esb_distributiontask dt
                           JOIN dbo.esb_serviceinfo svc ON dt.ServiceInfoID = svc.ServiceInfoID
                           JOIN dbo.esb_provider pro ON svc.ProviderID = pro.ProviderID
                           where (1=1)";

            string sqlCount = @"SELECT count(1)
                           from dbo.esb_distributiontask dt
                           JOIN dbo.esb_serviceinfo svc ON dt.ServiceInfoID = svc.ServiceInfoID
                           JOIN dbo.esb_provider pro ON svc.ProviderID = pro.ProviderID
                           where (1=1)";

            Hashtable returnht = new Hashtable();
            returnht.Add("data", queryFilter.GetPagerQuery(sql).ToList<EsbDistributionTaskView>());
            returnht.Add("total", queryFilter.GetPagerCountQuery(sqlCount).ExecuteScalar<int>());

            return new JsonResult(returnht);
        }
Example #2
0
        public JsonResult GetPageList(QueryFilter queryFilter)
        {
            //  var param = new { PageGUID = pageGUID };
            string sql = @"SELECT pv.ProviderName,
                            pv.DisplayName,
                            esb_PageDistribute.PageDistributeGUID,
                            esb_PageDistribute.PageCode,
                            esb_PageDistribute.PageUrl,
                            esb_PageDistribute.DesrProviderGUID
                            FROM
                            esb_PageDistribute
                            INNER JOIN esb_Provider pv ON esb_PageDistribute.DesrProviderGUID = pv.ProviderID
                            WHERE
                            (1=1)";

            string sqlCount = @"SELECT count(1)FROM
                            esb_PageDistribute
                            INNER JOIN esb_Provider pv ON esb_PageDistribute.DesrProviderGUID = pv.ProviderID
                            WHERE
                            (1=1)";

            Hashtable returnht = new Hashtable();
            returnht.Add("data", queryFilter.GetPagerQuery(sql).ToList<EsbPageViewModel>());
            returnht.Add("total", queryFilter.GetPagerCountQuery(sqlCount).ExecuteScalar<int>());

            return new JsonResult(returnht);
        }
Example #3
0
        public JsonResult GetServiceOperationList(QueryFilter queryFilter)
        {
            string sql = " SELECT OperationID,OperationName,ServiceInfoID FROM dbo.esb_Operation WHERE 1=1 ";
            string sqlCount = " SELECT Count(1) FROM dbo.esb_Operation WHERE 1=1 ";

            Hashtable returnht = new Hashtable();
            returnht.Add("data", queryFilter.GetPagerQuery(sql).ToList<ServiceOperationView>());
            returnht.Add("total", queryFilter.GetPagerCountQuery(sqlCount).ExecuteScalar<int>());

            return new JsonResult(returnht);
        }
Example #4
0
        public JsonResult GetUserList(QueryFilter queryFilter)
        {
            string sql = @"SELECT * FROM esb_Users WHERE (1=1)";

            string sqlCount = @"SELECT count(1) FROM esb_Users WHERE (1=1)";

            Hashtable returnht = new Hashtable();
            returnht.Add("data", queryFilter.GetPagerQuery(sql).ToList<EsbUsers>());
            returnht.Add("total", queryFilter.GetPagerCountQuery(sqlCount).ExecuteScalar<int>());
            //返回JSON序列化结果
            return new JsonResult(returnht);
        }
Example #5
0
        public JsonResult GetDistributeEventHistoryList(QueryFilter queryFilter)
        {
            string sql = @"SELECT eq.EventQueueID,eq.CreatedOn,eq.ProcessingOn,eq.FailReason,eq.ServiceName,eq.DisplayName,
                            case eq.DistributeStrategy when 0 then '作业分发' when 1 then '实时分发' end AS DistributeStrategy,'成功' AS [Status]
                            FROM dbo.esb_EventQueue_History eq
                            WHERE (1=1)";
            string sqlCount = "SELECT count(1) FROM dbo.esb_EventQueue_History eq WHERE (1=1)";

            Hashtable returnht = new Hashtable();
            returnht.Add("data", queryFilter.GetPagerQuery(sql).ToList<EsbEventQueueView>());
            returnht.Add("total", queryFilter.GetPagerCountQuery(sqlCount).ExecuteScalar<int>());

            return new JsonResult(returnht);
        }
Example #6
0
        public JsonResult GetPipeList(QueryFilter queryFilter)
        {
            string sql = @"SELECT * FROM (SELECT ReceiverInterfaceID as ReceiverInterfaceGUID,ServiceName,'/ESBServices/' + ServiceName as URL,
                          DisplayName,CASE Status WHEN 0 THEN '停用' ELSE '启用' END AS Status,Remark
                          FROM esb_ReceiverInterface) ri WHERE (1=1)";
            string sqlCount = @"SELECT COUNT(1) FROM (SELECT ReceiverInterfaceID as ReceiverInterfaceGUID,ServiceName,'/ESBServices/' + ServiceName as URL,
                          DisplayName,CASE Status WHEN 0 THEN '停用' ELSE '启用' END AS Status,Remark
                          FROM esb_ReceiverInterface) ri WHERE (1=1)";
            Hashtable returnht = new Hashtable();
            returnht.Add("data", queryFilter.GetPagerQuery(sql).ToList<PipeViewModel>());
            returnht.Add("total", queryFilter.GetPagerCountQuery(sqlCount).ExecuteScalar<int>());

            return new JsonResult(returnht);
        }
Example #7
0
        public JsonResult GetValidatePipeList(QueryFilter queryFilter)
        {
            string sql = @" SELECT * FROM (
                           select v.VerifyDistributeID,v.ReceiverInterfaceID,
                           '['+p.ProviderName + ']-'+p.DisplayName as ProviderName,
                           '['+s.ServiceName + ']-'+s.DisplayName as ServiceName,v.MethodName
                           from esb_VerifyDistribute v
                           join esb_ServiceInfo s on v.ServiceInfoID = s.ServiceInfoID
                           join esb_Provider p on p.ProviderID = s.ProviderID
                           where v.InterfaceType=0) vp WHERE (1=1)";

            Hashtable returnht = new Hashtable();
            returnht.Add("data", queryFilter.GetPagerQuery(sql).ToList<PipeStrategyView>());
            return new JsonResult(returnht);
        }
Example #8
0
        public JsonResult GetDistributeTaskHistoryList(QueryFilter queryFilter)
        {
            string sql = @"SELECT  DistributionTaskID ,ProviderDisplayName ,ServiceInfoDisplayName ,MethodName ,
                                    CASE DistributionStrategy WHEN 0 THEN '作业分发' WHEN 1 THEN '实时分发' END AS DistributionStrategy ,
                                    DistributionTime ,EventDatetime
                            FROM    dbo.esb_DistributionTask_History
                            WHERE   ( 1 = 1 )";

            string sqlCount = @"SELECT count(1) FROM dbo.esb_DistributionTask_History WHERE (1 = 1)";

            Hashtable returnht = new Hashtable();
            returnht.Add("data", queryFilter.GetPagerQuery(sql).ToList<EsbDistributionTaskView>());
            returnht.Add("total", queryFilter.GetPagerCountQuery(sqlCount).ExecuteScalar<int>());

            return new JsonResult(returnht);
        }
Example #9
0
        public JsonResult GetUnDistributeEventList(QueryFilter queryFilter)
        {
            string sql = @"SELECT eq.EventQueueID,eq.CreatedOn,eq.ProcessingOn,eq.FailReason,ri.ServiceName,ri.DisplayName,
                             case eq.DistributeStrategy when 0 then '作业分发' when 1 then '实时分发' end AS DistributeStrategy,
                            case eq.[Status] when 1 then '待处理' when 2 then '处理中' when 3 then '失败' else '成功' end AS [Status]
                            FROM dbo.esb_EventQueue eq JOIN dbo.esb_ReceiverInterface ri ON eq.ReceiverInterfaceID = ri.ReceiverInterfaceID
                            WHERE (1=1)";
            string sqlCount = @"SELECT count(1)
                            FROM dbo.esb_EventQueue eq JOIN dbo.esb_ReceiverInterface ri ON eq.ReceiverInterfaceID = ri.ReceiverInterfaceID
                            WHERE (1=1)";

            Hashtable returnht = new Hashtable();
            returnht.Add("data", queryFilter.GetPagerQuery(sql).ToList<EsbEventQueueView>());
            returnht.Add("total", queryFilter.GetPagerCountQuery(sqlCount).ExecuteScalar<int>());

            return new JsonResult(returnht);
        }
Example #10
0
        public JsonResult GetDbList(QueryFilter queryFilter)
        {
            string sql = @"select * from (
                          SELECT db.DbDistributeGUID,
                          src.ProviderName SrcProviderName,
                          src.DisplayName SrcDisplayName,
                          dest.ProviderName DestProviderName,
                          dest.DisplayName DestDisplayName,
                          db.DestProviderGUID,
                          db.TableName,
                          'esb_Interface_' + db.TableName AS Interface
                          FROM esb_DbDistribute db
                          INNER JOIN esb_Provider src ON db.SrcProviderGUID = src.ProviderID
                          INNER JOIN esb_Provider dest ON db.DestProviderGUID = dest.ProviderID
                          ) v
                            WHERE
                            (1=1)";

            string sqlCount = @"select count(1) from (
                          SELECT db.DbDistributeGUID,
                          src.ProviderName SrcProviderName,
                          src.DisplayName SrcDisplayName,
                          dest.ProviderName DestProviderName,
                          dest.DisplayName DestDisplayName,
                          db.DestProviderGUID,
                          db.TableName,
                          'esb_Interface_' + db.TableName AS Interface
                          FROM esb_DbDistribute db
                          INNER JOIN esb_Provider src ON db.SrcProviderGUID = src.ProviderID
                          INNER JOIN esb_Provider dest ON db.DestProviderGUID = dest.ProviderID
                          ) v
                            WHERE
                            (1=1)";

            Hashtable returnht = new Hashtable();
            returnht.Add("data", queryFilter.GetPagerQuery(sql).ToList<EsbDbViewModel>());
            returnht.Add("total", queryFilter.GetPagerCountQuery(sqlCount).ExecuteScalar<int>());

            return new JsonResult(returnht);
        }
Example #11
0
        public JsonResult GetProviderList(QueryFilter queryFilter)
        {
            //  var param = new { ProviderGUID = providerGUID };
            string sql = @"SELECT ProviderID,ProviderName,DisplayName,
                           Description,ProviderType, CASE IsMainSite WHEN 1 THEN '是' ELSE '否' END AS Protocol,
                           Protocol + '://' + Domain + ':' + cast(Port as nvarchar(255)) as Domain,
                           CreatedOn,ModifiedOn
                           FROM esb_Provider WHERE (1=1)";

            string sqlCount = @"SELECT count(1) FROM esb_Provider WHERE (1=1)";

            Hashtable returnht = new Hashtable();
            returnht.Add("data", queryFilter.GetPagerQuery(sql).ToList<EsbProvider>());
            returnht.Add("total", queryFilter.GetPagerCountQuery(sqlCount).ExecuteScalar<int>());

            return new JsonResult(returnht);
        }
Example #12
0
        public JsonResult GetWebServiceList(QueryFilter queryFilter)
        {
            // var param = new { ServiceInfoGUID = serviceInfoGUID };
            string sql = @"select * from (
                          select provider.displayname as sysdisplayname, serviceinfoid as serviceInfoGUID,
                          svc.displayname as servicedisplayname, svc.servicename,
                          provider.protocol + '://' + provider.domain + ':' + cast(provider.port as nvarchar(255))
                          + svc.relativepath as url,svc.description, provider.providerid, svc.CreatedOn
                          from dbo.esb_serviceinfo svc inner join dbo.esb_provider provider
                          on svc.providerid = provider.providerid) v
                            where
                            (1=1)";

            Hashtable returnht = new Hashtable();
            returnht.Add("data", queryFilter.GetPagerQuery(sql).ToList<WebServiceViewModel>());

            return new JsonResult(returnht);
        }
Example #13
0
        public JsonResult GetOperationList(QueryFilter queryFilter)
        {
            string sql = @"select * from (select op.*,
                            case vd.distributestrategy when 0 then '作业分发' when 1 then '实时分发' when 2 then '实时获取' else '' end as distributestrategy, vd.VerifyDistributeID,
                            ri.ReceiverInterfaceID, ri.ServiceName, ri.DisplayName from dbo.esb_Operation op
                            left join dbo.esb_VerifyDistribute vd on op.ServiceInfoID = vd.ServiceInfoID and op.OperationName = vd.MethodName
                            left join dbo.esb_ReceiverInterface ri on vd.ReceiverInterfaceID = ri.ReceiverInterfaceID) v
                            WHERE (1=1)";

            string sqlCount = @"select count(1) from (select op.*,
                            case vd.distributestrategy when 0 then '作业分发' when 1 then '实时分发' when 2 then '实时获取' else '' end as distributestrategy,
                            ri.ReceiverInterfaceID, ri.ServiceName, ri.DisplayName from dbo.esb_Operation op
                            left join dbo.esb_VerifyDistribute vd on op.ServiceInfoID = vd.ServiceInfoID and op.OperationName = vd.MethodName
                            left join dbo.esb_ReceiverInterface ri on vd.ReceiverInterfaceID = ri.ReceiverInterfaceID) v
                            WHERE (1=1)";

            Hashtable returnht = new Hashtable();
            returnht.Add("data", queryFilter.GetPagerQuery(sql).ToList<WebServiceMethodViewModel>());
            returnht.Add("total", queryFilter.GetPagerCountQuery(sqlCount).ExecuteScalar<int>());

            return new JsonResult(returnht);
        }