diff --git a/LSL2/STPROC/SCAN_SERVICES.txt b/LSL2/STPROC/SCAN_SERVICES.txt index 9b26817..36823c7 100644 --- a/LSL2/STPROC/SCAN_SERVICES.txt +++ b/LSL2/STPROC/SCAN_SERVICES.txt @@ -985,71 +985,72 @@ Service ProcessScanData(ScanID, ScanJSON) FirstParmsComp = LSParmsComp<1,1> If (FirstParmsComp EQ False$) then RDS_Services('CopyRDSLayerParameters', RDSNo) //Test Wafer logging verification - - - // Supplier lot verification - ScannedSuppLot = ScansRow - RDSSuppLot = RDSRec - If (ScannedSuppLot NE '') then - If (ScannedSuppLot _EQC RDSSuppLot) then - IsTWLoggingReqd = RDS_Services('IsTWLoggingReqd', RDSNo) - If IsTWLoggingReqd NE True$ OR TestWaferLotData NE '' then - WaferCountAckReq = Xlate('RDS', RDSNo, 'WAFER_COUNT_ACK_REQ', 'X') - If WaferCountAckReq EQ False$ then - PreStageReady = '' - LoadStageReady = '' - PreStageReady = QA_Services('PreEpiSignatureReady', RDSNo, Username, WaferQty, Reactor) - If PreStageReady EQ True$ then - LoadStageReady = QA_Services('LoadSignatureReady', RDSNo, Username, WaferQty, LLSide, True$, Reactor) - If (LoadStageReady NE True$) then + If Error_Services('NoError') then + // Supplier lot verification + ScannedSuppLot = ScansRow + RDSSuppLot = RDSRec + If (ScannedSuppLot NE '') then + If (ScannedSuppLot _EQC RDSSuppLot) then + IsTWLoggingReqd = RDS_Services('IsTWLoggingReqd', RDSNo) + If IsTWLoggingReqd NE True$ OR TestWaferLotData NE '' then + WaferCountAckReq = Xlate('RDS', RDSNo, 'WAFER_COUNT_ACK_REQ', 'X') + If WaferCountAckReq EQ False$ then + PreStageReady = '' + LoadStageReady = '' + PreStageReady = QA_Services('PreEpiSignatureReady', RDSNo, Username, WaferQty, Reactor) + If PreStageReady EQ True$ then + LoadStageReady = QA_Services('LoadSignatureReady', RDSNo, Username, WaferQty, LLSide, True$, Reactor) + If (LoadStageReady NE True$) then + // Why is it not ready? + ErrMsg = Error_Services('GetMessage') + Begin Case + Case IndexC(ErrMsg, 'supplement', 1) + // Clear the error to return a JSON payload and handle the acknowledgements. + Error_Services('Clear') + Scan_Services('AddNotAcceptableReason', ErrMsg) + Case IndexC(ErrMsg, 'ROTR', 1) + ROTRBlock = Database_Services('ReadDataColumn', 'REACTOR', Reactor, REACTOR_ROTR_STATUS$, True$, 0, False$) + ROTRBlockReason = Database_Services('ReadDataColumn', 'REACTOR', Reactor, REACTOR_ROTR_STATUS_REASON$, True$, 0, False$) + ROTREnabled = Database_Services('ReadDataColumn', 'REACTOR', Reactor, REACTOR_ENABLE_ROTR$, True$, 0, False$) + If ( (ROTRBlock NE 'P') AND (ROTREnabled EQ True$) ) then + // Clear the error to return a JSON payload and allow for OVERRIDE scan. + ScansRow = True$ + ScansRow = ROTRBlockReason + ScansRow = 'ROTR' + Error_Services('Clear') + Scan_Services('AddNotAcceptableReason', "ROTR Load Block Enabled") + end else + ScansRow = False$ + ScansRow = '' + ScansRow = '' + end + End Case + end + end else // Why is it not ready? ErrMsg = Error_Services('GetMessage') Begin Case Case IndexC(ErrMsg, 'supplement', 1) - // Clear the error to return a JSON payload and handle the acknowledgements. Error_Services('Clear') Scan_Services('AddNotAcceptableReason', ErrMsg) - Case IndexC(ErrMsg, 'ROTR', 1) - ROTRBlock = Database_Services('ReadDataColumn', 'REACTOR', Reactor, REACTOR_ROTR_STATUS$, True$, 0, False$) - ROTRBlockReason = Database_Services('ReadDataColumn', 'REACTOR', Reactor, REACTOR_ROTR_STATUS_REASON$, True$, 0, False$) - ROTREnabled = Database_Services('ReadDataColumn', 'REACTOR', Reactor, REACTOR_ENABLE_ROTR$, True$, 0, False$) - If ( (ROTRBlock NE 'P') AND (ROTREnabled EQ True$) ) then - // Clear the error to return a JSON payload and allow for OVERRIDE scan. - ScansRow = True$ - ScansRow = ROTRBlockReason - ScansRow = 'ROTR' - Error_Services('Clear') - Scan_Services('AddNotAcceptableReason', "ROTR Load Block Enabled") - end else - ScansRow = False$ - ScansRow = '' - ScansRow = '' - end - End Case + End Case end end else - // Why is it not ready? - ErrMsg = Error_Services('GetMessage') - Begin Case - Case IndexC(ErrMsg, 'supplement', 1) - Error_Services('Clear') - Scan_Services('AddNotAcceptableReason', ErrMsg) - End Case + Scan_Services('AddNotAcceptableReason', 'The cassette wafer count must be verified against the scheduled wafer count to proceed.') end end else - Scan_Services('AddNotAcceptableReason', 'The cassette wafer count must be verified against the scheduled wafer count to proceed.') + Scan_Services('AddNotAcceptableReason', 'Test wafers are required to be logged with this run.') end end else - Scan_Services('AddNotAcceptableReason', 'Test wafers are required to be logged with this run.') + ScansRow = '' + ErrMsg = '(':CassetteID:') Supplier lot mismatch.' end end else - ScansRow = '' - ErrMsg = '(':CassetteID:') Supplier lot mismatch.' + Scan_Services('AddNotAcceptableReason', 'Supplier lot scan required in order to complete a tool scan.') end end else - Scan_Services('AddNotAcceptableReason', 'Supplier lot scan required in order to complete a tool scan.') + ErrMsg = Error_Services('GetMessage') end - end else ErrMsg = '(':CassetteID:') The first run must be completed using the OpenInsight user interface.' end