7806_devToTest_2332 #2801
|
@ -24,7 +24,7 @@ module.exports = Self => {
|
|||
|
||||
try {
|
||||
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 = [];
|
||||
for (const file of files) {
|
||||
|
@ -54,7 +54,7 @@ module.exports = Self => {
|
|||
|
||||
const tables = await Self.rawSql(`
|
||||
SELECT fileName, toTable, file
|
||||
FROM edi.tableConfig
|
||||
FROM edi.tableMultiConfig
|
||||
WHERE file IN (?)`, [fileNames], options);
|
||||
|
||||
for (const table of tables) {
|
||||
|
@ -85,9 +85,9 @@ module.exports = Self => {
|
|||
for (const file of updatableFiles) {
|
||||
console.log(`Updating file ${file.name} checksum...`);
|
||||
await Self.rawSql(`
|
||||
UPDATE edi.fileConfig
|
||||
SET checksum = ?
|
||||
WHERE name = ?`,
|
||||
UPDATE edi.fileMultiConfig
|
||||
SET checksum = ?
|
||||
WHERE name = ?`,
|
||||
[file.checksum, file.name], options);
|
||||
}
|
||||
|
||||
|
@ -228,7 +228,7 @@ module.exports = Self => {
|
|||
|
||||
await Self.rawSql(sqlTemplate, [filePath], options);
|
||||
await Self.rawSql(`
|
||||
UPDATE edi.tableConfig
|
||||
UPDATE edi.tableMultiConfig
|
||||
SET updated = ?
|
||||
WHERE fileName = ?
|
||||
`, [Date.vnNew(), baseName], options);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"base": "VnModel",
|
||||
"options": {
|
||||
"mysql": {
|
||||
"table": "userConfig"
|
||||
"table": "userMultiConfig"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
|
|
|
@ -1968,7 +1968,7 @@ INSERT INTO `vn`.`orderTicket`(`orderFk`, `ticketFk`)
|
|||
(21, 21),
|
||||
(22, 22);
|
||||
|
||||
INSERT INTO `vn`.`userConfig` (`userFk`, `warehouseFk`, `companyFk`)
|
||||
INSERT INTO `vn`.`userMultiConfig` (`userFk`, `warehouseFk`, `companyFk`)
|
||||
VALUES
|
||||
(1, 1, 69),
|
||||
(5, 1, 442),
|
||||
|
|
|
@ -10,5 +10,5 @@ AS SELECT `q`.`name` AS `name`,
|
|||
`c`.`ringInUse` AS `ringinuse`
|
||||
FROM (
|
||||
`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)
|
||||
INTO vCompanyFk
|
||||
FROM vn.routeConfig rc
|
||||
LEFT JOIN userConfig uc ON uc.userFk = workerFk;
|
||||
LEFT JOIN userMultiConfig uc ON uc.userFk = workerFk;
|
||||
|
||||
|
||||
SELECT
|
||||
|
|
|
@ -216,7 +216,7 @@ BEGIN
|
|||
i.transactionTypeSageFk,
|
||||
@vTaxCodeGeneral := i.taxClassCodeFk
|
||||
FROM tmp.ticketServiceTax tst
|
||||
JOIN invoiceOutTaxConfig i ON i.taxClassCodeFk = tst.code
|
||||
JOIN invoiceOutTaxMultiConfig i ON i.taxClassCodeFk = tst.code
|
||||
WHERE i.isService
|
||||
HAVING taxableBase
|
||||
) sub;
|
||||
|
@ -229,7 +229,7 @@ BEGIN
|
|||
i.taxTypeSageFk ,
|
||||
i.transactionTypeSageFk
|
||||
FROM tmp.ticketTax tt
|
||||
JOIN invoiceOutTaxConfig i ON i.taxClassCodeFk = tt.code
|
||||
JOIN invoiceOutTaxMultiConfig i ON i.taxClassCodeFk = tt.code
|
||||
WHERE !i.isService
|
||||
GROUP BY tt.pgcFk
|
||||
HAVING taxableBase
|
||||
|
|
|
@ -42,7 +42,7 @@ BEGIN
|
|||
END IF;
|
||||
|
||||
SELECT warehouseFk INTO vWarehouseFk
|
||||
FROM userConfig
|
||||
FROM userMultiConfig
|
||||
WHERE userFk = account.myUser_getId();
|
||||
|
||||
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
|
||||
JOIN vn.agencyMode am ON am.id = r.agencyModeFk
|
||||
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 = ?
|
||||
GROUP BY t.addressFk, e.itemPackingTypeFk
|
||||
) sub
|
||||
|
|
|
@ -42,7 +42,7 @@ fixtures:
|
|||
- ACL
|
||||
- fieldAcl
|
||||
- module
|
||||
- defaultViewConfig
|
||||
- defaultViewMultiConfig
|
||||
vn:
|
||||
- alertLevel
|
||||
- bookingPlanner
|
||||
|
@ -363,7 +363,7 @@ localFixtures:
|
|||
- travelConfig
|
||||
- travelRecalc
|
||||
- travelThermograph
|
||||
- userConfig
|
||||
- userMultiConfig
|
||||
- vehicle
|
||||
- wagonConfig
|
||||
- wagonType
|
||||
|
|
Loading…
Reference in New Issue