feat: auto update to validate status
This commit is contained in:
parent
6002b6b1a7
commit
dfdeba7530
1 changed files with 12 additions and 0 deletions
|
|
@ -485,6 +485,18 @@ export class TaskActionController extends Controller {
|
|||
if (!record) throw notFoundError("Task Order");
|
||||
|
||||
await prisma.$transaction([
|
||||
prisma.requestWorkStepStatus.updateMany({
|
||||
where: {
|
||||
task: {
|
||||
some: {
|
||||
taskOrderId: taskOrderId,
|
||||
taskStatus: TaskStatus.Success,
|
||||
requestWorkStep: { responsibleUserId: submitUserId },
|
||||
},
|
||||
},
|
||||
},
|
||||
data: { workStatus: RequestWorkStatus.Validate },
|
||||
}),
|
||||
prisma.task.updateMany({
|
||||
where: {
|
||||
taskOrderId: taskOrderId,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue