feat(salix): refs #6156 #6156 simplify CONCAT_WS

This commit is contained in:
Javier Segarra 2024-09-09 15:13:32 +02:00
parent f9a25617f0
commit 615f57b2e6
1 changed files with 3 additions and 7 deletions

View File

@ -95,12 +95,8 @@ BEGIN
CAST(COUNT(*) AS DECIMAL(10,0)) `lines`, CAST(COUNT(*) AS DECIMAL(10,0)) `lines`,
st.classColor, st.classColor,
CONCAT_WS(':', CONCAT_WS(':',
IF(HOUR(t.shipped), COALESCE(HOUR(t.shipped), HOUR(zc.hour), HOUR(z.hour)),
HOUR(t.shipped), COALESCE(MINUTE(t.shipped), MINUTE(zc.hour), MINUTE(z.hour))
COALESCE(HOUR(zc.hour),HOUR(z.hour))),
IF(MINUTE(t.shipped),
MINUTE(t.shipped),
COALESCE(MINUTE(zc.hour),MINUTE(z.hour)))
) preparation ) preparation
FROM ticket t FROM ticket t
JOIN sale s ON s.ticketFk = t.id JOIN sale s ON s.ticketFk = t.id