Compare commits
3 Commits
bc3cd91c6a
...
dev_sjs
Author | SHA1 | Date | |
---|---|---|---|
552afab108 | |||
2da5ba5137 | |||
32cca20d3a |
@ -73,6 +73,13 @@ public class DateUploadController {
|
|||||||
private String MapExePath;
|
private String MapExePath;
|
||||||
|
|
||||||
|
|
||||||
|
@RequestMapping(value = "/queryZone" ,method = {RequestMethod.GET})
|
||||||
|
public AjaxResult queryZone()
|
||||||
|
{
|
||||||
|
List<String> zone= service.queryZone();
|
||||||
|
return AjaxResult.success(zone);
|
||||||
|
}
|
||||||
|
|
||||||
@RequestMapping(value = "/SelectUpload", method = {RequestMethod.POST})
|
@RequestMapping(value = "/SelectUpload", method = {RequestMethod.POST})
|
||||||
public AjaxResult SelectUpload(@RequestBody paging paging) {
|
public AjaxResult SelectUpload(@RequestBody paging paging) {
|
||||||
// LocalDate tomorrow = LocalDate.of(2022,10,2);
|
// LocalDate tomorrow = LocalDate.of(2022,10,2);
|
||||||
@ -151,17 +158,19 @@ public class DateUploadController {
|
|||||||
public AjaxResult InitUpload(@RequestBody UplodFile uplodFile) {
|
public AjaxResult InitUpload(@RequestBody UplodFile uplodFile) {
|
||||||
|
|
||||||
readXml();
|
readXml();
|
||||||
|
|
||||||
List<DateUpload> dateUploads = infr(uplodFile.getDateUploads());
|
List<DateUpload> dateUploads = infr(uplodFile.getDateUploads());
|
||||||
|
|
||||||
for (int i = 0; i < dateUploads.size(); i++) {
|
for (int i = 0; i < dateUploads.size(); i++) {
|
||||||
Integer Seeding = service.IntoUpload(dateUploads.get(i));
|
Integer Seeding = service.IntoUpload(dateUploads.get(i));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return AjaxResult.success("成功");
|
return AjaxResult.success("成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加方法
|
||||||
|
* @param dateUpload
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
private List<DateUpload> infr(List<DateUpload> dateUpload) {
|
private List<DateUpload> infr(List<DateUpload> dateUpload) {
|
||||||
for (int i = 0; i < dateUpload.size(); i++) {
|
for (int i = 0; i < dateUpload.size(); i++) {
|
||||||
|
|
||||||
@ -209,12 +218,13 @@ public class DateUploadController {
|
|||||||
dateUpload.get(i).setExtent1(dateUpload.get(i).getExtent().toString());
|
dateUpload.get(i).setExtent1(dateUpload.get(i).getExtent().toString());
|
||||||
|
|
||||||
DateUpload uploadValue = service.selectShp(name1, type, "");
|
DateUpload uploadValue = service.selectShp(name1, type, "");
|
||||||
|
|
||||||
MyThread1 demo = new MyThread1(name.replace(".tif", ""),
|
MyThread1 demo = new MyThread1(name.replace(".tif", ""),
|
||||||
FilePaths + dateUpload.get(i).getData_id(),
|
FilePaths + dateUpload.get(i).getData_id(),
|
||||||
ShpPaths + uploadValue.getData_id());
|
ShpPaths + uploadValue.getData_id());
|
||||||
demo.run();
|
demo.run();
|
||||||
|
|
||||||
} else if (type1.equals("BOUNDARIES"))//Boundaries
|
} else if (type1.equals("BOUNDARIES") || type1.equals("RSIMAGES"))//Boundaries
|
||||||
{
|
{
|
||||||
String[] strs = dateUpload.get(i).getFileName().split("\\.");
|
String[] strs = dateUpload.get(i).getFileName().split("\\.");
|
||||||
|
|
||||||
@ -268,6 +278,7 @@ public class DateUploadController {
|
|||||||
dateUpload.get(i).setExtent1(dateUpload.get(i).getExtent().toString());
|
dateUpload.get(i).setExtent1(dateUpload.get(i).getExtent().toString());
|
||||||
|
|
||||||
DateUpload uploadValue = service.selectShp(name1, type, "");
|
DateUpload uploadValue = service.selectShp(name1, type, "");
|
||||||
|
|
||||||
MyThread1 demo = new MyThread1(name.replace(".tif", ""),
|
MyThread1 demo = new MyThread1(name.replace(".tif", ""),
|
||||||
FilePaths + dateUpload.get(i).getData_id(),
|
FilePaths + dateUpload.get(i).getData_id(),
|
||||||
ShpPaths + uploadValue.getData_id());
|
ShpPaths + uploadValue.getData_id());
|
||||||
@ -339,13 +350,12 @@ public class DateUploadController {
|
|||||||
|
|
||||||
dateUpload.get(i).setExtent1(dateUpload.get(i).getExtent().toString());
|
dateUpload.get(i).setExtent1(dateUpload.get(i).getExtent().toString());
|
||||||
|
|
||||||
|
|
||||||
DateUpload uploadValue = service.selectShp(name1, type, "");
|
DateUpload uploadValue = service.selectShp(name1, type, "");
|
||||||
|
|
||||||
MyThread1 demo = new MyThread1(name.replace(".tif", ""),
|
MyThread1 demo = new MyThread1(name.replace(".tif", ""),
|
||||||
FilePaths + dateUpload.get(i).getData_id(),
|
FilePaths + dateUpload.get(i).getData_id(),
|
||||||
ShpPaths + uploadValue.getData_id());
|
ShpPaths + uploadValue.getData_id());
|
||||||
demo.run();
|
demo.run();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -455,24 +465,16 @@ public class DateUploadController {
|
|||||||
@RequestMapping(value = "/delUploadFile", method = {RequestMethod.DELETE})
|
@RequestMapping(value = "/delUploadFile", method = {RequestMethod.DELETE})
|
||||||
public AjaxResult delUploadFile(List<Integer> id) {
|
public AjaxResult delUploadFile(List<Integer> id) {
|
||||||
|
|
||||||
|
|
||||||
List<Integer> ids = id;
|
List<Integer> ids = id;
|
||||||
|
|
||||||
UploadFile file = new UploadFile();
|
UploadFile file = new UploadFile();
|
||||||
|
|
||||||
|
|
||||||
for (int i = 0; i < ids.size(); i++) {
|
for (int i = 0; i < ids.size(); i++) {
|
||||||
|
|
||||||
Integer Seeding = 0;
|
Integer Seeding = 0;
|
||||||
DateUpload value = service.selectDel(ids.get(i));
|
DateUpload value = service.selectDel(ids.get(i));
|
||||||
|
|
||||||
String type1 = value.getType1();
|
String type1 = value.getType1();
|
||||||
String type = value.getType();
|
String type = value.getType();
|
||||||
|
|
||||||
if (type1.equals("EVALUATIONINDICATORS")) {
|
if (type1.equals("EVALUATIONINDICATORS")) {
|
||||||
|
|
||||||
//value.getType2();
|
//value.getType2();
|
||||||
|
|
||||||
String[] typeValue = value.getFileName().split("2");
|
String[] typeValue = value.getFileName().split("2");
|
||||||
String type2 = typeValue[0];
|
String type2 = typeValue[0];
|
||||||
type2 = type2.substring(0, type2.length() - 1);
|
type2 = type2.substring(0, type2.length() - 1);
|
||||||
@ -481,10 +483,8 @@ public class DateUploadController {
|
|||||||
if (Seeding == 0) {
|
if (Seeding == 0) {
|
||||||
return AjaxResult.error("没有此id单据!" + ids.get(i));
|
return AjaxResult.error("没有此id单据!" + ids.get(i));
|
||||||
}
|
}
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
// &&
|
|
||||||
// (type1.equals("RSIMAGES") || type1.equals("PLANTINGDISTRIBUTION") || type1.equals("VEGETATIONHEALTH"))
|
|
||||||
else if (type.equals("VEGETATIONHEALTH")) {
|
else if (type.equals("VEGETATIONHEALTH")) {
|
||||||
String[] typeValue = value.getFileName().split("_");
|
String[] typeValue = value.getFileName().split("_");
|
||||||
String resolution = typeValue[0];
|
String resolution = typeValue[0];
|
||||||
@ -494,7 +494,16 @@ public class DateUploadController {
|
|||||||
if (Seeding == 0) {
|
if (Seeding == 0) {
|
||||||
return AjaxResult.error("没有此id单据!" + ids.get(i));
|
return AjaxResult.error("没有此id单据!" + ids.get(i));
|
||||||
}
|
}
|
||||||
} else {
|
continue;
|
||||||
|
}
|
||||||
|
else if (type1.equals("BOUNDARIES") || type1.equals("RSIMAGES")) {
|
||||||
|
Seeding = service.DelUpload(ids.get(i));
|
||||||
|
if (Seeding == 0) {
|
||||||
|
return AjaxResult.error("没有此id单据!" + ids.get(i));
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
String[] typeValue = value.getFileName().split("_");
|
String[] typeValue = value.getFileName().split("_");
|
||||||
String type2 = typeValue[0];
|
String type2 = typeValue[0];
|
||||||
@ -503,8 +512,8 @@ public class DateUploadController {
|
|||||||
if (Seeding == 0) {
|
if (Seeding == 0) {
|
||||||
return AjaxResult.error("没有此id单据!" + ids.get(i));
|
return AjaxResult.error("没有此id单据!" + ids.get(i));
|
||||||
}
|
}
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return AjaxResult.success("成功!");
|
return AjaxResult.success("成功!");
|
||||||
@ -557,17 +566,18 @@ public class DateUploadController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改全部区域名称
|
* 修改全部区域名称
|
||||||
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value = "/updateAllRegionName", method = {RequestMethod.POST})
|
@RequestMapping(value = "/updateAllRegionName", method = {RequestMethod.POST})
|
||||||
public AjaxResult updateAllRegionName(@RequestBody RegionName regionName)
|
public AjaxResult updateAllRegionName(@RequestBody RegionName regionName) {
|
||||||
{
|
|
||||||
|
|
||||||
return landUseServices.updateAllRegionName(regionName.getRegionName());
|
return landUseServices.updateAllRegionName(regionName.getRegionName());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询所有区域名称
|
* 查询所有区域名称
|
||||||
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value = "/queryAllRegionName", method = {RequestMethod.GET})
|
@RequestMapping(value = "/queryAllRegionName", method = {RequestMethod.GET})
|
||||||
|
@ -6,14 +6,14 @@ spring:
|
|||||||
driver-class-name: org.postgresql.Driver
|
driver-class-name: org.postgresql.Driver
|
||||||
druid:
|
druid:
|
||||||
master:
|
master:
|
||||||
# url: jdbc:postgresql://rs-middleware-postgres:5432/itba?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=Asia/Shanghai
|
url: jdbc:postgresql://rs-middleware-postgres:5432/itba?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=Asia/Shanghai
|
||||||
# username: gis
|
username: gis
|
||||||
# password: AQBSdU5bT27AKxAAvKoWQdGpSuNRCHjC4B8DVA
|
password: AQBSdU5bT27AKxAAvKoWQdGpSuNRCHjC4B8DVA
|
||||||
|
|
||||||
#url: jdbc:postgresql://192.168.2.9:5432/saudiArabia?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=Asia/Shanghai
|
#url: jdbc:postgresql://192.168.2.9:5432/saudiArabia?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=Asia/Shanghai
|
||||||
url: jdbc:postgresql://121.36.229.60:5432/saudiArabia?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=Asia/Shanghai
|
# url: jdbc:postgresql://121.36.229.60:5432/saudiArabia?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=Asia/Shanghai
|
||||||
username: sjs
|
# username: sjs
|
||||||
password: song5325
|
# password: song5325
|
||||||
# 从库数据源
|
# 从库数据源
|
||||||
slave:
|
slave:
|
||||||
# 从数据源开关/默认关闭
|
# 从数据源开关/默认关闭
|
||||||
|
@ -18,8 +18,8 @@ ruoyi:
|
|||||||
# 开发环境配置
|
# 开发环境配置
|
||||||
server:
|
server:
|
||||||
# 服务器的HTTP端口,默认为8080
|
# 服务器的HTTP端口,默认为8080
|
||||||
port: 6051
|
#port: 6051
|
||||||
#port: 9800
|
port: 9800
|
||||||
servlet:
|
servlet:
|
||||||
# 应用的访问路径
|
# 应用的访问路径
|
||||||
context-path: /
|
context-path: /
|
||||||
@ -60,16 +60,16 @@ spring:
|
|||||||
# redis 配置
|
# redis 配置
|
||||||
redis:
|
redis:
|
||||||
# 地址
|
# 地址
|
||||||
# host: rs-middleware-redis
|
host: rs-middleware-redis
|
||||||
host: localhost
|
#host: localhost
|
||||||
# 端口,默认为6379
|
# 端口,默认为6379
|
||||||
#port: 14096
|
#port: 14096
|
||||||
port: 6379
|
port: 6379
|
||||||
# 数据库索引
|
# 数据库索引
|
||||||
database: 0
|
database: 0
|
||||||
# 密码
|
# 密码
|
||||||
# password: SenseTime@2019
|
password: SenseTime@2019
|
||||||
password: sdust2020
|
#password: sdust2020
|
||||||
# 连接超时时间
|
# 连接超时时间
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
lettuce:
|
lettuce:
|
||||||
|
@ -70,12 +70,14 @@ public interface DateUploadMapper {
|
|||||||
@Param("name") String name,
|
@Param("name") String name,
|
||||||
@Param("dateTime") String dateTime);
|
@Param("dateTime") String dateTime);
|
||||||
|
|
||||||
|
List<String> queryZone();
|
||||||
|
|
||||||
DateUpload selectShpfile(@Param("zone") String zone,
|
DateUpload selectShpfile(@Param("zone") String zone,
|
||||||
@Param("type") String type,
|
@Param("type") String type,
|
||||||
@Param("dateTime") String dateTime,
|
@Param("dateTime") String dateTime,
|
||||||
@Param("year") String year);
|
@Param("year") String year);
|
||||||
|
|
||||||
DateUpload selectShp(@Param("zone") String zone,
|
List<DateUpload> selectShp(@Param("zone") String zone,
|
||||||
@Param("type") String type,
|
@Param("type") String type,
|
||||||
@Param("dateTime") String dateTime);
|
@Param("dateTime") String dateTime);
|
||||||
|
|
||||||
|
@ -14,6 +14,8 @@ import java.util.StringTokenizer;
|
|||||||
*/
|
*/
|
||||||
public interface IDateUploadService {
|
public interface IDateUploadService {
|
||||||
|
|
||||||
|
List<String> queryZone();
|
||||||
|
|
||||||
List<DateUpload> selectUpload( String zone,
|
List<DateUpload> selectUpload( String zone,
|
||||||
String type,
|
String type,
|
||||||
String type1,
|
String type1,
|
||||||
|
@ -19,6 +19,11 @@ public class DateUploadServiceImpl implements IDateUploadService {
|
|||||||
@Resource
|
@Resource
|
||||||
private DateUploadMapper mapper;
|
private DateUploadMapper mapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> queryZone() {
|
||||||
|
return mapper.queryZone();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<DateUpload> selectUpload(String zone,String type,String type1,String type2,String year, String dateWithSway,String name,String dateTime) {
|
public List<DateUpload> selectUpload(String zone,String type,String type1,String type2,String year, String dateWithSway,String name,String dateTime) {
|
||||||
return mapper.selectUpload(zone,type,type1,type2,year,dateWithSway,name,dateTime);
|
return mapper.selectUpload(zone,type,type1,type2,year,dateWithSway,name,dateTime);
|
||||||
@ -41,7 +46,7 @@ public class DateUploadServiceImpl implements IDateUploadService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DateUpload selectShp(String zone, String type, String dateTime) {
|
public DateUpload selectShp(String zone, String type, String dateTime) {
|
||||||
return mapper.selectShp(zone,type,dateTime);
|
return mapper.selectShp(zone,type,dateTime).get(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -61,6 +61,9 @@
|
|||||||
<!-- </if>-->
|
<!-- </if>-->
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
<select id="queryZone" resultType="string">
|
||||||
|
SELECT DISTINCT Zone FROM data_upload
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="selectUpload" resultMap="RM_Upload">
|
<select id="selectUpload" resultMap="RM_Upload">
|
||||||
SELECT <include refid="columns"/> FROM data_upload
|
SELECT <include refid="columns"/> FROM data_upload
|
||||||
|
Reference in New Issue
Block a user