changes EBIT利润率含投资收益参数修改
This commit is contained in:
parent
d1fcf7759e
commit
58e445faa9
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue