Merged PR 14215: Lot Last Event Datetime
Added field to lot table to store most recent event id. Maintained column by writing to it upon successful creation of a lot event. Added the most recent event dtm to the json object for lot records. Added related text view in NDW_VIEW_LOT form and method to read that data and populate the field. Related work items: #249625
This commit is contained in:
parent
999e11b1b8
commit
c477b8df58
File diff suppressed because it is too large
Load Diff
@ -941,6 +941,13 @@ Service CreateLotEvent(LotId, LotType=LOT_TYPES, EventDatetime, EventType=EVENT_
|
||||
Case Otherwise$
|
||||
ErrorMessage = 'Error in Create Lot Event routine, An invalid lot type was passed to routine.'
|
||||
End Case
|
||||
If Assigned(NewEventId) AND Assigned(LotId) then
|
||||
If RowExists('LOT_EVENT', NewEventId) AND RowExists('LOT', LotId) then
|
||||
LotRec = Database_Services('ReadDataRow', 'LOT', LotId, True$, 0, False$)
|
||||
LotRec<LOT_MOST_RECENT_LOT_EVENT_ID$> = NewEventId
|
||||
Database_Services('WriteDataRow', 'LOT', LotId, LotRec)
|
||||
end
|
||||
end
|
||||
end else
|
||||
ErrorMessage = 'Error in Create Lot Event routine, A null value for Lot Id was passed to routine.'
|
||||
end
|
||||
@ -1027,6 +1034,10 @@ Service ConvertLotRecordToJson(LotId, ItemURL, CurrUser, FullObject=BOOLEAN)
|
||||
CurrOperation = Lot_Services('GetLotCurrOperationId', LotId)
|
||||
CurrOperation = Field(CurrOperation, '*', 2)
|
||||
SRP_JSON(objLot, 'SetValue', 'CurrOperation', CurrOperation)
|
||||
MostRecentEventId = LotRec<LOT_MOST_RECENT_LOT_EVENT_ID$>
|
||||
MostRecentEventDtmIConv = Xlate('LOT_EVENT', MostRecentEventId, LOT_EVENT_EVENT_DATETIME$, 'X')
|
||||
MostRecentEventDtmOConv = OConv(MostRecentEventDtmIConv, 'DT')
|
||||
SRP_JSON(objLot, 'SetValue', 'MostRecentEventDateTime', MostRecentEventDtmOConv)
|
||||
If FullObject then
|
||||
//Events Array
|
||||
EventsArrayJson = ''
|
||||
@ -1423,3 +1434,4 @@ end service
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -39,17 +39,14 @@ end event
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
SetupFormControls:
|
||||
LabelFont = Get_Property(@Window : '.LBL_LOT_ID', 'FONT')
|
||||
LabelFont<1,1,2> = -20
|
||||
LabelFont<1,1,6> = 10
|
||||
Set_Property(@Window : '.LBL_LOT_ID', 'FONT', LabelFont)
|
||||
Set_Property(@Window : '.LBL_CURR_OPERATION', 'FONT', LabelFont)
|
||||
|
||||
EditLineFont = Get_Property(@Window : '.EDL_LOT_ID', 'FONT')
|
||||
EditLineFont<1,1,2> = -20
|
||||
EditLineFont<1,1,6> = 10
|
||||
Set_Property(@Window : '.EDL_LOT_ID', 'FONT', EditLineFont)
|
||||
Set_Property(@Window : '.EDL_LOT_ID', 'FONT', EditLineFont)
|
||||
Set_Property(@Window : '.LBL_LOT_ID', 'FONT', EditLineFont)
|
||||
Set_Property(@Window : '.EDL_CURR_OPERATION', 'FONT', EditLineFont)
|
||||
|
||||
return
|
||||
|
||||
GetLot:
|
||||
@ -65,6 +62,8 @@ GetLot:
|
||||
ThisLotCurrOperationID = Lot_Services('GetLotCurrOperationId', ThisLotId)
|
||||
ThisLotCurrOperationName = Xlate('LOT_OPERATION', ThisLotCurrOperationId, LOT_OPERATION_OPERATION_ID$, 'X')
|
||||
ThisLotCurrWaferQty = Database_Services('ReadDataColumn', 'LOT', ThisLotId, LOT_WAFER_QTY$, True$, 0, False$)
|
||||
ThisLotMostRecentEventId = ThisLotRec<LOT_MOST_RECENT_LOT_EVENT_ID$>
|
||||
ThisLotMostRecentEventDtm = XLATE('LOT_EVENT', ThisLotMostRecentEventId, LOT_EVENT_EVENT_DATETIME$, 'X')
|
||||
|
||||
//Lot Operation Status'
|
||||
LotOperationsInSequence = Lot_Services('GetLotOperationSequence', ThisLotId)
|
||||
@ -99,6 +98,7 @@ GetLot:
|
||||
Set_Property(@Window : '.EDL_CURR_WAFER_QTY', 'TEXT', ThisLotCurrWaferQty)
|
||||
Set_Property(@Window : '.EDT_LOT_OPERATIONS', 'ARRAY', LotOperationTableData)
|
||||
Set_Property(@Window : '.EDT_LOT_EVENTS', 'ARRAY', LotEventTableData)
|
||||
Set_Property(@Window : '.EDL_MOST_RECENT_EVENT_DTM', 'TEXT', OConv(ThisLotMostRecentEventDtm, 'DT'))
|
||||
end else
|
||||
//Error: Lot did not exist
|
||||
end
|
||||
@ -107,8 +107,7 @@ return
|
||||
ResetForm:
|
||||
Set_Property(@Window : '.EDL_CURR_OPERATION', 'TEXT', '')
|
||||
Set_Property(@Window : '.EDL_CURR_WAFER_QTY', 'TEXT', '')
|
||||
Set_Property(@Window : '.EDL_MOST_RECENT_EVENT_DTM', 'TEXT', '')
|
||||
Set_Property(@Window : '.EDT_LOT_OPERATIONS', 'ARRAY', '')
|
||||
Set_Property(@Window : '.EDT_LOT_EVENTS', 'ARRAY', '')
|
||||
return
|
||||
|
||||
|
||||
|
@ -1,26 +1,27 @@
|
||||
compile insert LOT_EQUATES
|
||||
/*----------------------------------------
|
||||
Author : Table Create Insert Routine
|
||||
Written : 26/03/2025
|
||||
Written : 01/04/2025
|
||||
Description : Insert for Table LOT
|
||||
----------------------------------------*/
|
||||
#ifndef __LOT_EQUATES__
|
||||
#define __LOT_EQUATES__
|
||||
|
||||
equ LOT_TYPE$ to 1
|
||||
equ LOT_PROD_ID$ to 2
|
||||
equ LOT_ORIG_WAFER_QTY$ to 3
|
||||
equ LOT_WAFER_QTY$ to 4
|
||||
equ LOT_VENDOR_PART_NO$ to 5
|
||||
equ LOT_VENDOR_LOT_NO$ to 6
|
||||
equ LOT_VENDOR_CODE$ to 7
|
||||
equ LOT_LOT_EVENTS$ to 8
|
||||
equ LOT_LOT_OPERATIONS$ to 9
|
||||
equ LOT_TEST_RUN_WAFER_IDS$ to 10
|
||||
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
|
||||
equ LOT_TYPE$ to 1
|
||||
equ LOT_PROD_ID$ to 2
|
||||
equ LOT_ORIG_WAFER_QTY$ to 3
|
||||
equ LOT_WAFER_QTY$ to 4
|
||||
equ LOT_VENDOR_PART_NO$ to 5
|
||||
equ LOT_VENDOR_LOT_NO$ to 6
|
||||
equ LOT_VENDOR_CODE$ to 7
|
||||
equ LOT_LOT_EVENTS$ to 8
|
||||
equ LOT_LOT_OPERATIONS$ to 9
|
||||
equ LOT_TEST_RUN_WAFER_IDS$ to 10
|
||||
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
|
||||
equ LOT_MOST_RECENT_LOT_EVENT_ID$ to 16
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user