Displaying differences for changeset
 
display as  

src/java/m/wqm/nuttechscores/V1_0.java

@@ -68,21 +68,20 @@
             int psurf_trap_techn_score = 0;
 
             for (Input ip : components) {
-                String query = "SELECT nut_tech_score FROM wqm_nutrient_technique_scores WHERE nutrient_technique_id = "+ip.plan_techn_id+" AND wqm_concern ='Nitrogen in Ground Water';";
+                String query = "SELECT nut_tech_score FROM wqm_nutrient_technique_scores WHERE nutrient_technique_id ="+ip.plan_techn_id+" AND wqm_concern='Nitrogen in Ground Water';";
                 ResultSet resultset = statement.executeQuery(query);
                 while (resultset.next()) {
                     int techn_score = resultset.getInt("nut_tech_score");
                     nleach_techn_score += techn_score;
                 }
-
-                query = "SELECT nut_tech_score FROM wqm_nutrient_technique_scores WHERE nutrient_technique_id="+ip.plan_techn_id+" AND wqm_concern = 'Nitrogen in Ground Water' AND mode_of_action = 'Avoid';";
+                query = "SELECT nut_tech_score FROM wqm_nutrient_technique_scores WHERE nutrient_technique_id="+ip.plan_techn_id+" AND wqm_concern = 'Nitrogen in Ground Water' AND mode_of_action ='Avoid';";
                 resultset = statement.executeQuery(query);
                 while (resultset.next()) {
                     int avoid_techn_score = resultset.getInt("nut_tech_score");
                     nleach_avoid_techn_score += avoid_techn_score;
                 }
 
-                query = "SELECT nut_tech_score FROM wqm_nutrient_technique_scores WHERE nutrient_technique_id ="+ip.plan_techn_id+" AND wqm_concern = 'Nitrogen in Ground Water' AND mode_of_action = 'Control';";
+                query = "SELECT nut_tech_score FROM wqm_nutrient_technique_scores WHERE nutrient_technique_id="+ip.plan_techn_id+" AND wqm_concern = 'Nitrogen in Ground Water' AND mode_of_action = 'Control';";
                 resultset = statement.executeQuery(query);
                 while (resultset.next()) {
                     int control_techn_score = resultset.getInt("nut_tech_score");
@@ -93,10 +92,8 @@
                 resultset = statement.executeQuery(query);
                 while (resultset.next()) {
                     int trap_techn_score = resultset.getInt("nut_tech_score");
-                    //previously
-                    //nleach_trap_techn_score += trap_techn_score;
-                    //new
-                    nleach_trap_techn_score = nleach_avoid_techn_score+trap_techn_score;
+                nleach_trap_techn_score += trap_techn_score;
+      
                 }
 
                 //  #Compute nutrient technique mitigation scores for Nitrogen in Surface Water concern and increment total scores           
@@ -129,7 +126,7 @@
                 }
 
                 //#Compute nutrient technique mitigation scores for Phosphorus in Surface Water concern and increment total scores            
-                query = "SELECT nut_tech_score FROM wqm_nutrient_technique_scores WHERE nutrient_technique_id ="+ ip.plan_techn_id+" AND wqm_concern = 'Phosphorous in Surface Water'"+ " AND tech_discrim_type =" + ip.plan_techn_discrim_type+" AND tech_discrim =" + ip.plan_techn_discrim + ";";
+                query = "SELECT nut_tech_score FROM wqm_nutrient_technique_scores WHERE nutrient_technique_id ="+ ip.plan_techn_id+" AND wqm_concern = 'Phosphorus in Surface Water' AND tech_discrim_type ='"+ ip.plan_techn_discrim_type+"' AND tech_discrim ='"+ip.plan_techn_discrim+"' ;";
                 resultset = statement.executeQuery(query);
                 while (resultset.next()) {
                     int techn_score = resultset.getInt("nut_tech_score");