Updated WM_OUT_ACTIONS trigger and GetAvailableMakeupWafers to exclude WMI wafers from EpiPro cassettes. Removed deprecated code from GetAvailableMakeupWafers.
This commit is contained in:
parent
b31452bff7
commit
843e5cade4
@ -65,9 +65,6 @@ Declare subroutine Material_Services, Memory_Services, Database_Services, SRP_A
|
|||||||
Declare subroutine SRP_Stopwatch, Set_Status, RList, Work_Order_Services, SQL_Services, obj_WO_Mat, obj_Notes
|
Declare subroutine SRP_Stopwatch, Set_Status, RList, Work_Order_Services, SQL_Services, obj_WO_Mat, obj_Notes
|
||||||
Declare subroutine SRP_Rotate_Array, SRP_DateTime, obj_WO_Log, Hold_Services
|
Declare subroutine SRP_Rotate_Array, SRP_DateTime, obj_WO_Log, Hold_Services
|
||||||
|
|
||||||
UseMakeupWafersTable = Database_Services('ReadDataRow', 'APP_INFO', 'USE_MAKEUP_WAFERS_TABLE')
|
|
||||||
If UseMakeupWafersTable EQ '' then UseMakeupWafersTable = False$
|
|
||||||
|
|
||||||
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\MUBox'
|
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\MUBox'
|
||||||
LogDate = Oconv(Date(), 'D4/')
|
LogDate = Oconv(Date(), 'D4/')
|
||||||
LogTime = Oconv(Time(), 'MTS')
|
LogTime = Oconv(Time(), 'MTS')
|
||||||
@ -616,125 +613,6 @@ Service GetAvailableMakeupWafers(WorkOrderNo, KeysOnly=BOOLEAN)
|
|||||||
|
|
||||||
AvailableMakeupWafers = ''
|
AvailableMakeupWafers = ''
|
||||||
|
|
||||||
If UseMakeupWafersTable EQ False$ then
|
|
||||||
If WorkOrderNo NE '' then
|
|
||||||
WorkOrderNo = WorkOrderNo[1, '*'] ; // This might be formatted as a WO_MAT Key ID, so strip off the Cassette No.
|
|
||||||
WOLogRow = Database_Services('ReadDataRow', 'WO_LOG', WorkOrderNo)
|
|
||||||
If Error_Services('NoError') then
|
|
||||||
WOStepKeys = WOLogRow<WO_LOG_WO_STEP_KEY$>
|
|
||||||
WOMatKeys = WOLogRow<WO_LOG_WO_MAT_KEY$>
|
|
||||||
FirstWOMatKey = WOMatKeys<0, 1>
|
|
||||||
WOMatRow = Database_Services('ReadDataRow', 'WO_MAT', FirstWOMatKey)
|
|
||||||
If Error_Services('NoError') then
|
|
||||||
PartNo = WOMatRow<WO_MAT_CUST_PART_NO$>
|
|
||||||
LastWOStepKey = WOStepKeys[-1, 'B' : @VM]
|
|
||||||
WOStepRow = Database_Services('ReadDataRow', 'WO_STEP', LastWOStepKey)
|
|
||||||
If Error_Services('NoError') then
|
|
||||||
WOStepPSN = WOStepRow<WO_STEP_PROD_SPEC_ID$>
|
|
||||||
WOStepRDSNos = WOStepRow<WO_STEP_RDS_KEY$>
|
|
||||||
WOStepWMOutNos = WOStepRow<WO_STEP_WM_OUT_KEYS$>
|
|
||||||
ProdSpecRow = Database_Services('ReadDataRow', 'PROD_SPEC', WOStepPSN)
|
|
||||||
If Error_Services('NoError') then
|
|
||||||
ReactorType = ProdSpecRow<PROD_SPEC_REACTOR_TYPE$>
|
|
||||||
SearchString = ''
|
|
||||||
If (ReactorType EQ 'EPP') OR (ReactorType EQ 'P') then
|
|
||||||
SearchTable = 'WM_OUT'
|
|
||||||
SearchString := 'MU_PART_NO' : @VM : PartNo : @FM
|
|
||||||
end else
|
|
||||||
SearchTable = 'WO_MAT'
|
|
||||||
SearchString := 'MAKEUP_BOX' : @VM : 1 : @FM
|
|
||||||
SearchString := 'CUST_PART_NO' : @VM : PartNo : @FM
|
|
||||||
end
|
|
||||||
hDictSearchTable = Database_Services('GetTableHandle', 'DICT.' : SearchTable)
|
|
||||||
If Error_Services('NoError') then
|
|
||||||
rv = Set_Status(0)
|
|
||||||
MakeupBoxes = ''
|
|
||||||
Flag = ''
|
|
||||||
StatusCode = ''
|
|
||||||
Btree.Extract(SearchString, SearchTable, hDictSearchTable, MakeupBoxes, '', Flag)
|
|
||||||
If Get_Status(StatusCode) then
|
|
||||||
Error_Services('Add', 'Error calling Btree.Extract in the ' : Service : ' service. StatusCode: ' : StatusCode)
|
|
||||||
end else
|
|
||||||
If MakeupBoxes NE '' then
|
|
||||||
// One or more makeup was found that matches the customer's part and has the status of 'Ready to Use'.
|
|
||||||
// Now loop through to find out which ones have the RDS final signature or not.
|
|
||||||
NumMakeupBoxes = DCount(MakeupBoxes, @VM)
|
|
||||||
For Each MakeupBoxID in MakeupBoxes using @VM
|
|
||||||
SRP_Stopwatch('Start', 'CurrStatus')
|
|
||||||
If (ReactorType EQ 'EPP') OR (ReactorType EQ 'P') then
|
|
||||||
WOMatKeyID = Field(MakeupBoxID, '*', 1) : '*' : Field(MakeupBoxID, '*', 3)
|
|
||||||
CurrStatus = obj_WM_Out('CurrStatus', MakeupBoxID)
|
|
||||||
end else
|
|
||||||
WOMatKeyID = MakeupBoxID
|
|
||||||
CurrStatus = obj_WO_Mat('CurrStatus', WOMatKeyID)
|
|
||||||
end
|
|
||||||
// DPC 7/21/20 added HOLD as excluded status type
|
|
||||||
Locate CurrStatus in 'MT,VOID,SHIP,REJ,HOLD' using ',' setting cPos else
|
|
||||||
CurrWaferCount = obj_WO_Mat('CurrWaferCnt', WOMatKeyID)
|
|
||||||
If CurrWaferCount GT 0 then
|
|
||||||
WOMatRow = Database_Services('ReadDataRow', 'WO_MAT', WOMatKeyID)
|
|
||||||
RDSKeyIDs = WOMatRow<WO_MAT_RDS_NO$>
|
|
||||||
SAPBatchNo = WOMatRow<WO_MAT_SAP_BATCH_NO$>
|
|
||||||
FirstRDSKeyID = RDSKeyIDs[1, @VM]
|
|
||||||
RDSRow = Database_Services('ReadDataRow', 'RDS', FirstRDSKeyID)
|
|
||||||
ThisWorkOrderNo = WOMatKeyID[1, '*']
|
|
||||||
ThisCassetteNo = WOMatKeyID[Col2() + 1, '*']
|
|
||||||
ThisWOLogRow = Database_Services('ReadDataRow', 'WO_LOG', ThisWorkOrderNo)
|
|
||||||
ThisWOStepKeyID = ThisWOLogRow<WO_LOG_WO_STEP_KEY$>[-1, 'B' : @VM]
|
|
||||||
ThisWOStepRow = Database_Services('ReadDataRow', 'WO_STEP', ThisWOStepKeyID)
|
|
||||||
WOStepRDSNos = ThisWoStepRow<WO_STEP_RDS_KEY$>
|
|
||||||
MakeupBoxDet = ThisWorkOrderNo : @SVM
|
|
||||||
MakeupBoxDet := ThisCassetteNo : @SVM
|
|
||||||
MakeupBoxDet := WOMatRow<WO_MAT_SAP_BATCH_NO$> : @SVM
|
|
||||||
MakeupBoxDet := ThisWOStepRow<WO_STEP_PROD_SPEC_ID$> : @SVM
|
|
||||||
MakeupBoxDet := PartNo : @SVM
|
|
||||||
MakeupBoxDet := CurrWaferCount : @SVM
|
|
||||||
MakeupBoxDet := FirstRDSKeyID
|
|
||||||
// JRO Added PROD_SPEC PARAMETERS 5/8/2020
|
|
||||||
If (ReactorType EQ 'EPP') OR (ReactorType EQ 'P') then
|
|
||||||
ProdSpecID = Xlate('RDS', WOStepRDSNos<1, 1>, 114, 'X')
|
|
||||||
end else
|
|
||||||
ProdSpecID = Xlate('RDS', RDSKeyIDs, 114, 'X')
|
|
||||||
end
|
|
||||||
ActiveStatus = XLATE('PROD_SPEC', ProdSpecID, 9, 'X')
|
|
||||||
// JRO Added the extra condition for Active Status 5/8/2020
|
|
||||||
If ActiveStatus EQ 'A' then
|
|
||||||
If (RDSRow<RDS_SUP_VER_SIG$> NE '') OR ((ReactorType EQ 'EPP') OR (ReactorType EQ 'P')) then
|
|
||||||
// Has a RDS final signature.
|
|
||||||
If KeysOnly EQ True$ then
|
|
||||||
If (ReactorType EQ 'EPP') OR (ReactorType EQ 'P') then
|
|
||||||
AvailableMakeupWafers = Insert(AvailableMakeupWafers, 1, -1, 0, MakeupBoxID)
|
|
||||||
end else
|
|
||||||
AvailableMakeupWafers = Insert(AvailableMakeupWafers, 1, -1, 0, WOMatKeyID)
|
|
||||||
end
|
|
||||||
end else
|
|
||||||
AvailableMakeupWafers = Insert(AvailableMakeupWafers, 1, -1, 0, MakeupBoxDet)
|
|
||||||
end
|
|
||||||
end else
|
|
||||||
// Does not have a RDS final signature.
|
|
||||||
If KeysOnly EQ True$ then
|
|
||||||
AvailableMakeupWafers = Insert(AvailableMakeupWafers, 2, -1, 0, WOMatKeyID)
|
|
||||||
end else
|
|
||||||
AvailableMakeupWafers = Insert(AvailableMakeupWafers, 2, -1, 0, MakeupBoxDet)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
Next MakeupBoxID
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end else
|
|
||||||
Error_Services('Add', 'WorkOrderNo argument was missing from the ' : Service : ' service.')
|
|
||||||
end
|
|
||||||
|
|
||||||
end else
|
|
||||||
|
|
||||||
If WorkOrderNo NE '' then
|
If WorkOrderNo NE '' then
|
||||||
WorkOrderNo = WorkOrderNo[1, '*'] ; // This might be formatted as a WO_MAT Key ID, so strip off the Cassette No.
|
WorkOrderNo = WorkOrderNo[1, '*'] ; // This might be formatted as a WO_MAT Key ID, so strip off the Cassette No.
|
||||||
WOLogRow = Database_Services('ReadDataRow', 'WO_LOG', WorkOrderNo)
|
WOLogRow = Database_Services('ReadDataRow', 'WO_LOG', WorkOrderNo)
|
||||||
@ -781,7 +659,11 @@ Service GetAvailableMakeupWafers(WorkOrderNo, KeysOnly=BOOLEAN)
|
|||||||
CurrStatus = Xlate('MAKEUP_WAFERS', MakeupBoxID, 'CURR_STATUS_STATIC', 'X')
|
CurrStatus = Xlate('MAKEUP_WAFERS', MakeupBoxID, 'CURR_STATUS_STATIC', 'X')
|
||||||
// DPC 7/21/20 added HOLD as excluded status type
|
// DPC 7/21/20 added HOLD as excluded status type
|
||||||
Locate CurrStatus in 'MT,VOID,SHIP,REJ,HOLD' using ',' setting cPos else
|
Locate CurrStatus in 'MT,VOID,SHIP,REJ,HOLD' using ',' setting cPos else
|
||||||
|
If (ReactorType EQ 'EPP') OR (ReactorType EQ 'P') then
|
||||||
|
CurrWaferCount = obj_WO_Mat('CurrWaferCnt', WOMatKeyID:@RM:'':@RM:True$)
|
||||||
|
end else
|
||||||
CurrWaferCount = obj_WO_Mat('CurrWaferCnt', WOMatKeyID)
|
CurrWaferCount = obj_WO_Mat('CurrWaferCnt', WOMatKeyID)
|
||||||
|
end
|
||||||
If CurrWaferCount GT 0 then
|
If CurrWaferCount GT 0 then
|
||||||
WOMatRow = Database_Services('ReadDataRow', 'WO_MAT', WOMatKeyID)
|
WOMatRow = Database_Services('ReadDataRow', 'WO_MAT', WOMatKeyID)
|
||||||
RDSKeyIDs = WOMatRow<WO_MAT_RDS_NO$>
|
RDSKeyIDs = WOMatRow<WO_MAT_RDS_NO$>
|
||||||
@ -861,7 +743,6 @@ Service GetAvailableMakeupWafers(WorkOrderNo, KeysOnly=BOOLEAN)
|
|||||||
end else
|
end else
|
||||||
Error_Services('Add', 'WorkOrderNo argument was missing from the ' : Service : ' service.')
|
Error_Services('Add', 'WorkOrderNo argument was missing from the ' : Service : ' service.')
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
Response = AvailableMakeupWafers
|
Response = AvailableMakeupWafers
|
||||||
|
|
||||||
@ -1589,5 +1470,3 @@ ClearCursors:
|
|||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -338,7 +338,7 @@ WRITE_RECORD:
|
|||||||
|
|
||||||
WOMatKey = {WO_MAT_KEY}
|
WOMatKey = {WO_MAT_KEY}
|
||||||
If MakeupBox then
|
If MakeupBox then
|
||||||
CurrWaferCount = obj_WO_Mat('CurrWaferCnt', WOMatKey)
|
CurrWaferCount = obj_WO_Mat('CurrWaferCnt', WOMatKey:@RM:'':@RM:True$)
|
||||||
If CurrWaferCount GT 0 then
|
If CurrWaferCount GT 0 then
|
||||||
// Populate MAKEUP_WAFERS table
|
// Populate MAKEUP_WAFERS table
|
||||||
// Add/update cassette data to the MAKEUP_WAFERS table
|
// Add/update cassette data to the MAKEUP_WAFERS table
|
||||||
|
Loading…
x
Reference in New Issue
Block a user