|
|
@ -131,7 +131,7 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
|
|
|
|
return result;
|
|
|
|
return result;
|
|
|
|
|
|
|
|
|
|
|
|
//创建&启动工作流
|
|
|
|
//创建&启动工作流
|
|
|
|
result = await Create_StartWorkflow(task);
|
|
|
|
result = await Create_StartWorkflow(task, false);
|
|
|
|
if (!result.Succeeded)
|
|
|
|
if (!result.Succeeded)
|
|
|
|
return result;
|
|
|
|
return result;
|
|
|
|
|
|
|
|
|
|
|
@ -267,10 +267,6 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
|
|
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var result = await ManagerService.InitTaskJob(info);
|
|
|
|
|
|
|
|
if (!result.Succeeded)
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
task = new BusinessTask
|
|
|
|
task = new BusinessTask
|
|
|
|
{
|
|
|
|
{
|
|
|
|
BusinessId = request.BusinessId,
|
|
|
|
BusinessId = request.BusinessId,
|
|
|
@ -284,8 +280,12 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
|
|
|
|
task.NextType = GetNextType(task);
|
|
|
|
task.NextType = GetNextType(task);
|
|
|
|
await TenantDb.Insertable(task).ExecuteCommandAsync();
|
|
|
|
await TenantDb.Insertable(task).ExecuteCommandAsync();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DataResult result = await ManagerService.InitTaskJob(info);
|
|
|
|
|
|
|
|
if (!result.Succeeded)
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
|
|
|
|
//待审核,需创建工作流
|
|
|
|
//待审核,需创建工作流
|
|
|
|
if (task.TaskType == TaskBaseTypeEnum.WAIT_ORDER_AUDIT)
|
|
|
|
if (request.TaskType == TaskBaseTypeEnum.WAIT_ORDER_AUDIT)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
result = await Create_StartWorkflow(task);
|
|
|
|
result = await Create_StartWorkflow(task);
|
|
|
|
if (!result.Succeeded)
|
|
|
|
if (!result.Succeeded)
|
|
|
@ -343,14 +343,8 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
|
|
|
|
{
|
|
|
|
{
|
|
|
|
string[] ids = FlowInstanceService.GetMarkers(instance);
|
|
|
|
string[] ids = FlowInstanceService.GetMarkers(instance);
|
|
|
|
//变更任务接收人为所有审批执行人
|
|
|
|
//变更任务接收人为所有审批执行人
|
|
|
|
await UpdateReceiverAsync(new MarkerChangedCallback
|
|
|
|
var users = await GetRecvUsers(ids.Select(long.Parse).ToArray());
|
|
|
|
{
|
|
|
|
await ManagerService.TransferTask(task.BusinessId, task.TaskType, users);
|
|
|
|
BusinessId = task.BusinessId,
|
|
|
|
|
|
|
|
BusinessType = task.BusinessType,
|
|
|
|
|
|
|
|
InstanceId = instance.Id,
|
|
|
|
|
|
|
|
Type = instance.Type,
|
|
|
|
|
|
|
|
NextUserId = ids.Select(long.Parse).ToArray()
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -448,17 +442,18 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
|
/// 通知更新任务接收人
|
|
|
|
/// 通知审批执行人变更
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="callback">回调信息</param>
|
|
|
|
/// <param name="callback">回调信息</param>
|
|
|
|
/// <returns></returns>
|
|
|
|
/// <returns></returns>
|
|
|
|
/// <exception cref="ArgumentNullException"><paramref name="callback"/>为null时引发</exception>
|
|
|
|
/// <exception cref="ArgumentNullException"><paramref name="callback"/>为null时引发</exception>
|
|
|
|
public virtual async Task UpdateReceiverAsync(MarkerChangedCallback callback)
|
|
|
|
public virtual async Task MarkerChangedAsync(MarkerChangedCallback callback)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ArgumentNullException.ThrowIfNull(callback, nameof(callback));
|
|
|
|
ArgumentNullException.ThrowIfNull(callback, nameof(callback));
|
|
|
|
|
|
|
|
|
|
|
|
long userId = long.Parse(User.UserId);
|
|
|
|
long userId = long.Parse(User.UserId);
|
|
|
|
var users = await GetRecvUsers(userId);
|
|
|
|
var users = await GetRecvUsers(userId);
|
|
|
|
|
|
|
|
|
|
|
|
await ManagerService.SetTaskUserStatus(
|
|
|
|
await ManagerService.SetTaskUserStatus(
|
|
|
|
callback.BusinessId,
|
|
|
|
callback.BusinessId,
|
|
|
|
TaskBaseTypeEnum.WAIT_ORDER_AUDIT,
|
|
|
|
TaskBaseTypeEnum.WAIT_ORDER_AUDIT,
|
|
|
|