|
@ -31,12 +31,34 @@ namespace Win.Sfs.SettleAccount.Repository |
|
|
public virtual async Task<List<Job>> GetTaskJobsAsync(Job p_task) |
|
|
public virtual async Task<List<Job>> GetTaskJobsAsync(Job p_task) |
|
|
{ |
|
|
{ |
|
|
string str = string.Empty; |
|
|
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= "SELECT\n" + |
|
|
str += " b.ActionName, b.Error, b.Creator, b.Email, b.FileName, b.DownFileName, b.ServiceName,b.RealDownFileName,b.RealFileName \n"; |
|
|
" b.Id,\n" + |
|
|
str += " FROM HangFire.Job AS a INNER JOIN \n"; |
|
|
" isnull( a.StateId, 0 ) StateId,\n" + |
|
|
str += " Set_TaskJob AS b ON a.Id = b.TaskId \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)) |
|
|
if (!string.IsNullOrEmpty(p_task.Email)) |
|
|
{ |
|
|
{ |
|
|