Merged PR 15668: Refactored Lot Event

Refactored Lot Event methods.
1. Moved all lot event methods to a new LOT_EVENT_SERVICES service module.
2. Simplified CreateLotEvent routine
3. Updated all calling stored procedures.
This commit is contained in:
Ouellette Jonathan (CSC FI SPS MESLEO)
2025-04-28 21:02:24 +02:00
parent b2edf6f288
commit 4037b2fa45
13 changed files with 260 additions and 446 deletions

View File

@ -65,6 +65,7 @@ Equ COMMA$ to ','
Declare function Error_Services, Database_Services, obj_RDS_Test, Logging_Services, Environment_Services
Declare function Tool_Parms_Services, Signature_Services, obj_WO_Mat_QA, Datetime, Override_Services
Declare function Rds_Services, SRP_DateTime, SRP_Math, obj_WO_Mat, Lot_Services, SRP_Array
Declare function Lot_Event_Services
Declare subroutine Error_Services, Database_Services, Logging_Services, Service_Services
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\RDS'
@ -689,7 +690,7 @@ WRITE_RECORD_PRE:
// Audit the LOT_EVENT table for missing LOAD event (i.e., signature)
ExistingNGLotId = Lot_Services('GetLotIdByLegacyLotIdAndType', RDSNo, 'RDS')
If RowExists('LOT', ExistingNGLotId) then
LotEvents = Lot_Services('GetLotEventsInSequence', ExistingNGLotId)
LotEvents = Lot_Event_Services('GetLotEventsInSequence', ExistingNGLotId)
If LotEvents NE '' then
LotEventsRev = SRP_Array('Reverse', LotEvents, @FM)
LotEventsTypesRev = Xlate('LOT_EVENT', LotEventsRev, LOT_EVENT_LOT_EVENT_TYPE$, 'X')
@ -1043,3 +1044,4 @@ Restore_System_Variables:
return