283 lines
12 KiB
Plaintext
283 lines
12 KiB
Plaintext
Function Test_Daniel3(Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10)
|
|
#pragma precomp SRP_PreCompiler
|
|
|
|
Declare subroutine Set_Property, Set_Status, ErrMsg, Set_Property, obj_AppWindow, Send_Message, Logging_Services
|
|
Declare subroutine Btree.Extract, Send_Event, Security_Err_Msg, Forward_Event, End_Window, Start_Window, FTP_Services
|
|
Declare subroutine EditCell, obj_NCR, obj_Notes, Post_Event, obj_WO_Mat, obj_WO_Mat_Log, obj_WO_Wfr, obj_Tables, obj_RDS
|
|
Declare subroutine Error_Services, RDS_Services, Dialog_Box, Insert, Unlock, QA_Services, Validate, Development_Services
|
|
Declare subroutine Update_Index, Database_Services, Obj_WO_Mat_QA, Fmt, Yield, WinYield, Sleepery, Qa_Services,
|
|
Declare subroutine Obj_Post_Log, GaN_Services, Excel_Services, obj_WO_React, Activate_Save_Select, Reduce, FSMsg
|
|
Declare subroutine SRP_Stopwatch, Copy_Record_To_SQL, SQL_Services, Material_Services, Messaging_Services, Utility
|
|
Declare subroutine Reactor_Services, Reactor_Services_Dev, SRP_Stopwatch, Btree.Extract, Set_Env, RDS_React_Run
|
|
Declare subroutine obj_Prod_Spec, Security_Services, Make.List, Write_OI_To_SQL, Send_Info, PSN_Services, Free_Class.Net
|
|
Declare subroutine Work_Order_Services, Test_Daniel2, obj_RDS_Layer, Report_Services, Pass_To_Sql, SRP_JSON, SRP_Run_Command
|
|
Declare subroutine Httpclient_Services, SRP_TcpClient, RTI_Set_Debugger, Sleepery, Set_Env, Extract_SI_Keys, Repository
|
|
Declare subroutine PM_Spec_Services, Push.Select, Pop.Select, GetTempPath, GetEngineVersion
|
|
Declare function Get_Property, Get_Status, Popup, Send_Message, Msg, Security_Check, Dialog_Box, RowExists, Utility
|
|
Declare function Dialog_Box, obj_WO_Log, obj_NCR, Check_Notes, obj_MUWafers, obj_WO_Mat, Error_Services, RDS_Services
|
|
Declare function MemberOf, obj_Tables, obj_RDS, Environment_Services, Logging_Services, Material_Services, ErrMsg
|
|
Declare function Work_Order_Services, RetStack, Min, Max, Obj_Prod_Spec, Insert, SRP_Trim, Xlate, Obj_Wo_Mat
|
|
Declare function Security_Services, QA_Services, Database_Services, RowExists, Rti_Lh_Info, UNICODE_ANSI, UNICODE_UTF8
|
|
Declare function index, Httpclient_Services, SRP_Encode, SRP_Decode, DirList, Obj_Rds_Test, Tool_Parms_Services
|
|
Declare function SQL_Services, RDS_Services, Obj_WM_out, Schedule_Services, Obj_Tool, SRP_Sort_Array, ICONV
|
|
Declare function Development_Services, Obj_WO_Mat_QA, SRP_Join_Arrays, NextKey, Obj_Prod_Spec, FTP_Services, SQL_Format
|
|
Declare function DateTime, GaN_Services, SRP_Array, Excel_Services, EpiPro_Services, Repository, RTI_Task_Submit
|
|
Declare function RTI_Task_Status, Rds_Services, StartDotNet, Reactor_Services, SRP_Get_FileVersion, Direct_Print
|
|
Declare function obj_React_Run, RTI_Lock_Owner, obj_WM_In, Get_Repos_Entities, Get_Printer, Schedule_Services
|
|
Declare function Location_Services, Replication_Services, List_User_Locks, Start_Window, SRP_JSON, SRP_Path
|
|
Declare function Httpclient_Services, SRP_TcpClient, GetTickCount, Repository, Select_Into, Active_Directory_Services
|
|
Declare function Rti_Ldap_Groups_For_User, Wafer_Counter_Services, SRP_Logon, SRP_Get_Printers, Printer_Select
|
|
Declare function RTI_Xlate_Controller, LSL_Users_Services
|
|
|
|
$INSERT LOGICAL
|
|
* $Insert RLIST_EQUATES
|
|
* $INSERT ENVIRON_CONSTANTS
|
|
* $Insert REVCAPI_EQUATES
|
|
* $INSERT MSG_EQUATES
|
|
* $INSERT APPCOLORS
|
|
* $INSERT WM_IN_EQUATES
|
|
* $Insert WM_OUT_EQUATES
|
|
* $INSERT WO_LOG_EQU
|
|
* $INSERT WO_STEP_EQU
|
|
$INSERT WO_MAT_EQUATES
|
|
* $INSERT ORDER_EQU
|
|
* $INSERT RDS_EQUATES
|
|
* $INSERT PROD_SPEC_EQU
|
|
* $INSERT NOTIFICATION_EQU
|
|
* $INSERT LSL_USERS_EQU
|
|
* $INSERT SECURITY_RIGHTS_EQU
|
|
* $INSERT POPUP_EQUATES
|
|
* $INSERT RTI_LH_INFO_EQUATES
|
|
* $INSERT WO_MAT_QA_EQUATES
|
|
* $INSERT CUST_EPI_PART_EQUATES
|
|
* $INSERT PRS_STAGE_EQUATES
|
|
* $Insert RLIST_EQUATES
|
|
* $Insert CLEAN_INSP_EQUATES
|
|
* $Insert TOOL_PARMS_EQUATES
|
|
* $Insert SCHEDULE_EQU
|
|
* $Insert SCHED_DET_EQUATES
|
|
* $Insert SCHEDULER_EQUATES
|
|
* $Insert NCR_EQUATES
|
|
* $Insert REACT_RUN_EQUATES
|
|
* $Insert TOOL_EQUATES
|
|
* $Insert TOOL_LOG_EQUATES
|
|
* $Insert PM_EQUATES
|
|
* $Insert WO_WFR_EQUATES
|
|
$Insert REVDOTNETEQUATES
|
|
* $Insert REACTOR_EQUATES
|
|
* $Insert RDS_TEST_EQUATES
|
|
* $Insert RUN_STAGE_WFR_EQUATES
|
|
* $Insert RTI_DEBUG_COMMON
|
|
* $Insert DICT_EQUATES
|
|
* $Insert SRPMAIL_INSERTS
|
|
* $Insert SCHED_DET_NG_EQUATES
|
|
* $Insert RDS_LAYER_EQUATES
|
|
* $Insert PROD_VER_EQUATES
|
|
* $Insert PM_SPEC_EQUATES
|
|
$Insert SHIFT_CALENDAR_EQUATES
|
|
$Insert LSL_USERS_EQUATES
|
|
* // 02/22/2023 48312 50112 ; // 5 hours = 14400 seconds
|
|
* // Reduce modes (for Select statement)
|
|
* Equ NEW_EXIST$ To 0
|
|
* Equ NEXT_CUR$ To 1
|
|
* Equ ADD_EXIST$ To 2
|
|
*
|
|
* EQU COL$QA_MET_PHASE_MIN TO 17
|
|
*
|
|
Equ Tab$ to \09\
|
|
Equ CRLF$ to \0D0A\
|
|
Equ LF$ to \0A\
|
|
Equ Comma$ to ','
|
|
|
|
$Insert PS_EQUATES
|
|
*
|
|
* $INSERT PRINTSETUP_EQUATES
|
|
* equ REV_CREATE_ENGINE_NO_UI$ to 0x040
|
|
|
|
Main:
|
|
* debug
|
|
* LSLUsers = ''
|
|
* Open 'LSL_USERS' to hUsers then
|
|
* EOF = False$
|
|
* Select hUsers
|
|
* Loop
|
|
* Readnext UserId else EOF = True$
|
|
* Until EOF
|
|
* LSLUsers<-1> = UserId
|
|
* If Not(RowExists('NOTE_PTRS', UserId)) then
|
|
*
|
|
* Database_Services('WriteDataRow', 'NOTE_PTRS', UserId, '', True$, False$, True$)
|
|
* end
|
|
* Repeat
|
|
* end
|
|
* Ptrs = ''
|
|
* Open 'NOTE_PTRS' to hPtrs then
|
|
* EOF = False$
|
|
* Select hPtrs
|
|
* Loop
|
|
* Readnext Ptr else EOF = True$
|
|
* Until EOF
|
|
* Ptrs<-1> = Ptr
|
|
*
|
|
* Repeat
|
|
* end
|
|
*
|
|
* Diff = SRP_Array('Join', LSLUsers, Ptrs, 'AND', @FM)
|
|
*
|
|
* return
|
|
|
|
* return
|
|
* Messaging_Services('SendMessage', 'RunProcedure', 'Request', '', 'All', 'RTP27,ACTIVE_DIRECTORY_SERVICES', '', '', '')
|
|
Messaging_Services('SendMessage', 'RunProcedure', 'Request', '', 'All', 'RTP27,COMM_NOTE_PTRS', '', '', '')
|
|
Messaging_Services('SendMessage', 'RunProcedure', 'Request', '', 'All', 'RTP27,NOTE_PTRS_ACTIONS', '', '', '')
|
|
Messaging_Services('SendMessage', 'RunProcedure', 'Request', '', 'All', 'RTP27,NOTES_SERVICES', '', '', '')
|
|
* Messaging_Services('SendMessage', 'RunProcedure', 'Request', '', 'All', 'RTP27,DATABASE_SERVICES', '', '', '')
|
|
* Messaging_Services('SendMessage', 'RunProcedure', 'Request', '', 'All', 'RTP27,LSL_USERS_SERVICES', '', '', '')
|
|
* Messaging_Services('SendMessage', 'RunProcedure', 'Request', '', 'All', 'RTP27,NDW_AUDIT_REPORT_EVENTS', '', '', '')
|
|
* Messaging_Services('SendMessage', 'RunProcedure', 'Request', '', 'All', 'RTP27,NDW_MAIN_EVENTS', '', '', '')
|
|
* Messaging_Services('SendMessage', 'RunProcedure', 'Request', '', 'All', 'RTP27,NDW_SCHEDULE_SEARCH_EVENTS', '', '', '')
|
|
* Messaging_Services('SendMessage', 'RunProcedure', 'Request', '', 'All', 'RTP27,NOTE_MESSAGE', '', '', '')
|
|
* Messaging_Services('SendMessage', 'RunProcedure', 'Request', '', 'All', 'RTP27,NOTES_SERVICES', '', '', '')
|
|
* Messaging_Services('SendMessage', 'RunProcedure', 'Request', '', 'All', 'RTP27,OBJ_NOTE_PTRS', '', '', '')
|
|
* Messaging_Services('SendMessage', 'RunProcedure', 'Request', '', 'All', 'RTP27,OBJ_NOTES_SENT', '', '', '')
|
|
* Messaging_Services('SendMessage', 'RunProcedure', 'Request', '', 'All', 'RTP27,OBJ_NOTES', '', '', '')
|
|
*
|
|
* Messaging_Services('SendMessage', 'RunProcedure', 'Request', '', 'All', 'RTP27,OBJ_PROD_SPEC', '', '', '')
|
|
* Messaging_Services('SendMessage', 'RunProcedure', 'Request', '', 'All', 'RTP27,OBJ_REACTOR_LOG', '', '', '')
|
|
* Messaging_Services('SendMessage', 'RunProcedure', 'Request', '', 'All', 'RTP27,PRINT_WO_MASTER_SCHEDULER', '', '', '')
|
|
* Messaging_Services('SendMessage', 'RunProcedure', 'Request', '', 'All', 'RTP27,SQL_SERVICES', '', '', '')
|
|
* Messaging_Services('SendMessage', 'RunProcedure', 'Request', '', 'All', 'RTP27,SVC_SCHEDULER', '', '', '')
|
|
* Messaging_Services('SendMessage', 'RunProcedure', 'Request', '', 'All', 'RTP27,TOOL_SERVICES', '', '', '')
|
|
* Messaging_Services('SendMessage', 'RunProcedure', 'Request', '', 'All', 'RTP27,WAFER_COUNTER_SERVICES', '', '', '')
|
|
* Messaging_Services('SendMessage', 'RunProcedure', 'Request', '', 'All', 'RTP27,WO_SET_SCHEDULE', '', '', '')
|
|
|
|
|
|
* debug
|
|
* Recipients = ''
|
|
* SentFrom = @USER4
|
|
*
|
|
* SendToGroup = 'RDS_HOLD' : @VM : 'FI_SUPPORT'
|
|
*
|
|
* Subject = 'Testing 2'
|
|
* Message = 'Testing 1234'
|
|
* AttachWindow = ''
|
|
* AttachKey = ''
|
|
*
|
|
* Parms = Recipients:@RM:SentFrom:@RM:Subject:@RM:Message:@RM:AttachWindow:@RM:AttachKey:@RM:SendToGroup
|
|
* obj_Notes('Create',Parms)
|
|
*
|
|
*
|
|
return
|
|
|
|
* Main:
|
|
* debug
|
|
* Open 'LSL_USERS' to hTable then
|
|
* EOF = False$
|
|
* Select hTable
|
|
* Loop
|
|
* Readnext KeyID else EOF = True$
|
|
* Until EOF
|
|
* ReadV Shift from hTable, KeyID, LSL_USERS_SHIFT$ then
|
|
* Commit = True$
|
|
* Begin Case
|
|
* Case Shift EQ 1
|
|
* NewShift = 'A'
|
|
* Case Shift EQ 2
|
|
* NewShift = 'B'
|
|
* Case Shift EQ 3
|
|
* NewShift = 'C'
|
|
* Case Shift EQ 4
|
|
* NewShift = 'D'
|
|
* Case Shift EQ 'M-F'
|
|
* NewShift = ''
|
|
* Case Otherwise$
|
|
* Commit = False$
|
|
* End Case
|
|
* If Commit then
|
|
* WriteV NewShift on hTable, KeyID, LSL_USERS_SHIFT$ else
|
|
* debug
|
|
* end
|
|
* end
|
|
* end else
|
|
* debug
|
|
* end
|
|
* Repeat
|
|
* end
|
|
*
|
|
* Return
|
|
|
|
|
|
Main2:
|
|
|
|
For FiscalYear = 2022 to 2025 Step 1
|
|
|
|
FiscalWeeks = Xlate('FISCAL_YR', FiscalYear, 'WK_NO', 'X')
|
|
FiscalStartDts = Xlate('FISCAL_YR', FiscalYear, 'WK_START_DT', 'X')
|
|
FiscalEndDts = Xlate('FISCAL_YR', FiscalYear, 'WK_END_DT', 'X')
|
|
FiscalMonthNos = Xlate('FISCAL_YR', FiscalYear, 'WK_MONTH_NO', 'X')
|
|
FiscalQtrs = Xlate('FISCAL_YR', FiscalYear, 'WK_QTR_NO', 'X')
|
|
|
|
For each FiscalWeek in FiscalWeeks using @VM setting vPos
|
|
|
|
FiscalStartDt = FiscalStartDts<0, vPos>
|
|
FiscalEndDt = FiscalEndDts<0, vPos>
|
|
If FiscalMonthNos<0, vPos> NE '' then
|
|
FiscalMonthNo = FiscalMonthNos<0, vPos>
|
|
end
|
|
If FiscalQtrs<0, vPos> NE '' then
|
|
FiscalQtr = FiscalQtrs<0, vPos>
|
|
end
|
|
|
|
For InternalDate = FiscalStartDt to FiscalEndDt Step 1
|
|
|
|
FirstShiftRec = ''
|
|
SecondShiftRec = ''
|
|
|
|
OutDate = OConv(InternalDate, 'D4/')
|
|
OutDatePlusOne = OConv(InternalDate + 1, 'D4/')
|
|
FirstShiftStartTime = '06:00:00AM'
|
|
FirstShiftStartDtm = OutDate : ' ' : FirstShiftStartTime
|
|
FirstShift = LSL_Users_Services('GetShiftByDate', FirstShiftStartDtm)
|
|
FirstShiftEndDtm = OutDate : ' 5:59:59PM'
|
|
SecondShiftStartTime = '06:00:00PM'
|
|
SecondShiftStartDtm = OutDate : ' ' : SecondShiftStartTime
|
|
SecondShift = LSL_Users_Services('GetShiftByDate', SecondShiftStartDtm)
|
|
|
|
SecondShiftEndDtm = OutDatePlusOne : ' 05:59:59AM'
|
|
|
|
ShiftDate = OConv(InternalDate, 'DH')
|
|
ShiftMonth = Field(ShiftDate, ' ', 1, 1)
|
|
ShiftDay = Field(ShiftDate, ' ', 1, 2)
|
|
Convert ' ' to '' in ShiftDay
|
|
ShiftYear = Field(ShiftDate, ' ', 3, 1)
|
|
|
|
FirstShiftKey = ShiftDay : '*' : FiscalYear : '*' : FirstShift
|
|
SecondShiftKey = ShiftDay : '*' : FiscalYear : '*' : SecondShift
|
|
|
|
FirstShiftRec<SHIFT_CALENDAR.START_DTM$> = IConv(FirstShiftStartDtm, 'DT')
|
|
FirstShiftRec<SHIFT_CALENDAR.END_DTM$> = IConv(FirstShiftEndDtm, 'DT')
|
|
FirstShiftRec<SHIFT_CALENDAR.FISCAL_WEEK$> = 'WW':FiscalWeek; // Just use Fiscal year week. Ask Evan if ISOWW is necessary
|
|
FirstShiftRec<SHIFT_CALENDAR.FISCAL_MONTH$> = FiscalMonthNo
|
|
FirstShiftRec<SHIFT_CALENDAR.FISCAL_QUARTER$> = 'Q':FiscalQtr
|
|
|
|
Database_Services('WriteDataRow', 'SHIFT_CALENDAR', FirstShiftKey, FirstShiftRec)
|
|
|
|
SecondShiftRec<SHIFT_CALENDAR.START_DTM$> = IConv(SecondShiftStartDtm, 'DT')
|
|
SecondShiftRec<SHIFT_CALENDAR.END_DTM$> = IConv(SecondShiftEndDtm, 'DT')
|
|
SecondShiftRec<SHIFT_CALENDAR.FISCAL_WEEK$> = 'WW':FiscalWeek; // Just use Fiscal year week. Ask Evan if ISOWW is necessary
|
|
SecondShiftRec<SHIFT_CALENDAR.FISCAL_MONTH$> = FiscalMonthNo
|
|
SecondShiftRec<SHIFT_CALENDAR.FISCAL_QUARTER$> = 'Q':FiscalQtr
|
|
|
|
Database_Services('WriteDataRow', 'SHIFT_CALENDAR', SecondShiftKey, SecondShiftRec)
|
|
|
|
Next InternalDate
|
|
|
|
Next FiscalWeek
|
|
|
|
Next FiscalYear
|
|
|
|
return
|
|
|
|
|
|
|