modified WO_REC form to select WO_MAT keys instead of relying on WO_LOG<WO_MAT_KEY> field.

refactored print cass labels to select on RDS table for list of RDSes instead of using relational column in WO_STEP table
This commit is contained in:
Infineon\StieberD
2025-07-24 16:57:21 -07:00
parent 6396264e64
commit a48f47ddc9
5 changed files with 548 additions and 63 deletions

View File

@ -12,7 +12,7 @@ DECLARE SUBROUTINE Logging_Services, Post_Event, Work_Order_Services, Error_Serv
DECLARE FUNCTION Get_Property, Get_Status, Popup, Send_Message, Msg, Security_Check, Dialog_Box, RowExists, obj_Prod_Spec
DECLARE FUNCTION obj_Schedule, Dialog_Box, obj_WO_Log, obj_Order_Det, FindWindow,ShowWindow, obj_Tables, obj_WO_Mat, MemberOf
DECLARE FUNCTION Logging_Services, Environment_Services, Work_Order_Services, Error_Services, Service_Services
DECLARE FUNCTION SRP_Array, GetTickCount, Datetime
DECLARE FUNCTION SRP_Array, GetTickCount, Datetime, Wo_Mat_Services
$INSERT POPUP_EQUATES
$INSERT LOGICAL
@ -173,6 +173,26 @@ Read:
Set_Property(@WINDOW:'.RX_DTM','TEXT',CurrDTM)
END
Def = ""
Def<MTEXT$> = "Loading cassette data..."
Def<MTYPE$> = "U"
MsgUp = Msg(@window, Def)
Columns = 'CASS_NO':@VM:'LOT_NO':@VM:'WAFER_QTY':@VM:'CUST_PART_NO':@VM:'SUB_PART_NO':@VM:'SUB_VEND_CD':@VM:'RX_DTM':@VM:'RX_BY':@VM:'ORDER_ITEM'
WOMatKeys = Wo_Mat_Services('GetWOMatKeys', WONo)
If Error_Services('NoError') then
CassData = WO_Mat_Services('GetWOMatData', WOMatKeys, Columns)
If Error_Services('NoError') then
Set_Property(@Window:'.CASS_NO', 'ARRAY', CassData)
Msg(@window, MsgUp)
end else
Msg(@window, MsgUp)
Msg(@Window, '', 'OK', '', 'Process Error':@FM:Error_Services('GetMessage'))
end
end else
Msg(@window, MsgUp)
Msg(@Window, '', 'OK', '', 'Process Error':@FM:Error_Services('GetMessage'))
end
GOSUB Refresh
RETURN
@ -625,12 +645,7 @@ Scan:
end else
LogData<8> = 'N/A'
end
Logging_Services('AppendLog', objReceiveLog, LogData, @RM, @FM)
Def = ""
Def<MTEXT$> = "Processing complete. Refreshing form..."
Def<MTYPE$> = "T5"
Msg(@window, Def)
Logging_Services('AppendLog', objReceiveLog, LogData, @RM, @FM)
Post_Event(@Window, 'READ')
end
@ -916,3 +931,4 @@ AddLeftover:
RETURN

View File

@ -110,12 +110,16 @@ EQU COL$MET_TWSIG_Z2 TO 21
EQU COMMA$ to ','
EQU NEW_EXIST$ To 0 ; * Reduce Mode 0
equ NEXT_CUR$ To 1
equ ADD_EXIST$ to 2
AutoDisplayErrors = FALSE$ ; // Set this to True$ when debugging so all errors will automatically display.
Declare subroutine SRP_Stopwatch, Error_Services, obj_Tables, Metrology_Services, obj_RDS_Test, SRP_JSON, Logging_Services
Declare subroutine RTI_Set_Debugger, Database_Services, Btree.Extract, Extract_SI_Keys, Obj_WO_Mat, Obj_WO_Mat_Log
Declare subroutine Dialog_Box, Obj_Notes, RList, Set_Status, Errmsg, Obj_React_Status , Reactor_Services
Declare subroutine Rds_Services, Obj_Post_Log, Mona_Services, Transaction_Services
Declare subroutine Rds_Services, Obj_Post_Log, Mona_Services, Transaction_Services, Reduce
Declare function SRP_Sort_Array, Metrology_Services, obj_RDS_Test, obj_Test_Point_Map, Database_Services
Declare function Work_Order_Services, SRP_JSON, Logging_Services, Environment_Services, SRP_Trim, Error_Services
Declare function Memberof, Obj_WO_Mat, Obj_WO_Mat_Log, SRP_Array, DateTime, Dialog_Box, obj_Prod_Spec
@ -1984,7 +1988,9 @@ Service PushSigProfileToWoMat(RDSNo)
end service
Service AllTWUseSigned(RDSNo)
If RDSNo NE '' then
LSKeys = Xlate('RDS', RDSNo, 'RDS_LS_SORTED', 'X')
AllMetKeys = XLATE('RDS_LAYER', LSKeys, RDS_LAYER_RDS_TEST_KEYS$, 'X')
@ -2007,6 +2013,55 @@ Service AllTWUseSigned(RDSNo)
Error_Services('Add', ErrorMessage)
end
end
end service
Service GetRDSKeys(WONo)
Response = ''
ErrorMsg = ''
If (WONo NE '') then
If RowExists('WO_LOG', WONo) then
Open 'DICT.RDS' to hDict then
TableName = 'RDS'
SortList = 'RUN_ORDER_NUM'
ReduceScript = 'WITH {WO} EQ ':Quote(WONo)
Mode = NEXT_CUR$
Flag = ''
Cursor = ''
GoSub ClearCursors
Reduce(ReduceScript, SortList, Mode, TableName, Cursor, Flag)
If Flag then
Select TableName by SortList using Cursor then
Open TableName to hTable then
EOF = False$
Loop
Readnext KeyId using Cursor by AT else EOF = True$
Until EOF
Response<0, -1> = KeyId
Repeat
end else
ErrorMsg = 'Error in ':Service:' service. Error opening ':TableName:' table.'
end
end else
ErrorMsg = 'Error in ':Service:' service. Error selecting ':TableName:' table.'
end
end else
ErrorMsg = 'Error in ':Service:' service. Error calling Reduce'
end
end else
ErrorMsg = 'Error in ':Service:' service. Error opening DICT.RDS'
end
end else
ErrorMsg = 'Error in ':Service:' service. WO_LOG ':WONo:' does not exist.'
end
end else
ErrorMsg = 'Error in ':Service:' service. Null WONo passed into service.'
end
If ErrorMsg NE '' then Error_Services('Add', ErrorMsg)
end service
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@ -2021,4 +2076,3 @@ ClearCursors:
return

View File

@ -59,7 +59,7 @@ Declare subroutine obj_WO_Mat, obj_Post_Log
Declare function SRP_Array, Work_Order_Services, Memory_Services, Database_Services, SRP_Sort_Array, SRP_JSON
Declare function Company_Services, obj_Prod_Spec, Schedule_Services, obj_WO_Log, obj_WO_Step, Memberof, Datetime
Declare function Environment_Services, Logging_Services, Hold_Services, Signature_Services, Lot_Services
Declare function SRP_Datetime, RTI_CreateGUID
Declare function SRP_Datetime, RTI_CreateGUID, RDS_Services
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WO_LOG'
LogDate = Oconv(Date(), 'D4/')
@ -938,8 +938,7 @@ Service PrintLabels(WONo)
Msg(@WINDOW,MsgUp)
end ELSE
WOMatKeys = Xlate('WO_LOG', WONo, WO_LOG_WO_MAT_KEY$, 'X')
RDSNos = Xlate('WO_MAT', WOMatKeys, WO_MAT_RDS_NO$, 'X')
RDSNos = RDS_Services('GetRDSKeys', WONo)
end
If INDEX(RDSNos,@VM,1) then
@ -2075,3 +2074,4 @@ ClearCursors:
return

View File

@ -1,16 +1,17 @@
Compile function WO_MAT_Services(@Service, @Params)
#pragma precomp SRP_PreCompiler
Declare function Database_Services, Error_Services, SRP_Json, SRP_Com, Environment_Services, Logging_Services
Declare function Datetime, Rds_Services, GetTickCount
Declare subroutine Error_Services, SRP_Json, SRP_Com, Wo_Mat_Services, Database_Services, Logging_Services
Declare subroutine obj_wo_mat_log, Set_Status, Rds_Services, Signature_Services, Mona_Services
$insert LOGICAL
$Insert APP_INSERTS
$insert WO_MAT_EQUATES
$Insert WO_LOG_EQUATES
$Insert SERVICE_SETUP
$Insert DICT_EQUATES
Declare function Database_Services, Error_Services, SRP_Json, SRP_Com, Environment_Services, Logging_Services
Declare function Datetime, Rds_Services, GetTickCount, SRP_Array
Declare subroutine Error_Services, SRP_Json, SRP_Com, Wo_Mat_Services, Database_Services, Logging_Services
Declare subroutine obj_wo_mat_log, Set_Status, Rds_Services, Signature_Services, Mona_Services, Btree.Extract
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WO_Mat\InvActionsSyncUp'
LogDate = Oconv(Date(), 'D4/')
@ -281,7 +282,9 @@ Service GetWaferMap(WOMatKey)
end service
Service CheckInvActionsSignatureSync()
hSysLists = Database_Services('GetTableHandle', 'SYSLISTS')
Lock hSysLists, ServiceKeyID then
Script = "SELECT WO_MAT_SIG_PROFILE.WO_NO, WO_MAT_SIG_PROFILE.CASS_NO,WO_MAT_SIG_PROFILE.CASS_ID_SAP, WO_MAT_SIG_PROFILE.SIG_DTM, WO_MAT_SIG_PROFILE.SIGNATURE, WMSP.SIG_PROFILE FROM WO_MAT_SIG_PROFILE "
@ -313,9 +316,12 @@ Service CheckInvActionsSignatureSync()
end
Unlock hSysLists, ServiceKeyID else Null
end
end service
Service SyncWOMatInvActionsAndSigProfile(WOMatKey)
If RowExists('WO_MAT', WOMatKey) then
OrigWOMatRec = Database_Services('ReadDataRow', 'WO_MAT', WOMatKey)
WOMatRec = OrigWOMatRec
@ -383,9 +389,12 @@ Service SyncWOMatInvActionsAndSigProfile(WOMatKey)
LogData<5> = 'WO_MAT record did not exist in OpenInsight.'
Logging_Services('AppendLog', objSyncLog, LogData, @RM, @FM)
end
end service
Service CassetteIsLastInWo(WoMatKey)
StartTick = GetTickCount()
MetricName = 'CassetteIsLastInWo'
@ -437,9 +446,12 @@ Service CassetteIsLastInWo(WoMatKey)
EndTick = GetTickCount()
Mona_Services('QueueLatencyAndCountMetrics', MonaResource, MetricName, StartTick, EndTick)
end service
Service SetWoMatVoidFlag(WoMatKey, Username)
ErrorMessage = ''
If RowExists('WO_MAT', WoMatKey) then
WoMatRec = Database_Services('ReadDataRow', 'WO_MAT', WoMatKey, True$, 0, False$)
@ -483,10 +495,10 @@ Service SetWoMatVoidFlag(WoMatKey, Username)
If ErrorMessage NE '' then
Error_Services('Add', ErrorMessage)
end
end service
Service MakeupFlagOn(RDSNo)
EpiCheck = Rds_Services('IsEpiPro', RDSNo)
@ -519,4 +531,56 @@ Service MakeupFlagOn(RDSNo)
end service
Service GetWOMatData(WOMatKeys, Columns)
Response = ''
ErrorMsg = ''
If ( (WOMatKeys NE '') and (Columns NE '') ) then
For each Column in Columns using @VM setting ColPos
Vals = Xlate('WO_MAT', WOMatKeys, Column, 'X')
Conv = Xlate('DICT.WO_MAT', Column, DICT_CONV$, 'X')
If Conv EQ '' then
Response<ColPos> = Vals
end else
Response<ColPos> = OConv(Vals, Conv)
end
Next Column
end else
ErrorMsg = 'Error in ':Service:' service. Null WOMatKeys or Columns passed into service'
end
If ErrorMsg NE '' then Error_Services('Add', ErrorMsg)
end service
Service GetWOMatKeys(WONo)
Response = ''
ErrorMsg = ''
If (WONo NE '') then
If RowExists('WO_LOG', WONo) then
Open 'DICT.WO_MAT' to hDict then
Query = 'WO_NO':@VM:WONo:@FM
WOMatKeys = ''
Flag = ''
ErrCode = ''
Btree.Extract(Query, 'WO_MAT', hDict, WOMatKeys, 'E', Flag)
If Not(Get_Status(ErrCode)) then
If WOMatKeys NE '' then
Response = SRP_Array('SortRows', WOMatKeys, 'AR2', 'LIST', @VM, '*')
end
end else
ErrorMsg = 'Error in ':Service:' service. Error calling Btree.Extract. Error code: ':ErrCode
end
end
end else
ErrorMsg = 'Error in ':Service:' service. WO_LOG ':WONo:' does not exist.'
end
end else
ErrorMsg = 'Error in ':Service:' service. Null WONo passed into service.'
end
If ErrorMsg NE '' then Error_Services('Add', ErrorMsg)
end service