diff --git a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/TaskJobs/JobAppService.cs b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/TaskJobs/JobAppService.cs index 7ba7cdd3..6908b5f7 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/TaskJobs/JobAppService.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.Application/Entities/TaskJobs/JobAppService.cs @@ -39,7 +39,7 @@ using Win.Utils; namespace Win.Sfs.SettleAccount.Entities.TaskJobs { - [Authorize(SettleAccountPermissions.Reports.Default)] + //[Authorize(SettleAccountPermissions.Reports.Default)] //[AllowAnonymous] [Route("api/settleaccount/Job")] public class JobAppService: ApplicationService diff --git a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Tasks/TaskDapperRepository.cs b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Tasks/TaskDapperRepository.cs index e4d19f6b..05ad1568 100644 --- a/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Tasks/TaskDapperRepository.cs +++ b/src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Tasks/TaskDapperRepository.cs @@ -31,12 +31,34 @@ namespace Win.Sfs.SettleAccount.Repository public virtual async Task> GetTaskJobsAsync(Job p_task) { string str = string.Empty; - str += " SELECT b.Id, a.StateId,b.Type, a.StateName, a.InvocationData, a.Arguments, a.CreatedAt, a.ExpireAt, b.TaskId, b.Name,isnull(b.remark,'') remark, \n "; - str += " b.ActionName, b.Error, b.Creator, b.Email, b.FileName, b.DownFileName, b.ServiceName,b.RealDownFileName,b.RealFileName \n"; - str += " FROM HangFire.Job AS a INNER JOIN \n"; - str += " Set_TaskJob AS b ON a.Id = b.TaskId \n"; + str= "SELECT\n" + + " b.Id,\n" + + " isnull( a.StateId, 0 ) StateId,\n" + + " b.Type,\n" + + " isnull( a.StateName, 'Succeeded' ) StateName,\n" + + " isnull( a.InvocationData, '' ) InvocationData,\n" + + " Isnull( a.Arguments, '' ) Arguments,\n" + + " b.CreationTime CreatedAt,\n" + + " b.CreationTime ExpireAt,\n" + + " b.TaskId,\n" + + " b.NAME,\n" + + " isnull( b.remark, '' ) remark,\n" + + " b.ActionName,\n" + + " b.Error,\n" + + " b.Creator,\n" + + " b.Email,\n" + + " b.FileName,\n" + + " b.DownFileName,\n" + + " b.ServiceName,\n" + + " b.RealDownFileName,\n" + + " b.RealFileName \n" + + "FROM\n" + + " Set_TaskJob AS b\n" + + " LEFT JOIN HangFire.Job AS a ON a.Id = b.TaskId \n" + + "WHERE\n" + + " 1 = 1 \n" + + " AND a.StateName IS NULL"; - str += "where 1=1 "; if (!string.IsNullOrEmpty(p_task.Email)) {