mirror of
https://github.com/SyncrowIOT/backend.git
synced 2026-10-23 13:27:54 +00:00
feat: enhance PowerClamp service with energy consumption procedures and enums
This commit is contained in:
+2
-2
@@ -1,7 +1,7 @@
|
||||
WITH params AS (
|
||||
SELECT
|
||||
'd72f3d5d-02e5-4a9e-a1f7-7ab8c3534910'::uuid AS device_id,
|
||||
'2025-04-23'::date AS target_date
|
||||
$1::uuid AS device_id,
|
||||
$2::date AS target_date
|
||||
),
|
||||
total_energy AS (
|
||||
SELECT
|
||||
+3
-3
@@ -1,8 +1,8 @@
|
||||
WITH params AS (
|
||||
SELECT
|
||||
'd72f3d5d-02e5-4a9e-a1f7-7ab8c3534910'::uuid AS device_id,
|
||||
'2025-04-23'::date AS target_date,
|
||||
'14'::text AS target_hour
|
||||
$1::uuid AS device_id,
|
||||
$2::date AS target_date,
|
||||
$3::text AS target_hour
|
||||
),
|
||||
total_energy AS (
|
||||
SELECT
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
WITH params AS (
|
||||
SELECT
|
||||
'd72f3d5d-02e5-4a9e-a1f7-7ab8c3534910'::uuid AS device_id,
|
||||
'03-2025'::text AS target_month -- Format should match 'MM-YYYY'
|
||||
$1::uuid AS device_id,
|
||||
$2::text AS target_month -- Format should match 'MM-YYYY'
|
||||
),
|
||||
total_energy AS (
|
||||
SELECT
|
||||
Reference in New Issue
Block a user