changes EBIT利润率含投资收益参数修改

This commit is contained in:
P3ngSaM 2023-01-05 14:18:10 +08:00
parent d1fcf7759e
commit 58e445faa9
1 changed files with 2 additions and 2 deletions

View File

@ -9,13 +9,13 @@ router = APIRouter()
class Params(BaseModel):
利润总额: float
计入财务费用的利息支出: float
营业收入: float
营业收入_含投资收益: float
@router.post("/{}".format(INDEX))
def func(p: Params):
try:
result = (p.利润总额 + p.计入财务费用的利息支出) / p. 营业收入 * 100
result = (p.利润总额 + p.计入财务费用的利息支出) / p. 营业收入_含投资收益 * 100
return round(result, 2)
except ZeroDivisionError: