feat: handle ready task
This commit is contained in:
parent
75651daa52
commit
a02832b59c
2 changed files with 9 additions and 0 deletions
|
|
@ -305,6 +305,7 @@ export class RequestListController extends Controller {
|
||||||
OR: [
|
OR: [
|
||||||
{ workStatus: RequestWorkStatus.Ready },
|
{ workStatus: RequestWorkStatus.Ready },
|
||||||
{
|
{
|
||||||
|
workStatus: { in: [RequestWorkStatus.Ready, RequestWorkStatus.InProgress] },
|
||||||
task: {
|
task: {
|
||||||
some: {
|
some: {
|
||||||
taskStatus: TaskStatus.Redo,
|
taskStatus: TaskStatus.Redo,
|
||||||
|
|
|
||||||
|
|
@ -421,6 +421,14 @@ export class TaskController extends Controller {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
await tx.requestWorkStepStatus.updateMany({
|
||||||
|
where: {
|
||||||
|
OR: body.taskList,
|
||||||
|
workStatus: RequestWorkStatus.Ready,
|
||||||
|
},
|
||||||
|
data: { workStatus: RequestWorkStatus.InProgress },
|
||||||
|
});
|
||||||
|
|
||||||
return await tx.taskOrder.update({
|
return await tx.taskOrder.update({
|
||||||
where: { id: taskOrderId },
|
where: { id: taskOrderId },
|
||||||
include: {
|
include: {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue