Mercurial > lada > lada-server
changeset 897:67c3d22372e4
Add the initial status to generated messung objects.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Mon, 14 Mar 2016 10:15:43 +0100 |
parents | c94a07959060 |
children | 9293d37c65f7 |
files | src/main/java/de/intevation/lada/factory/ProbeFactory.java |
diffstat | 1 files changed, 12 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/factory/ProbeFactory.java Mon Mar 14 10:15:06 2016 +0100 +++ b/src/main/java/de/intevation/lada/factory/ProbeFactory.java Mon Mar 14 10:15:43 2016 +0100 @@ -7,7 +7,6 @@ */ package de.intevation.lada.factory; -import java.math.BigInteger; import java.sql.Timestamp; import java.util.ArrayList; import java.util.Calendar; @@ -21,6 +20,7 @@ import de.intevation.lada.model.land.LMesswert; import de.intevation.lada.model.land.LOrtszuordnung; import de.intevation.lada.model.land.LProbe; +import de.intevation.lada.model.land.LStatusProtokoll; import de.intevation.lada.model.land.Messprogramm; import de.intevation.lada.model.land.MessprogrammMmt; import de.intevation.lada.model.land.MessungTranslation; @@ -198,6 +198,17 @@ MessungTranslation mTranslation = new MessungTranslation(); mTranslation.setMessungsId(messung); repository.create(mTranslation, "land"); + + LStatusProtokoll status = new LStatusProtokoll(); + status.setDatum(new Timestamp(new Date().getTime())); + status.setMessungsId(messung.getId()); + status.setErzeuger(probe.getMstId()); + status.setStatusStufe(1); + status.setStatusWert(0); + repository.create(status, "land"); + messung.setStatus(status.getId()); + repository.update(messung, "land"); + for (int mw : mmt.getMessgroessen()) { LMesswert wert = new LMesswert(); wert.setMessgroesseId(mw);