7167-testToMaster_2414 #2244
|
@ -2802,7 +2802,7 @@ INSERT INTO `vn`.`packingSiteConfig` (`id`, `shinobiUrl`, `shinobiToken`, `shino
|
|||
INSERT INTO `util`.`notificationConfig`
|
||||
SET `id` = 1,
|
||||
`cleanDays` = 90;
|
||||
|
||||
TRUNCATE `util`.`notification`;
|
||||
INSERT INTO `util`.`notification` (`id`, `name`, `description`)
|
||||
VALUES
|
||||
(1, 'print-email', 'notification fixture one'),
|
||||
|
@ -2813,6 +2813,7 @@ INSERT INTO `util`.`notification` (`id`, `name`, `description`)
|
|||
(6, 'book-entry-deleted', 'accounting entries deleted'),
|
||||
(7, 'zone-included','An email to notify zoneCollisions');
|
||||
|
||||
TRUNCATE `util`.`notificationAcl`;
|
||||
INSERT INTO `util`.`notificationAcl` (`notificationFk`, `roleFk`)
|
||||
VALUES
|
||||
(1, 9),
|
||||
|
@ -2824,11 +2825,13 @@ INSERT INTO `util`.`notificationAcl` (`notificationFk`, `roleFk`)
|
|||
(6, 9),
|
||||
(7, 9);
|
||||
|
||||
TRUNCATE `util`.`notificationQueue`;
|
||||
INSERT INTO `util`.`notificationQueue` (`id`, `notificationFk`, `params`, `authorFk`, `status`, `created`)
|
||||
VALUES
|
||||
(1, 'print-email', '{"id": "1"}', 9, 'pending', util.VN_CURDATE()),
|
||||
(2, 'print-email', '{"id": "2"}', null, 'pending', util.VN_CURDATE()),
|
||||
(3, 'print-email', null, null, 'pending', util.VN_CURDATE());
|
||||
TRUNCATE `util`.`notificationSubscription`;
|
||||
|
||||
INSERT INTO `util`.`notificationSubscription` (`notificationFk`, `userFk`)
|
||||
VALUES
|
||||
|
|
|
@ -28,6 +28,7 @@ proc:BEGIN
|
|||
DECLARE vLockName VARCHAR(215);
|
||||
DECLARE vLockTime INT DEFAULT 15;
|
||||
DECLARE vFreeWagonFk INT;
|
||||
|
||||
DECLARE c1 CURSOR FOR
|
||||
SELECT ticketFk, `lines`, m3
|
||||
FROM tmp.productionBuffer
|
||||
|
@ -44,13 +45,21 @@ proc:BEGIN
|
|||
|
||||
DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE;
|
||||
|
||||
DECLARE EXIT HANDLER FOR SQLEXCEPTION
|
||||
BEGIN
|
||||
IF vLockName IS NOT NULL THEN
|
||||
DO RELEASE_LOCK(vLockName);
|
||||
END IF;
|
||||
|
||||
RESIGNAL;
|
||||
END;
|
||||
|
||||
SELECT pc.ticketTrolleyMax * o.numberOfWagons,
|
||||
pc.hasUniqueCollectionTime,
|
||||
w.code,
|
||||
o.warehouseFk,
|
||||
o.itemPackingTypeFk,
|
||||
st.code,
|
||||
CONCAT('collection_new', o.warehouseFk, ':',o.itemPackingTypeFk),
|
||||
o.numberOfWagons,
|
||||
o.trainFk,
|
||||
o.linesLimit,
|
||||
|
@ -61,7 +70,6 @@ proc:BEGIN
|
|||
vWarehouseFk,
|
||||
vItemPackingTypeFk,
|
||||
vStateFk,
|
||||
vLockName,
|
||||
vWagons,
|
||||
vTrainFk,
|
||||
vLinesLimit,
|
||||
|
@ -71,6 +79,12 @@ proc:BEGIN
|
|||
JOIN state st ON st.`code` = 'ON_PREPARATION'
|
||||
JOIN operator o ON o.workerFk = vUserFk;
|
||||
|
||||
SET vLockName = CONCAT_WS('/',
|
||||
'collection_new',
|
||||
vWarehouseFk,
|
||||
vItemPackingTypeFk
|
||||
);
|
||||
|
||||
IF NOT GET_LOCK(vLockName, vLockTime) THEN
|
||||
LEAVE proc;
|
||||
END IF;
|
||||
|
|
|
@ -14,7 +14,7 @@ class File {
|
|||
*/
|
||||
getPath(dmsUrl) {
|
||||
const serializedParams = this.$httpParamSerializer({
|
||||
access_token: this.vnToken.token
|
||||
access_token: this.vnToken.tokenMultimedia
|
||||
});
|
||||
|
||||
return `${dmsUrl}?${serializedParams}`;
|
||||
|
|
|
@ -15,7 +15,7 @@ class Report {
|
|||
*/
|
||||
show(path, params) {
|
||||
params = Object.assign({
|
||||
access_token: this.vnToken.token
|
||||
access_token: this.vnToken.tokenMultimedia
|
||||
}, params);
|
||||
const serializedParams = this.$httpParamSerializer(params);
|
||||
const query = serializedParams ? `?${serializedParams}` : '';
|
||||
|
|
|
@ -34,7 +34,8 @@ module.exports = Self => {
|
|||
http: {
|
||||
path: '/:id/claim-pickup-pdf',
|
||||
verb: 'GET'
|
||||
}
|
||||
},
|
||||
accessScopes: ['read:multimedia']
|
||||
});
|
||||
|
||||
Self.claimPickupPdf = (ctx, id) => Self.printReport(ctx, id, 'claim-pickup-order');
|
||||
|
|
|
@ -45,7 +45,8 @@ module.exports = Self => {
|
|||
http: {
|
||||
path: '/:id/campaign-metrics-pdf',
|
||||
verb: 'GET'
|
||||
}
|
||||
},
|
||||
accessScopes: ['read:multimedia']
|
||||
});
|
||||
|
||||
Self.campaignMetricsPdf = (ctx, id) => Self.printReport(ctx, id, 'campaign-metrics');
|
||||
|
|
|
@ -33,7 +33,8 @@ module.exports = Self => {
|
|||
http: {
|
||||
path: '/:id/entry-order-pdf',
|
||||
verb: 'GET'
|
||||
}
|
||||
},
|
||||
accessScopes: ['read:multimedia']
|
||||
});
|
||||
|
||||
Self.entryOrderPdf = (ctx, id) => Self.printReport(ctx, id, 'entry-order');
|
||||
|
|
|
@ -34,7 +34,8 @@ module.exports = Self => {
|
|||
http: {
|
||||
path: '/:reference/exportation-pdf',
|
||||
verb: 'GET'
|
||||
}
|
||||
},
|
||||
accessScopes: ['read:multimedia']
|
||||
});
|
||||
|
||||
Self.exportationPdf = (ctx, reference) => Self.printReport(ctx, reference, 'exportation');
|
||||
|
|
|
@ -37,7 +37,8 @@ module.exports = Self => {
|
|||
http: {
|
||||
path: '/:reference/invoice-csv',
|
||||
verb: 'GET'
|
||||
}
|
||||
},
|
||||
accessScopes: ['read:multimedia']
|
||||
});
|
||||
|
||||
Self.invoiceCsv = async reference => {
|
||||
|
|
|
@ -39,7 +39,8 @@ module.exports = Self => {
|
|||
http: {
|
||||
path: '/negativeBasesCsv',
|
||||
verb: 'GET'
|
||||
}
|
||||
},
|
||||
accessScopes: ['read:multimedia']
|
||||
});
|
||||
|
||||
Self.negativeBasesCsv = async(ctx, options) => {
|
||||
|
|
|
@ -44,7 +44,8 @@ module.exports = Self => {
|
|||
http: {
|
||||
path: '/:id/campaign-metrics-pdf',
|
||||
verb: 'GET'
|
||||
}
|
||||
},
|
||||
accessScopes: ['read:multimedia']
|
||||
});
|
||||
|
||||
Self.campaignMetricsPdf = (ctx, id) => Self.printReport(ctx, id, 'supplier-campaign-metrics');
|
||||
|
|
|
@ -37,7 +37,8 @@ module.exports = Self => {
|
|||
http: {
|
||||
path: '/:id/delivery-note-csv',
|
||||
verb: 'GET'
|
||||
}
|
||||
},
|
||||
accessScopes: ['read:multimedia']
|
||||
});
|
||||
|
||||
Self.deliveryNoteCsv = async id => {
|
||||
|
|
|
@ -41,7 +41,8 @@ module.exports = Self => {
|
|||
http: {
|
||||
path: '/:id/delivery-note-pdf',
|
||||
verb: 'GET'
|
||||
}
|
||||
},
|
||||
accessScopes: ['read:multimedia']
|
||||
});
|
||||
|
||||
Self.deliveryNotePdf = (ctx, id) => Self.printReport(ctx, id, 'delivery-note');
|
||||
|
|
|
@ -78,7 +78,8 @@ module.exports = Self => {
|
|||
http: {
|
||||
path: '/extra-community-pdf',
|
||||
verb: 'GET'
|
||||
}
|
||||
},
|
||||
accessScopes: ['read:multimedia']
|
||||
});
|
||||
|
||||
Self.extraCommunityPdf = ctx => Self.printReport(ctx, null, 'extra-community');
|
||||
|
|
|
@ -144,7 +144,7 @@ class Controller extends Section {
|
|||
const currentFilter = this.$.model.currentFilter;
|
||||
|
||||
return Object.assign({
|
||||
authorization: this.vnToken.token,
|
||||
authorization: this.vnToken.tokenMultimedia,
|
||||
filter: currentFilter
|
||||
}, userParams);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue