Add save "efficacy_impact_type"

This commit is contained in:
2025-09-04 07:36:19 +05:00
parent 66b1f78745
commit 72a862ea23
4 changed files with 27 additions and 9 deletions

View File

@ -10,7 +10,7 @@
</parent>
<groupId>org.ccalm</groupId>
<artifactId>main</artifactId>
<version>1.0.3</version>
<version>1.0.4</version>
<name>main</name>
<description>main</description>
<properties>

View File

@ -392,7 +392,8 @@ public class AcceptASDCController implements ServletContextAware {
risk_probe_analysis_name=${risk_probe_analysis_name},
risk_probe_analysis_number=${risk_probe_analysis_number},
test=${test},
geom=ST_SetSRID(ST_GeomFromGeoJSON(${geom}),4326)
geom=ST_SetSRID(ST_GeomFromGeoJSON(${geom}),4326),
efficacy_impact_type=${efficacy_impact_type}
where uid=main.strtouuid(${uid})
""";
}else
@ -490,7 +491,8 @@ public class AcceptASDCController implements ServletContextAware {
risk_probe_analysis_name,
risk_probe_analysis_number,
test,
geom
geom,
efficacy_impact_type
)values(
main.strtouuid(${uid}),
main.strtouuid(${frmlocustdel_uid}),
@ -583,7 +585,8 @@ public class AcceptASDCController implements ServletContextAware {
${risk_probe_analysis_name},
${risk_probe_analysis_number},
${test},
ST_SetSRID(ST_GeomFromGeoJSON(${geom}),4326)
ST_SetSRID(ST_GeomFromGeoJSON(${geom}),4326),
${efficacy_impact_type}
)""";
}
@ -801,6 +804,9 @@ public class AcceptASDCController implements ServletContextAware {
value = jsonObj.optString("geom",null);
stmtn.setString("geom",value);
value = jsonObj.optString("efficacy_impact_type",null);
stmtn.setString("efficacy_impact_type",value);
//Execute SQL
try {
PreparedStatement stmt=stmtn.getPreparedStatement();
@ -1879,6 +1885,7 @@ public class AcceptASDCController implements ServletContextAware {
+" comments=?,\n"
+" geom=ST_SetSRID(ST_GeomFromGeoJSON(?),4326),\n"
+" locust_purpose_id=?,\n" //Чтобы много циферек не перебивать сделал внизу запроса
+" efficacy_impact=?,\n"
+" test=?\n"
+" where uid=main.strtouuid('"+uid+"')";
try {
@ -1999,6 +2006,7 @@ public class AcceptASDCController implements ServletContextAware {
+" comments,\n"
+" geom,\n"
+" locust_purpose_id,\n"
+" efficacy_impact,\n"
+" test\n"
+")values(\n"
+" main.strtouuid(?),\n" //1 uid
@ -2106,7 +2114,8 @@ public class AcceptASDCController implements ServletContextAware {
+" ?,\n" //102 comments
+" ST_SetSRID(ST_GeomFromGeoJSON(?),4326),\n" //103 geom
+" ?,\n" //104 locust_purpose_id
+" ?\n" //105 test
+" ?,\n" //105 efficacy_impact
+" ?\n" //106 test
+")";
try {
stmt = conn.prepareStatement(sql);
@ -2232,6 +2241,7 @@ public class AcceptASDCController implements ServletContextAware {
String comments=getCdataValue(reqNode, "comments");
String geom=getCdataValue(reqNode, "geom");
String locust_purpose_id=getCdataValue(reqNode, "locust_purpose_id");
String efficacy_impact=getCdataValue(reqNode, "efficacy_impact");
String test=getCdataValue(reqNode, "test");
if(test==null) test="0";
@ -2428,11 +2438,11 @@ public class AcceptASDCController implements ServletContextAware {
stmt.setNull(104, Types.INTEGER, null);
else
stmt.setInt(104,Integer.parseInt(locust_purpose_id));
if(test==null) stmt.setNull(105, Types.BOOLEAN, null);
stmt.setString(105,efficacy_impact);
if(test==null) stmt.setNull(106, Types.BOOLEAN, null);
else {
if(test.equals("1")) stmt.setBoolean(105,true);
else stmt.setBoolean(105,false);
if(test.equals("1")) stmt.setBoolean(106,true);
else stmt.setBoolean(106,false);
}
} catch (SQLException ex) {

View File

@ -0,0 +1,4 @@
package org.ccalm.main.models;
public class FrmLocustDelModel {
}

View File

@ -0,0 +1,4 @@
package org.ccalm.main.models;
public class FrmLocustHealthModel {
}