Commit 65e29ee2 by Yashvant Kantival

Year 1 NGPL - MDB Issue

parent 3644e09b
...@@ -35,6 +35,7 @@ public class NGPAtoNGPLCalcServiceImpl implements NGPAtoNGPLCalcService { ...@@ -35,6 +35,7 @@ public class NGPAtoNGPLCalcServiceImpl implements NGPAtoNGPLCalcService {
String[] basicStringArrayOperation1 = {"Year_1_NGPA","Year_1_NGPL","Year_1_Total","Year_2_4_Validated_NGPAs"}; String[] basicStringArrayOperation1 = {"Year_1_NGPA","Year_1_NGPL","Year_1_Total","Year_2_4_Validated_NGPAs"};
JSONObject basicJSONOperation = new JSONObject(); JSONObject basicJSONOperation = new JSONObject();
JSONObject basicJSONOperation1 = new JSONObject(); JSONObject basicJSONOperation1 = new JSONObject();
JSONObject basicJSONOperation2 = new JSONObject();
JSONArray basicJSONArrayOperation = new JSONArray(); JSONArray basicJSONArrayOperation = new JSONArray();
double fycPersantage = 25; double fycPersantage = 25;
...@@ -149,29 +150,31 @@ public class NGPAtoNGPLCalcServiceImpl implements NGPAtoNGPLCalcService { ...@@ -149,29 +150,31 @@ public class NGPAtoNGPLCalcServiceImpl implements NGPAtoNGPLCalcService {
// basicStringOperation = "[{\"180000\":25000,\"360000\":25000,\"720000\":25000,\"1440000\":25000,\"MPB\":2},{\"180000\":25000,\"360000\":50000,\"720000\":50000,\"1440000\":50000,\"MPB\":3},{\"180000\":25000,\"360000\":50000,\"720000\":75000,\"1440000\":75000,\"MPB\":4},{\"180000\":25000,\"360000\":50000,\"720000\":75000,\"1440000\":100000,\"MPB\":5}]"; // basicStringOperation = "[{\"180000\":25000,\"360000\":25000,\"720000\":25000,\"1440000\":25000,\"MPB\":2},{\"180000\":25000,\"360000\":50000,\"720000\":50000,\"1440000\":50000,\"MPB\":3},{\"180000\":25000,\"360000\":50000,\"720000\":75000,\"1440000\":75000,\"MPB\":4},{\"180000\":25000,\"360000\":50000,\"720000\":75000,\"1440000\":100000,\"MPB\":5}]";
basicJSONArrayOperation = leaderCalcConfig.getValue("mdb"); basicJSONArrayOperation = leaderCalcConfig.getValue("mdb");
for( i=0;i<basicJSONArrayOperation.length();i++ ) { for( i=0;i<basicJSONArrayOperation.length();i++ ) {
if( i == 1 ) { if ( basicJSONArrayOperation.getJSONObject(i).getDouble("MDB") == 2 ) {
basicDoubleOperation = 2;
}
else {
basicDoubleOperation = 4;
}
if ( basicJSONArrayOperation.getJSONObject(i).getDouble("MDB") == basicDoubleOperation ) {
basicJSONOperation1 = basicJSONArrayOperation.getJSONObject(i); basicJSONOperation1 = basicJSONArrayOperation.getJSONObject(i);
break; } else if ( basicJSONArrayOperation.getJSONObject(i).getDouble("MDB") == 4 ) {
basicJSONOperation2 = basicJSONArrayOperation.getJSONObject(i);
} }
} }
metricsTable[1][7] = Math.round( metricsTable[1][7] / metricsTable[1][0] ); metricsTable[1][7] = Math.round( metricsTable[1][7] / metricsTable[1][0] );
for( i=0;i<4;i++ ) { if( metricsTable[1][7] > 180000 && metricsTable[1][7] < 360000 ) {
if( metricsTable[i][7] > 180000 && metricsTable[i][7] < 360000 ) { MonthlyDevelopmentBonus_Year1_NGPL[1] = basicJSONOperation1.getDouble("monthly_ep_18");
MonthlyDevelopmentBonus_Year1_NGPL[i] = basicJSONOperation1.getDouble("monthly_ep_18"); } else if ( metricsTable[1][7] > 360000 && metricsTable[1][7] < 720000 ) {
} else if ( metricsTable[i][7] > 360000 && metricsTable[i][7] < 720000 ) { MonthlyDevelopmentBonus_Year1_NGPL[1] = basicJSONOperation1.getDouble("monthly_ep_36");
MonthlyDevelopmentBonus_Year1_NGPL[i] = basicJSONOperation1.getDouble("monthly_ep_36"); } else if ( metricsTable[1][7] > 720000 && metricsTable[1][7] < 1400000 ) {
} else if ( metricsTable[i][7] > 720000 && metricsTable[i][7] < 1400000 ) { MonthlyDevelopmentBonus_Year1_NGPL[1] = basicJSONOperation1.getDouble("monthly_ep_72");
MonthlyDevelopmentBonus_Year1_NGPL[i] = basicJSONOperation1.getDouble("monthly_ep_72"); } else if ( metricsTable[1][7] > 1400000 ) {
} else if ( metricsTable[i][7] > 1400000 ) { MonthlyDevelopmentBonus_Year1_NGPL[1] = basicJSONOperation1.getDouble("monthly_ep_144");
MonthlyDevelopmentBonus_Year1_NGPL[i] = basicJSONOperation1.getDouble("monthly_ep_144"); }
} if( metricsTable[3][7] > 180000 && metricsTable[3][7] < 360000 ) {
} MonthlyDevelopmentBonus_Year1_NGPL[3] = basicJSONOperation2.getDouble("monthly_ep_18");
} else if ( metricsTable[3][7] > 360000 && metricsTable[3][7] < 720000 ) {
MonthlyDevelopmentBonus_Year1_NGPL[3] = basicJSONOperation2.getDouble("monthly_ep_36");
} else if ( metricsTable[3][7] > 720000 && metricsTable[3][7] < 1400000 ) {
MonthlyDevelopmentBonus_Year1_NGPL[3] = basicJSONOperation2.getDouble("monthly_ep_72");
} else if ( metricsTable[3][7] > 1400000 ) {
MonthlyDevelopmentBonus_Year1_NGPL[3] = basicJSONOperation2.getDouble("monthly_ep_144");
}
basicJSONOperation = MSA_Value.getJSONObject(0); basicJSONOperation = MSA_Value.getJSONObject(0);
basicStringOperation = requestJSON.getString("FS_Type"); basicStringOperation = requestJSON.getString("FS_Type");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment