Added NCR barcode verification
This commit is contained in:
parent
9f4a3f94b5
commit
bff81f70c4
2102
LSL2/OIWIN/NDW_VERIFY_BARCODE.json
Normal file
2102
LSL2/OIWIN/NDW_VERIFY_BARCODE.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -607,74 +607,77 @@ RejMat:
|
||||
ncrParms := '':@RM ;* Placeholder for RejWaferIDs
|
||||
ncrParms := SlotNCRs
|
||||
|
||||
Set_Status(0)
|
||||
NCRNo = obj_NCR('Create',ncrParms) ;* Create new NCR for this wafer/group of wafers
|
||||
errCode = ''
|
||||
IF Get_Status(errCode) THEN
|
||||
ErrMsg(errCode)
|
||||
BarcodeVerified = Dialog_Box('NDW_VERIFY_BARCODE', @Window, WMIKey, @User4)
|
||||
If BarcodeVerified EQ TRUE$ then
|
||||
Set_Status(0)
|
||||
NCRNo = obj_NCR('Create',ncrParms) ;* Create new NCR for this wafer/group of wafers
|
||||
errCode = ''
|
||||
IF Get_Status(errCode) THEN
|
||||
ErrMsg(errCode)
|
||||
|
||||
END ELSE
|
||||
RejDTM = OCONV(Date(),'D4/'):' ':OCONV(Time(),'MTS')
|
||||
|
||||
RejWfrIDs = ''
|
||||
NewSlotIDs = ''
|
||||
CurrSlotIDs = ''
|
||||
RunLocs = ''
|
||||
|
||||
FOR N = 1 TO COUNT(InSlotNos,@VM) + (InSlotNos NE '')
|
||||
|
||||
* * * * Added 3/23/2016 JCH - wafer history * * * *
|
||||
|
||||
RejWfrID = WONo:'*':InCassNos<1,N>:'*':InSlotNos<1,N>
|
||||
|
||||
RejWfrIDs<1,-1> = RejWfrID
|
||||
CurrSlotIDs<1,-1> = RejWfrID ;*Inbound box WfrID = SlotID
|
||||
|
||||
Parms = RejWfrID:@RM ;* WfrID
|
||||
Parms := RejDTM:@RM ;* EventDtm
|
||||
Parms := @USER4:@RM ;* EventBy
|
||||
Parms := 'NCR':@RM ;* Event
|
||||
Parms := '':@RM ;* NewSlotID
|
||||
Parms := '':@RM ;* RunLoc
|
||||
Parms := NCRNo:@RM ;* NCRNo
|
||||
Parms := '':@RM ;* TWUse
|
||||
Parms := RejWfrID:@RM ;* CurrSlotID Inbound box WfrID = SlotID
|
||||
Parms := '':@RM ;* NewToolID
|
||||
Parms := '':@RM ;* CurrToolID
|
||||
Parms := '':@RM ;* NewInvLoc
|
||||
Parms := '':@RM ;* CurrInvLoc
|
||||
Parms := 'I' ;* WfrSide
|
||||
END ELSE
|
||||
RejDTM = OCONV(Date(),'D4/'):' ':OCONV(Time(),'MTS')
|
||||
|
||||
RejWfrIDs = ''
|
||||
NewSlotIDs = ''
|
||||
CurrSlotIDs = ''
|
||||
RunLocs = ''
|
||||
|
||||
FOR N = 1 TO COUNT(InSlotNos,@VM) + (InSlotNos NE '')
|
||||
|
||||
* * * * Added 3/23/2016 JCH - wafer history * * * *
|
||||
|
||||
RejWfrID = WONo:'*':InCassNos<1,N>:'*':InSlotNos<1,N>
|
||||
|
||||
RejWfrIDs<1,-1> = RejWfrID
|
||||
CurrSlotIDs<1,-1> = RejWfrID ;*Inbound box WfrID = SlotID
|
||||
|
||||
Parms = RejWfrID:@RM ;* WfrID
|
||||
Parms := RejDTM:@RM ;* EventDtm
|
||||
Parms := @USER4:@RM ;* EventBy
|
||||
Parms := 'NCR':@RM ;* Event
|
||||
Parms := '':@RM ;* NewSlotID
|
||||
Parms := '':@RM ;* RunLoc
|
||||
Parms := NCRNo:@RM ;* NCRNo
|
||||
Parms := '':@RM ;* TWUse
|
||||
Parms := RejWfrID:@RM ;* CurrSlotID Inbound box WfrID = SlotID
|
||||
Parms := '':@RM ;* NewToolID
|
||||
Parms := '':@RM ;* CurrToolID
|
||||
Parms := '':@RM ;* NewInvLoc
|
||||
Parms := '':@RM ;* CurrInvLoc
|
||||
Parms := 'I' ;* WfrSide
|
||||
|
||||
obj_WO_Wfr('AddEvent',Parms)
|
||||
|
||||
* * * * *
|
||||
|
||||
LineNo = InSlotNos<1,N>
|
||||
|
||||
Set_Property(@WINDOW:'.SLOT_NO','CELLPOS','',COL$RDS:@FM:LineNo)
|
||||
Set_Property(@WINDOW:'.SLOT_NO','CELLPOS','',COL$RDS_STATUS:@FM:LineNo)
|
||||
Set_Property(@WINDOW:'.SLOT_NO','CELLPOS','',COL$POCKET:@FM:LineNo)
|
||||
Set_Property(@WINDOW:'.SLOT_NO','CELLPOS','',COL$ZONE:@FM:LineNo)
|
||||
Set_Property(@WINDOW:'.SLOT_NO','CELLPOS','',COL$CHAR:@FM:LineNo)
|
||||
Set_Property(@WINDOW:'.SLOT_NO','CELLPOS',NCRNo,COL$SLOT_NCR_NO:@FM:LineNo)
|
||||
NEXT N
|
||||
|
||||
END
|
||||
|
||||
Set_Property(@WINDOW:'.SLOT','SELPOS',SlotSelection) ;* Toggle WM_IN select off
|
||||
obj_WO_Wfr('AddEvent',Parms)
|
||||
|
||||
* * * * *
|
||||
|
||||
LineNo = InSlotNos<1,N>
|
||||
|
||||
Set_Property(@WINDOW:'.SLOT_NO','CELLPOS','',COL$RDS:@FM:LineNo)
|
||||
Set_Property(@WINDOW:'.SLOT_NO','CELLPOS','',COL$RDS_STATUS:@FM:LineNo)
|
||||
Set_Property(@WINDOW:'.SLOT_NO','CELLPOS','',COL$POCKET:@FM:LineNo)
|
||||
Set_Property(@WINDOW:'.SLOT_NO','CELLPOS','',COL$ZONE:@FM:LineNo)
|
||||
Set_Property(@WINDOW:'.SLOT_NO','CELLPOS','',COL$CHAR:@FM:LineNo)
|
||||
Set_Property(@WINDOW:'.SLOT_NO','CELLPOS',NCRNo,COL$SLOT_NCR_NO:@FM:LineNo)
|
||||
NEXT N
|
||||
|
||||
END
|
||||
|
||||
Set_Property(@WINDOW:'.SLOT','SELPOS',SlotSelection) ;* Toggle WM_IN select off
|
||||
|
||||
Send_Event(@WINDOW,'WRITE')
|
||||
Send_Event(@WINDOW,'WRITE')
|
||||
|
||||
DetWindow = 'NCR'
|
||||
DetKeys = NCRNo
|
||||
DefaultRec = ''
|
||||
RetKey = WMIKey
|
||||
RetWin = @WINDOW
|
||||
RetPage = 1
|
||||
RetCtrl = @WINDOW:'.SLOT'
|
||||
RetPos = 1:@FM:1
|
||||
DetWindow = 'NCR'
|
||||
DetKeys = NCRNo
|
||||
DefaultRec = ''
|
||||
RetKey = WMIKey
|
||||
RetWin = @WINDOW
|
||||
RetPage = 1
|
||||
RetCtrl = @WINDOW:'.SLOT'
|
||||
RetPos = 1:@FM:1
|
||||
|
||||
obj_Appwindow('ViewNewDetail',DetWindow:@RM:DetKeys:@RM:DefaultRec:@RM:RetKey:@RM:RetPage:@RM:RetCtrl:@RM:RetPos)
|
||||
obj_Appwindow('ViewNewDetail',DetWindow:@RM:DetKeys:@RM:DefaultRec:@RM:RetKey:@RM:RetPage:@RM:RetCtrl:@RM:RetPos)
|
||||
End
|
||||
|
||||
RETURN
|
||||
|
||||
|
@ -1369,84 +1369,87 @@ RejMat:
|
||||
ncrParms := MUCassIDs:@RM
|
||||
ncrParms := MUSlotNos
|
||||
|
||||
Set_Status(0)
|
||||
NCRNo = obj_NCR('Create',ncrParms) ;* Create new NCR for this wafer/group of wafers
|
||||
|
||||
IF Get_Status(errCode) THEN
|
||||
ErrMsg(errCode)
|
||||
BarcodeVerified = Dialog_Box('NDW_VERIFY_BARCODE', @Window, WMOKey, @User4)
|
||||
If BarcodeVerified EQ TRUE$ then
|
||||
Set_Status(0)
|
||||
NCRNo = obj_NCR('Create',ncrParms) ;* Create new NCR for this wafer/group of wafers
|
||||
|
||||
END ELSE
|
||||
RejDTM = OCONV(Date(),'D4/'):' ':OCONV(Time(),'MTS')
|
||||
IF Get_Status(errCode) THEN
|
||||
ErrMsg(errCode)
|
||||
|
||||
END ELSE
|
||||
RejDTM = OCONV(Date(),'D4/'):' ':OCONV(Time(),'MTS')
|
||||
|
||||
RejWfrIDs = ''
|
||||
CurrSlotIDs = ''
|
||||
|
||||
FOR N = 1 TO COUNT(OutSlotNos,@VM) + (OutSlotNos NE '')
|
||||
|
||||
* * * * Added 4/23/2016 JCH - wafer history * * * *
|
||||
|
||||
CurrSlotID = WONo:'*':OutCassNos<1,N>:'*':OutSlotNos<1,N>
|
||||
|
||||
CurrSlotIDs<1,-1> = CurrSlotID
|
||||
|
||||
|
||||
IF MUWONos<1,N> = '' THEN
|
||||
RejWfrID = WONo:'*':InCassNos<1,N>:'*':InSlotNos<1,N>
|
||||
END ELSE
|
||||
RejWfrID = MUWONos<1,N>:'*':MUCassIDs<1,N>:'*':MUSlotNos<1,N>
|
||||
END
|
||||
|
||||
RejWfrIDs<1,-1> = RejWfrID
|
||||
|
||||
Parms = RejWfrID:@RM ;* WfrID
|
||||
Parms := RejDTM:@RM ;* EventDtm
|
||||
Parms := @USER4:@RM ;* EventBy
|
||||
Parms := 'NCR':@RM ;* Event
|
||||
Parms := '':@RM ;* NewSlotID
|
||||
Parms := '':@RM ;* RunLoc
|
||||
Parms := NCRNo:@RM ;* NCRNo
|
||||
Parms := '':@RM ;* TWUse
|
||||
Parms := CurrSlotID:@RM ;* CurrSlotID
|
||||
Parms := '':@RM ;* NewToolID
|
||||
Parms := '':@RM ;* CurrToolID
|
||||
Parms := '':@RM ;* NewInvLoc
|
||||
Parms := '':@RM ;* CurrInvLoc
|
||||
Parms := 'O' ;* Wfr Side
|
||||
|
||||
obj_WO_Wfr('AddEvent',Parms)
|
||||
|
||||
|
||||
LineNo = OutSlotNos<1,N>
|
||||
Set_Property(@WINDOW:'.SLOT','CELLPOS','',COL$RDS_NO:@FM:LineNo)
|
||||
Set_Property(@WINDOW:'.SLOT','CELLPOS','',COL$RDS_STATUS:@FM:LineNo)
|
||||
Set_Property(@WINDOW:'.SLOT','CELLPOS','',COL$POCKET:@FM:LineNo)
|
||||
Set_Property(@WINDOW:'.SLOT','CELLPOS','',COL$ZONE:@FM:LineNo)
|
||||
Set_Property(@WINDOW:'.SLOT','CELLPOS','',COL$IN_CASS:@FM:LineNo)
|
||||
Set_Property(@WINDOW:'.SLOT','CELLPOS','',COL$IN_SLOT:@FM:LineNo)
|
||||
Set_Property(@WINDOW:'.SLOT','CELLPOS',NCRNo,COL$SLOT_NCR:@FM:LineNo)
|
||||
Set_Property(@WINDOW:'.SLOT','CELLPOS','',COL$MU_WO_NO:@FM:LineNo)
|
||||
Set_Property(@WINDOW:'.SLOT','CELLPOS','',COL$MU_WO_STEP:@FM:LineNo)
|
||||
Set_Property(@WINDOW:'.SLOT','CELLPOS','',COL$MU_CASS_NO:@FM:LineNo)
|
||||
Set_Property(@WINDOW:'.SLOT','CELLPOS','',COL$MU_SLOT_NO:@FM:LineNo)
|
||||
|
||||
NEXT N
|
||||
|
||||
END
|
||||
|
||||
RejWfrIDs = ''
|
||||
CurrSlotIDs = ''
|
||||
Set_Property(@WINDOW:'.SLOT','SELPOS',SlotSelection) ;* Toggle WM_IN select off
|
||||
|
||||
FOR N = 1 TO COUNT(OutSlotNos,@VM) + (OutSlotNos NE '')
|
||||
|
||||
* * * * Added 4/23/2016 JCH - wafer history * * * *
|
||||
|
||||
CurrSlotID = WONo:'*':OutCassNos<1,N>:'*':OutSlotNos<1,N>
|
||||
|
||||
CurrSlotIDs<1,-1> = CurrSlotID
|
||||
|
||||
|
||||
IF MUWONos<1,N> = '' THEN
|
||||
RejWfrID = WONo:'*':InCassNos<1,N>:'*':InSlotNos<1,N>
|
||||
END ELSE
|
||||
RejWfrID = MUWONos<1,N>:'*':MUCassIDs<1,N>:'*':MUSlotNos<1,N>
|
||||
END
|
||||
|
||||
RejWfrIDs<1,-1> = RejWfrID
|
||||
|
||||
Parms = RejWfrID:@RM ;* WfrID
|
||||
Parms := RejDTM:@RM ;* EventDtm
|
||||
Parms := @USER4:@RM ;* EventBy
|
||||
Parms := 'NCR':@RM ;* Event
|
||||
Parms := '':@RM ;* NewSlotID
|
||||
Parms := '':@RM ;* RunLoc
|
||||
Parms := NCRNo:@RM ;* NCRNo
|
||||
Parms := '':@RM ;* TWUse
|
||||
Parms := CurrSlotID:@RM ;* CurrSlotID
|
||||
Parms := '':@RM ;* NewToolID
|
||||
Parms := '':@RM ;* CurrToolID
|
||||
Parms := '':@RM ;* NewInvLoc
|
||||
Parms := '':@RM ;* CurrInvLoc
|
||||
Parms := 'O' ;* Wfr Side
|
||||
|
||||
obj_WO_Wfr('AddEvent',Parms)
|
||||
|
||||
|
||||
LineNo = OutSlotNos<1,N>
|
||||
Set_Property(@WINDOW:'.SLOT','CELLPOS','',COL$RDS_NO:@FM:LineNo)
|
||||
Set_Property(@WINDOW:'.SLOT','CELLPOS','',COL$RDS_STATUS:@FM:LineNo)
|
||||
Set_Property(@WINDOW:'.SLOT','CELLPOS','',COL$POCKET:@FM:LineNo)
|
||||
Set_Property(@WINDOW:'.SLOT','CELLPOS','',COL$ZONE:@FM:LineNo)
|
||||
Set_Property(@WINDOW:'.SLOT','CELLPOS','',COL$IN_CASS:@FM:LineNo)
|
||||
Set_Property(@WINDOW:'.SLOT','CELLPOS','',COL$IN_SLOT:@FM:LineNo)
|
||||
Set_Property(@WINDOW:'.SLOT','CELLPOS',NCRNo,COL$SLOT_NCR:@FM:LineNo)
|
||||
Set_Property(@WINDOW:'.SLOT','CELLPOS','',COL$MU_WO_NO:@FM:LineNo)
|
||||
Set_Property(@WINDOW:'.SLOT','CELLPOS','',COL$MU_WO_STEP:@FM:LineNo)
|
||||
Set_Property(@WINDOW:'.SLOT','CELLPOS','',COL$MU_CASS_NO:@FM:LineNo)
|
||||
Set_Property(@WINDOW:'.SLOT','CELLPOS','',COL$MU_SLOT_NO:@FM:LineNo)
|
||||
|
||||
NEXT N
|
||||
Send_Event(@WINDOW,'WRITE')
|
||||
|
||||
END
|
||||
|
||||
Set_Property(@WINDOW:'.SLOT','SELPOS',SlotSelection) ;* Toggle WM_IN select off
|
||||
|
||||
Send_Event(@WINDOW,'WRITE')
|
||||
|
||||
DetWindow = 'NCR'
|
||||
DetKeys = NCRNo
|
||||
DefaultRec = ''
|
||||
RetKey = WMOKey
|
||||
RetWin = @WINDOW
|
||||
RetPage = 1
|
||||
RetCtrl = @WINDOW:'.SLOT'
|
||||
RetPos = 1:@FM:1
|
||||
|
||||
obj_Appwindow('ViewNewDetail',DetWindow:@RM:DetKeys:@RM:DefaultRec:@RM:RetKey:@RM:RetPage:@RM:RetCtrl:@RM:RetPos)
|
||||
DetWindow = 'NCR'
|
||||
DetKeys = NCRNo
|
||||
DefaultRec = ''
|
||||
RetKey = WMOKey
|
||||
RetWin = @WINDOW
|
||||
RetPage = 1
|
||||
RetCtrl = @WINDOW:'.SLOT'
|
||||
RetPos = 1:@FM:1
|
||||
|
||||
obj_Appwindow('ViewNewDetail',DetWindow:@RM:DetKeys:@RM:DefaultRec:@RM:RetKey:@RM:RetPage:@RM:RetCtrl:@RM:RetPos)
|
||||
End
|
||||
end else
|
||||
// Cassette is on hold so material cannot be rejected.
|
||||
ErrorMessage = 'Create NCR denied!. The cassette must be taken off hold before rejecting material.'
|
||||
|
@ -483,75 +483,78 @@ RejMat:
|
||||
ncrParms := RejWaferIDs:@RM ;* Rejected Wafer ID's
|
||||
ncrParms := PrevNCRNos ;* Previous NCR No's
|
||||
|
||||
Set_Status(0)
|
||||
|
||||
NCRNo = obj_NCR('Create',ncrParms) ;* Create new NCR for this wafer/group of wafers
|
||||
SAPBatchNo = Get_Property(@WINDOW:'.SAP_BATCH_NO','DEFPROP')
|
||||
MUFlag = XLATE('WO_MAT', WOMatKey, 'MakeupBox', 'X')
|
||||
|
||||
IF Get_Status(errCode) THEN
|
||||
ErrMsg(errCode)
|
||||
END ELSE
|
||||
IF SAPBatchNo NE '' THEN
|
||||
IF SAPBatchNo[-1,1] NE 'R' THEN
|
||||
MUFlag = Xlate('NCR', NCRNo, 'MAKEUP_BOX', 'X')
|
||||
MUFlag = OCONV(MUFlag ,'BYes,')
|
||||
PartNoID = Xlate('NCR', NCRNo, 'WO_MAT_PART_NO', 'X')
|
||||
RejCnt = Xlate('NCR', NCRNo, 'REJ_CNT', 'X')
|
||||
Recipients = XLATE('NOTIFICATION', 'NCR_AFTER_GR', NOTIFICATION_USER_ID$, 'X')
|
||||
SentFrom = @USER4
|
||||
Subject = 'SAP Post - GR Scrap Qty - NCR Reported' ;* Modified subject line - dkk 7/17/14
|
||||
Message = "NCR: ":NCRNo:CRLF$:"Batch_No: ":SAPBatchNo:CRLF$:"MU Box: ":MUFlag:CRLF$:"Epi PN: ":PartNoID:CRLF$:"Qty: ":RejCnt ;* Added Epi PN on the end - dkk 7/17/14
|
||||
AttachWindow = 'NCR'
|
||||
AttachKey = NCRNo
|
||||
SendToGroup = ''
|
||||
Parms = Recipients:@RM:SentFrom:@RM:Subject:@RM:Message:@RM:AttachWindow:@RM:AttachKey:@RM:SendToGroup
|
||||
obj_Notes('Create',Parms)
|
||||
BarcodeVerified = Dialog_Box('NDW_VERIFY_BARCODE', @Window, RDSNo, @User4)
|
||||
If BarcodeVerified EQ TRUE$ then
|
||||
Set_Status(0)
|
||||
|
||||
NCRNo = obj_NCR('Create',ncrParms) ;* Create new NCR for this wafer/group of wafers
|
||||
SAPBatchNo = Get_Property(@WINDOW:'.SAP_BATCH_NO','DEFPROP')
|
||||
MUFlag = XLATE('WO_MAT', WOMatKey, 'MakeupBox', 'X')
|
||||
|
||||
IF Get_Status(errCode) THEN
|
||||
ErrMsg(errCode)
|
||||
END ELSE
|
||||
IF SAPBatchNo NE '' THEN
|
||||
IF SAPBatchNo[-1,1] NE 'R' THEN
|
||||
MUFlag = Xlate('NCR', NCRNo, 'MAKEUP_BOX', 'X')
|
||||
MUFlag = OCONV(MUFlag ,'BYes,')
|
||||
PartNoID = Xlate('NCR', NCRNo, 'WO_MAT_PART_NO', 'X')
|
||||
RejCnt = Xlate('NCR', NCRNo, 'REJ_CNT', 'X')
|
||||
Recipients = XLATE('NOTIFICATION', 'NCR_AFTER_GR', NOTIFICATION_USER_ID$, 'X')
|
||||
SentFrom = @USER4
|
||||
Subject = 'SAP Post - GR Scrap Qty - NCR Reported' ;* Modified subject line - dkk 7/17/14
|
||||
Message = "NCR: ":NCRNo:CRLF$:"Batch_No: ":SAPBatchNo:CRLF$:"MU Box: ":MUFlag:CRLF$:"Epi PN: ":PartNoID:CRLF$:"Qty: ":RejCnt ;* Added Epi PN on the end - dkk 7/17/14
|
||||
AttachWindow = 'NCR'
|
||||
AttachKey = NCRNo
|
||||
SendToGroup = ''
|
||||
Parms = Recipients:@RM:SentFrom:@RM:Subject:@RM:Message:@RM:AttachWindow:@RM:AttachKey:@RM:SendToGroup
|
||||
obj_Notes('Create',Parms)
|
||||
END
|
||||
END
|
||||
|
||||
RejDTM = OCONV(Date(),'D4/'):' ':OCONV(Time(),'MTS')
|
||||
|
||||
RejWfrIDs = ''
|
||||
CurrSlotIDs = ''
|
||||
|
||||
sCnt = COUNT(SlotNos,@VM) + (SlotNos NE '')
|
||||
FOR N = 1 TO sCnt
|
||||
* * * * Added 3/23/2016 JCH - wafer history * * * *
|
||||
|
||||
RejWfrID = RejWaferIDs<1,N>
|
||||
CurrSlotID = WONo:'*':CassNo:'*':SlotNos<1,N>
|
||||
|
||||
Convert '.' To '*' In RejWfrID
|
||||
|
||||
RejWfrIDs<1,-1> = RejWfrID
|
||||
CurrSlotIDs<1,-1> = CurrSlotID
|
||||
|
||||
Parms = RejWfrID:@RM ;* WfrID
|
||||
Parms := RejDTM:@RM ;* EventDtm
|
||||
Parms := @USER4:@RM ;* EventBy
|
||||
Parms := 'NCR':@RM ;* Event
|
||||
Parms := '':@RM ;* NewSlotID
|
||||
Parms := '':@RM ;* RunLoc
|
||||
Parms := NCRNo:@RM ;* NCRNo
|
||||
Parms := '':@RM ;* TWUse
|
||||
Parms := CurrSlotID:@RM ;* CurrSlotID
|
||||
Parms := '':@RM ;* NewToolID
|
||||
Parms := '':@RM ;* CurrToolID
|
||||
Parms := '':@RM ;* NewInvLoc
|
||||
Parms := '':@RM ;* CurrInvLoc
|
||||
Parms := 'O' ;* Wfr Side
|
||||
|
||||
obj_WO_Wfr('AddEvent',Parms)
|
||||
* * * * * * * * *
|
||||
LineNo = SlotNos<1,N>
|
||||
NEXT N
|
||||
END
|
||||
END
|
||||
|
||||
RejDTM = OCONV(Date(),'D4/'):' ':OCONV(Time(),'MTS')
|
||||
|
||||
RejWfrIDs = ''
|
||||
CurrSlotIDs = ''
|
||||
|
||||
sCnt = COUNT(SlotNos,@VM) + (SlotNos NE '')
|
||||
FOR N = 1 TO sCnt
|
||||
* * * * Added 3/23/2016 JCH - wafer history * * * *
|
||||
|
||||
RejWfrID = RejWaferIDs<1,N>
|
||||
CurrSlotID = WONo:'*':CassNo:'*':SlotNos<1,N>
|
||||
|
||||
Convert '.' To '*' In RejWfrID
|
||||
|
||||
RejWfrIDs<1,-1> = RejWfrID
|
||||
CurrSlotIDs<1,-1> = CurrSlotID
|
||||
|
||||
Parms = RejWfrID:@RM ;* WfrID
|
||||
Parms := RejDTM:@RM ;* EventDtm
|
||||
Parms := @USER4:@RM ;* EventBy
|
||||
Parms := 'NCR':@RM ;* Event
|
||||
Parms := '':@RM ;* NewSlotID
|
||||
Parms := '':@RM ;* RunLoc
|
||||
Parms := NCRNo:@RM ;* NCRNo
|
||||
Parms := '':@RM ;* TWUse
|
||||
Parms := CurrSlotID:@RM ;* CurrSlotID
|
||||
Parms := '':@RM ;* NewToolID
|
||||
Parms := '':@RM ;* CurrToolID
|
||||
Parms := '':@RM ;* NewInvLoc
|
||||
Parms := '':@RM ;* CurrInvLoc
|
||||
Parms := 'O' ;* Wfr Side
|
||||
|
||||
obj_WO_Wfr('AddEvent',Parms)
|
||||
* * * * * * * * *
|
||||
LineNo = SlotNos<1,N>
|
||||
NEXT N
|
||||
END
|
||||
|
||||
Set_Property(@WINDOW:'.SLOT','SELPOS',SlotSelection) ;* Toggle WM_IN select off
|
||||
Set_Property(@WINDOW, 'SAVEWARN', False$)
|
||||
rv = Dialog_Box('NCR', @WINDOW, NCRNo)
|
||||
Send_Event(@WINDOW, 'READ')
|
||||
Set_Property(@WINDOW:'.SLOT','SELPOS',SlotSelection) ;* Toggle WM_IN select off
|
||||
Set_Property(@WINDOW, 'SAVEWARN', False$)
|
||||
rv = Dialog_Box('NCR', @WINDOW, NCRNo)
|
||||
Send_Event(@WINDOW, 'READ')
|
||||
end
|
||||
end else
|
||||
// Cassette is on hold so material cannot be rejected.
|
||||
ErrorMessage = 'Create NCR denied!. The cassette must be taken off hold before rejecting material.'
|
||||
|
@ -179,7 +179,7 @@ Display_Message:
|
||||
If LongLen EQ TitleLen then
|
||||
PixMult = 5.9 ; // Title is bold so it requires more pixels
|
||||
end else
|
||||
PixMult = 5.2 ; // 5.1 wasn't quite enough for some lines
|
||||
PixMult = 6 ; // 5.2 wasn't quite enough for some lines
|
||||
end
|
||||
|
||||
ItemWidth = PixMult * LongLen
|
||||
@ -240,7 +240,7 @@ Display_Message:
|
||||
If ComboVisible then Set_Property(Subclass, 'OLE.ComboDropDown[' : CtrlEntIdSub : ']', False$)
|
||||
end
|
||||
* ShowAtY = CtrlYpos + CtrlHeight
|
||||
ShowAtY = CtrlYpos + 2
|
||||
ShowAtY = CtrlYpos + 2
|
||||
// The SRP Popup display should be at least as wide as the control for visual purposes. Add an extra pixel of
|
||||
// width to account for the cell border.
|
||||
If CtrlWidth GT FullWidth then FullWidth = CtrlWidth
|
||||
@ -356,3 +356,4 @@ Display_Message:
|
||||
|
||||
Done = True$
|
||||
return
|
||||
|
||||
|
@ -1,12 +1,58 @@
|
||||
Compile function NCR_Services(@Service, @Params)
|
||||
#pragma precomp SRP_PreCompiler
|
||||
$insert LOGICAL
|
||||
/***********************************************************************************************************************
|
||||
|
||||
Declare subroutine Set_Status, Logging_Services, Error_Services
|
||||
Declare function Environment_Services, Logging_Services, SRP_Datetime, Utility
|
||||
Name : NCR_Services
|
||||
|
||||
EQU CRLF$ TO \0D0A\
|
||||
EQU TAB$ TO CHAR(9)
|
||||
Description : Handler program for all NCR services.
|
||||
|
||||
Notes : Application errors should be logged using the Error Services module. There are a few methodological
|
||||
assumptions built into way errors are managed which are important to understand in order to properly
|
||||
work with Error Services:
|
||||
|
||||
- The term 'top' refers to the originating procedure of a call stack and the term 'bottom' refers to
|
||||
the last routine (or the current routine) within a call stack. Within the OpenInsight Debugger
|
||||
this will appear backwards since the originating procedure always appears at the bottom of the
|
||||
list and the current routine appears at the top of the list. We are using this orientation because
|
||||
it is common to refer to the process of calling other procedures as 'drilling down'.
|
||||
|
||||
- The reason for defining the orientation of the call stack is because Error_Services allows for
|
||||
multiple error conditions to be appended to an original error. In most cases this will happen when
|
||||
a procedure at the bottom of the stack generates an error condition and then returns to its
|
||||
calling procedure. This higher level procedure can optionally add more information relevant to
|
||||
itself. This continues as the call stack 'bubbles' its way back to the top to where the
|
||||
originating procedure is waiting.
|
||||
|
||||
- Native OpenInsight commands that handle errors (e.g., Set_Status, Set_FSError, Set_EventStatus)
|
||||
preserve their error state until explicitly cleared. This can hinder the normal execution of code
|
||||
since subsequent procedures (usually SSPs) will fail if a pre-existing error condition exists.
|
||||
Our philosophy is that error conditions should automatically be cleared before a new procedure
|
||||
is executed to avoid this problem. However, the nature of Basic+ does not make this easy to
|
||||
automate for any given stored procedure. Therefore, if a stored procedure wants to conform to our
|
||||
philosophy then it should include a call into the 'Clear' service request at the top of the
|
||||
program. Alternatively this can be done through a common insert (see SERVICE_SETUP for example.)
|
||||
|
||||
- Service modules will use the SERVICE_SETUP insert and therefore automatically clear out any
|
||||
error conditions that were set before.
|
||||
|
||||
Parameters :
|
||||
Service [in] -- Name of the service being requested
|
||||
Param1-10 [in/out] -- Additional request parameter holders
|
||||
Response [out] -- Response to be sent back to the Controller (MCP) or requesting procedure
|
||||
|
||||
Metadata :
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
08/29/24 djm Add ProcessScanData service and Service header.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
$insert APP_INSERTS
|
||||
$Insert SERVICE_SETUP
|
||||
|
||||
Declare subroutine Set_Status, Logging_Services, Error_Services, Obj_Notes, Set_Property, Obj_Wo_Mat, Hold_Services
|
||||
Declare function Environment_Services, Logging_Services, SRP_Datetime, Utility, Scan_Services, Error_Services
|
||||
Declare function Database_Services, Signature_Services, Epipro_Services, Rds_Services, Memberof, Datetime
|
||||
Declare function Get_Property
|
||||
|
||||
EQU COL$RDS_NO TO 1
|
||||
EQU COL$REACTOR TO 2
|
||||
@ -16,180 +62,525 @@ GoToService
|
||||
|
||||
Return Response or ""
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Service Parameter Options
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
Options SCAN_TYPES = 'CASSETTE_1', 'CASSETTE_2', 'WM_IN_1', 'WM_IN_2'
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
// SERVICES
|
||||
//-----------------------------------------------------------------------------
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
Service SendToSPC(NCRNo, RDSList, ReactorType, PSNo, DeptResp, LossCode, LossDesc, LossStage, LossBy, ACCode, ACDesc)
|
||||
Headers = 'Logging DTM' : @FM : 'Machine' : @FM : 'Level' : @FM : 'Log'
|
||||
ColumnWidths = 20 : @FM : 12 : @FM : 7 : @FM : 500
|
||||
Machine = Environment_Services('GetServer')
|
||||
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\NCR'
|
||||
makeDirSuccess = Utility("MAKEDIR", LogPath)
|
||||
LogDate = Oconv(Date(), 'D4/')
|
||||
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : '_NcrSendToSpc.csv'
|
||||
objLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, ' ', Headers, ColumnWidths, False$, False$)
|
||||
|
||||
RdsNos = ''
|
||||
RdsCount = 0
|
||||
ReactorList = ''
|
||||
ReactorCount = 0
|
||||
RejCntList = ''
|
||||
RejCntCount = 0
|
||||
|
||||
RDSCnt = DCOUNT(RDSList<1>,@VM)
|
||||
If RDSCnt GT 0 then
|
||||
FOR I = 1 TO RDSCnt
|
||||
If RdsNos NE '' then
|
||||
RdsNos := ', '
|
||||
end
|
||||
RdsNos := RDSList<COL$RDS_NO, I>
|
||||
RdsCount += Num(RDSList<COL$RDS_NO, I>)
|
||||
If ReactorList NE '' then
|
||||
ReactorList := ', '
|
||||
end
|
||||
ReactorList := RDSList<COL$REACTOR, I>
|
||||
ReactorCount += Num(RDSList<COL$REACTOR, I>)
|
||||
If RejCntList NE '' then
|
||||
RejCntList := ', '
|
||||
end
|
||||
RejCntList := RDSList<COL$REJ_CNT, I>
|
||||
RejCntCount += Num(RDSList<COL$REJ_CNT, I>)
|
||||
Next I
|
||||
end
|
||||
|
||||
LogMessage = 'Attempting to send NCR data to SPC. Data: {'
|
||||
LogMessage := 'NCR No: ' : NCRNo
|
||||
LogMessage := ', RDS Nos: ' : RdsNos
|
||||
LogMessage := ', Reactors: ' : ReactorList
|
||||
LogMessage := ', Reject Counts: ' : RejCntList
|
||||
LogMessage := ', Reactor Type: ' : ReactorType
|
||||
LogMessage := ', PSN: ' : PSNo
|
||||
LogMessage := ', Responsible Dept: ' : DeptResp
|
||||
LogMessage := ', Loss Code: ' : LossCode
|
||||
LogMessage := ', Loss Desc: ' : LossDesc
|
||||
LogMessage := ', Loss Stage: ' : LossStage
|
||||
LogMessage := ', Loss By: ' : LossBy
|
||||
LogMessage := ', AC Code: ' : ACCode
|
||||
LogMessage := ', AC Desc: ' : ACDesc
|
||||
LogMessage := '}'
|
||||
|
||||
LogDate = Oconv(Date(), 'D4/')
|
||||
LogData = ''
|
||||
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS') ; // Logging DTM
|
||||
LogData<2> = Machine
|
||||
LogData<3> = 'INFO'
|
||||
LogData<4> = LogMessage
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
|
||||
|
||||
ArgsNotNull = NCRNo NE '' and RDSList NE '' and ReactorType NE '' and PSNo NE ''
|
||||
ArgsNotNull = ArgsNotNull EQ True$ and DeptResp NE '' and LossCode NE ''
|
||||
ArgsNotNull = ArgsNotNull EQ True$ and LossDesc NE '' and LossStage NE ''
|
||||
ArgsNotNull = ArgsNotNull EQ True$ and LossBy NE '' and ACCode NE '' and ACDesc NE ''
|
||||
|
||||
RdsListCountsAtLeastOne = RdsCount GE 1 and ReactorCount GE 1 and RejCntCount GE 1
|
||||
RdsListCountsEqual = RdsCount EQ ReactorCount and ReactorCount EQ RejCntCount
|
||||
|
||||
If ArgsNotNull EQ True$ and RdsListCountsAtLeastOne NE False$ and RdsListCountsEqual NE False$ then
|
||||
DataLines = ''
|
||||
|
||||
FOR I = 1 TO RDSCnt
|
||||
|
||||
DataLine = QUOTE(NCRNo):TAB$
|
||||
DataLine := QUOTE(RDSList<COL$RDS_NO, I>):TAB$
|
||||
|
||||
IF ReactorType = 'P' OR ReactorType = 'EPP' THEN
|
||||
DataLine := QUOTE('EP':RDSList<COL$REACTOR, I>):TAB$ ;* EpiPRO reactors in SPC have "EP" on the front.
|
||||
END ELSE
|
||||
DataLine := QUOTE(RDSList<COL$REACTOR, I>):TAB$
|
||||
END
|
||||
|
||||
DataLine := QUOTE(RDSList<COL$REJ_CNT, I>):TAB$
|
||||
DataLine := QUOTE(PSNo):TAB$
|
||||
DataLine := QUOTE(DeptResp):TAB$
|
||||
DataLine := QUOTE(LossCode):TAB$
|
||||
DataLine := QUOTE(LossDesc):TAB$
|
||||
DataLine := QUOTE(LossStage):TAB$
|
||||
DataLine := QUOTE(LossBy):TAB$
|
||||
DataLine := QUOTE(ACCode):TAB$
|
||||
DataLine := QUOTE(ACDesc):TAB$
|
||||
|
||||
DataLines := DataLine:CRLF$
|
||||
|
||||
NEXT I
|
||||
|
||||
DateTime = SRP_Datetime("Now")
|
||||
Year = SRP_Datetime("Year", DateTime)
|
||||
Month = SRP_Datetime("Month", DateTime)
|
||||
Day = SRP_Datetime("Day", DateTime)
|
||||
|
||||
FileName = NCRNo : '_NCR_Data_' : Year : Month : Day : '.txt'
|
||||
Path = Environment_Services('GetSPCDataPath')
|
||||
|
||||
DOSFile = Path : '\' : FileName
|
||||
|
||||
Set_Status(0)
|
||||
|
||||
OSRead DOSRecord FROM DOSFile ELSE
|
||||
ErrCode = Status()
|
||||
IF ErrCode = 4 THEN
|
||||
DOSRecord = '' ;* File doesn't exist
|
||||
END ELSE
|
||||
* ErrMsg('Unable to read DOS file "SPC_Data.TXT" for update. ':ErrCode:' Please try again.') ;* Remarked out per Chad Becker request - dkk 12/9/14
|
||||
RETURN
|
||||
END
|
||||
END
|
||||
|
||||
DOSRecord := DataLines
|
||||
|
||||
OSWrite DOSRecord ON DOSFile
|
||||
|
||||
ErrCode = Status()
|
||||
ErrorMessage = ''
|
||||
Begin Case
|
||||
Case ErrCode EQ 1
|
||||
ErrorMessage = 'Bad filename.'
|
||||
Case ErrCode EQ 2
|
||||
ErrorMessage = 'Cannot write to file. Access denied.'
|
||||
Case ErrCode EQ 3
|
||||
ErrorMessage = 'Disk or directory full.'
|
||||
Case ErrCode EQ 4
|
||||
ErrorMessage = 'File does not exist.'
|
||||
Case ErrCode EQ 5
|
||||
ErrorMessage = 'Unknown error.'
|
||||
Case ErrCode EQ 6
|
||||
ErrorMessage = 'Attempt to write to a read-only file.'
|
||||
End Case
|
||||
|
||||
LogDate = Oconv(Date(), 'D4/')
|
||||
LogData = ''
|
||||
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS') ; // Logging DTM
|
||||
LogData<2> = Machine
|
||||
If ErrorMessage NE '' then
|
||||
ErrorMessage = 'Error in ' : Service : '. When attempting to write the NCR data to a file the following error occurred. ' : ErrorMessage
|
||||
LogData<3> = 'ERROR'
|
||||
LogData<4> = ErrorMessage
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
|
||||
Error_Services('Add', ErrorMessage)
|
||||
end else
|
||||
LogData<3> = 'INFO'
|
||||
LogData<4> = 'Sucessfully sent NCR ' : NCRNo : ' data to SPC in file ' : DOSFile : '.'
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
|
||||
end
|
||||
end else
|
||||
ErrorMessage = 'Error in ' : Service : '. One or more arguments were null or malformed.'
|
||||
LogDate = Oconv(Date(), 'D4/')
|
||||
LogData = ''
|
||||
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS') ; // Logging DTM
|
||||
LogData<2> = Machine
|
||||
LogData<3> = 'ERROR'
|
||||
LogData<4> = ErrorMessage
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
|
||||
Error_Services('Add', ErrorMessage)
|
||||
end
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
// ProcessScanData
|
||||
//
|
||||
// ScanData - [Required]
|
||||
// ScanType - [Required]
|
||||
// FirstCassID - [Required]
|
||||
// OperatorID - [Required]
|
||||
//
|
||||
// Returns the current stage of a lot. Replaces CURR_STAGE calculated column.
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service ProcessScanData(ScanData, ScanType = SCAN_TYPES, FirstCassID, OperatorID)
|
||||
|
||||
If (ScanData NE '') then
|
||||
// Code 3of9 encodes the asterisk and underscore characters. These need to be decoded.
|
||||
ScanData = Scan_Services('DecodeScanData', ScanData)
|
||||
|
||||
If Error_Services('NoError') then
|
||||
|
||||
ColumnIndex = ''
|
||||
ColumnValue = ''
|
||||
// Identify the scan data based on the data identifier prefix (if any). Otherwise, assume this is a
|
||||
// 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
|
||||
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
|
||||
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
|
||||
// non-existent carrier will the scan data be considered invalid.
|
||||
|
||||
cnt = DCount(ScanData, '|')
|
||||
if cnt NE 8 then
|
||||
CassetteID = 0
|
||||
Error_Services('Add', 'Wrong label - Scan 2D Top Label')
|
||||
return
|
||||
end else
|
||||
// RDS should be 3rd position
|
||||
CassetteID = Field(ScanData, '|', 3)
|
||||
Seq1 = Field(ScanData, '|', 8)
|
||||
end
|
||||
|
||||
|
||||
// Strip '1T', 'I', and 'O' prefixes.
|
||||
If CassetteID[1, 2] EQ '1T' then
|
||||
CassetteID[1, 2] = ''
|
||||
If ((CassetteID[1, 1] EQ 'O') or (CassetteID[1, 1] EQ 'I')) then CassetteID[1, 1] = ''
|
||||
end
|
||||
If ( (CassetteID[1, 1] EQ 'O') or (CassetteID[1, 1] EQ 'I') ) then CassetteID[1, 1] = ''
|
||||
|
||||
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)
|
||||
|
||||
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
|
||||
Case RDSCass
|
||||
RDSRow = Database_Services('ReadDataRow', 'RDS', CassetteID)
|
||||
If Error_Services('NoError') then
|
||||
ValidCassID = True$
|
||||
end
|
||||
End Case
|
||||
|
||||
If ( (Seq1 EQ 'SEQ1') or (Seq1 EQ 'SEQ2') ) then
|
||||
Set_Property(@Window, '@SEQ1', Seq1)
|
||||
end else
|
||||
Error_Services('Add', 'Error reading sequence information')
|
||||
end
|
||||
|
||||
If ValidCassID EQ False$ then
|
||||
Error_Services('Add', 'Unrecognized scan data: ':ScanData)
|
||||
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
|
||||
|
||||
Response = ScanData
|
||||
|
||||
Case ScanType EQ 'CASSETTE_2'
|
||||
|
||||
// Assume this is intended to be a Cassette ID scan (either WMO or RDS). Only if this is a
|
||||
// non-existent carrier will the scan data be considered invalid.
|
||||
cnt = DCount(ScanData, '|')
|
||||
if cnt NE 8 then
|
||||
CassetteID = 0
|
||||
Error_Services('Add', 'Wrong label – Scan 2D Bottom Label')
|
||||
return
|
||||
end else
|
||||
// RDS should be 3rd position
|
||||
SecondCassID = Field(ScanData, '|', 3)
|
||||
Seq2 = Field(ScanData, '|', 8)
|
||||
end
|
||||
|
||||
// Strip '1T', 'I', and 'O' prefixes.
|
||||
If SecondCassID[1, 2] EQ '1T' then
|
||||
SecondCassID[1, 2] = ''
|
||||
If ( (SecondCassID[1, 1] EQ 'O') or (SecondCassID[1, 1] EQ 'I') ) then SecondCassID[1, 1] = ''
|
||||
end
|
||||
If ( (SecondCassID[1, 1] EQ 'O') or (SecondCassID[1, 1] EQ 'I') ) then SecondCassID[1, 1] = ''
|
||||
|
||||
ValidCassID = False$ ; // Assume Cassette ID is not valid for now.
|
||||
ScanMismatch = False$
|
||||
SeqMismatch = False$
|
||||
SeqError = False$
|
||||
Convert '*' to '.' in FirstCassID
|
||||
|
||||
If Error_Services('NoError') then
|
||||
ValidCassID = True$
|
||||
If (SecondCassID NE FirstCassID) then
|
||||
ScanMismatch = True$
|
||||
end else
|
||||
Seq1 = Get_Property(@Window, '@SEQ1')
|
||||
Begin Case
|
||||
Case ( (Seq2 NE 'SEQ1') and (Seq2 NE 'SEQ2') )
|
||||
SeqError = True$
|
||||
Case (Seq2 EQ Seq1)
|
||||
SeqMismatch = True$
|
||||
End Case
|
||||
end
|
||||
end
|
||||
|
||||
If ValidCassID EQ False$ then Error_Services('Add', 'Unrecognized scan data: ':ScanData)
|
||||
|
||||
If (ScanMismatch EQ True$) AND (ValidCassID EQ True$) then
|
||||
// Check if first cassette ID is a valid RDS or WM_OUT key
|
||||
Convert '.' to '*' in FirstCassID
|
||||
ValidCassID = False$
|
||||
Begin Case
|
||||
Case ( RowExists('RDS', FirstCassID) EQ True$ )
|
||||
ValidCassID = True$
|
||||
WONo = Xlate('RDS', FirstCassID, 'WO', 'X')
|
||||
CassNo = Xlate('RDS', FirstCassID, 'CASS_NO', 'X')
|
||||
HoldEntity = 'RDS'
|
||||
Case ( RowExists('WM_OUT', FirstCassID) EQ True$ )
|
||||
ValidCassID = True$
|
||||
WONo = Field(FirstCassID, '*', 1, 1)
|
||||
CassNo = Field(FirstCassID, '*', 3, 1)
|
||||
HoldEntity = 'WM_OUT'
|
||||
Case ( RowExists('WM_IN', FirstCassID) EQ True$ )
|
||||
ValidCassID = True$
|
||||
WONo = Field(FirstCassID, '*', 1, 1)
|
||||
CassNo = Field(FirstCassID, '*', 3, 1)
|
||||
HoldEntity = 'WM_IN'
|
||||
Case ( RowExists('WO_MAT', FirstCassID) EQ True$ )
|
||||
ValidCassID = True$
|
||||
WONo = Field(FirstCassID, '*', 1, 1)
|
||||
CassNo = Field(FirstCassID, '*', 2, 1)
|
||||
HoldEntity = 'WO_MAT'
|
||||
Case Otherwise$
|
||||
Null
|
||||
End Case
|
||||
HoldEntityID = FirstCassID
|
||||
// Place first cassette on hold
|
||||
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)
|
||||
|
||||
// Check if second cassette ID is a valid RDS or WM_OUT key
|
||||
Convert '.' to '*' in SecondCassID
|
||||
ValidCassID = False$
|
||||
Begin Case
|
||||
Case ( RowExists('RDS', SecondCassID) EQ True$ )
|
||||
ValidCassID = True$
|
||||
WONo = Xlate('RDS', SecondCassID, 'WO', 'X')
|
||||
CassNo = Xlate('RDS', SecondCassID, 'CASS_NO', 'X')
|
||||
HoldEntity = 'RDS'
|
||||
ValidCassID = True$
|
||||
Case ( RowExists('WM_OUT', SecondCassID) EQ True$ )
|
||||
ValidCassID = True$
|
||||
WONo = Field(SecondCassID, '*', 1, 1)
|
||||
CassNo = Field(SecondCassID, '*', 3, 1)
|
||||
HoldEntity = 'WM_OUT'
|
||||
Case ( RowExists('WM_IN', SecondCassID) EQ True$ )
|
||||
WONo = Field(SecondCassID, '*', 1, 1)
|
||||
CassNo = Field(SecondCassID, '*', 3, 1)
|
||||
HoldEntity = 'WM_IN'
|
||||
ValidCassID = True$
|
||||
Case ( RowExists('WO_MAT', SecondCassID) EQ True$ )
|
||||
WONo = Field(SecondCassID, '*', 1, 1)
|
||||
CassNo = Field(SecondCassID, '*', 2, 1)
|
||||
HoldEntity = 'WO_MAT'
|
||||
ValidCassID = True$
|
||||
Case Otherwise$
|
||||
Null
|
||||
|
||||
End Case
|
||||
If ValidCassID EQ True$ then
|
||||
HoldEntityID = SecondCassID
|
||||
WOMatKey = WONo:'*':CassNo
|
||||
// Place second cassette on hold
|
||||
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)
|
||||
end
|
||||
Message = 'NCR Label verification failed due to mismatched barcodes. Both cassettes placed on hold - Supervisor, Lead, or Engineering disposition required.':CRLF$ |
|
||||
: 'Cassette Label #1: ':FirstCassID:CRLF$ |
|
||||
: 'Cassette Label #2: ':SecondCassID:CRLF$ |
|
||||
: 'Operator: ':OperatorID
|
||||
Error_Services('Add', Message)
|
||||
end else if (SeqMismatch EQ True$) then
|
||||
//do sequence mismatch stuff here
|
||||
Message = 'NCR Label verification failed due to operator double-scanning barcode.':CRLF$ |
|
||||
: 'Cassette: ':FirstCassID:CRLF$ |
|
||||
: 'Operator: ':OperatorID
|
||||
Error_Services('Add', Message)
|
||||
end else if (SeqError EQ True$) then
|
||||
Error_Services('Add', 'Error reading sequence information')
|
||||
end
|
||||
|
||||
ScanData = ''
|
||||
ScanData = SecondCassID
|
||||
Response = ScanData
|
||||
|
||||
End Case
|
||||
|
||||
end
|
||||
end else
|
||||
Error_Services('Add', 'ScanData argument was missing in the ' : Service : ' service.')
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
|
||||
|
||||
|
||||
Service SendToSPC(NCRNo, RDSList, ReactorType, PSNo, DeptResp, LossCode, LossDesc, LossStage, LossBy, ACCode, ACDesc)
|
||||
Headers = 'Logging DTM' : @FM : 'Machine' : @FM : 'Level' : @FM : 'Log'
|
||||
ColumnWidths = 20 : @FM : 12 : @FM : 7 : @FM : 500
|
||||
Machine = Environment_Services('GetServer')
|
||||
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\NCR'
|
||||
makeDirSuccess = Utility("MAKEDIR", LogPath)
|
||||
LogDate = Oconv(Date(), 'D4/')
|
||||
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : '_NcrSendToSpc.csv'
|
||||
objLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, ' ', Headers, ColumnWidths, False$, False$)
|
||||
|
||||
RdsNos = ''
|
||||
RdsCount = 0
|
||||
ReactorList = ''
|
||||
ReactorCount = 0
|
||||
RejCntList = ''
|
||||
RejCntCount = 0
|
||||
|
||||
RDSCnt = DCOUNT(RDSList<1>,@VM)
|
||||
If RDSCnt GT 0 then
|
||||
FOR I = 1 TO RDSCnt
|
||||
If RdsNos NE '' then
|
||||
RdsNos := ', '
|
||||
end
|
||||
RdsNos := RDSList<COL$RDS_NO, I>
|
||||
RdsCount += Num(RDSList<COL$RDS_NO, I>)
|
||||
If ReactorList NE '' then
|
||||
ReactorList := ', '
|
||||
end
|
||||
ReactorList := RDSList<COL$REACTOR, I>
|
||||
ReactorCount += Num(RDSList<COL$REACTOR, I>)
|
||||
If RejCntList NE '' then
|
||||
RejCntList := ', '
|
||||
end
|
||||
RejCntList := RDSList<COL$REJ_CNT, I>
|
||||
RejCntCount += Num(RDSList<COL$REJ_CNT, I>)
|
||||
Next I
|
||||
end
|
||||
|
||||
LogMessage = 'Attempting to send NCR data to SPC. Data: {'
|
||||
LogMessage := 'NCR No: ' : NCRNo
|
||||
LogMessage := ', RDS Nos: ' : RdsNos
|
||||
LogMessage := ', Reactors: ' : ReactorList
|
||||
LogMessage := ', Reject Counts: ' : RejCntList
|
||||
LogMessage := ', Reactor Type: ' : ReactorType
|
||||
LogMessage := ', PSN: ' : PSNo
|
||||
LogMessage := ', Responsible Dept: ' : DeptResp
|
||||
LogMessage := ', Loss Code: ' : LossCode
|
||||
LogMessage := ', Loss Desc: ' : LossDesc
|
||||
LogMessage := ', Loss Stage: ' : LossStage
|
||||
LogMessage := ', Loss By: ' : LossBy
|
||||
LogMessage := ', AC Code: ' : ACCode
|
||||
LogMessage := ', AC Desc: ' : ACDesc
|
||||
LogMessage := '}'
|
||||
|
||||
LogDate = Oconv(Date(), 'D4/')
|
||||
LogData = ''
|
||||
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS') ; // Logging DTM
|
||||
LogData<2> = Machine
|
||||
LogData<3> = 'INFO'
|
||||
LogData<4> = LogMessage
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
|
||||
|
||||
ArgsNotNull = NCRNo NE '' and RDSList NE '' and ReactorType NE '' and PSNo NE ''
|
||||
ArgsNotNull = ArgsNotNull EQ True$ and DeptResp NE '' and LossCode NE ''
|
||||
ArgsNotNull = ArgsNotNull EQ True$ and LossDesc NE '' and LossStage NE ''
|
||||
ArgsNotNull = ArgsNotNull EQ True$ and LossBy NE '' and ACCode NE '' and ACDesc NE ''
|
||||
|
||||
RdsListCountsAtLeastOne = RdsCount GE 1 and ReactorCount GE 1 and RejCntCount GE 1
|
||||
RdsListCountsEqual = RdsCount EQ ReactorCount and ReactorCount EQ RejCntCount
|
||||
|
||||
If ArgsNotNull EQ True$ and RdsListCountsAtLeastOne NE False$ and RdsListCountsEqual NE False$ then
|
||||
DataLines = ''
|
||||
|
||||
FOR I = 1 TO RDSCnt
|
||||
|
||||
DataLine = QUOTE(NCRNo):TAB$
|
||||
DataLine := QUOTE(RDSList<COL$RDS_NO, I>):TAB$
|
||||
|
||||
IF ReactorType = 'P' OR ReactorType = 'EPP' THEN
|
||||
DataLine := QUOTE('EP':RDSList<COL$REACTOR, I>):TAB$ ;* EpiPRO reactors in SPC have "EP" on the front.
|
||||
END ELSE
|
||||
DataLine := QUOTE(RDSList<COL$REACTOR, I>):TAB$
|
||||
END
|
||||
|
||||
DataLine := QUOTE(RDSList<COL$REJ_CNT, I>):TAB$
|
||||
DataLine := QUOTE(PSNo):TAB$
|
||||
DataLine := QUOTE(DeptResp):TAB$
|
||||
DataLine := QUOTE(LossCode):TAB$
|
||||
DataLine := QUOTE(LossDesc):TAB$
|
||||
DataLine := QUOTE(LossStage):TAB$
|
||||
DataLine := QUOTE(LossBy):TAB$
|
||||
DataLine := QUOTE(ACCode):TAB$
|
||||
DataLine := QUOTE(ACDesc):TAB$
|
||||
|
||||
DataLines := DataLine:CRLF$
|
||||
|
||||
NEXT I
|
||||
|
||||
DateTime = SRP_Datetime("Now")
|
||||
Year = SRP_Datetime("Year", DateTime)
|
||||
Month = SRP_Datetime("Month", DateTime)
|
||||
Day = SRP_Datetime("Day", DateTime)
|
||||
|
||||
FileName = NCRNo : '_NCR_Data_' : Year : Month : Day : '.txt'
|
||||
Path = Environment_Services('GetSPCDataPath')
|
||||
|
||||
DOSFile = Path : '\' : FileName
|
||||
|
||||
Set_Status(0)
|
||||
|
||||
OSRead DOSRecord FROM DOSFile ELSE
|
||||
ErrCode = Status()
|
||||
IF ErrCode = 4 THEN
|
||||
DOSRecord = '' ;* File doesn't exist
|
||||
END ELSE
|
||||
* ErrMsg('Unable to read DOS file "SPC_Data.TXT" for update. ':ErrCode:' Please try again.') ;* Remarked out per Chad Becker request - dkk 12/9/14
|
||||
RETURN
|
||||
END
|
||||
END
|
||||
|
||||
DOSRecord := DataLines
|
||||
|
||||
OSWrite DOSRecord ON DOSFile
|
||||
|
||||
ErrCode = Status()
|
||||
ErrorMessage = ''
|
||||
Begin Case
|
||||
Case ErrCode EQ 1
|
||||
ErrorMessage = 'Bad filename.'
|
||||
Case ErrCode EQ 2
|
||||
ErrorMessage = 'Cannot write to file. Access denied.'
|
||||
Case ErrCode EQ 3
|
||||
ErrorMessage = 'Disk or directory full.'
|
||||
Case ErrCode EQ 4
|
||||
ErrorMessage = 'File does not exist.'
|
||||
Case ErrCode EQ 5
|
||||
ErrorMessage = 'Unknown error.'
|
||||
Case ErrCode EQ 6
|
||||
ErrorMessage = 'Attempt to write to a read-only file.'
|
||||
End Case
|
||||
|
||||
LogDate = Oconv(Date(), 'D4/')
|
||||
LogData = ''
|
||||
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS') ; // Logging DTM
|
||||
LogData<2> = Machine
|
||||
If ErrorMessage NE '' then
|
||||
ErrorMessage = 'Error in ' : Service : '. When attempting to write the NCR data to a file the following error occurred. ' : ErrorMessage
|
||||
LogData<3> = 'ERROR'
|
||||
LogData<4> = ErrorMessage
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
|
||||
Error_Services('Add', ErrorMessage)
|
||||
end else
|
||||
LogData<3> = 'INFO'
|
||||
LogData<4> = 'Sucessfully sent NCR ' : NCRNo : ' data to SPC in file ' : DOSFile : '.'
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
|
||||
end
|
||||
end else
|
||||
ErrorMessage = 'Error in ' : Service : '. One or more arguments were null or malformed.'
|
||||
LogDate = Oconv(Date(), 'D4/')
|
||||
LogData = ''
|
||||
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS') ; // Logging DTM
|
||||
LogData<2> = Machine
|
||||
LogData<3> = 'ERROR'
|
||||
LogData<4> = ErrorMessage
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
|
||||
Error_Services('Add', ErrorMessage)
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
|
201
LSL2/STPROC/NDW_VERIFY_BARCODE_EVENTS.txt
Normal file
201
LSL2/STPROC/NDW_VERIFY_BARCODE_EVENTS.txt
Normal file
@ -0,0 +1,201 @@
|
||||
Compile function NDW_VERIFY_BARCODE_EVENTS(CtrlEntId, Event, @PARAMS)
|
||||
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from Infineon.
|
||||
|
||||
Name : NDW_NDW_VERIFY_BARCODE_Events
|
||||
|
||||
Description : This function acts as a commuter module for all events related to this window.
|
||||
|
||||
Notes : Commuter Modules are automatically called from the Promoted_Events function which is called by the
|
||||
application-specific promoted event handler. This makes it possible to add QuickEvents that need to
|
||||
execute Basic+ logic without having use the Form Designer to make the association, although this is
|
||||
limited to the events which are currently promoted.
|
||||
|
||||
If the form needs to call the commuter module directly then the QuickEvent parameters should be
|
||||
formatted like this:
|
||||
|
||||
'@SELF','@EVENT',['@PARAM1','@PARAMx']
|
||||
|
||||
Parameters :
|
||||
CtrlEntId [in] -- The fully qualified name of the control calling the promoted event
|
||||
Event [in] -- The event being executed. See the Notes section regarding "PRE" events
|
||||
Param1-15 [in] -- Additional event parameter holders
|
||||
EventFlow [out] -- Set to 1 or 0 so the calling event knows whether or not to chain forward. See comments in
|
||||
EVENT_SETUP insert
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
08/29/2024 djm Created initial commuter module. Adapted from NDW_PACKAGING_EVENTS.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
#pragma precomp SRP_PreCompiler
|
||||
#window NDW_VERIFY_BARCODE
|
||||
|
||||
$insert APP_INSERTS
|
||||
$insert EVENT_SETUP
|
||||
$insert MSG_EQUATES
|
||||
$insert LSL_USERS_EQUATES
|
||||
$insert MESSAGE_BOX_EQUATES
|
||||
$insert SRP_POPUP_EQUATES
|
||||
$INSERT LOGICAL
|
||||
|
||||
Equ MSG_WIDTH$ to 600
|
||||
|
||||
Declare subroutine SRP_Show_Window, ErrMsg, PlaceDialog
|
||||
Declare function Database_Services, Security_Services, MemberOf, Form_Services, Scan_Services
|
||||
Declare function Message_Box, SRP_Get_Window_Rect, GetTickCount, Ncr_Services
|
||||
|
||||
SubclassInfo = Form_Services('FindSubclassControl')
|
||||
Subclass = SubclassInfo<1>
|
||||
|
||||
// Update the arguments so that the OpenInsight OLE event will treate the ActiveX event as a native event handler.
|
||||
If Event EQ 'OLE' then
|
||||
Transfer Event to OIEvent
|
||||
Transfer Param1 to Event
|
||||
Transfer Param2 to Param1
|
||||
Transfer Param3 to Param2
|
||||
end
|
||||
|
||||
GoToEvent Event for CtrlEntId else
|
||||
// Event not implemented
|
||||
end
|
||||
|
||||
Return EventFlow or 1
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// EVENT HANDLERS
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Event WINDOW.CREATE(CreateParam)
|
||||
|
||||
Gosub GetLotID
|
||||
Set_Property(@Window:'.EDL_CASS_SCAN_1', 'ENABLED', True$)
|
||||
Set_Property(@Window:'.EDL_CASS_SCAN_1', 'FOCUS', True$)
|
||||
PlaceDialog(-2, -2)
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event EDL_CASS_SCAN_1.LOSTFOCUS(Flag, FocusID)
|
||||
|
||||
If Flag EQ 1 then
|
||||
ScanData = Get_Property(CtrlEntID, 'TEXT')
|
||||
ExpectedLot = Get_Property(@Window:'.EDL_LOT_ID', 'TEXT')
|
||||
OperatorID = @User4
|
||||
If ScanData NE '' then
|
||||
|
||||
If Parent EQ 'WM_IN' then
|
||||
ScanData = NCR_Services('ProcessScanData', ScanData, 'WM_IN_1', ExpectedLot, OperatorID)
|
||||
end else
|
||||
ScanData = NCR_Services('ProcessScanData', ScanData, 'CASSETTE_1', ExpectedLot, OperatorID)
|
||||
End
|
||||
If Error_Services('NoError') then
|
||||
Set_Property(CtrlEntID, 'TEXT', ScanData)
|
||||
Set_Property(@Window:'.EDL_CASS_SCAN_2', 'ENABLED', True$)
|
||||
Set_Property(@Window:'.EDL_CASS_SCAN_2', 'FOCUS', True$)
|
||||
Set_Property(CtrlEntID, 'ENABLED', False$)
|
||||
end else
|
||||
GoSub ClearForm
|
||||
ErrorMessage = Error_Services('GetMessage')
|
||||
MsgStruct = ""
|
||||
MsgStruct<MTEXTWIDTH$> = MSG_WIDTH$
|
||||
Msg(@Window, MsgStruct, 'PROCESS_ERROR', '', ErrorMessage)
|
||||
Set_Property(CtrlEntId, 'FOCUS', True$)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event EDL_CASS_SCAN_2.LOSTFOCUS(Flag, FocusID)
|
||||
|
||||
If Flag EQ 1 then
|
||||
|
||||
ScanData = Get_Property(CtrlEntID, 'TEXT')
|
||||
If ScanData NE '' then
|
||||
FirstCassID = Get_Property(@Window:'.EDL_CASS_SCAN_1', 'TEXT')
|
||||
OperatorID = @User4
|
||||
|
||||
If Parent EQ 'WM_IN' then
|
||||
ScanData = NCR_Services('ProcessScanData', ScanData, 'WM_IN_2', FirstCassID, OperatorID)
|
||||
end else
|
||||
ScanData = NCR_Services('ProcessScanData', ScanData, 'CASSETTE_2', FirstCassID, OperatorID)
|
||||
End
|
||||
If Error_Services('NoError') then
|
||||
Set_Property(CtrlEntID, 'TEXT', ScanData)
|
||||
SuccessMessage = 'NCR verification complete!'
|
||||
MsgStruct = ""
|
||||
MsgStruct<MTEXTWIDTH$> = MSG_WIDTH$
|
||||
Msg(@Window, MsgStruct, 'PROCESS_COMPLETE', '', SuccessMessage)
|
||||
End_Dialog(@Window, True$)
|
||||
end else
|
||||
ErrorMessage = Error_Services('GetMessage')
|
||||
If IndexC(ErrorMessage, 'Unrecognized scan data:', 1) or IndexC(ErrorMessage, 'Error reading sequence information', 1) then
|
||||
Set_Property(@Window:'.EDL_CASS_SCAN_2', 'TEXT', '')
|
||||
MsgStruct = ""
|
||||
MsgStruct<MTEXTWIDTH$> = MSG_WIDTH$
|
||||
Msg(@Window, MsgStruct, 'PROCESS_ERROR', '', ErrorMessage)
|
||||
Set_Property(CtrlEntId, 'FOCUS', True$)
|
||||
end else
|
||||
GoSub ClearForm
|
||||
MsgStruct = ""
|
||||
MsgStruct<MTEXTWIDTH$> = MSG_WIDTH$
|
||||
Msg(@Window, MsgStruct, 'PROCESS_ERROR', '', ErrorMessage)
|
||||
If Count(ErrorMessage, 'NCR Label verification failed due to mismatched barcodes.') NE 0 then
|
||||
End_Dialog(@Window, False$)
|
||||
End else
|
||||
Set_Property(@Window:'.EDL_CASS_SCAN_1', 'FOCUS', True$)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event PUB_ENG_OVERRIDE.CLICK()
|
||||
|
||||
VerifyParams = @USER4 : @FM : 'ENGINEERING':@VM:'ENG_TECH' : @FM : '' : @FM : 'Override required by a member of ENGINEERING or ENG_TECH groups'
|
||||
Response = Dialog_Box('NDW_VERIFY_USER', @WINDOW, VerifyParams)
|
||||
Valid = Response<1>
|
||||
OverrideUser = Response<2>
|
||||
|
||||
If Valid then
|
||||
End_Dialog(@Window, True$)
|
||||
end
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event PUB_CANCEL.CLICK()
|
||||
|
||||
End_Dialog(@Window, False$)
|
||||
|
||||
end event
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Internal GoSubs
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClearForm:
|
||||
|
||||
Set_Property(@Window:'.EDL_CASS_SCAN_1' , 'TEXT' , '')
|
||||
Set_Property(@Window:'.EDL_CASS_SCAN_2' , 'TEXT' , '')
|
||||
Set_Property(@Window:'.EDL_CASS_SCAN_1' , 'ENABLED', 1)
|
||||
Set_Property(@Window:'.EDL_CASS_SCAN_2' , 'ENABLED', -1)
|
||||
Set_Property(@Window:'.EDL_LOT_ID' , 'ENABLED', -1)
|
||||
|
||||
return
|
||||
|
||||
GetLotID:
|
||||
|
||||
LotID = Param1
|
||||
Set_Property(@Window:'.EDL_LOT_ID', 'TEXT', LotID)
|
||||
|
||||
return
|
||||
|
||||
|
@ -66,11 +66,11 @@ If Event EQ 'OLE' then
|
||||
Transfer Param1 to Event
|
||||
Transfer Param2 to Param1
|
||||
Transfer Param3 to Param2
|
||||
* Transfer Param4 to Param3
|
||||
* Transfer Param5 to Param4
|
||||
* Transfer Param6 to Param5
|
||||
* Transfer Param7 to Param6
|
||||
* Transfer Param8 to Param7
|
||||
Transfer Param4 to Param3
|
||||
Transfer Param5 to Param4
|
||||
Transfer Param6 to Param5
|
||||
Transfer Param7 to Param6
|
||||
Transfer Param8 to Param7
|
||||
end
|
||||
|
||||
GoToEvent Event for CtrlEntID
|
||||
@ -218,9 +218,9 @@ Event PUB_OK.CLICK()
|
||||
NumGroups = DCount(Groups, @VM)
|
||||
If NumGroups GT 1 then
|
||||
Swap @VM with ' or ' in Groups
|
||||
Message = 'User is not a member of the ' : Groups : ' groups.'
|
||||
Message = 'User is not a member of ':@TM:'the ' : Groups : ' groups.'
|
||||
end else
|
||||
Message = 'User is not a member of the ' : Group : ' group.'
|
||||
Message = 'User is not a member of ':@TM:'the ' : Group : ' group.'
|
||||
end
|
||||
Form_Services('DisplayControlMessage', Message, 'Incorrect Group', @Window : '.EDL_USERNAME', 'VALIDATION', 'RGB(229,20,0)')
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user