ASM #15039 add a fix to be able to post data to hour24 column

Change-Id: I84024781f01995a0473cd2892e28743a41065112

Former-commit-id: e22940640258eb22eac9ab6bbecdf65cc53a441a
This commit is contained in:
Loubna.Bousaidi 2015-06-30 19:04:40 +00:00
parent 7788905e20
commit daed91ed14
2 changed files with 21 additions and 2 deletions

View file

@ -54,8 +54,9 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools;
* 02 Feb 2012 #15845 lbousaidi added check for data that comes in as -999 * 02 Feb 2012 #15845 lbousaidi added check for data that comes in as -999
* 07 May 2013 #15880 lbousaidi changed pPE parameter because it was inserting to the * 07 May 2013 #15880 lbousaidi changed pPE parameter because it was inserting to the
* wrong hour field. * wrong hour field.
* 15 Sep 2014 #17129 lbousaidi add a fix for the top of hour issue for hourlypp. * 15 Sep 2014 #17129 lbousaidi add a fix for the top of hour issue for hourlypp.
* 18 Sep 2014 #3627 mapeters Updated deprecated {@link TimeTools} usage. * 18 Sep 2014 #3627 mapeters Updated deprecated {@link TimeTools} usage.
* 15 Jun 2015 #15039 lbousaidi add a fix to be able to post data to hour24.
* </pre> * </pre>
* *
* @author mnash * @author mnash
@ -573,7 +574,8 @@ public class GagePP {
dt.add(Calendar.HOUR_OF_DAY, 1); dt.add(Calendar.HOUR_OF_DAY, 1);
rec.setObsTime(dt.getTime()); rec.setObsTime(dt.getTime());
} }
if (hour == 0) {
if (hour == 24 || hour == 0) {
// hour = 24; // hour = 24;
dt.add(Calendar.DAY_OF_YEAR, -1); dt.add(Calendar.DAY_OF_YEAR, -1);
rec.setObsTime(dt.getTime()); rec.setObsTime(dt.getTime());

View file

@ -21,6 +21,21 @@ import com.raytheon.uf.common.ohd.AppsDefaults;
import com.raytheon.uf.edex.database.dao.CoreDao; import com.raytheon.uf.edex.database.dao.CoreDao;
import com.raytheon.uf.edex.database.dao.DaoConfig; import com.raytheon.uf.edex.database.dao.DaoConfig;
/**
*
*
* <pre>
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 15 Jun 2015 #15039 lbousaidi add case 24 to be able to post data to hour24.
* </pre>
*
* @author
* @version
*/
public abstract class PrecipUtils { public abstract class PrecipUtils {
private static final float MISSING_PRECIP = -9999f; private static final float MISSING_PRECIP = -9999f;
@ -233,6 +248,7 @@ public abstract class PrecipUtils {
break; break;
case 0: case 0:
case 24:
pHourly.setHour24(precip_value); pHourly.setHour24(precip_value);
break; break;
default: default:
@ -323,6 +339,7 @@ public abstract class PrecipUtils {
precip_value = pHourlyPP.getHour23(); precip_value = pHourlyPP.getHour23();
break; break;
case 0: case 0:
case 24:
precip_value = pHourlyPP.getHour24(); precip_value = pHourlyPP.getHour24();
break; break;
default: default: