=== 2026-04-15 15:02:20.904951 === URL: http://localhost:9100/warehouse/receipt/853 Error: name 'datetime' is not defined Traceback (most recent call last): File "C:\PPRO\ETest-Vue-FastAPI\ruoyi-fastapi-backend\module_admin\controller\warehouse_receipt_controller.py", line 47, in get_warehouse_receipt_detail logger.info('获取成功') File "C:\PPRO\ETest-Vue-FastAPI\ruoyi-fastapi-backend\module_admin\service\warehouse_receipt_service.py", line 85, in get_receipt_detail raise ServiceException(message='入库单不存在') exceptions.exception.ServiceException During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\PPRO\ETest-Vue-FastAPI\myenv\lib\site-packages\starlette\middleware\errors.py", line 165, in __call__ await self.app(scope, receive, _send) File "C:\PPRO\ETest-Vue-FastAPI\ruoyi-fastapi-backend\middlewares\trace_middleware\middle.py", line 47, in __call__ await self.app(scope, handle_outgoing_receive, handle_outgoing_request) File "C:\PPRO\ETest-Vue-FastAPI\myenv\lib\site-packages\starlette\middleware\gzip.py", line 20, in __call__ await responder(scope, receive, send) File "C:\PPRO\ETest-Vue-FastAPI\myenv\lib\site-packages\starlette\middleware\gzip.py", line 39, in __call__ await self.app(scope, receive, self.send_with_gzip) File "C:\PPRO\ETest-Vue-FastAPI\myenv\lib\site-packages\starlette\middleware\cors.py", line 85, in __call__ await self.app(scope, receive, send) File "C:\PPRO\ETest-Vue-FastAPI\myenv\lib\site-packages\starlette\middleware\exceptions.py", line 62, in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) File "C:\PPRO\ETest-Vue-FastAPI\myenv\lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app raise exc File "C:\PPRO\ETest-Vue-FastAPI\myenv\lib\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app await app(scope, receive, sender) File "C:\PPRO\ETest-Vue-FastAPI\myenv\lib\site-packages\starlette\routing.py", line 715, in __call__ await self.middleware_stack(scope, receive, send) File "C:\PPRO\ETest-Vue-FastAPI\myenv\lib\site-packages\starlette\routing.py", line 735, in app await route.handle(scope, receive, send) File "C:\PPRO\ETest-Vue-FastAPI\myenv\lib\site-packages\starlette\routing.py", line 288, in handle await self.app(scope, receive, send) File "C:\PPRO\ETest-Vue-FastAPI\myenv\lib\site-packages\starlette\routing.py", line 76, in app await wrap_app_handling_exceptions(app, request)(scope, receive, send) File "C:\PPRO\ETest-Vue-FastAPI\myenv\lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app raise exc File "C:\PPRO\ETest-Vue-FastAPI\myenv\lib\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app await app(scope, receive, sender) File "C:\PPRO\ETest-Vue-FastAPI\myenv\lib\site-packages\starlette\routing.py", line 73, in app response = await f(request) File "C:\PPRO\ETest-Vue-FastAPI\myenv\lib\site-packages\fastapi\routing.py", line 301, in app raw_response = await run_endpoint_function( File "C:\PPRO\ETest-Vue-FastAPI\myenv\lib\site-packages\fastapi\routing.py", line 212, in run_endpoint_function return await dependant.call(**values) File "C:\PPRO\ETest-Vue-FastAPI\ruoyi-fastapi-backend\module_admin\controller\warehouse_receipt_controller.py", line 67, in get_warehouse_receipt_detail result = await WarehouseReceiptService.add_receipt(query_db, add_receipt) NameError: name 'datetime' is not defined === 2026-04-15 15:02:44.145029 === URL: http://localhost:9100/warehouse/receipt/853 Error: name 'datetime' is not defined Traceback (most recent call last): File "C:\PPRO\ETest-Vue-FastAPI\ruoyi-fastapi-backend\module_admin\controller\warehouse_receipt_controller.py", line 47, in get_warehouse_receipt_detail receipt_detail = await WarehouseReceiptService.get_receipt_detail(query_db, receipt_id) File "C:\PPRO\ETest-Vue-FastAPI\ruoyi-fastapi-backend\module_admin\service\warehouse_receipt_service.py", line 85, in get_receipt_detail raise ServiceException(message='入库单不存在') exceptions.exception.ServiceException During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\PPRO\ETest-Vue-FastAPI\myenv\lib\site-packages\starlette\middleware\errors.py", line 165, in __call__ await self.app(scope, receive, _send) File "C:\PPRO\ETest-Vue-FastAPI\ruoyi-fastapi-backend\middlewares\trace_middleware\middle.py", line 47, in __call__ await self.app(scope, handle_outgoing_receive, handle_outgoing_request) File "C:\PPRO\ETest-Vue-FastAPI\myenv\lib\site-packages\starlette\middleware\gzip.py", line 20, in __call__ await responder(scope, receive, send) File "C:\PPRO\ETest-Vue-FastAPI\myenv\lib\site-packages\starlette\middleware\gzip.py", line 39, in __call__ await self.app(scope, receive, self.send_with_gzip) File "C:\PPRO\ETest-Vue-FastAPI\myenv\lib\site-packages\starlette\middleware\cors.py", line 85, in __call__ await self.app(scope, receive, send) File "C:\PPRO\ETest-Vue-FastAPI\myenv\lib\site-packages\starlette\middleware\exceptions.py", line 62, in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) File "C:\PPRO\ETest-Vue-FastAPI\myenv\lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app raise exc File "C:\PPRO\ETest-Vue-FastAPI\myenv\lib\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app await app(scope, receive, sender) File "C:\PPRO\ETest-Vue-FastAPI\myenv\lib\site-packages\starlette\routing.py", line 715, in __call__ await self.middleware_stack(scope, receive, send) File "C:\PPRO\ETest-Vue-FastAPI\myenv\lib\site-packages\starlette\routing.py", line 735, in app await route.handle(scope, receive, send) File "C:\PPRO\ETest-Vue-FastAPI\myenv\lib\site-packages\starlette\routing.py", line 288, in handle await self.app(scope, receive, send) File "C:\PPRO\ETest-Vue-FastAPI\myenv\lib\site-packages\starlette\routing.py", line 76, in app await wrap_app_handling_exceptions(app, request)(scope, receive, send) File "C:\PPRO\ETest-Vue-FastAPI\myenv\lib\site-packages\starlette\_exception_handler.py", line 53, in wrapped_app raise exc File "C:\PPRO\ETest-Vue-FastAPI\myenv\lib\site-packages\starlette\_exception_handler.py", line 42, in wrapped_app await app(scope, receive, sender) File "C:\PPRO\ETest-Vue-FastAPI\myenv\lib\site-packages\starlette\routing.py", line 73, in app response = await f(request) File "C:\PPRO\ETest-Vue-FastAPI\myenv\lib\site-packages\fastapi\routing.py", line 301, in app raw_response = await run_endpoint_function( File "C:\PPRO\ETest-Vue-FastAPI\myenv\lib\site-packages\fastapi\routing.py", line 212, in run_endpoint_function return await dependant.call(**values) File "C:\PPRO\ETest-Vue-FastAPI\ruoyi-fastapi-backend\module_admin\controller\warehouse_receipt_controller.py", line 67, in get_warehouse_receipt_detail add_receipt.recorder = current_user.user.user_name NameError: name 'datetime' is not defined