Limiting active approval list
This commit is contained in:
parent
b9b0299d3f
commit
03197508a2
@ -25,8 +25,9 @@ public class ApprovalService : IApprovalService {
|
|||||||
|
|
||||||
StringBuilder queryBuilder = new();
|
StringBuilder queryBuilder = new();
|
||||||
queryBuilder.Append("select * from Approval where ");
|
queryBuilder.Append("select * from Approval where ");
|
||||||
|
queryBuilder.Append($"ItemStatus=0 and AssignedDate > '{DateTimeOffset.Now.AddDays(-365).DateTime.ToString("yyyy-MM-dd HH:mm:ss")}' and ");
|
||||||
queryBuilder.Append($"(CompletedDate is null or CompletedDate >= '{DateTimeUtilities.MAX_DT.ToString("yyyy-MM-dd HH:mm")}') and ");
|
queryBuilder.Append($"(CompletedDate is null or CompletedDate >= '{DateTimeUtilities.MAX_DT.ToString("yyyy-MM-dd HH:mm")}') and ");
|
||||||
queryBuilder.Append($"(NotifyDate is null or NotifyDate < '{DateTimeOffset.Now.AddDays(-5).ToString("yyyy-MM-dd HH:mm")}')");
|
queryBuilder.Append($"(NotifyDate is null or NotifyDate < '{DateTimeOffset.Now.AddDays(-5).DateTime.ToString("yyyy-MM-dd HH:mm")}')");
|
||||||
|
|
||||||
IEnumerable<Approval> approvals = await _dalService.QueryAsync<Approval>(queryBuilder.ToString());
|
IEnumerable<Approval> approvals = await _dalService.QueryAsync<Approval>(queryBuilder.ToString());
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user