|
|
|
@ -29,7 +29,7 @@ namespace DS.WMS.Core.Fee.Method
|
|
|
|
|
|
|
|
|
|
readonly IClientFlowInstanceService flowService;
|
|
|
|
|
readonly IFeeTaskService feeTaskService;
|
|
|
|
|
readonly ISeaExportTaskService taskService;
|
|
|
|
|
readonly IFeeBillTaskService billService;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 初始化
|
|
|
|
@ -39,7 +39,7 @@ namespace DS.WMS.Core.Fee.Method
|
|
|
|
|
{
|
|
|
|
|
flowService = serviceProvider.GetRequiredService<IClientFlowInstanceService>();
|
|
|
|
|
feeTaskService = serviceProvider.GetRequiredService<IFeeTaskService>();
|
|
|
|
|
taskService = serviceProvider.GetRequiredService<ISeaExportTaskService>();
|
|
|
|
|
billService = serviceProvider.GetRequiredService<IFeeBillTaskService>();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
@ -893,7 +893,7 @@ namespace DS.WMS.Core.Fee.Method
|
|
|
|
|
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.BusinessNotFound));
|
|
|
|
|
if (entity.IsFeeLocking.GetValueOrDefault())
|
|
|
|
|
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.FeeLocked));
|
|
|
|
|
if (entity.BillAuditStatus == BillAuditStatus.AuditSubmitted || entity.BillAuditStatus == BillAuditStatus.AuditPassed)
|
|
|
|
|
if (entity.BillAuditStatus == BillAuditStatus.PayPassed || entity.BillAuditStatus == BillAuditStatus.PaySubmitted || entity.BillAuditStatus == BillAuditStatus.RecvSubmitted)
|
|
|
|
|
return DataResult.Failed(string.Format(MultiLanguageConst.BusinessStatusError, entity.BillAuditStatus.GetDescription()));
|
|
|
|
|
|
|
|
|
|
if (await flowService.IsRunning(BIZ_TASK_TYPE, type, bid))
|
|
|
|
@ -903,7 +903,7 @@ namespace DS.WMS.Core.Fee.Method
|
|
|
|
|
await TenantDb.Ado.BeginTranAsync();
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
if (await taskService.HasAuthorizedAsync())
|
|
|
|
|
if (await billService.HasAuthorizedAsync())
|
|
|
|
|
{
|
|
|
|
|
string? bizNo = null;
|
|
|
|
|
switch (type)
|
|
|
|
@ -917,7 +917,7 @@ namespace DS.WMS.Core.Fee.Method
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
result = await taskService.CreateTaskAsync(new TaskCreationRequest
|
|
|
|
|
result = await billService.CreateTaskAsync(new TaskCreationRequest
|
|
|
|
|
{
|
|
|
|
|
BusinessId = bid,
|
|
|
|
|
BusinessType = type,
|
|
|
|
@ -946,7 +946,7 @@ namespace DS.WMS.Core.Fee.Method
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
|
|
//变更状态为提交审核
|
|
|
|
|
entity.BillAuditStatus = BillAuditStatus.AuditSubmitted;
|
|
|
|
|
entity.BillAuditStatus = BillAuditStatus.RecvSubmitted;
|
|
|
|
|
entity.BillFeeStatusTime = DateTime.Now;
|
|
|
|
|
|
|
|
|
|
await TenantDb.Updateable(entity).UpdateColumns(x => new
|
|
|
|
@ -992,13 +992,13 @@ namespace DS.WMS.Core.Fee.Method
|
|
|
|
|
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.BusinessNotFound));
|
|
|
|
|
if (entity.IsFeeLocking.GetValueOrDefault())
|
|
|
|
|
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.FeeLocked));
|
|
|
|
|
if (entity.BillAuditStatus != BillAuditStatus.AuditSubmitted)
|
|
|
|
|
if (entity.BillAuditStatus != BillAuditStatus.RecvSubmitted && entity.BillAuditStatus != BillAuditStatus.PaySubmitted)
|
|
|
|
|
return DataResult.Failed(string.Format(MultiLanguageConst.BusinessStatusError, entity.BillAuditStatus.GetDescription()));
|
|
|
|
|
|
|
|
|
|
DataResult result = DataResult.Success;
|
|
|
|
|
if (await taskService.HasAuthorizedAsync())
|
|
|
|
|
if (await billService.HasAuthorizedAsync())
|
|
|
|
|
{
|
|
|
|
|
await taskService.WithdrawAsync(new TaskRequest
|
|
|
|
|
await billService.WithdrawAsync(new TaskRequest
|
|
|
|
|
{
|
|
|
|
|
BusinessId = bid,
|
|
|
|
|
BusinessType = type,
|
|
|
|
|