Removed lot events for non-epipro RDS lots in lieu of logging
This commit is contained in:
committed by
Stieber Daniel (CSC FI SPS MESLEO)
parent
89bb3e479b
commit
098f740585
@ -46,19 +46,19 @@ Compile function Hold_Services(@Service, @Params)
|
||||
|
||||
***********************************************************************************************************************/
|
||||
#pragma precomp SRP_PreCompiler
|
||||
$insert LOGICAL
|
||||
$Insert SERVICE_SETUP
|
||||
|
||||
$Insert APP_INSERTS
|
||||
$Insert SERVICE_SETUP
|
||||
$Insert MSG_EQUATES
|
||||
$Insert DICT_EQUATES
|
||||
$Insert WO_MAT_EQUATES
|
||||
$INSERT NOTIFICATION_EQU
|
||||
|
||||
$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 function Environment_Services, Utility, Logging_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, Lot_Event_Services
|
||||
Declare subroutine Wm_Out_Services, Rds_Services, Lot_Event_Services, Logging_Services
|
||||
|
||||
GoToService else
|
||||
Error_Services('Add', Service : ' is not a valid service request within the ' : ServiceModule : ' module.')
|
||||
@ -268,6 +268,15 @@ end service
|
||||
// Places a lot on hold.
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service OnHold(WOMatKey, HoldEntity, HoldEntityID, HoldType, HoldData, OperatorID, OriginFlag)
|
||||
|
||||
LogDate = Oconv(Date(), 'D4/')
|
||||
Machine = Environment_Services('GetServer')
|
||||
Headers = 'Logging DTM' : @FM : 'Machine' : @FM : 'Log'
|
||||
ColumnWidths = 20 : @FM : 15 : @FM : 300
|
||||
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\Holds'
|
||||
makeDirSuccess = Utility("MAKEDIR", LogPath)
|
||||
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : '_HoldLog.csv'
|
||||
objLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, ' ', Headers, ColumnWidths, False$, False$)
|
||||
|
||||
IF WOMatKey = '' or HoldEntity = '' or HoldEntityID = '' or HoldType = '' THEN
|
||||
Error_Services('Add', 'Null parameter WOMatKey, HoldEntity, HoldEntityID, or HoldType passed to service.')
|
||||
@ -361,29 +370,31 @@ 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
|
||||
LotKey = ''
|
||||
Begin Case
|
||||
Case HoldEntity EQ 'WM_IN'
|
||||
WONo = Field(WOMatKey, '*', 1)
|
||||
StepNo = 1
|
||||
CassNo = Field(WOMatKey, '*', 2)
|
||||
WONo = Field(WOMatKey, '*', 1)
|
||||
StepNo = 1
|
||||
CassNo = Field(WOMatKey, '*', 2)
|
||||
WMInKey = WONo : '*' : StepNo : '*' : CassNo
|
||||
Lot_Event_Services('CreateLotEvent', WMInKey, CurrDTM, 'HOLD_ON', 'Lot placed on hold.', '', UserId, True$, 'WM_IN')
|
||||
LotKey = WMInKey
|
||||
Case HoldEntity EQ 'WM_OUT'
|
||||
WONo = Field(WOMatKey, '*', 1)
|
||||
StepNo = 1
|
||||
CassNo = Field(WOMatKey, '*', 2)
|
||||
WONo = Field(WOMatKey, '*', 1)
|
||||
StepNo = 1
|
||||
CassNo = Field(WOMatKey, '*', 2)
|
||||
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
|
||||
Lot_Event_Services('CreateLotEvent', WMOutKey, CurrDTM, 'HOLD_ON', 'Lot placed on hold.', '', UserId, True$, 'WM_OUT')
|
||||
LotKey = WMOutKey
|
||||
Case HoldEntity EQ 'RDS'
|
||||
RDSNo = Xlate('WO_MAT', WOMatKey, WO_MAT_RDS_NO$, 'X')
|
||||
Lot_Event_Services('CreateLotEvent', RDSNo, CurrDTM, 'HOLD_ON', 'Lot placed on hold.', '', UserId, True$, 'RDS')
|
||||
RDSNo = Xlate('WO_MAT', WOMatKey, WO_MAT_RDS_NO$, 'X')
|
||||
LotKey = RDSNo
|
||||
Case HoldEntity EQ 'WO_MAT'
|
||||
Lot_Event_Services('CreateLotEvent', WOMatKey, CurrDTM, 'HOLD_ON', 'Lot placed on hold.', '', UserId, True$, 'WO_MAT')
|
||||
LotKey = WOMatKey
|
||||
End Case
|
||||
LogData = ''
|
||||
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS') ; // Logging DTM
|
||||
LogData<2> = Machine
|
||||
LogData<3> = 'Lot ':LotKey:' of type ':HoldEntity:' placed on hold by user ':OperatorId
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
|
||||
end
|
||||
end else
|
||||
Error_Services('Add', 'Lot is already on hold.')
|
||||
@ -406,6 +417,15 @@ End Service
|
||||
// Removes a hold placed on a lot.
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service OffHold(WOMatKey, HoldEntity, HoldEntityID, HoldType, HoldData, OperatorID, OriginFlag)
|
||||
|
||||
LogDate = Oconv(Date(), 'D4/')
|
||||
Machine = Environment_Services('GetServer')
|
||||
Headers = 'Logging DTM' : @FM : 'Machine' : @FM : 'Log'
|
||||
ColumnWidths = 20 : @FM : 15 : @FM : 300
|
||||
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\Holds'
|
||||
makeDirSuccess = Utility("MAKEDIR", LogPath)
|
||||
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : '_HoldLog.csv'
|
||||
objLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, ' ', Headers, ColumnWidths, False$, False$)
|
||||
|
||||
IF WOMatKey = '' or HoldEntity = '' or HoldEntityID = '' or HoldType = '' THEN
|
||||
Error_Services('Add', 'Null parameter WOMatKey, HoldEntity, HoldEntityID, or HoldType passed to service.')
|
||||
@ -497,29 +517,31 @@ 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_Event_Services('CreateLotEvent', WMInKey, CurrDTM, 'HOLD_OFF', 'Lot taken off hold.', '', UserId, True$, 'WM_IN')
|
||||
Case HoldEntity EQ 'WM_OUT'
|
||||
WONo = Field(WOMatKey, '*', 1)
|
||||
StepNo = 1
|
||||
CassNo = Field(WOMatKey, '*', 2)
|
||||
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
|
||||
Lot_Event_Services('CreateLotEvent', WMOutKey, CurrDTM, 'HOLD_OFF', 'Lot taken off hold.', '', UserId, True$, 'WM_OUT')
|
||||
Case HoldEntity EQ 'RDS'
|
||||
RDSNo = Xlate('WO_MAT', WOMatKey, WO_MAT_RDS_NO$, 'X')
|
||||
Lot_Event_Services('CreateLotEvent', RDSNo, CurrDTM, 'HOLD_OFF', 'Lot taken off hold.', '', UserId, True$, 'RDS')
|
||||
Case HoldEntity EQ 'WO_MAT'
|
||||
Lot_Event_Services('CreateLotEvent', WOMatKey, CurrDTM, 'HOLD_OFF', 'Lot taken off hold.', '', UserId, True$, 'WO_MAT')
|
||||
End Case
|
||||
LotKey = ''
|
||||
Begin Case
|
||||
Case HoldEntity EQ 'WM_IN'
|
||||
WONo = Field(WOMatKey, '*', 1)
|
||||
StepNo = 1
|
||||
CassNo = Field(WOMatKey, '*', 2)
|
||||
WMInKey = WONo : '*' : StepNo : '*' : CassNo
|
||||
LotKey = WMInKey
|
||||
Case HoldEntity EQ 'WM_OUT'
|
||||
WONo = Field(WOMatKey, '*', 1)
|
||||
StepNo = 1
|
||||
CassNo = Field(WOMatKey, '*', 2)
|
||||
WMOutKey = WONo : '*' : StepNo : '*' : CassNo
|
||||
LotKey = WMOutKey
|
||||
Case HoldEntity EQ 'RDS'
|
||||
RDSNo = Xlate('WO_MAT', WOMatKey, WO_MAT_RDS_NO$, 'X')
|
||||
LotKey = RDSNo
|
||||
Case HoldEntity EQ 'WO_MAT'
|
||||
LotKey = WOMatKey
|
||||
End Case
|
||||
LogData = ''
|
||||
LogData<1> = Oconv(Date(), 'D4/') : ' ' : Oconv(Time(), 'MTS') ; // Logging DTM
|
||||
LogData<2> = Machine
|
||||
LogData<3> = 'Lot ':LotKey:' of type ':HoldEntity:' taken off hold by user ':OperatorId
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
|
||||
end
|
||||
end else
|
||||
Error_Services('Add', 'Lot is not on hold.')
|
||||
@ -815,4 +837,3 @@ Service CreateComment(HoldEntity, HoldEntityID, Reason, Transition, HoldType, Op
|
||||
|
||||
end service
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user