更新登录页及优化相关功能
This commit is contained in:
@@ -18,6 +18,8 @@ from module_business.domain.test_batch_scope import TestBatchScope
|
||||
from module_business.entity.vo.operation_vo import (
|
||||
BusinessOptionModel,
|
||||
PalletScanResponseModel,
|
||||
TunnelEntryCreateModel,
|
||||
TunnelEntrySuccessResponseModel,
|
||||
UsageCreateModel,
|
||||
UsageModel,
|
||||
UsagePageQueryModel,
|
||||
@@ -76,7 +78,44 @@ async def get_business_usage_line_options(
|
||||
|
||||
|
||||
@usage_controller.get(
|
||||
'/scan/{qr_token}',
|
||||
'/tunnel-options',
|
||||
summary='获取客户现场启用隧道选项接口',
|
||||
description='仅返回当前用户有权访问的指定客户现场启用隧道',
|
||||
response_model=DataResponseModel[list[BusinessOptionModel]],
|
||||
dependencies=[UserInterfaceAuthDependency('business:usage:query')],
|
||||
)
|
||||
async def get_business_usage_tunnel_options(
|
||||
request: Request,
|
||||
site_id: Annotated[int, Query(alias='siteId', gt=0, description='客户现场ID')],
|
||||
query_db: Annotated[AsyncSession, DBSessionDependency()],
|
||||
current_user: Annotated[CurrentUserModel, CurrentUserDependency()],
|
||||
test_scope: Annotated[TestBatchScope, TestBatchScopeDependency()],
|
||||
) -> Response:
|
||||
result = await UsageService.get_tunnel_options_services(query_db, site_id, current_user, test_scope)
|
||||
return ResponseUtil.success(data=result)
|
||||
|
||||
|
||||
@usage_controller.post(
|
||||
'/enter-tunnel',
|
||||
summary='扫码入隧接口',
|
||||
description='将单个已到客户现场的托盘绑定到指定隧道,并生成或复用隧道内部溯源号',
|
||||
response_model=DataResponseModel[TunnelEntrySuccessResponseModel],
|
||||
dependencies=[UserInterfaceAuthDependency('business:usage:add')],
|
||||
)
|
||||
@Log(title='扫码入隧', business_type=BusinessType.INSERT)
|
||||
async def enter_business_usage_tunnel(
|
||||
request: Request,
|
||||
entry_command: TunnelEntryCreateModel,
|
||||
query_db: Annotated[AsyncSession, DBSessionDependency()],
|
||||
current_user: Annotated[CurrentUserModel, CurrentUserDependency()],
|
||||
test_scope: Annotated[TestBatchScope, TestBatchScopeDependency(write=True)],
|
||||
) -> Response:
|
||||
result = await UsageService.enter_tunnel_services(query_db, entry_command, current_user, test_scope)
|
||||
return ResponseUtil.success(msg=result.message, data=result.result)
|
||||
|
||||
|
||||
@usage_controller.get(
|
||||
'/scan/{qr_token:path}',
|
||||
summary='扫描客户现场待使用托盘接口',
|
||||
description='按托盘当前客户现场数据范围判断是否允许记录使用',
|
||||
response_model=DataResponseModel[PalletScanResponseModel],
|
||||
|
||||
Reference in New Issue
Block a user