changes 营业利润率参数修改
This commit is contained in:
parent
b1fc4132dd
commit
a16b2f2c2b
|
@ -8,14 +8,14 @@ router = APIRouter()
|
|||
|
||||
|
||||
class Params(BaseModel):
|
||||
利润总额: float
|
||||
营业利润: float
|
||||
营业收入: float
|
||||
|
||||
|
||||
@router.post("/{}".format(INDEX))
|
||||
def func(p: Params):
|
||||
try:
|
||||
result = p.利润总额 / p.营业收入 * 100
|
||||
result = p.营业利润 / p.营业收入 * 100
|
||||
return round(result, 2)
|
||||
|
||||
except ZeroDivisionError:
|
||||
|
|
Loading…
Reference in New Issue