ready for deployment
This commit is contained in:
parent
6aad8036e5
commit
550f376a0b
@ -9,7 +9,7 @@
|
||||
"<2>": "-1",
|
||||
"<3>": "-1",
|
||||
"<4>": "-1",
|
||||
"<5>": "16777215",
|
||||
"<5>": "-2",
|
||||
"<6>": {
|
||||
"<6,1>": {
|
||||
"<6,1,1>": "Tahoma",
|
||||
@ -31,7 +31,7 @@
|
||||
}
|
||||
},
|
||||
"<7>": "REACT_ITEM",
|
||||
"<8>": "BY @ID",
|
||||
"<8>": "BY-DSND ENTER_DTM",
|
||||
"<9>": {
|
||||
"<9,1>": {
|
||||
"<9,1,1>": "RI_NO",
|
||||
@ -120,6 +120,22 @@
|
||||
"<9,11,4>": "C",
|
||||
"<9,11,5>": "D4/",
|
||||
"<9,11,6>": "Retire Dt"
|
||||
},
|
||||
"<9,12>": {
|
||||
"<9,12,1>": "ENTER_DTM",
|
||||
"<9,12,2>": "14",
|
||||
"<9,12,3>": "L",
|
||||
"<9,12,4>": "C",
|
||||
"<9,12,5>": "DT2/^H",
|
||||
"<9,12,6>": "Enter Dtm"
|
||||
},
|
||||
"<9,13>": {
|
||||
"<9,13,1>": "CURR_STATUS",
|
||||
"<9,13,2>": "5",
|
||||
"<9,13,3>": "L",
|
||||
"<9,13,4>": "C",
|
||||
"<9,13,5>": "[CONV_ITEM_CURR_STATUS]",
|
||||
"<9,13,6>": "Curr Status"
|
||||
}
|
||||
},
|
||||
"<10>": "T",
|
||||
@ -147,7 +163,17 @@
|
||||
"<32>": "0",
|
||||
"<33>": "1",
|
||||
"<34>": "16777215",
|
||||
"<35>": "16777215"
|
||||
"<35>": "16766894",
|
||||
"<36>": "",
|
||||
"<37>": "",
|
||||
"<38>": "",
|
||||
"<39>": "",
|
||||
"<40>": "-2",
|
||||
"<41>": "1000",
|
||||
"<42>": "",
|
||||
"<43>": "",
|
||||
"<44>": "",
|
||||
"<45>": ""
|
||||
}
|
||||
}
|
||||
}
|
@ -9,7 +9,7 @@
|
||||
"<2>": "-1",
|
||||
"<3>": "-1",
|
||||
"<4>": "-1",
|
||||
"<5>": "16777215",
|
||||
"<5>": "-2",
|
||||
"<6>": {
|
||||
"<6,1>": {
|
||||
"<6,1,1>": "MS Sans Serif",
|
||||
@ -91,7 +91,17 @@
|
||||
"<32>": "0",
|
||||
"<33>": "1",
|
||||
"<34>": "16777215",
|
||||
"<35>": "16777215"
|
||||
"<35>": "16777215",
|
||||
"<36>": "",
|
||||
"<37>": "",
|
||||
"<38>": "",
|
||||
"<39>": "",
|
||||
"<40>": "-2",
|
||||
"<41>": "1000",
|
||||
"<42>": "",
|
||||
"<43>": "",
|
||||
"<44>": "",
|
||||
"<45>": ""
|
||||
}
|
||||
}
|
||||
}
|
@ -20,7 +20,7 @@ Declare Function Get_Property, Get_Status, Dialog_Box, Utility, Popup, Collect.I
|
||||
Declare Function Send_Message, Msg, Security_Check, obj_React_Item, Select_Into, MemberOf, Create_Dialog, obj_Calendar
|
||||
Declare Function GetAsyncKeyState, obj_Tables, MemberOf, Environment_Services, Database_Services, Rds_Services
|
||||
Declare Function Reactor_Services, Error_Services, React_Servs_Services, Reactor_Log_Services, Send_Event, SRP_List
|
||||
Declare Function Nica_Orders_Services
|
||||
Declare Function Nica_Orders_Services, SRP_Date, React_Item_Services, SRP_Datetime, Datetime
|
||||
|
||||
$Insert MSG_EQUATES
|
||||
$Insert APPCOLORS
|
||||
@ -1229,64 +1229,51 @@ SvcsOptions:
|
||||
If ItemType NE '' then
|
||||
|
||||
RetVal = ''
|
||||
ItemType = ICONV(ItemType,'[CONV_CODE_DESC,REACT_ITEM_TYPE]')
|
||||
|
||||
ItemType = ICONV(ItemType,'[CONV_CODE_DESC,REACT_ITEM_TYPE]')
|
||||
RIKeys = React_Item_Services('GetReactItems', ItemType, 'N,U')
|
||||
|
||||
OPEN 'DICT.REACT_ITEM' to DictReactItem else
|
||||
ErrMsg('Unable to open DICT.REACT_ITEM')
|
||||
return
|
||||
end
|
||||
|
||||
SearchString = 'RI_TYPE':@VM:ItemType:@FM
|
||||
SearchString := 'CURR_STATUS':@VM:'N':@VM:'U':@FM
|
||||
|
||||
RIKeys = ''
|
||||
Option = ''
|
||||
Flag = ''
|
||||
|
||||
Btree.Extract(SearchString,'REACT_ITEM',DictReactItem,RIKeys,Option,Flag)
|
||||
If Get_Status(errCode) then
|
||||
ErrMsg(errCode)
|
||||
return
|
||||
end
|
||||
|
||||
TypeOver = ''
|
||||
TypeOVer<PMODE$> = 'K'
|
||||
TypeOver<PDISPLAY$> = RIKeys
|
||||
RetVal = Popup(@Window,TypeOver,'REACT_ITEM')
|
||||
|
||||
If RetVal NE '' then
|
||||
obj_AppWindow('LUValReturn',RetVal:@RM:@Window:'.SERV_INFO':@RM:SelPos)
|
||||
|
||||
RIRec = XLATE('REACT_ITEM',RetVal,'','X')
|
||||
|
||||
If RIRec<REACT_ITEM_RI_TYPE$> = 'T' then
|
||||
CardWindow = 'REACT_ITEM'
|
||||
CardKey = RetVal
|
||||
DefaultRec = ''
|
||||
NewCardCtrl = ''
|
||||
RecalcCtrl = @Window:'.SERV_INFO'
|
||||
RecalcPos = SelPos
|
||||
RetCtrl = @Window:'.SERV_INFO'
|
||||
RetPos = SelPos
|
||||
|
||||
oAParms = CardWindow:@RM:CardKey:@RM:DefaultRec:@RM:NewCardCtrl:@RM:RecalcCtrl:@RM:RecalcPos:@RM:RetCtrl:@RM:RetPos
|
||||
|
||||
obj_AppWindow('ViewNewCard',oAParms)
|
||||
|
||||
Set_Property('REACT_ITEM.TUBE_GRADE','FOCUS',1)
|
||||
|
||||
If Get_Status(errCode) then
|
||||
ErrMsg(errCode)
|
||||
end
|
||||
end
|
||||
|
||||
GoSub Refresh
|
||||
If Error_Services('NoError') then
|
||||
|
||||
TypeOver = ''
|
||||
TypeOVer<PMODE$> = 'K'
|
||||
TypeOver<PDISPLAY$> = RIKeys
|
||||
RetVal = Popup(@Window,TypeOver,'REACT_ITEM')
|
||||
|
||||
If RetVal NE '' then
|
||||
obj_AppWindow('LUValReturn',RetVal:@RM:@Window:'.SERV_INFO':@RM:SelPos)
|
||||
|
||||
RIRec = XLATE('REACT_ITEM',RetVal,'','X')
|
||||
|
||||
If RIRec<REACT_ITEM_RI_TYPE$> = 'T' then
|
||||
CardWindow = 'REACT_ITEM'
|
||||
CardKey = RetVal
|
||||
DefaultRec = ''
|
||||
NewCardCtrl = ''
|
||||
RecalcCtrl = @Window:'.SERV_INFO'
|
||||
RecalcPos = SelPos
|
||||
RetCtrl = @Window:'.SERV_INFO'
|
||||
RetPos = SelPos
|
||||
|
||||
oAParms = CardWindow:@RM:CardKey:@RM:DefaultRec:@RM:NewCardCtrl:@RM:RecalcCtrl:@RM:RecalcPos:@RM:RetCtrl:@RM:RetPos
|
||||
|
||||
obj_AppWindow('ViewNewCard',oAParms)
|
||||
|
||||
Set_Property('REACT_ITEM.TUBE_GRADE','FOCUS',1)
|
||||
|
||||
If Get_Status(errCode) then
|
||||
ErrMsg(errCode)
|
||||
end
|
||||
end
|
||||
|
||||
GoSub Refresh
|
||||
end
|
||||
end else
|
||||
Error_Services('DisplayError')
|
||||
end
|
||||
|
||||
end ;* End of check for null SNReq
|
||||
|
||||
|
||||
End Case
|
||||
|
||||
GoSub Refresh
|
||||
@ -1877,4 +1864,3 @@ ColorRemRiTable:
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
@ -440,7 +440,7 @@ END
|
||||
IF CurrStatus NE '' THEN
|
||||
SWAP @VM WITH '" "' IN CurrStatus
|
||||
IF SelectSent NE '' THEN SelectSent := ' AND'
|
||||
SelectSent := ' WITH CURR_STATUS ':QUOTE(CurrStatus)
|
||||
SelectSent := ' WITH CURR_STATUS_STATIC ':QUOTE(CurrStatus)
|
||||
END
|
||||
|
||||
IF PartTypes NE '' THEN
|
||||
@ -471,7 +471,7 @@ SelectSent = 'SELECT REACT_ITEM ':SelectSent
|
||||
|
||||
|
||||
Def = ""
|
||||
Def<MTEXT$> = "Selecting Reactor Events..."
|
||||
Def<MTEXT$> = "Selecting Reactor Items..."
|
||||
Def<MTYPE$> = "U"
|
||||
|
||||
* display the processing message and do the processing
|
||||
@ -502,6 +502,3 @@ End_Dialog(@WINDOW,RINos)
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -18,7 +18,7 @@ COMPILE FUNCTION obj_Reactor_Log(Method,Parms)
|
||||
*/
|
||||
|
||||
DECLARE SUBROUTINE Set_Status, Msg, obj_Tables, Send_Dyn, ErrMsg, Btree.Extract, obj_React_Item_Hist, Update_Index, obj_Post_Log
|
||||
Declare subroutine Error_Services, Database_Services
|
||||
Declare subroutine Error_Services, Database_Services, React_Item_Services
|
||||
DECLARE FUNCTION Get_Status, Msg, Utility, obj_Tables, obj_React_Item, obj_Calendar, Database_Services
|
||||
|
||||
|
||||
@ -195,18 +195,16 @@ PostReactItems:
|
||||
ReactorLogRec<REACTOR_LOG_RI_POST_DTM$> = PostDTM
|
||||
|
||||
otParms = FIELDSTORE(otParms,@RM,4,0,ReactorLogRec)
|
||||
//obj_Tables('WriteRec',otParms)
|
||||
|
||||
Database_Services('WriteDataRow', 'REACTOR_LOG', RLNo, ReactorLogRec, 1, 0, 1)
|
||||
|
||||
|
||||
Update_Index('REACT_ITEM_HIST', 'INST_RL_ID', False$, True$) ;* Don't wait for indexer - flush pending indexes now
|
||||
Update_Index('REACT_ITEM_HIST', 'REM_RL_ID', False$, True$)
|
||||
|
||||
end else
|
||||
Error_Services('Add', ValidationFailureReason)
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
@ -386,10 +384,3 @@ RemHistKeys:
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -18,11 +18,12 @@ COMPILE FUNCTION obj_React_Item_Hist(Method,Parms)
|
||||
*/
|
||||
|
||||
|
||||
DECLARE FUNCTION Get_Status, Msg, Utility, obj_Tables, Send_Dyn, obj_Popup
|
||||
DECLARE SUBROUTINE Set_Status, Msg, obj_Tables, Send_Dyn
|
||||
DECLARE SUBROUTINE ErrMsg, Btree.Extract
|
||||
DECLARE FUNCTION Get_Status, Msg, Utility, obj_Tables, Send_Dyn, obj_Popup
|
||||
DECLARE SUBROUTINE Set_Status, Msg, obj_Tables, Send_Dyn, ErrMsg, Btree.Extract, React_Item_Services
|
||||
|
||||
$Insert LOGICAL
|
||||
$INSERT REACT_ITEM_HIST_EQUATES
|
||||
$INSERT RLIST_EQUATES
|
||||
|
||||
EQU CRLF$ TO \0D0A\
|
||||
EQU TAB$ TO CHAR(9)
|
||||
@ -62,26 +63,26 @@ RETURN Result
|
||||
Install:
|
||||
* * * * * * *
|
||||
|
||||
RIHKey = Parms[1,@RM]
|
||||
RL_Id = Parms[COL2()+1,@RM]
|
||||
ReactWfrCnt = Parms[COL2()+1,@RM]
|
||||
ReactHrs = Parms[COL2()+1,@RM]
|
||||
RIHKey = Parms[1,@RM]
|
||||
RL_Id = Parms[COL2()+1,@RM]
|
||||
ReactWfrCnt = Parms[COL2()+1,@RM]
|
||||
ReactHrs = Parms[COL2()+1,@RM]
|
||||
|
||||
IF RIHKey = '' THEN ErrorMsg = 'Null Parameter "RIHKey" passed to routine. (':Method:')'
|
||||
IF RL_Id = '' THEN ErrorMsg = 'Null Parameter "RL_Id" passed to routine. (':Method:')'
|
||||
*IF ReactWfrCnt = '' THEN ErrorMsg = 'Null Parameter "ReactWfrCnt" passed to routine. (':Method:')' ;* Optional
|
||||
*IF ReactHrs = '' THEN ErrorMsg = 'Null Parameter "ReactHrs" passed to routine. (':Method:')' ;* Optional
|
||||
IF RIHKey = '' THEN ErrorMsg = 'Null Parameter "RIHKey" passed to routine. (':Method:')'
|
||||
IF RL_Id = '' THEN ErrorMsg = 'Null Parameter "RL_Id" passed to routine. (':Method:')'
|
||||
|
||||
IF ErrorMsg NE '' THEN RETURN
|
||||
IF ErrorMsg NE '' THEN RETURN
|
||||
|
||||
RIHRec = ''
|
||||
RIHRec<REACT_ITEM_HIST_INST_RL_ID$> = RL_ID
|
||||
RIHRec<REACT_ITEM_HIST_INST_REACT_WFR_CNT$> = ReactWfrCnt
|
||||
RIHRec<REACT_ITEM_HIST_INST_REACT_HRS$> = ReactHrs
|
||||
RIHRec = ''
|
||||
RIHRec<REACT_ITEM_HIST_INST_RL_ID$> = RL_ID
|
||||
RIHRec<REACT_ITEM_HIST_INST_REACT_WFR_CNT$> = ReactWfrCnt
|
||||
RIHRec<REACT_ITEM_HIST_INST_REACT_HRS$> = ReactHrs
|
||||
|
||||
otParms = 'REACT_ITEM_HIST':@RM:RIHKey:@RM:@RM:RIHRec
|
||||
otParms = 'REACT_ITEM_HIST':@RM:RIHKey:@RM:@RM:RIHRec
|
||||
|
||||
obj_Tables('WriteRec',otParms)
|
||||
obj_Tables('WriteRec',otParms)
|
||||
RINo = Field(RIHKey, '*', 2, 1)
|
||||
React_Item_Services('UpdateReactItemStatus', RINo)
|
||||
|
||||
RETURN
|
||||
|
||||
@ -90,38 +91,36 @@ RETURN
|
||||
Remove:
|
||||
* * * * * * *
|
||||
|
||||
RIHKey = Parms[1,@RM]
|
||||
RemoveDTM = Parms[COL2()+1,@RM] ;* Internal format *
|
||||
RL_Id = Parms[COL2()+1,@RM]
|
||||
ReactWfrCnt = Parms[COL2()+1,@RM]
|
||||
ReactHrs = Parms[COL2()+1,@RM]
|
||||
RIHKey = Parms[1,@RM]
|
||||
RemoveDTM = Parms[COL2()+1,@RM] ;* Internal format *
|
||||
RL_Id = Parms[COL2()+1,@RM]
|
||||
ReactWfrCnt = Parms[COL2()+1,@RM]
|
||||
ReactHrs = Parms[COL2()+1,@RM]
|
||||
|
||||
IF RIHKey = '' THEN ErrorMsg = 'Null Parameter "RIHKey" passed to routine. (':Method:')'
|
||||
IF RemoveDTM = '' THEN ErrorMsg = 'Null Parameter "RemoveDTM" passed to routine. (':Method:')'
|
||||
IF RL_Id = '' THEN ErrorMsg = 'Null Parameter "RL_Id" passed to routine. (':Method:')'
|
||||
*IF ReactWfrCnt = '' THEN ErrorMsg = 'Null Parameter "ReactWfrCnt" passed to routine. (':Method:')' ;* Optional
|
||||
*IF ReactHrs = '' THEN ErrorMsg = 'Null Parameter "ReactHrs" passed to routine. (':Method:')' ;* Optional
|
||||
IF RIHKey = '' THEN ErrorMsg = 'Null Parameter "RIHKey" passed to routine. (':Method:')'
|
||||
IF RemoveDTM = '' THEN ErrorMsg = 'Null Parameter "RemoveDTM" passed to routine. (':Method:')'
|
||||
IF RL_Id = '' THEN ErrorMsg = 'Null Parameter "RL_Id" passed to routine. (':Method:')'
|
||||
|
||||
IF ErrorMsg NE '' THEN RETURN
|
||||
IF ErrorMsg NE '' THEN RETURN
|
||||
|
||||
* Read and update record *
|
||||
otParms = 'REACT_ITEM_HIST':@RM:RIHKey
|
||||
|
||||
otParms = 'REACT_ITEM_HIST':@RM:RIHKey
|
||||
RIHRec = obj_Tables('ReadRec',otParms)
|
||||
|
||||
RIHRec = obj_Tables('ReadRec',otParms)
|
||||
IF Get_Status(errCode) THEN
|
||||
Set_Status(0)
|
||||
RIHRec = ''
|
||||
END
|
||||
|
||||
IF Get_Status(errCode) THEN
|
||||
Set_Status(0)
|
||||
RIHRec = ''
|
||||
END
|
||||
RIHRec<REACT_ITEM_HIST_REM_DTM$> = RemoveDTM
|
||||
RIHRec<REACT_ITEM_HIST_REM_RL_ID$> = RL_Id
|
||||
RIHRec<REACT_ITEM_HIST_REM_REACT_WFR_CNT$> = ReactWfrCnt
|
||||
RIHRec<REACT_ITEM_HIST_REM_REACT_HRS$> = ReactHrs
|
||||
|
||||
RIHRec<REACT_ITEM_HIST_REM_DTM$> = RemoveDTM
|
||||
RIHRec<REACT_ITEM_HIST_REM_RL_ID$> = RL_Id
|
||||
RIHRec<REACT_ITEM_HIST_REM_REACT_WFR_CNT$> = ReactWfrCnt
|
||||
RIHRec<REACT_ITEM_HIST_REM_REACT_HRS$> = ReactHrs
|
||||
|
||||
otParms = FIELDSTORE(otParms,@RM,4,0,RIHRec)
|
||||
obj_Tables('WriteRec',otParms)
|
||||
otParms = FIELDSTORE(otParms,@RM,4,0,RIHRec)
|
||||
obj_Tables('WriteRec',otParms)
|
||||
RINo = Field(RIHKey, '*', 2, 1)
|
||||
React_Item_Services('UpdateReactItemStatus', RINo)
|
||||
|
||||
RETURN
|
||||
|
||||
@ -130,24 +129,21 @@ RETURN
|
||||
ClearRemove:
|
||||
* * * * * * *
|
||||
|
||||
RIHKey = Parms[1,@RM]
|
||||
RIHKey = Parms[1,@RM]
|
||||
|
||||
IF RIHKey = '' THEN RETURN
|
||||
IF RIHKey = '' THEN RETURN
|
||||
|
||||
otParms = 'REACT_ITEM_HIST':@RM:RIHKey
|
||||
|
||||
* Read and update record *
|
||||
RIHRec = obj_Tables('ReadRec',otParms)
|
||||
|
||||
otParms = 'REACT_ITEM_HIST':@RM:RIHKey
|
||||
RIHRec<REACT_ITEM_HIST_REM_DTM$> = ''
|
||||
RIHRec<REACT_ITEM_HIST_REM_RL_ID$> = ''
|
||||
RIHRec<REACT_ITEM_HIST_REM_REACT_WFR_CNT$> = ''
|
||||
RIHRec<REACT_ITEM_HIST_REM_REACT_HRS$> = ''
|
||||
|
||||
RIHRec = obj_Tables('ReadRec',otParms)
|
||||
|
||||
RIHRec<REACT_ITEM_HIST_REM_DTM$> = ''
|
||||
RIHRec<REACT_ITEM_HIST_REM_RL_ID$> = ''
|
||||
RIHRec<REACT_ITEM_HIST_REM_REACT_WFR_CNT$> = ''
|
||||
RIHRec<REACT_ITEM_HIST_REM_REACT_HRS$> = ''
|
||||
|
||||
otParms = FIELDSTORE(otParms,@RM,4,0,RIHRec)
|
||||
obj_Tables('WriteRec',otParms)
|
||||
otParms = FIELDSTORE(otParms,@RM,4,0,RIHRec)
|
||||
obj_Tables('WriteRec',otParms)
|
||||
|
||||
RETURN
|
||||
|
||||
@ -156,49 +152,50 @@ RETURN
|
||||
GetHistory:
|
||||
* * * * * * *
|
||||
|
||||
ReactNo = Parms[1,@RM]
|
||||
RINo = Parms[COL2()+1,@RM]
|
||||
RIType = Parms[COL2()+1,@RM]
|
||||
ReactNo = Parms[1,@RM]
|
||||
RINo = Parms[COL2()+1,@RM]
|
||||
RIType = Parms[COL2()+1,@RM]
|
||||
|
||||
IF ReactNo = '' AND RINo = '' AND RIType = '' THEN RETURN
|
||||
IF ReactNo = '' AND RINo = '' AND RIType = '' THEN RETURN
|
||||
|
||||
OPEN 'DICT.REACT_ITEM_HIST' TO DictVar ELSE
|
||||
ErrorMsg = 'Unable to open DICT.REACT_ITEM_HIST for index lookup'
|
||||
RETURN
|
||||
END
|
||||
OPEN 'DICT.REACT_ITEM_HIST' TO DictVar ELSE
|
||||
ErrorMsg = 'Unable to open DICT.REACT_ITEM_HIST for index lookup'
|
||||
RETURN
|
||||
END
|
||||
|
||||
Search = ''
|
||||
Search = ''
|
||||
|
||||
IF ReactNo NE '' THEN Search := 'REACT_NO':@VM:ReactNo:@FM
|
||||
IF RINo NE '' THEN Search := 'RI_NO':@VM:RINo:@FM
|
||||
IF RIType NE '' THEN Search := 'RI_TYPE':@VM:RIType:@FM
|
||||
IF ReactNo NE '' THEN Search := 'REACT_NO':@VM:ReactNo:@FM
|
||||
IF RINo NE '' THEN Search := 'RI_NO':@VM:RINo:@FM
|
||||
IF RIType NE '' THEN Search := 'RI_TYPE':@VM:RIType:@FM
|
||||
|
||||
Option = ''
|
||||
Flag = ''
|
||||
Option = ''
|
||||
Flag = ''
|
||||
|
||||
Btree.Extract(Search, 'REACT_ITEM_HIST', DictVar, RIKeys, Option, Flag) ;* Get unsorted keys based on Search parameters
|
||||
Btree.Extract(Search, 'REACT_ITEM_HIST', DictVar, RIKeys, Option, Flag) ;* Get unsorted keys based on Search parameters
|
||||
|
||||
* Put sort data in first column (Install DTM)
|
||||
// Put sort data in first column (Install DTM)
|
||||
|
||||
WorkList = ''
|
||||
riCnt = COUNT(RIKeys,@VM) + (RIKeys NE '')
|
||||
FOR I = 1 TO riCnt
|
||||
RIKey = RIKeys<1,I>
|
||||
WorkList<I> = FIELD(RIKey,'*',3):@VM:RIKey
|
||||
NEXT I
|
||||
WorkList = ''
|
||||
riCnt = COUNT(RIKeys,@VM) + (RIKeys NE '')
|
||||
FOR I = 1 TO riCnt
|
||||
RIKey = RIKeys<1,I>
|
||||
WorkList<I> = FIELD(RIKey,'*',3):@VM:RIKey
|
||||
NEXT I
|
||||
|
||||
WorkList := @RM
|
||||
WorkList := @RM
|
||||
|
||||
CONVERT @FM:@VM TO @RM:@FM IN WorkList ;* push delimiters higher for V119
|
||||
CONVERT @FM:@VM TO @RM:@FM IN WorkList ;* push delimiters higher for V119
|
||||
|
||||
CALL V119('S','','D','L',WorkList,'') ;* Descending Left justified sort
|
||||
CALL V119('S','','D','L',WorkList,'') ;* Descending Left justified sort
|
||||
|
||||
CONVERT @FM:@RM TO @VM:@FM IN WorkList ;* pull delimiters lower
|
||||
CONVERT @FM:@RM TO @VM:@FM IN WorkList ;* pull delimiters lower
|
||||
|
||||
WorkList[-1,1] = '' ;* Trim trailing delimiter
|
||||
WorkList[-1,1] = '' ;* Trim trailing delimiter
|
||||
|
||||
FOR I = 1 TO riCnt
|
||||
Result<1,I> = WorkList<I,2> ;* Strip Sort column(s)
|
||||
NEXT I
|
||||
FOR I = 1 TO riCnt
|
||||
Result<1,I> = WorkList<I,2> ;* Strip Sort column(s)
|
||||
NEXT I
|
||||
|
||||
RETURN
|
||||
|
||||
|
@ -62,24 +62,80 @@ API reactItems.HEAD
|
||||
API reactItems.GET
|
||||
|
||||
QueryFields = HTTP_Services('GetHTTPGetString')
|
||||
If Index(QueryFields, 'riType', 1) then
|
||||
RIType = HTTP_Services('GetQueryField', 'riType')
|
||||
If IndexC(QueryFields, 'includeNullRetireDt', 1) then
|
||||
IncludeNullRetireDt = HTTP_Services('GetQueryField', 'includeNullRetireDt')
|
||||
Begin Case
|
||||
Case ( (IncludeNullRetireDt EQ 1) or (IncludeNullRetireDt EQ 0) )
|
||||
Null
|
||||
Case ( (IncludeNullRetireDt _EQC 'true') or (IncludeNullRetireDt _EQC 'yes') )
|
||||
IncludeNullRetireDt = True$
|
||||
Case ( (IncludeNullRetireDt _EQC 'false') or (IncludeNullRetireDt _EQC 'no') )
|
||||
IncludeNullRetireDt = False$
|
||||
Case Otherwise$
|
||||
Error_Services('Add', 'Error in ':CurrentAPI:' API. Invalid value "':IncludeNullRetireDt:'" passed in for includeNullRetireDt.')
|
||||
End Case
|
||||
end else
|
||||
RIType = ''
|
||||
IncludeNullRetireDt = ''
|
||||
end
|
||||
|
||||
If Error_Services('NoError') then
|
||||
If IndexC(QueryFields, 'showAllDetails', 1) then
|
||||
ShowAllDetails = HTTP_Services('GetQueryField', 'showAllDetails')
|
||||
Begin Case
|
||||
Case ( (ShowAllDetails EQ 1) or (ShowAllDetails EQ 0) )
|
||||
Null
|
||||
Case ( (ShowAllDetails _EQC 'true') or (ShowAllDetails _EQC 'yes') )
|
||||
ShowAllDetails = True$
|
||||
Case ( (ShowAllDetails _EQC 'false') or (ShowAllDetails _EQC 'no') )
|
||||
ShowAllDetails = False$
|
||||
Case Otherwise$
|
||||
Error_Services('Add', 'Error in ':CurrentAPI:' API. Invalid value "':ShowAllDetails:'" passed in for showAllDetails.')
|
||||
End Case
|
||||
end else
|
||||
ShowAllDetails = False$
|
||||
end
|
||||
|
||||
If Error_Services('NoError') then
|
||||
If IndexC(QueryFields, 'currStatus', 1) then
|
||||
CurrStatus = HTTP_Services('GetQueryField', 'currStatus')
|
||||
end else
|
||||
CurrStatus = ''
|
||||
end
|
||||
If IndexC(QueryFields, 'riType', 1) then
|
||||
RIType = HTTP_Services('GetQueryField', 'riType')
|
||||
end else
|
||||
RIType = ''
|
||||
end
|
||||
If IndexC(QueryFields, 'entryDtStart', 1) then
|
||||
EntryDtStart = HTTP_Services('GetQueryField', 'entryDtStart')
|
||||
end else
|
||||
EntryDtStart = ''
|
||||
end
|
||||
If IndexC(QueryFields, 'entryDtEnd', 1) then
|
||||
EntryDtEnd = HTTP_Services('GetQueryField', 'entryDtEnd')
|
||||
end else
|
||||
EntryDtEnd = ''
|
||||
end
|
||||
If IndexC(QueryFields, 'retireDtStart', 1) then
|
||||
RetireDtStart = HTTP_Services('GetQueryField', 'retireDtStart')
|
||||
end else
|
||||
RetireDtStart = ''
|
||||
end
|
||||
If IndexC(QueryFields, 'retireDtEnd', 1) then
|
||||
RetireDtEnd = HTTP_Services('GetQueryField', 'retireDtEnd')
|
||||
end else
|
||||
RetireDtEnd = ''
|
||||
end
|
||||
|
||||
StatusCode = 200
|
||||
GoSub CreateHALCollection
|
||||
end else
|
||||
HTTP_Services('SetResponseStatus', 400, Error_Services("GetMessage"))
|
||||
end
|
||||
end else
|
||||
HTTP_Services('SetResponseStatus', 400, Error_Services("GetMessage"))
|
||||
end
|
||||
If Index(QueryFields, 'currStatus', 1 ) then
|
||||
CurrStatus = Http_Services('GetQueryField', 'currStatus')
|
||||
end else
|
||||
CurrStatus = ''
|
||||
end
|
||||
If Index(QueryFields, 'showAllDetails', 1 ) then
|
||||
ShowAllDetails = Http_Services('GetQueryField', 'showAllDetails')
|
||||
end else
|
||||
ShowAllDetails = False$
|
||||
end
|
||||
StatusCode = 200
|
||||
|
||||
GoSub CreateHALCollection
|
||||
|
||||
end api
|
||||
|
||||
|
||||
@ -254,11 +310,7 @@ CreateHALCollection:
|
||||
|
||||
JSONCollection = ''
|
||||
Abort = False$
|
||||
If RIType NE '' OR CurrStatus NE '' then
|
||||
ReactItems = React_Item_Services('GetReactItems', RIType, CurrStatus)
|
||||
end else
|
||||
ReactItems = React_Item_Services('GetAllReactItemKeys')
|
||||
end
|
||||
ReactItems = React_Item_Services('GetReactItems', RIType, CurrStatus, EntryDtStart, EntryDtEnd, RetireDtStart, RetireDtEnd, IncludeNullRetireDt)
|
||||
|
||||
If ReactItems NE '' then
|
||||
If SRP_JSON(hJSONCollection, 'New', 'Object') then
|
||||
@ -304,3 +356,4 @@ CreateHALCollection:
|
||||
end
|
||||
|
||||
return
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,254 +1,235 @@
|
||||
Function REACT_ITEM_Actions(Action, CalcColName, FSList, Handle, Name, FMC, Record, Status, OrigRecord, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from Infineon.
|
||||
|
||||
Name : RDS_Actions
|
||||
|
||||
Description : Handles calculated columns and MFS calls for the current table.
|
||||
|
||||
Notes : This function uses @ID, @RECORD, and @DICT to make sure {ColumnName} references work correctly.
|
||||
If called from outside of a calculated column these will need to be set and restored.
|
||||
|
||||
Parameters :
|
||||
Action [in] -- Name of the action to be taken
|
||||
CalcColName [in] -- Name of the calculated column that needs to be processed. Normally this should only be
|
||||
populated when the CalcField action is being used.
|
||||
FSList [in] -- The list of MFSs and the BFS name for the current file or volume. This is an @SVM
|
||||
delimited array, with the current MFS name as the first value in the array, and the BFS
|
||||
name as the last value. Normally set by a calling MFS.
|
||||
Handle [in] -- The file handle of the file or media map being accessed. Note, this does contain the
|
||||
entire handle structure that the Basic+ Open statement would provide. Normally set by a
|
||||
calling MFS.
|
||||
Name [in] -- The name (key) of the record or file being accessed. Normally set by a calling MFS.
|
||||
FMC [in] -- Various functions. Normally set by a calling MFS.
|
||||
Record [in] -- The entire record (for record-oriented functions) or a newly-created handle (for
|
||||
"get handle" functions). Normally set by a calling MFS.
|
||||
Status [in/out] -- Indicator of the success or failure of an action. Normally set by the calling MFS but
|
||||
for some actions can be set by the action handler to indicate failure.
|
||||
OrigRecord [in] -- Original content of the record being processed by the current action. This is
|
||||
automatically being assigned by the WRITE_RECORD and DELETE_RECORD actions within
|
||||
BASE_MFS.
|
||||
Param1-10 [in/out] -- Additional request parameter holders
|
||||
ActionFlow [out] -- Used to control the action chain (see the ACTION_SETUP insert for more information.)
|
||||
Can also be used to return a special value, such as the results of the CalcField
|
||||
method.
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
04/10/18 dmb Original programmer.
|
||||
10/04/18 djs Added a trigger within the WRITE_RECORD event, which fires when the reactor number has
|
||||
changed. When this occurs the related RDS_LAYER records for this RDS record are populated
|
||||
with the most recent associated TOOL_PARMS record. (related by PSN and Reactor)
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
$Insert FILE.SYSTEM.EQUATES
|
||||
$Insert ACTION_SETUP
|
||||
$Insert RDS_EQUATES
|
||||
$Insert CLEAN_INSP_EQUATES
|
||||
$Insert COMPANY_EQUATES
|
||||
$Insert RDS_LAYER_EQUATES
|
||||
$Insert TOOL_PARMS_EQUATES
|
||||
$Insert RLIST_EQUATES
|
||||
$Insert APP_INSERTS
|
||||
$Insert QA_MET_EQUATES
|
||||
$Insert PRS_STAGE_EQUATES
|
||||
$Insert WO_MAT_EQUATES
|
||||
$Insert WO_MAT_QA_EQUATES
|
||||
|
||||
Equ COMMA$ to ','
|
||||
|
||||
Declare function Error_Services, Database_Services, obj_RDS_Test, Logging_Services, Environment_Services, SRP_Math
|
||||
Declare function Tool_Parms_Services, Signature_Services, obj_WO_Mat_QA, Datetime, Override_Services, obj_WO_Mat
|
||||
Declare subroutine Error_Services, Database_Services, Logging_Services, Set_Status, Schedule_Services_Dev
|
||||
Declare subroutine Work_Order_Services, Material_Services, Set_FSError
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
If KeyID then GoSub Initialize_System_Variables
|
||||
|
||||
Begin Case
|
||||
|
||||
Case Action _EQC 'CalculateColumn' ; GoSub CalculateColumn
|
||||
Case Action _EQC 'READ_RECORD_PRE' ; GoSub READ_RECORD_PRE
|
||||
Case Action _EQC 'READ_RECORD' ; GoSub READ_RECORD
|
||||
Case Action _EQC 'READONLY_RECORD_PRE' ; GoSub READONLY_RECORD_PRE
|
||||
Case Action _EQC 'READONLY_RECORD' ; GoSub READONLY_RECORD
|
||||
Case Action _EQC 'WRITE_RECORD_PRE' ; GoSub WRITE_RECORD_PRE
|
||||
Case Action _EQC 'WRITE_RECORD' ; GoSub WRITE_RECORD
|
||||
Case Action _EQC 'DELETE_RECORD_PRE' ; GoSub DELETE_RECORD_PRE
|
||||
Case Action _EQC 'DELETE_RECORD' ; GoSub DELETE_RECORD
|
||||
Case Otherwise$ ; Status = 'Invalid Action'
|
||||
|
||||
End Case
|
||||
|
||||
If KeyID then GoSub Restore_System_Variables
|
||||
|
||||
If Assigned(ActionFlow) else ActionFlow = ACTION_CONTINUE$
|
||||
|
||||
Return ActionFlow
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Calculated Columns
|
||||
//
|
||||
// The typical structure of a calculated column will look like this:
|
||||
//
|
||||
// Declare function Database_Services
|
||||
//
|
||||
// @ANS = Database_Services('CalculateColumn')
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
CalculateColumn:
|
||||
|
||||
// Make sure the ActionFlow return variable is cleared in case nothing is calculated.
|
||||
ActionFlow = ''
|
||||
|
||||
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
||||
// ----- MFS calls -----------------------------------------------------------------------------------------------------
|
||||
|
||||
READ_RECORD_PRE:
|
||||
// In order to stop a record from being read in this action these lines of code must be used:
|
||||
//
|
||||
// OrigFileError = 100 : @FM : KeyID
|
||||
// Status = 0
|
||||
// Record = ''
|
||||
// ActionFlow = ACTION_STOP$
|
||||
|
||||
|
||||
return
|
||||
|
||||
READ_RECORD:
|
||||
|
||||
// In order to stop a record from being read in this action these lines of code must be used:
|
||||
//
|
||||
// OrigFileError = 100 : @FM : KeyID
|
||||
// Status = 0
|
||||
// Record = ''
|
||||
|
||||
return
|
||||
|
||||
READONLY_RECORD_PRE:
|
||||
// In order to stop a record from being read in this action these lines of code must be used:
|
||||
//
|
||||
// OrigFileError = 100 : @FM : KeyID
|
||||
// Status = 0
|
||||
// Record = ''
|
||||
// ActionFlow = ACTION_STOP$
|
||||
return
|
||||
|
||||
READONLY_RECORD:
|
||||
// In order to stop a record from being read in this action these lines of code must be used:
|
||||
//
|
||||
// OrigFileError = 100 : @FM : KeyID
|
||||
// Status = 0
|
||||
// Record = ''
|
||||
return
|
||||
|
||||
WRITE_RECORD_PRE:
|
||||
|
||||
ErrMsg = ''
|
||||
|
||||
//Req'd parameter checks
|
||||
ItemType = {RI_TYPE}
|
||||
|
||||
If ItemType EQ '' then
|
||||
ErrMsg := 'Item Type was not specified. '
|
||||
end
|
||||
|
||||
If ErrMsg NE '' then
|
||||
Error_Services('Add', 'Error Saving Reactor Item: ' : ErrMsg)
|
||||
OrigFileError = 104:': Error Saving Reactor Item: ' : ErrMsg
|
||||
Status = 0
|
||||
Record = ''
|
||||
ActionFlow = ACTION_STOP$
|
||||
end
|
||||
|
||||
return
|
||||
|
||||
WRITE_RECORD:
|
||||
|
||||
|
||||
|
||||
return
|
||||
|
||||
DELETE_RECORD_PRE:
|
||||
|
||||
|
||||
return
|
||||
|
||||
DELETE_RECORD:
|
||||
return
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Internal GoSubs
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClearCursors:
|
||||
For counter = 0 to 8
|
||||
ClearSelect counter
|
||||
Next counter
|
||||
return
|
||||
|
||||
|
||||
Initialize_System_Variables:
|
||||
|
||||
// Save these for restoration later
|
||||
SaveDict = @DICT
|
||||
SaveID = @ID
|
||||
SaveRecord = @RECORD
|
||||
OrigFileError = @FILE.ERROR
|
||||
|
||||
// Now make sure @DICT, ID, and @RECORD are populated
|
||||
CurrentDictName = ''
|
||||
If @DICT then
|
||||
DictHandle = @DICT<1, 2>
|
||||
Locate DictHandle in @TABLES(5) Using @FM Setting fPos then
|
||||
CurrentDictName = Field(@TABLES(0), @FM, fPos, 1)
|
||||
end
|
||||
end
|
||||
|
||||
If CurrentDictName NE DictName then
|
||||
Open DictName to @DICT else Status = 'Unable to initialize @DICT'
|
||||
end
|
||||
|
||||
@ID = KeyID
|
||||
If Record else
|
||||
// Record might not have been passed in. Read the record from the database table just to make sure.
|
||||
@FILE.ERROR = ''
|
||||
Open TableName to hTable then
|
||||
FullFSList = hTable[1, 'F' : @VM]
|
||||
BFS = FullFSList[-1, 'B' : @SVM]
|
||||
LastHandle = hTable[-1, 'B' : \0D\]
|
||||
FileHandle = \0D\ : LastHandle[1, @VM]
|
||||
|
||||
Call @BFS(READO.RECORD, BFS, FileHandle, KeyID, FMC, Record, ReadOStatus)
|
||||
end
|
||||
end
|
||||
@RECORD = Record
|
||||
|
||||
return
|
||||
|
||||
|
||||
Restore_System_Variables:
|
||||
|
||||
Transfer SaveDict to @DICT
|
||||
Transfer SaveID to @ID
|
||||
Transfer SaveRecord to @RECORD
|
||||
@FILE.ERROR = OrigFileError
|
||||
|
||||
return
|
||||
|
||||
|
||||
Function REACT_ITEM_ACTIONS(Action, CalcColName, FSList, Handle, Name, FMC, Record, Status, OrigRecord, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from Infineon.
|
||||
|
||||
Name : React_Item_Actions
|
||||
|
||||
Description : Handles calculated columns and MFS calls for the current table.
|
||||
|
||||
Notes : This function uses @ID, @RECORD, and @DICT to make sure {ColumnName} references work correctly.
|
||||
If called from outside of a calculated column these will need to be set and restored.
|
||||
|
||||
Parameters :
|
||||
Action [in] -- Name of the action to be taken
|
||||
CalcColName [in] -- Name of the calculated column that needs to be processed. Normally this should only be
|
||||
populated when the CalcField action is being used.
|
||||
FSList [in] -- The list of MFSs and the BFS name for the current file or volume. This is an @SVM
|
||||
delimited array, with the current MFS name as the first value in the array, and the BFS
|
||||
name as the last value. Normally set by a calling MFS.
|
||||
Handle [in] -- The file handle of the file or media map being accessed. Note, this does contain the
|
||||
entire handle structure that the Basic+ Open statement would provide. Normally set by a
|
||||
calling MFS.
|
||||
Name [in] -- The name (key) of the record or file being accessed. Normally set by a calling MFS.
|
||||
FMC [in] -- Various functions. Normally set by a calling MFS.
|
||||
Record [in] -- The entire record (for record-oriented functions) or a newly-created handle (for
|
||||
"get handle" functions). Normally set by a calling MFS.
|
||||
Status [in/out] -- Indicator of the success or failure of an action. Normally set by the calling MFS but
|
||||
for some actions can be set by the action handler to indicate failure.
|
||||
OrigRecord [in] -- Original content of the record being processed by the current action. This is
|
||||
automatically being assigned by the WRITE_RECORD and DELETE_RECORD actions within
|
||||
BASE_MFS.
|
||||
Param1-10 [in/out] -- Additional request parameter holders
|
||||
ActionFlow [out] -- Used to control the action chain (see the ACTION_SETUP insert for more information.)
|
||||
Can also be used to return a special value, such as the results of the CalcField
|
||||
method.
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
05/12/25 djs Updated WRITE_PRE action to update the CURR_STATUS_STATIC field if the retire date changes.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
$Insert ACTION_SETUP
|
||||
$Insert APP_INSERTS
|
||||
$Insert FILE.SYSTEM.EQUATES
|
||||
$Insert REACT_ITEM_EQUATES
|
||||
|
||||
Declare function obj_React_Item
|
||||
Declare subroutine Error_Services
|
||||
|
||||
If KeyID then GoSub Initialize_System_Variables
|
||||
|
||||
Begin Case
|
||||
|
||||
Case Action _EQC 'CalculateColumn' ; GoSub CalculateColumn
|
||||
Case Action _EQC 'READ_RECORD_PRE' ; GoSub READ_RECORD_PRE
|
||||
Case Action _EQC 'READ_RECORD' ; GoSub READ_RECORD
|
||||
Case Action _EQC 'READONLY_RECORD_PRE' ; GoSub READONLY_RECORD_PRE
|
||||
Case Action _EQC 'READONLY_RECORD' ; GoSub READONLY_RECORD
|
||||
Case Action _EQC 'WRITE_RECORD_PRE' ; GoSub WRITE_RECORD_PRE
|
||||
Case Action _EQC 'WRITE_RECORD' ; GoSub WRITE_RECORD
|
||||
Case Action _EQC 'DELETE_RECORD_PRE' ; GoSub DELETE_RECORD_PRE
|
||||
Case Action _EQC 'DELETE_RECORD' ; GoSub DELETE_RECORD
|
||||
Case Otherwise$ ; Status = 'Invalid Action'
|
||||
|
||||
End Case
|
||||
|
||||
If KeyID then GoSub Restore_System_Variables
|
||||
|
||||
If Assigned(ActionFlow) else ActionFlow = ACTION_CONTINUE$
|
||||
|
||||
Return ActionFlow
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Calculated Columns
|
||||
//
|
||||
// The typical structure of a calculated column will look like this:
|
||||
//
|
||||
// Declare function Database_Services
|
||||
//
|
||||
// @ANS = Database_Services('CalculateColumn')
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
CalculateColumn:
|
||||
|
||||
// Make sure the ActionFlow return variable is cleared in case nothing is calculated.
|
||||
ActionFlow = ''
|
||||
|
||||
return
|
||||
|
||||
// ----- MFS calls -----------------------------------------------------------------------------------------------------
|
||||
|
||||
READ_RECORD_PRE:
|
||||
// In order to stop a record from being read in this action these lines of code must be used:
|
||||
//
|
||||
// OrigFileError = 100 : @FM : KeyID
|
||||
// Status = 0
|
||||
// Record = ''
|
||||
// ActionFlow = ACTION_STOP$
|
||||
return
|
||||
|
||||
|
||||
READ_RECORD:
|
||||
|
||||
// In order to stop a record from being read in this action these lines of code must be used:
|
||||
//
|
||||
// OrigFileError = 100 : @FM : KeyID
|
||||
// Status = 0
|
||||
// Record = ''
|
||||
|
||||
return
|
||||
|
||||
|
||||
READONLY_RECORD_PRE:
|
||||
// In order to stop a record from being read in this action these lines of code must be used:
|
||||
//
|
||||
// OrigFileError = 100 : @FM : KeyID
|
||||
// Status = 0
|
||||
// Record = ''
|
||||
// ActionFlow = ACTION_STOP$
|
||||
return
|
||||
|
||||
|
||||
READONLY_RECORD:
|
||||
// In order to stop a record from being read in this action these lines of code must be used:
|
||||
//
|
||||
// OrigFileError = 100 : @FM : KeyID
|
||||
// Status = 0
|
||||
// Record = ''
|
||||
return
|
||||
|
||||
|
||||
WRITE_RECORD_PRE:
|
||||
|
||||
ErrMsg = ''
|
||||
|
||||
// Req'd parameter checks
|
||||
ItemType = {RI_TYPE}
|
||||
|
||||
* If ItemType EQ '' then ErrMsg := 'Item Type was not specified. '
|
||||
|
||||
If ErrMsg NE '' then
|
||||
Error_Services('Add', 'Error Saving Reactor Item: ' : ErrMsg)
|
||||
OrigFileError = 104:': Error Saving Reactor Item: ' : ErrMsg
|
||||
Status = 0
|
||||
Record = ''
|
||||
ActionFlow = ACTION_STOP$
|
||||
end else
|
||||
OrigRetireDt = OrigRecord<REACT_ITEM_RETIRE_DT$>
|
||||
NewRetireDt = Record<REACT_ITEM_RETIRE_DT$>
|
||||
OrigNotes = OrigRecord<REACT_ITEM_NOTES$>
|
||||
NewNotes = Record<REACT_ITEM_NOTES$>
|
||||
If ( (OrigRetireDt NE NewRetireDt) or (OrigNotes NE NewNotes) ) then
|
||||
CurrStatus = obj_React_Item('CurrStatus', Name:@RM:Record)
|
||||
Record<REACT_ITEM_CURR_STATUS_STATIC$> = CurrStatus
|
||||
SaveRecord = Record
|
||||
end
|
||||
end
|
||||
|
||||
return
|
||||
|
||||
WRITE_RECORD:
|
||||
return
|
||||
|
||||
DELETE_RECORD_PRE:
|
||||
return
|
||||
|
||||
DELETE_RECORD:
|
||||
return
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Internal GoSubs
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClearCursors:
|
||||
|
||||
For counter = 0 to 8
|
||||
ClearSelect counter
|
||||
Next counter
|
||||
|
||||
return
|
||||
|
||||
|
||||
Initialize_System_Variables:
|
||||
|
||||
// Save these for restoration later
|
||||
SaveDict = @DICT
|
||||
SaveID = @ID
|
||||
SaveRecord = @RECORD
|
||||
OrigFileError = @FILE.ERROR
|
||||
|
||||
// Now make sure @DICT, ID, and @RECORD are populated
|
||||
CurrentDictName = ''
|
||||
If @DICT then
|
||||
DictHandle = @DICT<1, 2>
|
||||
Locate DictHandle in @TABLES(5) Using @FM Setting fPos then
|
||||
CurrentDictName = Field(@TABLES(0), @FM, fPos, 1)
|
||||
end
|
||||
end
|
||||
|
||||
If CurrentDictName NE DictName then
|
||||
Open DictName to @DICT else Status = 'Unable to initialize @DICT'
|
||||
end
|
||||
|
||||
@ID = KeyID
|
||||
If Record else
|
||||
// Record might not have been passed in. Read the record from the database table just to make sure.
|
||||
@FILE.ERROR = ''
|
||||
Open TableName to hTable then
|
||||
FullFSList = hTable[1, 'F' : @VM]
|
||||
BFS = FullFSList[-1, 'B' : @SVM]
|
||||
LastHandle = hTable[-1, 'B' : \0D\]
|
||||
FileHandle = \0D\ : LastHandle[1, @VM]
|
||||
|
||||
Call @BFS(READO.RECORD, BFS, FileHandle, KeyID, FMC, Record, ReadOStatus)
|
||||
end
|
||||
end
|
||||
@RECORD = Record
|
||||
|
||||
return
|
||||
|
||||
|
||||
Restore_System_Variables:
|
||||
|
||||
Transfer SaveDict to @DICT
|
||||
Transfer SaveID to @ID
|
||||
Transfer SaveRecord to @RECORD
|
||||
@FILE.ERROR = OrigFileError
|
||||
|
||||
return
|
||||
|
||||
|
@ -20,62 +20,110 @@ Compile function React_Item_Services(@Service, @Params)
|
||||
08/02/22 djs Original programmer.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
$Insert LOGICAL
|
||||
$Insert APP_INSERTS
|
||||
$Insert SERVICE_SETUP
|
||||
$Insert RLIST_EQUATES
|
||||
$Insert REACT_ITEM_EQUATES
|
||||
|
||||
Declare function Database_Services, Error_Services, SRP_JSON, NextKey
|
||||
Declare subroutine SRP_JSON, Error_Services, Btree.Extract, Database_Services
|
||||
GoToService
|
||||
Declare function Database_Services, Error_Services, SRP_JSON, NextKey, SRP_Date, obj_React_Item, SRP_Array
|
||||
Declare subroutine SRP_JSON, Error_Services, Btree.Extract, Database_Services, Update_Index
|
||||
|
||||
Return Response or ""
|
||||
GoToService else
|
||||
Error_Services('Set', Service : ' is not a valid service request within the ' : ServiceModule : ' services module.')
|
||||
end
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// SERVICES
|
||||
//-----------------------------------------------------------------------------
|
||||
Return Response else ''
|
||||
|
||||
Service GetAllReactItemKeys()
|
||||
AllKeys = ''
|
||||
RList('SELECT REACT_ITEM', TARGET_ACTIVELIST$, '', '', '')
|
||||
Done = False$
|
||||
Reactors = ''
|
||||
Loop
|
||||
Readnext keyId else Done = True$
|
||||
Until Done
|
||||
AllKeys<1,-1> = keyId
|
||||
Repeat
|
||||
Response = AllKeys
|
||||
end service
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Service Parameter Options
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
Options BOOLEAN = True$, False$
|
||||
|
||||
Service GetReactItems(RIType, CurrStatus)
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Services
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
Service GetReactItems(RIType, CurrStatus, EntryDtStart, EntryDtEnd, RetireDtStart, RetireDtEnd, IncludeNullRetireDt=BOOLEAN)
|
||||
|
||||
ErrorMsg = ''
|
||||
Response = ''
|
||||
Swap ',' with @VM in RIType
|
||||
Swap ',' with @VM in CurrStatus
|
||||
|
||||
Open 'DICT.REACT_ITEM' to DictReactItem then
|
||||
|
||||
SearchString = ''
|
||||
If RIType NE '' then SearchString := 'RI_TYPE':@VM:RIType:@FM
|
||||
If CurrStatus NE '' then SearchString := 'CURR_STATUS':@VM:CurrStatus:@FM
|
||||
RIKeys = ''
|
||||
Btree.Extract(SearchString, 'REACT_ITEM', DictReactItem, RIKeys, '', '')
|
||||
ErrCode = ''
|
||||
IF Get_Status(ErrCode) then
|
||||
ErrorMsg = 'Error in ':Service:' service. Error calling Btree.Extract. Error code ':ErrCode:'.'
|
||||
If ( (RIType NE '') or (CurrStatus NE '') or (EntryDtStart NE '') or (EntryDtEnd NE '') or (RetireDtStart NE '') or (RetireDtEnd NE '') or (IncludeNullRetireDt NE '') ) then
|
||||
If EntryDtStart NE '' and Not(Num(EntryDtStart)) then EntryDtStart = IConv(EntryDtStart, 'D')
|
||||
If EntryDtEnd NE '' and Not(Num(EntryDtEnd)) then EntryDtEnd = IConv(EntryDtEnd, 'D')
|
||||
If RetireDtStart NE '' and Not(Num(RetireDtStart)) then RetireDtStart = IConv(RetireDtStart, 'D')
|
||||
If RetireDtEnd NE '' and Not(Num(RetireDtEnd)) then RetireDtEnd = IConv(RetireDtEnd, 'D')
|
||||
Open 'DICT.REACT_ITEM' to DictReactItem then
|
||||
SearchString = ''
|
||||
If RIType NE '' then
|
||||
Swap ',' with @VM in RIType
|
||||
SearchString := 'RI_TYPE':@VM:RIType:@FM
|
||||
end
|
||||
Begin Case
|
||||
Case ( (EntryDtStart NE '') and (EntryDtEnd NE '') )
|
||||
EntryDtStart = OConv(EntryDtStart - 1, 'D4/')
|
||||
EntryDtEnd = OConv(EntryDtEnd + 1, 'D4/')
|
||||
SearchString := 'ENTER_DT':@VM:EntryDtStart:'~':EntryDtEnd:@FM
|
||||
Case (EntryDtStart NE '')
|
||||
EntryDtStart = OConv(EntryDtStart, 'D4/')
|
||||
SearchString := 'ENTER_DT':@VM:'>=':EntryDtStart:@FM
|
||||
Case (EntryDtEnd NE '')
|
||||
SearchString := 'ENTER_DT':@VM:'<=':EntryDtEnd:@FM
|
||||
Case Otherwise$
|
||||
Null
|
||||
End Case
|
||||
Begin Case
|
||||
Case ( (RetireDtStart NE '') and (RetireDtEnd NE '') )
|
||||
RetireDtStart = OConv(RetireDtStart - 1, 'D4/')
|
||||
RetireDtEnd = OConv(RetireDtEnd + 1, 'D4/')
|
||||
SearchString := 'RETIRE_DT':@VM:RetireDtStart:'~':RetireDtEnd
|
||||
If IncludeNullRetireDt then SearchString := @VM:''
|
||||
SearchString := @FM
|
||||
Case (RetireDtStart NE '')
|
||||
RetireDtStart = OConv(RetireDtStart, 'D4/')
|
||||
SearchString := 'RETIRE_DT':@VM:'>=':RetireDtStart
|
||||
If IncludeNullRetireDt then SearchString := @VM:''
|
||||
SearchString := @FM
|
||||
Case (RetireDtEnd NE '')
|
||||
SearchString := 'RETIRE_DT':@VM:'<=':RetireDtEnd
|
||||
If IncludeNullRetireDt then SearchString := @VM:''
|
||||
SearchString := @FM
|
||||
Case IncludeNullRetireDt
|
||||
SearchString := 'RETIRE_DT':@VM:'':@FM
|
||||
Case Otherwise$
|
||||
Null
|
||||
End Case
|
||||
If CurrStatus NE '' then
|
||||
Swap ',' with @VM in CurrStatus
|
||||
SearchString := 'CURR_STATUS_STATIC':@VM:CurrStatus:@FM
|
||||
end
|
||||
Flag = ''
|
||||
RIKeys = ''
|
||||
Btree.Extract(SearchString, 'REACT_ITEM', DictReactItem, RIKeys, 'E', Flag)
|
||||
If Flag EQ 0 then
|
||||
EnterDtms = Xlate('REACT_ITEM', RIKeys, 'ENTER_DTM', 'X')
|
||||
Array = RIKeys:@FM:EnterDtms
|
||||
Array = SRP_Array('SortRows', Array, 'DN2', 'ARRAY', @FM, @VM)
|
||||
Response = Array<1>
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. Error calling Btree.Extract.'
|
||||
end
|
||||
end else
|
||||
Response = RIKeys
|
||||
ErrorMsg = 'Error in ':Service:' service. Error opening REACT_ITEM dictionary.'
|
||||
end
|
||||
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. Error opening REACT_ITEM dictionary.'
|
||||
AllKeys = ''
|
||||
RList('SELECT REACT_ITEM', TARGET_ACTIVELIST$, '', '', '')
|
||||
Done = False$
|
||||
Loop
|
||||
Readnext KeyId else Done = True$
|
||||
Until Done
|
||||
AllKeys<1, -1> = KeyId
|
||||
Repeat
|
||||
Response = AllKeys
|
||||
end
|
||||
|
||||
If ErrorMsg NE '' then
|
||||
Error_Services('Add', ErrorMsg)
|
||||
end
|
||||
@ -155,7 +203,6 @@ Service ConvertRecordToJSON(KeyID, Record, ItemURL)
|
||||
|
||||
Response = jsonRecord
|
||||
|
||||
|
||||
end service
|
||||
|
||||
|
||||
@ -326,11 +373,11 @@ Service GetReactItemTemplateJSON()
|
||||
|
||||
Response = jsonRecord
|
||||
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service CreateReactItem(Record)
|
||||
|
||||
ErrMsg = ''
|
||||
KeyID = ''
|
||||
If Record NE '' then
|
||||
@ -355,6 +402,7 @@ Service CreateReactItem(Record)
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service ConvertRecordToJSONQuick(KeyID, Record, ItemURL)
|
||||
|
||||
jsonRecord = ''
|
||||
@ -407,6 +455,32 @@ Service ConvertRecordToJSONQuick(KeyID, Record, ItemURL)
|
||||
Response = jsonRecord
|
||||
|
||||
end service
|
||||
|
||||
|
||||
Service UpdateReactItemStatus(RINo)
|
||||
|
||||
If RINo NE '' then
|
||||
If RowExists('REACT_ITEM', RINo) then
|
||||
RIRec = Database_Services('ReadDataRow', 'REACT_ITEM', RINo)
|
||||
If Error_Services('NoError') then
|
||||
Update_Index('REACT_ITEM_HIST', 'RI_NO', False$, True$)
|
||||
ReactItemCurrStatus = obj_React_Item('CurrStatus', RINo:@RM:RIRec)
|
||||
ReactItemCurrStatusStatic = RIRec<REACT_ITEM_CURR_STATUS_STATIC$>
|
||||
If ReactItemCurrStatus NE ReactItemCurrStatusStatic then
|
||||
Open 'REACT_ITEM' to hTable then
|
||||
WriteV ReactItemCurrStatus on hTable, RINo, REACT_ITEM_CURR_STATUS_STATIC$ else
|
||||
Error_Services('Add', 'Error in ':Service:' service. Error writing CURR_STATUS_STATIC, ':ReactItemCurrStatus:', for REACT_ITEM ':RINo:'.')
|
||||
end
|
||||
end else
|
||||
Error_Services('Add', 'Error in ':Service:' service. Error opening REACT_ITEM table for status update.')
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Internal GoSubs
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
@ -419,6 +493,3 @@ ClearCursors:
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -6,25 +6,27 @@ compile insert REACT_ITEM_EQUATES
|
||||
----------------------------------------*/
|
||||
|
||||
|
||||
Equ REACT_ITEM_RI_NO$ To 0
|
||||
Equ REACT_ITEM_DESC$ To 1
|
||||
Equ REACT_ITEM_ENTER_BY$ To 2
|
||||
Equ REACT_ITEM_ENTER_DTM$ To 3
|
||||
Equ REACT_ITEM_RETIRE_BY$ To 4
|
||||
Equ REACT_ITEM_RETIRE_DT$ To 5
|
||||
Equ REACT_ITEM_PART_TYPE$ To 6
|
||||
Equ REACT_ITEM_MFR_CD$ To 7
|
||||
Equ REACT_ITEM_MFR_PART_NO$ To 8
|
||||
Equ REACT_ITEM_MFR_PART_NO_REV$ To 9
|
||||
Equ REACT_ITEM_SERIAL_NO$ To 10
|
||||
Equ REACT_ITEM_RI_TYPE$ To 11
|
||||
Equ REACT_ITEM_SUSC_SIZE$ To 12
|
||||
Equ REACT_ITEM_PKT_QTY$ To 13
|
||||
Equ REACT_ITEM_PKT_SIZE$ To 14
|
||||
Equ REACT_ITEM_NOTES$ To 15
|
||||
Equ REACT_ITEM_PPLUS_RDS_NO$ To 16
|
||||
Equ REACT_ITEM_SERIAL$ To 17
|
||||
Equ REACT_ITEM_TUBE_GRADE$ To 18
|
||||
Equ REACT_ITEM_TUBE_PRESS$ To 19
|
||||
Equ REACT_ITEM_TUBE_STYLE$ To 20
|
||||
Equ REACT_ITEM_NEW_OR_REFURB$ To 21
|
||||
Equ REACT_ITEM_RI_NO$ To 0
|
||||
Equ REACT_ITEM_DESC$ To 1
|
||||
Equ REACT_ITEM_ENTER_BY$ To 2
|
||||
Equ REACT_ITEM_ENTER_DTM$ To 3
|
||||
Equ REACT_ITEM_RETIRE_BY$ To 4
|
||||
Equ REACT_ITEM_RETIRE_DT$ To 5
|
||||
Equ REACT_ITEM_PART_TYPE$ To 6
|
||||
Equ REACT_ITEM_MFR_CD$ To 7
|
||||
Equ REACT_ITEM_MFR_PART_NO$ To 8
|
||||
Equ REACT_ITEM_MFR_PART_NO_REV$ To 9
|
||||
Equ REACT_ITEM_SERIAL_NO$ To 10
|
||||
Equ REACT_ITEM_RI_TYPE$ To 11
|
||||
Equ REACT_ITEM_SUSC_SIZE$ To 12
|
||||
Equ REACT_ITEM_PKT_QTY$ To 13
|
||||
Equ REACT_ITEM_PKT_SIZE$ To 14
|
||||
Equ REACT_ITEM_NOTES$ To 15
|
||||
Equ REACT_ITEM_PPLUS_RDS_NO$ To 16
|
||||
Equ REACT_ITEM_SERIAL$ To 17
|
||||
Equ REACT_ITEM_TUBE_GRADE$ To 18
|
||||
Equ REACT_ITEM_TUBE_PRESS$ To 19
|
||||
Equ REACT_ITEM_TUBE_STYLE$ To 20
|
||||
Equ REACT_ITEM_NEW_OR_REFURB$ To 21
|
||||
Equ REACT_ITEM_CURR_STATUS_STATIC$ To 22
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user