fixed bug in GetAvailableMakeupWafers which was using the CustPartNo instead of the EpiPartNo to find available makeup wafers
This commit is contained in:
@ -619,133 +619,127 @@ end service
|
|||||||
Service GetAvailableMakeupWafers(WorkOrderNo, KeysOnly=BOOLEAN)
|
Service GetAvailableMakeupWafers(WorkOrderNo, KeysOnly=BOOLEAN)
|
||||||
|
|
||||||
AvailableMakeupWafers = ''
|
AvailableMakeupWafers = ''
|
||||||
|
|
||||||
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)
|
||||||
If Error_Services('NoError') then
|
If Error_Services('NoError') then
|
||||||
WOStepKeys = WOLogRow<WO_LOG_WO_STEP_KEY$>
|
WOStepKeys = WOLogRow<WO_LOG_WO_STEP_KEY$>
|
||||||
WOMatKeys = WOLogRow<WO_LOG_WO_MAT_KEY$>
|
LastWOStepKey = WOStepKeys[-1, 'B' : @VM]
|
||||||
FirstWOMatKey = WOMatKeys<0, 1>
|
PartNo = WOLogRow<WO_LOG_EPI_PART_NO$>
|
||||||
WOMatRow = Database_Services('ReadDataRow', 'WO_MAT', FirstWOMatKey)
|
WOStepRow = Database_Services('ReadDataRow', 'WO_STEP', LastWOStepKey)
|
||||||
If Error_Services('NoError') then
|
If Error_Services('NoError') then
|
||||||
PartNo = WOMatRow<WO_MAT_CUST_PART_NO$>
|
WOStepPSN = WOStepRow<WO_STEP_PROD_SPEC_ID$>
|
||||||
LastWOStepKey = WOStepKeys[-1, 'B' : @VM]
|
WOStepRDSNos = WOStepRow<WO_STEP_RDS_KEY$>
|
||||||
WOStepRow = Database_Services('ReadDataRow', 'WO_STEP', LastWOStepKey)
|
WOStepWMOutNos = WOStepRow<WO_STEP_WM_OUT_KEYS$>
|
||||||
|
ProdSpecRow = Database_Services('ReadDataRow', 'PROD_SPEC', WOStepPSN)
|
||||||
If Error_Services('NoError') then
|
If Error_Services('NoError') then
|
||||||
WOStepPSN = WOStepRow<WO_STEP_PROD_SPEC_ID$>
|
ReactorType = ProdSpecRow<PROD_SPEC_REACTOR_TYPE$>
|
||||||
WOStepRDSNos = WOStepRow<WO_STEP_RDS_KEY$>
|
SearchString = ''
|
||||||
WOStepWMOutNos = WOStepRow<WO_STEP_WM_OUT_KEYS$>
|
SearchTable = 'MAKEUP_WAFERS'
|
||||||
ProdSpecRow = Database_Services('ReadDataRow', 'PROD_SPEC', WOStepPSN)
|
If ReactorType EQ 'EPP' then
|
||||||
|
SearchString := 'EPI_PART_NO' : @VM : PartNo : @FM : 'REACT_TYPE' : @VM : 'EPP' : @FM
|
||||||
|
end else
|
||||||
|
SearchString := 'EPI_PART_NO' : @VM : PartNo : @FM : 'REACT_TYPE' : @VM : '#EPP' : @FM
|
||||||
|
end
|
||||||
|
|
||||||
|
hDictSearchTable = Database_Services('GetTableHandle', 'DICT.' : SearchTable)
|
||||||
If Error_Services('NoError') then
|
If Error_Services('NoError') then
|
||||||
ReactorType = ProdSpecRow<PROD_SPEC_REACTOR_TYPE$>
|
rv = Set_Status(0)
|
||||||
SearchString = ''
|
MakeupBoxes = ''
|
||||||
SearchTable = 'MAKEUP_WAFERS'
|
Flag = ''
|
||||||
If ReactorType EQ 'EPP' then
|
StatusCode = ''
|
||||||
SearchString := 'EPI_PART_NO' : @VM : PartNo : @FM : 'REACT_TYPE' : @VM : 'EPP' : @FM
|
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
|
end else
|
||||||
SearchString := 'EPI_PART_NO' : @VM : PartNo : @FM : 'REACT_TYPE' : @VM : '#EPP' : @FM
|
If MakeupBoxes NE '' then
|
||||||
end
|
// 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.
|
||||||
hDictSearchTable = Database_Services('GetTableHandle', 'DICT.' : SearchTable)
|
NumMakeupBoxes = DCount(MakeupBoxes, @VM)
|
||||||
If Error_Services('NoError') then
|
For Each MakeupBoxID in MakeupBoxes using @VM
|
||||||
rv = Set_Status(0)
|
WOMatKeyID = MakeupBoxID
|
||||||
MakeupBoxes = ''
|
CurrStatus = Xlate('MAKEUP_WAFERS', MakeupBoxID, 'CURR_STATUS_STATIC', 'X')
|
||||||
Flag = ''
|
// DPC 7/21/20 added HOLD as excluded status type
|
||||||
StatusCode = ''
|
Locate CurrStatus in 'MT,VOID,SHIP,REJ,HOLD' using ',' setting cPos else
|
||||||
Btree.Extract(SearchString, SearchTable, hDictSearchTable, MakeupBoxes, '', Flag)
|
If (ReactorType EQ 'EPP') OR (ReactorType EQ 'P') then
|
||||||
If Get_Status(StatusCode) then
|
CurrWaferCount = obj_WO_Mat('CurrWaferCnt', WOMatKeyID:@RM:'':@RM:True$)
|
||||||
Error_Services('Add', 'Error calling Btree.Extract in the ' : Service : ' service. StatusCode: ' : StatusCode)
|
end else
|
||||||
end else
|
CurrWaferCount = obj_WO_Mat('CurrWaferCnt', WOMatKeyID)
|
||||||
If MakeupBoxes NE '' then
|
end
|
||||||
// One or more makeup was found that matches the customer's part and has the status of 'Ready to Use'.
|
If CurrWaferCount GT 0 then
|
||||||
// Now loop through to find out which ones have the RDS final signature or not.
|
WOMatRow = Database_Services('ReadDataRow', 'WO_MAT', WOMatKeyID)
|
||||||
NumMakeupBoxes = DCount(MakeupBoxes, @VM)
|
RDSKeyIDs = WOMatRow<WO_MAT_RDS_NO$>
|
||||||
For Each MakeupBoxID in MakeupBoxes using @VM
|
SAPBatchNo = WOMatRow<WO_MAT_SAP_BATCH_NO$>
|
||||||
WOMatKeyID = MakeupBoxID
|
FirstRDSKeyID = RDSKeyIDs[1, @VM]
|
||||||
CurrStatus = Xlate('MAKEUP_WAFERS', MakeupBoxID, 'CURR_STATUS_STATIC', 'X')
|
RDSRow = Database_Services('ReadDataRow', 'RDS', FirstRDSKeyID)
|
||||||
// DPC 7/21/20 added HOLD as excluded status type
|
WMOKey = WOMatRow<WO_MAT_WMO_KEY$>
|
||||||
Locate CurrStatus in 'MT,VOID,SHIP,REJ,HOLD' using ',' setting cPos else
|
If WMOKey NE '' then
|
||||||
If (ReactorType EQ 'EPP') OR (ReactorType EQ 'P') then
|
WMOFQASig = Xlate('WM_OUT', WMOKey, 'SUP_VER_SIG', 'X')
|
||||||
CurrWaferCount = obj_WO_Mat('CurrWaferCnt', WOMatKeyID:@RM:'':@RM:True$)
|
|
||||||
end else
|
end else
|
||||||
CurrWaferCount = obj_WO_Mat('CurrWaferCnt', WOMatKeyID)
|
WMOFQASig = ''
|
||||||
end
|
end
|
||||||
If CurrWaferCount GT 0 then
|
ThisWorkOrderNo = WOMatKeyID[1, '*']
|
||||||
WOMatRow = Database_Services('ReadDataRow', 'WO_MAT', WOMatKeyID)
|
ThisCassetteNo = WOMatKeyID[Col2() + 1, '*']
|
||||||
RDSKeyIDs = WOMatRow<WO_MAT_RDS_NO$>
|
ThisWOLogRow = Database_Services('ReadDataRow', 'WO_LOG', ThisWorkOrderNo)
|
||||||
SAPBatchNo = WOMatRow<WO_MAT_SAP_BATCH_NO$>
|
ThisWOStepKeyID = ThisWOLogRow<WO_LOG_WO_STEP_KEY$>[-1, 'B' : @VM]
|
||||||
FirstRDSKeyID = RDSKeyIDs[1, @VM]
|
ThisWOStepRow = Database_Services('ReadDataRow', 'WO_STEP', ThisWOStepKeyID)
|
||||||
RDSRow = Database_Services('ReadDataRow', 'RDS', FirstRDSKeyID)
|
WOStepRDSNos = ThisWoStepRow<WO_STEP_RDS_KEY$>
|
||||||
WMOKey = WOMatRow<WO_MAT_WMO_KEY$>
|
MakeupBoxDet = ThisWorkOrderNo : @SVM
|
||||||
If WMOKey NE '' then
|
MakeupBoxDet := ThisCassetteNo : @SVM
|
||||||
WMOFQASig = Xlate('WM_OUT', WMOKey, 'SUP_VER_SIG', 'X')
|
MakeupBoxDet := WOMatRow<WO_MAT_SAP_BATCH_NO$> : @SVM
|
||||||
end else
|
MakeupBoxDet := ThisWOStepRow<WO_STEP_PROD_SPEC_ID$> : @SVM
|
||||||
WMOFQASig = ''
|
MakeupBoxDet := PartNo : @SVM
|
||||||
end
|
MakeupBoxDet := CurrWaferCount : @SVM
|
||||||
ThisWorkOrderNo = WOMatKeyID[1, '*']
|
MakeupBoxDet := FirstRDSKeyID
|
||||||
ThisCassetteNo = WOMatKeyID[Col2() + 1, '*']
|
// JRO Added PROD_SPEC PARAMETERS 5/8/2020
|
||||||
ThisWOLogRow = Database_Services('ReadDataRow', 'WO_LOG', ThisWorkOrderNo)
|
If (ReactorType EQ 'EPP') OR (ReactorType EQ 'P') then
|
||||||
ThisWOStepKeyID = ThisWOLogRow<WO_LOG_WO_STEP_KEY$>[-1, 'B' : @VM]
|
ProdSpecID = Xlate('RDS', WOStepRDSNos<1, 1>, RDS_PROD_SPEC_ID$, 'X')
|
||||||
ThisWOStepRow = Database_Services('ReadDataRow', 'WO_STEP', ThisWOStepKeyID)
|
end else
|
||||||
WOStepRDSNos = ThisWoStepRow<WO_STEP_RDS_KEY$>
|
ProdSpecID = Xlate('RDS', RDSKeyIDs, RDS_PROD_SPEC_ID$, 'X')
|
||||||
MakeupBoxDet = ThisWorkOrderNo : @SVM
|
end
|
||||||
MakeupBoxDet := ThisCassetteNo : @SVM
|
ActiveStatus = XLATE('PROD_SPEC', ProdSpecID, PROD_SPEC_STATUS$, 'X')
|
||||||
MakeupBoxDet := WOMatRow<WO_MAT_SAP_BATCH_NO$> : @SVM
|
LabelCheck = Count(WOMatRow<WO_MAT_INV_ACTION$>, 'LBLCHK')
|
||||||
MakeupBoxDet := ThisWOStepRow<WO_STEP_PROD_SPEC_ID$> : @SVM
|
// JRO Added the extra condition for Active Status 5/8/2020
|
||||||
MakeupBoxDet := PartNo : @SVM
|
If ActiveStatus EQ 'A' then
|
||||||
MakeupBoxDet := CurrWaferCount : @SVM
|
Begin Case
|
||||||
MakeupBoxDet := FirstRDSKeyID
|
|
||||||
// JRO Added PROD_SPEC PARAMETERS 5/8/2020
|
Case SAPBatchNo EQ ''
|
||||||
If (ReactorType EQ 'EPP') OR (ReactorType EQ 'P') then
|
// Cassette has not received a batch number from SAP, so it is not yet eligible to be used.
|
||||||
ProdSpecID = Xlate('RDS', WOStepRDSNos<1, 1>, RDS_PROD_SPEC_ID$, 'X')
|
FieldPos = 3
|
||||||
end else
|
|
||||||
ProdSpecID = Xlate('RDS', RDSKeyIDs, RDS_PROD_SPEC_ID$, 'X')
|
|
||||||
end
|
|
||||||
ActiveStatus = XLATE('PROD_SPEC', ProdSpecID, PROD_SPEC_STATUS$, 'X')
|
|
||||||
LabelCheck = Count(WOMatRow<WO_MAT_INV_ACTION$>, 'LBLCHK')
|
|
||||||
// JRO Added the extra condition for Active Status 5/8/2020
|
|
||||||
If ActiveStatus EQ 'A' then
|
|
||||||
Begin Case
|
|
||||||
|
|
||||||
Case SAPBatchNo EQ ''
|
Case ( (ReactorType NE 'EPP') and (RDSRow<RDS_SUP_VER_SIG$> NE '') and (LabelCheck NE FALSE$) ) OR ( (ReactorType EQ 'EPP') and (WMOFQASig NE '') and (LabelCheck NE FALSE$) )
|
||||||
// Cassette has not received a batch number from SAP, so it is not yet eligible to be used.
|
// Cassette has a final signature, so it is eligible to be used.
|
||||||
FieldPos = 3
|
FieldPos = 1
|
||||||
|
|
||||||
Case ( (ReactorType NE 'EPP') and (RDSRow<RDS_SUP_VER_SIG$> NE '') and (LabelCheck NE FALSE$) ) OR ( (ReactorType EQ 'EPP') and (WMOFQASig NE '') and (LabelCheck NE FALSE$) )
|
Case ( (ReactorType NE 'EPP') and (RDSRow<RDS_SUP_VER_SIG$> EQ '') ) OR ( (ReactorType EQ 'EPP') and (WMOFQASig EQ '') )
|
||||||
// Cassette has a final signature, so it is eligible to be used.
|
// Cassette does not yet have a final signature, so it is not yet eligible to be used.
|
||||||
FieldPos = 1
|
FieldPos = 2
|
||||||
|
|
||||||
Case ( (ReactorType NE 'EPP') and (RDSRow<RDS_SUP_VER_SIG$> EQ '') ) OR ( (ReactorType EQ 'EPP') and (WMOFQASig EQ '') )
|
Case ( (ReactorType NE 'EPP') and (RDSRow<RDS_SUP_VER_SIG$> NE '') and (LabelCheck EQ False$)) OR ( (ReactorType EQ 'EPP') and (WMOFQASig NE '') and (LabelCheck EQ False$))
|
||||||
// Cassette does not yet have a final signature, so it is not yet eligible to be used.
|
// Cassette does not yet have a packing label check, so it is not yet eligible to be used.
|
||||||
FieldPos = 2
|
FieldPos = 4
|
||||||
|
|
||||||
Case ( (ReactorType NE 'EPP') and (RDSRow<RDS_SUP_VER_SIG$> NE '') and (LabelCheck EQ False$)) OR ( (ReactorType EQ 'EPP') and (WMOFQASig NE '') and (LabelCheck EQ False$))
|
Case Otherwise$
|
||||||
// Cassette does not yet have a packing label check, so it is not yet eligible to be used.
|
// Log these cassettes as we should never end up here.
|
||||||
FieldPos = 4
|
Null
|
||||||
|
|
||||||
Case Otherwise$
|
End Case
|
||||||
// Log these cassettes as we should never end up here.
|
|
||||||
Null
|
If KeysOnly EQ True$ then
|
||||||
|
If (ReactorType EQ 'EPP') OR (ReactorType EQ 'P') then
|
||||||
End Case
|
WMOFormat = Field(MakeupBoxID, '*', 1):'*1*':Field(MakeupBoxID, '*', 2)
|
||||||
|
AvailableMakeupWafers = Insert(AvailableMakeupWafers, FieldPos, -1, 0, WMOFormat)
|
||||||
If KeysOnly EQ True$ then
|
|
||||||
If (ReactorType EQ 'EPP') OR (ReactorType EQ 'P') then
|
|
||||||
WMOFormat = Field(MakeupBoxID, '*', 1):'*1*':Field(MakeupBoxID, '*', 2)
|
|
||||||
AvailableMakeupWafers = Insert(AvailableMakeupWafers, FieldPos, -1, 0, WMOFormat)
|
|
||||||
end else
|
|
||||||
AvailableMakeupWafers = Insert(AvailableMakeupWafers, FieldPos, -1, 0, WOMatKeyID)
|
|
||||||
end
|
|
||||||
end else
|
end else
|
||||||
AvailableMakeupWafers = Insert(AvailableMakeupWafers, FieldPos, -1, 0, MakeupBoxDet)
|
AvailableMakeupWafers = Insert(AvailableMakeupWafers, FieldPos, -1, 0, WOMatKeyID)
|
||||||
end
|
end
|
||||||
|
end else
|
||||||
|
AvailableMakeupWafers = Insert(AvailableMakeupWafers, FieldPos, -1, 0, MakeupBoxDet)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
Next MakeupBoxID
|
end
|
||||||
end
|
Next MakeupBoxID
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -1482,5 +1476,3 @@ ClearCursors:
|
|||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -29,7 +29,6 @@ Function NDW_Makeup_Wafers_Events(CtrlEntId, Event, @PARAMS)
|
|||||||
04/13/18 dmb Created initial commuter module.
|
04/13/18 dmb Created initial commuter module.
|
||||||
|
|
||||||
***********************************************************************************************************************/
|
***********************************************************************************************************************/
|
||||||
|
|
||||||
#pragma precomp SRP_PreCompiler
|
#pragma precomp SRP_PreCompiler
|
||||||
#Window NDW_MAKEUP_WAFERS
|
#Window NDW_MAKEUP_WAFERS
|
||||||
|
|
||||||
@ -50,11 +49,11 @@ If Event EQ 'OLE' then
|
|||||||
Transfer Param1 to Event
|
Transfer Param1 to Event
|
||||||
Transfer Param2 to Param1
|
Transfer Param2 to Param1
|
||||||
Transfer Param3 to Param2
|
Transfer Param3 to Param2
|
||||||
* Transfer Param4 to Param3
|
Transfer Param4 to Param3
|
||||||
* Transfer Param5 to Param4
|
Transfer Param5 to Param4
|
||||||
* Transfer Param6 to Param5
|
Transfer Param6 to Param5
|
||||||
* Transfer Param7 to Param6
|
Transfer Param7 to Param6
|
||||||
* Transfer Param8 to Param7
|
Transfer Param8 to Param7
|
||||||
end
|
end
|
||||||
|
|
||||||
GoToEvent Event for CtrlEntID
|
GoToEvent Event for CtrlEntID
|
||||||
@ -67,7 +66,7 @@ Return EventFlow else EVENT_CONTINUE$
|
|||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
Event WINDOW.CREATE(CreateParam)
|
Event WINDOW.CREATE(CreateParam)
|
||||||
|
|
||||||
ThisWOMatKey = CreateParam
|
ThisWOMatKey = CreateParam
|
||||||
ThisWorkOrderNo = ThisWOMatKey[1, '*']
|
ThisWorkOrderNo = ThisWOMatKey[1, '*']
|
||||||
ThisCassetteNo = ThisWOMatKey[Col2() + 1, '*']
|
ThisCassetteNo = ThisWOMatKey[Col2() + 1, '*']
|
||||||
@ -445,6 +444,3 @@ Setup_OLE_Controls:
|
|||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user