refactored codebase to not rely on WO_LOG calculated column indexes

This commit is contained in:
Infineon\StieberD
2025-07-11 13:27:14 -07:00
parent b53e805929
commit 2a6c0afddf
23 changed files with 2697 additions and 39059 deletions

View File

@ -118,7 +118,7 @@ EQU COL$STEP_SCHED_DTM TO 11
EQU COMMA$ to ','
Declare subroutine Errmsg, Btree.Extract, Set_Status, Logging_Services, Work_Order_Services, Start_Window, obj_WO_Log
Declare subroutine obj_Notes, Comm_Customer_Epi, Print_WO, obj_WO_Mat, obj_WM_In, obj_WO_Mat, obj_RDS, Msg
Declare subroutine obj_Notes, Comm_Customer_Epi, Print_WO, obj_WO_Mat, obj_WM_In, obj_WO_Mat, obj_RDS, Msg, PlaceDialog
Declare subroutine Security_Err_Msg, obj_WM_Out, Database_Services, End_Window, Print_Shelf_Label, Signature_Services
Declare Subroutine Service_Services
Declare function obj_WO_Log, Work_Order_Services, Environment_Services, Logging_Services, Memberof, NextKey
@ -127,14 +127,9 @@ Declare function Database_Services, Unassigned, obj_WO_Mat, obj_RDS, Security_
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WO_LOG'
LogDate = Oconv(Date(), 'D4/')
LogTime = Oconv(Time(), 'MTS')
* LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' Ctrl Performance Log.csv'
* Headers = 'Logging DTM':@FM:'Ctrl':@FM:'Load/Calculate Time'
* objCtrlLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, COMMA$, Headers, '', False$, False$)
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' Release Log.csv'
Headers = 'Logging DTM' : @FM : 'User' : @FM : 'Notes'
objReleaseLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, COMMA$, Headers, '', False$, False$)
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
// Update the arguments so that the OpenInsight OLE event will treate the ActiveX event as a native event handler.
@ -167,8 +162,7 @@ Event WINDOW.CREATE(CreateParam)
Set_Property(@Window:'.EDL_WO_NO', 'TEXT', CreateParam)
Post_Event(@Window, 'READ')
end
FormSize = ''
SRP_Show_Window(@Window, '', 'C', 'C', 1, '', False$, False$, FormSize)
PlaceDialog(-2, -2)
End Event
@ -537,7 +531,7 @@ Event PUB_DUE_IN_WO.CLICK()
MsgUp = Msg(@WINDOW,'','SELECT_OPEN_WO')
WOKeys = ''
SelectStatement = 'CURR_STATUS':@VM:'ASN':@VM:'AWM':@VM:'RTP':@FM
SelectStatement = 'CURR_STATUS_STATIC':@VM:'ASN':@VM:'AWM':@VM:'RTP':@FM
Btree.Extract(SelectStatement, 'WO_LOG', DictWOLogTable, WOKeys, '', '')
@ -1310,7 +1304,9 @@ Event PUB_REM_CASS.CLICK()
end event
Event PUB_REM_WM_OUT.CLICK()
ErrorMessage = ''
WONo = Get_Property(@WINDOW:'.EDL_WO_NO','TEXT')
@ -1367,7 +1363,7 @@ Event PUB_REM_WM_OUT.CLICK()
end
end
If ErrorMessage EQ '' then
//Now send a message
// Now send a message
Recipients = XLATE('NOTIFICATION','WO_ENTRY',NOTIFICATION_USER_ID$,'X')
SentFrom = @USER4
Subject = 'Cassettes removed from WO ':WONo
@ -1390,81 +1386,9 @@ Event PUB_REM_WM_OUT.CLICK()
Msg('Error in voiding lots process : ' : ErrorMessage)
end
GoSub PopulateControls
end event
* Event PUB_REM_WM_OUT.CLICK()
* WONo = Get_Property(@WINDOW:'.EDL_WO_NO','TEXT')
* WOStepKey = XLATE('WO_LOG', WONo, WO_LOG_WO_STEP_KEY$, 'X')
* IF WONo NE '' then
*
* WORec = XLATE('WO_LOG',WONo,'','X')
* WOMatKeys = WORec<WO_LOG_WO_MAT_KEY$>
* WMOutKeys = Database_Services('ReadDataColumn', 'WO_STEP', WOStepKey, WO_STEP_WM_OUT_KEYS$, True$, 0, False$)
* WMOutCnt = COUNT(WMOutKeys,@VM) + (WMOutKeys NE '')
*
* Display = ''
* DispLine = 1
*
* IF WMOutCnt > 0 THEN
*
* FOR I = WMOutCnt TO 1 STEP -1
* WMORec = XLATE('WM_OUT',WMOutKeys<1,I>,'','X')
* WMO_RdsNos = WMORec<WM_OUT_RDS$>
* WMO_NCRNos = WMORec<WM_OUT_SLOT_NCR$>
* WMO_UMWCassIDs = WMORec<WM_OUT_UMW_CASS_ID$>
* CONVERT @VM TO '' IN WMO_RdsNos
* CONVERT @VM TO '' IN WMO_NCRNos
* CONVERT @VM TO '' IN WMO_UMWCassIDs
*
* UNTIL WMO_RdsNos NE '' OR WMO_NCRNos NE '' OR WMO_UMWCassIDs NE ''
* Display<1,DispLine,1> = FIELD(WOMatKeys<1,I>,'*',2)
* Display<1,DispLine,2> = OCONV(obj_WM_Out('CurrStatus',WOMatKeys<1,I>:@RM:WMORec),'[WO_MAT_CURR_STATUS_CONV]')
* Display<1,DispLine,3> = WMOutKeys<1,I>
* DispLine += 1
* NEXT I
*
* IF Display NE '' THEN
* TypeOver = ''
* TypeOver<PDISPLAY$> = Display
* TypeOver<PTITLE$> = 'Unused WM_OUT Cassettes'
* WMOData = Popup(@WINDOW,TypeOver,'UNUSED_WM_OUT')
* IF WMOData = '' OR WMOData = CHAR(27) THEN RETURN ;* Cancelled out
* END ELSE
* ErrMsg('All cassettes on this Work Order have started processing.')
* RETURN
* END
*
* DelWMOutKeys = ''
* FOR I = 1 TO COUNT(WMOData,@FM) + (WMOData NE '')
* DelWMOutKeys<1,I> = WMOData<I,3>
* NEXT I
*
* TestWMOutKeys = DelWMOutKeys
*
* IF TestWMOutKeys NE '' THEN
* for each WMOutKey in TestWMOutKeys using @VM
* Work_Order_Services('SignVoidWMO', WMOutKey, @USER4)
* Next WMOutKey
* If Error_Services('HasError') then
* Msg(@Window, Error_Services('GetMessage'))
* end
* END
* END
*
* IF Display = '' THEN
* ErrMsg('All cassettes on this Work Order have had wafers placed in them.')
* RETURN
* END
*
* IF Get_Status(errCode) THEN
* ErrMsg(errCode)
* END
*
* GoSub PopulateControls
* end
*
* end event
Event PUB_RECALL.CLICK()
@ -1897,15 +1821,7 @@ return
GetColumnData:
* LoadTimeStart = GetTickCount()
Val = Xlate('WO_LOG', WONo, Col, 'X')
// Logging for optimization purposes
* LoadTimeStop = GetTickCount()
* LoadTimeDuration = LoadTimeStop - LoadTimeStart
* LogData<2> = Col
* LogData<3> = LoadTimeDuration
* Logging_Services('AppendLog', objCtrlLog, LogData, @RM, @FM)
If Unassigned(CtrlConv) then CtrlConv = ''
If CtrlConv EQ '' then
Locate Col in WOLogFields using @VM setting ConvPos then