Merged PR 15044: Created a routine to determine lot eligible to be peeled off. Modified form l...

Created a routine to determine lot eligible to be peeled off. Modified form logic to allow for lots to be selected out of order.

Related work items: #252918
This commit is contained in:
Ouellette Jonathan (CSC FI SPS MESLEO)
2025-04-14 23:28:55 +02:00
parent 32df3e6816
commit 781274c395
2 changed files with 342 additions and 211 deletions

View File

@ -54,7 +54,7 @@ Declare subroutine Print_Wmi_Labels, Print_Wmo_Labels, ErrMsg, Print_Cass_Label
Declare subroutine obj_WO_Mat_Log, WO_Mat_Services, Work_Order_Services
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 Environment_Services, Logging_Services, Hold_Services
Declare function Environment_Services, Logging_Services, Hold_Services, Signature_Services
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WO_LOG'
LogDate = Oconv(Date(), 'D4/')
@ -1442,6 +1442,108 @@ Service SignVoidWMO(WMOutKey, Username)
end service
Service GetEligiblePeelOffLotsByWOAndEntityType(WONo, EntityType)
ErrorMessage = ''
EligibleCassIds = ''
If RowExists('WO_LOG', WONo) then
Begin Case
Case EntityType EQ 'RDS'
CassIds = Database_Services('ReadDataColumn', 'WO_LOG', WONo, WO_LOG_WO_MAT_KEY$, True$, 0, False$)
for each CassId in CassIds using @VM
RDSNo = XLATE('WO_MAT', CassId, WO_MAT_RDS_NO$, 'X')
Signatures = Signature_Services('GetSigProfile', CassId, 0, RDSNo)
Eligible = True$
for each Signature in Signatures<1> using @VM setting SigPos
SignatureDtm = Signatures<3, SigPos>
If SignatureDtm NE '' then
Eligible = False$
end
Until Eligible EQ False$
Next Signature
If Eligible then EligibleCassIds<1, -1> = CassId
Next CassId
Case EntityType EQ 'WM_OUT'
//WM_OUTS can be voided when
//1. There are no RDS Nos associated
//2. There have never been any wafers in them
WOStepKey = XLATE('WO_LOG', WONo, WO_LOG_WO_STEP_KEY$, 'X')
CassIds = Database_Services('ReadDataColumn', 'WO_STEP', WOStepKey, WO_STEP_WM_OUT_KEYS$, True$, 0, False$)
for each CassId in CassIds using @VM
WMORec = Database_Services('ReadDataRow', 'WM_OUT', CassId, True$, 0, False);//XLATE('WM_OUT',WMOutKeys<1,I>,'','X')
WMO_RdsNos = WMORec<WM_OUT_RDS$>
WMO_NCRNos = WMORec<WM_OUT_SLOT_NCR$>
WMO_UMWCassIDs = WMORec<WM_OUT_UMW_CASS_ID$>
Eligible = True$
//Loop through RDS list to see if there is an RDS attached. If there are any RDS No's attached it is not eligible.
for each RDSNo in WMO_RDSNos using @VM
If RDSNo NE '' then
Eligible = False$
end
Until Eligible EQ False$
Next RDSNo
//Loop through NCR list to see if there are any NCR's associated. If there are any NCR No's attached it is not eligible.
If Eligible then
For Each NCRNo in WMO_NCRNos using @VM
If NCRNo NE '' then
Eligible = False$
end
Until Eligible EQ False$
Next NCR
end
//Loop through MU Wafer Usage list to see if there are any MU wafer's taken from this lot. If there are any Makeup Wafers attached it is not eligible.
If Eligible then
For Each UMWCass in WMO_UMWCassIDs using @VM
If UMWCass NE '' then
Eligible = False$
end
Until Eligible EQ False$
Next UMWCass
end
If Eligible then EligibleCassIds<1, -1> = CassId
Next CassId
Case EntityType EQ 'WM_IN'
WOStepKey = XLATE('WO_LOG', WONo, WO_LOG_WO_STEP_KEY$, 'X')
CassIds = Database_Services('ReadDataColumn', 'WO_STEP', WOStepKey, WO_STEP_WM_IN_KEYS$, True$, 0, False$)
for each CassId in CassIds using @VM
Eligible = True$
WMIRec = Database_Services('ReadDataRow', 'WM_IN', CassId, True$, 0, False);//XLATE('WM_OUT',WMOutKeys<1,I>,'','X')
WMI_RdsNos = WMIRec<WM_IN_RDS_NO$>
WMI_NCRNos = WMIRec<WM_IN_NCR_NO$>
Eligible = True$
//Loop through RDS list to see if there is an RDS attached. If there are any RDS No's attached it is not eligible.
for each RDSNo in WMI_RDSNos using @VM
If RDSNo NE '' then
Eligible = False$
end
Until Eligible EQ False$
Next RDSNo
//Loop through NCR list to see if there are any NCR's associated. If there are any NCR No's attached it is not eligible.
If Eligible then
For Each NCRNo in WMI_NCRNos using @VM
If NCRNo NE '' then
Eligible = False$
end
Until Eligible EQ False$
Next NCR
end
If Eligible then EligibleCassIds<1, -1> = CassId
Next CassId
Case EntityType EQ ''
ErrorMessage = 'Entity type parameter was invalid.'
Case Otherwise$
ErrorMessage = 'Entity type parameter was null.'
End Case
end else
ErrorMessage = 'WO# ' : WONo : ' not found in WO_LOG table.'
end
If ErrorMessage NE '' then
Error_Services('Add', 'Error in ' : Service : '. ' : ErrorMessage)
end
Response = EligibleCassIds
end service
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Internal GoSubs
@ -1455,3 +1557,4 @@ ClearCursors:
return