44673626 3 years ago
parent
commit
ae13bf891b
  1. 2
      src/Modules/SettleAccount/src/SettleAccount.Application/Entities/TaskJobs/JobAppService.cs
  2. 32
      src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Tasks/TaskDapperRepository.cs

2
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

32
src/Modules/SettleAccount/src/SettleAccount.EntityFrameworkCore/Repository/SettleAccountJob/Tasks/TaskDapperRepository.cs

@ -31,12 +31,34 @@ namespace Win.Sfs.SettleAccount.Repository
public virtual async Task<List<Job>> 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))
{

Loading…
Cancel
Save