Merged PR 21598: Refactored receive and release codebase.
Refactored receive and release codebase. bug fixes and performance improvements modified WO_REC form to use the same receive and same release dtm for all cassettes released in a given batch Related work items: #259878
This commit is contained in:
@ -43,7 +43,7 @@ Return Response or ""
|
||||
// SERVICES
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Service PostWriteFieldTransaction(Table, Key, FieldNo, FieldVal)
|
||||
Service PostWriteFieldTransaction(Table, Key, FieldNo, FieldVal, MvPos)
|
||||
|
||||
ErrorMsg = ''
|
||||
Begin Case
|
||||
@ -55,6 +55,8 @@ Service PostWriteFieldTransaction(Table, Key, FieldNo, FieldVal)
|
||||
ErrorMsg = 'Error in ':Service:' service. Null Table passed into service.'
|
||||
Case Not(Num(FieldNo))
|
||||
ErrorMsg = 'Error in ':Service:' service. FieldNo ':FieldNo:' is not a number.'
|
||||
Case ( (MvPos NE '') and Not(Num(MvPos)) )
|
||||
ErrorMsg = 'Error in ':Service:' service. MvPos ':MvPos:' is not a number.'
|
||||
Case Otherwise$
|
||||
TransKey = RTI_CreateGuid()
|
||||
TransRec = ''
|
||||
@ -64,6 +66,7 @@ Service PostWriteFieldTransaction(Table, Key, FieldNo, FieldVal)
|
||||
TransRec<TRANSACTION_QUEUE.KEY$> = Key
|
||||
TransRec<TRANSACTION_QUEUE.COLUMN$> = FieldNo
|
||||
TransRec<TRANSACTION_QUEUE.VALUE$> = FieldVal
|
||||
TransRec<TRANSACTION_QUEUE.MV_POS$> = Int(MvPos)
|
||||
Database_Services('WriteDataRow', 'TRANSACTION_QUEUE', TransKey, TransRec)
|
||||
If Error_Services('HasError') then ErrorMsg = Error_Services('GetMessage')
|
||||
End Case
|
||||
@ -148,7 +151,7 @@ Service ProcessTransactionQueue()
|
||||
LogTime = Oconv(Time(), 'MTS')
|
||||
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' Transaction Queue Log.csv'
|
||||
Headers = 'Logging DTM':@FM:'Result':@FM:'Action':@FM:'Table':@FM:'Key':@FM:'Base64Record'
|
||||
Headers := @FM:'Column':@FM:'Value'
|
||||
Headers := @FM:'Column':@FM:'Value':@FM:'MvPos'
|
||||
objQueueLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, COMMA$, Headers, '', False$, False$)
|
||||
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
|
||||
|
||||
@ -170,6 +173,7 @@ Service ProcessTransactionQueue()
|
||||
Action = TransRec<TRANSACTION_QUEUE.ACTION$>
|
||||
Table = TransRec<TRANSACTION_QUEUE.TABLE$>
|
||||
Key = TransRec<TRANSACTION_QUEUE.KEY$>
|
||||
MvPos = TransRec<TRANSACTION_QUEUE.MV_POS$>
|
||||
LogData<3> = Action
|
||||
LogData<4> = Table
|
||||
LogData<5> = Key
|
||||
@ -181,13 +185,29 @@ Service ProcessTransactionQueue()
|
||||
FieldVal = TransRec<TRANSACTION_QUEUE.VALUE$>
|
||||
LogData<7> = FieldNo
|
||||
LogData<8> = FieldVal
|
||||
LogData<9> = MvPos
|
||||
Open Table to hTable then
|
||||
WriteV FieldVal on hTable, Key, FieldNo then
|
||||
DeleteTrans = True$
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. Error calling WriteV. '
|
||||
ErrorMsg := 'File error: ':@File_Error
|
||||
end
|
||||
If MvPos NE '' then
|
||||
ReadV Col from hTable, Key, FieldNo then
|
||||
Col<0, MvPos> = FieldVal
|
||||
WriteV Col on hTable, Key, FieldNo then
|
||||
DeleteTrans = True$
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. Error calling WriteV. '
|
||||
ErrorMsg := 'File error: ':@File_Error
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. Error reading column ':Col:' from table ':Table:'. '
|
||||
ErrorMsg := 'File error: ':@File_Error
|
||||
end
|
||||
end else
|
||||
WriteV FieldVal on hTable, Key, FieldNo then
|
||||
DeleteTrans = True$
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. Error calling WriteV. '
|
||||
ErrorMsg := 'File error: ':@File_Error
|
||||
end
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. Error opening ':Table:'.'
|
||||
end
|
||||
|
Reference in New Issue
Block a user