Enhanced Error Checking
This commit is contained in:
committed by
Ouellette Jonathan (CSC FI SPS MESLEO)
parent
09d2d13e63
commit
a8dff61cfa
@ -3577,37 +3577,45 @@ end service
|
|||||||
Service GetReactorsWithDownLLByDtm(DtmToCheck, ReactType)
|
Service GetReactorsWithDownLLByDtm(DtmToCheck, ReactType)
|
||||||
|
|
||||||
ErrMsg = ''
|
ErrMsg = ''
|
||||||
AllReactors = Reactor_Services('GetReactorNumbers', ReactType)
|
|
||||||
SLLReactors = ''
|
SLLReactors = ''
|
||||||
If AllReactors NE '' then
|
If DtmToCheck NE '' then
|
||||||
for each ReactNo in AllReactors using @FM
|
AllReactors = Reactor_Services('GetReactorNumbers', ReactType)
|
||||||
PickPlaceFlag = XLATE('REACTOR', ReactNo, REACTOR_PICK_PLACE$, 'X')
|
If AllReactors NE '' then
|
||||||
If PickPlaceFlag then
|
for each ReactNo in AllReactors using @FM
|
||||||
Open 'DICT.REACT_LL' to DictReactLL then
|
PickPlaceFlag = XLATE('REACTOR', ReactNo, REACTOR_PICK_PLACE$, 'X')
|
||||||
SearchString = ''
|
If PickPlaceFlag then
|
||||||
SearchString := 'REACT_NO':@VM:ReactNo:@FM
|
Open 'DICT.REACT_LL' to DictReactLL then
|
||||||
ReactLLKeys = ''
|
SearchString = ''
|
||||||
Btree.Extract(SearchString, 'REACT_LL', DictReactLL, ReactLLKeys)
|
SearchString := 'REACT_NO':@VM:ReactNo:@FM
|
||||||
|
ReactLLKeys = ''
|
||||||
|
Btree.Extract(SearchString, 'REACT_LL', DictReactLL, ReactLLKeys)
|
||||||
|
|
||||||
For each ReactLLKey in ReactLLKeys using @VM
|
For each ReactLLKey in ReactLLKeys using @VM
|
||||||
ReactLLRec = Database_Services('ReadDataRow', 'REACT_LL', ReactLLKey, True$, 0, False$)
|
ReactLLRec = Database_Services('ReadDataRow', 'REACT_LL', ReactLLKey, True$, 0, False$)
|
||||||
ReactLLStartDTM = Field(ReactLLKey, '*', 2)
|
ReactLLStartDTM = Field(ReactLLKey, '*', 2)
|
||||||
ReactLLEndDTM = ReactLLRec<REACT_LL_STOP_DTM$>
|
ReactLLEndDTM = ReactLLRec<REACT_LL_STOP_DTM$>
|
||||||
ReactLLApplicable = false$
|
ReactLLApplicable = false$
|
||||||
If ReactLLStartDTM LE DtmToCheck AND (ReactLLEndDTM EQ '' OR ReactLLEndDtm GT DtmToCheck) then
|
If ReactLLStartDTM LE DtmToCheck AND (ReactLLEndDTM EQ '' OR ReactLLEndDtm GT DtmToCheck) then
|
||||||
Locate ReactNo in SLLReactors using @VM setting iPos else
|
Locate ReactNo in SLLReactors using @VM setting iPos else
|
||||||
SLLReactors<1, -1> = ReactNo
|
SLLReactors<1, -1> = ReactNo
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
Next ReactLLKey
|
Next ReactLLKey
|
||||||
end else
|
end else
|
||||||
ErrMsg = 'Unable to open the REACT_LL dictionary.'
|
ErrMsg = 'Unable to open the REACT_LL dictionary.'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
Next ReactNo
|
||||||
Next ReactNo
|
end else
|
||||||
|
ErrMsg = 'No Reactor IDs found!'
|
||||||
|
end
|
||||||
end else
|
end else
|
||||||
ErrMsg = 'No Reactor IDs found!'
|
ErrMsg = 'Datetime to check variable was null.'
|
||||||
|
end
|
||||||
|
|
||||||
|
If ErrMsg NE '' then
|
||||||
|
Error_Services('Add', ErrMsg)
|
||||||
end
|
end
|
||||||
|
|
||||||
Response = SLLReactors
|
Response = SLLReactors
|
||||||
|
@ -141,7 +141,12 @@ CreateHALItem:
|
|||||||
//Single Load Lock Report from Metrology Services
|
//Single Load Lock Report from Metrology Services
|
||||||
ReportStartDtm = Http_Services('GetQueryField', 'StartDate')
|
ReportStartDtm = Http_Services('GetQueryField', 'StartDate')
|
||||||
ReportEndDtm = Http_Services('GetQueryField', 'EndDate')
|
ReportEndDtm = Http_Services('GetQueryField', 'EndDate')
|
||||||
RepJson = Report_Services('GetSLLReportJson', ReportStartDtm, ReportEndDtm)
|
If ReportStartDtm NE '' AND ReportEndDtm NE '' then
|
||||||
|
RepJson = Report_Services('GetSLLReportJson', ReportStartDtm, ReportEndDtm)
|
||||||
|
end else
|
||||||
|
Error_Services('Add', 'Missing parameters for report.')
|
||||||
|
end
|
||||||
|
|
||||||
Case Otherwise$
|
Case Otherwise$
|
||||||
Error_Services('Add', 'Unsupported report')
|
Error_Services('Add', 'Unsupported report')
|
||||||
End Case
|
End Case
|
||||||
|
@ -2379,26 +2379,35 @@ Service GetSLLReportJson(FromDt, ToDt)
|
|||||||
ErrorMessage = ''
|
ErrorMessage = ''
|
||||||
SLLReportJson = ''
|
SLLReportJson = ''
|
||||||
objSLLReportJson = ''
|
objSLLReportJson = ''
|
||||||
|
If FromDt NE '' OR ToDt NE '' then
|
||||||
|
If SRP_Json(objSLLReportJson, 'New', 'Array') then
|
||||||
|
For StartDt = FromDt to ToDt
|
||||||
|
ThisDate = Date_Services('ConvertDateTimeToISO8601', StartDt)
|
||||||
|
ThisDtASMDownLL = Reactor_Services('GetReactorsWithDownLLByDtm', StartDt + 1, 'ASM')
|
||||||
|
ThisDtASMPlusDownLL = Reactor_Services('GetReactorsWithDownLLByDtm', StartDt + 1, 'ASM+')
|
||||||
|
ThisDtHTRDownLL = Reactor_Services('GetReactorsWithDownLLByDtm', StartDt + 1, 'HTR')
|
||||||
|
ThisDtASMDownLLCount = DCount(ThisDtASMDownLL, @VM) + DCount(ThisDtASMPlusDownLL, @VM)
|
||||||
|
ThisDtHTRDownLLCount = DCount(ThisDtHTRDownLL, @VM)
|
||||||
|
objSLLDay = ''
|
||||||
|
If SRP_Json(objSLLDay, 'New', 'Object') then
|
||||||
|
SRP_Json(objSLLDay, 'SetValue', 'Date', ThisDate)
|
||||||
|
SRP_Json(objSLLDay, 'SetValue', 'ASM', ThisDtASMDownLLCount)
|
||||||
|
SRP_Json(objSLLDay, 'SetValue', 'HTR', ThisDtHTRDownLLCount)
|
||||||
|
SRP_Json(objSLLReportJson, 'Add', objSLLDay)
|
||||||
|
SRP_Json(objSLLDay, 'Release')
|
||||||
|
end
|
||||||
|
Next StartDt
|
||||||
|
SLLReportJson = SRP_Json(objSLLReportJson, 'Stringify', 'Fast')
|
||||||
|
SRP_Json(objSLLReportJson, 'Release')
|
||||||
|
end else
|
||||||
|
ErrorMessage = 'Error creating the root JSON for the report.'
|
||||||
|
end
|
||||||
|
end else
|
||||||
|
ErrorMessage = 'From Date or To Date was null.'
|
||||||
|
end
|
||||||
|
|
||||||
If SRP_Json(objSLLReportJson, 'New', 'Array') then
|
If ErrorMessage NE '' then
|
||||||
For StartDt = FromDt to ToDt
|
Error_Services('Add', ErrorMessage)
|
||||||
ThisDate = Date_Services('ConvertDateTimeToISO8601', StartDt)
|
|
||||||
ThisDtASMDownLL = Reactor_Services('GetReactorsWithDownLLByDtm', StartDt + 1, 'ASM')
|
|
||||||
ThisDtASMPlusDownLL = Reactor_Services('GetReactorsWithDownLLByDtm', StartDt + 1, 'ASM+')
|
|
||||||
ThisDtHTRDownLL = Reactor_Services('GetReactorsWithDownLLByDtm', StartDt + 1, 'HTR')
|
|
||||||
ThisDtASMDownLLCount = DCount(ThisDtASMDownLL, @VM) + DCount(ThisDtASMPlusDownLL, @VM)
|
|
||||||
ThisDtHTRDownLLCount = DCount(ThisDtHTRDownLL, @VM)
|
|
||||||
objSLLDay = ''
|
|
||||||
If SRP_Json(objSLLDay, 'New', 'Object') then
|
|
||||||
SRP_Json(objSLLDay, 'SetValue', 'Date', ThisDate)
|
|
||||||
SRP_Json(objSLLDay, 'SetValue', 'ASM', ThisDtASMDownLLCount)
|
|
||||||
SRP_Json(objSLLDay, 'SetValue', 'HTR', ThisDtHTRDownLLCount)
|
|
||||||
SRP_Json(objSLLReportJson, 'Add', objSLLDay)
|
|
||||||
SRP_Json(objSLLDay, 'Release')
|
|
||||||
end
|
|
||||||
Next StartDt
|
|
||||||
SLLReportJson = SRP_Json(objSLLReportJson, 'Stringify', 'Fast')
|
|
||||||
SRP_Json(objSLLReportJson, 'Release')
|
|
||||||
end
|
end
|
||||||
|
|
||||||
Response = SLLReportJson
|
Response = SLLReportJson
|
||||||
|
Reference in New Issue
Block a user