Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
csst
Scalebox Apps
Commits
9dea4b26
Commit
9dea4b26
authored
Jul 16, 2024
by
Tang Jianing
Browse files
修改mgL1,加入chipid和obsid判断逻辑
parent
afdb7cf7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
11 deletions
+28
-11
L1/dockerfiles/adm-L1/mgL1.py
L1/dockerfiles/adm-L1/mgL1.py
+28
-11
No files found.
L1/dockerfiles/adm-L1/mgL1.py
View file @
9dea4b26
...
@@ -30,19 +30,36 @@ class admL1Api():
...
@@ -30,19 +30,36 @@ class admL1Api():
# cursor.execute(admsql)
# cursor.execute(admsql)
# admrows = cursor.fetchone()
# admrows = cursor.fetchone()
# current_job_id = admrows[0]
# current_job_id = admrows[0]
#当前模块的id
current_job_id
=
os
.
getenv
(
'JOB_ID'
)
current_job_id
=
os
.
getenv
(
'JOB_ID'
)
sink_job_name
=
""
sink_job_name
=
""
if
obsid
==
1
:
body
=
body
.
replace
(
' '
,
'-'
)
admL1Api
.
sum_numbers
(
body
,
"msc-l1-mbi"
,
current_job_id
)
# 将数字转换为字符串
admL1Api
.
sum_numbers
(
body
,
"msc-l1-sls2d"
,
current_job_id
)
body_str
=
str
(
body
)
elif
obsid
==
2
:
# 获取前三位
admL1Api
.
sum_numbers
(
body
,
"mci-l1"
,
current_job_id
)
obsid
=
body_str
[:
3
]
elif
obsid
==
3
:
# 获取后两位
admL1Api
.
sum_numbers
(
body
,
"ifs-l1-rss"
,
current_job_id
)
chipid
=
body_str
[
-
2
:]
elif
obsid
==
4
:
moduleid
=
""
admL1Api
.
sum_numbers
(
body
,
"cpic-l1"
,
current_job_id
)
if
obsid
==
"101"
:
elif
obsid
==
5
:
if
chipid
in
{
"06"
,
"07"
,
"08"
,
"09"
,
"11"
,
"12"
,
"13"
,
"14"
,
"15"
,
"16"
,
"17"
,
"18"
,
"19"
,
"20"
,
"22"
,
"23"
,
"24"
,
"25"
}:
admL1Api
.
sum_numbers
(
body
,
"hstdm-l1"
,
current_job_id
)
admL1Api
.
sum_numbers
(
body
,
"msc-l1-mbi"
,
current_job_id
)
elif
chipid
in
{
"01"
,
"02"
,
"03"
,
"04"
,
"05"
,
"10"
,
"21"
,
"26"
,
"27"
,
"28"
,
"29"
,
"30"
}:
admL1Api
.
sum_numbers
(
body
,
"msc-l1-sls2d"
,
current_job_id
)
else
:
print
(
"101未发送"
)
elif
obsid
==
"108"
:
if
chipid
in
{
"06"
,
"07"
,
"08"
,
"09"
,
"11"
,
"12"
,
"13"
,
"14"
,
"15"
,
"16"
,
"17"
,
"18"
,
"19"
,
"20"
,
"22"
,
"23"
,
"24"
,
"25"
}:
admL1Api
.
sum_numbers
(
body
,
"msc-l1-mbi"
,
current_job_id
)
elif
chipid
in
{
"01"
,
"02"
,
"03"
,
"04"
,
"05"
,
"10"
,
"21"
,
"26"
,
"27"
,
"28"
,
"29"
,
"30"
}:
admL1Api
.
sum_numbers
(
body
,
"msc-l1-sls2d"
,
current_job_id
)
else
:
print
(
"201未发送"
)
elif
obsid
==
"110"
:
admL1Api
.
sum_numbers
(
body
,
"msc-l1-ooc"
,
current_job_id
)
else
:
else
:
sink_job_name
=
""
sink_job_name
=
""
...
...
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