|
|
@ -161,13 +161,13 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
|
|
|
|
Instance = await Db.Queryable<FlowInstance>().FirstAsync(x => x.Id == task.FlowId.Value)
|
|
|
|
Instance = await Db.Queryable<FlowInstance>().FirstAsync(x => x.Id == task.FlowId.Value)
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
var flow = await Db.Queryable<FlowInstance>().Where(x => x.Id == task.FlowId.Value).Select(x => new
|
|
|
|
var flow = await Db.Queryable<FlowInstance>().Where(x => x.Id == task.FlowId.Value).Select(x => new FlowInstance
|
|
|
|
{
|
|
|
|
{
|
|
|
|
x.FlowStatus,
|
|
|
|
FlowStatus = x.FlowStatus,
|
|
|
|
x.MakerList,
|
|
|
|
MakerList = x.MakerList,
|
|
|
|
}).FirstAsync();
|
|
|
|
}).FirstAsync();
|
|
|
|
|
|
|
|
|
|
|
|
result.Data = (string.IsNullOrEmpty(flow.MakerList) || flow.MakerList == "-1") && flow.FlowStatus == FlowStatusEnum.Approve;
|
|
|
|
result.Data = new { flow.IsCompleted, flow.FlowStatus };
|
|
|
|
return result;
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -236,7 +236,7 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
|
|
|
|
x.ETD,
|
|
|
|
x.ETD,
|
|
|
|
}).FirstAsync(x => x.Id == request.BusinessId);
|
|
|
|
}).FirstAsync(x => x.Id == request.BusinessId);
|
|
|
|
|
|
|
|
|
|
|
|
info.Main.TaskDesp = info.Main.TaskTitle = $"{request.TaskType.GetDescription()} {biz.Vessel} {biz.Voyno} ETD:{biz.ETD?.ToString("yyyy-MM-dd")} BLNo:{biz.MBLNO}";
|
|
|
|
info.Main.TaskDesp = info.Main.TaskTitle = $"{request.TaskType.GetDescription()} {biz?.Vessel} {biz?.Voyno} ETD:{biz?.ETD?.ToString("yyyy-MM-dd")} BLNo:{biz?.MBLNO}";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (useTransaction)
|
|
|
|
if (useTransaction)
|
|
|
@ -392,7 +392,7 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
|
|
|
|
BusinessId = request.BusinessId,
|
|
|
|
BusinessId = request.BusinessId,
|
|
|
|
BusinessType = request.BusinessType,
|
|
|
|
BusinessType = request.BusinessType,
|
|
|
|
TaskType = task.NextType.Value,
|
|
|
|
TaskType = task.NextType.Value,
|
|
|
|
RecvUserIdList = task.RecvUserIdArray,
|
|
|
|
RecvUserIdList = task.RecvUserIdArray
|
|
|
|
};
|
|
|
|
};
|
|
|
|
await CreateTaskAsync(req, false);
|
|
|
|
await CreateTaskAsync(req, false);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -429,13 +429,15 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
|
|
|
|
/// <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 Task UpdateReceiverAsync(MakerChangedCallback callback)
|
|
|
|
public virtual async Task UpdateReceiverAsync(MakerChangedCallback callback)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
//ArgumentNullException.ThrowIfNull(callback, nameof(callback));
|
|
|
|
ArgumentNullException.ThrowIfNull(callback, nameof(callback));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
long userId = long.Parse(User.UserId);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//if (callback.NextUserId == null)
|
|
|
|
//if (callback.NextUserId == null)
|
|
|
|
// return;
|
|
|
|
// return;
|
|
|
|
|
|
|
|
|
|
|
|
//var users = await GetRecvUsers(callback.NextUserId);
|
|
|
|
//var users = await GetRecvUsers(callback.NextUserId);
|
|
|
|
//var result = await ManagerService.TransferTask(callback.BusinessId, TaskBaseTypeEnum.WAIT_ORDER_AUDIT, users);
|
|
|
|
//var result = await ManagerService.TransferTask(callback.BusinessId, TaskBaseTypeEnum.WAIT_ORDER_AUDIT, users);
|
|
|
|
//if (!result.Succeeded)
|
|
|
|
//if (!result.Succeeded)
|
|
|
@ -449,8 +451,6 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
|
|
|
|
// x.BusinessType == callback.BusinessType && x.TaskType == TaskBaseTypeEnum.WAIT_ORDER_AUDIT)
|
|
|
|
// x.BusinessType == callback.BusinessType && x.TaskType == TaskBaseTypeEnum.WAIT_ORDER_AUDIT)
|
|
|
|
// .SetColumns(x => x.RecvUsers == recvUser)
|
|
|
|
// .SetColumns(x => x.RecvUsers == recvUser)
|
|
|
|
// .ExecuteCommandAsync();
|
|
|
|
// .ExecuteCommandAsync();
|
|
|
|
|
|
|
|
|
|
|
|
return Task.CompletedTask;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
@ -470,7 +470,7 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
|
|
|
|
BusinessType = callback.BusinessType.Value,
|
|
|
|
BusinessType = callback.BusinessType.Value,
|
|
|
|
TaskType = TaskBaseTypeEnum.WAIT_ORDER_AUDIT,
|
|
|
|
TaskType = TaskBaseTypeEnum.WAIT_ORDER_AUDIT,
|
|
|
|
TaskStatus = callback.FlowStatus == FlowStatusEnum.Approve ? TaskStatusEnum.Complete : TaskStatusEnum.Pending,
|
|
|
|
TaskStatus = callback.FlowStatus == FlowStatusEnum.Approve ? TaskStatusEnum.Complete : TaskStatusEnum.Pending,
|
|
|
|
AutoCreateNext = callback.FlowStatus == FlowStatusEnum.Approve
|
|
|
|
AutoCreateNext = false
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
if (callback.FlowStatus == FlowStatusEnum.Reject)
|
|
|
|
if (callback.FlowStatus == FlowStatusEnum.Reject)
|
|
|
|