|
|
|
@ -161,13 +161,13 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
|
|
|
|
|
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,
|
|
|
|
|
x.MakerList,
|
|
|
|
|
FlowStatus = x.FlowStatus,
|
|
|
|
|
MakerList = x.MakerList,
|
|
|
|
|
}).FirstAsync();
|
|
|
|
|
|
|
|
|
|
result.Data = (string.IsNullOrEmpty(flow.MakerList) || flow.MakerList == "-1") && flow.FlowStatus == FlowStatusEnum.Approve;
|
|
|
|
|
result.Data = new { flow.IsCompleted, flow.FlowStatus };
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -236,7 +236,7 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
|
|
|
|
|
x.ETD,
|
|
|
|
|
}).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)
|
|
|
|
@ -392,7 +392,7 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
|
|
|
|
|
BusinessId = request.BusinessId,
|
|
|
|
|
BusinessType = request.BusinessType,
|
|
|
|
|
TaskType = task.NextType.Value,
|
|
|
|
|
RecvUserIdList = task.RecvUserIdArray,
|
|
|
|
|
RecvUserIdList = task.RecvUserIdArray
|
|
|
|
|
};
|
|
|
|
|
await CreateTaskAsync(req, false);
|
|
|
|
|
}
|
|
|
|
@ -429,13 +429,15 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
|
|
|
|
|
/// <param name="callback">回调信息</param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
/// <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)
|
|
|
|
|
// return;
|
|
|
|
|
|
|
|
|
|
//var users = await GetRecvUsers(callback.NextUserId);
|
|
|
|
|
//var result = await ManagerService.TransferTask(callback.BusinessId, TaskBaseTypeEnum.WAIT_ORDER_AUDIT, users);
|
|
|
|
|
//if (!result.Succeeded)
|
|
|
|
@ -449,8 +451,6 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
|
|
|
|
|
// x.BusinessType == callback.BusinessType && x.TaskType == TaskBaseTypeEnum.WAIT_ORDER_AUDIT)
|
|
|
|
|
// .SetColumns(x => x.RecvUsers == recvUser)
|
|
|
|
|
// .ExecuteCommandAsync();
|
|
|
|
|
|
|
|
|
|
return Task.CompletedTask;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
@ -470,7 +470,7 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction
|
|
|
|
|
BusinessType = callback.BusinessType.Value,
|
|
|
|
|
TaskType = TaskBaseTypeEnum.WAIT_ORDER_AUDIT,
|
|
|
|
|
TaskStatus = callback.FlowStatus == FlowStatusEnum.Approve ? TaskStatusEnum.Complete : TaskStatusEnum.Pending,
|
|
|
|
|
AutoCreateNext = callback.FlowStatus == FlowStatusEnum.Approve
|
|
|
|
|
AutoCreateNext = false
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
if (callback.FlowStatus == FlowStatusEnum.Reject)
|
|
|
|
|