Fluid Shots can be entered and stored in the database

This commit is contained in:
Patrick McDonagh
2017-02-10 14:39:45 -06:00
parent 0c6e09a6a4
commit 5b060cf6af
4 changed files with 69 additions and 7 deletions

View File

@@ -54,6 +54,12 @@ class CLScanner implements Runnable {
System.out.println("showtotals -- Gets the current totals and averages");
System.out.println("exit -- Quits the program");
System.out.println("");
System.out.println("TO ADD A NEW WELL TEST:");
System.out.println("welltest <timestamp> <test hours> <total fluid BBL> <oil BBL> <water BBL> <gas MCF>");
System.out.println("");
System.out.println("TO ADD A NEW FLUID SHOT:");
System.out.println("fluidshot <fluidlevel>");
System.out.println("");
}
@@ -99,6 +105,13 @@ class CLScanner implements Runnable {
);
poc.thisWell.db.newWellTest(poc.thisWell.wellTest);
poc.thisWell.wellTest.print();
} else if(input.startsWith("fluidshot")){
String[] shotParams = input.split(" ");
FluidShot fs = new FluidShot(Double.parseDouble(shotParams[1]), poc.thisWell.getFluidGradient(),
poc.thisWell.cardStorage[0].getDownholeLoadSpan(), poc.thisWell.getRodDepthTotal(),
poc.thisWell.getPumpArea());
poc.thisWell.db.newFluidShot(fs);
poc.thisWell.setFrictionEstimate(fs.getFrictionEstimate());
} else {
help();
}