added services and triggers to manually add index transactions to keep indexes up-to-date
This commit is contained in:
committed by
Stieber Daniel (CSC FI SPS MESLEO)
parent
71daf317f0
commit
c89bb6b3d4
@ -279,55 +279,61 @@ Event PUB_SIGN.CLICK()
|
||||
ReactorType = XLATE('RDS',RDSNo,'REACTOR_TYPE','X')
|
||||
ErrMsg = ''
|
||||
If Len(ReactorType) GE 3 and ReactorType[1, 3] _EQC 'HTR' then
|
||||
WoMatKey = WONo:'*':CassNo
|
||||
IsLastCassetteInWo = WO_MAT_Services('CassetteIsLastInWo', WoMatKey)
|
||||
If Error_Services('NoError') then
|
||||
If IsLastCassetteInWo then
|
||||
NextEventScheduled = False$
|
||||
NextEventHasSamePsn = True$
|
||||
NextEventIsBlock = False$
|
||||
|
||||
NextScheduledEvent = Schedule_Services('GetNextEvent', Reactor)
|
||||
If Error_Services('NoError') then
|
||||
NextEventScheduled = True$
|
||||
|
||||
NextEventHasSamePsn = Schedule_Services('NextEventIsSamePsn', Reactor)
|
||||
NextEventIsBlock = Schedule_Services('NextEventIsBlock', Reactor)
|
||||
end
|
||||
|
||||
If NextEventScheduled EQ False$ or NextEventHasSamePsn EQ False$ or NextEventIsBlock EQ True$ then
|
||||
WoMatRecord = Database_Services('ReadDataRow', 'WO_MAT', WoMatKey)
|
||||
WoMatRecord<WO_MAT_LAST_CASSETTE_TEST_WAFER_ACK_REQ$> = True$
|
||||
|
||||
TestWaferRanSinceLoad = WoMatRecord<WO_MAT_LAST_CASSETTE_TEST_WAFER_RAN$>
|
||||
|
||||
If TestWaferRanSinceLoad NE True$ then
|
||||
TestWaferRanSinceLoad = Rds_Services('TestWaferRanAfterLoad', RDSNo)
|
||||
WoMatRecord<WO_MAT_LAST_CASSETTE_TEST_WAFER_RAN$> = TestWaferRanSinceLoad
|
||||
|
||||
If TestWaferRanSinceLoad NE True$ then
|
||||
Message = ''
|
||||
If NextEventScheduled EQ False$ or NextEventIsBlock EQ True$ then
|
||||
Message = 'No material scheduled. Test wafer required.'
|
||||
end else if NextEventHasSamePsn EQ False$ then
|
||||
Message = 'Next work order is a NEW PSN number. Test wafer required.'
|
||||
end
|
||||
|
||||
Message_Box(@Window, Message, "Test Wafer Required", MSG_BTN_OK$ + MSG_ICON_EXCLAM$)
|
||||
|
||||
TWLogResult = Dialog_Box('NDW_LOG_TEST_WAFER_USAGE', @Window, RDSNo : @VM : '' : @VM : 'REACTOR' : @VM : Reactor)
|
||||
|
||||
WoMatRecord<WO_MAT_LAST_CASSETTE_TEST_WAFER_RAN$> = TWLogResult
|
||||
|
||||
If TWLogResult NE True$ then
|
||||
ErrMsg = 'Unload blocked! You must run a test wafer before signing the unload'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Database_Services('WriteDataRow', 'WO_MAT', WoMatKey, WoMatRecord, True$, False$, False$)
|
||||
end
|
||||
end
|
||||
If ( (WONo NE '') and (CassNo NE '') ) then
|
||||
WoMatKey = WONo:'*':CassNo
|
||||
If RowExists('WO_MAT', WOMatKey) then
|
||||
IsLastCassetteInWo = WO_MAT_Services('CassetteIsLastInWo', WoMatKey)
|
||||
If Error_Services('NoError') then
|
||||
If IsLastCassetteInWo then
|
||||
NextEventScheduled = False$
|
||||
NextEventHasSamePsn = True$
|
||||
NextEventIsBlock = False$
|
||||
NextScheduledEvent = Schedule_Services('GetNextEvent', Reactor)
|
||||
If Error_Services('NoError') then
|
||||
NextEventScheduled = True$
|
||||
NextEventHasSamePsn = Schedule_Services('NextEventIsSamePsn', Reactor)
|
||||
NextEventIsBlock = Schedule_Services('NextEventIsBlock', Reactor)
|
||||
end
|
||||
If NextEventScheduled EQ False$ or NextEventHasSamePsn EQ False$ or NextEventIsBlock EQ True$ then
|
||||
WoMatRecord = Database_Services('ReadDataRow', 'WO_MAT', WoMatKey)
|
||||
If Error_Services('NoError') then
|
||||
If WOMatRecord NE '' then
|
||||
WoMatRecord<WO_MAT_LAST_CASSETTE_TEST_WAFER_ACK_REQ$> = True$
|
||||
TestWaferRanSinceLoad = WoMatRecord<WO_MAT_LAST_CASSETTE_TEST_WAFER_RAN$>
|
||||
If TestWaferRanSinceLoad NE True$ then
|
||||
TestWaferRanSinceLoad = Rds_Services('TestWaferRanAfterLoad', RDSNo)
|
||||
WoMatRecord<WO_MAT_LAST_CASSETTE_TEST_WAFER_RAN$> = TestWaferRanSinceLoad
|
||||
If TestWaferRanSinceLoad NE True$ then
|
||||
Message = ''
|
||||
If NextEventScheduled EQ False$ or NextEventIsBlock EQ True$ then
|
||||
Message = 'No material scheduled. Test wafer required.'
|
||||
end else if NextEventHasSamePsn EQ False$ then
|
||||
Message = 'Next work order is a NEW PSN number. Test wafer required.'
|
||||
end
|
||||
Message_Box(@Window, Message, "Test Wafer Required", MSG_BTN_OK$ + MSG_ICON_EXCLAM$)
|
||||
TWLogResult = Dialog_Box('NDW_LOG_TEST_WAFER_USAGE', @Window, RDSNo : @VM : '' : @VM : 'REACTOR' : @VM : Reactor)
|
||||
WoMatRecord<WO_MAT_LAST_CASSETTE_TEST_WAFER_RAN$> = TWLogResult
|
||||
If TWLogResult NE True$ then
|
||||
ErrMsg = 'Unload blocked! You must run a test wafer before signing the unload'
|
||||
end
|
||||
end
|
||||
end
|
||||
end else
|
||||
ErrMsg = 'WO_MAT record for ':WOMatKey:' is null!'
|
||||
end
|
||||
end else
|
||||
ErrMsg = Error_Services('GetMessage')
|
||||
end
|
||||
end
|
||||
Database_Services('WriteDataRow', 'WO_MAT', WoMatKey, WoMatRecord, True$, False$, False$)
|
||||
end
|
||||
end
|
||||
end else
|
||||
ErrMsg = 'WO_MAT ':WOMatKey:' does not exist!'
|
||||
end
|
||||
end else
|
||||
ErrMsg = 'Null WONo or null CassNo!'
|
||||
end
|
||||
end
|
||||
|
||||
If ErrMsg NE '' then
|
||||
@ -462,7 +468,3 @@ Setup_OLE_Controls:
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user