remind operator to run test wafer on last cassete in WO

This commit is contained in:
Chase Tucker
2024-12-12 08:38:41 -07:00
committed by Tucker Chase (CSC FI SPS MESLEO)
parent a41136e30e
commit f8c83dd7f4
6 changed files with 341 additions and 8 deletions

View File

@ -7,6 +7,7 @@ Declare subroutine Error_Services, SRP_Json, SRP_Com, Wo_Mat_Services, Database_
$insert LOGICAL
$Insert APP_INSERTS
$insert WO_MAT_EQUATES
$Insert WO_LOG_EQUATES
$Insert SERVICE_SETUP
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WO_Mat\InvActionsSyncUp'
@ -17,7 +18,9 @@ Headers = 'Logging DTM' : @FM : 'WOMatKey' : @FM : 'Missing Signature' : @FM :
objSyncLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, ',', Headers, '', False$, False$)
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
GoToService
GoToService else
Error_Services('Set', Service : ' is not a valid service request within the ' : ServiceModule : ' services module.')
end
Return Response or ""
@ -373,6 +376,51 @@ Service SyncWOMatInvActionsAndSigProfile(WOMatKey)
end
end service
Service CassetteIsLastInWo(WoMatKey)
IsLastInWo = False$
If Unassigned(WoMatKey) or WoMatKey EQ '' or RowExists('WO_MAT', WoMatKey) NE True$ then
Error_Services('Add', 'invalid WO_MAT key')
end
WO = Field(WoMatKey, '*', 1)
If WO EQ '' then
Error_Services('Add', 'WO# not found in WO_MAT record')
end
If Error_Services('NoError') and Num(WO) EQ False$ then
Error_Services('Add', 'WO# is not numeric')
end
CassNo = Field(WoMatKey, '*', 2)
If Error_Services('NoError') and CassNo EQ '' then
Error_Services('Add', 'Cassette# not found in WO_MAT record')
end
If Error_Services('NoError') and Num(CassNo) EQ False$ then
Error_Services('Add', 'Cassette# is not numeric')
end
If Error_Services('NoError') then
WoMatKeys = Xlate('WO_LOG', WO, WO_LOG_WO_MAT_KEY$, 'X')
If Error_Services('NoError') and WoMatKeys NE '' then
TotalCassettes = DCount(WoMatKeys, @VM)
IsLastInWo = TotalCassettes EQ CassNo
end
end
If Error_Services('HasError') then
ErrMsg = Error_Services('GetMessage')
LogData = ''
LogData<1> = LoggingDtm
LogData<2> = WOMatKey
LogData<3> = ''
LogData<4> = ''
LogData<5> = 'Error in ' : Service:': ' : ErrMsg
Logging_Services('AppendLog', objSyncLog, LogData, @RM, @FM)
Error_Services('Add', ErrMsg)
end
Response = IsLastInWo
end service