repair: detail notif get with error_channel
This commit is contained in:
@@ -31,7 +31,7 @@ const getNotificationByIdDb = async (id) => {
|
||||
ON b.plant_sub_section_id = c.plant_sub_section_id
|
||||
|
||||
LEFT JOIN m_device d
|
||||
ON b.device_id = d.device_id AND d.deleted_at IS NULL
|
||||
ON a.error_chanel = d.listen_channel AND d.deleted_at IS NULL
|
||||
|
||||
LEFT JOIN m_brands e
|
||||
ON d.brand_id = e.brand_id AND d.deleted_at IS NULL
|
||||
@@ -102,8 +102,10 @@ const getAllNotificationDb = async (searchParams = {}) => {
|
||||
c.type_solution,
|
||||
c.path_solution,
|
||||
|
||||
d.device_code,
|
||||
d.device_name,
|
||||
d.device_location,
|
||||
e.brand_name,
|
||||
|
||||
COALESCE(d.device_name, '') + ' - ' + COALESCE(b.error_code_name, '') AS device_name_error
|
||||
|
||||
@@ -116,7 +118,10 @@ const getAllNotificationDb = async (searchParams = {}) => {
|
||||
ON b.error_code_id = c.error_code_id AND c.deleted_at IS NULL
|
||||
|
||||
LEFT JOIN m_device d
|
||||
ON b.brand_id = d.brand_id AND d.deleted_at IS NULL
|
||||
ON a.error_chanel = d.listen_channel AND d.deleted_at IS NULL
|
||||
|
||||
LEFT JOIN m_brands e
|
||||
ON d.brand_id = e.brand_id AND d.deleted_at IS NULL
|
||||
|
||||
WHERE a.deleted_at IS NULL
|
||||
${whereConditions.length > 0 ? ` AND ${whereConditions.join(" AND ")}` : ""}
|
||||
|
||||
Reference in New Issue
Block a user