|
|
@@ -49,7 +49,6 @@ async def create_institution_controller(
|
|
|
auth: Annotated[AuthSchema, Depends(AuthPermission(["module_payment:expense:institution:create"]))],
|
|
|
) -> JSONResponse:
|
|
|
"""创建费控制度(含完整串联流程)"""
|
|
|
- institution_create_model = AlipayEbppInvoiceInstitutionCreateModel.from_alipay_dict(data)
|
|
|
enterprise_id = data.get("enterprise_id", "")
|
|
|
if not enterprise_id:
|
|
|
from app.plugin.module_payment.enterprise.model import EnterpriseModel
|
|
|
@@ -58,6 +57,9 @@ async def create_institution_controller(
|
|
|
result = await auth.db.execute(stmt)
|
|
|
enterprise = result.scalar_one_or_none()
|
|
|
enterprise_id = enterprise.enterprise_id if enterprise else ""
|
|
|
+ if enterprise_id:
|
|
|
+ data["enterprise_id"] = enterprise_id
|
|
|
+ institution_create_model = AlipayEbppInvoiceInstitutionCreateModel.from_alipay_dict(data)
|
|
|
|
|
|
# 解析适用成员数据
|
|
|
scope_data = None
|