@@ -20,18 +20,30 @@ |
</target> |
<target name="-deploy-ant" if="deploy.ant.enabled" depends="-init,-check-credentials"> |
<echo message="Deploying ${deploy.ant.archive} to ${Context(path)}"/> |
- <taskdef name="deploy" classname="org.apache.catalina.ant.DeployTask" |
- classpath="${tomcat.home}/server/lib/catalina-ant.jar"/> |
- <deploy url="${tomcat.url}/manager" username="${tomcat.username}" |
+ <taskdef name="deploy" classname="org.apache.catalina.ant.DeployTask"> |
+ <classpath> |
+ <pathelement path="${tomcat.home}/lib/catalina-ant.jar"/> |
+ <pathelement path="${tomcat.home}/lib/tomcat-coyote.jar"/> |
+ <pathelement path="${tomcat.home}/lib/tomcat-util.jar"/> |
+ <pathelement path="${tomcat.home}/bin/tomcat-juli.jar"/> |
+ </classpath> |
+ </taskdef> |
+ <deploy url="${tomcat.url}/manager/text" username="${tomcat.username}" |
password="${tomcat.password}" path="${Context(path)}" |
war="${deploy.ant.archive}"/> |
<property name="deploy.ant.client.url" value="${tomcat.url}${Context(path)}"/> |
</target> |
<target name="-undeploy-ant" if="deploy.ant.enabled" depends="-init,-check-credentials"> |
<echo message="Undeploying ${Context(path)}"/> |
- <taskdef name="undeploy" classname="org.apache.catalina.ant.UndeployTask" |
- classpath="${tomcat.home}/server/lib/catalina-ant.jar"/> |
- <undeploy url="${tomcat.url}/manager" username="${tomcat.username}" |
+ <taskdef name="undeploy" classname="org.apache.catalina.ant.UndeployTask"> |
+ <classpath> |
+ <pathelement path="${tomcat.home}/lib/catalina-ant.jar"/> |
+ <pathelement path="${tomcat.home}/lib/tomcat-coyote.jar"/> |
+ <pathelement path="${tomcat.home}/lib/tomcat-util.jar"/> |
+ <pathelement path="${tomcat.home}/bin/tomcat-juli.jar"/> |
+ </classpath> |
+ </taskdef> |
+ <undeploy url="${tomcat.url}/manager/text" username="${tomcat.username}" |
password="${tomcat.password}" path="${Context(path)}"/> |
</target> |
</project> |
@@ -37,8 +37,8 @@ |
Map<String, JSONObject> group = JSONUtils.preprocess(groups.getJSONArray(i)); |
aoaId = JSONUtils.getIntParam(group, "AoAid", 0); |
int plan_techn_id = JSONUtils.getIntParam(group, "plan_techn_id", 0); |
- String plan_techn_discrim_type = JSONUtils.getStringParam(group, "plan_techn_discrim_type", "err"); |
- String plan_techn_discrim = JSONUtils.getStringParam(group, "plan_techn_discrim", "err"); |
+ String plan_techn_discrim_type = JSONUtils.getStringParam(group, "plan_techn_discrim_type", ""); |
+ String plan_techn_discrim = JSONUtils.getStringParam(group, "plan_techn_discrim", ""); |
Input input = new Input(aoaId, plan_techn_id, plan_techn_discrim_type, plan_techn_discrim); |
components.add(input); |
} |
@@ -126,6 +126,9 @@ |
} |
|
//#Compute nutrient technique mitigation scores for Phosphorus in Surface Water concern and increment total scores |
+ if(ip.plan_techn_discrim.isEmpty()) |
+ 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';"; |
+ else |
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()) { |
@@ -133,21 +136,36 @@ |
psurf_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 = 'Phosphorus in Surface Water' AND mode_of_action = 'Avoid';"; |
+ if(ip.plan_techn_discrim.isEmpty()) |
+ 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 mode_of_action = 'Avoid';"; |
+ else |
+ 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+"' 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 = 'Phosphorus in Surface Water' AND mode_of_action = 'Avoid';"; |
resultset = statement.executeQuery(query); |
while (resultset.next()) { |
int avoid_techn_score = resultset.getInt("nut_tech_score"); |
psurf_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 ='Phosphorus in Surface Water' AND mode_of_action ='Control';"; |
+ if(ip.plan_techn_discrim.isEmpty()) |
+ 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 mode_of_action = 'Control';"; |
+ else |
+ 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+"' 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 ='Phosphorus in Surface Water' AND mode_of_action ='Control';"; |
resultset = statement.executeQuery(query); |
while (resultset.next()) { |
int control_techn_score = resultset.getInt("nut_tech_score"); |
psurf_control_techn_score += control_techn_score; |
} |
|
- 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 mode_of_action ='Trap';"; |
+ if(ip.plan_techn_discrim.isEmpty()) |
+ 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 mode_of_action = 'Trap';"; |
+ else |
+ 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+"' AND mode_of_action = 'Trap';"; |
+ |
+ // 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 mode_of_action ='Trap';"; |
resultset = statement.executeQuery(query); |
while (resultset.next()) { |
int trap_techn_score = resultset.getInt("nut_tech_score"); |