|
@@ -99,14 +99,18 @@ def get_exec_data(run_count: int = 1) -> dict:
|
|
|
|
|
|
|
|
|
|
def get_all_wind(field_code):
|
|
def get_all_wind(field_code):
|
|
- query_sql = "select engine_code,engine_name,rated_capacity,rated_cut_out_windspeed from wind_engine_group where field_code = %s and del_state = 0"
|
|
|
|
|
|
+ query_sql = """
|
|
|
|
+ SELECT t.engine_code,t.engine_name,t.rated_capacity,a.rated_cut_out_windspeed
|
|
|
|
+ from wind_engine_group t LEFT JOIN wind_engine_mill a on t.mill_type_code = a.mill_type_code
|
|
|
|
+ where t.field_code = %s and t.del_state = 0
|
|
|
|
+ """
|
|
dict_datas = plt.execute(query_sql, (field_code,))
|
|
dict_datas = plt.execute(query_sql, (field_code,))
|
|
wind_result = dict()
|
|
wind_result = dict()
|
|
power_result = dict()
|
|
power_result = dict()
|
|
for data in dict_datas:
|
|
for data in dict_datas:
|
|
wind_result[str(data['engine_name'])] = str(data['engine_code'])
|
|
wind_result[str(data['engine_name'])] = str(data['engine_code'])
|
|
- power_result[str(data['engine_code'])] = (float(data['rated_capacity']),float(data['rated_cut_out_windspeed']))
|
|
|
|
- return wind_result,power_result
|
|
|
|
|
|
+ power_result[str(data['engine_code'])] = (float(data['rated_capacity']), float(data['rated_cut_out_windspeed']))
|
|
|
|
+ return wind_result, power_result
|
|
|
|
|
|
|
|
|
|
def get_all_wind_company():
|
|
def get_all_wind_company():
|