modfied some logging

This commit is contained in:
Infineon\StieberD 2025-04-01 16:50:52 -07:00
parent 07054d0075
commit 5b8ec59e68
3 changed files with 28 additions and 22 deletions

View File

@ -52,9 +52,10 @@ $Insert EVENT_SETUP
$Insert APP_INSERTS
$Insert MSG_EQUATES
$Insert POPUP_EQUATES
$Insert WO_LOG_EQUATES
Declare subroutine Errmsg, Btree.Extract, Set_Status, Logging_Services, Work_Order_Services
Declare function obj_WO_Log, Work_Order_Services, Environment_Services, Logging_Services
Declare function obj_WO_Log, Work_Order_Services, Environment_Services, Logging_Services, Database_Services
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WO_LOG'
LogDate = Oconv(Date(), 'D4/')
@ -258,9 +259,28 @@ PopulateControls:
Swap ',' with @VM in Ctrls
Swap ',' with @VM in Cols
WORec = Database_Services('ReadDataRow', 'WO_LOG', WONo)
WOQty = WORec<WO_LOG_QTY$>
// Pull these quantities using obj_WO_Log to ensure they are up-to-date.
// The physical fields are updated via the PROC_QUEUE and may lag by a few seconds.
RxQty = obj_WO_Log('RxQty', WONo:@RM:WORec)
RelQty = obj_WO_Log('RelQty', WONo:@RM:WORec)
UnRelQty = WOQty - RelQty
For each Ctrl in Ctrls using @VM setting vPos
Val = Xlate('WO_LOG', WONo, Cols<0, vPos>, 'X')
Begin Case
Case Ctrl EQ 'EDL_RX_QTY'
Val = RxQty
Case Ctrl EQ 'EDL_REL_QTY'
Val = RelQty
Case Ctrl EQ 'EDL_UNREL_QTY'
Val = UnRelQty
Case Otherwise$
Val = Xlate('WO_LOG', WONo, Cols<0, vPos>, 'X')
End Case
Set_Property(@Window:'.':Ctrl, 'DEFPROP', Val)
Running = Msg(@WINDOW, MsgUp, vPos, MSGINSTUPDATE$) ;* Update message

View File

@ -639,13 +639,7 @@ Service ReleaseCassettes(WONo)
LogData<1> = LoggingDTM
LogData<2> = @USER4
LogData<3> = ErrorMsg
Machine = Environment_Services('GetServer')
If Machine NE 'MESSA01EC' then
EmailAddr = 'dstieber@srpcs.com,6613649828@txt.att.net'
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM, False$, EmailAddr, ErrorMsg)
end else
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM, False$)
end
Logging_Services('AppendLog', objReleaseLog, LogData, @RM, @FM, False$)
end
If ErrorMsg EQ '' then
// Log work order, cassette number, status, and release DTM in the event that a release
@ -1462,3 +1456,4 @@ ClearCursors:
return

View File

@ -204,7 +204,7 @@ READONLY_RECORD:
return
WRITE_RECORD_PRE:
OrigQty = OrigRecord<WO_LOG_QTY$>
NewQty = Record<WO_LOG_QTY$>
OrigCassList = OrigRecord<WO_LOG_WO_MAT_KEY$>
@ -238,12 +238,7 @@ WRITE_RECORD:
LogData<2> = Name
LogData<3> = @User4
Message = @User4:' changed WO_HOLD flag for work order ':Name
If Machine _NEC 'MESSA01EC' then
Logging_Services('AppendLog', objHoldLog, LogData, @RM, @FM, '', 'dstieber@srpcs.com,6613649828@txt.att.net', Message)
end else
// EC Server can't send emails
Logging_Services('AppendLog', objHoldLog, LogData, @RM, @FM)
end
Logging_Services('AppendLog', objHoldLog, LogData, @RM, @FM)
end
If ( (OrigRecord<WO_LOG_LAST_CHAR_RUN$> NE '') and (Record<WO_LOG_LAST_CHAR_RUN$> EQ '') and (Machine _NEC 'MESSA01EC') ) then
@ -254,12 +249,7 @@ WRITE_RECORD:
LogData<3> = Stack
Convert @FM to CRLF$ in Stack
Message = 'Last char run erased on work order ':Name:'.':CRLF$:CRLF$:'Call Stack':CRLF$:Stack
If Machine _NEC 'MESSA01EC' then
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, '', 'dstieber@srpcs.com,Francois.Rivard@infineon.com', Message)
end else
// EC Server can't send emails
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, '', '', '')
end
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, '', '', '')
end
OrigQty = OrigRecord<WO_LOG_QTY$>
@ -546,3 +536,4 @@ ClearCursors:
Next counter
return