Compare commits

..

No commits in common. "dev_xianxia" and "main" have entirely different histories.

31 changed files with 262 additions and 266 deletions

1
.github/FUNDING.yml vendored
View File

@ -1 +0,0 @@
custom: http://doc.ruoyi.vip/ruoyi-vue/other/donate.html

View File

@ -2,27 +2,28 @@
<Rodel>
<path>
<exepath>
/home/sjs/ruoyi/shate/main
E:\沙特\EXE\exe\shate.exe
</exepath>
</path>
<path>
<exepath>
/home/sjs/ruoyi/shate
E:\沙特\EXE\temp
</exepath>
</path>
<path>
<exepath>
/home/sjs/ruoyi/shate
/rs-warehouse/temporary/images/
</exepath>
</path>
<path>
<exepath>
/home/sjs/ruoyi/shate
/rs-warehouse/temporary/vectors/
</exepath>
</path>

View File

@ -1,18 +1,14 @@
package com.ruoyi;
import com.fasterxml.jackson.datatype.jsr310.deser.InstantDeserializer;
import com.mysql.cj.x.protobuf.MysqlxDatatypes;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.file.WeatherUtils;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.util.ObjectUtils;
import org.springframework.util.ResourceUtils;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.List;
/**
@ -31,13 +27,9 @@ public class RuoYiApplication
SpringApplication.run(RuoYiApplication.class, args);
System.out.println();
System.out.println(" --->>>启动成功!<<<---");
}
}

View File

@ -56,6 +56,8 @@ public class DateUploadController
private String FilePaths;
private String ShpPaths;
@RequestMapping(value = "/SelectUpload",method = {RequestMethod.POST})
public AjaxResult SelectUpload(@RequestBody paging paging)
@ -68,19 +70,19 @@ public class DateUploadController
type2= paging.getType2().toUpperCase();
}
String date=paging.getUploadTime();
String dateTime=paging.getDateTime();
String name=paging.getType3();
String dateTime =paging.getDateTime();
if ( name!=null && name!="")
{
if (name.equals("1"))
{
name="Medium%";
name="M_Heal";
}
else if(name.equals("2"))
{
name="High%";
name="H_Heal%";
}
}
@ -101,7 +103,6 @@ public class DateUploadController
@RequestMapping(value = "/delUpload",method = {RequestMethod.POST})
public AjaxResult DelUpload(@RequestBody UplodFile uplodFile)
{
return delUploadFile(uplodFile.getId());
// List<Integer> ids=uplodFile.getId();
// Integer Seeding=0;
@ -122,11 +123,7 @@ public class DateUploadController
}
/**
* 删除
* @param id
* @return
*/
@RequestMapping(value = "/delUpload1",method = {RequestMethod.DELETE})
public AjaxResult DelUpload1(@RequestParam("id") List<Integer> id)
{
@ -142,11 +139,20 @@ public class DateUploadController
}
/**
* 添加
* @param uplodFile
* @return
*/
@RequestMapping(value = "/InitShp",method = {RequestMethod.POST})
public AjaxResult InitShp(@RequestBody UplodFile uplodFile)
{
List<DateUpload> dateUploads=infr(uplodFile.getDateUploads());
for (int i=0; i<dateUploads.size();i++)
{
Integer Seeding= service.IntoShp(dateUploads.get(i));
}
return AjaxResult.success("成功");
}
@RequestMapping(value = "/InitUpload",method = {RequestMethod.POST})
public AjaxResult InitUpload(@RequestBody UplodFile uplodFile)
{
@ -164,11 +170,6 @@ public class DateUploadController
return AjaxResult.success("成功");
}
/**
* 解析添加实体类
* @param dateUpload
* @return
*/
private List<DateUpload> infr(List<DateUpload> dateUpload)
{
for (int i=0;i<dateUpload.size();i++)
@ -220,12 +221,12 @@ public class DateUploadController
DateUpload uploadValue=service.selectShp(name1,type,"");
MyThread1 demo=new MyThread1(name.replace(".tif",""),
dateUpload.get(i).getRoute(),
uploadValue.getRoute());
FilePaths+dateUpload.get(i).getData_id(),
ShpPaths+uploadValue.getData_id());
demo.run();
}
else if(type1.equals("LANDUSE"))
else if(type1.equals("BOUNDARIES"))//Boundaries
{
String[] strs = dateUpload.get(i).getFileName().split("\\.");
@ -233,37 +234,60 @@ public class DateUploadController
String[] strs2=name.split("\\_");
String[] typeValue=name.split("2");
String type2=typeValue[0];
String name1=strs2[strs2.length-1];
String name2=strs2[strs2.length-2];
dateUpload.get(i).setDataTime(name2);
dateUpload.get(i).setZone(name1);
dateUpload.get(i).setCreatedTime(dateNowStr);
dateUpload.get(i).setYear(dateNowStr.substring(0,4));
dateUpload.get(i).setType(type);
dateUpload.get(i).setType1(type1);
dateUpload.get(i).setYear(name2.substring(0,4));
dateUpload.get(i).setType2(type2.substring(0,type2.length()-1).toUpperCase());
dateUpload.get(i).setExtent1(dateUpload.get(i).getExtent().toString());
DateUpload uploadValue=service.selectShp(name1,type,"");
MyThread1 demo=new MyThread1(name.replace(".tif",""),
dateUpload.get(i).getRoute(),
uploadValue.getRoute());
demo.run();
}
else if(type1.equals("LANDUSE"))
{
String[] strs = dateUpload.get(i).getFileName().split("\\.");
String name=strs[0];
String[] strs2=name.split("\\_");
String[] typeValue=name.split("2");
String type2=typeValue[0];
String name1=strs2[strs2.length-1];
String name2=strs2[strs2.length-2];
dateUpload.get(i).setDataTime(name2);
dateUpload.get(i).setZone(name1);
dateUpload.get(i).setCreatedTime(dateNowStr);
dateUpload.get(i).setType(type);
dateUpload.get(i).setType1(type1);
dateUpload.get(i).setYear(name2.substring(0,4));
dateUpload.get(i).setType2(type2.substring(0,type2.length()-1).toUpperCase());
dateUpload.get(i).setExtent1(dateUpload.get(i).getExtent().toString());
DateUpload uploadValue=service.selectShp(name1,type,"");
MyThread1 demo=new MyThread1(name.replace(".tif",""),
FilePaths+dateUpload.get(i).getData_id(),
ShpPaths+uploadValue.getData_id());
demo.run();
}
else if(type1.equals("SUITABILITY"))
{
String[] strs = dateUpload.get(i).getFileName().split("\\.");
@ -299,34 +323,10 @@ public class DateUploadController
DateUpload uploadValue=service.selectShp(name1,type,"");
MyThread1 demo=new MyThread1(name.replace(".tif",""),
dateUpload.get(i).getRoute(),
uploadValue.getRoute());
FilePaths+dateUpload.get(i).getData_id(),
ShpPaths+uploadValue.getData_id());
demo.run();
}
else if(type1.equals("BOUNDARIES"))//Boundaries
{
String[] strs = dateUpload.get(i).getFileName().split("\\.");
String name=strs[0];
String[] strs2=name.split("\\_");
String name1=strs2[strs2.length-1];
dateUpload.get(i).setZone(name1);
dateUpload.get(i).setCreatedTime(dateNowStr);
dateUpload.get(i).setYear(dateNowStr.substring(0,4));
dateUpload.get(i).setType(type);
dateUpload.get(i).setType1(type1);
dateUpload.get(i).setExtent1(dateUpload.get(i).getExtent().toString());
}
else
{
String[] strs = dateUpload.get(i).getFileName().split("\\.");
@ -360,8 +360,8 @@ public class DateUploadController
DateUpload uploadValue=service.selectShp(name1,type,"");
MyThread1 demo=new MyThread1(name.replace(".tif",""),
dateUpload.get(i).getRoute(),
uploadValue.getRoute());
FilePaths+dateUpload.get(i).getData_id(),
ShpPaths+uploadValue.getData_id());
demo.run();
}
@ -383,39 +383,34 @@ public class DateUploadController
Process proc=null;
try {
String til = UrlFileUpload.fileUpload(filePath,FilePathName);
String shp = UrlFileUpload.fileUpload(shpPath,FilePathName);
// String til = UrlFileUpload.fileUpload(filePath,FilePathName);
//
// String shp = UrlFileUpload.fileUpload(shpPath,FilePathName);
String[] cmd = {ExePathName,
fileName,
til.replace("\\","/"),
shp.replace("\\","/")};
System.out.println("调用exe执行算法");
filePath+".tif",
shpPath+".zip"};
ProcessBuilder pb = new ProcessBuilder();
pb.command(cmd);
proc=pb.start();
System.out.println("Start calling algorithm");
bufferedReader =new BufferedReader(new InputStreamReader(proc.getErrorStream()));
String aa=null;
String line=null;
while ((line=bufferedReader.readLine())!=null){
aa=aa+line;
}
// 打印错误日志
System.out.println(aa);
// Process process=Runtime.getRuntime().exec("cmd /c start"+" E:\\沙特\\~\\exe\\后台统计分析.exe \"Seed_Success_20220604_01\" \"E:\\沙特\\~\\temp\\Seed_Success_20220604_01.tif\" \"E:\\沙特\\~\\temp\\Seed_01.zip\"");
} catch (IOException e) {
e.printStackTrace();
} catch (InterruptedException e) {
e.printStackTrace();
System.out.println(e.getMessage());;
}
}
/**
* 执行地图数据解析
*/
public class MyThread1 extends Thread{
private String FileName;
@ -475,7 +470,7 @@ public class DateUploadController
{
String[] typeValue = value.getFileName().split("_");
String resolution=typeValue[0];
String type2 = "Healthy";
String type2 = "Heal";
file.UploadFile1(type2, value.getZone(), value.getDataTime(),service,resolution);
Seeding= service.DelUpload(ids.get(i));
if (Seeding==0){return AjaxResult.error("没有此id单据"+ids.get(i));}
@ -495,20 +490,22 @@ public class DateUploadController
return AjaxResult.success("成功!");
}
public void readXml() {
try {
// 创建解析器工厂
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder db = factory.newDocumentBuilder();
// 创建一个Document对象
String parent = new File(ResourceUtils.getURL("classpath:").getPath()).getParentFile().getParentFile().getParent();
File file = new File("route.xml");
Document doc =db.parse(file);
NodeList routeList = doc.getElementsByTagName("Rodel");
// 遍历每个book节点
for (int i = 0; i < routeList.getLength(); i++) {
System.out.println("*******************************");
// 索引从零开始
org.w3c.dom.Node book = routeList.item(i);
// 获取book节点所有属性集合
@ -526,12 +523,11 @@ public class DateUploadController
this.FilePathName=childNodes.item(3).getTextContent().trim();
this.FilePaths=childNodes.item(5).getTextContent().trim();
this.ShpPaths=childNodes.item(7).getTextContent().trim();
}
}
}
} catch (Exception e) {
e.printStackTrace();
}

View File

@ -1,14 +0,0 @@
package com.ruoyi.web.controller.shate;
import com.alibaba.fastjson.JSON;
import java.util.Dictionary;
/**
* @Author: JinSheng Song
* @Date: 2022/8/5 15:21
*/
public class JsonUnits {
}

View File

@ -4,7 +4,6 @@ import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.domain_shate.LandUse;
import com.ruoyi.system.domain_shate.PlantingSuitability;
import com.ruoyi.system.domain_shate.UplodFile;
import com.ruoyi.system.domain_shate.VegetationHealth;
import com.ruoyi.system.service_shate.ILandUseServices;
import com.ruoyi.system.service_shate.IPlantingSuitabilityService;
import io.swagger.annotations.Api;
@ -57,10 +56,12 @@ public class PlantingSuitabilityController
@RequestMapping(value = "/InsertSuitability",method = {RequestMethod.POST})
public AjaxResult InsertSuitability(@RequestBody UplodFile uplodFile) {
for (int i=0;i<uplodFile.getPlantingSuitabilities().size();i++){
uplodFile.getPlantingSuitabilities().get(i).setYear(uplodFile.getPlantingSuitabilities().get(i).getImageDate().substring(0,4));
uplodFile.getPlantingSuitabilities().get(i).setImageDate(uplodFile.getPlantingSuitabilities().get(i).getImageDate().replace("-",""));
Integer Seeding =Service.InsertSeeding(uplodFile.getPlantingSuitabilities().get(i));
List<PlantingSuitability> value=uplodFile.getPlantingSuitabilities();
for (int i=0;i<value.size();i++){
String year=value.get(i).getImageDate().substring(0,4);
value.get(i).setYear(year);
value.get(i).setImageDate(value.get(i).getImageDate().replace("-",""));
Integer Seeding =Service.InsertSeeding(value.get(i));
}
return AjaxResult.success("成功!");
}

View File

@ -104,6 +104,7 @@ public class RegionalFactorController
/**
* 道路指数查询
* @return 实体类
@ -152,7 +153,8 @@ public class RegionalFactorController
public AjaxResult InsertWater(@RequestBody UplodFile uplodFile) {
List<WaterFactor> value=uplodFile.getWaterFactors();
for (int i=0;i<value.size();i++){
value.get(i).setYear(value.get(i).getImageDate().substring(0,4));
String year=value.get(i).getImageDate().substring(0,4);
value.get(i).setYear(year);
value.get(i).setImageDate(value.get(i).getImageDate().replace("-",""));
Integer Seeding = service.InsertWater(value.get(i));
}
@ -169,7 +171,8 @@ public class RegionalFactorController
List<RegionIndex> indices=uplodFile.getRegionIndexs();
for (int i=0;i<indices.size();i++){
indices.get(i).setYear(indices.get(i).getImageDate().substring(0,4));
String year=indices.get(i).getImageDate().substring(0,4);
indices.get(i).setYear(year);
indices.get(i).setImageDate(indices.get(i).getImageDate().replace("-",""));
Integer Seeding = service.InsertWaterArea(indices.get(i));
}
@ -185,7 +188,8 @@ public class RegionalFactorController
List<RegionIndex> indices=uplodFile.getRegionIndexs();
for (int i=0;i<indices.size();i++){
indices.get(i).setYear(indices.get(i).getImageDate().substring(0,4));
String year=indices.get(i).getImageDate().substring(0,4);
indices.get(i).setYear(year);
indices.get(i).setImageDate(indices.get(i).getImageDate().replace("-",""));
Integer Seeding = service.InsertRoadLength(indices.get(i));
}
@ -200,6 +204,8 @@ public class RegionalFactorController
public AjaxResult InsertRoad(@RequestBody UplodFile uplodFile) {
for (int i=0;i<uplodFile.getRoadFactors().size();i++){
String year=uplodFile.getRoadFactors().get(i).getImageDate().substring(0,4);
uplodFile.getRoadFactors().get(i).setYear(year);
uplodFile.getRoadFactors().get(i).setImageDate(uplodFile.getRoadFactors().get(i).getImageDate().replace("-",""));
Integer Seeding = service.InsertRoad(uplodFile.getRoadFactors().get(i));

View File

@ -65,7 +65,8 @@ public class SoilFactorController
public AjaxResult InsertDesert(@RequestBody UplodFile uplodFile) {
List<SoilDesertification> value=uplodFile.getSoilDesertifications();
for (int i=0;i<value.size();i++){
value.get(i).setYear(value.get(i).getImageDate().substring(0,4));
String year=value.get(i).getImageDate().substring(0,4);
value.get(i).setYear(year);
value.get(i).setImageDate(value.get(i).getImageDate().replace("-",""));
Integer Seeding = service.InsertDesert(value.get(i));
}
@ -81,7 +82,8 @@ public class SoilFactorController
public AjaxResult InsertSalin(@RequestBody UplodFile uplodFile) {
List<SoilSalinization> value=uplodFile.getSoilSalinizations();
for (int i=0;i<value.size();i++){
value.get(i).setYear(value.get(i).getImageDate().substring(0,4));
String year=value.get(i).getImageDate().substring(0,4);
value.get(i).setYear(year);
value.get(i).setImageDate(value.get(i).getImageDate().replace("-",""));
Integer Seeding = service.InsertSalin(value.get(i));
}
@ -97,7 +99,8 @@ public class SoilFactorController
List<SoilMoisture> value=uplodFile.getSoilMoistures();
for (int i=0;i<value.size();i++){
value.get(i).setYear(value.get(i).getImageDate().substring(0,4));
String year=value.get(i).getImageDate().substring(0,4);
value.get(i).setYear(year);
value.get(i).setImageDate(value.get(i).getImageDate().replace("-",""));
Integer Seeding = service.InsertMoisture(value.get(i));
}

View File

@ -37,26 +37,26 @@ public class TopographicFactorController {
Double Max=0.0;
for (Altitude ce : Seeding)
{
if (Max<ce.getLevel1())
{
Max= ce.getLevel1();
}
if (Max<ce.getLevel2())
{
Max=ce.getLevel2();
}
if (Max<ce.getLevel1())
{
Max= ce.getLevel1();
}
if (Max<ce.getLevel2())
{
Max=ce.getLevel2();
}
if (Max<ce.getLevel3())
{
Max=ce.getLevel3();
}
{
Max=ce.getLevel3();
}
if (Max<ce.getLevel4())
{
Max=ce.getLevel4();
}
if (Max<ce.getLevel5())
{
Max=ce.getLevel5();
}
{
Max=ce.getLevel4();
}
if (Max<ce.getLevel5())
{
Max=ce.getLevel5();
}
}
for (int i=0;i<Seeding.size();i++)
@ -136,7 +136,8 @@ public class TopographicFactorController {
public AjaxResult InsertAltitude(@RequestBody UplodFile uplodFile) {
List<Altitude> value=uplodFile.getAltitudes();
for (int i=0;i<value.size();i++){
value.get(i).setYear(value.get(i).getImageDate().substring(0,4));
String year=value.get(i).getImageDate().substring(0,4);
value.get(i).setYear(year);
value.get(i).setImageDate(value.get(i).getImageDate().replace("-",""));
Integer Seeding = service.InsertAltitude(value.get(i));
}
@ -152,7 +153,8 @@ public class TopographicFactorController {
public AjaxResult InsertAspect(@RequestBody UplodFile uplodFile) {
List<Aspect> value=uplodFile.getAspects();
for (int i=0;i<value.size();i++){
value.get(i).setYear(value.get(i).getImageDate().substring(0,4));
String year=value.get(i).getImageDate().substring(0,4);
value.get(i).setYear(year);
value.get(i).setImageDate(value.get(i).getImageDate().replace("-",""));
Integer Seeding = service.InsertAspect(value.get(i));
}
@ -168,7 +170,8 @@ public class TopographicFactorController {
List<Slope> value = uplodFile.getSlopes();
for (int i = 0; i < value.size(); i++) {
value.get(i).setYear(value.get(i).getImageDate().substring(0,4));
String year=value.get(i).getImageDate().substring(0,4);
value.get(i).setYear(year);
value.get(i).setImageDate(value.get(i).getImageDate().replace("-",""));
Integer Seeding = service.InsertSlope(value.get(i));
}

View File

@ -33,23 +33,23 @@ public class UploadFile
Integer num=0;
switch (Uplod)
{
case "Altitude":
case "Alt":
//海拔
num=seedingService.altitude(zone,imageDate);
break;
case "Aspect":
case "Asp":
//坡向
num=seedingService.aspect(zone,imageDate);
break;
case "Landuse":
case "Land":
//土地利用类型1
num=seedingService.landuse(zone,imageDate);
break;
case "Landuse_Planting":
case "Land_Plant":
//土地利用类型2
num=seedingService.landuse(zone,imageDate);
break;
case "Suitability":
case "Suit":
//种植适宜性
num=seedingService.suitability(zone,imageDate);
break;
@ -57,11 +57,11 @@ public class UploadFile
//道路指数
num=seedingService.road(zone,imageDate);
break;
case "Seed_Success":
case "Seed":
//种植适应性1
num=seedingService.seedSuccess(zone,imageDate);
break;
case "Vegetation_Distribution":
case "Veg":
//种植适宜性
num=seedingService.vegetationDistribution(zone,imageDate);
break;
@ -69,7 +69,7 @@ public class UploadFile
//坡度
num=seedingService.slope(zone,imageDate);
break;
case "Desertification":
case "Desert":
//土壤沙化指数
num=seedingService.desertification(zone,imageDate);
break;
@ -77,11 +77,11 @@ public class UploadFile
//土壤湿度指数
num=seedingService.moisture(zone,imageDate);
break;
case "Salinization":
case "Salt":
//土壤盐渍化指数
num=seedingService.salinization(zone,imageDate);
break;
case "Healthy":
case "Heal":
//植被健康状况
num=seedingService.healthy(zone,imageDate,resolution);
break;
@ -94,8 +94,9 @@ public class UploadFile
//土壤盐渍化指数
num=seedingService.waterArea(zone,imageDate);
break;
case "Road_length":
case "Road_len":
//植被健康状况
num=seedingService.roadLength(zone,imageDate);
break;
case "Climate_index":
//水分因素

View File

@ -1,6 +1,5 @@
package com.ruoyi.web.controller.shate;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.domain_shate.SeedingSuccessRate;
import com.ruoyi.system.domain_shate.UplodFile;
@ -39,11 +38,13 @@ public class VegetationHealthController {
{
String name="";
if (type!=null && type !=""){
if (type.equals("1")){
name="Medium%";
if (name.equals("1"))
{
name="M_Heal%";
}
else if(type.equals("2")){
name="High%";
else if(name.equals("2"))
{
name="H_Heal%";
}
}
List<VegetationHealth> Seeding= VegetationService.sqlSeeding(zone,name,year);
@ -67,6 +68,7 @@ public class VegetationHealthController {
@RequestMapping(value = "/InsertVegetation",method = {RequestMethod.POST})
public AjaxResult InsertVegetation(@RequestBody UplodFile uplodFile) {
List<VegetationHealth> value=uplodFile.getVegetationHealths();
for (int i=0;i<value.size();i++){
String year=value.get(i).getImageDate().substring(0,4);

View File

@ -6,11 +6,15 @@ spring:
driver-class-name: org.postgresql.Driver
druid:
master:
#url: jdbc:postgresql://172.16.123.212:5433/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
password: AQBSdU5bT27AKxAAvKoWQdGpSuNRCHjC4B8DVA
#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
username: sjs
password: song5325
#url: jdbc:postgresql://121.36.229.60:5432/saudiArabia?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=Asia/Shanghai
#username: sjs
#password: song5325
# 从库数据源
slave:
# 从数据源开关/默认关闭

View File

@ -9,7 +9,7 @@ ruoyi:
# 实例演示开关
demoEnabled: true
# 文件路径 示例( Windows配置D:/ruoyi/uploadPathLinux配置 /home/ruoyi/uploadPath
profile: /home/sjs/ruoyi/uploadPath
profile: /home/ruoyi/uploadPath
# 获取ip地址开关
addressEnabled: false
# 验证码类型 math 数组计算 char 字符验证
@ -18,8 +18,8 @@ ruoyi:
# 开发环境配置
server:
# 服务器的HTTP端口默认为8080
port: 6051
#port: 9800
#port: 6051
port: 9800
servlet:
# 应用的访问路径
context-path: /
@ -60,16 +60,16 @@ spring:
# redis 配置
redis:
# 地址
#host: 172.16.123.212
host: localhost
host: rs-middleware-redis
#host: localhost
# 端口默认为6379
#port: 14096
port: 6379
# 数据库索引
database: 0
# 密码
#password: SenseTime@2019
password: sdust2020
password: SenseTime@2019
#password: sdust2020
# 连接超时时间
timeout: 10s
lettuce:

View File

@ -17,7 +17,7 @@ public class UrlFileUpload {
public static String fileUpload(String FileUrl,String FileNamePath) throws IOException, InterruptedException {
System.out.println("下载文件!");
// 创建一个URL链接
URL url = new URL(FileUrl);

View File

@ -74,9 +74,10 @@ public class WeatherUtils {
String strRead = null;
URL url = new URL(serverURL);
HttpURLConnection connection = (HttpURLConnection)url.openConnection();
connection.setRequestMethod("POST");
connection.setRequestMethod("POST");//请求post方式
connection.setDoInput(true);
connection.setDoOutput(true);
//header内的的参数在这里set||connection.setRequestProperty("健, "");
connection.setRequestProperty("Content-Type", "application/json");
connection.connect();
OutputStreamWriter writer = new OutputStreamWriter(connection.getOutputStream(),"UTF-8");

View File

@ -23,11 +23,12 @@ public class Altitude extends SysSTEntity
private Double Level2;
private Double Level3;
private Double Level4;
private Double Level5;
private Double max;
private Double max;
private String imageDate;

View File

@ -26,12 +26,12 @@ public class Aspect extends SysSTEntity{
private Double southeast;
private Double max;
private Double south;
private Double southwest;
private Double max;
private Double west;
private Double northwest;

View File

@ -1,6 +1,6 @@
package com.ruoyi.system.domain_shate;
import java.time.LocalDateTime;
/**
@ -18,6 +18,7 @@ public class PlantingSuitability extends SysSTEntity
private String zone;
private Double max;
private Double verySuitable;
@ -31,7 +32,6 @@ public class PlantingSuitability extends SysSTEntity
private String total;
private Double max;
private String productCode1;

View File

@ -19,6 +19,8 @@ public class RoadFactor extends SysSTEntity
private String zone;
private Double max;
private Double Level1;
private Double Level2;
@ -29,8 +31,6 @@ public class RoadFactor extends SysSTEntity
private Double Level5;
private Double max;
private String imageDate;

View File

@ -31,7 +31,7 @@ public class SoilSalinization extends SysSTEntity
private String imageDate;
private String year1;
private String productCode1;
@ -165,4 +165,5 @@ public class SoilSalinization extends SysSTEntity
public void setYear(String year) {
this.year = year;
}
}

View File

@ -10,9 +10,6 @@ public class VegetationHealth extends SysSTEntity
{
private Integer id;
private Double max;
private String zone;
private Double healthy;
@ -25,6 +22,8 @@ public class VegetationHealth extends SysSTEntity
private String resolution;
private Double max;
private String imageDate;
private String productCode1;
@ -161,7 +160,6 @@ public class VegetationHealth extends SysSTEntity
this.year = year;
}
public String getResolution() {
return resolution;
}

View File

@ -19,6 +19,8 @@ public class WaterFactor extends SysSTEntity
private String zone;
private Double max;
private Double level1;
private Double level2;
@ -29,7 +31,6 @@ public class WaterFactor extends SysSTEntity
private Double level5;
private Double max;
private String imageDate;

View File

@ -15,11 +15,8 @@ public class paging {
private Integer pageSize;
private String zone;//区域
private String type;//类型1
private String type1;//类型2
private String type2;
private String type3;
@ -30,6 +27,7 @@ public class paging {
private String dateTime;
private List<Integer> ids;
public String getZone() {

View File

@ -13,53 +13,53 @@ import java.util.List;
public interface DateUploadMapper {
Integer altitude(@Param("zone") String zone,
@Param("imageDate") String imageDate);
@Param("imageDate") String imageDate);
Integer aspect(@Param("zone") String zone,
@Param("imageDate") String imageDate);
Integer landuse(@Param("zone") String zone,
@Param("imageDate") String imageDate);
@Param("imageDate") String imageDate);
Integer suitability(@Param("zone") String zone,
@Param("imageDate") String imageDate);
@Param("imageDate") String imageDate);
Integer road(@Param("zone") String zone,
@Param("imageDate") String imageDate);
@Param("imageDate") String imageDate);
Integer seedSuccess(@Param("zone") String zone,
@Param("imageDate") String imageDate);
@Param("imageDate") String imageDate);
Integer vegetationDistribution(@Param("zone") String zone,
@Param("imageDate") String imageDate);
@Param("imageDate") String imageDate);
Integer slope(@Param("zone") String zone,
@Param("imageDate") String imageDate);
@Param("imageDate") String imageDate);
Integer desertification(@Param("zone") String zone,
@Param("imageDate") String imageDate);
@Param("imageDate") String imageDate);
Integer moisture(@Param("zone") String zone,
@Param("imageDate") String imageDate);
@Param("imageDate") String imageDate);
Integer salinization(@Param("zone") String zone,
@Param("imageDate") String imageDate);
@Param("imageDate") String imageDate);
Integer healthy(@Param("zone") String zone,
@Param("imageDate") String imageDate,
@Param("imageDate") String imageDate,
@Param("resolution") String resolution);
Integer water(@Param("zone") String zone,
@Param("imageDate") String imageDate);
@Param("imageDate") String imageDate);
Integer waterArea(@Param("zone") String zone,
@Param("imageDate") String imageDate);
@Param("imageDate") String imageDate);
Integer roadLength(@Param("zone") String zone,
@Param("imageDate") String imageDate);
@Param("imageDate") String imageDate);
Integer climateIndex(@Param("zone") String zone,
@Param("imageDate") String imageDate);
@Param("imageDate") String imageDate);
List<DateUpload> selectUpload(@Param("zone") String zone,
@Param("type") String type,
@ -71,13 +71,13 @@ public interface DateUploadMapper {
@Param("dateTime") String dateTime);
DateUpload selectShpfile(@Param("zone") String zone,
@Param("type") String type,
@Param("dateTime") String dateTime,
@Param("year") String year);
@Param("type") String type,
@Param("dateTime") String dateTime,
@Param("year") String year);
DateUpload selectShp(@Param("zone") String zone,
@Param("type") String type,
@Param("dateTime") String dateTime);
@Param("type") String type,
@Param("dateTime") String dateTime);
Integer DelUpload(@Param("id") Integer id);

View File

@ -6,6 +6,7 @@ import org.apache.ibatis.annotations.Param;
import java.time.LocalDate;
import java.util.Date;
import java.util.List;
import java.util.StringTokenizer;
/**
* @Author: JinSheng Song
@ -37,36 +38,36 @@ public interface IDateUploadService {
DateUpload selectDel(Integer id);
Integer altitude( String zone,
String imageDate);
Integer aspect( String zone,
String imageDate);
Integer landuse( String zone,
String imageDate);
Integer aspect( String zone,
String imageDate);
Integer landuse( String zone,
String imageDate);
Integer suitability( String zone,
String imageDate);
Integer road( String zone,
String imageDate);
Integer seedSuccess( String zone,
String imageDate);
Integer vegetationDistribution( String zone,
String imageDate);
Integer slope( String zone,
String imageDate);
Integer desertification( String zone,
String imageDate);
Integer moisture( String zone,
String imageDate);
Integer salinization( String zone,
String imageDate);
Integer healthy( String zone,
String imageDate,
String resolution);
Integer water( String zone,
String imageDate);
Integer waterArea( String zone,
String imageDate);
Integer roadLength( String zone,
String imageDate);
Integer road( String zone,
String imageDate);
Integer seedSuccess( String zone,
String imageDate);
Integer vegetationDistribution( String zone,
String imageDate);
Integer slope( String zone,
String imageDate);
Integer desertification( String zone,
String imageDate);
Integer moisture( String zone,
String imageDate);
Integer salinization( String zone,
String imageDate);
Integer healthy(String zone,
String imageDate,
String resolution);
Integer water( String zone,
String imageDate);
Integer waterArea( String zone,
String imageDate);
Integer roadLength( String zone,
String imageDate);
Integer climateIndex( String zone,
String imageDate);
String imageDate);
}

View File

@ -55,9 +55,9 @@
AND type = #{type}
</if>
<!-- <if test="dateTime!= null and dateTime !=''">-->
<!-- AND data_time = #{dateTime}-->
<!-- </if>-->
<!-- <if test="dateTime!= null and dateTime !=''">-->
<!-- AND data_time = #{dateTime}-->
<!-- </if>-->
</select>
@ -91,10 +91,11 @@
<if test="name!= null and name !=''">
AND file_name like #{name}
</if>
<if test="dateTime!= null and dateTime !=''">
AND data_Time = #{dateTime}
</if>
<if test="dateTime != null and dateTime !=''">
AND data_time=#{dateTime}
</if>
ORDER BY created_time desc
</select>
<select id="selectShpfile" resultMap="RM_Upload">
@ -243,7 +244,7 @@
</delete>
<delete id="vegetationDistribution">
DELETE FROM "vegetation_Distrbution"
DELETE FROM "vegetation_Distribution"
WHERE zone = #{zone}
and image_date =#{imageDate}
</delete>
@ -275,8 +276,8 @@
<delete id="healthy">
DELETE FROM healthy
WHERE zone = #{zone}
and image_date =#{imageDate}
and resolution=#{resolution}
and image_date =#{imageDate}
and resolution=#{resolution}
</delete>
<delete id="water">

View File

@ -52,7 +52,7 @@
</select>
<select id="sqlYear" resultMap="RM_Seeding">
SELECT distinct year1,ZONE FROM landuse ORDER BY ZONE
SELECT distinct year1,ZONE FROM landuse ORDER BY ZONE
</select>
<insert id="insertSeeding">

View File

@ -57,7 +57,7 @@
#{verySuitable,jdbcType=DOUBLE},
#{suitable,jdbcType=DOUBLE},
#{notSuitable,jdbcType=DOUBLE},
#{totalArea,jdbcType=DOUBLE},
#{totalArea,jdbcType=DOUBLE},
#{imageDate,jdbcType=VARCHAR},
#{productCode1,jdbcType=VARCHAR},
#{productCode2,jdbcType=VARCHAR},

View File

@ -97,9 +97,9 @@
</select>
<select id="sqlRegion" resultMap="RM_Region">
select a.zone zone,a.year1 year1,a.water_area water_area,
b.road_length road_length,a.image_date image_date,
a.product_code product_code,b.product_code product_code1
select a.zone as zone,a.year1 as year1,a.water_area as water_area,
b.road_length as road_length,a.image_date as image_date,
a.product_code as product_code,b.product_code as product_code1
FROM water_area a join road_length b
on a.image_date=b.image_date
and a.zone=b.zone

View File

@ -27,14 +27,14 @@
</sql>
<select id="sqlSeeding" resultMap="RM_Seeding">
select distinct a.product_code2 Product_code2,
a.zone zone,
a.seeding_success_rate seeding_success,
a.product_code1 productCode1,
a.image_date Image_date,
b.seeding_success_area Seeding_success_area,
b.product_code2 Product_code3,
a.year1 year1
select distinct a.product_code2 as Product_code2,
a.zone as zone,
a.seeding_success_rate as seeding_success,
a.product_code1 as productCode1,
a.image_date as Image_date,
b.seeding_success_area as Seeding_success_area,
b.product_code2 as Product_code3,
a.year1 as year1
from "seed_Success" a
left join "vegetation_Distribution" b
on a.image_date=b.image_date

View File

@ -56,7 +56,7 @@
<sql id="columns">
<![CDATA[
ID,zone,healthy,year1,Normal,Not_Healthy,Total_Area,Image_date,Product_code1,Product_code2,Product_code3,created_by,created_time
ID,zone,healthy,resolution,year1,Normal,Not_Healthy,Total_Area,Image_date,Product_code1,Product_code2,Product_code3,created_by,created_time
]]>
</sql>