|
@@ -94,8 +94,9 @@ public class OrderApplication : IOrderApplication, IScopeDependency
|
|
|
private readonly IRepository<OrderPublishHistory> _orderPublishHistoryRepository;
|
|
|
private readonly IOrderDelayRepository _orderDelayRepository;
|
|
|
private readonly IRepository<OrderSecondaryHandling> _orderSecondaryHandlingRepository;
|
|
|
+ private readonly IRepository<SchedulingUser> _schedulingUserRepository;
|
|
|
|
|
|
- public OrderApplication(
|
|
|
+ public OrderApplication(
|
|
|
IOrderDomainService orderDomainService,
|
|
|
IOrderRepository orderRepository,
|
|
|
IWorkflowDomainService workflowDomainService,
|
|
@@ -133,7 +134,8 @@ public class OrderApplication : IOrderApplication, IScopeDependency
|
|
|
IOrderTerminateRepository orderTerminateRepository,
|
|
|
IRepository<OrderPublishHistory> orderPublishHistoryRepository,
|
|
|
IRepository<OrderSecondaryHandling> orderSecondaryHandlingRepository,
|
|
|
- IOrderDelayRepository orderDelayRepository)
|
|
|
+ IRepository<SchedulingUser> schedulingUserRepository,
|
|
|
+ IOrderDelayRepository orderDelayRepository)
|
|
|
{
|
|
|
_orderDomainService = orderDomainService;
|
|
|
_workflowDomainService = workflowDomainService;
|
|
@@ -173,6 +175,7 @@ public class OrderApplication : IOrderApplication, IScopeDependency
|
|
|
_sessionContext = sessionContext;
|
|
|
_orderDelayRepository = orderDelayRepository;
|
|
|
_orderSecondaryHandlingRepository = orderSecondaryHandlingRepository;
|
|
|
+ _schedulingUserRepository = schedulingUserRepository;
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -3301,15 +3304,17 @@ public class OrderApplication : IOrderApplication, IScopeDependency
|
|
|
SendOrderNum = 0,
|
|
|
NoSendOrderNum = SqlFunc.AggregateDistinctCount(w.ExternalId),
|
|
|
});
|
|
|
- var items = await itemsHandled.LeftJoin(itemsNo, (hand, nohand) => hand.UserId == nohand.UserId)
|
|
|
- .GroupBy((hand, nohand) => new { hand.UserId, hand.UserName })
|
|
|
- .Select((hand, nohand) => new BiOrderSendVo
|
|
|
- {
|
|
|
- UserId = hand.UserId,
|
|
|
- UserName = hand.UserName,
|
|
|
+ var items = await _schedulingUserRepository.Queryable()
|
|
|
+ .LeftJoin(itemsHandled,(all, hand)=> all.UserId == hand.UserId)
|
|
|
+ .LeftJoin(itemsNo, (all, hand, nohand) => hand.UserId == nohand.UserId)
|
|
|
+ .GroupBy((all, hand, nohand) => new { all.UserId, all.UserName })
|
|
|
+ .Select((all, hand, nohand) => new BiOrderSendVo
|
|
|
+ {
|
|
|
+ UserId = all.UserId,
|
|
|
+ UserName = all.UserName,
|
|
|
SendOrderNum = SqlFunc.AggregateSum(hand.SendOrderNum),
|
|
|
NoSendOrderNum = SqlFunc.AggregateSum(nohand.NoSendOrderNum),
|
|
|
- }).ToListAsync();
|
|
|
+ }).MergeTable().Where(vo=> vo.SendOrderNum > 0 || vo.NoSendOrderNum > 0).ToListAsync();
|
|
|
|
|
|
var items2 = await _workflowTraceRepository.Queryable()
|
|
|
.LeftJoin<Workflow>((x, w) => x.WorkflowId == w.Id)
|