feat: 查询项目信息的时候,需要查出来项目的剩余余额
This commit is contained in:
@@ -0,0 +1,17 @@
|
|||||||
|
from fastapi import FastAPI
|
||||||
|
|
||||||
|
from app.model.ReimburseModel import ReimburseService
|
||||||
|
from app.utils.db_utils import AsyncSessionDep
|
||||||
|
|
||||||
|
|
||||||
|
def add_approve_route(app: FastAPI):
|
||||||
|
# 提交报销单接口
|
||||||
|
@app.post('/submit_reimburse')
|
||||||
|
async def submit_reimburse(reimburse: dict, session: AsyncSessionDep):
|
||||||
|
reimburse_id = reimburse.get('id')
|
||||||
|
reimburse_cls = await ReimburseService.query_item(
|
||||||
|
session=session,
|
||||||
|
row_dict={"id": reimburse_id}
|
||||||
|
)
|
||||||
|
|
||||||
|
return
|
||||||
@@ -17,6 +17,8 @@ class ProjectModel(BasicModel, table=True):
|
|||||||
budget: float = Field(default=None, description="项目预算金额")
|
budget: float = Field(default=None, description="项目预算金额")
|
||||||
version: int = Field(default=None, description="项目版本号")
|
version: int = Field(default=None, description="项目版本号")
|
||||||
|
|
||||||
|
# /*---------------------------------------leader_id-------------------------------------------*/
|
||||||
|
|
||||||
leader_id: str = Field(
|
leader_id: str = Field(
|
||||||
default=None,
|
default=None,
|
||||||
description="项目负责人id",
|
description="项目负责人id",
|
||||||
|
|||||||
Reference in New Issue
Block a user