Merged PR 21151: Return To Fab Operations and Processing
This commit is contained in:
parent
b607432be4
commit
aabd4c3a91
@ -307,3 +307,72 @@ API wafercounter.completewafercount.POST
|
||||
HTTP_Services('SetResponseStatus', ResponseCode, ErrorMessage)
|
||||
|
||||
end api
|
||||
|
||||
|
||||
API wafercounter.ID.HEAD
|
||||
API wafercounter.ID.GET
|
||||
|
||||
ErrorMessage = ''
|
||||
ResponseCode = ''
|
||||
WaferCounterId = EndPointSegment
|
||||
CassId = ''
|
||||
Body = ''
|
||||
OIWizardID = ''
|
||||
UserId = ''
|
||||
Cookies = HTTP_Services('GetHTTPCookie')
|
||||
For each Cookie in Cookies using ';'
|
||||
Key = Field(Cookie, '=', 1)
|
||||
If Key EQ 'sessionID' then
|
||||
OIWizardID = Field(Cookie, '=', 2)
|
||||
end
|
||||
Next Cookie
|
||||
ValidSession = OI_Wizard_Services('ValidateSession', OIWizardID)
|
||||
CassBarcodeData = ''
|
||||
UserId = Xlate('OI_WIZARD', OIWizardID, OI_WIZARD.EMPLOYEE_ID$, 'X')
|
||||
StatusCode = ''
|
||||
Body = HTTP_Services('GetHTTPPostString', True$)
|
||||
DecodedJSON = HTTP_Services('DecodePercentString', Body)
|
||||
|
||||
//Log Entry into API -
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM
|
||||
LogData<2> = UserId
|
||||
LogData<3> = OIWizardId
|
||||
LogData<4> = 'Getting Wafer counter record. Record Id: ' : WaferCounterId
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
|
||||
|
||||
If WaferCounterId NE '' then
|
||||
WaferCounterJson = Wafer_Counter_Services('ConvertWaferCounterRecToJson', WaferCounterId)
|
||||
If Error_Services('NoError') then
|
||||
HTTP_Services('SetResponseBody', WaferCounterJson)
|
||||
ResponseCode = 200
|
||||
end else
|
||||
ErrorMessage = Error_Services('GetMessage')
|
||||
ResponseCode = 500
|
||||
end
|
||||
end else
|
||||
ErrorMessage = 'Null wafer counter passed to endpoint.'
|
||||
end
|
||||
|
||||
If ErrorMessage EQ '' then
|
||||
//Log Success
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM
|
||||
LogData<2> = UserId
|
||||
LogData<3> = OIWizardId
|
||||
LogData<4> = 'Wafer Counter record successfully returned. Wafer Counter Id: ' : WaferCounterId
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
|
||||
end else
|
||||
//Log Failure
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM
|
||||
LogData<2> = UserId
|
||||
LogData<3> = OIWizardId
|
||||
LogData<4> = 'Error returning wafer counter record. Wafer Counter Id: ' : WaferCounterId : ' . Error Message: ' : ErrorMessage
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, False$)
|
||||
end
|
||||
|
||||
HTTP_Services('SetResponseHeaderField', 'Content-Location', FullEndpointURL)
|
||||
HTTP_Services('SetResponseStatus', ResponseCode, ErrorMessage)
|
||||
|
||||
end api
|
||||
|
Reference in New Issue
Block a user