瀏覽代碼

修改json文件名

wei_lai 4 月之前
父節點
當前提交
07cf1c8450

+ 1 - 1
dataAnalysisBusiness/algorithm/cpAnalyst.py

@@ -159,7 +159,7 @@ class CpAnalyst(AnalystWithGoodPoint):
         }
 
         # 将JSON对象保存到文件
-        output_json_path = os.path.join(outputAnalysisDir, f"{self.powerFarmInfo[Field_PowerFarmName].iloc[0]}-{turbineModelInfo[Field_MillTypeCode]}-Cp-Distribution_total.json")
+        output_json_path = os.path.join(outputAnalysisDir, f"{turbineModelInfo[Field_MillTypeCode]}.json")
         with open(output_json_path, 'w', encoding='utf-8') as f:
             import json
             json.dump(json_output, f, ensure_ascii=False, indent=4)

+ 1 - 1
dataAnalysisBusiness/algorithm/cpWindSpeedAnalyst.py

@@ -127,7 +127,7 @@ class CpWindSpeedAnalyst(AnalystWithGoodPoint):
             "yaixs": "风能利用系数",
             "data": turbine_data_list
         }
-        output_json_path = os.path.join(outputAnalysisDir, f"{self.powerFarmInfo[Field_PowerFarmName].iloc[0]}-{turbineModelInfo[Field_MillTypeCode]}-Cp-Distribution_total.json")
+        output_json_path = os.path.join(outputAnalysisDir, f"{turbineModelInfo[Field_MillTypeCode]}.json")
         with open(output_json_path, 'w', encoding='utf-8') as f:
             import json
             json.dump(json_output, f, ensure_ascii=False, indent=4)

+ 2 - 6
dataAnalysisBusiness/algorithm/temperatureEnvironmentAnalyst.py

@@ -171,9 +171,7 @@ class TemperatureEnvironmentAnalyst(AnalystWithGoodBadLimitPoint):
         # fig1.write_html(htmlFilePath)
 
         # 将JSON对象保存到文件
-        jsonFileName = '{}环境温差Bias.json'.format(
-            self.powerFarmInfo[Field_PowerFarmName].iloc[0])
-        output_json_path = os.path.join(outputAnalysisDir, jsonFileName)
+        output_json_path = os.path.join(outputAnalysisDir, f"total_Bias.json")
         with open(output_json_path, 'w', encoding='utf-8') as f:
             import json
             json.dump(json_output, f, ensure_ascii=False, indent=4)
@@ -259,9 +257,7 @@ class TemperatureEnvironmentAnalyst(AnalystWithGoodBadLimitPoint):
         # fig2.write_html(htmlFilePath)
 
         # 将JSON对象保存到文件
-        jsonFileName = '{}环境温度中位数.json'.format(
-            self.powerFarmInfo[Field_PowerFarmName].iloc[0])
-        output_json_path = os.path.join(outputAnalysisDir, jsonFileName)
+        output_json_path = os.path.join(outputAnalysisDir, f"total_Mid.json")
         with open(output_json_path, 'w', encoding='utf-8') as f:
             import json
             json.dump(json_output, f, ensure_ascii=False, indent=4)

+ 1 - 1
dataAnalysisBusiness/algorithm/temperatureLargeComponentsAnalyst.py

@@ -227,7 +227,7 @@ class TemperatureLargeComponentsAnalyst(AnalystWithGoodBadLimitPoint):
             }
 
             # 将JSON对象保存到文件
-            output_json_path = os.path.join(outputPath,f"{columnZH}-{turbineModelInfo[Field_MillTypeCode]}.json")
+            output_json_path = os.path.join(outputPath,f"{turbineModelInfo[Field_MillTypeCode]}.json")
             with open(output_json_path, 'w', encoding='utf-8') as f:
                 import json
                 json.dump(json_output, f, ensure_ascii=False, indent=4)

+ 1 - 1
dataAnalysisBusiness/algorithm/tsrAnalyst.py

@@ -224,7 +224,7 @@ class TSRAnalyst(AnalystWithGoodPoint):
         # })
 
         # 将JSON对象保存到文件
-        output_json_path = os.path.join(outputAnalysisDir, f"{dataFrameMerge[Field_PowerFarmName].iloc[0]}-TSR-Distribution-{turbineModelInfo[Field_MillTypeCode]}.json")
+        output_json_path = os.path.join(outputAnalysisDir, f"{turbineModelInfo[Field_MillTypeCode]}.json")
         with open(output_json_path, 'w', encoding='utf-8') as f:
             import json
             json.dump(json_output, f, ensure_ascii=False, indent=4)

+ 2 - 2
dataAnalysisBusiness/algorithm/tsrCpPowerAnalyst.py

@@ -237,7 +237,7 @@ class TSRCpPowerAnalyst(AnalystWithGoodPoint):
         # })
 
         # 将JSON对象保存到文件
-        output_json_path = os.path.join(outputAnalysisDir, f"{turbineModelInfo[Field_MillTypeCode]}-TSR-Cp-Power-Distribution_total.json")
+        output_json_path = os.path.join(outputAnalysisDir, f"{turbineModelInfo[Field_MillTypeCode]}.json")
         with open(output_json_path, 'w', encoding='utf-8') as f:
             import json
             json.dump(json_output, f, ensure_ascii=False, indent=4)
@@ -347,7 +347,7 @@ class TSRCpPowerAnalyst(AnalystWithGoodPoint):
             })
 
             # 将JSON对象保存到文件
-            output_json_path_each = os.path.join(outputAnalysisDir, f"叶尖速比风能利用系数功率分布{name[0]}.json")
+            output_json_path_each = os.path.join(outputAnalysisDir, f"{name[0]}.json")
             with open(output_json_path_each, 'w', encoding='utf-8') as f:
                 import json
                 json.dump(json_output, f, ensure_ascii=False, indent=4)

+ 1 - 1
dataAnalysisBusiness/algorithm/tsrCpPowerScatterAnalyst.py

@@ -113,7 +113,7 @@ class TSRCpPowerScatterAnalyst(AnalystWithGoodPoint):
             fig.write_image(pngFilePath, scale=3)
 
             # 将JSON对象保存到文件
-            output_json_path = os.path.join(outputAnalysisDir, f"tsr_cp_power_scatter{name[0]}.json")
+            output_json_path = os.path.join(outputAnalysisDir, f"{name[0]}.json")
             with open(output_json_path, 'w', encoding='utf-8') as f:
                 import json
                 json.dump(json_output, f, ensure_ascii=False, indent=4)

+ 1 - 1
dataAnalysisBusiness/algorithm/tsrWindSpeedAnalyst.py

@@ -241,7 +241,7 @@ class TSRWindSpeedAnalyst(AnalystWithGoodPoint):
         # })
 
         # 将JSON对象保存到文件
-        output_json_path = os.path.join(outputAnalysisDir, f"{dataFrame[Field_PowerFarmName].iloc[0]}-TSR-Distribution-{turbineModelInfo[Field_MillTypeCode]}.json")
+        output_json_path = os.path.join(outputAnalysisDir, f"{turbineModelInfo[Field_MillTypeCode]}.json")
         with open(output_json_path, 'w', encoding='utf-8') as f:
             import json
             json.dump(json_output, f, ensure_ascii=False, indent=4)