diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..fbcab77 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +custom: http://doc.ruoyi.vip/ruoyi-vue/other/donate.html diff --git a/route.xml b/route.xml index 2f22650..26ef2cf 100644 --- a/route.xml +++ b/route.xml @@ -2,28 +2,27 @@ - E:\沙特\EXE\exe\shate.exe + /home/sjs/ruoyi/shate/main - E:\沙特\EXE\temp + /home/sjs/ruoyi/shate - /rs-warehouse/temporary/images/ + /home/sjs/ruoyi/shate - - /rs-warehouse/temporary/vectors/ + /home/sjs/ruoyi/shate diff --git a/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java b/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java index 005c288..a65dc14 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java @@ -1,14 +1,18 @@ package com.ruoyi; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.utils.file.WeatherUtils; +import com.fasterxml.jackson.datatype.jsr310.deser.InstantDeserializer; +import com.mysql.cj.x.protobuf.MysqlxDatatypes; 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; /** @@ -27,9 +31,13 @@ public class RuoYiApplication SpringApplication.run(RuoYiApplication.class, args); System.out.println(); System.out.println(" --->>>启动成功!<<<---"); + + } + + } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/shate/DateUploadController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/shate/DateUploadController.java index 4f3ad3c..c0e9bc0 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/shate/DateUploadController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/shate/DateUploadController.java @@ -56,8 +56,6 @@ public class DateUploadController private String FilePaths; - private String ShpPaths; - @RequestMapping(value = "/SelectUpload",method = {RequestMethod.POST}) public AjaxResult SelectUpload(@RequestBody paging paging) @@ -70,19 +68,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="M_Heal"; + name="Medium%"; } else if(name.equals("2")) { - name="H_Heal%"; + name="High%"; } } @@ -103,6 +101,7 @@ public class DateUploadController @RequestMapping(value = "/delUpload",method = {RequestMethod.POST}) public AjaxResult DelUpload(@RequestBody UplodFile uplodFile) { + return delUploadFile(uplodFile.getId()); // List ids=uplodFile.getId(); // Integer Seeding=0; @@ -123,7 +122,11 @@ public class DateUploadController } - + /** + * 删除 + * @param id + * @return + */ @RequestMapping(value = "/delUpload1",method = {RequestMethod.DELETE}) public AjaxResult DelUpload1(@RequestParam("id") List id) { @@ -139,20 +142,11 @@ public class DateUploadController } - @RequestMapping(value = "/InitShp",method = {RequestMethod.POST}) - public AjaxResult InitShp(@RequestBody UplodFile uplodFile) - { - List dateUploads=infr(uplodFile.getDateUploads()); - - for (int i=0; i infr(List dateUpload) { for (int i=0;i value=uplodFile.getPlantingSuitabilities(); - for (int i=0;i value=uplodFile.getWaterFactors(); for (int i=0;i indices=uplodFile.getRegionIndexs(); for (int i=0;i indices=uplodFile.getRegionIndexs(); for (int i=0;i value=uplodFile.getSoilDesertifications(); for (int i=0;i value=uplodFile.getSoilSalinizations(); for (int i=0;i value=uplodFile.getSoilMoistures(); for (int i=0;i value=uplodFile.getAltitudes(); for (int i=0;i value=uplodFile.getAspects(); for (int i=0;i value = uplodFile.getSlopes(); 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).setYear(value.get(i).getImageDate().substring(0,4)); value.get(i).setImageDate(value.get(i).getImageDate().replace("-","")); Integer Seeding = service.InsertSlope(value.get(i)); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/shate/UploadFile.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/shate/UploadFile.java index ea28218..36d9777 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/shate/UploadFile.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/shate/UploadFile.java @@ -33,23 +33,23 @@ public class UploadFile Integer num=0; switch (Uplod) { - case "Alt": + case "Altitude": //海拔 num=seedingService.altitude(zone,imageDate); break; - case "Asp": + case "Aspect": //坡向 num=seedingService.aspect(zone,imageDate); break; - case "Land": + case "Landuse": //土地利用类型1 num=seedingService.landuse(zone,imageDate); break; - case "Land_Plant": + case "Landuse_Planting": //土地利用类型2 num=seedingService.landuse(zone,imageDate); break; - case "Suit": + case "Suitability": //种植适宜性 num=seedingService.suitability(zone,imageDate); break; @@ -57,11 +57,11 @@ public class UploadFile //道路指数 num=seedingService.road(zone,imageDate); break; - case "Seed": + case "Seed_Success": //种植适应性1 num=seedingService.seedSuccess(zone,imageDate); break; - case "Veg": + case "Vegetation_Distribution": //种植适宜性 num=seedingService.vegetationDistribution(zone,imageDate); break; @@ -69,7 +69,7 @@ public class UploadFile //坡度 num=seedingService.slope(zone,imageDate); break; - case "Desert": + case "Desertification": //土壤沙化指数 num=seedingService.desertification(zone,imageDate); break; @@ -77,11 +77,11 @@ public class UploadFile //土壤湿度指数 num=seedingService.moisture(zone,imageDate); break; - case "Salt": + case "Salinization": //土壤盐渍化指数 num=seedingService.salinization(zone,imageDate); break; - case "Heal": + case "Healthy": //植被健康状况 num=seedingService.healthy(zone,imageDate,resolution); break; @@ -94,9 +94,8 @@ public class UploadFile //土壤盐渍化指数 num=seedingService.waterArea(zone,imageDate); break; - case "Road_len": + case "Road_length": //植被健康状况 - num=seedingService.roadLength(zone,imageDate); break; case "Climate_index": //水分因素 diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/shate/VegetationHealthController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/shate/VegetationHealthController.java index d671dc2..8c01bf6 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/shate/VegetationHealthController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/shate/VegetationHealthController.java @@ -1,5 +1,6 @@ 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; @@ -38,13 +39,11 @@ public class VegetationHealthController { { String name=""; if (type!=null && type !=""){ - if (name.equals("1")) - { - name="M_Heal%"; + if (type.equals("1")){ + name="Medium%"; } - else if(name.equals("2")) - { - name="H_Heal%"; + else if(type.equals("2")){ + name="High%"; } } List Seeding= VegetationService.sqlSeeding(zone,name,year); @@ -68,7 +67,6 @@ public class VegetationHealthController { @RequestMapping(value = "/InsertVegetation",method = {RequestMethod.POST}) public AjaxResult InsertVegetation(@RequestBody UplodFile uplodFile) { - List value=uplodFile.getVegetationHealths(); for (int i=0;i ids; public String getZone() { diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper_shate/DateUploadMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper_shate/DateUploadMapper.java index d7add0b..a850949 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper_shate/DateUploadMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper_shate/DateUploadMapper.java @@ -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 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); diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service_shate/IDateUploadService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service_shate/IDateUploadService.java index 60d28d7..9fe5af7 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service_shate/IDateUploadService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service_shate/IDateUploadService.java @@ -6,7 +6,6 @@ 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 @@ -38,36 +37,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 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 climateIndex( String zone, + 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 climateIndex( String zone, + String imageDate); } diff --git a/ruoyi-system/src/main/resources/mapper/system/DateUploadMapper.xml b/ruoyi-system/src/main/resources/mapper/system/DateUploadMapper.xml index 41177b7..9e0d94c 100644 --- a/ruoyi-system/src/main/resources/mapper/system/DateUploadMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/DateUploadMapper.xml @@ -55,9 +55,9 @@ AND type = #{type} - - - + + + @@ -91,11 +91,10 @@ AND file_name like #{name} - - - AND data_time=#{dateTime} + + AND data_Time = #{dateTime} - ORDER BY created_time desc + diff --git a/ruoyi-system/src/main/resources/mapper/system/PlantingSuitabilityMapper.xml b/ruoyi-system/src/main/resources/mapper/system/PlantingSuitabilityMapper.xml index 47517ec..f87b5ef 100644 --- a/ruoyi-system/src/main/resources/mapper/system/PlantingSuitabilityMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/PlantingSuitabilityMapper.xml @@ -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}, diff --git a/ruoyi-system/src/main/resources/mapper/system/RegionalFactorMapper.xml b/ruoyi-system/src/main/resources/mapper/system/RegionalFactorMapper.xml index e1230a6..20c5997 100644 --- a/ruoyi-system/src/main/resources/mapper/system/RegionalFactorMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/RegionalFactorMapper.xml @@ -97,9 +97,9 @@ - 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 + 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 from "seed_Success" a left join "vegetation_Distribution" b on a.image_date=b.image_date diff --git a/ruoyi-system/src/main/resources/mapper/system/VegetationHealthMapper.xml b/ruoyi-system/src/main/resources/mapper/system/VegetationHealthMapper.xml index 18390c1..7d36c0c 100644 --- a/ruoyi-system/src/main/resources/mapper/system/VegetationHealthMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/VegetationHealthMapper.xml @@ -56,7 +56,7 @@