Merged PR 27364: Modified the routine to add default RTF Operations to utilize SYSTEM in lieu...

Modified the routine to add default RTF Operations to utilize SYSTEM in lieu UserId. This is to avoid any issues with permissions for the ininitialization
This commit is contained in:
Ouellette Jonathan (CSC FI SPS MESLEO)
2025-09-30 17:33:12 +00:00
parent a2c467e9cb
commit 99d6abc3f2

View File

@ -93,7 +93,7 @@ Service CreateReturnToFabRecord(CassId, UserId)
end end
If NGLotId NE '' then If NGLotId NE '' then
//Assign default return to fab operations and move in. //Assign default return to fab operations and move in.
Return_To_Fab_Services('AddDefaultRTFOperations', NGLotId, UserId) Return_To_Fab_Services('AddDefaultRTFOperations', NGLotId)
If Error_Services('NoError') then If Error_Services('NoError') then
//Move in the lot //Move in the lot
Lot_Services('MoveInLot', NGLotId, UserId) Lot_Services('MoveInLot', NGLotId, UserId)
@ -165,48 +165,51 @@ Service CreateReturnToFabRecord(CassId, UserId)
End Service End Service
Service AddDefaultRTFOperations(LotId, UserId) Service AddDefaultRTFOperations(LotId)
ErrorMessage = '' ErrorMessage = ''
// Todo: add these to a configuration for return to fab. If LotId NE '' then
CurrentOperationsSeq = Lot_Services('GetLotOperationSequence', LotId) // Todo: add these to a configuration for return to fab.
if CurrentOperationsSeq EQ '' then CurrentOperationsSeq = Lot_Services('GetLotOperationSequence', LotId)
CurrSeq = 0 if CurrentOperationsSeq EQ '' then
CurrSeq = 0
end else
CurrSeq = DCount(CurrentOperationsSeq, @FM)
end
Lot_Operation_Services('AddOperationToLot', LotId, 'RTF_START', CurrSeq + 1, 'SYSTEM')
If Error_Services('NoError') then
Lot_Operation_Services('AddOperationToLot', LotId, 'RTF_ASSIGN_REASON', CurrSeq + 2, 'SYSTEM')
end else
ErrorMessage = Error_Services('GetMessage')
end
If Error_Services('NoError') then
Lot_Operation_Services('AddOperationToLot', LotId, 'RTF_ASSIGN_OPERATIONS', CurrSeq + 3, 'SYSTEM')
end else
ErrorMessage = Error_Services('GetMessage')
end
If Error_Services('NoError') then
Lot_Operation_Services('AddOperationToLot', LotId, 'RTF_INIT_BIN_TO_BIN', CurrSeq + 4, 'SYSTEM')
end else
ErrorMessage = Error_Services('GetMessage')
end
If Error_Services('NoError') then
Lot_Operation_Services('AddOperationToLot', LotId, 'RTF_DISPO', CurrSeq + 5, 'SYSTEM')
end else
ErrorMessage = Error_Services('GetMessage')
end
If Error_Services('NoError') then
Lot_Operation_Services('AddOperationToLot', LotId, 'RTF_FINAL_BIN_TO_BIN', CurrSeq + 6, 'SYSTEM')
end else
ErrorMessage = Error_Services('GetMessage')
end
If Error_Services('NoError') then
Lot_Operation_Services('AddOperationToLot', LotId, 'RTF_CLOSE', CurrSeq + 7, 'SYSTEM')
end else
ErrorMessage = Error_Services('GetMessage')
end
end else end else
CurrSeq = DCount(CurrentOperationsSeq, @FM) ErrorMessage = 'LotID Parameter was null.'
end end
Lot_Operation_Services('AddOperationToLot', LotId, 'RTF_START', CurrSeq + 1, UserId)
If Error_Services('NoError') then
Lot_Operation_Services('AddOperationToLot', LotId, 'RTF_ASSIGN_REASON', CurrSeq + 2, UserId)
end else
ErrorMessage = Error_Services('GetMessage')
end
If Error_Services('NoError') then
Lot_Operation_Services('AddOperationToLot', LotId, 'RTF_ASSIGN_OPERATIONS', CurrSeq + 3, UserId)
end else
ErrorMessage = Error_Services('GetMessage')
end
If Error_Services('NoError') then
Lot_Operation_Services('AddOperationToLot', LotId, 'RTF_INIT_BIN_TO_BIN', CurrSeq + 4, UserId)
end else
ErrorMessage = Error_Services('GetMessage')
end
If Error_Services('NoError') then
Lot_Operation_Services('AddOperationToLot', LotId, 'RTF_DISPO', CurrSeq + 5, UserId)
end else
ErrorMessage = Error_Services('GetMessage')
end
If Error_Services('NoError') then
Lot_Operation_Services('AddOperationToLot', LotId, 'RTF_FINAL_BIN_TO_BIN', CurrSeq + 6, UserId)
end else
ErrorMessage = Error_Services('GetMessage')
end
If Error_Services('NoError') then
Lot_Operation_Services('AddOperationToLot', LotId, 'RTF_CLOSE', CurrSeq + 7, UserId)
end else
ErrorMessage = Error_Services('GetMessage')
end
If ErrorMessage NE '' then If ErrorMessage NE '' then
Error_Services('Add', ErrorMessage) Error_Services('Add', ErrorMessage)
end end
@ -1268,7 +1271,7 @@ Service MigrateLegacyRTFRecord(RTFRecordId)
LotId = Lot_Services('CreateNewLot', CassType, '', '', '', '', '', 'SYSTEM', '', CassId) LotId = Lot_Services('CreateNewLot', CassType, '', '', '', '', '', 'SYSTEM', '', CassId)
end end
If LotId NE '' then If LotId NE '' then
Return_To_Fab_Services('AddDefaultRTFOperations', LotId, 'SYSTEM') Return_To_Fab_Services('AddDefaultRTFOperations', LotId)
If Error_Services('NoError') then If Error_Services('NoError') then
//Now get all the created lot Operation records //Now get all the created lot Operation records
LotOperationIds = Lot_Services('GetLotOperationSequence', LotId) LotOperationIds = Lot_Services('GetLotOperationSequence', LotId)
@ -1321,3 +1324,4 @@ Service MigrateLegacyRTFRecord(RTFRecordId)
end service end service