refactor(ticketTracking.userFk): refs #6398 workerFk to userFk #1874
|
@ -32,3 +32,21 @@ AS SELECT `tt`.`id` AS `inter_id`,
|
||||||
`tt`.`userFk` AS `Id_Trabajador`,
|
`tt`.`userFk` AS `Id_Trabajador`,
|
||||||
`tt`.`supervisorFk` AS `Id_supervisor`
|
`tt`.`supervisorFk` AS `Id_supervisor`
|
||||||
FROM `vn`.`ticketTracking` `tt`;
|
FROM `vn`.`ticketTracking` `tt`;
|
||||||
|
|
||||||
|
CREATE OR REPLACE
|
||||||
|
ALGORITHM = UNDEFINED VIEW `ticketStateToday` AS
|
||||||
|
SELECT
|
||||||
|
`ts`.`ticket` AS `ticket`,
|
||||||
|
`ts`.`state` AS `state`,
|
||||||
|
`ts`.`productionOrder` AS `productionOrder`,
|
||||||
|
`ts`.`alertLevel` AS `alertLevel`,
|
||||||
|
`ts`.`userFk` AS `userFk`,
|
||||||
|
`ts`.`code` AS `code`,
|
||||||
|
`ts`.`updated` AS `updated`,
|
||||||
|
`ts`.`isPicked` AS `isPicked`
|
||||||
|
FROM
|
||||||
|
(`ticketState` `ts`
|
||||||
|
JOIN `ticket` `t` ON
|
||||||
|
(`t`.`id` = `ts`.`ticket`))
|
||||||
|
WHERE
|
||||||
|
`t`.`shipped` BETWEEN `util`.`VN_CURDATE`() AND `MIDNIGHT`(`util`.`VN_CURDATE`());
|
||||||
|
|
Loading…
Reference in New Issue