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