|
@@ -73,8 +73,9 @@ public abstract class SnapshotApplicationBase
|
|
|
private readonly IFileDomainService _fileDomainService;
|
|
|
private readonly ICommunityInfoRepository _communityInfoRepository;
|
|
|
private readonly IRedPackAuditRepository _redPackAuditRepository;
|
|
|
+ private readonly IOrderVisitRepository _orderVisitRepository;
|
|
|
|
|
|
- public SnapshotApplicationBase(IThirdIdentiyService thirdLoginService, IRepository<Industry> industryRepository, ISnapshotBulletinRepository bulletinRepository, ISessionContext sessionContext, IRepository<RedPackRecord> redPackRecordRepository, IRepository<Order> orderRepository, IThirdAccountRepository thirdAccountRepository, IOrderSnapshotRepository orderSnapshotRepository, ISystemSettingCacheManager systemSettingCacheManager, ISystemAreaDomainService systemAreaDomainService, IFileRepository fileRepository, ISystemDicDataCacheManager systemDicDataCacheManager, ISnapshotOrderPublishRepository snapshotOrderPublishRepository, IRepository<WorkflowTrace> workflowTraceRepository, IPractitionerRepository practitionerRepository, IRepository<SystemArea> systemAreaRepository, IVolunteerRepository volunteerRepository, IVolunteerReportRepository volunteerReportRepository, ISystemLogRepository systemLog, IGuiderSystemService guiderSystemService, ICapPublisher capPublisher, Publisher publisher, IGuiderInfoRepository guiderInfoRepository, IFileDomainService fileDomainService, ICommunityInfoRepository communityInfoRepository, IRedPackAuditRepository redPackAuditRepository)
|
|
|
+ public SnapshotApplicationBase(IThirdIdentiyService thirdLoginService, IRepository<Industry> industryRepository, ISnapshotBulletinRepository bulletinRepository, ISessionContext sessionContext, IRepository<RedPackRecord> redPackRecordRepository, IRepository<Order> orderRepository, IThirdAccountRepository thirdAccountRepository, IOrderSnapshotRepository orderSnapshotRepository, ISystemSettingCacheManager systemSettingCacheManager, ISystemAreaDomainService systemAreaDomainService, IFileRepository fileRepository, ISystemDicDataCacheManager systemDicDataCacheManager, ISnapshotOrderPublishRepository snapshotOrderPublishRepository, IRepository<WorkflowTrace> workflowTraceRepository, IPractitionerRepository practitionerRepository, IRepository<SystemArea> systemAreaRepository, IVolunteerRepository volunteerRepository, IVolunteerReportRepository volunteerReportRepository, ISystemLogRepository systemLog, IGuiderSystemService guiderSystemService, ICapPublisher capPublisher, Publisher publisher, IGuiderInfoRepository guiderInfoRepository, IFileDomainService fileDomainService, ICommunityInfoRepository communityInfoRepository, IRedPackAuditRepository redPackAuditRepository, IOrderVisitRepository orderVisitRepository)
|
|
|
{
|
|
|
_thirdLoginService = thirdLoginService;
|
|
|
_industryRepository = industryRepository;
|
|
@@ -102,6 +103,7 @@ public abstract class SnapshotApplicationBase
|
|
|
_fileDomainService = fileDomainService;
|
|
|
_communityInfoRepository = communityInfoRepository;
|
|
|
_redPackAuditRepository = redPackAuditRepository;
|
|
|
+ _orderVisitRepository = orderVisitRepository;
|
|
|
}
|
|
|
|
|
|
#region 小程序
|
|
@@ -215,7 +217,8 @@ public abstract class SnapshotApplicationBase
|
|
|
.LeftJoin<Order>((s, o) => s.Id == o.Id)
|
|
|
.Where((s, o) => s.IndustryId == dto.IndustryId)
|
|
|
.WhereIF(dto.Keyword.NotNullOrEmpty(), (s, o) => s.No.Contains(dto.Keyword) || s.ArrangeTitle.Contains(dto.Keyword))
|
|
|
- .Select<OrderPublishOutDto>((s, o) => new OrderPublishOutDto {
|
|
|
+ .Select<OrderPublishOutDto>((s, o) => new OrderPublishOutDto
|
|
|
+ {
|
|
|
Title = s.ArrangeTitle
|
|
|
}, true)
|
|
|
.ToFixedListAsync(dto, requestAborted);
|
|
@@ -349,6 +352,26 @@ public abstract class SnapshotApplicationBase
|
|
|
item.Path = fileServiceUrl + item.Path;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ await _orderVisitRepository.Queryable()
|
|
|
+ .Where(m => m.OrderId == id).FirstAsync(cancellationToken)
|
|
|
+ .Then(orderVisit =>
|
|
|
+ {
|
|
|
+ if (orderVisit.NowEvaluate != null)
|
|
|
+ {
|
|
|
+ outDto.IsVisit = true;
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ await _redPackAuditRepository.Queryable()
|
|
|
+ .Where(m => m.OrderId == id)
|
|
|
+ .FirstAsync(cancellationToken)
|
|
|
+ .Then(redPack =>
|
|
|
+ {
|
|
|
+ outDto.AuditRemark = redPack.AuditRemark;
|
|
|
+ outDto.RedPackStatus = redPack.Status;
|
|
|
+ });
|
|
|
+
|
|
|
var traces = await _workflowTraceRepository.Queryable()
|
|
|
.Where(m => m.ExternalId == order.Id && m.Status == EWorkflowStepStatus.Handled)
|
|
|
.OrderBy(m => m.AcceptTime)
|
|
@@ -597,7 +620,7 @@ public abstract class SnapshotApplicationBase
|
|
|
return;
|
|
|
}
|
|
|
if (entity.UniqueKey != community.GetUniqueKey())
|
|
|
- {
|
|
|
+ {
|
|
|
await _communityInfoRepository.UpdateAsync(community, cancellationToken);
|
|
|
}
|
|
|
}
|
|
@@ -724,7 +747,7 @@ public abstract class SnapshotApplicationBase
|
|
|
{
|
|
|
var order = await _orderRepository.Queryable()
|
|
|
.Where(m => m.Id == orderId)
|
|
|
- .Select(m => new {m.Id, m.Status , m.No})
|
|
|
+ .Select(m => new { m.Id, m.Status, m.No })
|
|
|
.FirstAsync(cancellationToken) ?? throw new UserFriendlyException($"{orderId} 工单不存在");
|
|
|
if (order.Status != EOrderStatus.Filed) return $"{order.No} 工单状态非 {EOrderStatus.Filed} 不处理;";
|
|
|
var redPack = await _redPackAuditRepository.GetByOrderIdAsync(orderId, cancellationToken);
|