|
@@ -277,6 +277,16 @@ class MSET_Temp:
|
|
|
lambda x: "危险" if x > THRESHOLD else "正常"
|
|
|
)
|
|
|
|
|
|
+ # 8) 将 temp_channel 列的英文名称改为中文
|
|
|
+ temp_channel_mapping = {
|
|
|
+ 'main_bearing_temperature': '主轴承温度',
|
|
|
+ 'gearbox_oil_temperature': '齿轮箱油温',
|
|
|
+ 'generatordrive_end_bearing_temperature': '发电机驱动端轴承温度',
|
|
|
+ 'generatornon_drive_end_bearing_temperature': '发电机非驱动端轴承温度'
|
|
|
+ }
|
|
|
+
|
|
|
+ df_long['temp_channel'] = df_long['temp_channel'].map(temp_channel_mapping)
|
|
|
+
|
|
|
return df_long
|
|
|
|
|
|
def get_trend(self) -> dict:
|
|
@@ -330,6 +340,18 @@ class MSET_Temp:
|
|
|
"temp_channel": col,
|
|
|
"values": df[col].tolist()
|
|
|
})
|
|
|
+
|
|
|
+ # 将 temp_channel 列的英文名称改为中文
|
|
|
+ temp_channel_mapping = {
|
|
|
+ 'main_bearing_temperature': '主轴承温度',
|
|
|
+ 'gearbox_oil_temperature': '齿轮箱油温',
|
|
|
+ 'generatordrive_end_bearing_temperature': '发电机驱动端轴承温度',
|
|
|
+ 'generatornon_drive_end_bearing_temperature': '发电机非驱动端轴承温度'
|
|
|
+ }
|
|
|
+
|
|
|
+ for channel in channels_data:
|
|
|
+ channel['temp_channel'] = temp_channel_mapping.get(channel['temp_channel'], channel['temp_channel'])
|
|
|
+
|
|
|
|
|
|
return {
|
|
|
"timestamps": timestamps,
|