Merge "ASM #634 - Missing Data not getting into HML file" into asm_14.4.1

Former-commit-id: 08bac3a76f734a7acc543069bcc73969e2c02ccd
This commit is contained in:
Juliya Dynina 2014-12-09 08:04:00 -05:00 committed by Gerrit Code Review
commit 669525e06d
2 changed files with 8 additions and 35 deletions

View file

@ -72,7 +72,9 @@ import com.raytheon.viz.hydrocommon.util.DbUtils;
* Feb 22 2013 14676 lbousaidi check when producttime is null
* Mar 25, 2013 1781 mpduff Constrain time series table query with a start time.
* May 12 2014 16705 lbousaidi update revision and shef_qual_code in edit routine.
* </pre>
* Dec 14, 2014 16388 xwei updated the insertion of rejecteddata table.
*
</pre>
*
* @author dhladky
* @version 1.0
@ -946,11 +948,10 @@ public class TimeSeriesDataManager extends HydroDataManager {
for (ForecastData dr : deleteList) {
int probability = -1;
int revision = 0;
if (dr.getTs().toUpperCase().startsWith("F")
|| dr.getTs().toUpperCase().startsWith("C")) {
int revision = 1;
if ( dr.getTs().toUpperCase().startsWith("F") || dr.getTs().toUpperCase().startsWith("C") ) {
probability = 0;
revision = 1;
}
Date productTime = dr.getProductTime();
@ -1196,36 +1197,6 @@ public class TimeSeriesDataManager extends HydroDataManager {
sql.setWhereClause(where.toString());
if (data.getValue() == HydroConstants.MISSING_VALUE) {
DataRecord dr = new DataRecord();
Date productTime = data.getProductTime();
if (productTime == null) {
productTime = now;
}
dr.setDur(data.getDur());
dr.setExt(data.getExtremum().toUpperCase());
dr.setLid(data.getLid());
dr.setObsTime(data.getObsTime());
dr.setPe(data.getPe().toUpperCase());
dr.setPostingTime(now);
dr.setQualityCode(TimeSeriesUtil.DEFAULT_QC_VALUE);
dr.setRevision(data.getRevision());
dr.setShefQualCode("M");
dr.setTs(data.getTs().toUpperCase());
dr.setValue(data.getPreviousValue());
dr.setProductTime(productTime);
dr.setProductId(data.getProductID());
if (data.getValidTime() != null) {
dr.setValidTime(data.getValidTime());
dr.setBasisTime(dateFormat.format(data.getBasisTime()));
} else {
dr.setValidTime(data.getObsTime());
}
insertRejectedData(dr);
}
AppsDefaults ad = AppsDefaults.getInstance();
boolean debug = ad.getBoolean(HydroConstants.DEBUG_HYDRO_DB_TOKEN,
false);

View file

@ -94,6 +94,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
* 30 Jan 2012 15459 mpduff Redmine 1560 - Make graph canvases redraw on page up/down.
* 06 Feb 2013 1578 rferrel Code cleanup for non-blocking dialogs.
* 24 Apr 2013 1921 mpduff Fix zoom reset to only reset the "active" graph
* 14 May 2014 16388 xwei updated the insertion of rejecteddata table.
*
* </pre>
*
@ -888,6 +889,7 @@ public class TimeSeriesDisplayDlg extends CaveSWTDialog {
if (editList.size() > 0) {
try {
dataManager.insertRejectedData(editList);
dataManager.edit(editList);
updateMaxFcst(editList);
} catch (VizException e) {