7806_devToTest_2332 #2801
|
@ -24,7 +24,7 @@ module.exports = Self => {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const options = {transaction: tx, userId: ctx.req.accessToken.userId};
|
const options = {transaction: tx, userId: ctx.req.accessToken.userId};
|
||||||
const files = await Self.rawSql('SELECT name, checksum, keyValue FROM edi.fileConfig', null, options);
|
const files = await Self.rawSql('SELECT name, checksum, keyValue FROM edi.fileMultiConfig', null, options);
|
||||||
|
|
||||||
const updatableFiles = [];
|
const updatableFiles = [];
|
||||||
for (const file of files) {
|
for (const file of files) {
|
||||||
|
@ -54,7 +54,7 @@ module.exports = Self => {
|
||||||
|
|
||||||
const tables = await Self.rawSql(`
|
const tables = await Self.rawSql(`
|
||||||
SELECT fileName, toTable, file
|
SELECT fileName, toTable, file
|
||||||
FROM edi.tableConfig
|
FROM edi.tableMultiConfig
|
||||||
WHERE file IN (?)`, [fileNames], options);
|
WHERE file IN (?)`, [fileNames], options);
|
||||||
|
|
||||||
for (const table of tables) {
|
for (const table of tables) {
|
||||||
|
@ -85,7 +85,7 @@ module.exports = Self => {
|
||||||
for (const file of updatableFiles) {
|
for (const file of updatableFiles) {
|
||||||
console.log(`Updating file ${file.name} checksum...`);
|
console.log(`Updating file ${file.name} checksum...`);
|
||||||
await Self.rawSql(`
|
await Self.rawSql(`
|
||||||
UPDATE edi.fileConfig
|
UPDATE edi.fileMultiConfig
|
||||||
SET checksum = ?
|
SET checksum = ?
|
||||||
WHERE name = ?`,
|
WHERE name = ?`,
|
||||||
[file.checksum, file.name], options);
|
[file.checksum, file.name], options);
|
||||||
|
@ -228,7 +228,7 @@ module.exports = Self => {
|
||||||
|
|
||||||
await Self.rawSql(sqlTemplate, [filePath], options);
|
await Self.rawSql(sqlTemplate, [filePath], options);
|
||||||
await Self.rawSql(`
|
await Self.rawSql(`
|
||||||
UPDATE edi.tableConfig
|
UPDATE edi.tableMultiConfig
|
||||||
SET updated = ?
|
SET updated = ?
|
||||||
WHERE fileName = ?
|
WHERE fileName = ?
|
||||||
`, [Date.vnNew(), baseName], options);
|
`, [Date.vnNew(), baseName], options);
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"base": "VnModel",
|
"base": "VnModel",
|
||||||
"options": {
|
"options": {
|
||||||
"mysql": {
|
"mysql": {
|
||||||
"table": "userConfig"
|
"table": "userMultiConfig"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"properties": {
|
"properties": {
|
||||||
|
|
|
@ -1968,7 +1968,7 @@ INSERT INTO `vn`.`orderTicket`(`orderFk`, `ticketFk`)
|
||||||
(21, 21),
|
(21, 21),
|
||||||
(22, 22);
|
(22, 22);
|
||||||
|
|
||||||
INSERT INTO `vn`.`userConfig` (`userFk`, `warehouseFk`, `companyFk`)
|
INSERT INTO `vn`.`userMultiConfig` (`userFk`, `warehouseFk`, `companyFk`)
|
||||||
VALUES
|
VALUES
|
||||||
(1, 1, 69),
|
(1, 1, 69),
|
||||||
(5, 1, 442),
|
(5, 1, 442),
|
||||||
|
|
|
@ -10,5 +10,5 @@ AS SELECT `q`.`name` AS `name`,
|
||||||
`c`.`ringInUse` AS `ringinuse`
|
`c`.`ringInUse` AS `ringinuse`
|
||||||
FROM (
|
FROM (
|
||||||
`pbx`.`queue` `q`
|
`pbx`.`queue` `q`
|
||||||
JOIN `pbx`.`queueConfig` `c` ON(`q`.`config` = `c`.`id`)
|
JOIN `pbx`.`queueMultiConfig` `c` ON(`q`.`config` = `c`.`id`)
|
||||||
)
|
)
|
||||||
|
|
|
@ -7,7 +7,7 @@ DECLARE vCompanyFk INT;
|
||||||
SELECT IFNULL(uc.companyFk, rc.defaultCompanyFk)
|
SELECT IFNULL(uc.companyFk, rc.defaultCompanyFk)
|
||||||
INTO vCompanyFk
|
INTO vCompanyFk
|
||||||
FROM vn.routeConfig rc
|
FROM vn.routeConfig rc
|
||||||
LEFT JOIN userConfig uc ON uc.userFk = workerFk;
|
LEFT JOIN userMultiConfig uc ON uc.userFk = workerFk;
|
||||||
|
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
|
|
|
@ -216,7 +216,7 @@ BEGIN
|
||||||
i.transactionTypeSageFk,
|
i.transactionTypeSageFk,
|
||||||
@vTaxCodeGeneral := i.taxClassCodeFk
|
@vTaxCodeGeneral := i.taxClassCodeFk
|
||||||
FROM tmp.ticketServiceTax tst
|
FROM tmp.ticketServiceTax tst
|
||||||
JOIN invoiceOutTaxConfig i ON i.taxClassCodeFk = tst.code
|
JOIN invoiceOutTaxMultiConfig i ON i.taxClassCodeFk = tst.code
|
||||||
WHERE i.isService
|
WHERE i.isService
|
||||||
HAVING taxableBase
|
HAVING taxableBase
|
||||||
) sub;
|
) sub;
|
||||||
|
@ -229,7 +229,7 @@ BEGIN
|
||||||
i.taxTypeSageFk ,
|
i.taxTypeSageFk ,
|
||||||
i.transactionTypeSageFk
|
i.transactionTypeSageFk
|
||||||
FROM tmp.ticketTax tt
|
FROM tmp.ticketTax tt
|
||||||
JOIN invoiceOutTaxConfig i ON i.taxClassCodeFk = tt.code
|
JOIN invoiceOutTaxMultiConfig i ON i.taxClassCodeFk = tt.code
|
||||||
WHERE !i.isService
|
WHERE !i.isService
|
||||||
GROUP BY tt.pgcFk
|
GROUP BY tt.pgcFk
|
||||||
HAVING taxableBase
|
HAVING taxableBase
|
||||||
|
|
|
@ -42,7 +42,7 @@ BEGIN
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
SELECT warehouseFk INTO vWarehouseFk
|
SELECT warehouseFk INTO vWarehouseFk
|
||||||
FROM userConfig
|
FROM userMultiConfig
|
||||||
WHERE userFk = account.myUser_getId();
|
WHERE userFk = account.myUser_getId();
|
||||||
|
|
||||||
IF NOT vWarehouseFk OR vWarehouseFk IS NULL THEN
|
IF NOT vWarehouseFk OR vWarehouseFk IS NULL THEN
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
RENAME TABLE hedera.shelfConfig TO hedera.shelfMultiConfig ;
|
||||||
|
RENAME TABLE pbx.queueConfig TO pbx.queueMultiConfig ;
|
||||||
|
RENAME TABLE salix.defaultViewConfig TO salix.defaultViewMultiConfig;
|
||||||
|
RENAME TABLE edi.fileConfig TO edi.fileMultiConfig;
|
||||||
|
RENAME TABLE edi.imapConfig TO edi.imapMultiConfig;
|
||||||
|
RENAME TABLE edi.tableConfig TO edi.tableMultiConfig;
|
||||||
|
RENAME TABLE vn.invoiceOutTaxConfig TO vn.invoiceOutTaxMultiConfig;
|
||||||
|
RENAME TABLE vn.userConfig TO vn.userMultiConfig;
|
||||||
|
RENAME TABLE vn.conveyorConfig TO vn.conveyorMultiConfig;
|
||||||
|
|
||||||
|
GRANT SELECT ON TABLE hedera.shelfMultiConfig TO employee;
|
|
@ -48,7 +48,7 @@ module.exports = Self => {
|
||||||
LEFT JOIN vn.expeditionStateType est ON est.id = e.stateTypeFk
|
LEFT JOIN vn.expeditionStateType est ON est.id = e.stateTypeFk
|
||||||
JOIN vn.agencyMode am ON am.id = r.agencyModeFk
|
JOIN vn.agencyMode am ON am.id = r.agencyModeFk
|
||||||
JOIN vn.agency ag ON ag.id = am.agencyFk
|
JOIN vn.agency ag ON ag.id = am.agencyFk
|
||||||
LEFT JOIN vn.userConfig uc ON uc.userFk = account.myUser_getId()
|
LEFT JOIN vn.userMultiConfig uc ON uc.userFk = account.myUser_getId()
|
||||||
WHERE t.routeFk = ?
|
WHERE t.routeFk = ?
|
||||||
GROUP BY t.addressFk, e.itemPackingTypeFk
|
GROUP BY t.addressFk, e.itemPackingTypeFk
|
||||||
) sub
|
) sub
|
||||||
|
|
|
@ -42,7 +42,7 @@ fixtures:
|
||||||
- ACL
|
- ACL
|
||||||
- fieldAcl
|
- fieldAcl
|
||||||
- module
|
- module
|
||||||
- defaultViewConfig
|
- defaultViewMultiConfig
|
||||||
vn:
|
vn:
|
||||||
- alertLevel
|
- alertLevel
|
||||||
- bookingPlanner
|
- bookingPlanner
|
||||||
|
@ -363,7 +363,7 @@ localFixtures:
|
||||||
- travelConfig
|
- travelConfig
|
||||||
- travelRecalc
|
- travelRecalc
|
||||||
- travelThermograph
|
- travelThermograph
|
||||||
- userConfig
|
- userMultiConfig
|
||||||
- vehicle
|
- vehicle
|
||||||
- wagonConfig
|
- wagonConfig
|
||||||
- wagonType
|
- wagonType
|
||||||
|
|
Loading…
Reference in New Issue