Merge branch 'ps1' into 'main'
changes 营业利润率参数修改 See merge request root/IndexCalculation!21
This commit is contained in:
commit
6042926289
|
@ -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