Exemplardaten Bibliotheca 7100d 8011 8100 8515

This commit is contained in:
Felix Lohmeier 2020-10-06 23:30:58 +02:00
parent 9d41e26755
commit 79a4bb04e3
2 changed files with 857 additions and 2 deletions

View File

@ -915,6 +915,854 @@ else
fi
echo
# ----------------------------------- 8515 ----------------------------------- #
# spec_B_E_01
# nur für Bautzen und Dresden
echo "Ausleihhinweis 8515..."
if curl -fs \
--data project="${projects[$p]}" \
--data-urlencode "operations@-" \
"${endpoint}/command/core/apply-operations$(refine_csrf)" > /dev/null \
<< "JSON"
[
{
"op": "core/column-addition",
"engineConfig": {
"facets": [
{
"type": "list",
"name": "File",
"expression": "value",
"columnName": "File",
"invert": false,
"omitBlank": false,
"omitError": false,
"selection": [
{
"v": {
"v": "DD",
"l": "DD"
}
},
{
"v": {
"v": "BZ",
"l": "BZ"
}
}
],
"selectBlank": false,
"selectError": false
}
],
"mode": "row-based"
},
"baseColumnName": "E|AUHIN",
"expression": "grel:value",
"onError": "set-to-blank",
"newColumnName": "8515",
"columnInsertIndex": 3
}
]
JSON
then
log "transformed ${p} (${projects[$p]})"
else
error "transform ${p} (${projects[$p]}) failed!"
fi
echo
# ----------------------------------- 7100d ---------------------------------- #
# spec_B_E_04 und spec_B_E_05
echo "Exemplarstatus 7100d..."
if curl -fs \
--data project="${projects[$p]}" \
--data-urlencode "operations@-" \
"${endpoint}/command/core/apply-operations$(refine_csrf)" > /dev/null \
<< "JSON"
[
{
"op": "core/column-addition",
"engineConfig": {
"facets": [
{
"type": "list",
"name": "E|EXSTA",
"expression": "value",
"columnName": "E|EXSTA",
"invert": false,
"omitBlank": false,
"omitError": false,
"selection": [
{
"v": {
"v": "H",
"l": "H"
}
},
{
"v": {
"v": "I",
"l": "I"
}
},
{
"v": {
"v": "T",
"l": "T"
}
},
{
"v": {
"v": "U",
"l": "U"
}
},
{
"v": {
"v": "V",
"l": "V"
}
},
{
"v": {
"v": "v",
"l": "v"
}
},
{
"v": {
"v": "Z",
"l": "Z"
}
}
],
"selectBlank": false,
"selectError": false
}
],
"mode": "row-based"
},
"baseColumnName": "E|EXSTA",
"expression": "grel:'u'",
"onError": "set-to-blank",
"newColumnName": "7100d",
"columnInsertIndex": 3
},
{
"op": "core/text-transform",
"engineConfig": {
"facets": [
{
"type": "list",
"name": "E|EXSTA",
"expression": "value",
"columnName": "E|EXSTA",
"invert": false,
"omitBlank": false,
"omitError": false,
"selection": [
{
"v": {
"v": "A",
"l": "A"
}
}
],
"selectBlank": false,
"selectError": false
},
{
"type": "list",
"name": "File",
"expression": "value",
"columnName": "File",
"invert": false,
"omitBlank": false,
"omitError": false,
"selection": [
{
"v": {
"v": "PL",
"l": "PL"
}
}
],
"selectBlank": false,
"selectError": false
}
],
"mode": "row-based"
},
"columnName": "7100d",
"expression": "grel:'z'",
"onError": "keep-original",
"repeat": false,
"repeatCount": 10
},
{
"op": "core/text-transform",
"engineConfig": {
"facets": [
{
"type": "list",
"name": "E|EXSTA",
"expression": "value",
"columnName": "E|EXSTA",
"invert": false,
"omitBlank": false,
"omitError": false,
"selection": [
{
"v": {
"v": "A",
"l": "A"
}
}
],
"selectBlank": false,
"selectError": false
},
{
"type": "list",
"name": "File",
"expression": "value",
"columnName": "File",
"invert": false,
"omitBlank": false,
"omitError": false,
"selection": [
{
"v": {
"v": "DD",
"l": "DD"
}
}
],
"selectBlank": false,
"selectError": false
}
],
"mode": "row-based"
},
"columnName": "7100d",
"expression": "grel:'a'",
"onError": "keep-original",
"repeat": false,
"repeatCount": 10
},
{
"op": "core/text-transform",
"engineConfig": {
"facets": [
{
"type": "list",
"name": "E|EXSTA",
"expression": "value",
"columnName": "E|EXSTA",
"invert": false,
"omitBlank": false,
"omitError": false,
"selection": [
{
"v": {
"v": "B",
"l": "B"
}
}
],
"selectBlank": false,
"selectError": false
}
],
"mode": "row-based"
},
"columnName": "7100d",
"expression": "grel:'a'",
"onError": "keep-original",
"repeat": false,
"repeatCount": 10
},
{
"op": "core/text-transform",
"engineConfig": {
"facets": [
{
"type": "list",
"name": "E|EXSTA",
"expression": "value",
"columnName": "E|EXSTA",
"invert": false,
"omitBlank": false,
"omitError": false,
"selection": [
{
"v": {
"v": "G",
"l": "G"
}
}
],
"selectBlank": false,
"selectError": false
}
],
"mode": "row-based"
},
"columnName": "7100d",
"expression": "grel:'g'",
"onError": "keep-original",
"repeat": false,
"repeatCount": 10
},
{
"op": "core/text-transform",
"engineConfig": {
"facets": [
{
"type": "list",
"name": "E|EXSTA",
"expression": "value",
"columnName": "E|EXSTA",
"invert": false,
"omitBlank": false,
"omitError": false,
"selection": [
{
"v": {
"v": "K",
"l": "K"
}
}
],
"selectBlank": false,
"selectError": false
}
],
"mode": "row-based"
},
"columnName": "7100d",
"expression": "grel:'i'",
"onError": "keep-original",
"repeat": false,
"repeatCount": 10
},
{
"op": "core/text-transform",
"engineConfig": {
"facets": [
{
"type": "list",
"name": "E|EXSTA",
"expression": "value",
"columnName": "E|EXSTA",
"invert": false,
"omitBlank": false,
"omitError": false,
"selection": [
{
"v": {
"v": "N",
"l": "N"
}
}
],
"selectBlank": false,
"selectError": false
}
],
"mode": "row-based"
},
"columnName": "7100d",
"expression": "grel:'u'",
"onError": "keep-original",
"repeat": false,
"repeatCount": 10
},
{
"op": "core/text-transform",
"engineConfig": {
"facets": [
{
"type": "list",
"name": "E|EXSTA",
"expression": "value",
"columnName": "E|EXSTA",
"invert": false,
"omitBlank": false,
"omitError": false,
"selection": [
{
"v": {
"v": "P",
"l": "P"
}
}
],
"selectBlank": false,
"selectError": false
}
],
"mode": "row-based"
},
"columnName": "7100d",
"expression": "grel:'i'",
"onError": "keep-original",
"repeat": false,
"repeatCount": 10
},
{
"op": "core/text-transform",
"engineConfig": {
"facets": [
{
"type": "list",
"name": "E|EXSTA",
"expression": "value",
"columnName": "E|EXSTA",
"invert": false,
"omitBlank": false,
"omitError": false,
"selection": [
{
"v": {
"v": "W",
"l": "W"
}
}
],
"selectBlank": false,
"selectError": false
},
{
"type": "list",
"name": "File",
"expression": "value",
"columnName": "File",
"invert": false,
"omitBlank": false,
"omitError": false,
"selection": [
{
"v": {
"v": "PL",
"l": "PL"
}
}
],
"selectBlank": false,
"selectError": false
}
],
"mode": "row-based"
},
"columnName": "7100d",
"expression": "grel:'c'",
"onError": "keep-original",
"repeat": false,
"repeatCount": 10
},
{
"op": "core/text-transform",
"engineConfig": {
"facets": [
{
"type": "list",
"name": "E|EXSTA",
"expression": "value",
"columnName": "E|EXSTA",
"invert": false,
"omitBlank": false,
"omitError": false,
"selection": [
{
"v": {
"v": "W",
"l": "W"
}
}
],
"selectBlank": false,
"selectError": false
},
{
"type": "list",
"name": "File",
"expression": "value",
"columnName": "File",
"invert": false,
"omitBlank": false,
"omitError": false,
"selection": [
{
"v": {
"v": "DD",
"l": "DD"
}
}
],
"selectBlank": false,
"selectError": false
}
],
"mode": "row-based"
},
"columnName": "7100d",
"expression": "grel:'z'",
"onError": "keep-original",
"repeat": false,
"repeatCount": 10
},
{
"op": "core/text-transform",
"engineConfig": {
"facets": [
{
"type": "list",
"name": "E|EXSTA",
"expression": "value",
"columnName": "E|EXSTA",
"invert": false,
"omitBlank": false,
"omitError": false,
"selection": [
{
"v": {
"v": "W",
"l": "W"
}
}
],
"selectBlank": false,
"selectError": false
},
{
"type": "list",
"name": "File",
"expression": "value",
"columnName": "File",
"invert": false,
"omitBlank": false,
"omitError": false,
"selection": [
{
"v": {
"v": "BB",
"l": "BB"
}
}
],
"selectBlank": false,
"selectError": false
}
],
"mode": "row-based"
},
"columnName": "7100d",
"expression": "grel:'z'",
"onError": "keep-original",
"repeat": false,
"repeatCount": 10
},
{
"op": "core/text-transform",
"engineConfig": {
"facets": [
{
"type": "list",
"name": "E|EXSTA",
"expression": "value",
"columnName": "E|EXSTA",
"invert": false,
"omitBlank": false,
"omitError": false,
"selection": [
{
"v": {
"v": "w",
"l": "w"
}
}
],
"selectBlank": false,
"selectError": false
},
{
"type": "list",
"name": "File",
"expression": "value",
"columnName": "File",
"invert": false,
"omitBlank": false,
"omitError": false,
"selection": [
{
"v": {
"v": "BB",
"l": "BB"
}
}
],
"selectBlank": false,
"selectError": false
}
],
"mode": "row-based"
},
"columnName": "7100d",
"expression": "grel:'z'",
"onError": "keep-original",
"repeat": false,
"repeatCount": 10
},
{
"op": "core/text-transform",
"engineConfig": {
"facets": [
{
"type": "list",
"name": "E|EXSTA",
"expression": "value",
"columnName": "E|EXSTA",
"invert": false,
"omitBlank": false,
"omitError": false,
"selection": [
{
"v": {
"v": "E",
"l": "E"
}
}
],
"selectBlank": false,
"selectError": false
},
{
"type": "list",
"name": "E|ESORG",
"expression": "value",
"columnName": "E|ESORG",
"invert": false,
"omitBlank": false,
"omitError": false,
"selection": [
{
"v": {
"v": "P",
"l": "P"
}
}
],
"selectBlank": false,
"selectError": false
}
],
"mode": "row-based"
},
"columnName": "7100d",
"expression": "grel:'i'",
"onError": "keep-original",
"repeat": false,
"repeatCount": 10
},
{
"op": "core/text-transform",
"engineConfig": {
"facets": [
{
"type": "list",
"name": "E|EXSTA",
"expression": "value",
"columnName": "E|EXSTA",
"invert": false,
"omitBlank": false,
"omitError": false,
"selection": [
{
"v": {
"v": "E",
"l": "E"
}
}
],
"selectBlank": false,
"selectError": false
},
{
"type": "list",
"name": "E|ESORG",
"expression": "value",
"columnName": "E|ESORG",
"invert": false,
"omitBlank": false,
"omitError": false,
"selection": [
{
"v": {
"v": "W",
"l": "W"
}
}
],
"selectBlank": false,
"selectError": false
}
],
"mode": "row-based"
},
"columnName": "7100d",
"expression": "grel:'c'",
"onError": "keep-original",
"repeat": false,
"repeatCount": 10
},
{
"op": "core/text-transform",
"engineConfig": {
"facets": [
{
"type": "list",
"name": "E|EXSTA",
"expression": "value",
"columnName": "E|EXSTA",
"invert": false,
"omitBlank": false,
"omitError": false,
"selection": [
{
"v": {
"v": "E",
"l": "E"
}
}
],
"selectBlank": false,
"selectError": false
},
{
"type": "list",
"name": "7100d",
"expression": "isBlank(value)",
"columnName": "7100d",
"invert": false,
"omitBlank": false,
"omitError": false,
"selection": [
{
"v": {
"v": true,
"l": "true"
}
}
],
"selectBlank": false,
"selectError": false
}
],
"mode": "row-based"
},
"columnName": "7100d",
"expression": "grel:'u'",
"onError": "keep-original",
"repeat": false,
"repeatCount": 10
}
]
JSON
then
log "transformed ${p} (${projects[$p]})"
else
error "transform ${p} (${projects[$p]}) failed!"
fi
echo
# ----------------------------------- 8011 ----------------------------------- #
# spec_B_E_06
echo "Mediengruppe 8011..."
if curl -fs \
--data project="${projects[$p]}" \
--data-urlencode "operations@-" \
"${endpoint}/command/core/apply-operations$(refine_csrf)" > /dev/null \
<< "JSON"
[
{
"op": "core/column-addition",
"engineConfig": {
"facets": [],
"mode": "row-based"
},
"baseColumnName": "E|MEDGR",
"expression": "grel:'MEDGR: ' + value",
"onError": "set-to-blank",
"newColumnName": "8011",
"columnInsertIndex": 3
}
]
JSON
then
log "transformed ${p} (${projects[$p]})"
else
error "transform ${p} (${projects[$p]}) failed!"
fi
echo
# ----------------------------------- 8100 ----------------------------------- #
# spec_B_E_11 und spec_B_E_12
echo "Zugangsnummer 8100..."
if curl -fs \
--data project="${projects[$p]}" \
--data-urlencode "operations@-" \
"${endpoint}/command/core/apply-operations$(refine_csrf)" > /dev/null \
<< "JSON"
[
{
"op": "core/column-addition",
"engineConfig": {
"facets": [],
"mode": "row-based"
},
"baseColumnName": "E|ZUNR",
"expression": "grel:cells['File'].value + ' ' + value.replace('-','/')",
"onError": "set-to-blank",
"newColumnName": "8100",
"columnInsertIndex": 3
},
{
"op": "core/text-transform",
"engineConfig": {
"facets": [
{
"type": "text",
"name": "E|ZUS",
"columnName": "E|ZUS",
"query": "Notation",
"mode": "text",
"caseSensitive": false,
"invert": false
}
],
"mode": "row-based"
},
"columnName": "8100",
"expression": "grel:value + ' ' + cells['E|ZUS'].value.replace('Notation||','')",
"onError": "keep-original",
"repeat": false,
"repeatCount": 10
}
]
JSON
then
log "transformed ${p} (${projects[$p]})"
else
error "transform ${p} (${projects[$p]}) failed!"
fi
echo
# ================================== EXPORT ================================== #
checkpoint "Export"; echo
@ -952,7 +1800,11 @@ with(
'7100B',
'7100f',
'7100a',
'7100d',
'8011',
'8100',
'8200',
'8515',
'E0XX',
'E0XXb'
],

View File

@ -542,8 +542,11 @@ if(row.index - row.record.fromRowIndex == 0,
if(isNonBlank(cells['7100f'].value),
with(with(rowIndex - row.record.fromRowIndex + 1, i, '00'[0,2-i.length()] + i),exnr,
'208@/' + exnr + ' a' + cells['E0XX'].value + 'bn' + cells['E0XXb'].value + '\n'
+ '209A/' + exnr + ' B' + cells['7100B'].value + 'f' + cells['7100f'].value + forNonBlank(cells['7100a'].value, v, 'a' + v, '') + 'x00' + '\n'
+ forNonBlank(cells['8200'].value, v, '209C/' + exnr + ' a' + v + '\n', '')
+ '209A/' + exnr + ' B' + cells['7100B'].value + 'f' + cells['7100f'].value + forNonBlank(cells['7100a'].value, v, 'a' + v, '') + forNonBlank(cells['7100d'].value, v, 'd' + v, '') + 'x00' + '\n'
+ forNonBlank(cells['8011'].value, v, '209B/' + exnr + ' a' + v + 'x11' + '\n', '')
+ forNonBlank(cells['8100'].value, v, '209C/' + exnr + ' a' + v + '\n', '')
+ forNonBlank(cells['8200'].value, v, '209G/' + exnr + ' a' + v + '\n', '')
+ forNonBlank(cells['8515'].value, v, '220B/' + exnr + ' a' + v + '\n', '')
), '')
}}
TEMPLATE