WellTest class no longer depends on Well class

This will allow it to be run from another thread if necessary
This commit is contained in:
Patrick McDonagh
2017-02-07 19:09:32 -06:00
parent 2a13a25f06
commit 1771df0730
3 changed files with 76 additions and 85 deletions

View File

@@ -129,7 +129,8 @@ public class POC implements Runnable{
if (newWellTest){
System.out.println("Previous kFactor = " + thisWell.db.getLatestKFactor());
Date nowDate = Date.from(Instant.now());
thisWell.wellTest = new WellTest(nowDate, 24.0, .35, .20, .15, 1.25, thisWell);
double lastProductionMeasured = thisWell.db.getPreviousDailyTotal(nowDate);
thisWell.wellTest = new WellTest(nowDate, 24.0, .35, .20, .15, 1.25, lastProductionMeasured);
thisWell.db.newWellTest(thisWell.wellTest);
System.out.println("Well Test @ " + nowDate.toString());
System.out.println("kFactor: " + thisWell.wellTest.getkFactor());