|
@@ -42,8 +42,9 @@ public class OrderSnapshotApplication : IOrderSnapshotApplication, IScopeDepende
|
|
|
private readonly IIndustryRepository _industryRepository;
|
|
|
private readonly IFileRepository _fileRepository;
|
|
|
private readonly ISnapshotLabelLogRepository _snapshotLabelLogRepository;
|
|
|
+ private readonly IRedPackAuditRepository _redPackAuditRepository;
|
|
|
|
|
|
- public OrderSnapshotApplication(IOrderSnapshotRepository orderSnapshotRepository, IOrderRepository orderRepository, ISnapshotOrderPublishRepository snapshotOrderPublishRepository, ISessionContext sessionContext, ISystemSettingCacheManager systemSettingCacheManager, IIndustryCaseRepository industryCaseRepository, ISystemDicDataCacheManager systemDicDataCacheManager, IIndustryRepository industryRepository, IFileRepository fileRepository, ISnapshotLabelLogRepository snapshotLabelLogRepository)
|
|
|
+ public OrderSnapshotApplication(IOrderSnapshotRepository orderSnapshotRepository, IOrderRepository orderRepository, ISnapshotOrderPublishRepository snapshotOrderPublishRepository, ISessionContext sessionContext, ISystemSettingCacheManager systemSettingCacheManager, IIndustryCaseRepository industryCaseRepository, ISystemDicDataCacheManager systemDicDataCacheManager, IIndustryRepository industryRepository, IFileRepository fileRepository, ISnapshotLabelLogRepository snapshotLabelLogRepository, IRedPackAuditRepository redPackAuditRepository)
|
|
|
{
|
|
|
_orderSnapshotRepository = orderSnapshotRepository;
|
|
|
_orderRepository = orderRepository;
|
|
@@ -55,6 +56,7 @@ public class OrderSnapshotApplication : IOrderSnapshotApplication, IScopeDepende
|
|
|
_industryRepository = industryRepository;
|
|
|
_fileRepository = fileRepository;
|
|
|
_snapshotLabelLogRepository = snapshotLabelLogRepository;
|
|
|
+ _redPackAuditRepository = redPackAuditRepository;
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -466,4 +468,13 @@ public class OrderSnapshotApplication : IOrderSnapshotApplication, IScopeDepende
|
|
|
return query;
|
|
|
}
|
|
|
|
|
|
+ public async Task<OrderSnapshot> UpdateSafetyAsync(string orderId, bool isSafetyDepartment, string remark)
|
|
|
+ {
|
|
|
+ // 红包已经审核通过的工单不允许修改
|
|
|
+ if (await _redPackAuditRepository.Queryable().AnyAsync(m => m.OrderId == orderId && m.Status == ERedPackAuditStatus.Agree))
|
|
|
+ {
|
|
|
+ return await _orderSnapshotRepository.GetAsync(orderId);
|
|
|
+ }
|
|
|
+ return await _orderSnapshotRepository.UpdateSafetyAsync(orderId, isSafetyDepartment, remark);
|
|
|
+ }
|
|
|
}
|