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:
@@ -498,6 +498,7 @@ function Get-RemotePCInfo {
|
||||
@{ app_id = 73; app_name = "goCMM"; patterns = @("goCMM") }
|
||||
@{ app_id = 74; app_name = "DODA"; patterns = @("Dovetail Digital Analysis", "DODA") }
|
||||
@{ app_id = 75; app_name = "FormStatusMonitor"; patterns = @("FormStatusMonitor") }
|
||||
@{ app_id = 77; app_name = "HeatTreat"; patterns = @("HeatTreat") }
|
||||
)
|
||||
|
||||
$matchedApps = @()
|
||||
@@ -605,7 +606,7 @@ function Get-RemotePCInfo {
|
||||
$result.HasNISoftware = $hasNISoftware
|
||||
$result.IsEAS1000 = ($hasGageCal -or $hasNISoftware)
|
||||
|
||||
# Genspect Detection (could be Keyence or EAS1000)
|
||||
# Genspect Detection
|
||||
$hasGenspect = $false
|
||||
foreach ($app in $installedApps) {
|
||||
if ($app -match "^Genspect") {
|
||||
@@ -615,9 +616,19 @@ function Get-RemotePCInfo {
|
||||
}
|
||||
$result.HasGenspect = $hasGenspect
|
||||
|
||||
# Heat Treat Detection
|
||||
$hasHeatTreat = $false
|
||||
foreach ($app in $installedApps) {
|
||||
if ($app -match "^HeatTreat") {
|
||||
$hasHeatTreat = $true
|
||||
break
|
||||
}
|
||||
}
|
||||
$result.HasHeatTreat = $hasHeatTreat
|
||||
|
||||
# Determine PC Type based on detected software
|
||||
# Priority: CMM > Wax Trace > Keyence > EAS1000 > Generic hint > Measuring (default)
|
||||
$detectedPcType = "Measuring" # Default for shopfloor PCs
|
||||
# Priority: CMM > Wax Trace > Keyence > EAS1000 > Genspect > Heat Treat > Generic hint > Shopfloor (default)
|
||||
$detectedPcType = "Shopfloor" # Default for shopfloor PCs
|
||||
if ($result.IsCMM) {
|
||||
$detectedPcType = "CMM"
|
||||
} elseif ($result.IsWaxTrace) {
|
||||
@@ -626,6 +637,10 @@ function Get-RemotePCInfo {
|
||||
$detectedPcType = "Keyence"
|
||||
} elseif ($result.IsEAS1000) {
|
||||
$detectedPcType = "EAS1000"
|
||||
} elseif ($hasGenspect) {
|
||||
$detectedPcType = "Genspect"
|
||||
} elseif ($hasHeatTreat) {
|
||||
$detectedPcType = "Heat Treat"
|
||||
} elseif ($result.GenericTypeHint) {
|
||||
# Use generic machine number hint when no software detected
|
||||
$detectedPcType = $result.GenericTypeHint
|
||||
@@ -910,6 +925,7 @@ foreach ($result in $results) {
|
||||
if ($result.HasGageCal) { $detectedSoftware += "GageCal" }
|
||||
if ($result.HasNISoftware) { $detectedSoftware += "NI Software" }
|
||||
if ($result.HasGenspect) { $detectedSoftware += "Genspect" }
|
||||
if ($result.HasHeatTreat) { $detectedSoftware += "HeatTreat" }
|
||||
|
||||
$softwareStr = if ($detectedSoftware.Count -gt 0) { " (" + ($detectedSoftware -join ", ") + ")" } else { "" }
|
||||
Write-Log " PC Type: $($result.DetectedPcType)$softwareStr" -Level "INFO"
|
||||
|
||||
Reference in New Issue
Block a user