parent
2f61b648f7
commit
d4fa1e9aca
|
@ -32,3 +32,21 @@ AS SELECT `tt`.`id` AS `inter_id`,
|
|||
`tt`.`userFk` AS `Id_Trabajador`,
|
||||
`tt`.`supervisorFk` AS `Id_supervisor`
|
||||
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