Finished mainline development
This commit is contained in:
parent
9673fffee1
commit
0a8451fa14
@ -193,6 +193,8 @@ API returntofab.ID.PATCH
|
||||
ErrorMessage = Error_Services('GetMessage')
|
||||
Error_Services('Add', ErrorMessage)
|
||||
end
|
||||
Case Field EQ 'Note'
|
||||
Return_To_Fab_Services('AddMiscNote', RTFId, Value, LSLUser)
|
||||
Case Otherwise$
|
||||
Error_Services('Add', 'Error Updating ' : Field : 'field in RTF Record.')
|
||||
End Case
|
||||
|
@ -197,14 +197,19 @@ Service ConvertReturnToFabRecordToJSON(RTFId)
|
||||
Notes = RTFRecord<RETURN_TO_FAB_LOTS_NOTES$>
|
||||
NotesUser = RTFRecord<RETURN_TO_FAB_LOTS_NOTES_USER$>
|
||||
If Notes NE '' then
|
||||
objNotes = ''
|
||||
If SRP_JSON(objNotes, 'New', 'Array') then
|
||||
JsonArrayNotes = ''
|
||||
If SRP_JSON(JsonArrayNotes, 'New', 'Array') then
|
||||
For each Note in Notes using @VM setting vPos
|
||||
SRP_JSON(objNotes, 'AddValue', Notes<1,vPos>)
|
||||
SRP_JSON(objNotes, 'AddValue', NotesUser<1,vPos>)
|
||||
objSingleNote = ''
|
||||
If SRP_Json(objSingleNote, 'New', 'Object') then
|
||||
SRP_Json(objSingleNote, 'SetValue', 'NoteText', Notes<1,vPos>, 'String')
|
||||
SRP_Json(objSingleNote, 'SetValue', 'NoteUser', NotesUser<1,vPos>, 'String')
|
||||
SRP_Json(JsonArrayNotes, 'Add', objSingleNote)
|
||||
SRP_Json(objSingleNote, 'Release')
|
||||
end
|
||||
Next Note
|
||||
SRP_JSON(objRTF, 'Set', 'Notes', objNotes)
|
||||
SRP_JSON(objNotes, 'Release')
|
||||
SRP_JSON(objRTF, 'Set', 'Notes', JsonArrayNotes)
|
||||
SRP_JSON(JsonArrayNotes, 'Release')
|
||||
end
|
||||
end else
|
||||
SRP_JSON(objRTF, 'SetValue', 'Notes', '')
|
||||
|
@ -171,29 +171,6 @@ Service ConvertRecordToJSON(KeyID, Record, ItemURL)
|
||||
SRP_JSON(objWMOut, 'SetValue', 'postEpiSigDtm', OConv({POST_EPI_SIG_DTM}, 'DT/^1HS'))
|
||||
SRP_JSON(objWMOut, 'SetValue', 'supVerSig', {SUP_VER_SIG})
|
||||
SRP_JSON(objWMOut, 'SetValue', 'supVerSigDtm', OConv({SUP_VER_SIG_DTM}, 'DT/^1HS'))
|
||||
AllRTFRecords = Return_To_Fab_Services('GetReturnToFabRecordIdByCassId', KeyID)
|
||||
If AllRTFRecords NE '' then
|
||||
objRTFRecords = ''
|
||||
If SRP_JSON(objRTFRecords, 'New', 'Array') then
|
||||
For each RTFRecordId in AllRTFRecords using @VM setting vPos
|
||||
objRTF = ''
|
||||
If SRP_JSON(objRTF, 'New', 'Object') then
|
||||
RTFRecord = Database_Services('ReadDataRow', 'RETURN_TO_FAB_LOTS', RTFRecordId, True$, 0, False$)
|
||||
SRP_JSON(objRTF, 'SetValue', 'ReturnToFabLotsId', RTFRecordId)
|
||||
SRP_JSON(objRTF, 'SetValue', 'StartDtm', OConv(RTFRecord<RETURN_TO_FAB_LOTS_MH_INIT_DTM$>, 'DT'))
|
||||
SRP_JSON(objRTF, 'SetValue', 'Completed', RTFRecord<RETURN_TO_FAB_LOTS_COMPLETED$>, 'Boolean')
|
||||
SRP_JSON(objRTFRecords, 'Set', 'ReturnToFabRecord', objRTF)
|
||||
SRP_JSON(objRTFRecords, 'Add', objRTF)
|
||||
SRP_JSON(objRTF, 'Release')
|
||||
end
|
||||
Next RTFRecordId
|
||||
|
||||
SRP_JSON(objWMOut, 'Set', 'ReturnToFabRecords', objRTFRecords)
|
||||
SRP_JSON(objRTFRecords, 'Release')
|
||||
end
|
||||
end else
|
||||
SRP_JSON(objWMOut, 'SetValue', 'ReturnToFabRecords', '')
|
||||
end
|
||||
CINos = {EPO_CI_NO}
|
||||
// Add a PSN object
|
||||
ProdSpecJSON = PSN_Services('ConvertRecordToJSON', {PS_NO})
|
||||
@ -235,7 +212,29 @@ Service ConvertRecordToJSON(KeyID, Record, ItemURL)
|
||||
SRP_JSON(objTemp, 'Release')
|
||||
SRP_JSON(objWOMatQA, 'Release')
|
||||
end
|
||||
AllRTFRecords = Return_To_Fab_Services('GetReturnToFabRecordIdByCassId', KeyID)
|
||||
If AllRTFRecords NE '' then
|
||||
objRTFRecords = ''
|
||||
If SRP_JSON(objRTFRecords, 'New', 'Array') then
|
||||
For each RTFRecordId in AllRTFRecords using @VM setting vPos
|
||||
objRTF = ''
|
||||
If SRP_JSON(objRTF, 'New', 'Object') then
|
||||
RTFRecord = Database_Services('ReadDataRow', 'RETURN_TO_FAB_LOTS', RTFRecordId, True$, 0, False$)
|
||||
SRP_JSON(objRTF, 'SetValue', 'ReturnToFabLotsId', RTFRecordId)
|
||||
SRP_JSON(objRTF, 'SetValue', 'StartDtm', OConv(RTFRecord<RETURN_TO_FAB_LOTS_MH_INIT_DTM$>, 'DT'))
|
||||
SRP_JSON(objRTF, 'SetValue', 'Completed', RTFRecord<RETURN_TO_FAB_LOTS_COMPLETED$>, 'Boolean')
|
||||
SRP_JSON(objRTFRecords, 'Set', 'ReturnToFabRecord', objRTF)
|
||||
SRP_JSON(objRTFRecords, 'Add', objRTF)
|
||||
SRP_JSON(objRTF, 'Release')
|
||||
end
|
||||
Next RTFRecordId
|
||||
|
||||
SRP_JSON(objWMOut, 'Set', 'ReturnToFabRecords', objRTFRecords)
|
||||
SRP_JSON(objRTFRecords, 'Release')
|
||||
end
|
||||
end else
|
||||
SRP_JSON(objWMOut, 'SetValue', 'ReturnToFabRecords', '')
|
||||
end
|
||||
SRP_JSON(objJSON, 'Set', 'wmOut', objWMOut)
|
||||
SRP_JSON(objWMOut, 'Release')
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user