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