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> </parent>
<groupId>org.ccalm</groupId> <groupId>org.ccalm</groupId>
<artifactId>main</artifactId> <artifactId>main</artifactId>
<version>1.0.3</version> <version>1.0.4</version>
<name>main</name> <name>main</name>
<description>main</description> <description>main</description>
<properties> <properties>

View File

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