Add Heat Treat detection and PC type filter

- PowerShell scripts: Add Heat Treat detection to Update-PC-Minimal.ps1
  and Update-ShopfloorPCs-Remote.ps1 with proper priority chain
  (CMM > Wax Trace > Keyence > EAS1000 > Genspect > Heat Treat > Shopfloor)
- displaypcs.asp: Add PC Type dropdown filter using pctypeid
- displaypcs.asp: Fix SQL spacing issues in WHERE clause filters

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
cproudlock
2025-12-09 09:23:40 -05:00
parent 9f58adaf19
commit 01d4aae38d
3 changed files with 66 additions and 15 deletions

View File

@@ -282,6 +282,8 @@ $hasDODA = $false
$hasFormStatusMonitor = $false
$hasGageCal = $false
$hasNISoftware = $false
$hasGenspect = $false
$hasHeatTreat = $false
try {
$regPaths = @(
"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*",
@@ -336,6 +338,8 @@ try {
"Keyence VR Series" { $hasKeyence = $true }
"GageCal" { $hasGageCal = $true }
"NI Software" { $hasNISoftware = $true }
"Genspect" { $hasGenspect = $true }
"HeatTreat" { $hasHeatTreat = $true }
}
}
break
@@ -419,7 +423,7 @@ if ($matchedApps.Count -gt 0) {
}
# Set PC type based on application detection
# Priority: CMM > Wax Trace > Keyence > EAS1000 > Part Marker > Generic hint > default Measuring
# Priority: CMM > Wax Trace > Keyence > EAS1000 > Genspect > Heat Treat > Generic hint > default Shopfloor
$isCMM = ($hasPcDmis -or $hasGoCMM -or $hasDODA)
$isWaxTrace = ($hasFormTracePak -or $hasFormStatusMonitor)
$isEAS1000 = ($hasGageCal -or $hasNISoftware)
@@ -446,12 +450,19 @@ if ($isCMM) {
if ($hasGageCal) { $detected += "GageCal" }
if ($hasNISoftware) { $detected += "NI Software" }
"PC Type set to: EAS1000 ($($detected -join ', '))" | Tee-Object -FilePath $logFile -Append
} elseif ($hasGenspect) {
$data.pcType = "Genspect"
"PC Type set to: Genspect" | Tee-Object -FilePath $logFile -Append
} elseif ($hasHeatTreat) {
$data.pcType = "Heat Treat"
"PC Type set to: Heat Treat" | Tee-Object -FilePath $logFile -Append
} elseif ($script:genericTypeHint) {
# Use generic machine number hint when no software detected
$data.pcType = $script:genericTypeHint
"PC Type set to: $($script:genericTypeHint) (from generic machine # - requires manual assignment)" | Tee-Object -FilePath $logFile -Append
} else {
"No specialized apps detected, keeping type: $($data.pcType)" | Tee-Object -FilePath $logFile -Append
$data.pcType = "Shopfloor"
"No specialized apps detected, defaulting to: Shopfloor" | Tee-Object -FilePath $logFile -Append
}
# Send to API