@@ -38,7 +38,7 @@ def refresh_task(task_id):
|
||||
class CalculateQuery(BaseModel):
|
||||
year: int = Field(title='年份')
|
||||
month: int = Field(title='月份')
|
||||
only_avg: int = Field(title='是否只计算均值')
|
||||
only_avg: int = Field(title='是否只计算均值', default=0)
|
||||
|
||||
|
||||
@data.route('/calculate', methods=['GET'])
|
||||
|
@@ -6,6 +6,12 @@ class BaseModelMixin:
|
||||
def upsert(self):
|
||||
result = self.find_by_key()
|
||||
session = self._db.session
|
||||
# # 住建厅数据初始化
|
||||
# if result:
|
||||
# result.price_fujian = self.price_fujian
|
||||
# result.fluctuating_fujian = self.fluctuating_fujian
|
||||
# session.add(result)
|
||||
# session.commit()
|
||||
if result:
|
||||
session.delete(result)
|
||||
session.flush()
|
||||
|
Reference in New Issue
Block a user