add throw
This commit is contained in:
@ -332,7 +332,7 @@ public class AcceptJSON implements ServletContextAware {
|
|||||||
region_id=14;
|
region_id=14;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
System.out.println(jsonObj.getString("region"));
|
throw new CustomException(200, 10000, "Not find region: " + jsonObj.getString("region"), null, true);
|
||||||
}
|
}
|
||||||
if(region_id==-1)
|
if(region_id==-1)
|
||||||
stmt.setInt(11,region_id); //region_id
|
stmt.setInt(11,region_id); //region_id
|
||||||
@ -352,7 +352,7 @@ public class AcceptJSON implements ServletContextAware {
|
|||||||
locust_id=3;
|
locust_id=3;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
System.out.println(jsonObj.getString("grasshopper_type"));
|
throw new CustomException(200, 10000, "Not grasshopper_type: " + jsonObj.getString("grasshopper_type"), null, true);
|
||||||
}
|
}
|
||||||
stmt.setInt(12,locust_id); //locust_id
|
stmt.setInt(12,locust_id); //locust_id
|
||||||
|
|
||||||
@ -1426,9 +1426,6 @@ public class AcceptJSON implements ServletContextAware {
|
|||||||
}
|
}
|
||||||
if(lastDate==null)
|
if(lastDate==null)
|
||||||
lastDate = LocalDate.parse("2025-02-11");
|
lastDate = LocalDate.parse("2025-02-11");
|
||||||
//lastDate = LocalDate.parse("2025-03-03");
|
|
||||||
//lastDate = LocalDate.parse("2024-10-01");
|
|
||||||
|
|
||||||
|
|
||||||
//By number of day downloading data and write result of downloading to database, try or false, after repair need repeat download
|
//By number of day downloading data and write result of downloading to database, try or false, after repair need repeat download
|
||||||
while(lastDate.isBefore(LocalDate.now().minusDays(3))){
|
while(lastDate.isBefore(LocalDate.now().minusDays(3))){
|
||||||
@ -1615,8 +1612,6 @@ public class AcceptJSON implements ServletContextAware {
|
|||||||
|
|
||||||
result.bio_hectare = obj.optString("surveyed_area",null);
|
result.bio_hectare = obj.optString("surveyed_area",null);
|
||||||
if (!obj.isNull("point")) {
|
if (!obj.isNull("point")) {
|
||||||
//result.lon_center = String.valueOf(obj.getJSONObject("point").getJSONArray("coordinates").getDouble(0));
|
|
||||||
//result.lat_center = String.valueOf(obj.getJSONObject("point").getJSONArray("coordinates").getDouble(1));
|
|
||||||
result.lon_center = String.valueOf(obj.getJSONObject("point").getJSONArray("coordinates").getDouble(1));
|
result.lon_center = String.valueOf(obj.getJSONObject("point").getJSONArray("coordinates").getDouble(1));
|
||||||
result.lat_center = String.valueOf(obj.getJSONObject("point").getJSONArray("coordinates").getDouble(0));
|
result.lat_center = String.valueOf(obj.getJSONObject("point").getJSONArray("coordinates").getDouble(0));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user