|
|
|
@ -22,9 +22,14 @@ namespace DS.WMS.Core.Application.Method
|
|
|
|
|
/// 申请单基础实现
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <typeparam name="TEntity">实体的类型声明</typeparam>
|
|
|
|
|
public class ApplicationService<TEntity> : FeeServiceBase, IApplicationService<TEntity>
|
|
|
|
|
public abstract class ApplicationService<TEntity> : FeeServiceBase, IApplicationService<TEntity>
|
|
|
|
|
where TEntity : ApplicationForm, new()
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 适用于当前申请单的审核类型
|
|
|
|
|
/// </summary>
|
|
|
|
|
public abstract TaskBaseTypeEnum AuditType { get; }
|
|
|
|
|
|
|
|
|
|
readonly IClientFlowInstanceService flowService;
|
|
|
|
|
readonly Lazy<ICommonService> commonService;
|
|
|
|
|
readonly ITaskService taskService;
|
|
|
|
@ -515,7 +520,23 @@ namespace DS.WMS.Core.Application.Method
|
|
|
|
|
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.NotInAudit));
|
|
|
|
|
|
|
|
|
|
DataResult result;
|
|
|
|
|
bool hasAuthorized = await taskService.HasAuthorizedAsync();
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
if (hasAuthorized)
|
|
|
|
|
{
|
|
|
|
|
foreach (var item in list)
|
|
|
|
|
{
|
|
|
|
|
result = await taskService.WithdrawAsync(new TaskRequest
|
|
|
|
|
{
|
|
|
|
|
BusinessId = item.Id,
|
|
|
|
|
TaskTypeName = AuditType.ToString()
|
|
|
|
|
}, false);
|
|
|
|
|
|
|
|
|
|
OnWithdraw(item);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
result = await flowService.WithdrawAsync(ids);
|
|
|
|
|
if (!result.Succeeded)
|
|
|
|
@ -525,6 +546,7 @@ namespace DS.WMS.Core.Application.Method
|
|
|
|
|
{
|
|
|
|
|
OnWithdraw(item);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
await TenantDb.Updateable(list).UpdateColumns(x => new { x.Status }).ExecuteCommandAsync();
|
|
|
|
|
|
|
|
|
|