Esempio n. 1
0
        /// <summary>
        /// 分页获取项目列表
        /// </summary>
        /// <param name="queryWhere">查询条件</param>
        /// <returns>项目列表</returns>
        public Task <IPageResult <ProjectListDto> > GetProjectListAsync(ProjectPageQueryWhere queryWhere)
        {
            SqlWhereBuilder whereBuilder = new SqlWhereBuilder("FIsDeleted=0", ReaderDataType);

            whereBuilder.AppendLike("FName", queryWhere.Name, paramKey: nameof(queryWhere.Name));

            const string selectTable  = TABLE_NAME_PROJECT + SQLSERVER_WITHNOLOCK;
            const string selectColumn = "FID,FName,FComment,ISNULL(FLastModifyTime,FCreateTime) AS FLastModifyTime";
            const string order        = "ISNULL(FLastModifyTime,FCreateTime) DESC";

            return(QueryPageListAsync <ProjectListDto>(selectColumn, selectTable, whereBuilder.ToString(), order, queryWhere.PageIndex, queryWhere.PageSize, cmdParms: queryWhere));
        }
Esempio n. 2
0
        /// <summary>
        /// 分页获取服务器列表
        /// </summary>
        /// <param name="queryWhere">查询条件</param>
        /// <returns>服务器列表</returns>
        public Task <IPageResult <ServicerListDto> > GetServiceListAsync(ServicePageQueryWhere queryWhere)
        {
            SqlWhereBuilder whereBuilder = new SqlWhereBuilder("FIsDeleted=0", ReaderDataType);

            whereBuilder.AppendEqual("FMacAddress", queryWhere.MacAddress, paramKey: nameof(queryWhere.MacAddress))
            .AppendLike("FIP", queryWhere.IP, paramKey: nameof(queryWhere.IP))
            .AppendLike("FName", queryWhere.Name, paramKey: nameof(queryWhere.Name))
            ;
            const string selectTable  = TABLE_NAME_SERVCER + SQLSERVER_WITHNOLOCK;
            const string selectColumn = "FID,FMacAddress,FIP,FName,FComment,ISNULL(FLastModifyTime,FCreateTime) AS FLastModifyTime";
            const string order        = "ISNULL(FLastModifyTime,FCreateTime) DESC";

            return(QueryPageListAsync <ServicerListDto>(selectColumn, selectTable, whereBuilder.ToString(), order, queryWhere.PageIndex, queryWhere.PageSize, cmdParms: queryWhere));
        }
Esempio n. 3
0
        /// <summary>
        /// 加载运行时日志信息
        /// </summary>
        /// <param name="queryWhere">查询条件</param>
        /// <returns></returns>
        public Task <IPageResult <RuntimeLogListDto> > GetRuntimeLogListAsync(RuntimeLogPageQueryWhere queryWhere)
        {
            SqlWhereBuilder whereBuilder = new SqlWhereBuilder("A.FIsDeleted=0", ReaderDataType);

            whereBuilder.AppendEqual("A.FLogLevel", queryWhere.LogLevel, nameof(queryWhere.LogLevel))
            .AppendEqual("A.FProjectID", queryWhere.ProjectID, nameof(queryWhere.ProjectID))
            .AppendEqual("A.FServicerID", queryWhere.ServicerID, nameof(queryWhere.ServicerID))
            .AppendEqual("A.FSource", queryWhere.Source, nameof(queryWhere.Source))
            .AppendEqual("A.FRequestGuid", queryWhere.RequestGuid, nameof(queryWhere.RequestGuid))
            .AppendMoreThanOrEqual("A.FExecuteTime", queryWhere.ExecuteTimeStart, nameof(queryWhere.ExecuteTimeStart))
            .AppendLessThan("A.FExecuteTime", queryWhere.ExecuteTimeEndValue, nameof(queryWhere.ExecuteTimeEndValue))
            ;

            string       selectTable  = $"{TABLE_NAME_RUNTIMELOG} A {SQLSERVER_WITHNOLOCK} LEFT JOIN {TABLE_NAME_SERVCER} B {SQLSERVER_WITHNOLOCK} ON A.FServicerID=B.FID AND B.FIsDeleted=0";
            const string selectColumn = "A.FID,A.FLogLevel,A.FProjectName,B.FName AS FServicerName,A.FCallMemberName,A.FContent,A.FSource,A.FRequestGuid,A.FExecuteTime,A.FCreateTime";
            const string order        = "A.FExecuteTime DESC";

            return(QueryPageListAsync <RuntimeLogListDto>(selectColumn, selectTable, whereBuilder.ToString(), order, queryWhere.PageIndex, queryWhere.PageSize, cmdParms: queryWhere));
        }
Esempio n. 4
0
        /// <summary>
        /// 异步查找警告日志列表
        /// </summary>
        /// <param name="queryWhere">查询条件</param>
        /// <returns>警告日志列表</returns>
        public Task <IPageResult <WarningLogListDto> > GetWarningLogListAsync(WarningLogPageQueryWhere queryWhere)
        {
            SqlWhereBuilder whereBuilder = new SqlWhereBuilder("A.FIsDeleted=0", ReaderDataType);

            whereBuilder.AppendEqual("B.FProjectID", queryWhere.ProjectID, nameof(queryWhere.ProjectID))
            .AppendEqual("B.FServicerID", queryWhere.ServicerID, nameof(queryWhere.ServicerID))
            .AppendLike("B.FCallMemberName", queryWhere.CallMethodName, nameof(queryWhere.CallMethodName))
            .AppendEqual("B.FSource", queryWhere.Source, nameof(queryWhere.Source))
            .AppendEqual("B.FRequestGuid", queryWhere.RequestGuid, nameof(queryWhere.RequestGuid))
            .AppendEqual("A.FNoticeState", queryWhere.NoticeState, nameof(queryWhere.NoticeState))
            .AppendEqual("A.FDealState", queryWhere.DealState, nameof(queryWhere.DealState))
            ;
            string selectTable = $"{TABLE_NAME_WARNINGLOG} A {SQLSERVER_WITHNOLOCK} {LeftJoin} {TABLE_NAME_RUNTIMELOG} B {SQLSERVER_WITHNOLOCK} {On} A.FRunTimeLogID=B.FID {LeftJoin} {TABLE_NAME_SERVCER} C {SQLSERVER_WITHNOLOCK} {On} C.FID=B.FServicerID  AND C.FIsDeleted=0";

            const string selectColumn = "A.FID,A.FOperateAdvice,a.FTreatmentScheme,A.FNoticeState,A.FDealState,ISNULL(A.FLastModifyTime,A.FCreateTime) FLastModifyTime,B.FLogLevel,B.FCallMemberName,B.FContent,B.FSource,B.FExecuteTime,B.FRequestGuid,B.FProjectName,C.FName AS FServicerName ";
            const string order        = "A.FDealState,ISNULL(A.FLastModifyTime,A.FCreateTime)";

            return(QueryPageListAsync <WarningLogListDto>(selectColumn, selectTable, whereBuilder.ToString(), order, queryWhere.PageIndex, queryWhere.PageSize, cmdParms: queryWhere));
        }
Esempio n. 5
0
        /// <summary>
        /// 获取邮件发送记录列表
        /// </summary>
        /// <param name="queryWhere">查询条件</param>
        /// <returns></returns>
        public Task <IPageResult <EmailSendRecordListDto> > GetEmailSendRecordListAsync(EmailSendRecordPageQueryWhere queryWhere)
        {
            SqlWhereBuilder whereBuilder = new SqlWhereBuilder("FIsDeleted=0", ReaderDataType);

            const string selectTable  = TableConstant.TABLE_NAME_EMAILSENDEDRECORD + SqlConstant.SQLSERVER_WITHNOLOCK;
            const string selectColumn = "FID,FReceiveEmail,FTheme,FContent,FSendEmail,FSendState,FStateRemark,ISNULL(FLastModifyTime,FCreateTime) FLastModifyTime";
            const string order        = "ISNULL(FLastModifyTime,FCreateTime) DESC";

            return(QueryPageListAsync <EmailSendRecordListDto>(selectColumn, selectTable, whereBuilder.ToString(), order, queryWhere.PageIndex, queryWhere.PageSize, cmdParms: queryWhere));
        }