更改引用

dev
嵇文龙 4 weeks ago
parent bef6d33e05
commit 7eefcf2866

@ -24,7 +24,7 @@ namespace DS.WMS.Core.Application.Method
public abstract TaskBaseTypeEnum AuditType { get; } public abstract TaskBaseTypeEnum AuditType { get; }
readonly IClientFlowInstanceService flowService; readonly IClientFlowInstanceService flowService;
readonly ITaskService taskService; readonly IAuditTaskService taskService;
/// <summary> /// <summary>
/// 初始化 /// 初始化
@ -33,7 +33,7 @@ namespace DS.WMS.Core.Application.Method
public ApplicationAuditService(IServiceProvider serviceProvider) : base(serviceProvider) public ApplicationAuditService(IServiceProvider serviceProvider) : base(serviceProvider)
{ {
flowService = serviceProvider.GetRequiredService<IClientFlowInstanceService>(); flowService = serviceProvider.GetRequiredService<IClientFlowInstanceService>();
taskService = serviceProvider.GetRequiredService<ITaskService>(); taskService = serviceProvider.GetRequiredService<IAuditTaskService>();
} }
/// <summary> /// <summary>

@ -37,7 +37,7 @@ namespace DS.WMS.Core.Application.Method
readonly IClientFlowInstanceService flowService; readonly IClientFlowInstanceService flowService;
readonly Lazy<ICommonService> commonService; readonly Lazy<ICommonService> commonService;
readonly ITaskService taskService; readonly IAuditTaskService taskService;
/// <summary> /// <summary>
/// 初始化 /// 初始化
@ -47,7 +47,7 @@ namespace DS.WMS.Core.Application.Method
{ {
flowService = serviceProvider.GetRequiredService<IClientFlowInstanceService>(); flowService = serviceProvider.GetRequiredService<IClientFlowInstanceService>();
commonService = new Lazy<ICommonService>(serviceProvider.GetRequiredService<ICommonService>()); commonService = new Lazy<ICommonService>(serviceProvider.GetRequiredService<ICommonService>());
taskService = serviceProvider.GetRequiredService<ITaskService>(); taskService = serviceProvider.GetRequiredService<IAuditTaskService>();
} }
/// <summary> /// <summary>

@ -28,7 +28,8 @@ namespace DS.WMS.Core.Fee.Method
const TaskBaseTypeEnum BIZ_TASK_TYPE = TaskBaseTypeEnum.FEE_BUSINESS_AUDIT; const TaskBaseTypeEnum BIZ_TASK_TYPE = TaskBaseTypeEnum.FEE_BUSINESS_AUDIT;
readonly IClientFlowInstanceService flowService; readonly IClientFlowInstanceService flowService;
readonly IFeeTaskService taskService; readonly IFeeTaskService feeTaskService;
readonly ISeaExportTaskService taskService;
/// <summary> /// <summary>
/// 初始化 /// 初始化
@ -37,7 +38,8 @@ namespace DS.WMS.Core.Fee.Method
public FeeRecordService(IServiceProvider serviceProvider) : base(serviceProvider) public FeeRecordService(IServiceProvider serviceProvider) : base(serviceProvider)
{ {
flowService = serviceProvider.GetRequiredService<IClientFlowInstanceService>(); flowService = serviceProvider.GetRequiredService<IClientFlowInstanceService>();
taskService = serviceProvider.GetRequiredService<IFeeTaskService>(); feeTaskService = serviceProvider.GetRequiredService<IFeeTaskService>();
taskService = serviceProvider.GetRequiredService<ISeaExportTaskService>();
} }
/// <summary> /// <summary>
@ -464,6 +466,8 @@ namespace DS.WMS.Core.Fee.Method
return result > 0 ? DataResult.Success : DataResult.FailedWithDesc(nameof(MultiLanguageConst.Operation_Failed)); return result > 0 ? DataResult.Success : DataResult.FailedWithDesc(nameof(MultiLanguageConst.Operation_Failed));
} }
#region 审核相关
/// <summary> /// <summary>
/// 发起审批/申请删除工作流 /// 发起审批/申请删除工作流
/// </summary> /// </summary>
@ -548,7 +552,7 @@ namespace DS.WMS.Core.Fee.Method
DataResult result; DataResult result;
DateTime dtNow = DateTime.Now; DateTime dtNow = DateTime.Now;
if (await taskService.HasAuthorizedAsync()) if (await feeTaskService.HasAuthorizedAsync())
{ {
var requests = fees.Select(x => new TaskCreationRequest var requests = fees.Select(x => new TaskCreationRequest
{ {
@ -559,7 +563,7 @@ namespace DS.WMS.Core.Fee.Method
foreach (var request in requests) foreach (var request in requests)
{ {
result = await taskService.CreateTaskAsync(request, false); result = await feeTaskService.CreateTaskAsync(request, false);
if (!result.Succeeded) if (!result.Succeeded)
return result; return result;
@ -617,7 +621,7 @@ namespace DS.WMS.Core.Fee.Method
DataResult result; DataResult result;
DateTime dtNow = DateTime.Now; DateTime dtNow = DateTime.Now;
if (await taskService.HasAuthorizedAsync()) if (await feeTaskService.HasAuthorizedAsync())
{ {
var requests = fees.Select(x => new TaskCreationRequest var requests = fees.Select(x => new TaskCreationRequest
{ {
@ -628,7 +632,7 @@ namespace DS.WMS.Core.Fee.Method
foreach (var request in requests) foreach (var request in requests)
{ {
result = await taskService.CreateTaskAsync(request, false); result = await feeTaskService.CreateTaskAsync(request, false);
if (!result.Succeeded) if (!result.Succeeded)
return result; return result;
@ -705,7 +709,7 @@ namespace DS.WMS.Core.Fee.Method
await TenantDb.Ado.BeginTranAsync(); await TenantDb.Ado.BeginTranAsync();
try try
{ {
if (await taskService.HasAuthorizedAsync()) if (await feeTaskService.HasAuthorizedAsync())
{ {
var requests = fees.Select(x => new TaskCreationRequest var requests = fees.Select(x => new TaskCreationRequest
{ {
@ -716,7 +720,7 @@ namespace DS.WMS.Core.Fee.Method
foreach (var request in requests) foreach (var request in requests)
{ {
result = await taskService.CreateTaskAsync(request, false); result = await feeTaskService.CreateTaskAsync(request, false);
if (!result.Succeeded) if (!result.Succeeded)
return result; return result;
@ -822,13 +826,13 @@ namespace DS.WMS.Core.Fee.Method
} }
var groups = taskTypes.GroupBy(x => x.Item1); var groups = taskTypes.GroupBy(x => x.Item1);
if (await taskService.HasAuthorizedAsync()) if (await feeTaskService.HasAuthorizedAsync())
{ {
foreach (var group in groups) foreach (var group in groups)
{ {
foreach (var item in group) foreach (var item in group)
{ {
result = await taskService.WithdrawAsync(new TaskRequest result = await feeTaskService.WithdrawAsync(new TaskRequest
{ {
BusinessId = item.Item2, BusinessId = item.Item2,
TaskTypeName = item.Item1.ToString(), TaskTypeName = item.Item1.ToString(),
@ -1015,6 +1019,8 @@ namespace DS.WMS.Core.Fee.Method
return result; return result;
} }
#endregion
/// <summary> /// <summary>
/// 设置发票启用状态 /// 设置发票启用状态
/// </summary> /// </summary>

@ -34,8 +34,8 @@ namespace DS.WMS.Core.Fee.Method
private readonly ISaasDbService saasService; private readonly ISaasDbService saasService;
private readonly ISqlSugarClient db; private readonly ISqlSugarClient db;
private readonly IUser user; private readonly IUser user;
readonly ITaskService taskService; readonly IAuditTaskService taskService;
Lazy<ITaskService> taskService2; Lazy<IAuditTaskService> taskService2;
Lazy<IClientFlowInstanceService> flowService; Lazy<IClientFlowInstanceService> flowService;
private readonly ICommonService commonService; private readonly ICommonService commonService;
@ -49,8 +49,8 @@ namespace DS.WMS.Core.Fee.Method
saasService = _serviceProvider.GetRequiredService<ISaasDbService>(); saasService = _serviceProvider.GetRequiredService<ISaasDbService>();
db = _serviceProvider.GetRequiredService<ISqlSugarClient>(); db = _serviceProvider.GetRequiredService<ISqlSugarClient>();
user = _serviceProvider.GetRequiredService<IUser>(); user = _serviceProvider.GetRequiredService<IUser>();
taskService = serviceProvider.GetRequiredService<ITaskService>(); taskService = serviceProvider.GetRequiredService<IAuditTaskService>();
taskService2 = new Lazy<ITaskService>(serviceProvider.GetRequiredService<ITaskService>()); taskService2 = new Lazy<IAuditTaskService>(serviceProvider.GetRequiredService<IAuditTaskService>());
flowService = new Lazy<IClientFlowInstanceService>(serviceProvider.GetRequiredService<IClientFlowInstanceService>()); flowService = new Lazy<IClientFlowInstanceService>(serviceProvider.GetRequiredService<IClientFlowInstanceService>());
this.commonService = commonService; this.commonService = commonService;
} }

@ -32,7 +32,7 @@ public class ClientInfoService : ServiceBase, IClientInfoService
const TaskBaseTypeEnum INFO_CLIENT_TASK = TaskBaseTypeEnum.INFO_CLIENT_AUDIT; const TaskBaseTypeEnum INFO_CLIENT_TASK = TaskBaseTypeEnum.INFO_CLIENT_AUDIT;
Lazy<IClientFlowInstanceService> flowService; Lazy<IClientFlowInstanceService> flowService;
Lazy<ITaskService> taskService; Lazy<IAuditTaskService> taskService;
private readonly ICommonService commonService; private readonly ICommonService commonService;
/// <summary> /// <summary>
@ -42,7 +42,7 @@ public class ClientInfoService : ServiceBase, IClientInfoService
public ClientInfoService(IServiceProvider serviceProvider) : base(serviceProvider) public ClientInfoService(IServiceProvider serviceProvider) : base(serviceProvider)
{ {
flowService = new Lazy<IClientFlowInstanceService>(serviceProvider.GetRequiredService<IClientFlowInstanceService>()); flowService = new Lazy<IClientFlowInstanceService>(serviceProvider.GetRequiredService<IClientFlowInstanceService>());
taskService = new Lazy<ITaskService>(serviceProvider.GetRequiredService<ITaskService>()); taskService = new Lazy<IAuditTaskService>(serviceProvider.GetRequiredService<IAuditTaskService>());
commonService = serviceProvider.GetRequiredService<ICommonService>(); commonService = serviceProvider.GetRequiredService<ICommonService>();
TenantDb.QueryFilter.Clear<IOrgId>(); TenantDb.QueryFilter.Clear<IOrgId>();

@ -27,7 +27,7 @@ namespace DS.WMS.Core.Info.Method
const TaskBaseTypeEnum CLIENT_STAKEHOLDER_TASK_DISPUTE = TaskBaseTypeEnum.CLIENT_STAKEHOLDER_DISPUTE; const TaskBaseTypeEnum CLIENT_STAKEHOLDER_TASK_DISPUTE = TaskBaseTypeEnum.CLIENT_STAKEHOLDER_DISPUTE;
Lazy<IClientFlowInstanceService> flowService; Lazy<IClientFlowInstanceService> flowService;
Lazy<ITaskService> taskService; Lazy<IAuditTaskService> taskService;
/// <summary> /// <summary>
/// 初始化 /// 初始化
@ -36,7 +36,7 @@ namespace DS.WMS.Core.Info.Method
public ClientStakeholderService(IServiceProvider serviceProvider) : base(serviceProvider) public ClientStakeholderService(IServiceProvider serviceProvider) : base(serviceProvider)
{ {
flowService = new Lazy<IClientFlowInstanceService>(serviceProvider.GetRequiredService<IClientFlowInstanceService>()); flowService = new Lazy<IClientFlowInstanceService>(serviceProvider.GetRequiredService<IClientFlowInstanceService>());
taskService = new Lazy<ITaskService>(serviceProvider.GetRequiredService<ITaskService>()); taskService = new Lazy<IAuditTaskService>(serviceProvider.GetRequiredService<IAuditTaskService>());
} }
#region 审核 #region 审核

@ -29,7 +29,7 @@ namespace DS.WMS.Core.TaskInteraction.Method
/// <summary> /// <summary>
/// 任务交互服务 /// 任务交互服务
/// </summary> /// </summary>
public class TaskService : ServiceBase, ITaskService public class TaskService : ServiceBase, ITaskService, IAuditTaskService
{ {
const long PERMISSION_ID = 1815294400855674880; const long PERMISSION_ID = 1815294400855674880;

Loading…
Cancel
Save