Commit to save progress.
Feature complete. Ready for UAT. Minor changes to ZPL Hold header and darkness. Implement post UAT changes. fixed small bug in WMO reprint event logic formatted code and removed commented out code
This commit is contained in:
committed by
Infineon\StieberD
parent
6050b346a5
commit
507c6bffba
@ -3,12 +3,14 @@ Compile function Labeling_Services(@Service, @Params)
|
||||
|
||||
Declare Function Database_Services, Environment_Services, Set_Printer, Direct_Print, Printer_Select, Error_Services
|
||||
Declare Function Logging_Services, Datetime
|
||||
Declare subroutine Error_Services, Labeling_Services, Lot_Services
|
||||
Declare subroutine Error_Services, Labeling_Services, Lot_Services, SRP_Set_Clipboard
|
||||
|
||||
$insert LOGICAL
|
||||
$Insert LOT_EQUATES
|
||||
$Insert TEST_WAFER_PROD_EQUATES
|
||||
$Insert RETURN_TO_FAB_LOTS_EQUATES
|
||||
$Insert LSL_USERS_EQUATES
|
||||
$Insert WO_MAT_EQUATES
|
||||
|
||||
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\LabelPrinting'
|
||||
LogDate = Oconv(Date(), 'D4/')
|
||||
@ -27,6 +29,7 @@ Return Response or ""
|
||||
// Service Parameter Options
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
Options LOAD_LOCK_SIDE = 'Left', 'Right', 'Both'
|
||||
Options STAGES = 'PRE', 'POST'
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// SERVICES
|
||||
@ -77,6 +80,153 @@ Service PrintLabel(ZPLString, PrinterId)
|
||||
end service
|
||||
|
||||
|
||||
Service ReprintHoldLabel(EntityType, LotID)
|
||||
|
||||
WOMatKey = ''
|
||||
Begin Case
|
||||
Case EntityType EQ 'RDS'
|
||||
WOMatKey = Xlate('RDS', LotID, 'WO_MAT_KEY', 'X')
|
||||
Reactor = Xlate('RDS', LotID, 'REACTOR', 'X')
|
||||
PSN = Xlate('RDS', LotID, 'PROD_SPEC_ID', 'X')
|
||||
Case EntityType EQ 'WM_IN'
|
||||
WOMatKey = Xlate('WM_IN', LotID, 'WO_MAT_KEY', 'X')
|
||||
Reactor = 'EPP'
|
||||
PSN = Xlate('WM_IN', LotID, 'PS_NO', 'X')
|
||||
Case EntityType EQ 'WM_OUT'
|
||||
WOMatKey = Xlate('WM_OUT', LotID, 'WO_MAT_KEY', 'X')
|
||||
Reactor = 'EPP'
|
||||
PSN = Xlate('WM_OUT', LotID, 'PS_NO', 'X')
|
||||
End Case
|
||||
WOMatRec = Xlate('WO_MAT', WOMatKey, '', 'X')
|
||||
Stage = WOMatRec<WO_MAT_HOLD_STAGE$>
|
||||
Reason = WOMatRec<WO_MAT_HOLD_START_REASON$,1>
|
||||
HoldBy = WOMatRec<WO_MAT_HOLD_START_USER$,1>
|
||||
DTM = WOMatRec<WO_MAT_HOLD_START_DTM$,1>
|
||||
Interrupted = WOMatRec<WO_MAT_HOLD_INTERRUPTED$>
|
||||
If (Stage NE '') AND (Reason NE '') AND (HoldBy NE '') AND (DTM NE '') then
|
||||
Labeling_Services('PrintHoldLabel', EntityType, LotID, Stage, Reason, HoldBy, DTM, PSN, Reactor, Interrupted)
|
||||
end else
|
||||
Error_Services('Add', 'Error reprinting label.')
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service PrintHoldLabel(EntityType, LotID, Stage=STAGES, Reason, HoldBy, DTM, PSN, Reactor, Interrupted, PrinterSelect)
|
||||
|
||||
If (EntityType NE '') AND (LotID NE '') AND (Stage NE '') AND (Reason NE '') AND (HoldBy NE '') AND (DTM NE '') then
|
||||
ZPLString = ''
|
||||
// Print Params
|
||||
ZPLString := '^XA'
|
||||
ZPLString := '^LH0,0'
|
||||
ZPLString := '^PR1'
|
||||
ZPLString := '^LL406'
|
||||
ZPLString := '^PW900'
|
||||
ZPLString := '^MD22'
|
||||
ZPLString := '^MMT'
|
||||
// Hold Header
|
||||
ZPLString := '^FO350,24,2^FWN^A050,50^FDHold^FS'
|
||||
// Lot ID
|
||||
ZPLString := '^FO40,80,2^FWN^A035,35^FDLot ID:^FS'
|
||||
ZPLString := '^FO140,80,2^FWN^A035,35^FD<LotVal>^FS'
|
||||
// Reactor
|
||||
ZPLString := '^FO450,80,2^FWN^A035,35^FDReactor:^FS'
|
||||
ZPLString := '^FO570,80,2^FWN^A035,35^FD<ReactorVal>^FS'
|
||||
// PSN
|
||||
ZPLString := '^FO640,80,2^FWN^A035,35^FDPSN:^FS'
|
||||
ZPLString := '^FO715,80,2^FWN^A035,35^FD<PSNVal>^FS'
|
||||
// Pre box and X
|
||||
ZPLString := '^FO40,125,2^FWN^A035,35^FDPre:^FS'
|
||||
ZPLString := '^FO120,120^GB35,35,2^FS'
|
||||
ZPLString := '^FO127,125,2^FWN^A035,35^FD<PreX>^FS'
|
||||
// Post box and X
|
||||
ZPLString := '^FO170,125,2^FWN^A035,35^FDPost:^FS'
|
||||
ZPLString := '^FO252,120^GB35,35,2^FS'
|
||||
ZPLString := '^FO259,125,2^FWN^A035,35^FD<PostX>^FS'
|
||||
// Process interrupted box and X
|
||||
ZPLString := '^FO465,125,2^FWN^A035,35^FDProcess Interrupted:^FS'
|
||||
ZPLString := '^FO760,120^GB35,35,2^FS'
|
||||
ZPLString := '^FO767,125,2^FWN^A035,35^FD<InterruptX>^FS'
|
||||
// Reason
|
||||
ZPLString := '^FO40,175,2^FWN^A035,35^FDReason:^FS'
|
||||
ZPLString := '^FO160,175,2^FWN^A035,35^FD<ReasonVal1>^FS'
|
||||
ZPLString := '^FO40,220,2^FWN^A035,35^FD<ReasonVal2>^FS'
|
||||
ZPLString := '^FO40,265,2^FWN^A035,35^FD<ReasonVal3>^FS'
|
||||
// Hold By
|
||||
ZPLString := '^FO40,310,2^FWN^A035,35^FDOn Hold By:^FS'
|
||||
ZPLString := '^FO210,310,2^FWN^A035,35^FD<HoldByVal>^FS'
|
||||
// Date/Time
|
||||
ZPLString := '^FO40,355,2^FWN^A035,35^FDDate/Time:^FS'
|
||||
ZPLString := '^FO195,355,2^FWN^A035,35^FD<DTMVal>^FS'
|
||||
// End
|
||||
ZPLString := '^XZ'
|
||||
|
||||
Begin Case
|
||||
Case EntityType EQ 'WM_IN'
|
||||
EntityType = 'WMI'
|
||||
Case EntityType EQ 'WM_OUT'
|
||||
EntityType = 'WMO'
|
||||
Case Otherwise$
|
||||
End Case
|
||||
EntityString = EntityType :'-': LotID
|
||||
UserRec = Database_Services('ReadDataRow', 'LSL_USERS', HoldBy)
|
||||
FullName = UserRec<LSL_USERS_FIRST$> : ' ' : UserRec<LSL_USERS_LAST$>
|
||||
DTM = Oconv(DTM, 'DT2/^H')
|
||||
|
||||
If Len(Reason) GE 45 then
|
||||
// Breaks the reason up to fit the lines
|
||||
Dummy = Reason[45, 'B':' ']
|
||||
ReasonLine1 = Reason[1, Col1()]
|
||||
Reason = Reason[Col1() + 1, 999]
|
||||
Dummy = Reason[55, 'B':' ']
|
||||
ReasonLine2 = Reason[1, Col1()]
|
||||
Reason = Reason[Col1() + 1, 999]
|
||||
Dummy = Reason[55, 'B':' ']
|
||||
ReasonLine3 = Reason[1, Col1()]
|
||||
end else
|
||||
ReasonLine1 = Reason
|
||||
ReasonLine2 = ''
|
||||
ReasonLine3 = ''
|
||||
end
|
||||
|
||||
Swap '<LotVal>' With EntityString in ZPLString
|
||||
Swap '<PSNVal>' With PSN in ZPLString
|
||||
Swap '<ReactorVal>' With Reactor in ZPLString
|
||||
|
||||
If Stage EQ 'PRE' then
|
||||
Swap '<PreX>' With 'X' in ZPLString
|
||||
Swap '<PostX>' With '' in ZPLString
|
||||
end else
|
||||
Swap '<PreX>' With '' in ZPLString
|
||||
Swap '<PostX>' With 'X' in ZPLString
|
||||
end
|
||||
|
||||
If Interrupted EQ True$ then
|
||||
Swap '<InterruptX>'with 'X' in ZPLString
|
||||
end else
|
||||
Swap '<InterruptX>'with '' in ZPLString
|
||||
end
|
||||
|
||||
Swap '<ReasonVal1>' With ReasonLine1 in ZPLString
|
||||
Swap '<ReasonVal2>' With ReasonLine2 in ZPLString
|
||||
Swap '<ReasonVal3>' With ReasonLine3 in ZPLString
|
||||
|
||||
Swap '<HoldByVal>' With FullName in ZPLString
|
||||
Swap '<DTMVal>' With DTM in ZPLString
|
||||
|
||||
If PrinterSelect NE '' then
|
||||
Labeling_Services('PrintLabel', ZPLString, PrinterSelect)
|
||||
end else
|
||||
Labeling_Services('PrintLabel', ZPLString, Printer)
|
||||
end
|
||||
|
||||
end else
|
||||
Error_Services('Add', 'Missing parameter. EntityType, LotID, Stage, Reason, HoldBy, DTM, PSN, Reactor, and Interrupted are required fields.')
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service PrintTestWaferLotLabel(LotId, Username, PrinterId)
|
||||
|
||||
ErrorMessage = ''
|
||||
@ -118,7 +268,6 @@ Service PrintTestWaferLotLabel(LotId, Username, PrinterId)
|
||||
end else
|
||||
//Log Error for lot
|
||||
ErrorMessage = Error_Services('GetMessage')
|
||||
|
||||
end
|
||||
end
|
||||
end else
|
||||
@ -178,7 +327,8 @@ Service GetAllZebraPrinters()
|
||||
ZebraPrinterList<7> = 'MESZBRPRT008' : @VM : '10.95.164.24' : @VM : 9100
|
||||
ZebraPrinterList<8> = 'MESZBRPRT0011' : @VM : '10.95.15.33' : @VM : 6101
|
||||
ZebraPrinterList<9> = 'FI_ZEBRA_PRINTER' : @VM : '10.95.164.55' : @VM : 9100
|
||||
If Server EQ 'MESTSA01EC' OR Server EQ 'MESSA01EC' or Server EQ 'MESTSA09EC' or Server EQ 'MESTSA010EC' or Server EQ 'MESTSA011EC' or Server EQ 'MESTSA012EC' then
|
||||
If Server EQ 'MESTSA01EC' OR Server EQ 'MESSA01EC' or Server EQ 'MESTSA09EC' |
|
||||
or Server EQ 'MESTSA010EC' or Server EQ 'MESTSA011EC' or Server EQ 'MESTSA012EC' then
|
||||
ZebraPrinterList<10> = 'JONATHAN_HOME_TEST' : @VM : '192.168.0.123' : @VM : 9100
|
||||
end
|
||||
|
||||
@ -218,7 +368,9 @@ Service PrintReactorLabel(ReactNo, LoadLockSide=LOAD_LOCK_SIDE)
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service GetReturnToFabLabelZPL(RTFId)
|
||||
|
||||
ZPLStringLabel = ''
|
||||
LotRec = Database_Services('ReadDataRow', 'RETURN_TO_FAB_LOTS', RTFId)
|
||||
CassId = LotRec<RETURN_TO_FAB_LOTS_CASS_ID$>
|
||||
@ -249,10 +401,6 @@ Service GetReturnToFabLabelZPL(RTFId)
|
||||
ZPLStringLabel := '^FO500,105^CI28'
|
||||
ZPLStringLabel := '^XZ'
|
||||
Response = ZPLStringLabel
|
||||
|
||||
end service
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user