feat: 更新十一地市计算逻辑

This commit is contained in:
han0
2024-07-10 16:08:47 +08:00
parent 5afcfc4846
commit 967bb57136
19 changed files with 144 additions and 139 deletions

View File

@@ -19,8 +19,10 @@ class AsphaltDomesticCalculator(Calculator):
query = DataNetwork.get_query(self.year, self.month, name='石油沥青', spec='国产')
data = query.first()
price = data.price if data else 0
previous_price = int(getattr(self.previous_prices, 'price_network', price))
fluctuating = price - previous_price
return price, fluctuating
def _get_survey_price(self):