From ade4387f72c876f779b0956295922003464434f0 Mon Sep 17 00:00:00 2001
From: zhizhijie <zhizhijie@users.noreply.gitee.com>
Date: 星期六, 19 九月 2026 23:26:59 +0800
Subject: [PATCH] fix(汇总表): 中口径排名周转量口径统一为「总量-城市内」差额法
---
stop-dev.ps1 | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 57 insertions(+), 0 deletions(-)
diff --git a/stop-dev.ps1 b/stop-dev.ps1
new file mode 100644
index 0000000..6260c81
--- /dev/null
+++ b/stop-dev.ps1
@@ -0,0 +1,57 @@
+锘�<#
+ 涓�閿仠姝㈠墠鍚庣锛堜笌 start-dev.ps1 閰嶅锛�
+ 鐢ㄦ硶锛歱owershell -NoProfile -ExecutionPolicy Bypass -File stop-dev.ps1
+
+ 璇存槑锛�
+ - 鍙仠鏈」鐩浉鍏宠繘绋嬶細cmd.exe /c mvn.cmd ... spring-boot:run銆乧md.exe /c npm.cmd run serve锛�
+ 浠ュ強瀹冧滑鐨勫瓙杩涚▼锛坖ava / node / vue-cli-service锛夛紝鎸夎繘绋嬫爲 taskkill /T /F锛�
+ - 鍏滃簳鍐嶆寜鍛戒护琛岀壒寰佺簿纭尮閰� java(TrafficAuditApplication) 涓� node(vue-cli-service) 鐨勫鍎胯繘绋嬶紱
+ - 涓嶇鍏跺畠 node/java 杩涚▼锛堜緥濡� Codex 鐨� node_repl锛変笌鐢ㄦ埛鑷繁寮�鐨� cmd 绐楀彛锛�
+ - 缁撴潫鍚庢鏌� 8090/8080 鏄惁宸查噴鏀俱��
+#>
+$ErrorActionPreference = 'Continue'
+
+function Test-PortListening($port) {
+ try { return [bool](Get-NetTCPConnection -LocalPort $port -State Listen -ErrorAction Stop) }
+ catch { return $false }
+}
+
+function Stop-Tree($label, $procId) {
+ Write-Host ("{0}锛氬仠姝㈣繘绋嬫爲 PID={1}" -f $label, $procId)
+ & taskkill.exe /T /F /PID $procId 2>&1 | ForEach-Object { if ($_ -and $_ -notmatch '^SUCCESS') { " $_" } }
+}
+
+# ---------- 1) 鎸夈�屽惎鍔ㄧ敤鐨� cmd 鐖惰繘绋嬨�嶆暣鏍戠粨鏉� ----------
+$roots = @(
+ @{ Label = '鍚庣'; Pattern = 'spring-boot:run' },
+ @{ Label = '鍓嶇'; Pattern = 'npm.cmd run serve' }
+)
+$found = $false
+$cmdProcs = Get-CimInstance Win32_Process -Filter "Name='cmd.exe'" -ErrorAction SilentlyContinue
+foreach ($r in $roots) {
+ $hits = @($cmdProcs | Where-Object { $_.CommandLine -and $_.CommandLine -like ('*' + $r.Pattern + '*') })
+ if ($hits.Count -eq 0) { Write-Host ("{0}锛氭湭鍙戠幇鍚姩杩涚▼锛堝彲鑳藉凡鍋滄锛�" -f $r.Label); continue }
+ $found = $true
+ foreach ($h in $hits) { Stop-Tree $r.Label $h.ProcessId }
+}
+
+# ---------- 2) 鍏滃簳锛氬鍎� java / node ----------
+$orphans = @(
+ @{ Label = '鍚庣(java 鍏滃簳)'; Name = 'java.exe'; Pattern = 'TrafficAuditApplication' },
+ @{ Label = '鍓嶇(node 鍏滃簳)'; Name = 'node.exe'; Pattern = 'vue-cli-service' },
+ @{ Label = '鍓嶇(inner cmd 鍏滃簳)'; Name = 'cmd.exe'; Pattern = 'vue-cli-service serve' }
+)
+foreach ($o in $orphans) {
+ $hits = @(Get-CimInstance Win32_Process -Filter ("Name='" + $o.Name + "'") -ErrorAction SilentlyContinue |
+ Where-Object { $_.CommandLine -and $_.CommandLine -like ('*' + $o.Pattern + '*') })
+ foreach ($h in $hits) { $found = $true; Stop-Tree $o.Label $h.ProcessId }
+}
+
+if (-not $found) { Write-Host '娌℃湁鍙戠幇闇�瑕佸仠姝㈢殑鍓嶅悗绔繘绋嬨��' }
+
+# ---------- 3) 鏍¢獙绔彛 ----------
+Start-Sleep -Seconds 4
+foreach ($port in 8090, 8080) {
+ if (Test-PortListening $port) { Write-Host ("绔彛 {0}锛氫粛鍦ㄧ洃鍚紙鏈畬鍏ㄥ仠姝紝璇烽噸璺戜竴娆★級" -f $port) }
+ else { Write-Host ("绔彛 {0}锛氬凡閲婃斁" -f $port) }
+}
\ No newline at end of file
--
Gitblit v1.9.1