Refactored verify barcode logic to work for WM_IN lots. Fixed a bug in CLEAN_INSP_ACTIONS causing all WM_OUT tencor scans to have a failed ROTR result.
This commit is contained in:
@ -101,105 +101,6 @@ Service ProcessScanData(ScanData, ScanType = SCAN_TYPES, FirstCassID, OperatorID
|
||||
// type of cassette ID (i.e., RDS or WMO).
|
||||
Begin Case
|
||||
|
||||
Case ScanType EQ 'WM_IN_1'
|
||||
ValidCassID = False$
|
||||
cnt = Count(ScanData, '|')
|
||||
if cnt NE 0 then
|
||||
Error_Services('Add', 'Wrong label - Scan 2D Top Label')
|
||||
return
|
||||
end else
|
||||
CassetteID = ScanData
|
||||
Swap 'FDI' with '' in CassetteID
|
||||
Swap '^FS' with '' in CassetteID
|
||||
Swap 'I' with '' in CassetteID
|
||||
Convert '.' to '*' in CassetteID
|
||||
WMIRow = Database_Services('ReadDataRow', 'WM_IN', CassetteID)
|
||||
If Error_Services('NoError') then
|
||||
ValidCassID = True$
|
||||
end
|
||||
ScanData = CassetteID
|
||||
If ScanData NE FirstCassID then
|
||||
Error_Services('Add', 'Lot Label does not match the expected lot in OI. | Please correct this issue and then retry.')
|
||||
end
|
||||
end
|
||||
|
||||
If ValidCassID EQ False$ then
|
||||
Error_Services('Add', 'Unrecognized scan data: ':ScanData)
|
||||
end
|
||||
|
||||
Response = ScanData
|
||||
|
||||
Case ScanType EQ 'WM_IN_2'
|
||||
ValidCassID = False$
|
||||
ScanMismatch = False$
|
||||
cnt = Count(ScanData, '|')
|
||||
if cnt NE 0 then
|
||||
Error_Services('Add', 'Wrong label - Scan 2D Bottom Label')
|
||||
return
|
||||
end else
|
||||
CassetteID = ScanData
|
||||
Swap 'FDI' with '' in CassetteID
|
||||
Swap '^FS' with '' in CassetteID
|
||||
Swap 'I' with '' in CassetteID
|
||||
Convert '.' to '*' in CassetteID
|
||||
WMIRow = Database_Services('ReadDataRow', 'WM_IN', CassetteID)
|
||||
If Error_Services('NoError') then
|
||||
ValidCassID = True$
|
||||
end
|
||||
ScanData = CassetteID
|
||||
If ScanData NE FirstCassID then
|
||||
ScanMismatch = True$
|
||||
end
|
||||
end
|
||||
|
||||
If ScanMismatch EQ True$ then
|
||||
ValidCassID = False$
|
||||
If (RowExists('WM_IN', FirstCassID) EQ True$) And (RowExists('WM_IN', CassetteID) EQ True$) then
|
||||
// Place first cassette on hold
|
||||
WONo = Field(FirstCassID, '*', 1, 1)
|
||||
CassNo = Field(FirstCassID, '*', 3, 1)
|
||||
HoldEntity = 'WM_IN'
|
||||
HoldEntityID = FirstCassID
|
||||
|
||||
WOMatKey = WONo:'*':CassNo
|
||||
CtrlEntID = 'NCR_SERVICES' ;* Control checked/unchecked
|
||||
OriginFlag = '' ;* Flag to indicate a hold initiated from the packagaing form
|
||||
HoldData = ''
|
||||
HoldData<1> = OperatorID
|
||||
HoldData<2> = 'Lot placed on hold due to NCR Barcode verification mismatch.'
|
||||
HoldData<3> = False$
|
||||
Hold_Services('OnHold', WOMatKey, HoldEntity, HoldEntityID, 'HOLD', HoldData, OperatorID)
|
||||
|
||||
// Place Second cassette on hold
|
||||
WONo = Field(CassetteID, '*', 1, 1)
|
||||
CassNo = Field(CassetteID, '*', 3, 1)
|
||||
HoldEntity = 'WM_IN'
|
||||
HoldEntityID = CassetteID
|
||||
|
||||
WOMatKey = WONo:'*':CassNo
|
||||
CtrlEntID = 'NCR_SERVICES' ;* Control checked/unchecked
|
||||
OriginFlag = '' ;* Flag to indicate a hold initiated from the packagaing form
|
||||
HoldData = ''
|
||||
HoldData<1> = OperatorID
|
||||
HoldData<2> = 'Lot placed on hold due to NCR Barcode verification mismatch.'
|
||||
HoldData<3> = False$
|
||||
Hold_Services('OnHold', WOMatKey, HoldEntity, HoldEntityID, 'HOLD', HoldData, OperatorID)
|
||||
Message = 'NCR Label verification failed due to mismatched barcodes. Both cassettes placed on hold - Supervisor, Lead, or Engineering disposition required.':CRLF$ |
|
||||
: 'WM_IN Label #1: ':FirstCassID:CRLF$ |
|
||||
: 'WM_IN Label #2: ':CassetteID:CRLF$ |
|
||||
: 'Operator: ':OperatorID
|
||||
Error_Services('Add', Message)
|
||||
end else
|
||||
Error_Services('Add', 'Unrecognized scan data: ':ScanData)
|
||||
end
|
||||
end
|
||||
|
||||
If ValidCassID EQ False$ then
|
||||
Error_Services('Add', 'Unrecognized scan data: ':ScanData)
|
||||
end
|
||||
|
||||
Response = ScanData
|
||||
|
||||
Case ScanType EQ 'CASSETTE_1'
|
||||
|
||||
// Assume this is intended to be a Cassette ID scan (either WMO or RDS). Only if this is a
|
||||
@ -226,27 +127,15 @@ Service ProcessScanData(ScanData, ScanType = SCAN_TYPES, FirstCassID, OperatorID
|
||||
|
||||
ValidCassID = False$ ; // Assume Cassette ID is not valid for now.
|
||||
RDSCass = Count(CassetteID, '.') EQ 0 AND Num(CassetteID)
|
||||
GaNCass = Count(CassetteID, '.') EQ 1 AND not(RDSCass)
|
||||
EPPCass = Count(CassetteID, '.') EQ 2 AND not(RDSCass) AND not(GaNCass)
|
||||
EPPCass = Count(CassetteID, '.') EQ 2 AND not(RDSCass)
|
||||
|
||||
Begin Case
|
||||
Case GaNCass
|
||||
Convert '.' to '*' in CassetteID
|
||||
WOMatRow = Database_Services('ReadDataRow', 'WO_MAT', CassetteID)
|
||||
If Error_Services('NoError') then
|
||||
ValidCassID = True$
|
||||
end
|
||||
Case EPPCass
|
||||
Convert '.' to '*' in CassetteID
|
||||
WMOutRow = Database_Services('ReadDataRow', 'WM_OUT', CassetteID)
|
||||
If Error_Services('NoError') then
|
||||
ValidCassID = True$
|
||||
end
|
||||
ValidcassID = RowExists('WM_IN', CassetteID) or RowExists('WM_OUT', CassetteID)
|
||||
Case RDSCass
|
||||
RDSRow = Database_Services('ReadDataRow', 'RDS', CassetteID)
|
||||
If Error_Services('NoError') then
|
||||
ValidCassID = True$
|
||||
end
|
||||
RDSRow = Database_Services('ReadDataRow', 'RDS', CassetteID)
|
||||
ValidCass = RowExists('RDS', CassetteID)
|
||||
End Case
|
||||
|
||||
If ( (Seq1 EQ 'SEQ1') or (Seq1 EQ 'SEQ2') ) then
|
||||
@ -591,7 +480,9 @@ Service SendToSPC(NCRNo, RDSList, ReactorType, PSNo, DeptResp, LossCode, LossDes
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service GetOpenNCRKeys()
|
||||
|
||||
table = "NCR"
|
||||
ErrorMessage = ''
|
||||
RDSRecords = ''
|
||||
@ -611,9 +502,12 @@ Service GetOpenNCRKeys()
|
||||
Error_Services('Add', ErrorMessage)
|
||||
end
|
||||
Response = RDSRecords
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service ConvertRecordToJson(NCRId)
|
||||
|
||||
NCRJson = ''
|
||||
ErrorMessage = ''
|
||||
If RowExists('NCR', NCRId) then
|
||||
@ -662,6 +556,6 @@ Service ConvertRecordToJson(NCRId)
|
||||
Error_Services('Add', ErrorMessage)
|
||||
end
|
||||
Response = NCRJson
|
||||
|
||||
end service
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user