Consolidate PC machinetypeid: all PCs use 33, pctypeid determines type
- Simplified GetMachineTypeIdFromPCType() to always return 33 (PC) - PC type differentiation now handled entirely by pctypeid - Updated savedevice.asp: 28 -> 33 - Updated savedevice_direct.asp: 36 -> 33, added pctypeid - Removed redundant machinetypeid mapping logic (36-43) - All 317 existing PCs already use machinetypeid=33 Schema simplified: machinetypeid=33 (PC) + pctypeid determines specific type pctypeid: 1=Standard, 2=Engineer, 3=Shopfloor, 5=CMM, etc. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -42,11 +42,10 @@
|
||||
' modelnumberid = 1 (default model)
|
||||
' requires_manual_machine_config = 0 (no manual config needed)
|
||||
' osid = 1 (default OS)
|
||||
' machinetypeid = 28 (PC - Standard default)
|
||||
' pctypeid = 1 (Standard PC type)
|
||||
' machinetypeid = 33 (PC), pctypeid = 1 (Standard)
|
||||
Dim insertSQL, recordsAffected
|
||||
insertSQL = "INSERT INTO machines (serialnumber, machinestatusid, isactive, modelnumberid, requires_manual_machine_config, osid, machinetypeid, pctypeid, lastupdated) " & _
|
||||
"VALUES (?, 2, 1, 1, 0, 1, 28, 1, NOW())"
|
||||
"VALUES (?, 2, 1, 1, 0, 1, 33, 1, NOW())"
|
||||
|
||||
recordsAffected = ExecuteParameterizedInsert(objConn, insertSQL, Array(serialnumber))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user