fix: wrong code gen (gen one instead of bulk)
This commit is contained in:
parent
d67303d5cc
commit
3a978e16de
1 changed files with 4 additions and 4 deletions
|
|
@ -188,13 +188,13 @@ export class QuotationPayment extends Controller {
|
|||
},
|
||||
create: {
|
||||
key: `REQUEST_${year}${month}`,
|
||||
value: 1,
|
||||
value: quotation.worker.length,
|
||||
},
|
||||
update: { value: { increment: 1 } },
|
||||
update: { value: { increment: quotation.worker.length } },
|
||||
});
|
||||
return {
|
||||
create: quotation.worker.map((v) => ({
|
||||
code: `TR${year}${month}${lastRequest.value.toString().padStart(6, "0")}`,
|
||||
create: quotation.worker.map((v, i) => ({
|
||||
code: `TR${year}${month}${(lastRequest.value - quotation.worker.length + i + 1).toString().padStart(6, "0")}`,
|
||||
employeeId: v.employeeId,
|
||||
requestWork: {
|
||||
create: quotation.productServiceList.flatMap((item) =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue