feat: approval,prevent create approvalRecords (#1272)
Reviewed-on: daoyoucloud/tachybase#1272 Co-authored-by: bai.zixv <bai.zixv@foxmail.com> Co-committed-by: bai.zixv <bai.zixv@foxmail.com>
This commit is contained in:
parent
aec7cc918c
commit
b470ac1b12
@ -276,5 +276,6 @@
|
|||||||
"\"Content-Type\" only support \"application/json\", and no need to specify": "\"Content-Type\" only support \"application/json\", and no need to specify",
|
"\"Content-Type\" only support \"application/json\", and no need to specify": "\"Content-Type\" only support \"application/json\", and no need to specify",
|
||||||
"concat": "concat",
|
"concat": "concat",
|
||||||
"ms": "ms",
|
"ms": "ms",
|
||||||
"reSubmit": "reSubmit"
|
"reSubmit": "reSubmit",
|
||||||
|
"Are you sure you want to resubmit it?": "Are you sure you want to resubmit it?"
|
||||||
}
|
}
|
||||||
|
@ -356,5 +356,7 @@
|
|||||||
"\"Content-Type\" only support \"application/json\", and no need to specify": "\"Content-Type\" 请求头仅支持 \"application/json\",无需填写",
|
"\"Content-Type\" only support \"application/json\", and no need to specify": "\"Content-Type\" 请求头仅支持 \"application/json\",无需填写",
|
||||||
"concat": "连接",
|
"concat": "连接",
|
||||||
"ms": "毫秒",
|
"ms": "毫秒",
|
||||||
"reSubmit": "重新提交"
|
"reSubmit": "重新提交",
|
||||||
|
"Are you sure you want to resubmit it?": "确定生成一份新的提交记录吗?"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -135,6 +135,10 @@ export default class ApprovalInstruction extends Instruction {
|
|||||||
except: ['data'],
|
except: ['data'],
|
||||||
});
|
});
|
||||||
const approvalExecution = approval.approvalExecutions.find((item) => item.executionId === processor.execution.id);
|
const approvalExecution = approval.approvalExecutions.find((item) => item.executionId === processor.execution.id);
|
||||||
|
// NOTE: 属于重新提交的情况时候, 不必进入待办列表, 应该由用户手动提交
|
||||||
|
if (approval.status === APPROVAL_STATUS.RESUBMIT) {
|
||||||
|
return job;
|
||||||
|
}
|
||||||
const RecordModel = db.getModel('approvalRecords');
|
const RecordModel = db.getModel('approvalRecords');
|
||||||
await RecordModel.bulkCreate(
|
await RecordModel.bulkCreate(
|
||||||
assignees.map((userId, index) => ({
|
assignees.map((userId, index) => ({
|
||||||
|
Loading…
Reference in New Issue
Block a user