|
|
@ -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>
|
|
|
|