@echo off REM ERP AI Assistant - Windows 停止脚本 echo ======================================== echo ERP AI Assistant - 停止中... echo ======================================== echo. echo 查找并停止后端进程... for /f "tokens=2" %%i in ('tasklist ^| findstr /i "python.*app.main"') do ( echo 停止进程: %%i taskkill /PID %%i /F > nul 2>&1 ) echo 查找并停止前端进程... for /f "tokens=2" %%i in ('tasklist ^| findstr /i "node.*vite"') do ( echo 停止进程: %%i taskkill /PID %%i /F > nul 2>&1 ) REM 也尝试通过端口查找进程 echo 检查端口占用... for /f "tokens=5" %%a in ('netstat -aon ^| findstr ":8000" ^| findstr "LISTENING"') do ( echo 停止后端进程: %%a taskkill /PID %%a /F > nul 2>&1 ) for /f "tokens=5" %%a in ('netstat -aon ^| findstr ":5173" ^| findstr "LISTENING"') do ( echo 停止前端进程: %%a taskkill /PID %%a /F > nul 2>&1 ) echo. echo ======================================== echo 停止完成 echo ======================================== echo. pause