Add Part Marker machinetypeid and update editpc.asp filtering

sql/add_genspect_partmarker_machinetypes.sql:
- Add Genspect (machinetypeid 45) and Part Marker (machinetypeid 46)

editpc.asp:
- Add pctypeid 10 (Part Marker) -> machinetypeid 46 filter
- Fix comment for Genspect to show machinetypeid 45

🤖 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 11:11:20 -05:00
parent 3fa1fc3812
commit 133aa29458
3 changed files with 33 additions and 17 deletions

View File

@@ -592,9 +592,9 @@ Set rsMachineStatus = Nothing
' pctypeid 5 (CMM) -> CMM equipment (machinetypeid 3) ' pctypeid 5 (CMM) -> CMM equipment (machinetypeid 3)
' pctypeid 6 (Wax/Trace) -> Wax Trace equipment (machinetypeid 5) ' pctypeid 6 (Wax/Trace) -> Wax Trace equipment (machinetypeid 5)
' pctypeid 7 (Keyence) -> Measuring Machine equipment (machinetypeid 23) ' pctypeid 7 (Keyence) -> Measuring Machine equipment (machinetypeid 23)
' pctypeid 8 (Genspect/EAS1000) -> Measuring Machine equipment (machinetypeid 23) ' pctypeid 8 (Genspect/EAS1000) -> Genspect equipment (machinetypeid 45)
' pctypeid 9 (Heat Treat) -> Furnace equipment (machinetypeid 14) ' pctypeid 9 (Heat Treat) -> Furnace equipment (machinetypeid 14)
' pctypeid 10 (Part Marker) -> no filter (show all equipment) ' pctypeid 10 (Part Marker) -> Part Marker equipment (machinetypeid 46)
Dim rsControlPCs, equipmentTypeFilter, filterDescription Dim rsControlPCs, equipmentTypeFilter, filterDescription
equipmentTypeFilter = "" equipmentTypeFilter = ""
filterDescription = "" filterDescription = ""
@@ -614,6 +614,9 @@ Set rsMachineStatus = Nothing
Case 9 Case 9
equipmentTypeFilter = " AND m.machinetypeid = 14" equipmentTypeFilter = " AND m.machinetypeid = 14"
filterDescription = "Furnace (Heat Treat)" filterDescription = "Furnace (Heat Treat)"
Case 10
equipmentTypeFilter = " AND m.machinetypeid = 46"
filterDescription = "Part Marker"
End Select End Select
strSQL = "SELECT m.machineid, m.machinenumber, m.alias FROM machines m " &_ strSQL = "SELECT m.machineid, m.machinenumber, m.alias FROM machines m " &_
"LEFT JOIN models mo ON m.modelnumberid = mo.modelnumberid " &_ "LEFT JOIN models mo ON m.modelnumberid = mo.modelnumberid " &_

View File

@@ -1,15 +0,0 @@
-- Add Genspect/EAS1000 equipment type
-- Run on production database
-- Date: 2025-12-09
-- Check if Genspect machinetype already exists
SET @genspect_exists = (SELECT COUNT(*) FROM machinetypes WHERE machinetype = 'Genspect');
-- Insert only if it doesn't exist
INSERT INTO machinetypes (machinetype, isactive)
SELECT 'Genspect', 1
FROM dual
WHERE @genspect_exists = 0;
-- Show result
SELECT machinetypeid, machinetype FROM machinetypes WHERE machinetype = 'Genspect';

View File

@@ -0,0 +1,28 @@
-- Add Genspect/EAS1000 and Part Marker equipment types
-- Run on production database
-- Date: 2025-12-09
-- ============================================================================
-- Add Genspect machinetypeid
-- ============================================================================
SET @genspect_exists = (SELECT COUNT(*) FROM machinetypes WHERE machinetype = 'Genspect');
INSERT INTO machinetypes (machinetype, isactive)
SELECT 'Genspect', 1
FROM dual
WHERE @genspect_exists = 0;
-- ============================================================================
-- Add Part Marker machinetypeid
-- ============================================================================
SET @partmarker_exists = (SELECT COUNT(*) FROM machinetypes WHERE machinetype = 'Part Marker');
INSERT INTO machinetypes (machinetype, isactive)
SELECT 'Part Marker', 1
FROM dual
WHERE @partmarker_exists = 0;
-- ============================================================================
-- Show results
-- ============================================================================
SELECT machinetypeid, machinetype FROM machinetypes WHERE machinetype IN ('Genspect', 'Part Marker');