610 ELO-DMS ankoppeln » Historie » Version 10
[X] Marcus F, 08.10.2018 13:59
1 | 1 | [X] Daniel S | h1. ELO |
---|---|---|---|
2 | |||
3 | 5 | [X] Daniel S | h2. Ansatz |
4 | 1 | [X] Daniel S | |
5 | 5 | [X] Daniel S | h3. Algorithmus |
6 | |||
7 | 6 | [X] Daniel S | * #9146: Eingangs- und Ausgangsrechung > Anbindung ELO und Ablauf |
8 | 10 | [X] Marcus F | * #9153: ELO: PRODAT-DMS Strukturerweiterungen: Externe DMS Id, Spalte(n) für Änderungsstatus |
9 | * #9154: ELO: Abfrage / Funktion: gib mir alle geänderten PRODAT-Dokumente + Schlagworte @tdms.picndoku__fetch__metadata@ |
||
10 | * #9155: ELO: Funktion, welche die ELO-ID an PRODAT zurückgibt |
||
11 | * #9164: ELO: Funktion, welche die Änderungsübernahme in PRODAT zurückschreibt |
||
12 | 5 | [X] Daniel S | |
13 | 1 | [X] Daniel S | h2. Funktionen und Bsp-Aufrufe |
14 | |||
15 | 4 | [X] Daniel S | #9145 |
16 | 3 | [X] Daniel S | |
17 | 1 | [X] Daniel S | * SELECT * FROM TDMS.External_DMS__get_Documents WHERE is_updated_or_new; |
18 | 2 | [X] Daniel S | + Ansatz: bei Änderung von Schlagwort oder am Dokument wird @TIMESTAMP "pd_external_dms_updated"@ gesetzt |
19 | + alle neuen oder geänderten Dokumente |
||
20 | + Änderung von Schlagwort, Änderung |
||
21 | + @(pd_external_dms_updated IS NOT NULL OR pd_external_dms_id IS NULL) AS is_updated_or_new@ |
||
22 | 1 | [X] Daniel S | * TDMS.External_DMS__get_Keywords(pd_id) |
23 | * TDMS.External_DMS__set_ID(pd_id, external_id) |
||
24 | 2 | [X] Daniel S | + ELO-ID an PRODAT DMS |
25 | + Achtung, @TDMS.External_DMS__reset_Updated(pd_id)@ muß aufgerufen werden, wenn vollständig (zB Keyowrds noch übernommen) |
||
26 | 1 | [X] Daniel S | * TDMS.External_DMS__reset_Updated(pd_id) |
27 | 2 | [X] Daniel S | + @TIMESTAMP "pd_external_dms_updated"@ wird zurückgesetzt (NULL) |
28 | 1 | [X] Daniel S | |
29 | Achtung: Zugriff des ELO nur über DMS-User "ELO". |
||
30 | Mindestens TDMS.External_DMS__set_ID und TDMS.External_DMS__reset_Updated müssen mit DMS-User ausgeführt werden. |
||
31 | |||
32 | |||
33 | 7 | [E] Frank S | <pre><code class="sql"> |
34 | 9 | [X] Marcus F | SELECT -- Beispielaufruf |
35 | * |
||
36 | FROM |
||
37 | TDMS.external_dms__get_documents JOIN LATERAL tdms.picndoku__fetch__metadata(pd_id) ON true |
||
38 | JOIN LATERAL tdms.external_dms__adk(picndoku__fetch__metadata->>'adkrz') ON true |
||
39 | WHERE is_updated_or_new |
||
40 | </code></pre> |
||
41 | |||
42 | |||
43 | <pre><code class="sql"> |
||
44 | 7 | [E] Frank S | SELECT * FROM TDMS.External_DMS__get_Documents; -- "geänderte" Dokumente auslesen ... |
45 | SELECT * FROM TDMS.External_DMS__get_Documents WHERE is_updated_or_new; |
||
46 | SELECT * FROM TDMS.External_DMS__get_Documents WHERE is_updated_or_new AND pd_external_dms_id IS NOT NULL; |
||
47 | SELECT * FROM TDMS.External_DMS__get_Documents WHERE pd_external_dms_id = "external_id"; |
||
48 | SELECT TDMS.External_DMS__set_ID(pd_id, "external_id"); -- externe ID speichern |
||
49 | SELECT TDMS.External_DMS__reset_Updated(pd_id); -- Änderungsstatus zurücksetzen |
||
50 | SELECT * FROM TDMS.External_DMS__get_Keywords(pd_id); -- Schlüsselworte auslesen |
||
51 | SELECT TDMS.External_DMS__get_RemoteFilename(pd_id, True); -- "internen" Dateinamen auslesen (siehe auch TDMS.External_DMS__get_Documents pd_dmsremotefile) |
||
52 | 1 | [X] Daniel S | |
53 | 7 | [E] Frank S | --TDMS.External_DMS__get_Documents |
54 | pd_external_dms_id, -- document ID in external DMS |
||
55 | pd_external_dms_updated, -- last changed at |
||
56 | pd_external_dms_changed, -- what has changed (file, annotation, recinfo, keyword) |
||
57 | is_updated_or_new, -- . |
||
58 | is_linked, -- document is linked |
||
59 | pd_dmsremotefile, -- internal file name |
||
60 | |||
61 | pd_revision_id, -- revision (related documents with the same ID) |
||
62 | pd_revision_count, -- count of revisions |
||
63 | pd_revision_pos, -- position in revisions |
||
64 | pd_revision_pdids, -- list of all pd_id of this revision |
||
65 | pd_deletable, -- hidden / deleted (e.g. older revision) |
||
66 | pd_dmscomment, -- has comment/stamp/annotaions on file |
||
67 | |||
68 | pd_id, -- document ID in PRODAT |
||
69 | pd_path, -- caption |
||
70 | pd_txt, -- comment |
||
71 | pd_doktype, -- document type (classification) |
||
72 | pd_external_doktype, -- different from pd_doktype if document type changed, but file has not been moved yet |
||
73 | pd_tablename, pd_dbrid, pd_dokident, -- owner |
||
74 | pd_source, -- file origin (print, scan, file, camera, bi, image, ...) |
||
75 | pd_date, -- date of printing or import |
||
76 | pd_modified -- modified date</code></pre> |
||
77 | </code></pre> |
||
78 | 5 | [X] Daniel S | |
79 | h2. Weitere Funktionen |
||
80 | |||
81 | * TDMS.External_DMS__adk(IN VARCHAR) > Adressdaten, IN: Adresskurzname aus PRODAT (adk) |
||
82 | + Kundennummer > a1_knr |
||
83 | + Lieferantennummer > a2_knr |
||
84 | + AdresseName (Für Ordner) > adressename |