|
|
@@ -70,6 +70,8 @@ public class DataImp implements DataService {
|
|
|
String checkedstyle;
|
|
|
@Value("${spotstyle}")
|
|
|
String spotstyle;
|
|
|
+ @Value("${charset}")
|
|
|
+ String charset;
|
|
|
|
|
|
|
|
|
@Override
|
|
|
@@ -241,7 +243,7 @@ public class DataImp implements DataService {
|
|
|
String geoserverusername = resultSet.getString("username");
|
|
|
String geoserverpassword = resultSet.getString("password");
|
|
|
String geoserverworkspace = resultSet.getString("workspace");
|
|
|
- GeoServer.publishShp(geoserverurl, geoserverusername, geoserverpassword, geoserverworkspace, shpPath, style, datasource);
|
|
|
+ GeoServer.publishShp(geoserverurl, geoserverusername, geoserverpassword, geoserverworkspace, shpPath, style, datasource, charset);
|
|
|
//注册数据到属性表 http://192.168.60.52:28085/geoserver/spot/wms spot:基本农田 EPSG:4525
|
|
|
String layerurl = geoserverurl + "/" + geoserverworkspace + "/wms";
|
|
|
String layername = geoserverworkspace + ":" + datasource;
|
|
|
@@ -252,8 +254,8 @@ public class DataImp implements DataService {
|
|
|
"'" + layerurl + "', 'WMS', '" + layername + "', '" + epsg + "')";
|
|
|
} else if ("analyse".equals(type)) {//分析图斑
|
|
|
// resourcesConfig.publishResourceMappingEvent(tablename, folderpath);
|
|
|
- insertSQL = "insert into t_analyse_vector (layername , tablename, path, serviceuri , servicetype, servicename, serviceproj) values ('" + name + "', '" + tablename + "', '" + folderpath + "'," +
|
|
|
- "'" + layerurl + "', 'WMS', '" + layername + "', '" + epsg + "')";
|
|
|
+ insertSQL = "insert into t_analyse_vector (layername , tablename, path, serviceuri , servicetype, servicename, serviceproj, ufield) values ('" + name + "', '" + tablename + "', '" + folderpath + "'," +
|
|
|
+ "'" + layerurl + "', 'WMS', '" + layername + "', '" + epsg + "', '" + ufield + "')";
|
|
|
}
|
|
|
statement.execute(insertSQL);
|
|
|
connection.close();
|
|
|
@@ -675,6 +677,7 @@ public class DataImp implements DataService {
|
|
|
cur.put("servicetype", resultSet.getString("servicetype"));
|
|
|
cur.put("servicename", resultSet.getString("servicename"));
|
|
|
cur.put("serviceproj", resultSet.getString("serviceproj"));
|
|
|
+ cur.put("ufield", resultSet.getString("ufield"));
|
|
|
res.add(cur);
|
|
|
}
|
|
|
connection.close();
|