From a57d3ba2507f40961cd65c31c9c5d031ac22d92e Mon Sep 17 00:00:00 2001 From: martsforever Date: Sun, 24 Aug 2025 02:41:26 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A6=A5=E5=8D=8F=EF=BC=8C=E5=8F=AA?= =?UTF-8?q?=E8=83=BD=E5=9C=A8=E6=95=B0=E6=8D=AE=E5=BA=93=E4=B8=AD=E5=8A=A0?= =?UTF-8?q?=E5=AF=B9=E5=BA=94=E7=9A=84=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/add_approve_route.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/app/controller/add_approve_route.py b/app/controller/add_approve_route.py index ae03369..ebbd8da 100644 --- a/app/controller/add_approve_route.py +++ b/app/controller/add_approve_route.py @@ -9,8 +9,16 @@ 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} - ) + # 先查一遍报销单信息 + reimburse_cls = await ReimburseService.query_item(session=session, row_dict={"id": reimburse_id}) + + # 1. 没有审批单—— + # 2. 审批单为审批中状态——不处理 + # 3. 审批单为已通过状态——不处理 + # 4. 审批单为已驳回状态—— + # 5. 审批单为已撤回状态—— + + # 新建审批单,走审批流程 + print(reimburse_cls.amount) + return