changeset 1190:69865fa2292f

Add MPL to Messprogramm
author Evi Huber <ehuber@bfs.de>
date Fri, 25 Nov 2016 10:29:18 +0100
parents 4ee336c65ab3 (diff) 1bc8ab13e1f7 (current diff)
children 3923b41f8783
files
diffstat 5 files changed, 17 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/db_schema/lada_data.sql	Fri Nov 25 09:37:39 2016 +0100
+++ b/db_schema/lada_data.sql	Fri Nov 25 10:29:18 2016 +0100
@@ -250,7 +250,7 @@
 
 ALTER TABLE messprogramm DISABLE TRIGGER ALL;
 
-COPY messprogramm (id, test, mst_id, labor_mst_id, datenbasis_id, ba_id, gem_id, ort_id, media_desk, umw_id, probenart_id, probenintervall, teilintervall_von, teilintervall_bis, intervall_offset, gueltig_von, gueltig_bis, probe_nehmer_id, probe_kommentar, letzte_aenderung) FROM stdin;
+COPY messprogramm (id, test, mst_id, labor_mst_id, datenbasis_id, ba_id, gem_id, ort_id, media_desk, mpl_Id, umw_id, probenart_id, probenintervall, teilintervall_von, teilintervall_bis, intervall_offset, gueltig_von, gueltig_bis, probe_nehmer_id, probe_kommentar, letzte_aenderung) FROM stdin;
 \.
 
 
--- a/db_schema/lada_schema.sql	Fri Nov 25 09:37:39 2016 +0100
+++ b/db_schema/lada_schema.sql	Fri Nov 25 10:29:18 2016 +0100
@@ -162,6 +162,7 @@
     gueltig_von integer NOT NULL CHECK(gueltig_von BETWEEN 1 AND 365),
     gueltig_bis integer NOT NULL CHECK(gueltig_bis BETWEEN 1 AND 365),
     probe_nehmer_id integer REFERENCES stammdaten.probenehmer,
+    mpl_id integer REFERENCES stammdaten.messprogramm_kategorie,
     probe_kommentar character varying(80),
     letzte_aenderung timestamp without time zone DEFAULT now() NOT NULL,
     CHECK (probenintervall = 'J'
--- a/src/main/java/de/intevation/lada/model/land/Messprogramm.java	Fri Nov 25 09:37:39 2016 +0100
+++ b/src/main/java/de/intevation/lada/model/land/Messprogramm.java	Fri Nov 25 10:29:18 2016 +0100
@@ -77,6 +77,9 @@
     @Column(name="ort_id")
     private Integer ortId;
 
+    @Column(name="mpl_id")
+    private Integer mplId;
+
     @Column(name="probe_kommentar")
     private String probeKommentar;
 
@@ -206,6 +209,14 @@
         this.ortId = ortId;
     }
 
+    public Integer getMplId() {
+        return this.mplId;
+    }
+
+    public void setMplId(Integer mplId) {
+        this.mplId = mplId;
+    }
+
     public String getProbeKommentar() {
         return this.probeKommentar;
     }
--- a/src/main/java/de/intevation/lada/rest/MessprogrammService.java	Fri Nov 25 09:37:39 2016 +0100
+++ b/src/main/java/de/intevation/lada/rest/MessprogrammService.java	Fri Nov 25 10:29:18 2016 +0100
@@ -63,6 +63,7 @@
  *      "letzteAenderung": [timestamp],
  *      "mediaDesk": [string],
  *      "mstId": [string],
+ *      "mplId": [number],
  *      "name": [string],
  *      "netzbetreiberId": [string],
  *      "ortId": [string],
@@ -209,6 +210,7 @@
      *  "gemId": [string],
      *  "ortId": [string],
      *  "mediaDesk": [string],
+     *  "mplId": [number],
      *  "umwId": [string],
      *  "probenartId": [number],
      *  "probenintervall": [string],
@@ -277,6 +279,7 @@
      *  "datenbasisId": [number],
      *  "baId": [string],
      *  "gemId": [string],
+     *  "mplId": [number],
      *  "ortId": [string],
      *  "mediaDesk": [string],
      *  "umwId": [string],
--- a/src/test/resources/datasets/messprogramm.json	Fri Nov 25 09:37:39 2016 +0100
+++ b/src/test/resources/datasets/messprogramm.json	Fri Nov 25 10:29:18 2016 +0100
@@ -10,6 +10,7 @@
     "mstId": "06010",
     "laborMstId": "06010",
     "name": "Test 1",
+    "mplId": null,
     "ortId": null,
     "probeKommentar": null,
     "probeNehmerId": null,
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)