From 22e4ed4213e289e11f354b6616e0fb4a44172c4c Mon Sep 17 00:00:00 2001 From: Felix Lohmeier Date: Wed, 12 Aug 2020 16:31:36 +0200 Subject: [PATCH] =?UTF-8?q?Verbuchungsnummer=208200=20aus=20BARCO=20und=20?= =?UTF-8?q?Pr=C3=A4fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tasks/02-bibliotheca-main.sh | 41 ++++++++++++++++++++++++++++++++++++ tasks/03-ba-sachsen.sh | 2 ++ 2 files changed, 43 insertions(+) diff --git a/tasks/02-bibliotheca-main.sh b/tasks/02-bibliotheca-main.sh index d1de6cb..d816174 100755 --- a/tasks/02-bibliotheca-main.sh +++ b/tasks/02-bibliotheca-main.sh @@ -680,6 +680,47 @@ else fi echo +# --------------------------------- 16 8200 ---------------------------------- # + +# spec_B_E_02 +echo "Verbuchungsnummer 4000..." +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": "text", + "name": "M|HST", + "columnName": "M|HST", + "query": "¬", + "mode": "text", + "caseSensitive": false, + "invert": false + } + ], + "mode": "row-based" + }, + "baseColumnName": "E|BARCO", + "expression": "grel:cells['File'].value + value", + "onError": "set-to-blank", + "newColumnName": "8200", + "columnInsertIndex": 3 + } + ] +JSON +then + log "transformed ${p} (${projects[$p]})" +else + error "transform ${p} (${projects[$p]}) failed!" +fi +echo + # ================================== EXPORT ================================== # checkpoint "Export"; echo diff --git a/tasks/03-ba-sachsen.sh b/tasks/03-ba-sachsen.sh index 7b6d16c..8a67014 100755 --- a/tasks/03-ba-sachsen.sh +++ b/tasks/03-ba-sachsen.sh @@ -478,12 +478,14 @@ if(row.index - row.record.fromRowIndex == 0, + forNonBlank(cells['2000'].value, v, forEach(v.split('␟'),x,'004A' + ' 0' + x + '\n').join(''), '') + forNonBlank(cells['2199'].value, v, '006Y' + ' 0' + v + '\n', '') + forNonBlank(cells['4000'].value, v, '021A' + ' a' + v + '\n', '') ++ forNonBlank(cells['8200'].value, v, '021A' + ' a' + v + '\n', '') ,'') }}{{ 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' ++ '209C/' + exnr + ' a' + cells['8200'].value + '\n' ), '') }} TEMPLATE