feat: 新增计算保留上月小数位数
This commit is contained in:
@@ -78,6 +78,7 @@ class Calculator:
|
||||
|
||||
unit = "" # 单位
|
||||
spec = '' # 规格
|
||||
display_digit = ''
|
||||
|
||||
round_bit = 1 # 结果保留位数
|
||||
round_method = RoundMethod.normal # 舍入方法
|
||||
@@ -126,6 +127,7 @@ class Calculator:
|
||||
'weight_survey': self.weight_survey,
|
||||
'unit': self.unit,
|
||||
'spec': self.spec,
|
||||
'display_digit': self.display_digit,
|
||||
}
|
||||
|
||||
def run(self):
|
||||
@@ -228,12 +230,14 @@ class Calculator:
|
||||
self.weight_fhb = self._previous_prices.weight_fhb
|
||||
self.weight_network = self._previous_prices.weight_network
|
||||
self.weight_survey = self._previous_prices.weight_survey
|
||||
self.display_digit = self._previous_prices.display_digit
|
||||
else:
|
||||
self.weight_ftb = 1
|
||||
self.weight_ss = 1
|
||||
self.weight_fhb = 1
|
||||
self.weight_network = 1
|
||||
self.weight_survey = 1
|
||||
self.display_digit = 1
|
||||
|
||||
def save(self):
|
||||
result = self.result()
|
||||
|
Reference in New Issue
Block a user