Merged PR 13912: Changed LOT_OPERATION key generation to be a unique GUID rather than LOTNAME-...

Changed LOT_OPERATION key generation to be a unique GUID rather than LOTNAME-OPERATIONID. This will allow us to have multiples of a specified operation. Useful for rework.

Related work items: #137429, #247316
This commit is contained in:
Ouellette Jonathan (CSC FI SPS MESLEO) 2025-03-27 23:23:15 +01:00
parent f8c96150f5
commit 19908620e2

View File

@ -406,8 +406,6 @@ Service GenerateInitialLotOperationRecords(LotId)
If ThisLotOperations NE '' then If ThisLotOperations NE '' then
for each ProdOperationKey in ThisLotOperations using @FM for each ProdOperationKey in ThisLotOperations using @FM
OperationRec = Database_Services('ReadDataRow', 'PRODUCT_OPERATION', ProdOperationKey) OperationRec = Database_Services('ReadDataRow', 'PRODUCT_OPERATION', ProdOperationKey)
//NewOperationRecID =
Next operation Next operation
end else end else
ErrorMessage = 'No Operations found for ' : ProdId ErrorMessage = 'No Operations found for ' : ProdId
@ -459,7 +457,7 @@ Service CreateInitialLotOperationRecords(LotId)
OperationID = ProdOperationRec<PRODUCT_OPERATION_OPERATION_ID$> OperationID = ProdOperationRec<PRODUCT_OPERATION_OPERATION_ID$>
OperationSequence = ProdOperationRec<PRODUCT_OPERATION_OPERATION_SEQUENCE$> OperationSequence = ProdOperationRec<PRODUCT_OPERATION_OPERATION_SEQUENCE$>
LotOperationRecID = LotId : '*' : OperationID LotOperationRecID = Rti_Createguid()
If Not(RowExists('LOT_OPERATION', LotOperationRecID)) then If Not(RowExists('LOT_OPERATION', LotOperationRecID)) then
LotOperationRec = '' LotOperationRec = ''
LotOperationRec<LOT_OPERATION_LOT_ID$> = LotId LotOperationRec<LOT_OPERATION_LOT_ID$> = LotId
@ -565,7 +563,6 @@ Service AddLotOperationIntoSequence(LotId, NewOperationId, NewSequence, Rework)
If LotId NE '' then If LotId NE '' then
If NewSequence NE '' AND Num(NewSequence) then If NewSequence NE '' AND Num(NewSequence) then
//Get Current Operations in sequence //Get Current Operations in sequence
//CurrSequence = Lot_Services('GetLotOperationSequence', LotId)
LotCurrOperation = Lot_Services('GetLotCurrOperationId', LotId) LotCurrOperation = Lot_Services('GetLotCurrOperationId', LotId)
CurrOperationSequence = Xlate('LOT_OPERATION', LotCurrOperation, LOT_OPERATION_OPERATION_SEQUENCE$, 'X') CurrOperationSequence = Xlate('LOT_OPERATION', LotCurrOperation, LOT_OPERATION_OPERATION_SEQUENCE$, 'X')
If CurrOperationSequence LE NewSequence then If CurrOperationSequence LE NewSequence then
@ -587,7 +584,7 @@ Service AddLotOperationIntoSequence(LotId, NewOperationId, NewSequence, Rework)
Until Done Until Done
Next Operation Next Operation
If ErrorMessage EQ '' then If ErrorMessage EQ '' then
LotOperationRecID = LotId : '*' : NewOperationId LotOperationRecID = RTI_CreateGUID()
If Not(RowExists('LOT_OPERATION', LotOperationRecID)) then If Not(RowExists('LOT_OPERATION', LotOperationRecID)) then
LotOperationRec = '' LotOperationRec = ''
LotOperationRec<LOT_OPERATION_LOT_ID$> = LotId LotOperationRec<LOT_OPERATION_LOT_ID$> = LotId
@ -1424,3 +1421,4 @@ end service