Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
U
unify_api2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chaonan
unify_api2
Commits
302372db
Commit
302372db
authored
Jun 04, 2024
by
ZZH
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix hardware alarm set support mult lang 2024-06-04
parent
8236a17b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
7 deletions
+5
-7
alarm_setting.py
unify_api/modules/alarm_manager/views/alarm_setting.py
+1
-1
count_info_pds.py
unify_api/modules/home_page/procedures/count_info_pds.py
+4
-6
No files found.
unify_api/modules/alarm_manager/views/alarm_setting.py
View file @
302372db
...
@@ -93,7 +93,7 @@ async def post_point_alarm_setting(req, body: PointAlarmSettingRequest) \
...
@@ -93,7 +93,7 @@ async def post_point_alarm_setting(req, body: PointAlarmSettingRequest) \
etype_name
=
load_e_type_name
(
res
.
get
(
"etype"
),
lang
)
etype_name
=
load_e_type_name
(
res
.
get
(
"etype"
),
lang
)
if
item
!=
"default"
:
if
item
!=
"default"
:
item_lang
=
PHASE_LINE_LANG
.
get
(
item
,
{})
.
get
(
lang
,
""
)
item_lang
=
PHASE_LINE_LANG
.
get
(
item
,
{})
.
get
(
lang
,
""
)
etype_name
=
f
"{item_lang}{etype_name}"
etype_name
=
f
"{item_lang}
{etype_name}"
else
:
else
:
etype_name
=
f
"{item}{name}"
if
item
!=
"default"
else
name
etype_name
=
f
"{item}{name}"
if
item
!=
"default"
else
name
alarm_setting
=
AlarmSetting
(
alarm_setting
=
AlarmSetting
(
...
...
unify_api/modules/home_page/procedures/count_info_pds.py
View file @
302372db
...
@@ -260,14 +260,12 @@ async def load_aiao_max(user_id, cid, s_dts, e_dts, filed):
...
@@ -260,14 +260,12 @@ async def load_aiao_max(user_id, cid, s_dts, e_dts, filed):
item_name
=
"漏电流"
if
datas
[
'item'
]
==
'default'
else
datas
[
'item'
]
item_name
=
"漏电流"
if
datas
[
'item'
]
==
'default'
else
datas
[
'item'
]
if
lang
!=
"zh_CN"
:
if
lang
!=
"zh_CN"
:
item_name
=
PHASE_LINE_LANG
.
get
(
datas
[
"item"
],
{})
.
get
(
lang
,
""
)
item_name
=
PHASE_LINE_LANG
.
get
(
datas
[
"item"
],
{})
.
get
(
lang
,
""
)
location_name
=
f
"{mtr_name}_{item_name}"
loc_name
=
f
"{mtr_name}_{item_name}"
if
item_name
else
mtr_name
occur_time
=
datas
.
get
(
"value_max_time"
)
occur_time
=
datas
.
get
(
"value_max_time"
)
occur_time
=
str
(
occur_time
)
if
occur_time
else
None
occur_time
=
str
(
occur_time
)
if
occur_time
else
None
return
MaxResidualCurrent
(
return
MaxResidualCurrent
(
max
=
value_max
,
location_name
=
loc_name
,
max
=
value_max
,
occur_time
=
occur_time
)
location_name
=
location_name
,
occur_time
=
occur_time
,
)
async
def
company_power_use_info
(
company_id
,
start
,
end
):
async
def
company_power_use_info
(
company_id
,
start
,
end
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment