Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 7195_roadmaps
This commit is contained in:
commit
f70605e565
|
@ -57,14 +57,14 @@ module.exports = Self => {
|
|||
DATE_FORMAT(t.shipped, '%d/%m/%Y') created,
|
||||
t.shipped,
|
||||
CONCAT( e.ticketFk, LPAD(e.counter, mc.counterWidth, '0')) reference,
|
||||
LPAD(IF(mw.params IS NULL, ms.serviceType, mw.serviceType), mc.serviceTypeWidth,'0') serviceType,
|
||||
LPAD(IF(mw.serviceType IS NULL, ms.serviceType, mw.serviceType), mc.serviceTypeWidth,'0') serviceType,
|
||||
IF(mw.weekdays, 'S', 'N') weekDays,
|
||||
oa.description deliveryObservation
|
||||
FROM expedition e
|
||||
JOIN ticket t ON e.ticketFk = t.id
|
||||
JOIN agencyMode am ON am.id = t.agencyModeFk
|
||||
JOIN mrwService ms ON ms.agencyModeCodeFk = am.code
|
||||
LEFT JOIN mrwServiceWeekday mw ON mw.weekdays = DATE_FORMAT(t.shipped, '%a')
|
||||
LEFT JOIN mrwServiceWeekday mw ON mw.weekdays | 1 << WEEKDAY(t.landed)
|
||||
JOIN client c ON t.clientFk = c.id
|
||||
JOIN address a ON t.addressFk = a.id
|
||||
LEFT JOIN addressObservation oa ON oa.addressFk = a.id
|
||||
|
|
|
@ -129,7 +129,7 @@ INSERT INTO vn.itemShelving (id,itemFk,visible,shelvingFk,`grouping`,packing,pac
|
|||
INSERT INTO vn.beach (code,warehouseFk) VALUES
|
||||
('TEST',1);
|
||||
|
||||
INSERT INTO vn.routesMonitor (routeFk,name,beachFk,m3,expeditionTruckFk) VALUES
|
||||
INSERT INTO vn.routesMonitor (routeFk,name,beachFk,m3,roadmapStopFk) VALUES
|
||||
(1,'TEST','TEST',1.0,1);
|
||||
/* #5483
|
||||
INSERT INTO vn.ticket (clientFk, warehouseFk, shipped, nickname, refFk, addressFk, workerFk, observations, isSigned, isLabeled, isPrinted, packages, location, `hour`, created, isBlocked, solution, routeFk, priority, hasPriority, companyFk, agencyModeFk, landed, isBoxed, isDeleted, zoneFk, zonePrice, zoneBonus, totalWithVat, totalWithoutVat, weight)
|
||||
|
|
|
@ -46,7 +46,7 @@ BEGIN
|
|||
JOIN vn.address a ON a.id = t.addressFk
|
||||
JOIN vn.province p ON p.id = a.provinceFk
|
||||
LEFT JOIN vn.routesMonitor rm ON rm.routeFk = t.routeFk
|
||||
LEFT JOIN vn.roadmapStop rs ON rs.id = rm.expeditionTruckFk
|
||||
LEFT JOIN vn.roadmapStop rs ON rs.id = rm.roadmapStopFk
|
||||
LEFT JOIN vn.beach b ON b.code = rm.beachFk
|
||||
LEFT JOIN vn.`zone`z ON z.id = t.zoneFk
|
||||
JOIN vn.agencyMode am ON t.agencyModeFk = am.id
|
||||
|
|
|
@ -22,7 +22,7 @@ BEGIN
|
|||
LEFT JOIN vn.route r ON r.id = t.routeFk
|
||||
LEFT JOIN vn.agencyMode am ON am.id = r.agencyModeFk
|
||||
LEFT JOIN vn.routesMonitor rm ON t.routeFk = rm.routeFk
|
||||
LEFT JOIN vn.roadmapStop rs ON rm.expeditionTruckFk = rs.id
|
||||
LEFT JOIN vn.roadmapStop rs ON rm.roadmapStopFk = rs.id
|
||||
WHERE e.id = vExpeditionFk;
|
||||
|
||||
RETURN vDayMinute;
|
||||
|
|
|
@ -34,7 +34,7 @@ FROM (
|
|||
)
|
||||
LEFT JOIN `vn`.`routesMonitor` `rm` ON(`t`.`routeFk` = `rm`.`routeFk`)
|
||||
)
|
||||
LEFT JOIN `vn`.`roadmapStop` `rs` ON(`rm`.`expeditionTruckFk` = `rs`.`id`)
|
||||
LEFT JOIN `vn`.`roadmapStop` `rs` ON(`rm`.`roadmapStopFk` = `rs`.`id`)
|
||||
)
|
||||
LEFT JOIN `vn`.`zone` `z` ON(`z`.`id` = `t`.`zoneFk`)
|
||||
)
|
||||
|
|
|
@ -45,7 +45,7 @@ FROM (
|
|||
)
|
||||
LEFT JOIN `vn`.`routesMonitor` `rm` ON(`t`.`routeFk` = `rm`.`routeFk`)
|
||||
)
|
||||
LEFT JOIN `vn`.`roadmapStop` `rs` ON(`rm`.`expeditionTruckFk` = `rs`.`id`)
|
||||
LEFT JOIN `vn`.`roadmapStop` `rs` ON(`rm`.`roadmapStopFk` = `rs`.`id`)
|
||||
)
|
||||
JOIN `srt`.`config` `c`
|
||||
)
|
||||
|
|
|
@ -32,7 +32,7 @@ FROM (
|
|||
)
|
||||
LEFT JOIN `vn`.`routesMonitor` `rm` ON(`t`.`routeFk` = `rm`.`routeFk`)
|
||||
)
|
||||
LEFT JOIN `vn`.`roadmapStop` `rs` ON(`rm`.`expeditionTruckFk` = `rs`.`id`)
|
||||
LEFT JOIN `vn`.`roadmapStop` `rs` ON(`rm`.`roadmapStopFk` = `rs`.`id`)
|
||||
)
|
||||
JOIN `dipole`.`expedition_PrintOut` `epo` ON(`epo`.`expeditionFk` = `e`.`id`)
|
||||
)
|
||||
|
|
|
@ -34,7 +34,7 @@ BEGIN
|
|||
LEFT JOIN vn.agencyMode am ON am.id = z.agencyModeFk
|
||||
LEFT JOIN vn.agency a ON a.id = am.agencyFk
|
||||
LEFT JOIN vn.routesMonitor rm ON rm.routeFk = t.routeFk
|
||||
LEFT JOIN vn.roadmapStop rs ON rs.id = rm.expeditionTruckFk
|
||||
LEFT JOIN vn.roadmapStop rs ON rs.id = rm.roadmapStopFk
|
||||
JOIN vn.packagingConfig pc
|
||||
WHERE t.warehouseFk IN (60,1,44)
|
||||
AND e.created BETWEEN vStarted AND vEnded
|
||||
|
|
|
@ -56,13 +56,13 @@ BEGIN
|
|||
LIMIT 1;
|
||||
|
||||
IF vPalletFk IS NULL THEN
|
||||
SELECT expeditionTruckFk
|
||||
SELECT roadmapStopFk
|
||||
INTO vTruckFk
|
||||
FROM (
|
||||
SELECT rm.expeditionTruckFk, count(*) n
|
||||
SELECT rm.roadmapStopFk, count(*) n
|
||||
FROM vn.routesMonitor rm
|
||||
JOIN tExpedition e ON e.routeFk = rm.routeFk
|
||||
GROUP BY expeditionTruckFk
|
||||
GROUP BY roadmapStopFk
|
||||
ORDER BY n DESC
|
||||
LIMIT 1) sub;
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ BEGIN
|
|||
LEFT JOIN vn.route r ON r.id = t.routeFk
|
||||
LEFT JOIN vn.agencyMode am ON am.id = r.agencyModeFk
|
||||
LEFT JOIN vn.routesMonitor rm ON rm.routeFk = r.id
|
||||
LEFT JOIN vn.roadmapStop rs ON rs.id = rm.expeditionTruckFk
|
||||
LEFT JOIN vn.roadmapStop rs ON rs.id = rm.roadmapStopFk
|
||||
WHERE e.id = vExpeditionFk;
|
||||
|
||||
END$$
|
||||
|
|
|
@ -50,7 +50,7 @@ BEGIN
|
|||
LEFT JOIN vn.route r ON r.id = t.routeFk
|
||||
LEFT JOIN vn.agencyMode am ON am.id = r.agencyModeFk
|
||||
LEFT JOIN vn.routesMonitor rm ON rm.routeFk = r.id
|
||||
LEFT JOIN vn.roadmapStop rs ON rs.id = rm.expeditionTruckFk
|
||||
LEFT JOIN vn.roadmapStop rs ON rs.id = rm.roadmapStopFk
|
||||
WHERE e.id = vExpeditionFk;
|
||||
|
||||
END$$
|
||||
|
|
|
@ -47,7 +47,7 @@ BEGIN
|
|||
LEFT JOIN ticketTrolley tt ON tt.ticket = t.id
|
||||
LEFT JOIN zone zo ON t.zoneFk = zo.id
|
||||
LEFT JOIN routesMonitor rm ON rm.routeFk = t.routeFk
|
||||
LEFT JOIN roadmapStop rs ON rs.id = rm.expeditionTruckFk
|
||||
LEFT JOIN roadmapStop rs ON rs.id = rm.roadmapStopFk
|
||||
WHERE IF(vIsCollection, tc.collectionFk = vParam, tc.ticketFk = vParam)
|
||||
GROUP BY t.id
|
||||
ORDER BY cc.code;
|
||||
|
|
|
@ -106,7 +106,7 @@ BEGIN
|
|||
SET rm.m3boxes = sub.m3boxes;
|
||||
|
||||
UPDATE routesMonitor rm
|
||||
JOIN vn.roadmapStop rs ON rs.id = rm.expeditionTruckFk
|
||||
JOIN vn.roadmapStop rs ON rs.id = rm.roadmapStopFk
|
||||
SET rm.etd = rs.eta;
|
||||
|
||||
DROP TEMPORARY TABLE tmp.routesMonitor;
|
||||
|
|
|
@ -8,7 +8,7 @@ AS SELECT `rs`.`id` AS `truckFk`,
|
|||
`t`.`routeFk` AS `routeFk`,
|
||||
`es`.`id` AS `scanFk`,
|
||||
`e`.`id` AS `expeditionFk`,
|
||||
`r`.`expeditionTruckFk` AS `expeditionTruckFk`,
|
||||
`r`.`roadmapStopFk` AS `roadmapStopFk`,
|
||||
`t`.`warehouseFk` AS `warehouseFk`,
|
||||
`e`.`created` AS `lastPacked`,
|
||||
`t`.`id` AS `ticketFk`
|
||||
|
@ -18,7 +18,7 @@ FROM (
|
|||
(
|
||||
(
|
||||
`vn`.`roadmapStop` `rs`
|
||||
LEFT JOIN `vn`.`routesMonitor` `r` ON(`rs`.`id` = `r`.`expeditionTruckFk`)
|
||||
LEFT JOIN `vn`.`routesMonitor` `r` ON(`rs`.`id` = `r`.`roadmapStopFk`)
|
||||
)
|
||||
LEFT JOIN `vn`.`ticket` `t` ON(`r`.`routeFk` = `t`.`routeFk`)
|
||||
)
|
||||
|
|
|
@ -6,7 +6,7 @@ AS SELECT `rs2`.`description` AS `truck`,
|
|||
`r`.`description` AS `zone`,
|
||||
COUNT(`es`.`id`) AS `eti`,
|
||||
`ep`.`id` AS `palletFk`,
|
||||
`rs`.`id` <=> `rm`.`expeditionTruckFk` AS `isMatch`,
|
||||
`rs`.`id` <=> `rm`.`roadmapStopFk` AS `isMatch`,
|
||||
`t`.`warehouseFk` AS `warehouseFk`,
|
||||
IF(
|
||||
`r`.`created` > `util`.`VN_CURDATE`() + INTERVAL 1 DAY,
|
||||
|
@ -33,7 +33,7 @@ FROM (
|
|||
)
|
||||
LEFT JOIN `vn`.`routesMonitor` `rm` ON(`rm`.`routeFk` = `r`.`id`)
|
||||
)
|
||||
LEFT JOIN `vn`.`roadmapStop` `rs2` ON(`rs2`.`id` = `rm`.`expeditionTruckFk`)
|
||||
LEFT JOIN `vn`.`roadmapStop` `rs2` ON(`rs2`.`id` = `rm`.`roadmapStopFk`)
|
||||
)
|
||||
GROUP BY `ep`.`id`,
|
||||
`t`.`routeFk`
|
||||
|
|
|
@ -15,7 +15,7 @@ FROM (
|
|||
`vn`.`route` `r`
|
||||
LEFT JOIN `vn`.`routesMonitor` `rm` ON(`r`.`id` = `rm`.`routeFk`)
|
||||
)
|
||||
LEFT JOIN `vn`.`roadmapStop` `rs` ON(`rs`.`id` = `rm`.`expeditionTruckFk`)
|
||||
LEFT JOIN `vn`.`roadmapStop` `rs` ON(`rs`.`id` = `rm`.`roadmapStopFk`)
|
||||
)
|
||||
JOIN `vn`.`ticket` `t` ON(`t`.`routeFk` = `r`.`id`)
|
||||
)
|
||||
|
|
|
@ -45,7 +45,7 @@ FROM (
|
|||
)
|
||||
LEFT JOIN `vn`.`routesMonitor` `rm` ON(`rm`.`routeFk` = `t`.`routeFk`)
|
||||
)
|
||||
LEFT JOIN `vn`.`roadmapStop` `rs` ON(`rs`.`id` = `rm`.`expeditionTruckFk`)
|
||||
LEFT JOIN `vn`.`roadmapStop` `rs` ON(`rs`.`id` = `rm`.`roadmapStopFk`)
|
||||
)
|
||||
LEFT JOIN `vn`.`beach` `b` ON(`b`.`code` = `rm`.`beachFk`)
|
||||
)
|
||||
|
|
|
@ -13,7 +13,7 @@ FROM (
|
|||
)
|
||||
JOIN `vn`.`routesMonitor` `rm` ON(`rm`.`routeFk` = `t`.`routeFk`)
|
||||
)
|
||||
JOIN `vn`.`roadmapStop` `rs` ON(`rs`.`id` = `rm`.`expeditionTruckFk`)
|
||||
JOIN `vn`.`roadmapStop` `rs` ON(`rs`.`id` = `rm`.`roadmapStopFk`)
|
||||
)
|
||||
WHERE `e`.`id` IS NULL
|
||||
AND `rs`.`eta` > `util`.`VN_CURDATE`()
|
||||
|
|
|
@ -11,9 +11,9 @@ AS SELECT `e`.`truckFk` AS `id`,
|
|||
COUNT(DISTINCT `e`.`routeFk`) AS `routes`,
|
||||
COUNT(DISTINCT `e`.`scanFk`) AS `scans`,
|
||||
COUNT(DISTINCT `e`.`expeditionFk`) AS `expeditions`,
|
||||
sum(`e`.`truckFk` <> `e`.`expeditionTruckFk`) AS `fallos`,
|
||||
sum(`e`.`truckFk` <> `e`.`roadmapStopFk`) AS `fallos`,
|
||||
max(`e`.`lastPacked`) AS `lastPacked`
|
||||
FROM `vn`.`expeditionCommon` `e`
|
||||
GROUP BY `e`.`truckFk`
|
||||
ORDER BY sum(`e`.`truckFk` <> `e`.`expeditionTruckFk`) DESC,
|
||||
ORDER BY sum(`e`.`truckFk` <> `e`.`roadmapStopFk`) DESC,
|
||||
`e`.`eta`
|
||||
|
|
|
@ -7,12 +7,12 @@ AS SELECT `e`.`truckFk` AS `id`,
|
|||
`e`.`palletFk` AS `pallet`,
|
||||
COUNT(DISTINCT `e`.`routeFk`) AS `routes`,
|
||||
COUNT(DISTINCT `e`.`scanFk`) AS `scans`,
|
||||
COUNT(DISTINCT `e`.`expeditionTruckFk`) AS `destinos`,
|
||||
sum(`e`.`truckFk` <> `e`.`expeditionTruckFk`) AS `fallos`,
|
||||
COUNT(DISTINCT `e`.`roadmapStopFk`) AS `destinos`,
|
||||
sum(`e`.`truckFk` <> `e`.`roadmapStopFk`) AS `fallos`,
|
||||
max(`e`.`lastPacked`) AS `lastPacked`
|
||||
FROM `vn`.`expeditionCommon` `e`
|
||||
GROUP BY `e`.`truckFk`,
|
||||
`e`.`palletFk`
|
||||
ORDER BY sum(`e`.`truckFk` <> `e`.`expeditionTruckFk`) DESC,
|
||||
ORDER BY sum(`e`.`truckFk` <> `e`.`roadmapStopFk`) DESC,
|
||||
`e`.`eta`,
|
||||
`e`.`truckFk`
|
||||
|
|
|
@ -8,15 +8,15 @@ AS SELECT `e`.`truckFk` AS `id`,
|
|||
`e`.`routeFk` AS `route`,
|
||||
COUNT(DISTINCT `e`.`scanFk`) AS `scans`,
|
||||
`rs`.`description` AS `destinos`,
|
||||
sum(`e`.`truckFk` <> `e`.`expeditionTruckFk`) AS `fallos`,
|
||||
`e`.`expeditionTruckFk` AS `expeditionTruckFk`,
|
||||
max(`e`.`lastPacked`) AS `lastPacked`
|
||||
SUM(`e`.`truckFk` <> `e`.`roadmapStopFk`) AS `fallos`,
|
||||
`e`.`roadmapStopFk` AS `roadmapStopFk`,
|
||||
MAX(`e`.`lastPacked`) AS `lastPacked`
|
||||
FROM (
|
||||
`vn`.`expeditionCommon` `e`
|
||||
LEFT JOIN `vn`.`roadmapStop` `rs` ON(`rs`.`id` = `e`.`expeditionTruckFk`)
|
||||
LEFT JOIN `vn`.`roadmapStop` `rs` ON(`rs`.`id` = `e`.`roadmapStopFk`)
|
||||
)
|
||||
GROUP BY `e`.`truckFk`,
|
||||
`e`.`palletFk`,
|
||||
`e`.`routeFk`
|
||||
ORDER BY sum(`e`.`truckFk` <> `e`.`expeditionTruckFk`) DESC,
|
||||
ORDER BY SUM(`e`.`truckFk` <> `e`.`roadmapStopFk`) DESC,
|
||||
`e`.`palletFk`
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
ALTER TABLE vn.routesMonitor CHANGE expeditionTruckFk roadmapStopFk int(11) DEFAULT NULL NULL;
|
||||
|
||||
ALTER TABLE vn.routesMonitor ADD COLUMN expeditionTruckFk int(11) AS (roadmapStopFk) VIRTUAL;
|
|
@ -1,5 +1,6 @@
|
|||
import ngModule from '../module';
|
||||
import ModuleCard from 'salix/components/module-card';
|
||||
import UserError from 'core/lib/user-error';
|
||||
|
||||
class Controller extends ModuleCard {
|
||||
reload() {
|
||||
|
@ -59,6 +60,10 @@ class Controller extends ModuleCard {
|
|||
],
|
||||
};
|
||||
|
||||
if (!this.$params.id) {
|
||||
this.$state.go('ticket.index');
|
||||
throw new UserError(`You must select a ticket`);
|
||||
}
|
||||
return this.$http.get(`Tickets/${this.$params.id}`, {filter})
|
||||
.then(res => this.onData(res.data));
|
||||
}
|
||||
|
|
|
@ -64,6 +64,7 @@ You are going to delete this ticket: Vas a eliminar este ticket
|
|||
Ticket deleted. You can undo this action within the first hour: Ticket eliminado. Puedes deshacer esta acción durante la primera hora
|
||||
Search ticket by id or alias: Buscar tickets por identificador o alias
|
||||
ticket: ticket
|
||||
You must select a ticket: Debes seleccionar un ticket
|
||||
|
||||
#sections
|
||||
List: Listado
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "salix-back",
|
||||
"version": "24.24.3",
|
||||
"version": "24.26.0",
|
||||
"author": "Verdnatura Levante SL",
|
||||
"description": "Salix backend",
|
||||
"license": "GPL-3.0",
|
||||
|
|
|
@ -35,7 +35,7 @@ SELECT c.itemPackingTypeFk code,
|
|||
LEFT JOIN vn.ticketTrolley tt ON tt.ticket = t.id
|
||||
LEFT JOIN vn.`zone` zo ON t.zoneFk = zo.id
|
||||
LEFT JOIN vn.routesMonitor rm ON rm.routeFk = t.routeFk
|
||||
LEFT JOIN vn.roadmapStop rs ON rs.id = rm.expeditionTruckFk
|
||||
LEFT JOIN vn.roadmapStop rs ON rs.id = rm.roadmapStopFk
|
||||
LEFT JOIN vn.saleGroupDetail sgd ON sgd.saleFk = s.id
|
||||
JOIN vn.productionConfig pc
|
||||
WHERE t.id IN (?)
|
||||
|
|
|
@ -5,7 +5,7 @@ SELECT ep.id palletFk,
|
|||
COUNT(es.id) labels,
|
||||
t.warehouseFk warehouseFk,
|
||||
dayname(r.created) `dayName`,
|
||||
rs.id <=> rm.expeditionTruckFk isMatch
|
||||
rs.id <=> rm.roadmapStopFk isMatch
|
||||
FROM vn.roadmapStop rs
|
||||
JOIN vn.expeditionPallet ep ON ep.truckFk = rs.id
|
||||
JOIN vn.expeditionScan es ON es.palletFk = ep.id
|
||||
|
@ -13,7 +13,7 @@ SELECT ep.id palletFk,
|
|||
JOIN vn.ticket t ON t.id = e.ticketFk
|
||||
JOIN vn.route r ON r.id = t.routeFk
|
||||
LEFT JOIN vn.routesMonitor rm ON rm.routeFk = r.id
|
||||
LEFT JOIN vn.roadmapStop rs2 ON rs2.id = rm.expeditionTruckFk
|
||||
LEFT JOIN vn.roadmapStop rs2 ON rs2.id = rm.roadmapStopFk
|
||||
WHERE ep.id = ?
|
||||
GROUP BY ep.id, t.routeFk
|
||||
ORDER BY t.routeFk
|
||||
|
|
Loading…
Reference in New Issue