wisdom #19

Merged
bragaz_rexita merged 38 commits from wisdom into main 2025-12-22 09:18:18 +00:00
Showing only changes of commit 9f7a73e149 - Show all commits

View File

@@ -14,8 +14,28 @@ const InsertNotificationErrorDb = async (store) => {
const getNotificationByIdDb = async (id) => {
const queryText = `
SELECT
a.*
a.*,
b.plant_sub_section_id,
c.plant_sub_section_name,
d.device_code,
d.device_name,
d.device_location,
e.brand_name
FROM notification_error a
LEFT JOIN m_tags b
ON a.error_chanel = b.tag_number
LEFT JOIN m_plant_sub_section c
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
LEFT JOIN m_brands e
ON d.brand_id = e.brand_id AND d.deleted_at IS NULL
WHERE a.notification_error_id = $1 AND a.deleted_at IS NULL
`;
const result = await pool.query(queryText, [id]);