|
|
|
@ -86,15 +86,9 @@ class SharePointRequestHandler |
|
|
|
|
|
|
|
|
|
|
|
// Build notes — pack all extra info that doesn't have its own schema field. |
|
|
|
// Build notes — pack all extra info that doesn't have its own schema field. |
|
|
|
$notes_parts = []; |
|
|
|
$notes_parts = []; |
|
|
|
if (!empty($genre)) { |
|
|
|
|
|
|
|
$notes_parts[] = 'Format: ' . $genre; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (!empty($biblio['ArticleTitle'])) { |
|
|
|
if (!empty($biblio['ArticleTitle'])) { |
|
|
|
$notes_parts[] = 'Article/Chapter: ' . $biblio['ArticleTitle']; |
|
|
|
$notes_parts[] = 'Article/Chapter: ' . $biblio['ArticleTitle']; |
|
|
|
} |
|
|
|
} |
|
|
|
if (!empty($biblio['Date'])) { |
|
|
|
|
|
|
|
$notes_parts[] = 'Year: ' . $biblio['Date']; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (!empty($biblio['Volume'])) { |
|
|
|
if (!empty($biblio['Volume'])) { |
|
|
|
$notes_parts[] = 'Vol: ' . $biblio['Volume']; |
|
|
|
$notes_parts[] = 'Vol: ' . $biblio['Volume']; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -107,9 +101,6 @@ class SharePointRequestHandler |
|
|
|
if (!empty($patron['patron_type'])) { |
|
|
|
if (!empty($patron['patron_type'])) { |
|
|
|
$notes_parts[] = 'Patron Type: ' . $patron['patron_type']; |
|
|
|
$notes_parts[] = 'Patron Type: ' . $patron['patron_type']; |
|
|
|
} |
|
|
|
} |
|
|
|
if (!empty($patron['campus_id'])) { |
|
|
|
|
|
|
|
$notes_parts[] = 'Campus ID: ' . $patron['campus_id']; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (!empty($patron['Department'])) { |
|
|
|
if (!empty($patron['Department'])) { |
|
|
|
$notes_parts[] = 'Dept: ' . $patron['Department']; |
|
|
|
$notes_parts[] = 'Dept: ' . $patron['Department']; |
|
|
|
} |
|
|
|
} |
|
|
|
@ -122,12 +113,12 @@ class SharePointRequestHandler |
|
|
|
return [ |
|
|
|
return [ |
|
|
|
'title' => (string)($biblio['Title'] ?? ''), |
|
|
|
'title' => (string)($biblio['Title'] ?? ''), |
|
|
|
'author' => (string)$author, |
|
|
|
'author' => (string)$author, |
|
|
|
|
|
|
|
'year' => (string)($biblio['Date'] ?? ''), |
|
|
|
'doi_isbn' => (string)$doi_isbn, |
|
|
|
'doi_isbn' => (string)$doi_isbn, |
|
|
|
'callNumber' => (string)($patron['campus_id'] ?? ''), |
|
|
|
'format' => (string)$genre, |
|
|
|
'year' => '2023', |
|
|
|
'patronName' => (string)$patron_name, |
|
|
|
'instName' => (string)$patron_name, |
|
|
|
'patronEmail' => (string)($patron['DeliveryAddress'] ?? ''), |
|
|
|
'instEmail' => (string)($patron['DeliveryAddress'] ?? ''), |
|
|
|
'patronBarcode' => (string)($patron['campus_id'] ?? ''), |
|
|
|
'shippingAddr' => (string)($patron['Department'] ?? ''), |
|
|
|
|
|
|
|
'notes' => (string)implode(' | ', $notes_parts), |
|
|
|
'notes' => (string)implode(' | ', $notes_parts), |
|
|
|
'submittedAt' => (string)gmdate('Y-m-d\TH:i:s') . '.000Z', |
|
|
|
'submittedAt' => (string)gmdate('Y-m-d\TH:i:s') . '.000Z', |
|
|
|
]; |
|
|
|
]; |
|
|
|
|