Merged PR 13813: Lot void routines enhancement

Lot void routines enhancement

Related work items: #110807
This commit is contained in:
Ouellette Jonathan (CSC FI SPS MESLEO) 2025-03-27 18:51:25 +01:00
parent 507c6bffba
commit b76db6bc72
22 changed files with 3950 additions and 2447 deletions

View File

@ -1,415 +1,420 @@
Compile function Automated_Workflow_Services(@Service, @Params) Compile function Automated_Workflow_Services(@Service, @Params)
/* /*
Initial Author: Jonathan Ouellette Initial Author: Jonathan Ouellette
This service module has a catalogued list of functions to quickly and easily perform certain functions related to lot This service module has a catalogued list of functions to quickly and easily perform certain functions related to lot
processing. processing.
1. CreateAWO - Imitates the process of getting data from SAP and processing the WO start in OI. 1. CreateAWO - Imitates the process of getting data from SAP and processing the WO start in OI.
2. RouteWO - Imitates routing of a WO, AKA selecting a ProdVer and Assigning the WO to a reactor Type 2. RouteWO - Imitates routing of a WO, AKA selecting a ProdVer and Assigning the WO to a reactor Type
3. PrescribeWafers - Imitates creating the child lots for a WO, AKA creating WO_MAT records 3. PrescribeWafers - Imitates creating the child lots for a WO, AKA creating WO_MAT records
4. ReleaseCassettes - Assigns raw substrates to the WO_MAT records. RDS for non-epipro is created at this point. 4. ReleaseCassettes - Assigns raw substrates to the WO_MAT records. RDS for non-epipro is created at this point.
5. PerformPTI - Imitates Receiving operator moving the lot into the fab. 5. PerformPTI - Imitates Receiving operator moving the lot into the fab.
6. Perform1VER - Performs the 1VER operation for an RDS. 6. Perform1VER - Performs the 1VER operation for an RDS.
7. PerformLoad - Performs the load operation for an RDS. 7. PerformLoad - Performs the load operation for an RDS.
8. PerformUnload - Performs the unload operation for a non-epipro RDS. 8. PerformUnload - Performs the unload operation for a non-epipro RDS.
9. EnterRecipeParms - Used in conjunction with PerformLoad. Used to enter the parameters for the Reactor Recipe upon load 9. EnterRecipeParms - Used in conjunction with PerformLoad. Used to enter the parameters for the Reactor Recipe upon load
typically this is the first load of a Work Order. typically this is the first load of a Work Order.
10. VerifyRecipeParms - Used in conjunction with PerformLoad. Used to verify the current recipe setpoints for an RDS load. 10. VerifyRecipeParms - Used in conjunction with PerformLoad. Used to verify the current recipe setpoints for an RDS load.
*/ */
#pragma precomp SRP_PreCompiler #pragma precomp SRP_PreCompiler
Declare function Gan_Services, Obj_Notes_Sent, msg, Check_Notes, Jonathan_Services, Database_Services, SRP_Datetime Declare function Gan_Services, Obj_Notes_Sent, msg, Check_Notes, Jonathan_Services, Database_Services, SRP_Datetime
Declare function Lsl_Users_Services, SRP_Time, RList, Error_Services, Obj_Wo_Mat, Pm_Services, Date_Services, Test_Run_Services Declare function Lsl_Users_Services, SRP_Time, RList, Error_Services, Obj_Wo_Mat, Pm_Services, Date_Services, Test_Run_Services
Declare function Reactor_Services, Reactor_Log_Services, obj_react_item, Utility, Environment_Services, obj_wo_log, Qa_Services Declare function Reactor_Services, Reactor_Log_Services, obj_react_item, Utility, Environment_Services, obj_wo_log, Qa_Services
Declare subroutine Start_Window, RList, Set_Status, Database_Services, Obj_Sap, Sap_Services, Btree.Extract, Qa_Services Declare subroutine Start_Window, RList, Set_Status, Database_Services, Obj_Sap, Sap_Services, Btree.Extract, Qa_Services
Declare subroutine Reactor_Services, Obj_Wo_Log, obj_wo_mat, Work_Order_Services, Material_Movement_Services, Automated_Workflow_Services Declare subroutine Reactor_Services, Obj_Wo_Log, obj_wo_mat, Work_Order_Services, Material_Movement_Services, Automated_Workflow_Services
Declare subroutine Override_Services, Obj_Wo_Mat_Log, obj_post_log, Obj_Sap Declare subroutine Override_Services, Obj_Wo_Mat_Log, obj_post_log, Obj_Sap
$insert LOGICAL $insert LOGICAL
$insert NOTE_PTRS_EQU $insert NOTE_PTRS_EQU
$insert MSG_EQUATES $insert MSG_EQUATES
$Insert APP_INSERTS $Insert APP_INSERTS
$Insert RLIST_EQUATES $Insert RLIST_EQUATES
$Insert WO_LOG_EQUATES $Insert WO_LOG_EQUATES
$Insert RDS_EQUATES $Insert RDS_EQUATES
$Insert WO_STEP_EQUATES $Insert WO_STEP_EQUATES
$Insert WO_MAT_QA_EQUATES $Insert WO_MAT_QA_EQUATES
$Insert REACT_RUN_EQUATES $Insert REACT_RUN_EQUATES
$Insert RDS_LAYER_EQUATES $Insert RDS_LAYER_EQUATES
$Insert RDS_TEST_EQUATES $Insert RDS_TEST_EQUATES
$Insert PM_EQUATES $Insert PM_EQUATES
$Insert PM_SPEC_EQUATES $Insert PM_SPEC_EQUATES
$Insert WO_MAT_EQUATES $Insert WO_MAT_EQUATES
$Insert WM_OUT_EQUATES $Insert WM_OUT_EQUATES
$Insert TEST_RUN_EQUATES $Insert TEST_RUN_EQUATES
$Insert TEST_RUN_WAFER_EQUATES $Insert TEST_RUN_WAFER_EQUATES
$Insert TEST_WAFER_PROD_EQUATES $Insert TEST_WAFER_PROD_EQUATES
$Insert TEST_RUN_TYPE_EQUATES $Insert TEST_RUN_TYPE_EQUATES
$Insert EPI_PART_EQUATES $Insert EPI_PART_EQUATES
$Insert POPUP_EQUATES $Insert POPUP_EQUATES
$Insert REACTOR_EQUATES $Insert REACTOR_EQUATES
GoToService GoToService
Return Response or "" Return Response or ""
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// SERVICES // SERVICES
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
Service CreatAWO() Service CreatAWO()
//Step 1: Start a WO WOLogFileIn variable emulates what an SAP file would have //Step 1: Start a WO WOLogFileIn variable emulates what an SAP file would have
/* /*
ProdOrdNo = FileIn<1,1> ProdOrdNo = FileIn<1,1>
CustPONo = FileIn<1,2> CustPONo = FileIn<1,2>
PromiseShipDt = FileIn<1,3> PromiseShipDt = FileIn<1,3>
EpiPartNo = FileIn<1,4> EpiPartNo = FileIn<1,4>
SubPartNo = FileIn<1,5> SubPartNo = FileIn<1,5>
SubRevNo = FileIn<1,6> SubRevNo = FileIn<1,6>
WOQty = FileIn<1,7> WOQty = FileIn<1,7>
VendCd = FileIn<1,8> VendCd = FileIn<1,8>
*/ */
WOLogFileIn = 'M124567.1':@VM:'NA':@VM:'02/29/2024':@VM:'400149S':@VM:'827906':@VM:'1.0':@VM:'150':@VM:'NA' debug
RetVal = obj_WO_LOG('SAPCreate',WOLogFileIn) WOLogFileIn = 'M999930.1':@VM:'NA':@VM:'02/29/2024':@VM:'U053':@VM:'931968':@VM:'1.0':@VM:'2400':@VM:'NA'
Response = RetVal RetVal = obj_WO_LOG('SAPCreate',WOLogFileIn)
end service Response = RetVal
end service
Service RouteWO(WO_No)
//Step 2: Route a WO with a Product Version Service RouteWO(WO_No)
//Step 2: Route a WO with a Product Version
WOLogRec = Database_Services('ReadDataRow', 'WO_LOG', WO_No)
EpiPartNo = WOLogRec<WO_LOG_EPI_PART_NO$> WOLogRec = Database_Services('ReadDataRow', 'WO_LOG', WO_No)
If EpiPartNo NE '' then EpiPartNo = WOLogRec<WO_LOG_EPI_PART_NO$>
AllProdVerNos = XLATE('EPI_PART',EpiPartNo,EPI_PART_PROD_VER_NO$,'X') If EpiPartNo NE '' then
TypeOver = '' AllProdVerNos = XLATE('EPI_PART',EpiPartNo,EPI_PART_PROD_VER_NO$,'X')
TypeOver<PDISPLAY$> = AllProdVerNos TypeOver = ''
TypeOver<PSELECT$> = 1 TypeOver<PDISPLAY$> = AllProdVerNos
TypeOver<PMODE$> = 'K' TypeOver<PSELECT$> = 1
SelectedProdVerNo = Popup(@WINDOW,TypeOver,'PROD_VER') TypeOver<PMODE$> = 'K'
If SelectedProdVerNo NE '' then SelectedProdVerNo = Popup(@WINDOW,TypeOver,'PROD_VER')
obj_WO_Log('Route',WO_No:@RM:SelectedProdVerNo) If SelectedProdVerNo NE '' then
end obj_WO_Log('Route',WO_No:@RM:SelectedProdVerNo)
end end
end service end
end service
Service PrescribeWafers(WONo, AmountToRX)
//Step 3: prescribe wafers. This is the same as assigning lot numbers to individual lots of raw material. AKA creating WO_MAT records Service PrescribeWafers(WONo, AmountToRX)
/* //Step 3: prescribe wafers. This is the same as assigning lot numbers to individual lots of raw material. AKA creating WO_MAT records
a. User clicks the PUB_RX button on the WO_LOG form. /*
b. Opens WO Receipt form a. User clicks the PUB_RX button on the WO_LOG form.
c. Users clicks on WO's Due in b. Opens WO Receipt form
d. User selects or enters a WO. c. Users clicks on WO's Due in
e. User clicks scan codes, opens d. User selects or enters a WO.
*/ e. User clicks scan codes, opens
debug */
ProdVerNo = XLATE('WO_LOG', WONo, 'PROD_VER_NO', 'X') debug
ReactType = XLATE('WO_LOG', WONo, 'REACT_TYPE', 'X') ProdVerNo = XLATE('WO_LOG', WONo, 'PROD_VER_NO', 'X')
CassLotNo = '123456789' ReactType = XLATE('WO_LOG', WONo, 'REACT_TYPE', 'X')
CustPartNo = XLATE('WO_LOG', WONo, 'CUST_PART_NO', 'X') CassLotNo = '123456789'
CassQty = 25 CustPartNo = XLATE('WO_LOG', WONo, 'CUST_PART_NO', 'X')
NumCassToRX = AmountToRX / 25 CassQty = 25
ExistingWOMatList = XLATE('WO_LOG', WONo, 'WO_MAT_KEY', 'X') NumCassToRX = AmountToRX / 25
LastCassNo = 0 ExistingWOMatList = XLATE('WO_LOG', WONo, 'WO_MAT_KEY', 'X')
for each cass in ExistingWOMatList using @VM setting iPos LastCassNo = 0
thisCassNo = FIELD(cass, '*', 2) for each cass in ExistingWOMatList using @VM setting iPos
if thisCassNo GT LastCassNo then LastCassNo = thisCassNo thisCassNo = FIELD(cass, '*', 2)
Next cass if thisCassNo GT LastCassNo then LastCassNo = thisCassNo
for i = 1 to NumCassToRX Next cass
NextCassNo = LastCassNo + 1 for i = 1 to NumCassToRX
LastCassNo = nextCassNo NextCassNo = LastCassNo + 1
Parms = WONo:@RM LastCassNo = nextCassNo
Parms := NextCassNo:@RM Parms = WONo:@RM
Parms := ProdVerNo:@RM Parms := NextCassNo:@RM
Parms := CassLotNo:@RM Parms := ProdVerNo:@RM
Parms := CassQty:@RM Parms := CassLotNo:@RM
Parms := CustPartNo:@RM ;* This is the CUSTOMER part No Parms := CassQty:@RM
Parms := 1:@RM Parms := CustPartNo:@RM ;* This is the CUSTOMER part No
Parms := ReactType:@RM ;* 3 character Reactor Type Code Parms := 1:@RM
Parms := '':@RM Parms := ReactType:@RM ;* 3 character Reactor Type Code
Parms := 'SR':@RM ;* Warehouse = 'SR' - Shipping/Receiving Area Parms := '':@RM
Parms := 'RB':@RM ;* Location = 'RB' - Receiving Bench Parms := 'SR':@RM ;* Warehouse = 'SR' - Shipping/Receiving Area
Parms := OCONV(SRP_Datetime('Now'), 'DT/4'):@RM Parms := 'RB':@RM ;* Location = 'RB' - Receiving Bench
Parms := 'JONATHAN_O':@RM Parms := OCONV(SRP_Datetime('Now'), 'DT/4'):@RM
Parms := '':@RM Parms := 'JONATHAN_O':@RM
Parms := '':@RM Parms := '':@RM
Parms := '':@RM ;* Added 8/18/2009 JCH Parms := '':@RM
Parms := '':@RM ;* Added 12/16/2009 JCH Parms := '':@RM ;* Added 8/18/2009 JCH
Parms := 25:@RM ;* Added 11/4/2009 JCH Parms := '':@RM ;* Added 12/16/2009 JCH
Parms := 0:@RM ;* Added 05/14/2010 JCH Parms := 25:@RM ;* Added 11/4/2009 JCH
Parms := '':@RM ;* Added 07/14/2011 for SAP Project JCH Parms := 0:@RM ;* Added 05/14/2010 JCH
Parms := 25 ; // Added 02/01/2018 dmb Parms := '':@RM ;* Added 07/14/2011 for SAP Project JCH
obj_WO_Mat('Create',Parms) Parms := 25 ; // Added 02/01/2018 dmb
If Error_Services('NoError') then obj_WO_Mat('Create',Parms)
WOLogRec = Database_Services('ReadDataRow', 'WO_LOG', WONo) If Error_Services('NoError') then
WOLogRec<WO_LOG_WO_MAT_KEY$, -1> = WONo : '*' : LastCassNo WOLogRec = Database_Services('ReadDataRow', 'WO_LOG', WONo)
Database_Services('WriteDataRow', 'WO_LOG', WONo, WOLogRec, 1, 0, 1) WOLogRec<WO_LOG_WO_MAT_KEY$, -1> = WONo : '*' : LastCassNo
end Database_Services('WriteDataRow', 'WO_LOG', WONo, WOLogRec, 1, 0, 1)
Next i end
Work_Order_Services('UpdateReceivedQty', WONo) Next i
Work_Order_Services('UpdateReceivedQty', WONo)
end service
end service
Service ReleaseCassettes(WONo)
Service ReleaseCassettes(WONo)
//Step 4: User clicks release cassettes(PUB_RELEASE) from WO_LOG form
Work_Order_Services('ReleaseCassettes', WONo) //Step 4: User clicks release cassettes(PUB_RELEASE) from WO_LOG form
//Can get RDS number at this point Work_Order_Services('ReleaseCassettes', WONo)
end service //Can get RDS number at this point
end service
Service PerformPTI(CassID)
//Step 5: User performs a PTI scan to tag lot into the fab. Service PerformPTI(CassID)
Warehouse = '1K' debug
Location = 'PTI' //Step 5: User performs a PTI scan to tag lot into the fab.
Material_Movement_Services('SaveRecord', CassID, Warehouse, Location, @USER4) Warehouse = '1K'
end service Location = 'PTI'
Material_Movement_Services('SaveRecord', CassID, Warehouse, Location, @USER4)
* Service BatchProcessLotList() end service
* RDSList = ''
* * Service BatchProcessLotList()
* RDSList<1> = 627134 * RDSList = ''
* RDSList<2> = 627135 *
* RDSList<3> = 627136 * RDSList<1> = 627134
* RDSList<4> = 627132 * RDSList<2> = 627135
* RDSList<5> = 627133 * RDSList<3> = 627136
* * RDSList<4> = 627132
* for each rds in RDSList using @FM * RDSList<5> = 627133
* //Automated_Workflow_Services('Perform1VER', rds, 63, 25) *
* Automated_Workflow_Services('PerformUnload', rds) * for each rds in RDSList using @FM
* Next rds * //Automated_Workflow_Services('Perform1VER', rds, 63, 25)
* end service * Automated_Workflow_Services('PerformUnload', rds)
* Next rds
Service Perform1VER(CassID, ReactorID, WfrQty) * end service
//Step 6 Service Perform1VER(CassID, ReactorID, WfrQty)
If RowExists('RDS', CassID) AND ReactorID NE '' then
ReadyToSign = QA_Services('PreEpiSignatureReady', CassID, @User4, WfrQty, ReactorID) //Step 6
If (ReadyToSign EQ True$) then If RowExists('RDS', CassID) AND ReactorID NE '' then
QA_Services('SignPreEpiStage', CassID, @USER4, WfrQty, ReactorID) ReadyToSign = QA_Services('PreEpiSignatureReady', CassID, @User4, WfrQty, ReactorID)
end If (ReadyToSign EQ True$) then
end QA_Services('SignPreEpiStage', CassID, @USER4, WfrQty, ReactorID)
end
end service end
Service PerformLoad(CassID, WfrInQty, LorRLL) end service
//Step 7 Service PerformLoad(CassID, WfrInQty, LorRLL)
If RowExists('RDS', CassID) then
ReadyToSign = Qa_Services('LoadSignatureReady', CassID, @User4, WfrInQty, LorRLL, 0) //Step 7
If ReadyToSign then If RowExists('RDS', CassID) then
Qa_Services('SignLoadStage', CassID, @User4, WfrInQty, LorRLL, 0) ReadyToSign = Qa_Services('LoadSignatureReady', CassID, @User4, WfrInQty, LorRLL, 0)
end else If ReadyToSign then
ErrorReason = Error_Services('GetMessage') Qa_Services('SignLoadStage', CassID, @User4, WfrInQty, LorRLL, 0)
Begin Case end else
Case ErrorReason EQ 'Process Error: Recipe parameters have not been entered.' ErrorReason = Error_Services('GetMessage')
//Get the expected parameters and enter them. This is in the RDS_Layer Record Begin Case
//First lets get limits from the RDS Layer Record(s) Case ErrorReason EQ 'Process Error: Recipe parameters have not been entered.'
RDSLayerKeys = XLATE('RDS', CassID, RDS_RDS_LAYER_KEYS$, 'X') //Get the expected parameters and enter them. This is in the RDS_Layer Record
for each RDSLayerKey in RDSLayerKeys using @VM setting rlPos //First lets get limits from the RDS Layer Record(s)
Automated_Workflow_Services('EnterRecipeParams', RDSLayerKey) RDSLayerKeys = XLATE('RDS', CassID, RDS_RDS_LAYER_KEYS$, 'X')
If Error_Services('NoError') then for each RDSLayerKey in RDSLayerKeys using @VM setting rlPos
Automated_Workflow_Services('PerformLoad', CassID, WfrInQty, LorRLL) Automated_Workflow_Services('EnterRecipeParams', RDSLayerKey)
end else If Error_Services('NoError') then
//Die Automated_Workflow_Services('PerformLoad', CassID, WfrInQty, LorRLL)
Return end else
end //Die
Next RDSLayerKey Return
Case ErrorReason EQ 'RDS layer parameters must be reviewed for accuracy and acknowledged before the load operation can be signed.' end
Automated_Workflow_Services('VerifyRecipeParams', CassID) Next RDSLayerKey
If Error_Services('NoError') then Case ErrorReason EQ 'RDS layer parameters must be reviewed for accuracy and acknowledged before the load operation can be signed.'
Automated_Workflow_Services('PerformLoad', CassID, WfrInQty, LorRLL) Automated_Workflow_Services('VerifyRecipeParams', CassID)
end else If Error_Services('NoError') then
//Die Automated_Workflow_Services('PerformLoad', CassID, WfrInQty, LorRLL)
Return end else
end //Die
End Case Return
end end
end End Case
end service end
end
Service PerformUnload(RDSNo) end service
//Step 8
Service PerformUnload(RDSNo)
If RDSNo NE '' then //Step 8
Reactor = XLATE('RDS', RDSNo, 'REACTOR', 'X')
If Reactor NE '' then If RDSNo NE '' then
ReadyToSign = QA_Services('UnloadSignatureReady', RDSNo, @User4, Reactor) Reactor = XLATE('RDS', RDSNo, 'REACTOR', 'X')
If Error_Services('HasError') then If Reactor NE '' then
If ErrorMsg EQ 'Cassette runtime exceeds three days! An override by a LEAD or SUPERVISOR is required.' then ReadyToSign = QA_Services('UnloadSignatureReady', RDSNo, @User4, Reactor)
Override_Services('SetOverride', 'RDS', RDSNo, 'UNLOAD_DTM', @USER4) If Error_Services('HasError') then
ReadyToSign = True$ If ErrorMsg EQ 'Cassette runtime exceeds three days! An override by a LEAD or SUPERVISOR is required.' then
end Override_Services('SetOverride', 'RDS', RDSNo, 'UNLOAD_DTM', @USER4)
end ReadyToSign = True$
If ReadyToSign then end
QA_Services('SignUnloadStage', RDSNo, @User4) end
end If ReadyToSign then
end else QA_Services('SignUnloadStage', RDSNo, @User4)
Error_Services('Add', 'No Reactor assigned to RDS!') end
end end else
end else Error_Services('Add', 'No Reactor assigned to RDS!')
Error_Services('Add', 'No RDS No. Supplied!') end
end end else
end service Error_Services('Add', 'No RDS No. Supplied!')
end
Service PerformFQA(RDSNo) end service
ToolID = '' Service PerformFQA(RDSNo)
WHCd = 'CR'
LocCD = 'QA' ToolID = ''
Tag = '' WHCd = 'CR'
SigDt = Date() LocCD = 'QA'
SigTm = Time() Tag = ''
WONo = XLATE('RDS', RDSNo, RDS_WO$, 'X') SigDt = Date()
CassNo = XLATE('RDS', RDSNo, RDS_CASS_NO$, 'X') SigTm = Time()
WONo = XLATE('RDS', RDSNo, RDS_WO$, 'X')
Equ COL$LOG_FILE to 1 CassNo = XLATE('RDS', RDSNo, RDS_CASS_NO$, 'X')
Equ COL$LOG_DTM to 2
Equ COL$ACTION to 3 Equ COL$LOG_FILE to 1
Equ COL$WH_CD to 4 Equ COL$LOG_DTM to 2
Equ COL$LOC_CD to 5 Equ COL$ACTION to 3
Equ COL$WO_NOS to 6 Equ COL$WH_CD to 4
Equ COL$CASS_NOS to 7 Equ COL$LOC_CD to 5
Equ COL$USER_ID to 8 Equ COL$WO_NOS to 6
Equ COL$TAGS to 9 Equ COL$CASS_NOS to 7
Equ COL$TOOL_ID to 10 Equ COL$USER_ID to 8
EventParms = '' Equ COL$TAGS to 9
EventParms<COL$LOG_FILE> = 'WO_MAT' Equ COL$TOOL_ID to 10
EventParms<COL$LOG_DTM> = SigDt:' ':SigTm EventParms = ''
EventParms<COL$ACTION> = 1:'QA' EventParms<COL$LOG_FILE> = 'WO_MAT'
EventParms<COL$WH_CD> = 'CR' EventParms<COL$LOG_DTM> = SigDt:' ':SigTm
EventParms<COL$LOC_CD> = 'QA' EventParms<COL$ACTION> = 1:'QA'
EventParms<COL$WO_NOS> = WONo EventParms<COL$WH_CD> = 'CR'
EventParms<COL$CASS_NOS> = CassNo EventParms<COL$LOC_CD> = 'QA'
EventParms<COL$USER_ID> = @USER4 EventParms<COL$WO_NOS> = WONo
EventParms<COL$TAGS> = '' EventParms<COL$CASS_NOS> = CassNo
EventParms<COL$TOOL_ID> = '' EventParms<COL$USER_ID> = @USER4
EventParms<COL$TAGS> = ''
CONVERT @FM TO @RM IN EventParms EventParms<COL$TOOL_ID> = ''
obj_WO_Mat_Log('Create',EventParms) ;* * * * * INV EVENT LOG * * * * * CONVERT @FM TO @RM IN EventParms
Obj_Post_Log('POST')
obj_WO_Mat_Log('Create',EventParms) ;* * * * * INV EVENT LOG * * * * *
Qa_Services('SignFQAStage', RDSNo, @USER4) Obj_Post_Log('POST')
end service
Qa_Services('SignFQAStage', RDSNo, @USER4)
end service
Service EnterRecipeParams(RDSLayerKey)
RDSLayerRec = Database_Services('ReadDataRow', 'RDS_LAYER', RDSLayerKey) Service EnterRecipeParams(RDSLayerKey)
If RDSLayerRec NE '' then
If RDSLayerRec<RDS_LAYER_EPI_TIME_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_EPI_TIME_MAX$> NE '' then RDSLayerRec = Database_Services('ReadDataRow', 'RDS_LAYER', RDSLayerKey)
//Epi Deposit Time If RDSLayerRec NE '' then
RDSLayerRec<RDS_LAYER_EPI_TIME$> = ((RDSLayerRec<RDS_LAYER_EPI_TIME_MAX$> - RDSLayerRec<RDS_LAYER_EPI_TIME_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_EPI_TIME_MIN$> If RDSLayerRec<RDS_LAYER_EPI_TIME_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_EPI_TIME_MAX$> NE '' then
end //Epi Deposit Time
RDSLayerRec<RDS_LAYER_EPI_TIME$> = ((RDSLayerRec<RDS_LAYER_EPI_TIME_MAX$> - RDSLayerRec<RDS_LAYER_EPI_TIME_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_EPI_TIME_MIN$>
If RDSLayerRec<RDS_LAYER_DILUENT_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_DILUENT_MAX$> NE '' then end
//Diluent
RDSLayerRec<RDS_LAYER_DILUENT_ADJ_PARAM$> = ((RDSLayerRec<RDS_LAYER_DILUENT_MAX$> - RDSLayerRec<RDS_LAYER_DILUENT_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_DILUENT_MIN$> If RDSLayerRec<RDS_LAYER_DILUENT_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_DILUENT_MAX$> NE '' then
end //Diluent
RDSLayerRec<RDS_LAYER_DILUENT_ADJ_PARAM$> = ((RDSLayerRec<RDS_LAYER_DILUENT_MAX$> - RDSLayerRec<RDS_LAYER_DILUENT_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_DILUENT_MIN$>
If RDSLayerRec<RDS_LAYER_DOPANT_FLOW_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_DOPANT_FLOW_MAX$> NE '' then end
//Dopant Flow
RDSLayerRec<RDS_LAYER_DOPANT_FLOW$> = ((RDSLayerRec<RDS_LAYER_DOPANT_FLOW_MAX$> - RDSLayerRec<RDS_LAYER_DOPANT_FLOW_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_DOPANT_FLOW_MIN$> If RDSLayerRec<RDS_LAYER_DOPANT_FLOW_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_DOPANT_FLOW_MAX$> NE '' then
end //Dopant Flow
RDSLayerRec<RDS_LAYER_DOPANT_FLOW$> = ((RDSLayerRec<RDS_LAYER_DOPANT_FLOW_MAX$> - RDSLayerRec<RDS_LAYER_DOPANT_FLOW_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_DOPANT_FLOW_MIN$>
If RDSLayerRec<RDS_LAYER_HCL_FLOW_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_HCL_FLOW_MAX$> NE '' then end
//HCL Flow
RDSLayerRec<RDS_LAYER_HCL_FLOW$> = ((RDSLayerRec<RDS_LAYER_HCL_FLOW_MAX$> - RDSLayerRec<RDS_LAYER_HCL_FLOW_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_HCL_FLOW_MIN$> If RDSLayerRec<RDS_LAYER_HCL_FLOW_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_HCL_FLOW_MAX$> NE '' then
end //HCL Flow
RDSLayerRec<RDS_LAYER_HCL_FLOW$> = ((RDSLayerRec<RDS_LAYER_HCL_FLOW_MAX$> - RDSLayerRec<RDS_LAYER_HCL_FLOW_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_HCL_FLOW_MIN$>
If RDSLayerRec<RDS_LAYER_BAKE_TIME_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_BAKE_TIME_MAX$> NE '' then end
//Bake Time
RDSLayerRec<RDS_LAYER_BAKE_TIME$> = ((RDSLayerRec<RDS_LAYER_BAKE_TIME_MAX$> - RDSLayerRec<RDS_LAYER_BAKE_TIME_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_BAKE_TIME_MIN$> If RDSLayerRec<RDS_LAYER_BAKE_TIME_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_BAKE_TIME_MAX$> NE '' then
end //Bake Time
RDSLayerRec<RDS_LAYER_BAKE_TIME$> = ((RDSLayerRec<RDS_LAYER_BAKE_TIME_MAX$> - RDSLayerRec<RDS_LAYER_BAKE_TIME_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_BAKE_TIME_MIN$>
If RDSLayerRec<RDS_LAYER_EPI_H2_FLOW_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_EPI_H2_FLOW_MAX$> NE '' then end
//H2 Flow
RDSLayerRec<RDS_LAYER_EPI_H2_FLOW$> = ((RDSLayerRec<RDS_LAYER_EPI_H2_FLOW_MAX$> - RDSLayerRec<RDS_LAYER_EPI_H2_FLOW_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_EPI_H2_FLOW_MIN$> If RDSLayerRec<RDS_LAYER_EPI_H2_FLOW_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_EPI_H2_FLOW_MAX$> NE '' then
end //H2 Flow
RDSLayerRec<RDS_LAYER_EPI_H2_FLOW$> = ((RDSLayerRec<RDS_LAYER_EPI_H2_FLOW_MAX$> - RDSLayerRec<RDS_LAYER_EPI_H2_FLOW_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_EPI_H2_FLOW_MIN$>
If RDSLayerRec<RDS_LAYER_TCS_FLOW_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_TCS_FLOW_MAX$> NE '' then end
//TCS Flow
RDSLayerRec<RDS_LAYER_TCS_FLOW$> = ((RDSLayerRec<RDS_LAYER_TCS_FLOW_MAX$> - RDSLayerRec<RDS_LAYER_TCS_FLOW_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_TCS_FLOW_MIN$> If RDSLayerRec<RDS_LAYER_TCS_FLOW_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_TCS_FLOW_MAX$> NE '' then
end //TCS Flow
RDSLayerRec<RDS_LAYER_TCS_FLOW$> = ((RDSLayerRec<RDS_LAYER_TCS_FLOW_MAX$> - RDSLayerRec<RDS_LAYER_TCS_FLOW_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_TCS_FLOW_MIN$>
If RDSLayerRec<RDS_LAYER_DCS_FLOW_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_DCS_FLOW_MAX$> NE '' then end
//DCS Flow
RDSLayerRec<RDS_LAYER_DCS_FLOW$> = ((RDSLayerRec<RDS_LAYER_DCS_FLOW_MAX$> - RDSLayerRec<RDS_LAYER_DCS_FLOW_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_DCS_FLOW_MIN$> If RDSLayerRec<RDS_LAYER_DCS_FLOW_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_DCS_FLOW_MAX$> NE '' then
end //DCS Flow
RDSLayerRec<RDS_LAYER_DCS_FLOW$> = ((RDSLayerRec<RDS_LAYER_DCS_FLOW_MAX$> - RDSLayerRec<RDS_LAYER_DCS_FLOW_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_DCS_FLOW_MIN$>
If RDSLayerRec<RDS_LAYER_AUX1_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_AUX1_MAX$> NE '' then end
//AUX 1
RDSLayerRec<RDS_LAYER_AUX1$> = ((RDSLayerRec<RDS_LAYER_AUX1_MAX$> - RDSLayerRec<RDS_LAYER_AUX1_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_AUX1_MIN$> If RDSLayerRec<RDS_LAYER_AUX1_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_AUX1_MAX$> NE '' then
end //AUX 1
RDSLayerRec<RDS_LAYER_AUX1$> = ((RDSLayerRec<RDS_LAYER_AUX1_MAX$> - RDSLayerRec<RDS_LAYER_AUX1_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_AUX1_MIN$>
If RDSLayerRec<RDS_LAYER_AUX2_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_AUX2_MAX$> NE '' then end
//AUX2
RDSLayerRec<RDS_LAYER_AUX2$> = ((RDSLayerRec<RDS_LAYER_AUX2_MAX$> - RDSLayerRec<RDS_LAYER_AUX2_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_AUX2_MIN$> If RDSLayerRec<RDS_LAYER_AUX2_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_AUX2_MAX$> NE '' then
end //AUX2
RDSLayerRec<RDS_LAYER_AUX2$> = ((RDSLayerRec<RDS_LAYER_AUX2_MAX$> - RDSLayerRec<RDS_LAYER_AUX2_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_AUX2_MIN$>
If RDSLayerRec<RDS_LAYER_F_OFFSET_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_F_OFFSET_MAX$> NE '' then end
//F_OFFSET
RDSLayerRec<RDS_LAYER_F_OFFSET$> = ((RDSLayerRec<RDS_LAYER_F_OFFSET_MAX$> - RDSLayerRec<RDS_LAYER_F_OFFSET_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_F_OFFSET_MIN$> If RDSLayerRec<RDS_LAYER_F_OFFSET_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_F_OFFSET_MAX$> NE '' then
end //F_OFFSET
RDSLayerRec<RDS_LAYER_F_OFFSET$> = ((RDSLayerRec<RDS_LAYER_F_OFFSET_MAX$> - RDSLayerRec<RDS_LAYER_F_OFFSET_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_F_OFFSET_MIN$>
If RDSLayerRec<RDS_LAYER_S_OFFSET_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_S_OFFSET_MAX$> NE '' then end
//S_OFFSET
RDSLayerRec<RDS_LAYER_S_OFFSET$> = ((RDSLayerRec<RDS_LAYER_S_OFFSET_MAX$> - RDSLayerRec<RDS_LAYER_S_OFFSET_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_S_OFFSET_MIN$> If RDSLayerRec<RDS_LAYER_S_OFFSET_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_S_OFFSET_MAX$> NE '' then
end //S_OFFSET
RDSLayerRec<RDS_LAYER_S_OFFSET$> = ((RDSLayerRec<RDS_LAYER_S_OFFSET_MAX$> - RDSLayerRec<RDS_LAYER_S_OFFSET_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_S_OFFSET_MIN$>
If RDSLayerRec<RDS_LAYER_R_OFFSET_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_R_OFFSET_MAX$> NE '' then end
//R OFFSET
RDSLayerRec<RDS_LAYER_R_OFFSET$> = ((RDSLayerRec<RDS_LAYER_R_OFFSET_MAX$> - RDSLayerRec<RDS_LAYER_R_OFFSET_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_R_OFFSET_MIN$> If RDSLayerRec<RDS_LAYER_R_OFFSET_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_R_OFFSET_MAX$> NE '' then
end //R OFFSET
RDSLayerRec<RDS_LAYER_R_OFFSET$> = ((RDSLayerRec<RDS_LAYER_R_OFFSET_MAX$> - RDSLayerRec<RDS_LAYER_R_OFFSET_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_R_OFFSET_MIN$>
If RDSLayerRec<RDS_LAYER_ETCH1_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_ETCH1_MAX$> NE '' then end
//ETCH 1
RDSLayerRec<RDS_LAYER_ETCH1$> = ((RDSLayerRec<RDS_LAYER_ETCH1_MAX$> - RDSLayerRec<RDS_LAYER_ETCH1_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_ETCH1_MIN$> If RDSLayerRec<RDS_LAYER_ETCH1_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_ETCH1_MAX$> NE '' then
end //ETCH 1
RDSLayerRec<RDS_LAYER_ETCH1$> = ((RDSLayerRec<RDS_LAYER_ETCH1_MAX$> - RDSLayerRec<RDS_LAYER_ETCH1_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_ETCH1_MIN$>
If RDSLayerRec<RDS_LAYER_ETCH2_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_ETCH2_MAX$> NE '' then end
//ETCH 2
RDSLayerRec<RDS_LAYER_ETCH2$> = ((RDSLayerRec<RDS_LAYER_ETCH2_MAX$> - RDSLayerRec<RDS_LAYER_ETCH2_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_ETCH2_MIN$> If RDSLayerRec<RDS_LAYER_ETCH2_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_ETCH2_MAX$> NE '' then
end //ETCH 2
RDSLayerRec<RDS_LAYER_ETCH2$> = ((RDSLayerRec<RDS_LAYER_ETCH2_MAX$> - RDSLayerRec<RDS_LAYER_ETCH2_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_ETCH2_MIN$>
If RDSLayerRec<RDS_LAYER_ETCH3_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_ETCH3_MAX$> NE '' then end
//ETCH 3
RDSLayerRec<RDS_LAYER_ETCH3$> = ((RDSLayerRec<RDS_LAYER_ETCH3_MAX$> - RDSLayerRec<RDS_LAYER_ETCH3_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_ETCH3_MIN$> If RDSLayerRec<RDS_LAYER_ETCH3_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_ETCH3_MAX$> NE '' then
end //ETCH 3
RDSLayerRec<RDS_LAYER_ETCH3$> = ((RDSLayerRec<RDS_LAYER_ETCH3_MAX$> - RDSLayerRec<RDS_LAYER_ETCH3_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_ETCH3_MIN$>
If RDSLayerRec<RDS_LAYER_UL_TEMP_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_UL_TEMP_MAX$> NE '' then end
//UL_TEMP
RDSLayerRec<RDS_LAYER_UL_TEMP$> = ((RDSLayerRec<RDS_LAYER_UL_TEMP_MAX$> - RDSLayerRec<RDS_LAYER_UL_TEMP_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_UL_TEMP_MIN$> If RDSLayerRec<RDS_LAYER_UL_TEMP_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_UL_TEMP_MAX$> NE '' then
end //UL_TEMP
RDSLayerRec<RDS_LAYER_UL_TEMP$> = ((RDSLayerRec<RDS_LAYER_UL_TEMP_MAX$> - RDSLayerRec<RDS_LAYER_UL_TEMP_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_UL_TEMP_MIN$>
If RDSLayerRec<RDS_LAYER_SUSC_ETCH_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_SUSC_ETCH_MAX$> NE '' then end
//Susceptor Etch
RDSLayerRec<RDS_LAYER_SUSC_ETCH$> = ((RDSLayerRec<RDS_LAYER_SUSC_ETCH_MAX$> - RDSLayerRec<RDS_LAYER_SUSC_ETCH_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_SUSC_ETCH_MIN$> If RDSLayerRec<RDS_LAYER_SUSC_ETCH_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_SUSC_ETCH_MAX$> NE '' then
end //Susceptor Etch
Database_Services('WriteDataRow', 'RDS_LAYER', RDSLayerKey, RDSLayerRec, True$, False$, True$) RDSLayerRec<RDS_LAYER_SUSC_ETCH$> = ((RDSLayerRec<RDS_LAYER_SUSC_ETCH_MAX$> - RDSLayerRec<RDS_LAYER_SUSC_ETCH_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_SUSC_ETCH_MIN$>
end end
Database_Services('WriteDataRow', 'RDS_LAYER', RDSLayerKey, RDSLayerRec, True$, False$, True$)
end service end
Service VerifyRecipeParams(RDSNo) end service
//Used to verify exisiting recipe params. This is if they are already set.
IF RDSNo NE '' then Service VerifyRecipeParams(RDSNo)
RDSRec = Database_Services('ReadDataRow', 'RDS', RDSNo) //Used to verify exisiting recipe params. This is if they are already set.
RDSRec<RDS_RDS_LAYER_ACK$> = True$ IF RDSNo NE '' then
Database_Services('WriteDataRow', 'RDS', RDSNo, RDSRec, True$, False$, True$) RDSRec = Database_Services('ReadDataRow', 'RDS', RDSNo)
end else RDSRec<RDS_RDS_LAYER_ACK$> = True$
Error_Services('Add', 'RDS No was blank!!!') Database_Services('WriteDataRow', 'RDS', RDSNo, RDSRec, True$, False$, True$)
end end else
end service Error_Services('Add', 'RDS No was blank!!!')
end
Service SendCassComp(WoMatKey) end service
Sap_Services('RetransmitCassComp', WoMatKey)
obj_sap('SendOutbound') Service SendCassComp(WoMatKey)
end service debug
Sap_Services('RetransmitCassComp', WoMatKey)
obj_sap('SendOutbound')
end service

View File

@ -58,7 +58,7 @@ $INSERT NOTIFICATION_EQU
Declare function Database_Services, Error_Services, Obj_Wm_In, Obj_Wm_Out, Unassigned, Wm_In_Services, Wm_Out_Services Declare function Database_Services, Error_Services, Obj_Wm_In, Obj_Wm_Out, Unassigned, Wm_In_Services, Wm_Out_Services
Declare function PSN_Services, SRP_Rotate_Array, Datetime, Hold_Services, Memberof, Error_Services, Rds_Services Declare function PSN_Services, SRP_Rotate_Array, Datetime, Hold_Services, Memberof, Error_Services, Rds_Services
Declare subroutine Database_Services, Error_Services, Obj_notes, Hold_Services, Obj_Wm_In, Obj_Wm_Out, Wm_In_Services Declare subroutine Database_Services, Error_Services, Obj_notes, Hold_Services, Obj_Wm_In, Obj_Wm_Out, Wm_In_Services
Declare subroutine Wm_Out_Services, Rds_Services Declare subroutine Wm_Out_Services, Rds_Services, Lot_Services
GoToService else GoToService else
Error_Services('Add', Service : ' is not a valid service request within the ' : ServiceModule : ' module.') Error_Services('Add', Service : ' is not a valid service request within the ' : ServiceModule : ' module.')
@ -361,6 +361,29 @@ Service OnHold(WOMatKey, HoldEntity, HoldEntityID, HoldType, HoldData, OperatorI
If Error_Services("NoError") then If Error_Services("NoError") then
Hold_Services("HoldNotification", HoldEntity, HoldEntityID, Reason, True$, HoldType, OperatorID) Hold_Services("HoldNotification", HoldEntity, HoldEntityID, Reason, True$, HoldType, OperatorID)
Hold_Services("CreateComment", HoldEntity, HoldEntityID, Reason, True$, HoldType, OperatorID) Hold_Services("CreateComment", HoldEntity, HoldEntityID, Reason, True$, HoldType, OperatorID)
//Add in logging lot event
If UserId EQ '' then
UserId = OperatorId
end
Begin Case
Case HoldEntity EQ 'WM_IN'
WONo = Field(WOMatKey, '*', 1)
StepNo = 1
CassNo = Field(WOMatKey, '*', 2)
WMInKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Services('CreateLotEvent', WMInKey, 'WM_IN', CurrDTM, 'HOLD_ON', 'Placed on hold', '', '', '', '', UserId)
Case HoldEntity EQ 'WM_OUT'
WONo = Field(WOMatKey, '*', 1)
StepNo = 1
CassNo = Field(WOMatKey, '*', 2)
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Services('CreateLotEvent', WMOutKey, 'WM_OUT', CurrDTM, 'HOLD_ON', 'Placed on hold', '', '', '', '', UserId)
Case HoldEntity EQ 'RDS'
RDSNo = Xlate('WO_MAT', WOMatKey, WO_MAT_RDS_NO$, 'X')
Lot_Services('CreateLotEvent', RDSNo, 'RDS', CurrDTM, 'HOLD_ON', 'Placed on hold', '', '', '', '', UserId)
Case HoldEntity EQ 'WO_MAT'
Lot_Services('CreateLotEvent', WOMatKey, 'RDS', CurrDTM, 'HOLD_ON', 'Placed on hold', '', '', '', '', UserId)
End Case
end end
end else end else
Error_Services('Add', 'Lot is already on hold.') Error_Services('Add', 'Lot is already on hold.')
@ -474,6 +497,29 @@ Service OffHold(WOMatKey, HoldEntity, HoldEntityID, HoldType, HoldData, Operator
If Error_Services("NoError") then If Error_Services("NoError") then
Hold_Services("HoldNotification", HoldEntity, HoldEntityID, Reason, False$, HoldType, OperatorID) Hold_Services("HoldNotification", HoldEntity, HoldEntityID, Reason, False$, HoldType, OperatorID)
Hold_Services("CreateComment", HoldEntity, HoldEntityID, Reason, False$, HoldType, OperatorID) Hold_Services("CreateComment", HoldEntity, HoldEntityID, Reason, False$, HoldType, OperatorID)
//Add in logging lot event
if UserID EQ '' then
UserId = OperatorId
end
Begin Case
Case HoldEntity EQ 'WM_IN'
WONo = Field(WOMatKey, '*', 1)
StepNo = 1
CassNo = Field(WOMatKey, '*', 2)
WMInKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Services('CreateLotEvent', WMInKey, 'WM_IN', CurrDTM, 'HOLD_OFF', 'Placed on hold', '', '', '', '', UserID)
Case HoldEntity EQ 'WM_OUT'
WONo = Field(WOMatKey, '*', 1)
StepNo = 1
CassNo = Field(WOMatKey, '*', 2)
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Services('CreateLotEvent', WMOutKey, 'WM_OUT', CurrDTM, 'HOLD_OFF', 'Placed on hold', '', '', '', '', UserID)
Case HoldEntity EQ 'RDS'
RDSNo = Xlate('WO_MAT', WOMatKey, WO_MAT_RDS_NO$, 'X')
Lot_Services('CreateLotEvent', RDSNo, 'RDS', CurrDTM, 'HOLD_OFF', 'Placed on hold', '', '', '', '', UserID)
Case HoldEntity EQ 'WO_MAT'
Lot_Services('CreateLotEvent', WOMatKey, 'RDS', CurrDTM, 'HOLD_OFF', 'Placed on hold', '', '', '', '', UserID)
End Case
end end
end else end else
Error_Services('Add', 'Lot is not on hold.') Error_Services('Add', 'Lot is not on hold.')

File diff suppressed because it is too large Load Diff

View File

@ -1,372 +1,374 @@
Compile function Lock_Services(@Service, @Params) Compile function Lock_Services(@Service, @Params)
/*********************************************************************************************************************** /***********************************************************************************************************************
Name : Lock_Services Name : Lock_Services
Description : Handler program for all Lock services. Description : Handler program for all Lock services.
Notes : Application errors should be logged using the Error Services module. There are a few methodological 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 assumptions built into way errors are managed which are important to understand in order to properly
work with Error Services: work with Error Services:
- The term 'top' refers to the originating procedure of a call stack and the term 'bottom' refers to - 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 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 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 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'. 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 - 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 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 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 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 itself. This continues as the call stack 'bubbles' its way back to the top to where the
originating procedure is waiting. originating procedure is waiting.
- Native OpenInsight commands that handle errors (e.g., Set_Status, Set_FSError, Set_EventStatus) - 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 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. 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 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 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 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 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.) 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 - Service modules will use the SERVICE_SETUP insert and therefore automatically clear out any
error conditions that were set before. error conditions that were set before.
Parameters : Parameters :
Service [in] -- Name of the service being requested Service [in] -- Name of the service being requested
Param1-10 [in/out] -- Additional request parameter holders Param1-10 [in/out] -- Additional request parameter holders
Response [out] -- Response to be sent back to the Controller (MCP) or requesting procedure Response [out] -- Response to be sent back to the Controller (MCP) or requesting procedure
Metadata : Metadata :
History : (Date, Initials, Notes) History : (Date, Initials, Notes)
3/18/24 djm Original programmer. 3/18/24 djm Original programmer.
***********************************************************************************************************************/ ***********************************************************************************************************************/
#pragma precomp SRP_PreCompiler #pragma precomp SRP_PreCompiler
$insert LOGICAL $insert LOGICAL
$Insert SERVICE_SETUP $Insert SERVICE_SETUP
$Insert UNLOCK_REQUESTS_EQUATES $Insert UNLOCK_REQUESTS_EQUATES
$Insert REACT_RUN_EQUATES $Insert REACT_RUN_EQUATES
$Insert WO_MAT_EQUATES $Insert WO_MAT_EQUATES
$Insert WM_OUT_EQUATES $Insert WM_OUT_EQUATES
$Insert RDS_EQUATES $Insert RDS_EQUATES
$Insert RDS_LAYER_EQUATES $Insert RDS_LAYER_EQUATES
Declare function Database_Services, Oi_Wizard_Services, Memberof, Lock_Services, SRP_Json, List_Volume_Sub, Datetime Declare function Database_Services, Oi_Wizard_Services, Memberof, Lock_Services, SRP_Json, List_Volume_Sub, Datetime
Declare subroutine SRP_Json, Database_Services Declare subroutine SRP_Json, Database_Services
GoToService GoToService
Return Response or "" Return Response or ""
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// SERVICES // SERVICES
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// GetLockPermissions // GetLockPermissions
// //
// CurrUser - [Required] // CurrUser - [Required]
// //
// Returns LockPermissionLevel 0 - No lock access, 1 - Lock access to unprotected tables, or 2 - Lock access to all tables. // Returns LockPermissionLevel 0 - No lock access, 1 - Lock access to unprotected tables, or 2 - Lock access to all tables.
// //
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
Service GetLockPermissions(CurrUser) Service GetLockPermissions(CurrUser)
LockPermissionLevel = 0 LockPermissionLevel = 0
OIAdmin = Memberof(CurrUser, 'OI_ADMIN') OIAdmin = Memberof(CurrUser, 'OI_ADMIN')
SupervisorLead = MemberOf(CurrUser, 'LEAD') OR MemberOf(CurrUser, 'SUPERVISOR') SupervisorLead = MemberOf(CurrUser, 'LEAD') OR MemberOf(CurrUser, 'SUPERVISOR')
If OIAdmin then If OIAdmin then
LockPermissionLevel = 2 LockPermissionLevel = 2
end else end else
If SupervisorLead then If SupervisorLead then
LockPermissionLevel = 1 LockPermissionLevel = 1
end end
end end
Response = LockPermissionLevel Response = LockPermissionLevel
End Service End Service
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// GetAllowedLocks // GetAllowedLocks
// //
// CurrUser - [Required] // CurrUser - [Required]
// //
// Returns an array of accessible locks based on user LockPermissionLevel // Returns an array of accessible locks based on user LockPermissionLevel
// //
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
Service GetAllowedLocks(CurrUser) Service GetAllowedLocks(CurrUser)
LockPermissionLevel = Lock_Services('GetLockPermissions', CurrUser) LockPermissionLevel = Lock_Services('GetLockPermissions', CurrUser)
LockJSON = '' LockJSON = ''
If LockPermissionLevel NE 0 then If LockPermissionLevel NE 0 then
LockList = Database_Services('GetUserLocks') LockList = Database_Services('GetUserLocks')
If Error_Services('NoError') then If Error_Services('NoError') then
If SRP_JSON(objJSON, 'New', 'Object') then If SRP_JSON(objJSON, 'New', 'Object') then
If SRP_JSON(LockArray, 'New', 'Array') then If SRP_JSON(LockArray, 'New', 'Array') then
For each Row in LockList using @FM setting fPos For each Row in LockList using @FM setting fPos
If Row<0,3> = "Rev30536" then Row<0,3> = 'RDS*LSL2' If Row<0,3> = "Rev30536" then Row<0,3> = 'RDS*LSL2'
If Field(Row<0,3>, "*", 2) EQ 'LSL2' OR LockPermissionLevel EQ 2 then If Field(Row<0,3>, "*", 2) EQ 'LSL2' OR LockPermissionLevel EQ 2 then
If SRP_JSON(objRow, 'New', 'Object') then If SRP_JSON(objRow, 'New', 'Object') then
SRP_JSON(objRow, 'SetValue', 'ComputerName', Row<0, 1>) SRP_JSON(objRow, 'SetValue', 'ComputerName', Row<0, 1>)
SRP_JSON(objRow, 'SetValue', 'Volume', Row<0, 2>) SRP_JSON(objRow, 'SetValue', 'Volume', Row<0, 2>)
If Field(Row<0,3>, "*", 2) EQ 'LSL2' then Row<0,3> = Field(Row<0,3>, "*", 1) If Field(Row<0,3>, "*", 2) EQ 'LSL2' then Row<0,3> = Field(Row<0,3>, "*", 1)
SRP_JSON(objRow, 'SetValue', 'OSFile', Row<0, 3>) SRP_JSON(objRow, 'SetValue', 'OSFile', Row<0, 3>)
SRP_JSON(objRow, 'SetValue', 'RecordKey', Row<0, 4>, "String") SRP_JSON(objRow, 'SetValue', 'RecordKey', Row<0, 4>, "String")
SRP_JSON(objRow, 'SetValue', 'Exclusive', Row<0, 5>) SRP_JSON(objRow, 'SetValue', 'Exclusive', Row<0, 5>)
SRP_JSON(objRow, 'SetValue', 'REVFile', Row<0, 6>) SRP_JSON(objRow, 'SetValue', 'REVFile', Row<0, 6>)
SRP_JSON(LockArray, 'Add', objRow) SRP_JSON(LockArray, 'Add', objRow)
SRP_JSON(objRow, 'Release') SRP_JSON(objRow, 'Release')
end end
End End
Next Row Next Row
SRP_JSON(objJSON, 'Set', 'Locks', LockArray) SRP_JSON(objJSON, 'Set', 'Locks', LockArray)
SRP_JSON(LockArray, 'Release') SRP_JSON(LockArray, 'Release')
end end
LockJSON = SRP_JSON(objJSON, 'Stringify', 'Styled') LockJSON = SRP_JSON(objJSON, 'Stringify', 'Styled')
SRP_JSON(objJSON, 'Release') SRP_JSON(objJSON, 'Release')
end end
end end
End End
Response = LockJSON Response = LockJSON
End Service End Service
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// AttemptUnlock // AttemptUnlock
// //
// CurrUser - [Required] // CurrUser - [Required]
// LotType - [Required] // LotType - [Required]
// Key - [Required] // Key - [Required]
// //
// Returns either 1 for success, or error message // Returns either 1 for success, or error message
// //
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
Service AttemptUnlock(CurrUser, LotType, Key) Service AttemptUnlock(CurrUser, LotType, Key)
LockPermissionLevel = Lock_Services('GetLockPermissions', CurrUser) LockPermissionLevel = Lock_Services('GetLockPermissions', CurrUser)
If LockPermissionLevel NE 0 then If LockPermissionLevel NE 0 then
If LotType EQ 'RDS' or LotType EQ 'WM_OUT' then If LotType EQ 'RDS' or LotType EQ 'WM_OUT' then
If Xlate(LotType, Key, '', 'X', '') NE '' then If Xlate(LotType, Key, '', 'X', '') NE '' then
LockArray = Lock_Services('GetChildRecords', LotType, Key) LockArray = Lock_Services('GetChildRecords', LotType, Key)
LockCount = DCount(LockArray<1>, @VM) LockCount = DCount(LockArray<1>, @VM)
For I = 1 to LockCount For I = 1 to LockCount
Table = LockArray<1,I> Table = LockArray<1,I>
KeyID = LockArray<2,I> KeyID = LockArray<2,I>
Resp = Database_Services('UnlockKeyID', Table, KeyID) Resp = Database_Services('UnlockKeyID', Table, KeyID)
Next I Next I
If Error_Services('NoError') Then If Error_Services('NoError') Then
Response = TRUE$ Response = TRUE$
end else end else
Response = FALSE$ Response = FALSE$
Error_Services('Add', 'Records failed to unlock.') Error_Services('Add', 'Records failed to unlock.')
end end
end else end else
Response = FALSE$ Response = FALSE$
Error_Services('Add', 'This record does not exist.') Error_Services('Add', 'This record does not exist.')
end end
End Else End Else
Response = FALSE$ Response = FALSE$
Error_Services('Add', 'LotType must be either RDS or WM_OUT.') Error_Services('Add', 'LotType must be either RDS or WM_OUT.')
end end
end else end else
Response = FALSE$ Response = FALSE$
Error_Services('Add', 'User is not permitted to access this resource.') Error_Services('Add', 'User is not permitted to access this resource.')
end end
End Service End Service
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// GetChildRecords // GetChildRecords
// //
// LotType - [Required] // LotType - [Required]
// Key - [Required] // Key - [Required]
// //
// Returns an array of associated child records for unlocking // Returns an array of associated child records for unlocking
// //
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
Service GetChildRecords(LotType, Key) Service GetChildRecords(LotType, Key)
RecordArray = '' RecordArray = ''
Begin Case Begin Case
Case LotType EQ 'RDS' Case LotType EQ 'RDS'
RDSRec = Xlate('RDS', Key, '', 'X', '') RDSRec = Xlate('RDS', Key, '', 'X', '')
If RDSRec NE '' then If RDSRec NE '' then
//Add RDS key //Add RDS key
RecordArray<1> = LotType RecordArray<1> = LotType
RecordArray<2> = Key RecordArray<2> = Key
//Get REACT_RUN record //Get REACT_RUN record
ReactRunRec = Xlate('REACT_RUN', Key, '', 'X', '') ReactRunRec = Xlate('REACT_RUN', Key, '', 'X', '')
//Get and Add CLEAN_INSP keys //Get and Add CLEAN_INSP keys
CINos = ReactRunRec<REACT_RUN_CI_NO$> CINos = ReactRunRec<REACT_RUN_CI_NO$>
If CINos NE '' then If CINos NE '' then
CICount = Dcount(CINos, @VM) CICount = Dcount(CINos, @VM)
For I = 1 to CICount For I = 1 to CICount
If CINos<I> NE '' then If CINos<I> NE '' then
RecordArray<1,-1> = 'CLEAN_INSP' RecordArray<1,-1> = 'CLEAN_INSP'
RecordArray<2,-1> = CINos<I> RecordArray<2,-1> = CINos<I>
end end
Next I Next I
end end
//Get and Add RDS_TEST keys //Get and Add RDS_TEST keys
RDSLayerKeys = ReactRunRec<REACT_RUN_RDS_LAYER_KEYS$> RDSLayerKeys = ReactRunRec<REACT_RUN_RDS_LAYER_KEYS$>
If RDSLayerKeys NE '' then If RDSLayerKeys NE '' then
LayerKeyCount = DCount(RDSLayerKeys, @VM) LayerKeyCount = DCount(RDSLayerKeys, @VM)
For K = 1 to LayerKeyCount For K = 1 to LayerKeyCount
RDSTestKeys = Xlate('RDS_LAYER', RDSLayerKeys<K>, 'RDS_TEST_KEYS', 'X', '') RDSTestKeys = Xlate('RDS_LAYER', RDSLayerKeys<K>, 'RDS_TEST_KEYS', 'X', '')
If RDSTestKeys NE '' then If RDSTestKeys NE '' then
RDSTestCount = DCount(RDSTestKeys, @VM) RDSTestCount = DCount(RDSTestKeys, @VM)
For L = 1 to RDSTestCount For L = 1 to RDSTestCount
If RDSTestKeys<K,L> NE '' then If RDSTestKeys<K,L> NE '' then
RecordArray<1,-1> = 'RDS_TEST' RecordArray<1,-1> = 'RDS_TEST'
RecordArray<2,-1> = RDSTestKeys<K,L> RecordArray<2,-1> = RDSTestKeys<K,L>
end end
Next L Next L
end end
Next K Next K
end end
//Get WO_MAT key //Get WO_MAT key
WONo = RDSRec<RDS_WO$> WONo = RDSRec<RDS_WO$>
CassNo = RDSRec<RDS_CASS_NO$> CassNo = RDSRec<RDS_CASS_NO$>
WOMatKey = WONo : '*' : CassNo WOMatKey = WONo : '*' : CassNo
//Get and Add WO_MAT_QA //Get and Add WO_MAT_QA
WOMatQA = Xlate('WO_MAT_QA', WOMatKey, '', 'X', '') WOMatQA = Xlate('WO_MAT_QA', WOMatKey, '', 'X', '')
If WOMatQA NE '' then If WOMatQA NE '' then
RecordArray<1,-1> = 'WO_MAT_QA' RecordArray<1,-1> = 'WO_MAT_QA'
RecordArray<2,-1> = WOMatKey RecordArray<2,-1> = WOMatKey
End End
//Get and Add NCR keys //Get and Add NCR keys
NCRKeys = Xlate('WO_MAT', WOMatKey, 'NCR_KEYS', 'X', '') NCRKeys = Xlate('WO_MAT', WOMatKey, 'NCR_KEYS', 'X', '')
If NCRKeys NE '' then If NCRKeys NE '' then
NCRCount = Dcount(NCRKeys, @VM) NCRCount = Dcount(NCRKeys, @VM)
For J = 1 to NCRCount For J = 1 to NCRCount
If NCRKeys<J> NE '' then If NCRKeys<J> NE '' then
RecordArray<1,-1> = 'NCR' RecordArray<1,-1> = 'NCR'
RecordArray<2,-1> = NCRKeys<J> RecordArray<2,-1> = NCRKeys<J>
end end
Next J Next J
end end
end else end else
Error_Services('Add', 'This RDS does not exist.') Error_Services('Add', 'This RDS does not exist.')
Return Return
end end
Case LotType EQ 'WM_OUT' Case LotType EQ 'WM_OUT'
WMOutRec = Xlate('WM_OUT', Key, '', 'X', '') WMOutRec = Xlate('WM_OUT', Key, '', 'X', '')
If WMOutRec NE '' then If WMOutRec NE '' then
//Add WM_OUT key //Add WM_OUT key
RecordArray<1> = LotType RecordArray<1> = LotType
RecordArray<2> = Key RecordArray<2> = Key
//Get and Add CLEAN_INSP keys //Get and Add CLEAN_INSP keys
CINos = WMOutRec<WM_OUT_CI_NO$> CINos = WMOutRec<WM_OUT_CI_NO$>
If CINos NE '' then If CINos NE '' then
CICount = Dcount(CINos, @VM) CICount = Dcount(CINos, @VM)
For I = 1 to CICount For I = 1 to CICount
If CINos<I> NE '' then If CINos<I> NE '' then
RecordArray<1,-1> = 'CLEAN_INSP' RecordArray<1,-1> = 'CLEAN_INSP'
RecordArray<2,-1> = CINos<I> RecordArray<2,-1> = CINos<I>
end end
Next I Next I
end end
//Get WO_MAT key //Get WO_MAT key
WONo = FIELD(Key,'*',1) WONo = FIELD(Key,'*',1)
CassNo = FIELD(Key,'*',3) CassNo = FIELD(Key,'*',3)
WOMatKey = WONo : '*' : CassNo WOMatKey = WONo : '*' : CassNo
//Get and Add WO_MAT_QA key //Get and Add WO_MAT_QA key
WOMatQA = Xlate('WO_MAT_QA', WOMatKey, '', 'X', '') WOMatQA = Xlate('WO_MAT_QA', WOMatKey, '', 'X', '')
If WOMatQA NE '' then If WOMatQA NE '' then
RecordArray<1,-1> = 'WO_MAT_QA' RecordArray<1,-1> = 'WO_MAT_QA'
RecordArray<2,-1> = WOMatKey RecordArray<2,-1> = WOMatKey
End End
//Get and Add NCR keys //Get and Add NCR keys
NCRKeys = Xlate('WO_MAT', WOMatKey, 'NCR_KEYS', 'X', '') NCRKeys = Xlate('WO_MAT', WOMatKey, 'NCR_KEYS', 'X', '')
If NCRKeys NE '' then If NCRKeys NE '' then
NCRCount = Dcount(NCRKeys, @VM) NCRCount = Dcount(NCRKeys, @VM)
For J = 1 to NCRCount For J = 1 to NCRCount
If NCRKeys<J> NE '' then If NCRKeys<J> NE '' then
RecordArray<1,-1> = 'NCR' RecordArray<1,-1> = 'NCR'
RecordArray<2,-1> = NCRKeys<J> RecordArray<2,-1> = NCRKeys<J>
end end
Next J Next J
end end
end else end else
Error_Services('Add', 'This WM_OUT does not exist.') Error_Services('Add', 'This WM_OUT does not exist.')
end end
Case OTHERWISE$ Case OTHERWISE$
Error_Services('Add', 'LotType must be either RDS or WM_OUT.') Error_Services('Add', 'LotType must be either RDS or WM_OUT.')
return return
End Case End Case
If RecordArray NE '' then If RecordArray NE '' then
Response = RecordArray Response = RecordArray
end end
End Service End Service
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// GetUnprotectedTables // GetUnprotectedTables
// //
// Returns an array of unprotected tables // Returns an array of unprotected tables
// //
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
Service GetUnprotectedTables() Service GetUnprotectedTables()
TableArray = List_Volume_Sub('LSL', '', 'TABLE_NAME', 'TABLE_NAME') TableArray = List_Volume_Sub('LSL', '', 'TABLE_NAME', 'TABLE_NAME')
UnprotectedArray = '' UnprotectedArray = ''
For Each Table in TableArray Using @FM For Each Table in TableArray Using @FM
If Table[1,1] NE '!' AND Table[1,5] NE 'DICT.' then If Table[1,1] NE '!' AND Table[1,5] NE 'DICT.' then
UnprotectedArray<-1> = Table UnprotectedArray<-1> = Table
end end
Next Table Next Table
Response = UnprotectedArray Response = UnprotectedArray
End Service End Service
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
// LogUnlockRequest // LogUnlockRequest
// //
// CurrUser - [Required] // CurrUser - [Required]
// TableName - [Required] // TableName - [Required]
// RecordKey - [Required] // RecordKey - [Required]
// Success - [Required] // Success - [Required]
// //
// Creates an UNLOCK_REQUESTS record to log unlock attempts. // Creates an UNLOCK_REQUESTS record to log unlock attempts.
// //
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
Service LogUnlockRequest(TableName, RecordKey, CurrUser, Success) Service LogUnlockRequest(TableName, RecordKey, CurrUser, Success)
NewRequestRec = '' NewRequestRec = ''
CurrDateTime = Datetime() CurrDateTime = Datetime()
RecordID = CurrDateTime :'*': TableName RecordID = CurrDateTime :'*': TableName
NewRequestRec<UNLOCK_REQUESTS_RECORD_KEY$> = RecordKey NewRequestRec<UNLOCK_REQUESTS_RECORD_KEY$> = RecordKey
NewRequestRec<UNLOCK_REQUESTS_USER_NAME$> = CurrUser NewRequestRec<UNLOCK_REQUESTS_USER_NAME$> = CurrUser
NewRequestRec<UNLOCK_REQUESTS_SUCCESS$> = Success NewRequestRec<UNLOCK_REQUESTS_SUCCESS$> = Success
Database_Services('WriteDataRow', 'UNLOCK_REQUESTS', RecordID, NewRequestRec, 1, 0, 0) Database_Services('WriteDataRow', 'UNLOCK_REQUESTS', RecordID, NewRequestRec, 1, 0, 0)
End Service End Service

File diff suppressed because it is too large Load Diff

View File

@ -69,10 +69,10 @@ $Insert QUOTE_DET_EQU
$Insert QUOTE_SIGS_EQU $Insert QUOTE_SIGS_EQU
$Insert REACT_RUN_EQUATES $Insert REACT_RUN_EQUATES
$Insert WM_OUT_EQUATES $Insert WM_OUT_EQUATES
$Insert WO_STEP_EQU
$Insert ORDER_EQU $Insert ORDER_EQU
$Insert ORDER_DET_EQU $Insert ORDER_DET_EQU
$Insert RLIST_EQUATES $Insert RLIST_EQUATES
$Insert WO_STEP_EQUATES
EQU COL$QUOTE_DESC TO 1 EQU COL$QUOTE_DESC TO 1
EQU COL$SETUP_CHG TO 4 EQU COL$SETUP_CHG TO 4
@ -116,10 +116,10 @@ EQU COL$STEP_SCHED_DTM TO 11
EQU COMMA$ to ',' EQU COMMA$ to ','
Declare subroutine Errmsg, Btree.Extract, Set_Status, Logging_Services, Work_Order_Services, Start_Window, obj_WO_Log 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 Declare subroutine obj_Notes, Comm_Customer_Epi, Print_WO, obj_WO_Mat, obj_WM_In, obj_WO_Mat, obj_RDS, Msg
Declare subroutine Security_Err_Msg, obj_WM_Out, Database_Services, End_Window, Print_Shelf_Label Declare subroutine Security_Err_Msg, obj_WM_Out, Database_Services, End_Window, Print_Shelf_Label, Signature_Services
Declare function obj_WO_Log, Work_Order_Services, Environment_Services, Logging_Services, Memberof, NextKey Declare function obj_WO_Log, Work_Order_Services, Environment_Services, Logging_Services, Memberof, NextKey
Declare function Database_Services, Unassigned, obj_WO_Mat, obj_RDS, Security_Check, obj_WM_Out Declare function Database_Services, Unassigned, obj_WO_Mat, obj_RDS, Security_Check, obj_WM_Out, Error_Services
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WO_LOG' LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WO_LOG'
LogDate = Oconv(Date(), 'D4/') LogDate = Oconv(Date(), 'D4/')
@ -1187,15 +1187,13 @@ end event
Event PUB_REM_CASS.CLICK() Event PUB_REM_CASS.CLICK()
WONo = Get_Property(@WINDOW:'.EDL_WO_NO','TEXT') WONo = Get_Property(@WINDOW:'.EDL_WO_NO','TEXT')
WOStepKey = XLATE('WO_LOG', WONo, WO_LOG_WO_STEP_KEY$, 'X')
IF WONo NE '' then IF WONo NE '' then
WORec = XLATE('WO_LOG',WONo,'','X') WORec = XLATE('WO_LOG',WONo,'','X')
WOMatKeys = WORec<WO_LOG_WO_MAT_KEY$> WOMatKeys = WORec<WO_LOG_WO_MAT_KEY$>
WMInKeys = XLATE('WO_MAT',WOMatKeys,WO_MAT_WMI_KEY$,'X') WMInKeys = XLATE('WO_STEP', WOStepKey, WO_STEP_WM_IN_KEYS$, 'X')
WMInKeys = XLATE('WO_MAT',WOMatKeys,WO_MAT_WMI_KEY$,'X')
WMInTestSTring = WMInKeys WMInTestSTring = WMInKeys
CONVERT @VM TO '' IN WMInTestString CONVERT @VM TO '' IN WMInTestString
@ -1212,7 +1210,7 @@ Event PUB_REM_CASS.CLICK()
DispLine = 1 DispLine = 1
IF WMInTestString NE '' THEN IF WMInTestString NE '' THEN
//EPP Case for WMI
FOR I = WMInCnt TO 1 STEP -1 FOR I = WMInCnt TO 1 STEP -1
WMIRec = XLATE('WM_IN',WMInKeys<1,I>,'','X') WMIRec = XLATE('WM_IN',WMInKeys<1,I>,'','X')
WMIRdsNos = WMIRec<WM_IN_RDS_NO$> WMIRdsNos = WMIRec<WM_IN_RDS_NO$>
@ -1256,26 +1254,15 @@ Event PUB_REM_CASS.CLICK()
NEXT I NEXT I
TestWMInKeys = DelWMInKeys TestWMInKeys = DelWMInKeys
CONVERT @VM TO '' IN TestWMInKeys
IF TestWMInKeys NE '' THEN IF TestWMInKeys NE '' THEN
Set_Status(0) Set_Status(0)
obj_WM_In('Delete',DelWMInKeys) ;* Removes WMI records from system for each DelWMInKey in DelWMInKeys using @VM
Work_Order_Services('SignVoidWMI', DelWMInKey, @USER4)
IF Get_Status(errCode) THEN Next DelWMInKey
ErrMsg(errCode) END
END
END
Set_Status(0)
obj_WO_Log('RemoveCassettes',WONo:@RM:CassNos)
IF Get_Status(errCode) THEN
ErrMsg(errCode)
END
END ELSE END ELSE
//Non-EPP Case for RDS
CassCnt = COUNT(WOMatKeys,@VM) + (WOMatKeys NE '') CassCnt = COUNT(WOMatKeys,@VM) + (WOMatKeys NE '')
FOR I = CassCnt TO 1 STEP -1 FOR I = CassCnt TO 1 STEP -1
@ -1289,14 +1276,15 @@ Event PUB_REM_CASS.CLICK()
CONVERT @VM TO '' IN WOMatSigs CONVERT @VM TO '' IN WOMatSigs
UNTIL WOMatSigs NE '' UNTIL WOMatSigs NE ''
Display<1,DispLine,1> = WOMatKeys<1,I>[-1,'B*'] If WoMatCurrStatus NE 'VOID' then
Display<1,DispLine,2> = WOMatRec<WO_MAT_LOT_NO$> Display<1,DispLine,1> = WOMatKeys<1,I>[-1,'B*']
Display<1,DispLine,3> = WOMatRec<WO_MAT_WAFER_QTY$> Display<1,DispLine,2> = WOMatRec<WO_MAT_LOT_NO$>
Display<1,DispLine,4> = WOMatRec<WO_MAT_RDS_NO$> Display<1,DispLine,3> = WOMatRec<WO_MAT_WAFER_QTY$>
Display<1,DispLine,5> = OCONV(WOMatCurrStatus,'[WO_MAT_CURR_STATUS_CONV]') Display<1,DispLine,4> = WOMatRec<WO_MAT_RDS_NO$>
DispLine += 1 Display<1,DispLine,5> = OCONV(WOMatCurrStatus,'[WO_MAT_CURR_STATUS_CONV]')
DispLine += 1
end
NEXT I NEXT I
IF Display NE '' THEN IF Display NE '' THEN
TypeOver = '' TypeOver = ''
TypeOver<PDISPLAY$> = Display TypeOver<PDISPLAY$> = Display
@ -1322,23 +1310,18 @@ Event PUB_REM_CASS.CLICK()
END END
NEXT I NEXT I
TestRDSNos = RDSNos VoidStatusMessage = ''
CONVERT @VM TO '' IN TestRDSNos for each CassNo in CassNos using @VM
IF TestRDSNos NE '' THEN WoMatKey = WONo : '*' : CassNo
Set_Status(0) Work_Order_Services('SignVoidNonEpp', WoMatKey, @USER4)
InProcessRDSNos = obj_RDS('Delete',RDSNos) ;* Removes RDS records from system If Error_Services('HasError') then
VoidStatusMessage = Error_Services('GetMessage')
IF Get_Status(errCode) THEN end
ErrMsg(errCode) Next CassNo
END If VoidStatusMessage EQ '' then
END VoidStatusMessage = 'All cassettes have been queued for void.'
end
Set_Status(0) Msg(@Window, VoidStatusMessage)
obj_WO_Log('RemoveCassettes',WONo:@RM:CassNos)
IF Get_Status(errCode) THEN
ErrMsg(errCode)
END
END END
IF Display = '' THEN IF Display = '' THEN
@ -1374,14 +1357,13 @@ end event
Event PUB_REM_WM_OUT.CLICK() Event PUB_REM_WM_OUT.CLICK()
WONo = Get_Property(@WINDOW:'.EDL_WO_NO','TEXT') WONo = Get_Property(@WINDOW:'.EDL_WO_NO','TEXT')
WOStepKey = XLATE('WO_LOG', WONo, WO_LOG_WO_STEP_KEY$, 'X')
IF WONo NE '' then IF WONo NE '' then
WORec = XLATE('WO_LOG',WONo,'','X') WORec = XLATE('WO_LOG',WONo,'','X')
WOMatKeys = WORec<WO_LOG_WO_MAT_KEY$> WOMatKeys = WORec<WO_LOG_WO_MAT_KEY$>
WMOutKeys = Database_Services('ReadDataColumn', 'WO_STEP', WOStepKey, WO_STEP_WM_OUT_KEYS$, True$, 0, False$)
WMOutKeys = XLATE('WO_MAT',WOMatKeys,WO_MAT_WMO_KEY$,'X')
WMOutCnt = COUNT(WMOutKeys,@VM) + (WMOutKeys NE '') WMOutCnt = COUNT(WMOutKeys,@VM) + (WMOutKeys NE '')
Display = '' Display = ''
@ -1422,21 +1404,15 @@ Event PUB_REM_WM_OUT.CLICK()
NEXT I NEXT I
TestWMOutKeys = DelWMOutKeys TestWMOutKeys = DelWMOutKeys
CONVERT @VM TO '' IN TestWMOutKeys
IF TestWMOutKeys NE '' THEN IF TestWMOutKeys NE '' THEN
Set_Status(0) for each WMOutKey in TestWMOutKeys using @VM
obj_WM_Out('Delete',DelWMOutKeys) ;* Removes WMO records from system Work_Order_Services('SignVoidWMO', WMOutKey, @USER4)
Next WMOutKey
IF Get_Status(errCode) THEN If Error_Services('HasError') then
ErrMsg(errCode) Msg(@Window, Error_Services('GetMessage'))
END end
END END
IF Get_Status(errCode) THEN
ErrMsg(errCode)
END
END END
IF Display = '' THEN IF Display = '' THEN
@ -2163,3 +2139,6 @@ StartStopDate:
return return

View File

@ -296,7 +296,6 @@ RETURN
* * * * * * * * * * * * * *
RemainingSlots: RemainingSlots:
* * * * * * * * * * * * * *
WONo = Parms[1,@RM] WONo = Parms[1,@RM]
WOStep = Parms[COL2()+1,@RM] WOStep = Parms[COL2()+1,@RM]
CassNos = Parms[COL2()+1,@RM] CassNos = Parms[COL2()+1,@RM]
@ -321,7 +320,7 @@ RemainingSlots:
WMInRec = XLATE('WM_IN',WONo:'*':WOStep:'*':CassNo,'','X') WMInRec = XLATE('WM_IN',WONo:'*':WOStep:'*':CassNo,'','X')
WOMatRec = XLATE('WO_MAT',WONo:'*':CassNo,'','X') WOMatRec = XLATE('WO_MAT',WONo:'*':CassNo,'','X')
IF WOMatRec<WO_MAT_HOLD$> = 1 AND WOMatRec<WO_MAT_HOLD_ENTITY$,1> = 'WM_IN' THEN IF (WOMatRec<WO_MAT_HOLD$> = 1 AND WOMatRec<WO_MAT_HOLD_ENTITY$,1> = 'WM_IN') OR WMInRec<WM_IN_VOID$> EQ True$ THEN
NULL ;* Box is on hold - skip it NULL ;* Box is on hold - skip it
END ELSE END ELSE
SlotCnt = COUNT(WMInRec<WM_IN_SLOT_NO$>,@VM) + (WMInRec<WM_IN_SLOT_NO$> NE '') SlotCnt = COUNT(WMInRec<WM_IN_SLOT_NO$>,@VM) + (WMInRec<WM_IN_SLOT_NO$> NE '')
@ -935,3 +934,5 @@ RepProdTW:
RETURN RETURN

View File

@ -585,7 +585,7 @@ RETURN
* * * * * * * * * * * * * *
NextOpenSlots: NextOpenSlots:
* * * * * * * * * * * * * *
WONo = Parms[1,@RM] WONo = Parms[1,@RM]
WOStep = Parms[COL2()+1,@RM] WOStep = Parms[COL2()+1,@RM]
CassNos = Parms[COL2()+1,@RM] CassNos = Parms[COL2()+1,@RM]
@ -632,7 +632,8 @@ NextOpenSlots:
SlotCnt = COUNT(WMOutRec<WM_OUT_SLOT_NO$>,@VM) + (WMOutRec<WM_OUT_SLOT_NO$> NE '') SlotCnt = COUNT(WMOutRec<WM_OUT_SLOT_NO$>,@VM) + (WMOutRec<WM_OUT_SLOT_NO$> NE '')
IsMULot = WMOutRec EQ True$ IsMULot = WMOutRec EQ True$
IsFQASigned = WMOutRec<WM_OUT_SUP_VER_SIG$> NE '' IsFQASigned = WMOutRec<WM_OUT_SUP_VER_SIG$> NE ''
If Not(IsMULot) AND Not(IsFQASigned) then IsVoided = WMOutRec<WM_OUT_VOID$>
If Not(IsMULot) AND Not(IsFQASigned) AND Not(IsVoided) then
FOR N = SlotCnt TO 1 STEP -1 FOR N = SlotCnt TO 1 STEP -1
IF WMOutRec<WM_OUT_SLOT_NO$,N> NE '' AND WMOutRec<WM_OUT_RDS$,N> = '' AND WMOutRec<WM_OUT_SLOT_NCR$,N> = '' AND WMOutRec<WM_OUT_UMW_CASS_ID$,N> = '' THEN IF WMOutRec<WM_OUT_SLOT_NO$,N> NE '' AND WMOutRec<WM_OUT_RDS$,N> = '' AND WMOutRec<WM_OUT_SLOT_NCR$,N> = '' AND WMOutRec<WM_OUT_UMW_CASS_ID$,N> = '' THEN
@ -2010,3 +2011,5 @@ ConvertCleanInsp:
RETURN RETURN

View File

@ -800,6 +800,12 @@ IF WMIKey NE '' OR WMOKey NE '' THEN
Result = 'RTB' Result = 'RTB'
Case WMIStatus EQ 'HOLD' and WMOStatus NE '' Case WMIStatus EQ 'HOLD' and WMOStatus NE ''
Result = WMOStatus Result = WMOStatus
Case WMIStatus EQ 'VOID' and WMOStatus EQ 'VOID'
Result = 'VOID'
Case WMIStatus EQ 'VOID' and WMOStatus NE 'VOID'
Result = WMOStatus
Case WMIStatus NE 'VOID' and WMOStatus EQ 'VOID'
Result = WMIStatus
CASE InboundStat = '' AND OutboundStat = '' CASE InboundStat = '' AND OutboundStat = ''
Result = '' Result = ''
@ -3254,9 +3260,9 @@ ReportStatus:
RETURN RETURN
END END
IF WMIKey NE '' THEN IF WMIKey NE '' THEN
IF WMIStatus = 'MT' OR WMIStatus = 'VOID' THEN IF WMIStatus = 'MT' THEN
NULL NULL
END ELSE END ELSE
InboundStat = WMIStatus InboundStat = WMIStatus
@ -3267,41 +3273,49 @@ ReportStatus:
* Removed "( WMOMakeup = 1 AND WMOStatus = 'MT' ) from the OR conditions * 5/1/2014 JCH * Removed "( WMOMakeup = 1 AND WMOStatus = 'MT' ) from the OR conditions * 5/1/2014 JCH
IF WMOStatus = 'RTB' OR WMOStatus = 'VOID' THEN IF WMOStatus = 'RTB' THEN
NULL NULL
END ELSE END ELSE
OutboundStat = WMOStatus OutboundStat = WMOStatus
END END
END END
BEGIN CASE
BEGIN CASE CASE InboundStat = '' AND OutboundStat = ''
CASE InboundStat = '' AND OutboundStat = '' Result = ''
Result = '' CASE InboundStat = '' AND OutboundStat NE ''
IF WMOMakeup = 1 THEN
CASE InboundStat = '' AND OutboundStat NE '' OutboundStat = 'WMO':' - M/U - ':OCONV(WMOStatus,'[WM_OUT_CURR_STATUS_CONV]')
IF WMOMakeup = 1 THEN END ELSE
OutboundStat = 'WMO':' - M/U - ':OCONV(WMOStatus,'[WM_OUT_CURR_STATUS_CONV]') OutboundStat = 'WMO':' - ':OCONV(WMOStatus,'[WM_OUT_CURR_STATUS_CONV]')
END ELSE END
OutboundStat = 'WMO':' - ':OCONV(WMOStatus,'[WM_OUT_CURR_STATUS_CONV]') Result = OutboundStat
END
Result = OutboundStat
CASE InboundStat NE '' AND OutboundStat = ''
Result = 'WMI':' - ':OCONV(WMIStatus,'[WM_IN_CURR_STATUS_CONV]')
CASE InboundStat NE '' AND OutboundStat = ''
Result = 'WMI':' - ':OCONV(WMIStatus,'[WM_IN_CURR_STATUS_CONV]') CASE InboundStat NE '' AND OutboundStat NE ''
Result = 'WMI':' - ':OCONV(WMIStatus,'[WM_IN_CURR_STATUS_CONV]'):@VM
CASE InboundStat NE '' AND OutboundStat NE '' IF WMOMakeup = 1 THEN
Result = 'WMI':' - ':OCONV(WMIStatus,'[WM_IN_CURR_STATUS_CONV]'):@VM OutboundStat = 'WMO':' - M/U - ':OCONV(WMOStatus,'[WM_OUT_CURR_STATUS_CONV]')
END ELSE
IF WMOMakeup = 1 THEN OutboundStat = 'WMO':' - ':OCONV(WMOStatus,'[WM_OUT_CURR_STATUS_CONV]')
OutboundStat = 'WMO':' - M/U - ':OCONV(WMOStatus,'[WM_OUT_CURR_STATUS_CONV]') END
END ELSE Result = Result:OutboundStat
OutboundStat = 'WMO':' - ':OCONV(WMOStatus,'[WM_OUT_CURR_STATUS_CONV]')
END
Result = Result:OutboundStat END CASE
Begin Case
END CASE Case InboundStat NE 'VOID' AND OutboundStat NE 'VOID'
Result = Result
Case InboundStat EQ 'VOID' AND OutboundStat NE 'VOID'
Result = OutboundStat
Case InboundStat NE 'VOID' AND OutboundStat EQ 'VOID'
Result = InboundStat
Case InboundStat EQ 'VOID' AND OutboundStat EQ 'VOID'
Result = 'VOID'
End Case
RETURN RETURN
@ -5604,3 +5618,4 @@ RETURN

View File

@ -17,9 +17,9 @@ COMPILE FUNCTION obj_WO_Mat_Log(Method,Parms)
DECLARE FUNCTION Get_Status, Msg, Utility, obj_Tables, Dialog_Box, NextKey, Popup, Get_Property, obj_RDS, Database_Services DECLARE FUNCTION Get_Status, Msg, Utility, obj_Tables, Dialog_Box, NextKey, Popup, Get_Property, obj_RDS, Database_Services
Declare function Logging_Services, Environment_Services, RTI_CreateGUID, Error_Services Declare function Logging_Services, Environment_Services, RTI_CreateGUID, Error_Services, Datetime
DECLARE SUBROUTINE Set_Status, Msg, obj_Tables, Send_Dyn, Btree.Extract, ErrMsg, Send_Dyn, RList, obj_WO_Log, Send_Event, obj_RDS DECLARE SUBROUTINE Set_Status, Msg, obj_Tables, Send_Dyn, Btree.Extract, ErrMsg, Send_Dyn, RList, obj_WO_Log, Send_Event, obj_RDS
DECLARE SUBROUTINE obj_WO_Mat, Send_Info, obj_Notes, Logging_Services, Database_Services DECLARE SUBROUTINE obj_WO_Mat, Send_Info, obj_Notes, Logging_Services, Database_Services, Lot_Services
$INSERT MSG_EQUATES $INSERT MSG_EQUATES
$INSERT WO_MAT_LOG_EQUATES $INSERT WO_MAT_LOG_EQUATES
@ -27,6 +27,7 @@ $INSERT WM_OUT_EQUATES
$INSERT WM_IN_EQUATES $INSERT WM_IN_EQUATES
$INSERT WO_MAT_EQUATES $INSERT WO_MAT_EQUATES
$INSERT RDS_EQU $INSERT RDS_EQU
$Insert WO_LOG_EQUATES
$INSERT LSL_USERS_EQUATES $INSERT LSL_USERS_EQUATES
$INSERT SRPMail_Inserts $INSERT SRPMail_Inserts
@ -158,10 +159,79 @@ Create:
* END * END
Database_Services('WriteDataRow', 'WO_MAT_LOG', WOMatLogKey, WOMatLogRec, True$, False$, True$) Database_Services('WriteDataRow', 'WO_MAT_LOG', WOMatLogKey, WOMatLogRec, True$, False$, True$)
If Error_Services('HasError') then If Error_Services('NoError') then
ErrorMsg = Error_Services('GetMessage') ReactType = XLATE('WO_LOG', WONos, WO_LOG_REACT_TYPE$, 'X')
end else If ReactType NE 'EPP' then
WONo = WoNos
CassNo = CassNos
WOMatKey = WONo : '*' : CassNo
RDSKey = XLATE('WO_MAT', WOMatKey, WO_MAT_RDS_NO$, 'X')
Lot_Services('CreateLotEvent', RDSKey, 'RDS', Datetime(), Action, '', '', 0, 0, '', UserID)
Lot_Services('CreateLotEvent', WOMatKey, 'WO_MAT', Datetime(), Action, '', '', 0, 0, '', UserID)
end else
Begin Case
Case Action EQ 'RCVD'
//WMI
WONo = WoNos
StepNo = 1
CassNo = CassNos
WMInKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Services('CreateLotEvent', WMInKey, 'WM_IN', Datetime(), Action, '', '', 0, 0, '', UserID)
Case Action EQ 'REL'
//WMI
WONo = WoNos
StepNo = 1
CassNo = CassNos
WMInKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Services('CreateLotEvent', WMInKey, 'WM_IN', Datetime(), Action, '', '', 0, 0, '', UserID)
Case Action EQ '1VER'
//RDS action, do nothing for now
Case Action EQ '1LOAD'
//RDS, do nothing for now
Case Action EQ '1UNLOAD'
//RDS, do nothing for now
Case Action EQ '1MO_PSTI'
WONo = WoNos
StepNo = 1
CassNo = CassNos
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Services('CreateLotEvent', WMOutKey, 'WM_OUT', Datetime(), Action, '', '', 0, 0, '', UserID)
Case Action EQ '1MO_QA'
WONo = WoNos
StepNo = 1
CassNo = CassNos
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Services('CreateLotEvent', WMOutKey, 'WM_OUT', Datetime(), Action, '', '', 0, 0, '', UserID)
Case Action EQ 'PACK'
WONo = WoNos
StepNo = 1
CassNo = CassNos
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Services('CreateLotEvent', WMOutKey, 'WM_OUT', Datetime(), Action, '', '', 0, 0, '', UserID)
Case Action EQ 'PSVER'
WONo = WoNos
StepNo = 1
CassNo = CassNos
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Services('CreateLotEvent', WMOutKey, 'WM_OUT', Datetime(), Action, '', '', 0, 0, '', UserID)
Case Action EQ 'SHIP'
WONo = WoNos
StepNo = 1
CassNo = CassNos
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Services('CreateLotEvent', WMOutKey, 'WM_OUT', Datetime(), Action, '', '', 0, 0, '', UserID)
Case Action EQ 'LBLCHK'
//WMO
WONo = WoNos
StepNo = 1
CassNo = CassNos
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
Lot_Services('CreateLotEvent', WMOutKey, 'WM_OUT', Datetime(), Action, '', '', 0, 0, '', UserID)
End Case
end
ErrorMsg = '' ErrorMsg = ''
end else
ErrorMsg = Error_Services('GetMessage')
end end
RETURN RETURN
@ -270,11 +340,7 @@ Post:
LockedToolID = ScanToolID LockedToolID = ScanToolID
LockedScanEntry = ScanEntry LockedScanEntry = ScanEntry
END ELSE END
NULL
END
NEXT I NEXT I
WMLRec<WO_MAT_LOG_WO_NO$> = LockedWONos WMLRec<WO_MAT_LOG_WO_NO$> = LockedWONos
@ -298,5 +364,3 @@ Post:
end end
RETURN RETURN

View File

@ -2517,8 +2517,6 @@ Service SignLoadStage(RDSNo, Username, WaferQty, LLSide, ScanEntry)
Error_Services('Set', ErrorMsg) Error_Services('Set', ErrorMsg)
Response = False$ Response = False$
return return
end else
Lot_Services('CreateLotEvent', RDSNo, 'RDS', Datetime(), 'LOAD', 'Load stage signed', Reactor, '', '', '', Username)
end end
IF ReactorType NE 'EPP' THEN IF ReactorType NE 'EPP' THEN
@ -3893,3 +3891,5 @@ ClearCursors:
return return

View File

@ -686,8 +686,9 @@ WRITE_RECORD_PRE:
If NewLoadSig EQ '' then If NewLoadSig EQ '' then
// Audit the LOT_EVENT table for missing LOAD event (i.e., signature) // Audit the LOT_EVENT table for missing LOAD event (i.e., signature)
If RowExists('LOT', RDSNo) then ExistingNGLotId = Lot_Services('GetLotIdByLegacyLotIdAndType', RDSNo, 'RDS')
LotEvents = Lot_Services('GetLotEventsInSequence', RDSNo) If RowExists('LOT', ExistingNGLotId) then
LotEvents = Lot_Services('GetLotEventsInSequence', ExistingNGLotId)
If LotEvents NE '' then If LotEvents NE '' then
LotEventsRev = SRP_Array('Reverse', LotEvents, @FM) LotEventsRev = SRP_Array('Reverse', LotEvents, @FM)
LotEventsTypesRev = Xlate('LOT_EVENT', LotEventsRev, LOT_EVENT_LOT_EVENT_TYPE$, 'X') LotEventsTypesRev = Xlate('LOT_EVENT', LotEventsRev, LOT_EVENT_LOT_EVENT_TYPE$, 'X')

View File

@ -427,7 +427,6 @@ Event PUB_SIGN.CLICK()
Send_Event(@Window, 'READ') Send_Event(@Window, 'READ')
Case SignEventType EQ 'Unsign' Case SignEventType EQ 'Unsign'
// 1. Check if on hold. If so, then block event and inform user // 1. Check if on hold. If so, then block event and inform user
WOMatKey = WONo:'*':CassNo WOMatKey = WONo:'*':CassNo
WOMatCurrStatus = obj_WO_Mat('CurrStatus',WOMatKey) WOMatCurrStatus = obj_WO_Mat('CurrStatus',WOMatKey)

View File

@ -1759,6 +1759,26 @@ Service ApplyAbortMetrology(RdsKeys)
end service end service
Service DetachRDSFromWO(RDSNo)
ErrorMessage = ''
If RowExists('RDS', RDSNo) then
RDSRec = Database_Services('ReadDataRow', 'RDS', RDSNo)
if Error_Services('NoError') then
RDSRec<RDS_WO$> = ''
Database_Services('WriteDataRow', 'RDS', RDSNo, RDSRec, False$, False$, False$)
If Error_Services('HasError') then
ErrorMessage = Error_Services('GetMessage')
end
end else
ErrorMessage = Error_Services('GetMessage')
end
end else
ErrorMessage = 'Error detaching RDS ' : RDSNo ' from work order. RDS No not found in RDS table.'
end
If ErrorMessage NE '' then
Error_Services('Add', ErrorMessage)
end
end service
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Internal GoSubs // Internal GoSubs
@ -1778,3 +1798,5 @@ return

View File

@ -64,9 +64,9 @@ Options BOOLEAN = True$, False$
// Returns an array of active services for the indicated server. // Returns an array of active services for the indicated server.
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
Service GetServices(Server) Service GetServices(Server)
Services = '' Services = ''
If Server NE '' then If Server NE '' then
Sentence = 'SELECT SERVICES WITH SERVER EQ ' : Quote(Server) : ' AND WITH ACTIVE EQ "Yes"' Sentence = 'SELECT SERVICES WITH SERVER EQ ' : Quote(Server) : ' AND WITH ACTIVE EQ "Yes"'
rv = Set_Status(0) rv = Set_Status(0)
@ -82,7 +82,7 @@ Service GetServices(Server)
end end
Repeat Repeat
end end
Sentence = 'SELECT SERVICES WITH SERVER EQ "" AND WITH ACTIVE EQ "Yes"' Sentence = 'SELECT SERVICES WITH SERVER EQ "" AND WITH ACTIVE EQ "Yes"'
rv = Set_Status(0) rv = Set_Status(0)
RList(Sentence, TARGET_ACTIVELIST$, '', '', '') RList(Sentence, TARGET_ACTIVELIST$, '', '', '')
@ -101,9 +101,9 @@ Service GetServices(Server)
end else end else
Error_Services('Add', 'Server argument was missing from the ' : Service : ' service.') Error_Services('Add', 'Server argument was missing from the ' : Service : ' service.')
end end
Response = Services Response = Services
end service end service
@ -113,7 +113,7 @@ end service
// Returns an array of active services for the indicated server. // Returns an array of active services for the indicated server.
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
Service GetServiceKeys() Service GetServiceKeys()
Services = '' Services = ''
Sentence = 'SELECT SERVICES BY NAME' Sentence = 'SELECT SERVICES BY NAME'
rv = Set_Status(0) rv = Set_Status(0)
@ -127,9 +127,9 @@ Service GetServiceKeys()
Repeat Repeat
end end
Services[-1, 1] = '' Services[-1, 1] = ''
Response = Services Response = Services
end service end service
@ -139,35 +139,36 @@ end service
// Returns the details of the indicated service. // Returns the details of the indicated service.
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
Service GetService(Service) Service GetService(Service)
ServiceDetails = '' ServiceDetails = ''
If Service NE '' then If Service NE '' then
ServiceDetails = Database_Services('ReadDataRow', 'SERVICES', Service) ServiceDetails = Database_Services('ReadDataRow', 'SERVICES', Service)
end else end else
Error_Services('Add', 'Service argument was missing from the ' : Service : ' service.') Error_Services('Add', 'Service argument was missing from the ' : Service : ' service.')
end end
Response = ServiceDetails Response = ServiceDetails
end service end service
Service ProcessProcedureQueue() Service ProcessProcedureQueue()
Open 'PROC_QUEUE' to hProcQueue then Open 'PROC_QUEUE' to hProcQueue then
Select hProcQueue Select hProcQueue
EOF = False$ EOF = False$
Loop Loop
ReadNext RequestKeyID else EOF = True$ ReadNext RequestKeyID else EOF = True$
Until EOF Until EOF
Lock hProcQueue, RequestKeyID then Lock hProcQueue, RequestKeyID then
Database_Services('GetKeyIDLock', 'PROC_QUEUE', RequestKeyId)
RequestRow = Database_Services('ReadDataRow', 'PROC_QUEUE', RequestKeyID) RequestRow = Database_Services('ReadDataRow', 'PROC_QUEUE', RequestKeyID)
If RequestRow NE '' then If RequestRow NE '' then
Procedure = RequestRow<PROC_QUEUE.PROC_NAME$> Procedure = RequestRow<PROC_QUEUE.PROC_NAME$>
Params = RequestRow<PROC_QUEUE.PARAMS$> Params = RequestRow<PROC_QUEUE.PARAMS$>
If Procedure NE '' then If Procedure NE '' then
Dim ProcParams(10) Dim ProcParams(11)
For each Param in Params using @VM setting pPos For each Param in Params using @VM setting pPos
ProcParams(pPos) = Param ProcParams(pPos) = Param
Next Param Next Param
@ -183,7 +184,8 @@ Service ProcessProcedureQueue()
Case NumArguments EQ 7 ; Call @Procedure(ProcParams(1), ProcParams(2), ProcParams(3), ProcParams(4), ProcParams(5), ProcParams(6), ProcParams(7)) Case NumArguments EQ 7 ; Call @Procedure(ProcParams(1), ProcParams(2), ProcParams(3), ProcParams(4), ProcParams(5), ProcParams(6), ProcParams(7))
Case NumArguments EQ 8 ; Call @Procedure(ProcParams(1), ProcParams(2), ProcParams(3), ProcParams(4), ProcParams(5), ProcParams(6), ProcParams(7), ProcParams(8)) Case NumArguments EQ 8 ; Call @Procedure(ProcParams(1), ProcParams(2), ProcParams(3), ProcParams(4), ProcParams(5), ProcParams(6), ProcParams(7), ProcParams(8))
Case NumArguments EQ 9 ; Call @Procedure(ProcParams(1), ProcParams(2), ProcParams(3), ProcParams(4), ProcParams(5), ProcParams(6), ProcParams(7), ProcParams(8), ProcParams(9)) Case NumArguments EQ 9 ; Call @Procedure(ProcParams(1), ProcParams(2), ProcParams(3), ProcParams(4), ProcParams(5), ProcParams(6), ProcParams(7), ProcParams(8), ProcParams(9))
Case Otherwise$ ; Call @Procedure(ProcParams(1), ProcParams(2), ProcParams(3), ProcParams(4), ProcParams(5), ProcParams(6), ProcParams(7), ProcParams(8), ProcParams(9), ProcParams(10)) Case NumArguments EQ 10 ; Call @Procedure(ProcParams(1), ProcParams(2), ProcParams(3), ProcParams(4), ProcParams(5), ProcParams(6), ProcParams(7), ProcParams(8), ProcParams(9), ProcParams(10))
Case Otherwise$ ; Call @Procedure(ProcParams(1), ProcParams(2), ProcParams(3), ProcParams(4), ProcParams(5), ProcParams(6), ProcParams(7), ProcParams(8), ProcParams(9), ProcParams(10), ProcParams(11))
End Case End Case
end end
end end
@ -197,12 +199,13 @@ Service ProcessProcedureQueue()
Unlock hProcQueue, RequestKeyID else Null Unlock hProcQueue, RequestKeyID else Null
end end
Repeat Repeat
end end
end service end service
Service PostProcecure(ProcedureName, Params) Service PostProcedure(ProcedureName, Params)
Response = '' Response = ''
If (ProcedureName NE '') then If (ProcedureName NE '') then
@ -210,17 +213,17 @@ Service PostProcecure(ProcedureName, Params)
RequestRow = '' RequestRow = ''
RequestRow<PROC_QUEUE.PROC_NAME$> = ProcedureName RequestRow<PROC_QUEUE.PROC_NAME$> = ProcedureName
RequestRow<PROC_QUEUE.PARAMS$> = Params RequestRow<PROC_QUEUE.PARAMS$> = Params
RequestRow<PROC_QUEUE.ENTRY_DTM$> = Datetime()
Database_Services('WriteDataRow', 'PROC_QUEUE', RequestKeyID, RequestRow, True$, False$, False$) Database_Services('WriteDataRow', 'PROC_QUEUE', RequestKeyID, RequestRow, True$, False$, False$)
end else end else
Error_Services('Add', 'Error in ':Service:' service. Null ProcedureName passed in.') Error_Services('Add', 'Error in ':Service:' service. Null ProcedureName passed in.')
end end
return return
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Internal GoSubs /// Internal GoSubs
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -55,7 +55,7 @@ $Insert WM_IN_EQUATES
Declare function Database_Services Declare function Database_Services
Declare function PSN_Services, SRP_Rotate_Array, Datetime Declare function PSN_Services, SRP_Rotate_Array, Datetime
Declare subroutine Database_Services, Declare subroutine Database_Services, Set_Status, OBJ_WO_MAT_LOG
GoToService GoToService
@ -121,3 +121,46 @@ Service AddComment(WMInNo, Comment)
End Service End Service
Service SetVoidFlag(WMInKey, Username)
ErrorMessage = ''
If RowExists('WM_IN', WMInKey) then
WMInRec = Database_Services('ReadDataRow', 'WM_IN', WMInKey, True$, 0, False$)
If Error_Services('NoError') then
WMInRec<WM_IN_VOID$> = True$
Database_Services('WriteDataRow', 'WM_IN', WMInKey, WMInRec, True$, False, False$)
If Error_Services('NoError') then
Set_Status(0)
WONo = Field(WMInKey, '*', 1)
CassNo = Field(WMInKey, '*', 3)
WOMLParms = ''
LogFile = 'WO_MAT' ; WOMLParms = LogFile:@RM
LogDTM = OConv(Datetime(), 'DT') ; WOMLParms := LogDTM:@RM
Action = 'WM_IN_VOID' ; WOMLParms := Action:@RM
WhCd = 'CR' ; WOMLParms := WhCd:@RM
LocCd = 'VOID' ; WOMLParms := LocCd:@RM
WONos = WONo ; WOMLParms := WONos:@RM
CassNos = CassNo ; WOMLParms := CassNos:@RM
UserID = Username ; WOMLParms := UserID:@RM
Tags = '' ; WOMLParms := Tags:@RM
ToolID = '' ; WOMLParms := ToolID:@RM
WOMLParms := ''
obj_WO_Mat_Log('Create',WOMLParms)
IF Get_Status(errCode) THEN
ErrorMessage = 'Error writing inventory transactions'
end
end else
ErrorMessage = 'Failed to write to the WM_IN record ' : WMInKey : ' while attempting to set void status.'
end
end else
ErrorMessage = 'Failed to read WM_IN record ' : WMInKey : ' while attempting to set void status.'
end
end else
ErrorMessage = 'Invalid WM_IN Key ' : WMInKey : ' passed to SetVoidFlag routine.'
end
If ErrorMessage NE '' then
Error_Services('Add', ErrorMessage)
end
end service

View File

@ -60,7 +60,7 @@ $Insert RETURN_TO_FAB_LOTS_EQUATES
Declare function Database_Services, SRP_JSON, Error_Services, Clean_Insp_Services, WO_Mat_QA_Services Declare function Database_Services, SRP_JSON, Error_Services, Clean_Insp_Services, WO_Mat_QA_Services
Declare function PSN_Services, SRP_Rotate_Array, Datetime, Return_To_Fab_Services Declare function PSN_Services, SRP_Rotate_Array, Datetime, Return_To_Fab_Services
Declare subroutine Database_Services, SRP_JSON, Error_Services, Extract_Si_Keys Declare subroutine Database_Services, SRP_JSON, Error_Services, Extract_Si_Keys, Set_Status, obj_wo_mat_log
GoToService GoToService
@ -397,4 +397,47 @@ Service GetWaferMap(WMOKey)
end service end service
Service SetVoidFlag(WMOutKey, Username)
ErrorMessage = ''
If RowExists('WM_OUT', WMOutKey) then
WMOutRec = Database_Services('ReadDataRow', 'WM_OUT', WMOutKey, True$, 0, False$)
If Error_Services('NoError') then
WMOutRec<WM_OUT_VOID$> = True$
Database_Services('WriteDataRow', 'WM_OUT', WMOutKey, WMOutRec, True$, False, False$)
If Error_Services('NoError') then
Set_Status(0)
WONo = Field(WMOutKey, '*', 1)
CassNo = Field(WMOutKey, '*', 3)
WOMLParms = ''
LogFile = 'WO_MAT' ; WOMLParms = LogFile:@RM
LogDTM = OConv(Datetime(), 'DT') ; WOMLParms := LogDTM:@RM
Action = 'WM_OUT_VOID' ; WOMLParms := Action:@RM
WhCd = 'CR' ; WOMLParms := WhCd:@RM
LocCd = 'VOID' ; WOMLParms := LocCd:@RM
WONos = WONo ; WOMLParms := WONos:@RM
CassNos = CassNo ; WOMLParms := CassNos:@RM
UserID = Username ; WOMLParms := UserID:@RM
Tags = '' ; WOMLParms := Tags:@RM
ToolID = '' ; WOMLParms := ToolID:@RM
WOMLParms := ''
obj_WO_Mat_Log('Create',WOMLParms)
IF Get_Status(errCode) THEN
ErrorMessage = 'Error writing inventory transactions'
end
end else
ErrorMessage = 'Failed to write to the WM_OUT record ' : WMOutKey : ' while attempting to set void status.'
end
end else
ErrorMessage = 'Failed to read WM_OUT record ' : WMOutKey : ' while attempting to set void status.'
end
end else
ErrorMessage = 'Invalid WM_OUT Key ' : WMOutKey : ' passed to SetVoidFlag routine.'
end
If ErrorMessage NE '' then
Error_Services('Add', ErrorMessage)
end
end service

View File

@ -45,13 +45,16 @@ $insert LOGICAL
$insert RLIST_EQUATES $insert RLIST_EQUATES
$insert COMPANY_EQUATES $insert COMPANY_EQUATES
$Insert NOTIFICATION_EQUATES $Insert NOTIFICATION_EQUATES
$Insert WM_IN_EQUATES
$Insert WM_OUT_EQUATES
Declare subroutine Error_Services, Work_Order_Services, Memory_Services, RList, Database_Services, SRP_JSON Declare subroutine Error_Services, Work_Order_Services, Memory_Services, RList, Database_Services, SRP_JSON
Declare subroutine Btree.Extract, Set_Status, obj_WO_Log, obj_Notes, Print_Wo_Mat_In_Labels, Print_Wo_Mat_Out_Labels Declare subroutine Btree.Extract, Set_Status, obj_WO_Log, obj_Notes, Print_Wo_Mat_In_Labels, Print_Wo_Mat_Out_Labels
Declare subroutine Print_Wmi_Labels, Print_Wmo_Labels, ErrMsg, Print_Cass_Labels, Logging_Services Declare subroutine Print_Wmi_Labels, Print_Wmo_Labels, ErrMsg, Print_Cass_Labels, Logging_Services, Service_Services
Declare subroutine obj_WO_Mat_Log, WO_MAT_SERVICES
Declare function SRP_Array, Work_Order_Services, Memory_Services, Database_Services, SRP_Sort_Array, SRP_JSON 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, Datetime, obj_WO_Log, obj_WO_Step, Memberof Declare function Company_Services, obj_Prod_Spec, Schedule_Services, Datetime, obj_WO_Log, obj_WO_Step, Memberof
Declare function Environment_Services, Logging_Services Declare function Environment_Services, Logging_Services, Hold_Services
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WO_LOG' LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WO_LOG'
LogDate = Oconv(Date(), 'D4/') LogDate = Oconv(Date(), 'D4/')
@ -60,6 +63,13 @@ LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' Re
Headers = 'Logging DTM' : @FM : 'User' : @FM : 'Notes' Headers = 'Logging DTM' : @FM : 'User' : @FM : 'Notes'
objReleaseLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$,',', Headers, '', False$, False$) objReleaseLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$,',', Headers, '', False$, False$)
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] : ' Void Log.csv'
Headers = 'Logging DTM' : @FM : 'User' : @FM : 'CassetteId' : @FM : 'Notes'
objVoidLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$,',', Headers, '', False$, False$)
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
GoToService else GoToService else
@ -1044,6 +1054,263 @@ Service ConvertRecordToJSON(WONo, Record, ItemURL)
Response = jsonRecord Response = jsonRecord
end service end service
Service RemoveWoMatCassetteFromWO(WoMatKey, Username)
ErrorMessage = ''
If RowExists('WO_MAT', WoMatKey) then
WoNo = Field(WoMatKey, '*', 1)
WOLogRecord = Database_Services('ReadDataRow', 'WO_LOG', WoNo, True$, 0, False$)
If Error_Services('NoError') then
WoMatKeys = WOLogRecord<WO_LOG_WO_MAT_KEY$>
Locate WoMatKey in WoMatKeys using @VM setting CassPos then
WoLogRecord<WO_LOG_WO_MAT_KEY$> = Delete(WOLogRecord<WO_LOG_WO_MAT_KEY$>, 1, CassPos, 0)
Database_Services('WriteDataRow', 'WO_LOG', WoNo, WoLogRecord)
If Error_Services('NoError') then
Work_Order_Services('UpdateReceivedQty', WONo)
Work_Order_Services('UpdateReleasedQty', WONo)
Work_Order_Services('UpdateUnscheduledQuantities')
end else
ErrorMessage = Error_Services('GetMessage')
end
end else
ErrorMessage = "Unable to locate cass no " : WoMatKey : ' in the WO_LOG ' : WoNo : ' Record.'
end
end else
ErrorMessage = Error_Services('GetMessage')
end
end else
ErrorMessage = 'Invalid WoMat Key ' : WoMatKey : ' passed to RemoveWoMatCassetteFromWO routine.'
end
If ErrorMessage NE '' then
Error_Services('Add', ErrorMessage)
end
end service
Service SignVoidNonEpp(WOMatKey, Username)
ErrorMessage = ''
WONo = Field(WOMatKey, '*', 1)
CassNo = Field(WoMatKey, '*', 2)
ReactType = XLATE('WO_LOG', WONo, WO_LOG_REACT_TYPE$, 'X')
If ReactType EQ 'ASM' OR ReactType EQ 'ASM+' OR ReactType EQ 'HTR' then
RDSNo = Database_Services('ReadDataColumn', 'WO_MAT', WoMatKey, WO_MAT_RDS_NO$, True$, 0, False$)
If Error_Services('NoError') then
WoMatRec = Database_Services('ReadDataRow', 'WO_MAT', WoMatKey, True$, 0, False$)
IsVoided = WoMatRec<WO_MAT_VOID$>
If Not(IsVoided) then
IsOnHold = Hold_Services('CheckForHold', WoMatKey)
If Not(IsOnHold) then
Service_Services('PostProcedure', 'WORK_ORDER_SERVICES', 'RemoveWoMatCassetteFromWO':@vm:WOMatKey:@vm:Username)
If Error_Services('NoError') then
Service_Services('PostProcedure', 'WO_MAT_SERVICES', 'SetWoMatVoidFlag':@vm:WOMatKey:@VM:Username)
if Error_Services('NoError') then
Service_Services('PostProcedure', 'RDS_SERVICES', 'DetachRDSFromWO':@vm:RDSNo)
If Error_Services('NoError') then
LotEventParams = ''
LotEventParams<1,1> = 'CreateLotEvent'
LotEventParams<1,4> = DateTime()
LotEventParams<1,5> = 'VOID'
LotEventParams<1,6> = 'Lot voided by ' : Username
LotEventParams<1,11> = Username
If RDSNo NE '' then
LotEventParams<1,2> = RDSNo
LotEventParams<1,3> = 'RDS'
Service_Services('PostProcedure', 'LOT_SERVICES', LotEventParams)
end else
LotEventParams<1,2> = WoMatKey
LotEventParams<1,3> = 'WO_MAT'
Service_Services('PostProcedure', 'LOT_SERVICES', LotEventParams)
end
If Error_Services('NoError') then
//Add inventory transaction
end else
ErrorMessage = Error_Services('GetMessage')
end
end else
ErrorMessage = Error_Services('GetMessage')
end
end else
ErrorMessage = Error_Services('GetMessage')
end
end else
ErrorMessage = Error_Services('GetMessage')
end
end
end else
ErrorMessage = 'Unable to void lot as it is already voided.'
end
end else
ErrorMessage = Error_Services('GetMessage')
end
end else
ErrorMessage = 'Cannot use this routine to void EpiPro lots.'
end
If ErrorMessage NE '' then
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = Username
LogData<3> = WOMatKey
LogData<4> = ErrorMessage
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM, False$)
Error_Services('Add', ErrorMessage)
end else
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = Username
LogData<3> = WOMatKey
LogData<4> = 'Void queued successfully.'
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM, False$)
Error_Services('Add', ErrorMessage)
end
end service
Service SignVoidWMI(WMInKey, Username)
ErrorMessage = ''
WONo = Field(WMInKey, '*', 1)
CassNo = Field(WMInKey, '*', 3)
WoStepKey = Xlate('WO_LOG', WONo, WO_LOG_WO_STEP_KEY$, 'X')
WoMatKey = WONo : '*' : CassNo
ReactType = XLATE('WO_LOG', WONo, WO_LOG_REACT_TYPE$, 'X')
If ReactType EQ 'EPP' then
WMInRec = Database_Services('ReadDataRow', 'WM_IN', WMInKey, True$, 0, False$)
IsVoided = WMInRec<WM_IN_VOID$>
If Not(IsVoided) then
IsOnHold = Hold_Services('CheckForHold', WoMatKey)
If Not(IsOnHold) then
Service_Services('PostProcedure', 'WM_IN_SERVICES', 'SetVoidFlag':@vm:WMInKey:@VM:Username)
If Error_Services('NoError') then
LotEventParams = ''
LotEventParams<1,1> = 'CreateLotEvent'
LotEventParams<1,4> = DateTime()
LotEventParams<1,5> = 'VOID'
LotEventParams<1,6> = 'Lot voided by ' : Username
LotEventParams<1,11> = Username
LotEventParams<1,2> = WMInKey
LotEventParams<1,3> = 'WM_IN'
Service_Services('PostProcedure', 'LOT_SERVICES', LotEventParams)
If Error_Services('NoError') then
//Check if WMO is also voided. If it is, remove it from the WO_MAT_KEY field in WO_LOG, and void the WO_MAT record
WMOKey = WMInKey; //the paired WMO key is the same as the WMIKey
IsWMOVoided = Database_Services('ReadDataColumn', 'WM_OUT', WMOKey, WM_OUT_VOID$)
If IsWMOVoided then
Service_Services('PostProcedure', 'WO_MAT_SERVICES', 'SetWoMatVoidFlag':@VM:WoMatKey:@VM:Username)
If Error_Services('NoError') then
Service_Services('PostProcedure', 'WORK_ORDER_SERVICES','RemoveWoMatCassetteFromWO':@VM:WoMatKey:@VM:Username)
If Error_Services('HasError') then
ErrorMessage = Error_Services('GetMessage')
end
end else
ErrorMessage = Error_Services('GetMessage')
end
end
end else
ErrorMessage = Error_Services('GetMessage')
end
end else
ErrorMessage = Error_Services('GetMessage')
end
end
end else
ErrorMessage = 'Unable to void lot as it is already voided.'
end
end else
ErrorMessage = 'Cannot use this routine to void EpiPro lots.'
end
If ErrorMessage NE '' then
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = Username
LogData<3> = WMInKey
LogData<4> = ErrorMessage
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM, False$)
Error_Services('Add', ErrorMessage)
end else
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = Username
LogData<3> = WMInKey
LogData<4> = 'Void queued successfully.'
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM, False$)
Error_Services('Add', ErrorMessage)
end
end service
Service SignVoidWMO(WMOutKey, Username)
ErrorMessage = ''
WONo = Field(WMOutKey, '*', 1)
CassNo = Field(WMOutKey, '*', 3)
WoStepKey = Xlate('WO_LOG', WONo, WO_LOG_WO_STEP_KEY$, 'X')
WoMatKey = WONo : '*' : CassNo
ReactType = XLATE('WO_LOG', WONo, WO_LOG_REACT_TYPE$, 'X')
If ReactType EQ 'EPP' then
WMOutRec = Database_Services('ReadDataRow', 'WM_OUT', WMOutKey, True$, 0, False$)
IsVoided = WMOutRec<WM_OUT_VOID$>
If Not(IsVoided) then
IsOnHold = Hold_Services('CheckForHold', WoMatKey)
If Not(IsOnHold) then
Service_Services('PostProcedure', 'WM_OUT_SERVICES', 'SetVoidFlag':@vm:WMOutKey:@VM:Username)
If Error_Services('NoError') then
LotEventParams = ''
LotEventParams<1,1> = 'CreateLotEvent'
LotEventParams<1,4> = DateTime()
LotEventParams<1,5> = 'VOID'
LotEventParams<1,6> = 'Lot voided by ' : Username
LotEventParams<1,11> = Username
LotEventParams<1,2> = WMOutKey
LotEventParams<1,3> = 'WM_OUT'
Service_Services('PostProcedure', 'LOT_SERVICES', LotEventParams)
If Error_Services('NoError') then
//Check if WMI is also voided. If it is, remove it from the WO_MAT_KEY field in WO_LOG, and void the WO_MAT record
WMIKey = WMOutKey; //the paired WMO key is the same as the WMIKey
IsWMIVoided = Database_Services('ReadDataColumn', 'WM_IN', WMIKey, WM_IN_VOID$)
If IsWMIVoided then
Service_Services('PostProcedure', 'WO_MAT_SERVICES', 'SetWoMatVoidFlag':@VM:WoMatKey:@VM:Username)
If Error_Services('NoError') then
Service_Services('PostProcedure', 'WORK_ORDER_SERVICES','RemoveWoMatCassetteFromWO':@VM:WoMatKey:@VM:Username)
If Error_Services('HasError') then
ErrorMessage = Error_Services('GetMessage')
end
end else
ErrorMessage = Error_Services('GetMessage')
end
end
end else
ErrorMessage = Error_Services('GetMessage')
end
end else
ErrorMessage = Error_Services('GetMessage')
end
end
end else
ErrorMessage = 'Unable to void lot as it is already voided.'
end
end else
ErrorMessage = 'Cannot use this routine to void EpiPro lots.'
end
If ErrorMessage NE '' then
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = Username
LogData<3> = WMOutKey
LogData<4> = ErrorMessage
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM, False$)
Error_Services('Add', ErrorMessage)
end else
LogData = ''
LogData<1> = LoggingDTM
LogData<2> = Username
LogData<3> = WMOutKey
LogData<4> = 'Void queued successfully.'
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM, False$)
Error_Services('Add', ErrorMessage)
end
end service
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Internal GoSubs // Internal GoSubs
@ -1055,3 +1322,5 @@ ClearCursors:
Next counter Next counter
return return

View File

@ -2,7 +2,9 @@ Compile function WO_MAT_Services(@Service, @Params)
#pragma precomp SRP_PreCompiler #pragma precomp SRP_PreCompiler
Declare function Database_Services, Error_Services, SRP_Json, SRP_Com, Environment_Services, Logging_Services Declare function Database_Services, Error_Services, SRP_Json, SRP_Com, Environment_Services, Logging_Services
Declare function Datetime
Declare subroutine Error_Services, SRP_Json, SRP_Com, Wo_Mat_Services, Database_Services, Logging_Services Declare subroutine Error_Services, SRP_Json, SRP_Com, Wo_Mat_Services, Database_Services, Logging_Services
Declare subroutine obj_wo_mat_log, Set_Status
$insert LOGICAL $insert LOGICAL
$Insert APP_INSERTS $Insert APP_INSERTS
@ -424,3 +426,50 @@ Service CassetteIsLastInWo(WoMatKey)
Response = IsLastInWo Response = IsLastInWo
end service end service
Service SetWoMatVoidFlag(WoMatKey, Username)
ErrorMessage = ''
If RowExists('WO_MAT', WoMatKey) then
WoMatRec = Database_Services('ReadDataRow', 'WO_MAT', WoMatKey, True$, 0, False$)
If Error_Services('NoError') then
WoMatRec<WO_MAT_VOID$> = True$
HaveLock = Database_Services('GetKeyIDLock', 'WO_MAT', WoMatKey, True$)
If HaveLock then
Database_Services('WriteDataRow', 'WO_MAT', WoMatKey, WoMatRec, True$, False, False$)
If Error_Services('NoError') then
Set_Status(0)
WONo = Field(WoMatKey, '*', 1)
CassNo = Field(WoMatKey, '*', 2)
WOMLParms = ''
LogFile = 'WO_MAT' ; WOMLParms = LogFile:@RM
LogDTM = OConv(Datetime(), 'DT') ; WOMLParms := LogDTM:@RM
Action = 'VOID' ; WOMLParms := Action:@RM
WhCd = 'CR' ; WOMLParms := WhCd:@RM
LocCd = 'VOID' ; WOMLParms := LocCd:@RM
WONos = WONo ; WOMLParms := WONos:@RM
CassNos = CassNo ; WOMLParms := CassNos:@RM
UserID = Username ; WOMLParms := UserID:@RM
Tags = '' ; WOMLParms := Tags:@RM
ToolID = '' ; WOMLParms := ToolID:@RM
WOMLParms := ''
obj_WO_Mat_Log('Create',WOMLParms)
IF Get_Status(errCode) THEN
ErrorMessage = 'Error writing inventory transactions'
end
end else
ErrorMessage = 'Failed to write to the WO_MAT record ' : WoMatKey : ' while attempting to set void status.'
end
end else
ErrorMessage = 'Failed to get lock on WO_MAT record ' : WoMatKey : ' while attempting to set void status.'
end
end else
ErrorMessage = 'Failed to read WO_MAT record ' : WoMatKey : ' while attempting to set void status.'
end
end else
ErrorMessage = 'Invalid WoMat Key ' : WoMatKey : ' passed to SetWoMatVoidFlag routine.'
end
If ErrorMessage NE '' then
Error_Services('Add', ErrorMessage)
end
end service

View File

@ -1,7 +1,7 @@
compile insert LOT_EQUATES compile insert LOT_EQUATES
/*---------------------------------------- /*----------------------------------------
Author : Table Create Insert Routine Author : Table Create Insert Routine
Written : 28/10/2024 Written : 26/03/2025
Description : Insert for Table LOT Description : Insert for Table LOT
----------------------------------------*/ ----------------------------------------*/
#ifndef __LOT_EQUATES__ #ifndef __LOT_EQUATES__
@ -20,5 +20,7 @@ compile insert LOT_EQUATES
equ LOT_OPEN$ to 11 equ LOT_OPEN$ to 11
equ LOT_HOLD$ to 12 equ LOT_HOLD$ to 12
equ LOT_HOT$ to 13 equ LOT_HOT$ to 13
equ LOT_LEGACY_LOT_ID$ to 14
equ LOT_VOIDED_LOT_RECORDS$ to 15
#endif #endif

View File

@ -11,5 +11,7 @@ compile insert PROC_QUEUE_EQUATES
equ PROC_QUEUE.PARAMS$ to 2 equ PROC_QUEUE.PARAMS$ to 2
equ PROC_QUEUE.LAST_ATTEMPT_DTM$ to 3 equ PROC_QUEUE.LAST_ATTEMPT_DTM$ to 3
equ PROC_QUEUE.ERROR$ to 4 equ PROC_QUEUE.ERROR$ to 4
equ PROC_QUEUE.ENTRY_DTM$ to 5
#endif #endif

View File

@ -0,0 +1,17 @@
compile insert VOIDED_LOT_EQUATES
/*----------------------------------------
Author : Table Create Insert Routine
Written : 26/03/2025
Description : Insert for Table VOIDED_LOT
----------------------------------------*/
#ifndef __VOIDED_LOT_EQUATES__
#define __VOIDED_LOT_EQUATES__
equ VOIDED_LOT_WORK_ORDER_LOG_ID$ to 1
equ VOIDED_LOT_VOID_BY$ to 2
equ VOIDED_LOT_VOID_DTM$ to 3
equ VOIDED_LOT_ENTITY_TYPE$ to 4
equ VOIDED_LOT_LOT_ID$ to 5
equ VOIDED_LOT_LEGACY_LOT_ID$ to 6
#endif