|
@@ -11,6 +11,7 @@ using SqlSugar;
|
|
using SqlSugar.Extensions;
|
|
using SqlSugar.Extensions;
|
|
using XF.Domain.Dependency;
|
|
using XF.Domain.Dependency;
|
|
using XF.Domain.Exceptions;
|
|
using XF.Domain.Exceptions;
|
|
|
|
+using XF.Domain.Repository;
|
|
using XF.Utility.EnumExtensions;
|
|
using XF.Utility.EnumExtensions;
|
|
|
|
|
|
namespace Hotline.Application.Snapshot;
|
|
namespace Hotline.Application.Snapshot;
|
|
@@ -22,8 +23,9 @@ public class RedPackApplication : IRedPackApplication, IScopeDependency
|
|
private readonly IIndustryRepository _industryRepository;
|
|
private readonly IIndustryRepository _industryRepository;
|
|
private readonly IRedPackAuditRepository _redPackAuditRepository;
|
|
private readonly IRedPackAuditRepository _redPackAuditRepository;
|
|
private readonly IRedPackRecordRepository _redPackRecordRepository;
|
|
private readonly IRedPackRecordRepository _redPackRecordRepository;
|
|
|
|
+ private readonly IRepository<OrderSpecial> _orderSpecialRepository;
|
|
|
|
|
|
- public RedPackApplication(IOrderSnapshotRepository orderSnapshotRepository, ISnapshotSMSTemplateRepository snapshotSMSTemplateRepository, IOrderRepository orderRepository, IIndustryRepository industryRepository, IRedPackAuditRepository redPackAuditRepository, IRedPackRecordRepository redPackRecordRepository)
|
|
|
|
|
|
+ public RedPackApplication(IOrderSnapshotRepository orderSnapshotRepository, ISnapshotSMSTemplateRepository snapshotSMSTemplateRepository, IOrderRepository orderRepository, IIndustryRepository industryRepository, IRedPackAuditRepository redPackAuditRepository, IRedPackRecordRepository redPackRecordRepository, IRepository<OrderSpecial> orderSpecialRepository)
|
|
{
|
|
{
|
|
_orderSnapshotRepository = orderSnapshotRepository;
|
|
_orderSnapshotRepository = orderSnapshotRepository;
|
|
_snapshotSMSTemplateRepository = snapshotSMSTemplateRepository;
|
|
_snapshotSMSTemplateRepository = snapshotSMSTemplateRepository;
|
|
@@ -31,6 +33,7 @@ public class RedPackApplication : IRedPackApplication, IScopeDependency
|
|
_industryRepository = industryRepository;
|
|
_industryRepository = industryRepository;
|
|
_redPackAuditRepository = redPackAuditRepository;
|
|
_redPackAuditRepository = redPackAuditRepository;
|
|
_redPackRecordRepository = redPackRecordRepository;
|
|
_redPackRecordRepository = redPackRecordRepository;
|
|
|
|
+ _orderSpecialRepository = orderSpecialRepository;
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
@@ -165,7 +168,6 @@ public class RedPackApplication : IRedPackApplication, IScopeDependency
|
|
BankCardNo = record.BankCardNo,
|
|
BankCardNo = record.BankCardNo,
|
|
OpenBank = record.OpenBank,
|
|
OpenBank = record.OpenBank,
|
|
AuditStatus = redPackAudit.Status,
|
|
AuditStatus = redPackAudit.Status,
|
|
- WorkflowId = order.WorkflowId
|
|
|
|
});
|
|
});
|
|
return query;
|
|
return query;
|
|
}
|
|
}
|
|
@@ -256,5 +258,22 @@ public class RedPackApplication : IRedPackApplication, IScopeDependency
|
|
return query;
|
|
return query;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 获取特提参数
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <param name="id"></param>
|
|
|
|
+ /// <returns></returns>
|
|
|
|
+ public async Task<GetAuditBackBaseDataOutDto> GetAuditBackBaseDataAsync(string id)
|
|
|
|
+ {
|
|
|
|
+ var order = await _orderRepository.Queryable()
|
|
|
|
+ .Where(m => m.Id == id)
|
|
|
|
+ .Select<GetAuditBackBaseDataOutDto>()
|
|
|
|
+ .FirstAsync()
|
|
|
|
+ ?? throw UserFriendlyException.SameMessage("工单不存在");
|
|
|
|
+
|
|
|
|
+ order.SpecialNum = await _orderSpecialRepository.CountAsync(x => x.OrderId == id);
|
|
|
|
+ return order;
|
|
|
|
+ }
|
|
|
|
+
|
|
#endregion
|
|
#endregion
|
|
}
|
|
}
|