Issue #3370 - Revert "Issue #3370 - Fix for mulitple shef types in same file."

This reverts commit 0d73c880f8b96034bf1f9b443aeb8dfcad2be382 [formerly 30655cf2ca] [formerly e3b7a99388 [formerly b5b61650d3] [formerly e3b7a99388 [formerly b5b61650d3] [formerly 30655cf2ca [formerly 0c0b14929f74f2262559a4919171623870139313]]]].


Former-commit-id: c8bfcd54a3 [formerly a35529bba4] [formerly c8bfcd54a3 [formerly a35529bba4] [formerly 73c75303a8 [formerly 43cbf77bb90ba12a6ee11bc35b18c226f9490a88]]]
Former-commit-id: 73c75303a8
Former-commit-id: 6b1031a927 [formerly 6f18256c56]
Former-commit-id: 08275089f5
This commit is contained in:
Mike Duff 2014-07-10 15:56:08 -05:00
parent 918b247d79
commit 327f695d0c

View file

@ -123,7 +123,6 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools;
* 05/28/2014 3222 mpduff Fix posting time to be processed time so db doesn't show all post times the same
* 06/02/2014 mpduff Fix for caching of range checks.
* 06/26/2014 3321 mpduff Fix ingestSwitchMap checks
* 07/10/2014 3370 mpduff Fix update/insert issue for riverstatus
* </pre>
*
* @author mduff
@ -275,6 +274,9 @@ public class PostShef {
/** Basis time TimeStamp */
private java.sql.Timestamp basisTimeAnsi = new Timestamp(basisBeginTime);
/** River status update flag. update if true */
private boolean riverStatusUpdateFlag = true;
/** river status update query value */
private boolean riverStatusUpdateValueFlag;
@ -1103,6 +1105,7 @@ public class PostShef {
// Reset .E cache vars
tsList.clear();
useLatest = MISSING;
riverStatusUpdateFlag = true;
qualityCheckFlag = true;
useTs = null;
basisTimeValues = null;
@ -1443,7 +1446,15 @@ public class PostShef {
if ((shefList != null) && (shefList.size() > 0)) {
ShefData maxShefDataValue = findMaxFcst(shefList);
riverStatusUpdateValueFlag = updateRiverStatus(lid, pe, ts);
if (shefRecord.getShefType() == ShefType.E) {
if (riverStatusUpdateFlag) {
riverStatusUpdateFlag = false;
riverStatusUpdateValueFlag = updateRiverStatus(lid, pe, ts);
}
} else {
riverStatusUpdateValueFlag = updateRiverStatus(lid, pe, ts);
}
postTables.postRiverStatus(shefRecord, maxShefDataValue,
riverStatusUpdateValueFlag);
} else {
@ -2146,8 +2157,10 @@ public class PostShef {
try {
if (!ingestSwitchMap.containsKey(key)) {
errorMsg.append("Error getting connection to IHFS Database");
sql = "select lid, pe, dur, ts, extremum, ts_rank, ingest, ofs_input, stg2_input from IngestFilter where lid = '"
+ locId + "'";
errorMsg.setLength(0);
errorMsg.append("Error requesting IngestFilter data: " + sql);
oa = dao.executeSQLQuery(sql);
if (oa.length > 0) {
@ -2183,7 +2196,6 @@ public class PostShef {
ingestSwitchMap.put(key, ingestSwitch);
}
matchFound = ingestSwitchMap.containsKey(key);
ingestSwitch = ingestSwitchMap.get(key);
/*
@ -2432,7 +2444,7 @@ public class PostShef {
if (!matchFound) {
log.warn(locId + " - " + data.getPhysicalElement() + "("
+ data.getDuration() + ")" + data.getTypeSource()
+ data.getExtremum() + " ingest filter not defined");
+ data.getExtremum() + " ingest " + "filter not defined");
stats.incrementWarningMessages();
ingestSwitch = ShefConstants.IngestSwitch.POST_PE_OFF;
}