Browse Source

fix a bug

highing666 4 years ago
parent
commit
2631f0e48f
1 changed files with 6 additions and 2 deletions
  1. 6 2
      app/controllers/equipment/fcu/basic.py

+ 6 - 2
app/controllers/equipment/fcu/basic.py

@@ -173,8 +173,12 @@ async def get_fcu_control_result(project_id: str, equipment_id: str) -> Dict:
         duo_duo = Duoduo(client, project_id)
         platform = DataPlatformService(client, project_id)
         spaces = await duo_duo.get_space_by_equipment(equipment_id)
-        supply_air_temperature = await platform.get_realtime_data(InfoCode.supply_temperature, equipment_id)
-        water_out_temperature = await platform.get_realtime_data(InfoCode.water_out_temperature, equipment_id)
+        if project_id == 'Pj1101150003':
+            supply_air_temperature = await platform.get_realtime_data(InfoCode.supply_temperature, equipment_id)
+            water_out_temperature = await platform.get_realtime_data(InfoCode.water_out_temperature, equipment_id)
+        else:
+            supply_air_temperature = np.NAN
+            water_out_temperature = np.NAN
         for sp in spaces:
             transfer = SpaceInfoService(client, project_id, sp.get('id'))
             current_target = await transfer.get_current_temperature_target()