Merged PR 13813: Lot void routines enhancement
Lot void routines enhancement Related work items: #110807
This commit is contained in:
parent
507c6bffba
commit
b76db6bc72
@ -72,7 +72,8 @@ Service CreatAWO()
|
||||
WOQty = FileIn<1,7>
|
||||
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
|
||||
WOLogFileIn = 'M999930.1':@VM:'NA':@VM:'02/29/2024':@VM:'U053':@VM:'931968':@VM:'1.0':@VM:'2400':@VM:'NA'
|
||||
RetVal = obj_WO_LOG('SAPCreate',WOLogFileIn)
|
||||
Response = RetVal
|
||||
end service
|
||||
@ -161,6 +162,7 @@ Service ReleaseCassettes(WONo)
|
||||
end service
|
||||
|
||||
Service PerformPTI(CassID)
|
||||
debug
|
||||
//Step 5: User performs a PTI scan to tag lot into the fab.
|
||||
Warehouse = '1K'
|
||||
Location = 'PTI'
|
||||
@ -406,6 +408,7 @@ Service VerifyRecipeParams(RDSNo)
|
||||
end service
|
||||
|
||||
Service SendCassComp(WoMatKey)
|
||||
debug
|
||||
Sap_Services('RetransmitCassComp', WoMatKey)
|
||||
obj_sap('SendOutbound')
|
||||
end service
|
||||
@ -413,3 +416,5 @@ end service
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -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 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 Wm_Out_Services, Rds_Services
|
||||
Declare subroutine Wm_Out_Services, Rds_Services, Lot_Services
|
||||
|
||||
GoToService else
|
||||
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
|
||||
Hold_Services("HoldNotification", 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 else
|
||||
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
|
||||
Hold_Services("HoldNotification", 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 else
|
||||
Error_Services('Add', 'Lot is not on hold.')
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -370,3 +370,5 @@ End Service
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -69,10 +69,10 @@ $Insert QUOTE_DET_EQU
|
||||
$Insert QUOTE_SIGS_EQU
|
||||
$Insert REACT_RUN_EQUATES
|
||||
$Insert WM_OUT_EQUATES
|
||||
$Insert WO_STEP_EQU
|
||||
$Insert ORDER_EQU
|
||||
$Insert ORDER_DET_EQU
|
||||
$Insert RLIST_EQUATES
|
||||
$Insert WO_STEP_EQUATES
|
||||
|
||||
EQU COL$QUOTE_DESC TO 1
|
||||
EQU COL$SETUP_CHG TO 4
|
||||
@ -116,10 +116,10 @@ EQU COL$STEP_SCHED_DTM TO 11
|
||||
EQU COMMA$ to ','
|
||||
|
||||
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 Security_Err_Msg, obj_WM_Out, Database_Services, End_Window, Print_Shelf_Label
|
||||
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, Signature_Services
|
||||
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'
|
||||
LogDate = Oconv(Date(), 'D4/')
|
||||
@ -1187,15 +1187,13 @@ end event
|
||||
|
||||
|
||||
Event PUB_REM_CASS.CLICK()
|
||||
|
||||
WONo = Get_Property(@WINDOW:'.EDL_WO_NO','TEXT')
|
||||
WOStepKey = XLATE('WO_LOG', WONo, WO_LOG_WO_STEP_KEY$, 'X')
|
||||
IF WONo NE '' then
|
||||
|
||||
WORec = XLATE('WO_LOG',WONo,'','X')
|
||||
WOMatKeys = WORec<WO_LOG_WO_MAT_KEY$>
|
||||
WMInKeys = XLATE('WO_MAT',WOMatKeys,WO_MAT_WMI_KEY$,'X')
|
||||
|
||||
WMInKeys = XLATE('WO_MAT',WOMatKeys,WO_MAT_WMI_KEY$,'X')
|
||||
WMInKeys = XLATE('WO_STEP', WOStepKey, WO_STEP_WM_IN_KEYS$, 'X')
|
||||
WMInTestSTring = WMInKeys
|
||||
|
||||
CONVERT @VM TO '' IN WMInTestString
|
||||
@ -1212,7 +1210,7 @@ Event PUB_REM_CASS.CLICK()
|
||||
DispLine = 1
|
||||
|
||||
IF WMInTestString NE '' THEN
|
||||
|
||||
//EPP Case for WMI
|
||||
FOR I = WMInCnt TO 1 STEP -1
|
||||
WMIRec = XLATE('WM_IN',WMInKeys<1,I>,'','X')
|
||||
WMIRdsNos = WMIRec<WM_IN_RDS_NO$>
|
||||
@ -1256,26 +1254,15 @@ Event PUB_REM_CASS.CLICK()
|
||||
NEXT I
|
||||
|
||||
TestWMInKeys = DelWMInKeys
|
||||
CONVERT @VM TO '' IN TestWMInKeys
|
||||
|
||||
IF TestWMInKeys NE '' THEN
|
||||
Set_Status(0)
|
||||
obj_WM_In('Delete',DelWMInKeys) ;* Removes WMI records from system
|
||||
|
||||
IF Get_Status(errCode) THEN
|
||||
ErrMsg(errCode)
|
||||
END
|
||||
for each DelWMInKey in DelWMInKeys using @VM
|
||||
Work_Order_Services('SignVoidWMI', DelWMInKey, @USER4)
|
||||
Next DelWMInKey
|
||||
END
|
||||
|
||||
Set_Status(0)
|
||||
obj_WO_Log('RemoveCassettes',WONo:@RM:CassNos)
|
||||
|
||||
IF Get_Status(errCode) THEN
|
||||
ErrMsg(errCode)
|
||||
END
|
||||
|
||||
END ELSE
|
||||
|
||||
//Non-EPP Case for RDS
|
||||
CassCnt = COUNT(WOMatKeys,@VM) + (WOMatKeys NE '')
|
||||
|
||||
FOR I = CassCnt TO 1 STEP -1
|
||||
@ -1289,14 +1276,15 @@ Event PUB_REM_CASS.CLICK()
|
||||
CONVERT @VM TO '' IN WOMatSigs
|
||||
|
||||
UNTIL WOMatSigs NE ''
|
||||
Display<1,DispLine,1> = WOMatKeys<1,I>[-1,'B*']
|
||||
Display<1,DispLine,2> = WOMatRec<WO_MAT_LOT_NO$>
|
||||
Display<1,DispLine,3> = WOMatRec<WO_MAT_WAFER_QTY$>
|
||||
Display<1,DispLine,4> = WOMatRec<WO_MAT_RDS_NO$>
|
||||
Display<1,DispLine,5> = OCONV(WOMatCurrStatus,'[WO_MAT_CURR_STATUS_CONV]')
|
||||
DispLine += 1
|
||||
If WoMatCurrStatus NE 'VOID' then
|
||||
Display<1,DispLine,1> = WOMatKeys<1,I>[-1,'B*']
|
||||
Display<1,DispLine,2> = WOMatRec<WO_MAT_LOT_NO$>
|
||||
Display<1,DispLine,3> = WOMatRec<WO_MAT_WAFER_QTY$>
|
||||
Display<1,DispLine,4> = WOMatRec<WO_MAT_RDS_NO$>
|
||||
Display<1,DispLine,5> = OCONV(WOMatCurrStatus,'[WO_MAT_CURR_STATUS_CONV]')
|
||||
DispLine += 1
|
||||
end
|
||||
NEXT I
|
||||
|
||||
IF Display NE '' THEN
|
||||
TypeOver = ''
|
||||
TypeOver<PDISPLAY$> = Display
|
||||
@ -1322,23 +1310,18 @@ Event PUB_REM_CASS.CLICK()
|
||||
END
|
||||
NEXT I
|
||||
|
||||
TestRDSNos = RDSNos
|
||||
CONVERT @VM TO '' IN TestRDSNos
|
||||
IF TestRDSNos NE '' THEN
|
||||
Set_Status(0)
|
||||
InProcessRDSNos = obj_RDS('Delete',RDSNos) ;* Removes RDS records from system
|
||||
|
||||
IF Get_Status(errCode) THEN
|
||||
ErrMsg(errCode)
|
||||
END
|
||||
END
|
||||
|
||||
Set_Status(0)
|
||||
obj_WO_Log('RemoveCassettes',WONo:@RM:CassNos)
|
||||
|
||||
IF Get_Status(errCode) THEN
|
||||
ErrMsg(errCode)
|
||||
END
|
||||
VoidStatusMessage = ''
|
||||
for each CassNo in CassNos using @VM
|
||||
WoMatKey = WONo : '*' : CassNo
|
||||
Work_Order_Services('SignVoidNonEpp', WoMatKey, @USER4)
|
||||
If Error_Services('HasError') then
|
||||
VoidStatusMessage = Error_Services('GetMessage')
|
||||
end
|
||||
Next CassNo
|
||||
If VoidStatusMessage EQ '' then
|
||||
VoidStatusMessage = 'All cassettes have been queued for void.'
|
||||
end
|
||||
Msg(@Window, VoidStatusMessage)
|
||||
END
|
||||
|
||||
IF Display = '' THEN
|
||||
@ -1374,14 +1357,13 @@ end event
|
||||
|
||||
|
||||
Event PUB_REM_WM_OUT.CLICK()
|
||||
|
||||
WONo = Get_Property(@WINDOW:'.EDL_WO_NO','TEXT')
|
||||
WOStepKey = XLATE('WO_LOG', WONo, WO_LOG_WO_STEP_KEY$, 'X')
|
||||
IF WONo NE '' then
|
||||
|
||||
WORec = XLATE('WO_LOG',WONo,'','X')
|
||||
WOMatKeys = WORec<WO_LOG_WO_MAT_KEY$>
|
||||
|
||||
WMOutKeys = XLATE('WO_MAT',WOMatKeys,WO_MAT_WMO_KEY$,'X')
|
||||
WMOutKeys = Database_Services('ReadDataColumn', 'WO_STEP', WOStepKey, WO_STEP_WM_OUT_KEYS$, True$, 0, False$)
|
||||
WMOutCnt = COUNT(WMOutKeys,@VM) + (WMOutKeys NE '')
|
||||
|
||||
Display = ''
|
||||
@ -1422,21 +1404,15 @@ Event PUB_REM_WM_OUT.CLICK()
|
||||
NEXT I
|
||||
|
||||
TestWMOutKeys = DelWMOutKeys
|
||||
CONVERT @VM TO '' IN TestWMOutKeys
|
||||
|
||||
IF TestWMOutKeys NE '' THEN
|
||||
Set_Status(0)
|
||||
obj_WM_Out('Delete',DelWMOutKeys) ;* Removes WMO records from system
|
||||
|
||||
IF Get_Status(errCode) THEN
|
||||
ErrMsg(errCode)
|
||||
END
|
||||
for each WMOutKey in TestWMOutKeys using @VM
|
||||
Work_Order_Services('SignVoidWMO', WMOutKey, @USER4)
|
||||
Next WMOutKey
|
||||
If Error_Services('HasError') then
|
||||
Msg(@Window, Error_Services('GetMessage'))
|
||||
end
|
||||
END
|
||||
|
||||
IF Get_Status(errCode) THEN
|
||||
ErrMsg(errCode)
|
||||
END
|
||||
|
||||
END
|
||||
|
||||
IF Display = '' THEN
|
||||
@ -2163,3 +2139,6 @@ StartStopDate:
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -296,7 +296,6 @@ RETURN
|
||||
* * * * * * *
|
||||
RemainingSlots:
|
||||
* * * * * * *
|
||||
|
||||
WONo = Parms[1,@RM]
|
||||
WOStep = Parms[COL2()+1,@RM]
|
||||
CassNos = Parms[COL2()+1,@RM]
|
||||
@ -321,7 +320,7 @@ RemainingSlots:
|
||||
WMInRec = XLATE('WM_IN',WONo:'*':WOStep:'*':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
|
||||
END ELSE
|
||||
SlotCnt = COUNT(WMInRec<WM_IN_SLOT_NO$>,@VM) + (WMInRec<WM_IN_SLOT_NO$> NE '')
|
||||
@ -935,3 +934,5 @@ RepProdTW:
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
|
||||
|
@ -632,7 +632,8 @@ NextOpenSlots:
|
||||
SlotCnt = COUNT(WMOutRec<WM_OUT_SLOT_NO$>,@VM) + (WMOutRec<WM_OUT_SLOT_NO$> NE '')
|
||||
IsMULot = WMOutRec EQ True$
|
||||
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
|
||||
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
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -800,6 +800,12 @@ IF WMIKey NE '' OR WMOKey NE '' THEN
|
||||
Result = 'RTB'
|
||||
Case WMIStatus EQ 'HOLD' and WMOStatus NE ''
|
||||
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 = ''
|
||||
Result = ''
|
||||
|
||||
@ -3256,7 +3262,7 @@ ReportStatus:
|
||||
END
|
||||
|
||||
IF WMIKey NE '' THEN
|
||||
IF WMIStatus = 'MT' OR WMIStatus = 'VOID' THEN
|
||||
IF WMIStatus = 'MT' THEN
|
||||
NULL
|
||||
END ELSE
|
||||
InboundStat = WMIStatus
|
||||
@ -3267,41 +3273,49 @@ ReportStatus:
|
||||
|
||||
* 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
|
||||
END ELSE
|
||||
OutboundStat = WMOStatus
|
||||
END
|
||||
END
|
||||
|
||||
BEGIN CASE
|
||||
CASE InboundStat = '' AND OutboundStat = ''
|
||||
Result = ''
|
||||
|
||||
CASE InboundStat = '' AND OutboundStat NE ''
|
||||
IF WMOMakeup = 1 THEN
|
||||
OutboundStat = 'WMO':' - M/U - ':OCONV(WMOStatus,'[WM_OUT_CURR_STATUS_CONV]')
|
||||
END ELSE
|
||||
OutboundStat = 'WMO':' - ':OCONV(WMOStatus,'[WM_OUT_CURR_STATUS_CONV]')
|
||||
END
|
||||
Result = OutboundStat
|
||||
BEGIN CASE
|
||||
CASE InboundStat = '' AND OutboundStat = ''
|
||||
Result = ''
|
||||
CASE InboundStat = '' AND OutboundStat NE ''
|
||||
IF WMOMakeup = 1 THEN
|
||||
OutboundStat = 'WMO':' - M/U - ':OCONV(WMOStatus,'[WM_OUT_CURR_STATUS_CONV]')
|
||||
END ELSE
|
||||
OutboundStat = 'WMO':' - ':OCONV(WMOStatus,'[WM_OUT_CURR_STATUS_CONV]')
|
||||
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
|
||||
|
||||
IF WMOMakeup = 1 THEN
|
||||
OutboundStat = 'WMO':' - M/U - ':OCONV(WMOStatus,'[WM_OUT_CURR_STATUS_CONV]')
|
||||
END ELSE
|
||||
OutboundStat = 'WMO':' - ':OCONV(WMOStatus,'[WM_OUT_CURR_STATUS_CONV]')
|
||||
END
|
||||
Result = Result:OutboundStat
|
||||
|
||||
|
||||
CASE InboundStat NE '' AND OutboundStat NE ''
|
||||
Result = 'WMI':' - ':OCONV(WMIStatus,'[WM_IN_CURR_STATUS_CONV]'):@VM
|
||||
|
||||
IF WMOMakeup = 1 THEN
|
||||
OutboundStat = 'WMO':' - M/U - ':OCONV(WMOStatus,'[WM_OUT_CURR_STATUS_CONV]')
|
||||
END ELSE
|
||||
OutboundStat = 'WMO':' - ':OCONV(WMOStatus,'[WM_OUT_CURR_STATUS_CONV]')
|
||||
END
|
||||
Result = Result:OutboundStat
|
||||
|
||||
END CASE
|
||||
END CASE
|
||||
Begin 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
|
||||
|
||||
@ -5604,3 +5618,4 @@ RETURN
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -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 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 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 WO_MAT_LOG_EQUATES
|
||||
@ -27,6 +27,7 @@ $INSERT WM_OUT_EQUATES
|
||||
$INSERT WM_IN_EQUATES
|
||||
$INSERT WO_MAT_EQUATES
|
||||
$INSERT RDS_EQU
|
||||
$Insert WO_LOG_EQUATES
|
||||
|
||||
$INSERT LSL_USERS_EQUATES
|
||||
$INSERT SRPMail_Inserts
|
||||
@ -158,10 +159,79 @@ Create:
|
||||
* END
|
||||
|
||||
Database_Services('WriteDataRow', 'WO_MAT_LOG', WOMatLogKey, WOMatLogRec, True$, False$, True$)
|
||||
If Error_Services('HasError') then
|
||||
ErrorMsg = Error_Services('GetMessage')
|
||||
end else
|
||||
If Error_Services('NoError') then
|
||||
ReactType = XLATE('WO_LOG', WONos, WO_LOG_REACT_TYPE$, 'X')
|
||||
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 = ''
|
||||
end else
|
||||
ErrorMsg = Error_Services('GetMessage')
|
||||
end
|
||||
|
||||
RETURN
|
||||
@ -270,11 +340,7 @@ Post:
|
||||
LockedToolID = ScanToolID
|
||||
LockedScanEntry = ScanEntry
|
||||
|
||||
END ELSE
|
||||
NULL
|
||||
END
|
||||
|
||||
|
||||
NEXT I
|
||||
|
||||
WMLRec<WO_MAT_LOG_WO_NO$> = LockedWONos
|
||||
@ -298,5 +364,3 @@ Post:
|
||||
end
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
|
@ -2517,8 +2517,6 @@ Service SignLoadStage(RDSNo, Username, WaferQty, LLSide, ScanEntry)
|
||||
Error_Services('Set', ErrorMsg)
|
||||
Response = False$
|
||||
return
|
||||
end else
|
||||
Lot_Services('CreateLotEvent', RDSNo, 'RDS', Datetime(), 'LOAD', 'Load stage signed', Reactor, '', '', '', Username)
|
||||
end
|
||||
|
||||
IF ReactorType NE 'EPP' THEN
|
||||
@ -3893,3 +3891,5 @@ ClearCursors:
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -686,8 +686,9 @@ WRITE_RECORD_PRE:
|
||||
|
||||
If NewLoadSig EQ '' then
|
||||
// Audit the LOT_EVENT table for missing LOAD event (i.e., signature)
|
||||
If RowExists('LOT', RDSNo) then
|
||||
LotEvents = Lot_Services('GetLotEventsInSequence', RDSNo)
|
||||
ExistingNGLotId = Lot_Services('GetLotIdByLegacyLotIdAndType', RDSNo, 'RDS')
|
||||
If RowExists('LOT', ExistingNGLotId) then
|
||||
LotEvents = Lot_Services('GetLotEventsInSequence', ExistingNGLotId)
|
||||
If LotEvents NE '' then
|
||||
LotEventsRev = SRP_Array('Reverse', LotEvents, @FM)
|
||||
LotEventsTypesRev = Xlate('LOT_EVENT', LotEventsRev, LOT_EVENT_LOT_EVENT_TYPE$, 'X')
|
||||
|
@ -427,7 +427,6 @@ Event PUB_SIGN.CLICK()
|
||||
Send_Event(@Window, 'READ')
|
||||
|
||||
Case SignEventType EQ 'Unsign'
|
||||
|
||||
// 1. Check if on hold. If so, then block event and inform user
|
||||
WOMatKey = WONo:'*':CassNo
|
||||
WOMatCurrStatus = obj_WO_Mat('CurrStatus',WOMatKey)
|
||||
|
@ -1759,6 +1759,26 @@ Service ApplyAbortMetrology(RdsKeys)
|
||||
|
||||
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
|
||||
@ -1778,3 +1798,5 @@ return
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -156,18 +156,19 @@ end service
|
||||
Service ProcessProcedureQueue()
|
||||
|
||||
Open 'PROC_QUEUE' to hProcQueue then
|
||||
Select hProcQueue
|
||||
Select hProcQueue
|
||||
EOF = False$
|
||||
Loop
|
||||
ReadNext RequestKeyID else EOF = True$
|
||||
Until EOF
|
||||
Lock hProcQueue, RequestKeyID then
|
||||
Database_Services('GetKeyIDLock', 'PROC_QUEUE', RequestKeyId)
|
||||
RequestRow = Database_Services('ReadDataRow', 'PROC_QUEUE', RequestKeyID)
|
||||
If RequestRow NE '' then
|
||||
Procedure = RequestRow<PROC_QUEUE.PROC_NAME$>
|
||||
Params = RequestRow<PROC_QUEUE.PARAMS$>
|
||||
If Procedure NE '' then
|
||||
Dim ProcParams(10)
|
||||
Dim ProcParams(11)
|
||||
For each Param in Params using @VM setting pPos
|
||||
ProcParams(pPos) = 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 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 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
|
||||
end
|
||||
@ -197,12 +199,13 @@ Service ProcessProcedureQueue()
|
||||
Unlock hProcQueue, RequestKeyID else Null
|
||||
end
|
||||
Repeat
|
||||
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service PostProcecure(ProcedureName, Params)
|
||||
Service PostProcedure(ProcedureName, Params)
|
||||
|
||||
Response = ''
|
||||
If (ProcedureName NE '') then
|
||||
@ -210,6 +213,7 @@ Service PostProcecure(ProcedureName, Params)
|
||||
RequestRow = ''
|
||||
RequestRow<PROC_QUEUE.PROC_NAME$> = ProcedureName
|
||||
RequestRow<PROC_QUEUE.PARAMS$> = Params
|
||||
RequestRow<PROC_QUEUE.ENTRY_DTM$> = Datetime()
|
||||
Database_Services('WriteDataRow', 'PROC_QUEUE', RequestKeyID, RequestRow, True$, False$, False$)
|
||||
end else
|
||||
Error_Services('Add', 'Error in ':Service:' service. Null ProcedureName passed in.')
|
||||
@ -219,8 +223,7 @@ return
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Internal GoSubs
|
||||
/// Internal GoSubs
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
|
@ -55,7 +55,7 @@ $Insert WM_IN_EQUATES
|
||||
|
||||
Declare function Database_Services
|
||||
Declare function PSN_Services, SRP_Rotate_Array, Datetime
|
||||
Declare subroutine Database_Services,
|
||||
Declare subroutine Database_Services, Set_Status, OBJ_WO_MAT_LOG
|
||||
|
||||
GoToService
|
||||
|
||||
@ -121,3 +121,46 @@ Service AddComment(WMInNo, Comment)
|
||||
|
||||
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
|
||||
|
||||
|
||||
|
||||
|
@ -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 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
|
||||
|
||||
@ -397,4 +397,47 @@ Service GetWaferMap(WMOKey)
|
||||
|
||||
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
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -45,13 +45,16 @@ $insert LOGICAL
|
||||
$insert RLIST_EQUATES
|
||||
$insert COMPANY_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 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 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'
|
||||
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'
|
||||
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
|
||||
|
||||
GoToService else
|
||||
@ -1044,6 +1054,263 @@ Service ConvertRecordToJSON(WONo, Record, ItemURL)
|
||||
Response = jsonRecord
|
||||
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
|
||||
@ -1055,3 +1322,5 @@ ClearCursors:
|
||||
Next counter
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
@ -2,7 +2,9 @@ Compile function WO_MAT_Services(@Service, @Params)
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
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 obj_wo_mat_log, Set_Status
|
||||
|
||||
$insert LOGICAL
|
||||
$Insert APP_INSERTS
|
||||
@ -424,3 +426,50 @@ Service CassetteIsLastInWo(WoMatKey)
|
||||
Response = IsLastInWo
|
||||
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
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
compile insert LOT_EQUATES
|
||||
/*----------------------------------------
|
||||
Author : Table Create Insert Routine
|
||||
Written : 28/10/2024
|
||||
Written : 26/03/2025
|
||||
Description : Insert for Table LOT
|
||||
----------------------------------------*/
|
||||
#ifndef __LOT_EQUATES__
|
||||
@ -20,5 +20,7 @@ compile insert LOT_EQUATES
|
||||
equ LOT_OPEN$ to 11
|
||||
equ LOT_HOLD$ to 12
|
||||
equ LOT_HOT$ to 13
|
||||
equ LOT_LEGACY_LOT_ID$ to 14
|
||||
equ LOT_VOIDED_LOT_RECORDS$ to 15
|
||||
|
||||
#endif
|
||||
|
@ -11,5 +11,7 @@ compile insert PROC_QUEUE_EQUATES
|
||||
equ PROC_QUEUE.PARAMS$ to 2
|
||||
equ PROC_QUEUE.LAST_ATTEMPT_DTM$ to 3
|
||||
equ PROC_QUEUE.ERROR$ to 4
|
||||
equ PROC_QUEUE.ENTRY_DTM$ to 5
|
||||
|
||||
#endif
|
||||
|
||||
|
17
LSL2/STPROCINS/VOIDED_LOT_EQUATES.txt
Normal file
17
LSL2/STPROCINS/VOIDED_LOT_EQUATES.txt
Normal 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
|
Loading…
x
Reference in New Issue
Block a user