|
@@ -112,10 +112,11 @@ class OutputProcessor:
|
|
|
for index, row in dataFrame.iterrows():
|
|
|
sql = text(f"""
|
|
|
INSERT INTO analysis_general_file
|
|
|
- (batch_code, analysis_type_code, file_addr, auto_analysis, create_time)
|
|
|
- VALUES (:batch_code, :analysis_type_code, :file_addr, :auto_analysis, :create_time)
|
|
|
+ (batch_code, analysis_type_code, engine_type_code, file_addr, auto_analysis, create_time)
|
|
|
+ VALUES (:batch_code, :analysis_type_code, :engine_type_code, :file_addr, :auto_analysis, :create_time)
|
|
|
ON DUPLICATE KEY UPDATE
|
|
|
analysis_type_code=VALUES(analysis_type_code),
|
|
|
+ engine_type_code=VALUES(engine_type_code),
|
|
|
file_addr=VALUES(file_addr),
|
|
|
auto_analysis=VALUES(auto_analysis);
|
|
|
""")
|
|
@@ -123,6 +124,7 @@ class OutputProcessor:
|
|
|
params = {
|
|
|
"batch_code": row[Field_Return_BatchCode],
|
|
|
"analysis_type_code": row[Field_Return_TypeAnalyst],
|
|
|
+ "engine_type_code": row[Field_CodeOfTurbine],
|
|
|
"file_addr": row[Const_FileURL],
|
|
|
"auto_analysis": self.autoOrManual,
|
|
|
"create_time": timestamp
|
|
@@ -169,7 +171,7 @@ class OutputProcessor:
|
|
|
session, returnDataFrame, timestamp)
|
|
|
# 获取分析完成的时间
|
|
|
finish_time = datetime.now(timezone.utc) + timedelta(hours=8)
|
|
|
-
|
|
|
+
|
|
|
# 第二次调用:更新分析状态为已完成,进度为100%,并记录完成时间
|
|
|
self.analysisState(session, self.dataBatchNum, AnalysisState.Analyzed.value,
|
|
|
ErrorState.NotErr.value, None, None, timestamp, 100, analysis_finish_time=finish_time)
|