diff --git a/db/routines/vn/procedures/ticket_getProblems.sql b/db/routines/vn/procedures/ticket_getProblems.sql index 744db4641..4144570f7 100644 --- a/db/routines/vn/procedures/ticket_getProblems.sql +++ b/db/routines/vn/procedures/ticket_getProblems.sql @@ -72,13 +72,13 @@ BEGIN WHERE sp.hasComponentLack GROUP BY s.ticketFk )SELECT tt.ticketFk, - FIND_IN_SET('isFreezed', t.problem) isFreezed, + FIND_IN_SET('isFreezed', t.problem) > 0 isFreezed, t.risk, - FIND_IN_SET('hasRisk', t.problem) hasRisk, - FIND_IN_SET('hasHighRisk', t.problem) hasHighRisk, - FIND_IN_SET('hasTicketRequest', t.problem) hasTicketRequest, - FIND_IN_SET('isTaxDataChecked', t.problem) isTaxDataChecked, - FIND_IN_SET('isTooLittle', t.problem) + FIND_IN_SET('hasRisk', t.problem) > 0 hasRisk, + FIND_IN_SET('hasHighRisk', t.problem) > 0 hasHighRisk, + FIND_IN_SET('hasTicketRequest', t.problem) > 0 hasTicketRequest, + FIND_IN_SET('isTaxDataChecked', t.problem) > 0 isTaxDataChecked, + FIND_IN_SET('isTooLittle', t.problem) > 0 AND util.VN_NOW() < (util.VN_CURDATE() + INTERVAL HOUR(zc.`hour`) HOUR) + INTERVAL MINUTE(zc.`hour`) MINUTE isTooLittle,