changes 总资产报酬率公式
This commit is contained in:
parent
6dfbb85c32
commit
8a161a694a
|
@ -7,7 +7,8 @@ router = APIRouter()
|
|||
|
||||
|
||||
class Params(BaseModel):
|
||||
利润总额: float
|
||||
净利润: float
|
||||
所得税: float
|
||||
利息费用: float
|
||||
期末资产总计: float
|
||||
期初资产总计: float
|
||||
|
@ -18,7 +19,7 @@ class Params(BaseModel):
|
|||
def func(p: Params):
|
||||
try:
|
||||
d = (p.期末资产总计 + p.期初资产总计) / 2
|
||||
result = (p.利润总额 + p.利息费用) / d * 100
|
||||
result = (p.净利润 + p.所得税 + p.利息费用) / d * 100
|
||||
return round(result, 2)
|
||||
|
||||
except ZeroDivisionError:
|
||||
|
|
Loading…
Reference in New Issue