|
@@ -84,7 +84,7 @@ async function InsertAllDepartment(departList){
|
|
|
let flattenedParams = rowData.flat();
|
|
|
|
|
|
let syncDepartSQL = `
|
|
|
- INSERT INTO "Department" ("objectId", "organizationCode", "name", "description","branch","parent","code","createdAt","updatedAt")
|
|
|
+ INSERT INTO "Department" ("objectId", "organizationCode", "name", "description","branch","parent","code","createdAt","updatedAt","status")
|
|
|
VALUES
|
|
|
${rowData.map((_, i) => `($${i * 10 + 1}, $${i * 10 + 2}, $${i * 10 + 3}, $${i * 10 + 4}, $${i * 10 + 5}, $${i * 10 + 6}, $${i * 10 + 7}, $${i * 10 + 8}, $${i * 10 + 9}, $${i * 10 + 10})`).join(',\n')}
|
|
|
ON CONFLICT ("objectId") DO UPDATE
|