Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 48e607e8b1 | |||
| cf9644ef29 | |||
| a4e9124c1e | |||
| 1b1088f683 | |||
| 6c336b6513 |
@@ -1 +0,0 @@
|
|||||||
custom: http://doc.ruoyi.vip/ruoyi-vue/other/donate.html
|
|
||||||
Binary file not shown.
@@ -2,27 +2,28 @@
|
|||||||
<Rodel>
|
<Rodel>
|
||||||
<path>
|
<path>
|
||||||
<exepath>
|
<exepath>
|
||||||
/home/sjs/ruoyi/shate/main
|
E:\沙特\EXE\exe\shate.exe
|
||||||
</exepath>
|
</exepath>
|
||||||
|
|
||||||
</path>
|
</path>
|
||||||
|
|
||||||
<path>
|
<path>
|
||||||
<exepath>
|
<exepath>
|
||||||
/home/sjs/ruoyi/shate
|
E:\沙特\EXE\temp
|
||||||
</exepath>
|
</exepath>
|
||||||
|
|
||||||
</path>
|
</path>
|
||||||
|
|
||||||
<path>
|
<path>
|
||||||
<exepath>
|
<exepath>
|
||||||
/home/sjs/ruoyi/shate
|
/rs-warehouse/temporary/images/
|
||||||
</exepath>
|
</exepath>
|
||||||
|
|
||||||
</path>
|
</path>
|
||||||
|
|
||||||
<path>
|
<path>
|
||||||
<exepath>
|
<exepath>
|
||||||
/home/sjs/ruoyi/shate
|
/rs-warehouse/temporary/vectors/
|
||||||
</exepath>
|
</exepath>
|
||||||
|
|
||||||
</path>
|
</path>
|
||||||
|
|||||||
+9
-14
@@ -18,23 +18,15 @@
|
|||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
<groupId>org.apache.poi</groupId>
|
||||||
<groupId>org.apache.poi</groupId>
|
<artifactId>poi</artifactId>
|
||||||
|
<version>4.1.2</version>
|
||||||
<artifactId>poi</artifactId>
|
|
||||||
|
|
||||||
<version>4.0.1</version>
|
|
||||||
|
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
<groupId>org.apache.poi</groupId>
|
||||||
<groupId>org.apache.poi</groupId>
|
<artifactId>poi-ooxml</artifactId>
|
||||||
|
<version>4.1.2</version>
|
||||||
<artifactId>poi-ooxml</artifactId>
|
|
||||||
|
|
||||||
<version>4.0.1</version>
|
|
||||||
|
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
@@ -93,6 +85,9 @@
|
|||||||
<artifactId>ruoyi-generator</artifactId>
|
<artifactId>ruoyi-generator</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|||||||
@@ -1,18 +1,14 @@
|
|||||||
package com.ruoyi;
|
package com.ruoyi;
|
||||||
|
|
||||||
import com.fasterxml.jackson.datatype.jsr310.deser.InstantDeserializer;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.mysql.cj.x.protobuf.MysqlxDatatypes;
|
import com.ruoyi.common.utils.file.WeatherUtils;
|
||||||
import org.mybatis.spring.annotation.MapperScan;
|
import org.mybatis.spring.annotation.MapperScan;
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||||
import org.springframework.util.ObjectUtils;
|
import org.springframework.util.ObjectUtils;
|
||||||
import org.springframework.util.ResourceUtils;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.time.LocalDate;
|
||||||
import java.io.FileNotFoundException;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -27,17 +23,14 @@ public class RuoYiApplication
|
|||||||
public static void main(String[] args)
|
public static void main(String[] args)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
// System.setProperty("spring.devtools.restart.enabled", "false");
|
// System.setProperty("spring.devtools.restart.enabled", "false");
|
||||||
SpringApplication.run(RuoYiApplication.class, args);
|
SpringApplication.run(RuoYiApplication.class, args);
|
||||||
System.out.println();
|
System.out.println();
|
||||||
System.out.println(" --->>>启动成功!<<<---");
|
System.out.println(" --->>>启动成功!<<<---");
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+550
-266
File diff suppressed because it is too large
Load Diff
@@ -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 {
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -10,6 +10,7 @@ import io.swagger.annotations.ApiOperation;
|
|||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.time.LocalDate;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
@@ -34,6 +35,14 @@ public class LandUseController {
|
|||||||
@RequestMapping(value = "/SelectSeeding",method = {RequestMethod.POST})
|
@RequestMapping(value = "/SelectSeeding",method = {RequestMethod.POST})
|
||||||
public AjaxResult SelectSeeding(@RequestBody HelpLandUse user)
|
public AjaxResult SelectSeeding(@RequestBody HelpLandUse user)
|
||||||
{
|
{
|
||||||
|
// LocalDate tomorrow = LocalDate.of(2022,10,2);
|
||||||
|
// LocalDate today = LocalDate.now();
|
||||||
|
//
|
||||||
|
// if(tomorrow.isAfter(today)==false)
|
||||||
|
// {
|
||||||
|
// return AjaxResult.error("软件授权日期已过,请联系管理人员!");
|
||||||
|
// }
|
||||||
|
|
||||||
if(user.getLandUses().length==0)
|
if(user.getLandUses().length==0)
|
||||||
{
|
{
|
||||||
List<LandUse> Seeding= Service.sqlSeeding1(user.getZone(),user.getYear());
|
List<LandUse> Seeding= Service.sqlSeeding1(user.getZone(),user.getYear());
|
||||||
|
|||||||
+15
-5
@@ -4,7 +4,6 @@ import com.ruoyi.common.core.domain.AjaxResult;
|
|||||||
import com.ruoyi.system.domain_shate.LandUse;
|
import com.ruoyi.system.domain_shate.LandUse;
|
||||||
import com.ruoyi.system.domain_shate.PlantingSuitability;
|
import com.ruoyi.system.domain_shate.PlantingSuitability;
|
||||||
import com.ruoyi.system.domain_shate.UplodFile;
|
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.ILandUseServices;
|
||||||
import com.ruoyi.system.service_shate.IPlantingSuitabilityService;
|
import com.ruoyi.system.service_shate.IPlantingSuitabilityService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
@@ -15,6 +14,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
|||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.time.LocalDate;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -37,6 +37,14 @@ public class PlantingSuitabilityController
|
|||||||
@RequestMapping(value = "/SelectSeeding",method = {RequestMethod.GET})
|
@RequestMapping(value = "/SelectSeeding",method = {RequestMethod.GET})
|
||||||
public AjaxResult SelectSeeding(String zone)
|
public AjaxResult SelectSeeding(String zone)
|
||||||
{
|
{
|
||||||
|
// LocalDate tomorrow = LocalDate.of(2022,10,2);
|
||||||
|
// LocalDate today = LocalDate.now();
|
||||||
|
//
|
||||||
|
// if(tomorrow.isAfter(today)==false)
|
||||||
|
// {
|
||||||
|
// return AjaxResult.error("软件授权日期已过,请联系管理人员!");
|
||||||
|
// }
|
||||||
|
|
||||||
List<PlantingSuitability> Seeding= Service.sqlSeeding(zone);
|
List<PlantingSuitability> Seeding= Service.sqlSeeding(zone);
|
||||||
Double Number=0.0;
|
Double Number=0.0;
|
||||||
Double Max=0.0;
|
Double Max=0.0;
|
||||||
@@ -57,10 +65,12 @@ public class PlantingSuitabilityController
|
|||||||
|
|
||||||
@RequestMapping(value = "/InsertSuitability",method = {RequestMethod.POST})
|
@RequestMapping(value = "/InsertSuitability",method = {RequestMethod.POST})
|
||||||
public AjaxResult InsertSuitability(@RequestBody UplodFile uplodFile) {
|
public AjaxResult InsertSuitability(@RequestBody UplodFile uplodFile) {
|
||||||
for (int i=0;i<uplodFile.getPlantingSuitabilities().size();i++){
|
List<PlantingSuitability> value=uplodFile.getPlantingSuitabilities();
|
||||||
uplodFile.getPlantingSuitabilities().get(i).setYear(uplodFile.getPlantingSuitabilities().get(i).getImageDate().substring(0,4));
|
for (int i=0;i<value.size();i++){
|
||||||
uplodFile.getPlantingSuitabilities().get(i).setImageDate(uplodFile.getPlantingSuitabilities().get(i).getImageDate().replace("-",""));
|
String year=value.get(i).getImageDate().substring(0,4);
|
||||||
Integer Seeding =Service.InsertSeeding(uplodFile.getPlantingSuitabilities().get(i));
|
value.get(i).setYear(year);
|
||||||
|
value.get(i).setImageDate(value.get(i).getImageDate().replace("-",""));
|
||||||
|
Integer Seeding =Service.InsertSeeding(value.get(i));
|
||||||
}
|
}
|
||||||
return AjaxResult.success("成功!");
|
return AjaxResult.success("成功!");
|
||||||
}
|
}
|
||||||
|
|||||||
+9
-3
@@ -104,6 +104,7 @@ public class RegionalFactorController
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 道路指数查询
|
* 道路指数查询
|
||||||
* @return 实体类
|
* @return 实体类
|
||||||
@@ -152,7 +153,8 @@ public class RegionalFactorController
|
|||||||
public AjaxResult InsertWater(@RequestBody UplodFile uplodFile) {
|
public AjaxResult InsertWater(@RequestBody UplodFile uplodFile) {
|
||||||
List<WaterFactor> value=uplodFile.getWaterFactors();
|
List<WaterFactor> value=uplodFile.getWaterFactors();
|
||||||
for (int i=0;i<value.size();i++){
|
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("-",""));
|
value.get(i).setImageDate(value.get(i).getImageDate().replace("-",""));
|
||||||
Integer Seeding = service.InsertWater(value.get(i));
|
Integer Seeding = service.InsertWater(value.get(i));
|
||||||
}
|
}
|
||||||
@@ -169,7 +171,8 @@ public class RegionalFactorController
|
|||||||
|
|
||||||
List<RegionIndex> indices=uplodFile.getRegionIndexs();
|
List<RegionIndex> indices=uplodFile.getRegionIndexs();
|
||||||
for (int i=0;i<indices.size();i++){
|
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("-",""));
|
indices.get(i).setImageDate(indices.get(i).getImageDate().replace("-",""));
|
||||||
Integer Seeding = service.InsertWaterArea(indices.get(i));
|
Integer Seeding = service.InsertWaterArea(indices.get(i));
|
||||||
}
|
}
|
||||||
@@ -185,7 +188,8 @@ public class RegionalFactorController
|
|||||||
|
|
||||||
List<RegionIndex> indices=uplodFile.getRegionIndexs();
|
List<RegionIndex> indices=uplodFile.getRegionIndexs();
|
||||||
for (int i=0;i<indices.size();i++){
|
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("-",""));
|
indices.get(i).setImageDate(indices.get(i).getImageDate().replace("-",""));
|
||||||
Integer Seeding = service.InsertRoadLength(indices.get(i));
|
Integer Seeding = service.InsertRoadLength(indices.get(i));
|
||||||
}
|
}
|
||||||
@@ -200,6 +204,8 @@ public class RegionalFactorController
|
|||||||
public AjaxResult InsertRoad(@RequestBody UplodFile uplodFile) {
|
public AjaxResult InsertRoad(@RequestBody UplodFile uplodFile) {
|
||||||
|
|
||||||
for (int i=0;i<uplodFile.getRoadFactors().size();i++){
|
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("-",""));
|
uplodFile.getRoadFactors().get(i).setImageDate(uplodFile.getRoadFactors().get(i).getImageDate().replace("-",""));
|
||||||
Integer Seeding = service.InsertRoad(uplodFile.getRoadFactors().get(i));
|
Integer Seeding = service.InsertRoad(uplodFile.getRoadFactors().get(i));
|
||||||
|
|
||||||
|
|||||||
@@ -65,7 +65,8 @@ public class SoilFactorController
|
|||||||
public AjaxResult InsertDesert(@RequestBody UplodFile uplodFile) {
|
public AjaxResult InsertDesert(@RequestBody UplodFile uplodFile) {
|
||||||
List<SoilDesertification> value=uplodFile.getSoilDesertifications();
|
List<SoilDesertification> value=uplodFile.getSoilDesertifications();
|
||||||
for (int i=0;i<value.size();i++){
|
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("-",""));
|
value.get(i).setImageDate(value.get(i).getImageDate().replace("-",""));
|
||||||
Integer Seeding = service.InsertDesert(value.get(i));
|
Integer Seeding = service.InsertDesert(value.get(i));
|
||||||
}
|
}
|
||||||
@@ -81,7 +82,8 @@ public class SoilFactorController
|
|||||||
public AjaxResult InsertSalin(@RequestBody UplodFile uplodFile) {
|
public AjaxResult InsertSalin(@RequestBody UplodFile uplodFile) {
|
||||||
List<SoilSalinization> value=uplodFile.getSoilSalinizations();
|
List<SoilSalinization> value=uplodFile.getSoilSalinizations();
|
||||||
for (int i=0;i<value.size();i++){
|
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("-",""));
|
value.get(i).setImageDate(value.get(i).getImageDate().replace("-",""));
|
||||||
Integer Seeding = service.InsertSalin(value.get(i));
|
Integer Seeding = service.InsertSalin(value.get(i));
|
||||||
}
|
}
|
||||||
@@ -97,7 +99,8 @@ public class SoilFactorController
|
|||||||
|
|
||||||
List<SoilMoisture> value=uplodFile.getSoilMoistures();
|
List<SoilMoisture> value=uplodFile.getSoilMoistures();
|
||||||
for (int i=0;i<value.size();i++){
|
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("-",""));
|
value.get(i).setImageDate(value.get(i).getImageDate().replace("-",""));
|
||||||
Integer Seeding = service.InsertMoisture(value.get(i));
|
Integer Seeding = service.InsertMoisture(value.get(i));
|
||||||
}
|
}
|
||||||
|
|||||||
+24
-22
@@ -37,27 +37,26 @@ public class TopographicFactorController {
|
|||||||
Double Max=0.0;
|
Double Max=0.0;
|
||||||
for (Altitude ce : Seeding)
|
for (Altitude ce : Seeding)
|
||||||
{
|
{
|
||||||
if (Max<ce.getLevel1())
|
if (Max<ce.getLevel1())
|
||||||
{
|
{
|
||||||
Max= ce.getLevel1();
|
Max= ce.getLevel1();
|
||||||
}
|
}
|
||||||
if (Max<ce.getLevel2())
|
if (Max<ce.getLevel2())
|
||||||
{
|
{
|
||||||
Max=ce.getLevel2();
|
Max=ce.getLevel2();
|
||||||
}
|
}
|
||||||
if (Max<ce.getLevel3())
|
if (Max<ce.getLevel3())
|
||||||
{
|
{
|
||||||
Max=ce.getLevel3();
|
Max=ce.getLevel3();
|
||||||
}
|
}
|
||||||
if (Max<ce.getLevel4())
|
if (Max<ce.getLevel4())
|
||||||
{
|
{
|
||||||
Max=ce.getLevel4();
|
Max=ce.getLevel4();
|
||||||
}
|
}
|
||||||
if (Max<ce.getLevel5())
|
if (Max<ce.getLevel5())
|
||||||
{
|
{
|
||||||
Max=ce.getLevel5();
|
Max=ce.getLevel5();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
for (int i=0;i<Seeding.size();i++)
|
for (int i=0;i<Seeding.size();i++)
|
||||||
{
|
{
|
||||||
@@ -136,7 +135,8 @@ public class TopographicFactorController {
|
|||||||
public AjaxResult InsertAltitude(@RequestBody UplodFile uplodFile) {
|
public AjaxResult InsertAltitude(@RequestBody UplodFile uplodFile) {
|
||||||
List<Altitude> value=uplodFile.getAltitudes();
|
List<Altitude> value=uplodFile.getAltitudes();
|
||||||
for (int i=0;i<value.size();i++){
|
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("-",""));
|
value.get(i).setImageDate(value.get(i).getImageDate().replace("-",""));
|
||||||
Integer Seeding = service.InsertAltitude(value.get(i));
|
Integer Seeding = service.InsertAltitude(value.get(i));
|
||||||
}
|
}
|
||||||
@@ -152,7 +152,8 @@ public class TopographicFactorController {
|
|||||||
public AjaxResult InsertAspect(@RequestBody UplodFile uplodFile) {
|
public AjaxResult InsertAspect(@RequestBody UplodFile uplodFile) {
|
||||||
List<Aspect> value=uplodFile.getAspects();
|
List<Aspect> value=uplodFile.getAspects();
|
||||||
for (int i=0;i<value.size();i++){
|
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("-",""));
|
value.get(i).setImageDate(value.get(i).getImageDate().replace("-",""));
|
||||||
Integer Seeding = service.InsertAspect(value.get(i));
|
Integer Seeding = service.InsertAspect(value.get(i));
|
||||||
}
|
}
|
||||||
@@ -168,7 +169,8 @@ public class TopographicFactorController {
|
|||||||
|
|
||||||
List<Slope> value = uplodFile.getSlopes();
|
List<Slope> value = uplodFile.getSlopes();
|
||||||
for (int i = 0; i < value.size(); i++) {
|
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("-",""));
|
value.get(i).setImageDate(value.get(i).getImageDate().replace("-",""));
|
||||||
Integer Seeding = service.InsertSlope(value.get(i));
|
Integer Seeding = service.InsertSlope(value.get(i));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,23 +33,23 @@ public class UploadFile
|
|||||||
Integer num=0;
|
Integer num=0;
|
||||||
switch (Uplod)
|
switch (Uplod)
|
||||||
{
|
{
|
||||||
case "Altitude":
|
case "Alt":
|
||||||
//海拔
|
//海拔
|
||||||
num=seedingService.altitude(zone,imageDate);
|
num=seedingService.altitude(zone,imageDate);
|
||||||
break;
|
break;
|
||||||
case "Aspect":
|
case "Asp":
|
||||||
//坡向
|
//坡向
|
||||||
num=seedingService.aspect(zone,imageDate);
|
num=seedingService.aspect(zone,imageDate);
|
||||||
break;
|
break;
|
||||||
case "Landuse":
|
case "Land":
|
||||||
//土地利用类型1
|
//土地利用类型1
|
||||||
num=seedingService.landuse(zone,imageDate);
|
num=seedingService.landuse(zone,imageDate);
|
||||||
break;
|
break;
|
||||||
case "Landuse_Planting":
|
case "Land_Plant":
|
||||||
//土地利用类型2
|
//土地利用类型2
|
||||||
num=seedingService.landuse(zone,imageDate);
|
num=seedingService.landuse(zone,imageDate);
|
||||||
break;
|
break;
|
||||||
case "Suitability":
|
case "Suit":
|
||||||
//种植适宜性
|
//种植适宜性
|
||||||
num=seedingService.suitability(zone,imageDate);
|
num=seedingService.suitability(zone,imageDate);
|
||||||
break;
|
break;
|
||||||
@@ -57,11 +57,11 @@ public class UploadFile
|
|||||||
//道路指数
|
//道路指数
|
||||||
num=seedingService.road(zone,imageDate);
|
num=seedingService.road(zone,imageDate);
|
||||||
break;
|
break;
|
||||||
case "Seed_Success":
|
case "Seed":
|
||||||
//种植适应性1
|
//种植适应性1
|
||||||
num=seedingService.seedSuccess(zone,imageDate);
|
num=seedingService.seedSuccess(zone,imageDate);
|
||||||
break;
|
break;
|
||||||
case "Vegetation_Distribution":
|
case "Veg":
|
||||||
//种植适宜性
|
//种植适宜性
|
||||||
num=seedingService.vegetationDistribution(zone,imageDate);
|
num=seedingService.vegetationDistribution(zone,imageDate);
|
||||||
break;
|
break;
|
||||||
@@ -69,7 +69,7 @@ public class UploadFile
|
|||||||
//坡度
|
//坡度
|
||||||
num=seedingService.slope(zone,imageDate);
|
num=seedingService.slope(zone,imageDate);
|
||||||
break;
|
break;
|
||||||
case "Desertification":
|
case "Desert":
|
||||||
//土壤沙化指数
|
//土壤沙化指数
|
||||||
num=seedingService.desertification(zone,imageDate);
|
num=seedingService.desertification(zone,imageDate);
|
||||||
break;
|
break;
|
||||||
@@ -77,11 +77,11 @@ public class UploadFile
|
|||||||
//土壤湿度指数
|
//土壤湿度指数
|
||||||
num=seedingService.moisture(zone,imageDate);
|
num=seedingService.moisture(zone,imageDate);
|
||||||
break;
|
break;
|
||||||
case "Salinization":
|
case "Salt":
|
||||||
//土壤盐渍化指数
|
//土壤盐渍化指数
|
||||||
num=seedingService.salinization(zone,imageDate);
|
num=seedingService.salinization(zone,imageDate);
|
||||||
break;
|
break;
|
||||||
case "Healthy":
|
case "Heal":
|
||||||
//植被健康状况
|
//植被健康状况
|
||||||
num=seedingService.healthy(zone,imageDate,resolution);
|
num=seedingService.healthy(zone,imageDate,resolution);
|
||||||
break;
|
break;
|
||||||
@@ -94,8 +94,9 @@ public class UploadFile
|
|||||||
//土壤盐渍化指数
|
//土壤盐渍化指数
|
||||||
num=seedingService.waterArea(zone,imageDate);
|
num=seedingService.waterArea(zone,imageDate);
|
||||||
break;
|
break;
|
||||||
case "Road_length":
|
case "Road_len":
|
||||||
//植被健康状况
|
//植被健康状况
|
||||||
|
num=seedingService.roadLength(zone,imageDate);
|
||||||
break;
|
break;
|
||||||
case "Climate_index":
|
case "Climate_index":
|
||||||
//水分因素
|
//水分因素
|
||||||
|
|||||||
+7
-5
@@ -1,6 +1,5 @@
|
|||||||
package com.ruoyi.web.controller.shate;
|
package com.ruoyi.web.controller.shate;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.system.domain_shate.SeedingSuccessRate;
|
import com.ruoyi.system.domain_shate.SeedingSuccessRate;
|
||||||
import com.ruoyi.system.domain_shate.UplodFile;
|
import com.ruoyi.system.domain_shate.UplodFile;
|
||||||
@@ -39,11 +38,13 @@ public class VegetationHealthController {
|
|||||||
{
|
{
|
||||||
String name="";
|
String name="";
|
||||||
if (type!=null && type !=""){
|
if (type!=null && type !=""){
|
||||||
if (type.equals("1")){
|
if (name.equals("1"))
|
||||||
name="Medium%";
|
{
|
||||||
|
name="M_Heal%";
|
||||||
}
|
}
|
||||||
else if(type.equals("2")){
|
else if(name.equals("2"))
|
||||||
name="High%";
|
{
|
||||||
|
name="H_Heal%";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
List<VegetationHealth> Seeding= VegetationService.sqlSeeding(zone,name,year);
|
List<VegetationHealth> Seeding= VegetationService.sqlSeeding(zone,name,year);
|
||||||
@@ -67,6 +68,7 @@ public class VegetationHealthController {
|
|||||||
|
|
||||||
@RequestMapping(value = "/InsertVegetation",method = {RequestMethod.POST})
|
@RequestMapping(value = "/InsertVegetation",method = {RequestMethod.POST})
|
||||||
public AjaxResult InsertVegetation(@RequestBody UplodFile uplodFile) {
|
public AjaxResult InsertVegetation(@RequestBody UplodFile uplodFile) {
|
||||||
|
|
||||||
List<VegetationHealth> value=uplodFile.getVegetationHealths();
|
List<VegetationHealth> value=uplodFile.getVegetationHealths();
|
||||||
for (int i=0;i<value.size();i++){
|
for (int i=0;i<value.size();i++){
|
||||||
String year=value.get(i).getImageDate().substring(0,4);
|
String year=value.get(i).getImageDate().substring(0,4);
|
||||||
|
|||||||
@@ -6,7 +6,10 @@ spring:
|
|||||||
driver-class-name: org.postgresql.Driver
|
driver-class-name: org.postgresql.Driver
|
||||||
druid:
|
druid:
|
||||||
master:
|
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://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
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ ruoyi:
|
|||||||
# 实例演示开关
|
# 实例演示开关
|
||||||
demoEnabled: true
|
demoEnabled: true
|
||||||
# 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
|
# 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
|
||||||
profile: /home/sjs/ruoyi/uploadPath
|
profile: /home/ruoyi/uploadPath
|
||||||
# 获取ip地址开关
|
# 获取ip地址开关
|
||||||
addressEnabled: false
|
addressEnabled: false
|
||||||
# 验证码类型 math 数组计算 char 字符验证
|
# 验证码类型 math 数组计算 char 字符验证
|
||||||
@@ -18,8 +18,8 @@ ruoyi:
|
|||||||
# 开发环境配置
|
# 开发环境配置
|
||||||
server:
|
server:
|
||||||
# 服务器的HTTP端口,默认为8080
|
# 服务器的HTTP端口,默认为8080
|
||||||
|
#port: 6051
|
||||||
port: 6051
|
port: 6051
|
||||||
#port: 9800
|
|
||||||
servlet:
|
servlet:
|
||||||
# 应用的访问路径
|
# 应用的访问路径
|
||||||
context-path: /
|
context-path: /
|
||||||
@@ -60,7 +60,7 @@ spring:
|
|||||||
# redis 配置
|
# redis 配置
|
||||||
redis:
|
redis:
|
||||||
# 地址
|
# 地址
|
||||||
#host: 172.16.123.212
|
#host: rs-middleware-redis
|
||||||
host: localhost
|
host: localhost
|
||||||
# 端口,默认为6379
|
# 端口,默认为6379
|
||||||
#port: 14096
|
#port: 14096
|
||||||
|
|||||||
@@ -140,6 +140,24 @@
|
|||||||
<artifactId>commons-beanutils</artifactId>
|
<artifactId>commons-beanutils</artifactId>
|
||||||
<version>1.9.4</version>
|
<version>1.9.4</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!--<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
<version>1.18.24</version>
|
||||||
|
</dependency>-->
|
||||||
|
|
||||||
|
<!-- <dependency>
|
||||||
|
<groupId>com.google.guava</groupId>
|
||||||
|
<artifactId>guava</artifactId>
|
||||||
|
<version>11.0.2</version>
|
||||||
|
</dependency>
|
||||||
|
-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.hutool</groupId>
|
||||||
|
<artifactId>hutool-all</artifactId>
|
||||||
|
<version>5.3.7</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,197 @@
|
|||||||
|
package com.ruoyi.common.utils;
|
||||||
|
import org.apache.poi.ss.util.CellRangeAddress;
|
||||||
|
import org.apache.poi.ss.util.CellReference;
|
||||||
|
import org.apache.poi.util.Units;
|
||||||
|
import org.apache.poi.xddf.usermodel.chart.*;
|
||||||
|
import org.apache.poi.xwpf.usermodel.*;
|
||||||
|
import java.io.FileInputStream;
|
||||||
|
import java.math.BigInteger;
|
||||||
|
import java.text.DecimalFormat;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.poi.xwpf.usermodel.XWPFChart;
|
||||||
|
import org.apache.poi.xwpf.usermodel.XWPFDocument;
|
||||||
|
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTP;
|
||||||
|
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTPPr;
|
||||||
|
import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSpacing;
|
||||||
|
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STLineSpacingRule;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: poi工具类
|
||||||
|
* @Date: 2022/10/11
|
||||||
|
* @Author shuaihua zang
|
||||||
|
*/
|
||||||
|
public class BarChart
|
||||||
|
{
|
||||||
|
|
||||||
|
//绘制折线图
|
||||||
|
public static void drawLine(XWPFDocument document, String[] xAxisData,Double[] yAxisData) throws Exception {
|
||||||
|
XWPFChart xChart = document.createChart(15 * Units.EMU_PER_CENTIMETER, 10 * Units.EMU_PER_CENTIMETER);
|
||||||
|
// xChart.setTitleText("海拔"); // 图表标题
|
||||||
|
xChart.setTitleOverlay(false);
|
||||||
|
|
||||||
|
// 5、X轴(分类轴)相关设置
|
||||||
|
// 创建X轴,并且指定位置
|
||||||
|
XDDFCategoryAxis xAxis = xChart.createCategoryAxis(AxisPosition.BOTTOM);
|
||||||
|
XDDFCategoryDataSource xAxisSource = XDDFDataSourcesFactory.fromArray(xAxisData); // 设置X轴数据
|
||||||
|
// xAxis.setTitle("海拔km²");
|
||||||
|
// 6、Y轴(值轴)相关设置
|
||||||
|
XDDFValueAxis yAxis = xChart.createValueAxis(AxisPosition.LEFT); // 创建Y轴,指定位置轴标题
|
||||||
|
XDDFNumericalDataSource<Double> yAxisSource = XDDFDataSourcesFactory.fromArray(yAxisData); // 设置Y轴数据
|
||||||
|
yAxis.setTitle("hm²");
|
||||||
|
// 7、创建折线图对象
|
||||||
|
XDDFLineChartData lineChart = (XDDFLineChartData) xChart.createData(ChartTypes.LINE, xAxis, yAxis);
|
||||||
|
|
||||||
|
// 8、加载折线图数据集
|
||||||
|
XDDFLineChartData.Series lineSeries = (XDDFLineChartData.Series) lineChart.addSeries(xAxisSource, yAxisSource);
|
||||||
|
lineSeries.setSmooth(false); // 线条样式:true平滑曲线,false折线
|
||||||
|
lineSeries.setMarkerSize((short) 6); // 标记点大小
|
||||||
|
lineSeries.setMarkerStyle(MarkerStyle.CIRCLE); // 标记点样式
|
||||||
|
|
||||||
|
// 9、绘制折线图
|
||||||
|
xChart.plot(lineChart);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void drawTable(XWPFDocument document, String[] xAxisData,Double[] yAxisData) throws Exception {
|
||||||
|
/*int numOfPoints = categories.length;
|
||||||
|
String categoryDataRange = chart.formatRange(new CellRangeAddress(1, numOfPoints, 0, 0));
|
||||||
|
String valuesDataRangeA = chart.formatRange(new CellRangeAddress(1, numOfPoints, 1, 1));
|
||||||
|
String valuesDataRangeB = chart.formatRange(new CellRangeAddress(1, numOfPoints, 2, 2));
|
||||||
|
XDDFDataSource<String> categoriesData = XDDFDataSourcesFactory.fromArray(categories, categoryDataRange, 0);
|
||||||
|
XDDFNumericalDataSource<Double> valuesDataA = XDDFDataSourcesFactory.fromArray(valuesA, valuesDataRangeA, 1);
|
||||||
|
XDDFNumericalDataSource<Double> valuesDataB = XDDFDataSourcesFactory.fromArray(valuesB, valuesDataRangeB, 2);*/
|
||||||
|
// 创建chart图表对象,抛出异常
|
||||||
|
XWPFChart chart = document.createChart(15 * Units.EMU_PER_CENTIMETER, 10 * Units.EMU_PER_CENTIMETER);
|
||||||
|
// 图表相关设置
|
||||||
|
chart.setTitleText(""); // 图表标题
|
||||||
|
|
||||||
|
chart.setTitleOverlay(false); // 图例是否覆盖标题
|
||||||
|
//XDDFChartLegend legend = chart.getOrAddLegend();
|
||||||
|
//legend.setPosition(LegendPosition.TOP); // 图例位置:上下左右
|
||||||
|
// X轴(分类轴)相关设置
|
||||||
|
XDDFCategoryAxis xAxis =chart.createCategoryAxis(AxisPosition.BOTTOM); // 创建X轴,并且指定位置
|
||||||
|
xAxis.setTitle(""); // x轴标题
|
||||||
|
XDDFCategoryDataSource xAxisSource = XDDFDataSourcesFactory.fromArray(xAxisData); // 设置X轴数据
|
||||||
|
// Y轴(值轴)相关设置
|
||||||
|
//chart.createValueAxis(AxisPosition.LEFT);
|
||||||
|
XDDFValueAxis yAxis = chart.createValueAxis(AxisPosition.LEFT); // 创建Y轴,指定位置
|
||||||
|
yAxis.setTitle("Area(hm²)"); // Y轴标题
|
||||||
|
yAxis.setCrossBetween(AxisCrossBetween.BETWEEN); // 设置图柱的位置:BETWEEN居中
|
||||||
|
XDDFNumericalDataSource<Double> yAxisSource = XDDFDataSourcesFactory.fromArray(yAxisData); // 设置Y轴数据
|
||||||
|
ChartTypes chartTypes = ChartTypes.BAR;
|
||||||
|
// 创建柱状图对象
|
||||||
|
XDDFBarChartData barChart = (XDDFBarChartData) chart.createData(chartTypes, xAxis, yAxis);
|
||||||
|
barChart.setBarDirection(BarDirection.COL); // 设置柱状图的方向:BAR横向,COL竖向,默认是BAR
|
||||||
|
barChart.setVaryColors(false);
|
||||||
|
// 加载柱状图数据集
|
||||||
|
XDDFBarChartData.Series barSeries = (XDDFBarChartData.Series) barChart.addSeries(xAxisSource, yAxisSource);
|
||||||
|
barSeries.setTitle(" ", null); // 图例标题
|
||||||
|
// 绘制柱状图
|
||||||
|
chart.plot(barChart);
|
||||||
|
}
|
||||||
|
|
||||||
|
//插入图片
|
||||||
|
public static void insertPic(XWPFDocument document,String fileAddress)
|
||||||
|
{
|
||||||
|
XWPFParagraph Paragraph = document.createParagraph();
|
||||||
|
Paragraph.setAlignment(ParagraphAlignment.CENTER);//对齐方式
|
||||||
|
XWPFRun run = Paragraph.createRun();
|
||||||
|
try (FileInputStream is = new FileInputStream
|
||||||
|
(fileAddress)) {
|
||||||
|
run.addPicture(is, XWPFDocument.PICTURE_TYPE_PNG,
|
||||||
|
fileAddress,
|
||||||
|
Units.toEMU(185), Units.toEMU(223)); // 200x200 pixels
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//创建段落并插入文字
|
||||||
|
public static void createParagraphAndInsertWord(XWPFDocument document,String date) {
|
||||||
|
XWPFParagraph Paragraph = document.createParagraph();
|
||||||
|
//设置行距固定值20磅
|
||||||
|
//setLineSpace(Paragraph,30);
|
||||||
|
Paragraph.setAlignment(ParagraphAlignment.LEFT);//对齐方式
|
||||||
|
//paragraph_2.setFirstLineIndent(400);//首行缩进
|
||||||
|
XWPFRun run = Paragraph.createRun();
|
||||||
|
run.setText(date);
|
||||||
|
run.setBold(false);//加粗
|
||||||
|
run.setFontSize(12);
|
||||||
|
run.setFontFamily("Times New Roman");
|
||||||
|
}
|
||||||
|
//创建一级标题的内容
|
||||||
|
public static void createFirstLevelTopic(XWPFDocument document,String date)
|
||||||
|
{
|
||||||
|
XWPFParagraph Paragraph = document.createParagraph();
|
||||||
|
Paragraph.setAlignment(ParagraphAlignment.LEFT);//对齐方式
|
||||||
|
//BarChart.setLineSpace(Paragraph,30);
|
||||||
|
XWPFRun run = Paragraph.createRun();
|
||||||
|
run.setText(date);
|
||||||
|
run.setBold(true);//加粗
|
||||||
|
run.setFontSize(16);
|
||||||
|
run.setFontFamily("Times New Roman");
|
||||||
|
}
|
||||||
|
//创建二级标题的内容
|
||||||
|
public static void createSecondLevelTopic(XWPFDocument document,String date)
|
||||||
|
{
|
||||||
|
XWPFParagraph Paragraph = document.createParagraph();
|
||||||
|
Paragraph.setAlignment(ParagraphAlignment.LEFT);//对齐方式
|
||||||
|
//BarChart.setLineSpace(Paragraph,30);
|
||||||
|
XWPFRun run = Paragraph.createRun();
|
||||||
|
run.setText(date);
|
||||||
|
run.setBold(true);//加粗
|
||||||
|
run.setFontSize(12);
|
||||||
|
run.setFontFamily("Times New Roman");
|
||||||
|
}
|
||||||
|
//创建图片标题的内容
|
||||||
|
public static void setPicTitle(XWPFDocument document,String date)
|
||||||
|
{
|
||||||
|
XWPFParagraph Paragraph = document.createParagraph();
|
||||||
|
Paragraph.setAlignment(ParagraphAlignment.CENTER);//对齐方式
|
||||||
|
//BarChart.setLineSpace(Paragraph,30);
|
||||||
|
XWPFRun run = Paragraph.createRun();
|
||||||
|
run.setText(date);
|
||||||
|
run.setBold(true);//加粗
|
||||||
|
run.setFontSize(10);
|
||||||
|
run.setFontFamily("Times New Roman");
|
||||||
|
}
|
||||||
|
//设置题目
|
||||||
|
public static void setTitle(XWPFDocument document,String date)
|
||||||
|
{
|
||||||
|
XWPFParagraph title = document.createParagraph();
|
||||||
|
title.setAlignment(ParagraphAlignment.CENTER);
|
||||||
|
XWPFRun runTitle = title.createRun();
|
||||||
|
runTitle.setText(date);
|
||||||
|
runTitle.setBold(false);
|
||||||
|
runTitle.setFontSize(16);
|
||||||
|
runTitle.setFontFamily("Times New Roman");
|
||||||
|
}
|
||||||
|
//设置行间距
|
||||||
|
public static void setLineSpace(XWPFParagraph titleParagraph,int size) {
|
||||||
|
CTP ctp = titleParagraph.getCTP();
|
||||||
|
CTPPr ppr = ctp.isSetPPr() ? ctp.getPPr() : ctp.addNewPPr();
|
||||||
|
CTSpacing spacing = ppr.isSetSpacing()? ppr.getSpacing() : ppr.addNewSpacing();
|
||||||
|
spacing.setAfter(BigInteger.valueOf(0));
|
||||||
|
spacing.setBefore(BigInteger.valueOf(0));
|
||||||
|
//设置行距类型为 EXACT
|
||||||
|
spacing.setLineRule(STLineSpacingRule.EXACT);
|
||||||
|
//1磅数是20
|
||||||
|
spacing.setLine(BigInteger.valueOf(size*20));
|
||||||
|
}
|
||||||
|
public static String getDoubleNumber(Double d)
|
||||||
|
{
|
||||||
|
DecimalFormat df = new DecimalFormat("#.00");
|
||||||
|
return df.format(d);
|
||||||
|
}
|
||||||
|
public static String changeDate(String date)
|
||||||
|
{
|
||||||
|
String s1 = date.substring(0, 4);
|
||||||
|
String s2 = date.substring(4, 6);
|
||||||
|
String s3 = date.substring(6, date.length());
|
||||||
|
return s1+"-"+s2+"-"+s3;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,108 @@
|
|||||||
|
package com.ruoyi.common.utils;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import org.apache.poi.openxml4j.opc.OPCPackage;
|
||||||
|
|
||||||
|
import org.apache.poi.xwpf.usermodel.XWPFDocument;
|
||||||
|
import org.apache.poi.xwpf.usermodel.XWPFParagraph;
|
||||||
|
import org.apache.xmlbeans.XmlException;
|
||||||
|
import org.apache.xmlbeans.XmlToken;
|
||||||
|
import org.openxmlformats.schemas.drawingml.x2006.main.CTNonVisualDrawingProps;
|
||||||
|
import org.openxmlformats.schemas.drawingml.x2006.main.CTPositiveSize2D;
|
||||||
|
import org.openxmlformats.schemas.drawingml.x2006.wordprocessingDrawing.CTInline;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author shuaihua zang
|
||||||
|
* @date 2022/10/8
|
||||||
|
* word导出图片所需的工具类
|
||||||
|
*/
|
||||||
|
public class CustomXWPFDocument extends XWPFDocument{
|
||||||
|
public CustomXWPFDocument(InputStream in) throws IOException {
|
||||||
|
super(in);
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomXWPFDocument() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
public CustomXWPFDocument(OPCPackage pkg) throws IOException {
|
||||||
|
super(pkg);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param id
|
||||||
|
* @param width
|
||||||
|
* 宽
|
||||||
|
* @param height
|
||||||
|
* 高
|
||||||
|
* @param paragraph
|
||||||
|
* 段落
|
||||||
|
*/
|
||||||
|
public void createPicture(int id, int width, int height,
|
||||||
|
XWPFParagraph paragraph) {
|
||||||
|
final int EMU = 9525;
|
||||||
|
width *= EMU;
|
||||||
|
height *= EMU;
|
||||||
|
String blipId = super.getRelationId(super.getAllPictures().get(id));
|
||||||
|
CTInline inline = paragraph.createRun().getCTR().addNewDrawing()
|
||||||
|
.addNewInline();
|
||||||
|
String picXml = ""
|
||||||
|
+ "<a:graphic xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\">"
|
||||||
|
+ " <a:graphicData uri=\"http://schemas.openxmlformats.org/drawingml/2006/picture\">"
|
||||||
|
+ " <pic:pic xmlns:pic=\"http://schemas.openxmlformats.org/drawingml/2006/picture\">"
|
||||||
|
+ " <pic:nvPicPr>" + " <pic:cNvPr id=\""
|
||||||
|
+ id
|
||||||
|
+ "\" name=\"Generated\"/>"
|
||||||
|
+ " <pic:cNvPicPr/>"
|
||||||
|
+ " </pic:nvPicPr>"
|
||||||
|
+ " <pic:blipFill>"
|
||||||
|
+ " <a:blip r:embed=\""
|
||||||
|
+ blipId
|
||||||
|
+ "\" xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\"/>"
|
||||||
|
+ " <a:stretch>"
|
||||||
|
+ " <a:fillRect/>"
|
||||||
|
+ " </a:stretch>"
|
||||||
|
+ " </pic:blipFill>"
|
||||||
|
+ " <pic:spPr>"
|
||||||
|
+ " <a:xfrm>"
|
||||||
|
+ " <a:off x=\"0\" y=\"0\"/>"
|
||||||
|
+ " <a:ext cx=\""
|
||||||
|
+ width
|
||||||
|
+ "\" cy=\""
|
||||||
|
+ height
|
||||||
|
+ "\"/>"
|
||||||
|
+ " </a:xfrm>"
|
||||||
|
+ " <a:prstGeom prst=\"rect\">"
|
||||||
|
+ " <a:avLst/>"
|
||||||
|
+ " </a:prstGeom>"
|
||||||
|
+ " </pic:spPr>"
|
||||||
|
+ " </pic:pic>"
|
||||||
|
+ " </a:graphicData>" + "</a:graphic>";
|
||||||
|
|
||||||
|
inline.addNewGraphic().addNewGraphicData();
|
||||||
|
XmlToken xmlToken = null;
|
||||||
|
try {
|
||||||
|
xmlToken = XmlToken.Factory.parse(picXml);
|
||||||
|
} catch (XmlException xe) {
|
||||||
|
xe.printStackTrace();
|
||||||
|
}
|
||||||
|
inline.set(xmlToken);
|
||||||
|
|
||||||
|
inline.setDistT(0);
|
||||||
|
inline.setDistB(0);
|
||||||
|
inline.setDistL(0);
|
||||||
|
inline.setDistR(0);
|
||||||
|
|
||||||
|
CTPositiveSize2D extent = inline.addNewExtent();
|
||||||
|
extent.setCx(width);
|
||||||
|
extent.setCy(height);
|
||||||
|
|
||||||
|
CTNonVisualDrawingProps docPr = inline.addNewDocPr();
|
||||||
|
docPr.setId(id);
|
||||||
|
docPr.setName("图片名称");
|
||||||
|
docPr.setDescr("描述信息");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,146 @@
|
|||||||
|
package com.ruoyi.common.utils;
|
||||||
|
|
||||||
|
import java.util.regex.Matcher;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
public class StringFilterUtil {
|
||||||
|
/** 过滤字符串,去除[]中的内容,包括[]
|
||||||
|
* @param input
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static String filterForBetween(String input, char startChar, char endChar) {
|
||||||
|
int head = input.indexOf(startChar); // 标记第一个使用左括号的位置
|
||||||
|
if (head == -1) {
|
||||||
|
return input; // 如果context中不存在括号,什么也不做,直接跑到函数底端返回初值str
|
||||||
|
} else {
|
||||||
|
int next = head + 1; // 从head+1起检查每个字符
|
||||||
|
int count = 1; // 记录括号情况
|
||||||
|
do {
|
||||||
|
if (input.charAt(next) == startChar)
|
||||||
|
count++;
|
||||||
|
else if (input.charAt(next) == endChar)
|
||||||
|
count--;
|
||||||
|
next++; // 更新即将读取的下一个字符的位置
|
||||||
|
if (count == 0) // 已经找到匹配的括号
|
||||||
|
{
|
||||||
|
String temp = input.substring(head, next); // 将两括号之间的内容及括号提取到temp中
|
||||||
|
input = input.replace(temp, ""); // 用空内容替换,复制给context
|
||||||
|
head = input.indexOf(endChar); // 找寻下一个左括号
|
||||||
|
next = head + 1; // 标记下一个左括号后的字符位置
|
||||||
|
count = 1; // count的值还原成1
|
||||||
|
}
|
||||||
|
} while (head != -1); // 如果在该段落中找不到左括号了,就终止循环
|
||||||
|
}
|
||||||
|
return input; // 返回更新后的context
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* str.replaceAll("\\s*", ""); //s* 可以匹配空格、制表符、换页符等空白字符的其中任意一个。
|
||||||
|
* str.replaceAll(" +",""); //去掉所有空格,包括首尾、中间
|
||||||
|
* str.replaceAll(" ", ""); //去掉所有空格,包括首尾、中间
|
||||||
|
* str.replace(" ",""); //去除所有空格,包括首尾、中间
|
||||||
|
* str.trim(); //去掉首尾空格
|
||||||
|
* @param inputStr
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static String filterForBlank(String inputStr){
|
||||||
|
if(inputStr.length()==0||inputStr==null) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
return inputStr.replace(" ", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 过滤字符串,只允许字母和数字
|
||||||
|
* @param inputStr
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static String filterForChars(String inputStr) {
|
||||||
|
if(inputStr.length()==0||inputStr==null) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
String regEx = "[^a-zA-Z0-9]";
|
||||||
|
Pattern p = Pattern.compile(regEx);
|
||||||
|
Matcher m = p.matcher(inputStr);
|
||||||
|
return m.replaceAll("").trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**过滤字符串,替换特殊字符
|
||||||
|
* <pre>
|
||||||
|
* StringFilterUtil.filterForSpechars(null)
|
||||||
|
* </pre>
|
||||||
|
* @param inputStr
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static String filterForSpechars(String inputStr) {
|
||||||
|
if(inputStr.length()==0||inputStr==null) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
String regEx = "[`~!@#$%^&*()+=|{}':;',\\[\\].<>/?~!@#¥%……&*()——+|{}【】‘;:”“’。,、?]";
|
||||||
|
Pattern p = Pattern.compile(regEx);
|
||||||
|
Matcher m = p.matcher(inputStr);
|
||||||
|
return m.replaceAll("").trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**过滤字符串,去除html标记
|
||||||
|
* <pre>
|
||||||
|
* StringFilterUtil.filterForHtml(null) = ""
|
||||||
|
* StringFilterUtil.filterForHtml("") = ""
|
||||||
|
* StringFilterUtil.filterForHtml("<td>content</td>") = "content"
|
||||||
|
* </pre>
|
||||||
|
* @param inputStr
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static String filterForHtml(String inputStr) {
|
||||||
|
if(inputStr.length()==0||inputStr==null) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
String regEx = "<.+?>";
|
||||||
|
Pattern p = Pattern.compile(regEx, Pattern.DOTALL);
|
||||||
|
Matcher m = p.matcher(inputStr);
|
||||||
|
return m.replaceAll("");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**过滤字符串,查询href条件
|
||||||
|
* <pre>
|
||||||
|
* StringFilterUtil.filterForHref(null)
|
||||||
|
* </pre>
|
||||||
|
* @param inputStr
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static String filterForHref(String inputStr) {
|
||||||
|
if(inputStr.length()==0||inputStr==null) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
String regEx = "href=\"(.+?)\"";
|
||||||
|
Pattern p = Pattern.compile(regEx);
|
||||||
|
Matcher m = p.matcher(inputStr);
|
||||||
|
if(m.find()) {
|
||||||
|
return m.group(1);
|
||||||
|
}else {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**过滤字符串,匹配http://地址//,获取Url地址
|
||||||
|
* @param inputStr
|
||||||
|
* @return
|
||||||
|
* 备注:地址后需要以空格结束
|
||||||
|
*/
|
||||||
|
public static String filterForUrl(String inputStr) {
|
||||||
|
if(inputStr.length()==0||inputStr==null) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
String regEx = "(http://|https://){1}[\\w\\.\\-/:]+";
|
||||||
|
Pattern p = Pattern.compile(regEx);
|
||||||
|
Matcher m = p.matcher(inputStr);
|
||||||
|
StringBuffer buffer = new StringBuffer();
|
||||||
|
while(m.find()){
|
||||||
|
buffer.append(m.group());
|
||||||
|
buffer.append("\r\n");
|
||||||
|
}
|
||||||
|
return buffer.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -17,7 +17,7 @@ public class UrlFileUpload {
|
|||||||
|
|
||||||
public static String fileUpload(String FileUrl,String FileNamePath) throws IOException, InterruptedException {
|
public static String fileUpload(String FileUrl,String FileNamePath) throws IOException, InterruptedException {
|
||||||
|
|
||||||
System.out.println("下载文件!");
|
|
||||||
// 创建一个URL链接
|
// 创建一个URL链接
|
||||||
URL url = new URL(FileUrl);
|
URL url = new URL(FileUrl);
|
||||||
|
|
||||||
|
|||||||
@@ -74,9 +74,10 @@ public class WeatherUtils {
|
|||||||
String strRead = null;
|
String strRead = null;
|
||||||
URL url = new URL(serverURL);
|
URL url = new URL(serverURL);
|
||||||
HttpURLConnection connection = (HttpURLConnection)url.openConnection();
|
HttpURLConnection connection = (HttpURLConnection)url.openConnection();
|
||||||
connection.setRequestMethod("POST");
|
connection.setRequestMethod("POST");//请求post方式
|
||||||
connection.setDoInput(true);
|
connection.setDoInput(true);
|
||||||
connection.setDoOutput(true);
|
connection.setDoOutput(true);
|
||||||
|
//header内的的参数在这里set。||connection.setRequestProperty("健, "值");
|
||||||
connection.setRequestProperty("Content-Type", "application/json");
|
connection.setRequestProperty("Content-Type", "application/json");
|
||||||
connection.connect();
|
connection.connect();
|
||||||
OutputStreamWriter writer = new OutputStreamWriter(connection.getOutputStream(),"UTF-8");
|
OutputStreamWriter writer = new OutputStreamWriter(connection.getOutputStream(),"UTF-8");
|
||||||
|
|||||||
@@ -23,11 +23,12 @@ public class Altitude extends SysSTEntity
|
|||||||
private Double Level2;
|
private Double Level2;
|
||||||
|
|
||||||
private Double Level3;
|
private Double Level3;
|
||||||
|
|
||||||
private Double Level4;
|
private Double Level4;
|
||||||
|
|
||||||
private Double Level5;
|
private Double Level5;
|
||||||
|
|
||||||
private Double max;
|
private Double max;
|
||||||
|
|
||||||
private String imageDate;
|
private String imageDate;
|
||||||
|
|
||||||
|
|||||||
@@ -26,12 +26,12 @@ public class Aspect extends SysSTEntity{
|
|||||||
|
|
||||||
private Double southeast;
|
private Double southeast;
|
||||||
|
|
||||||
private Double max;
|
|
||||||
|
|
||||||
private Double south;
|
private Double south;
|
||||||
|
|
||||||
private Double southwest;
|
private Double southwest;
|
||||||
|
|
||||||
|
private Double max;
|
||||||
|
|
||||||
private Double west;
|
private Double west;
|
||||||
|
|
||||||
private Double northwest;
|
private Double northwest;
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ public class PlantingSuitability extends SysSTEntity
|
|||||||
|
|
||||||
private String zone;
|
private String zone;
|
||||||
|
|
||||||
|
private Double max;
|
||||||
|
|
||||||
private Double verySuitable;
|
private Double verySuitable;
|
||||||
|
|
||||||
@@ -31,7 +32,6 @@ public class PlantingSuitability extends SysSTEntity
|
|||||||
|
|
||||||
private String total;
|
private String total;
|
||||||
|
|
||||||
private Double max;
|
|
||||||
|
|
||||||
private String productCode1;
|
private String productCode1;
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ public class RoadFactor extends SysSTEntity
|
|||||||
|
|
||||||
private String zone;
|
private String zone;
|
||||||
|
|
||||||
|
private Double max;
|
||||||
|
|
||||||
private Double Level1;
|
private Double Level1;
|
||||||
|
|
||||||
private Double Level2;
|
private Double Level2;
|
||||||
@@ -29,8 +31,6 @@ public class RoadFactor extends SysSTEntity
|
|||||||
|
|
||||||
private Double Level5;
|
private Double Level5;
|
||||||
|
|
||||||
private Double max;
|
|
||||||
|
|
||||||
|
|
||||||
private String imageDate;
|
private String imageDate;
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ public class SeedingSuccessRate extends SysSTEntity
|
|||||||
|
|
||||||
private Double seedingSuccessArea;
|
private Double seedingSuccessArea;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private Double seedingSuccess;
|
private Double seedingSuccess;
|
||||||
|
|
||||||
private String imageDate;
|
private String imageDate;
|
||||||
@@ -141,6 +143,7 @@ public class SeedingSuccessRate extends SysSTEntity
|
|||||||
this.productCode3 = productCode3;
|
this.productCode3 = productCode3;
|
||||||
this.createdBy = createdBy;
|
this.createdBy = createdBy;
|
||||||
this.createdTime = createdTime;
|
this.createdTime = createdTime;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getYear() {
|
public String getYear() {
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ public class SoilSalinization extends SysSTEntity
|
|||||||
|
|
||||||
private String imageDate;
|
private String imageDate;
|
||||||
|
|
||||||
|
private String year1;
|
||||||
|
|
||||||
private String productCode1;
|
private String productCode1;
|
||||||
|
|
||||||
@@ -165,4 +165,5 @@ public class SoilSalinization extends SysSTEntity
|
|||||||
public void setYear(String year) {
|
public void setYear(String year) {
|
||||||
this.year = year;
|
this.year = year;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,9 +10,6 @@ public class VegetationHealth extends SysSTEntity
|
|||||||
{
|
{
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
||||||
|
|
||||||
private Double max;
|
|
||||||
|
|
||||||
private String zone;
|
private String zone;
|
||||||
|
|
||||||
private Double healthy;
|
private Double healthy;
|
||||||
@@ -25,6 +22,8 @@ public class VegetationHealth extends SysSTEntity
|
|||||||
|
|
||||||
private String resolution;
|
private String resolution;
|
||||||
|
|
||||||
|
private Double max;
|
||||||
|
|
||||||
private String imageDate;
|
private String imageDate;
|
||||||
|
|
||||||
private String productCode1;
|
private String productCode1;
|
||||||
@@ -161,7 +160,6 @@ public class VegetationHealth extends SysSTEntity
|
|||||||
this.year = year;
|
this.year = year;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public String getResolution() {
|
public String getResolution() {
|
||||||
return resolution;
|
return resolution;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ public class WaterFactor extends SysSTEntity
|
|||||||
|
|
||||||
private String zone;
|
private String zone;
|
||||||
|
|
||||||
|
private Double max;
|
||||||
|
|
||||||
private Double level1;
|
private Double level1;
|
||||||
|
|
||||||
private Double level2;
|
private Double level2;
|
||||||
@@ -29,7 +31,6 @@ public class WaterFactor extends SysSTEntity
|
|||||||
|
|
||||||
private Double level5;
|
private Double level5;
|
||||||
|
|
||||||
private Double max;
|
|
||||||
|
|
||||||
private String imageDate;
|
private String imageDate;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package com.ruoyi.system.domain_shate;
|
||||||
|
|
||||||
|
import java.sql.DataTruncation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: JinSheng Song
|
||||||
|
* @Date: 2022/11/14 16:20
|
||||||
|
*/
|
||||||
|
public class WordHelp {
|
||||||
|
|
||||||
|
private String year;
|
||||||
|
|
||||||
|
private String[] zone;
|
||||||
|
|
||||||
|
public String getYear() {
|
||||||
|
return year;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setYear(String year) {
|
||||||
|
this.year = year;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String[] getZone() {
|
||||||
|
return zone;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setZone(String[] zone) {
|
||||||
|
this.zone = zone;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -15,11 +15,8 @@ public class paging {
|
|||||||
private Integer pageSize;
|
private Integer pageSize;
|
||||||
|
|
||||||
private String zone;//区域
|
private String zone;//区域
|
||||||
|
|
||||||
private String type;//类型1
|
private String type;//类型1
|
||||||
|
|
||||||
private String type1;//类型2
|
private String type1;//类型2
|
||||||
|
|
||||||
private String type2;
|
private String type2;
|
||||||
|
|
||||||
private String type3;
|
private String type3;
|
||||||
@@ -30,6 +27,7 @@ public class paging {
|
|||||||
|
|
||||||
private String dateTime;
|
private String dateTime;
|
||||||
|
|
||||||
|
|
||||||
private List<Integer> ids;
|
private List<Integer> ids;
|
||||||
|
|
||||||
public String getZone() {
|
public String getZone() {
|
||||||
|
|||||||
@@ -13,53 +13,53 @@ import java.util.List;
|
|||||||
public interface DateUploadMapper {
|
public interface DateUploadMapper {
|
||||||
|
|
||||||
Integer altitude(@Param("zone") String zone,
|
Integer altitude(@Param("zone") String zone,
|
||||||
@Param("imageDate") String imageDate);
|
@Param("imageDate") String imageDate);
|
||||||
|
|
||||||
Integer aspect(@Param("zone") String zone,
|
Integer aspect(@Param("zone") String zone,
|
||||||
@Param("imageDate") String imageDate);
|
@Param("imageDate") String imageDate);
|
||||||
|
|
||||||
Integer landuse(@Param("zone") String zone,
|
Integer landuse(@Param("zone") String zone,
|
||||||
@Param("imageDate") String imageDate);
|
@Param("imageDate") String imageDate);
|
||||||
|
|
||||||
Integer suitability(@Param("zone") String zone,
|
Integer suitability(@Param("zone") String zone,
|
||||||
@Param("imageDate") String imageDate);
|
@Param("imageDate") String imageDate);
|
||||||
|
|
||||||
Integer road(@Param("zone") String zone,
|
Integer road(@Param("zone") String zone,
|
||||||
@Param("imageDate") String imageDate);
|
@Param("imageDate") String imageDate);
|
||||||
|
|
||||||
Integer seedSuccess(@Param("zone") String zone,
|
Integer seedSuccess(@Param("zone") String zone,
|
||||||
@Param("imageDate") String imageDate);
|
@Param("imageDate") String imageDate);
|
||||||
|
|
||||||
Integer vegetationDistribution(@Param("zone") String zone,
|
Integer vegetationDistribution(@Param("zone") String zone,
|
||||||
@Param("imageDate") String imageDate);
|
@Param("imageDate") String imageDate);
|
||||||
|
|
||||||
Integer slope(@Param("zone") String zone,
|
Integer slope(@Param("zone") String zone,
|
||||||
@Param("imageDate") String imageDate);
|
@Param("imageDate") String imageDate);
|
||||||
|
|
||||||
Integer desertification(@Param("zone") String zone,
|
Integer desertification(@Param("zone") String zone,
|
||||||
@Param("imageDate") String imageDate);
|
@Param("imageDate") String imageDate);
|
||||||
|
|
||||||
Integer moisture(@Param("zone") String zone,
|
Integer moisture(@Param("zone") String zone,
|
||||||
@Param("imageDate") String imageDate);
|
@Param("imageDate") String imageDate);
|
||||||
|
|
||||||
Integer salinization(@Param("zone") String zone,
|
Integer salinization(@Param("zone") String zone,
|
||||||
@Param("imageDate") String imageDate);
|
@Param("imageDate") String imageDate);
|
||||||
|
|
||||||
Integer healthy(@Param("zone") String zone,
|
Integer healthy(@Param("zone") String zone,
|
||||||
@Param("imageDate") String imageDate,
|
@Param("imageDate") String imageDate,
|
||||||
@Param("resolution") String resolution);
|
@Param("resolution") String resolution);
|
||||||
|
|
||||||
Integer water(@Param("zone") String zone,
|
Integer water(@Param("zone") String zone,
|
||||||
@Param("imageDate") String imageDate);
|
@Param("imageDate") String imageDate);
|
||||||
|
|
||||||
Integer waterArea(@Param("zone") String zone,
|
Integer waterArea(@Param("zone") String zone,
|
||||||
@Param("imageDate") String imageDate);
|
@Param("imageDate") String imageDate);
|
||||||
|
|
||||||
Integer roadLength(@Param("zone") String zone,
|
Integer roadLength(@Param("zone") String zone,
|
||||||
@Param("imageDate") String imageDate);
|
@Param("imageDate") String imageDate);
|
||||||
|
|
||||||
Integer climateIndex(@Param("zone") String zone,
|
Integer climateIndex(@Param("zone") String zone,
|
||||||
@Param("imageDate") String imageDate);
|
@Param("imageDate") String imageDate);
|
||||||
|
|
||||||
List<DateUpload> selectUpload(@Param("zone") String zone,
|
List<DateUpload> selectUpload(@Param("zone") String zone,
|
||||||
@Param("type") String type,
|
@Param("type") String type,
|
||||||
@@ -71,13 +71,13 @@ public interface DateUploadMapper {
|
|||||||
@Param("dateTime") String dateTime);
|
@Param("dateTime") String dateTime);
|
||||||
|
|
||||||
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,
|
DateUpload selectShp(@Param("zone") String zone,
|
||||||
@Param("type") String type,
|
@Param("type") String type,
|
||||||
@Param("dateTime") String dateTime);
|
@Param("dateTime") String dateTime);
|
||||||
|
|
||||||
|
|
||||||
Integer DelUpload(@Param("id") Integer id);
|
Integer DelUpload(@Param("id") Integer id);
|
||||||
|
|||||||
+3
@@ -14,6 +14,9 @@ public interface PlantingSuitabilityMapper
|
|||||||
{
|
{
|
||||||
List<PlantingSuitability> sqlSeeding(@Param("zone") String zone);
|
List<PlantingSuitability> sqlSeeding(@Param("zone") String zone);
|
||||||
|
|
||||||
|
PlantingSuitability sqlSeeding1(@Param("zone") String zone,
|
||||||
|
@Param("year") String year);
|
||||||
|
|
||||||
Integer InsertSeeding(PlantingSuitability suitability);
|
Integer InsertSeeding(PlantingSuitability suitability);
|
||||||
|
|
||||||
List<PlantingSuitability> sqlYear();
|
List<PlantingSuitability> sqlYear();
|
||||||
|
|||||||
@@ -21,4 +21,8 @@ public interface VegetationHealthMapper
|
|||||||
List<VegetationHealth> sqlYear();
|
List<VegetationHealth> sqlYear();
|
||||||
|
|
||||||
Integer insertSeeding(VegetationHealth health);
|
Integer insertSeeding(VegetationHealth health);
|
||||||
|
|
||||||
|
|
||||||
|
List<VegetationHealth> sqlInfo(@Param("zone")String zone,
|
||||||
|
@Param("year")String year);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import org.apache.ibatis.annotations.Param;
|
|||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.StringTokenizer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: JinSheng Song
|
* @Author: JinSheng Song
|
||||||
@@ -37,36 +38,36 @@ public interface IDateUploadService {
|
|||||||
DateUpload selectDel(Integer id);
|
DateUpload selectDel(Integer id);
|
||||||
|
|
||||||
Integer altitude( String zone,
|
Integer altitude( String zone,
|
||||||
String imageDate);
|
|
||||||
Integer aspect( String zone,
|
|
||||||
String imageDate);
|
|
||||||
Integer landuse( String zone,
|
|
||||||
String imageDate);
|
String imageDate);
|
||||||
|
Integer aspect( String zone,
|
||||||
|
String imageDate);
|
||||||
|
Integer landuse( String zone,
|
||||||
|
String imageDate);
|
||||||
Integer suitability( String zone,
|
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);
|
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 climateIndex( String zone,
|
||||||
String imageDate);
|
String imageDate);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.ruoyi.system.service_shate;
|
|||||||
|
|
||||||
import com.ruoyi.system.domain_shate.LandUse;
|
import com.ruoyi.system.domain_shate.LandUse;
|
||||||
import com.ruoyi.system.domain_shate.SeedingSuccessRate;
|
import com.ruoyi.system.domain_shate.SeedingSuccessRate;
|
||||||
|
import com.ruoyi.system.domain_shate.UplodFile;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -21,4 +22,6 @@ public interface ILandUseServices
|
|||||||
|
|
||||||
List<LandUse> sqlYear();
|
List<LandUse> sqlYear();
|
||||||
|
|
||||||
|
UplodFile mainClass(String zone,String year);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+2
@@ -13,6 +13,8 @@ public interface IPlantingSuitabilityService
|
|||||||
{
|
{
|
||||||
List<PlantingSuitability> sqlSeeding(String zone);
|
List<PlantingSuitability> sqlSeeding(String zone);
|
||||||
|
|
||||||
|
PlantingSuitability sqlSeeding1(String zone,String year);
|
||||||
|
|
||||||
Integer InsertSeeding(PlantingSuitability suitability);
|
Integer InsertSeeding(PlantingSuitability suitability);
|
||||||
|
|
||||||
List<PlantingSuitability> sqlYear();
|
List<PlantingSuitability> sqlYear();
|
||||||
|
|||||||
@@ -20,4 +20,7 @@ public interface ISeedingSuccessService {
|
|||||||
Integer InsertSeeding2(SeedingSuccessRate eastVO);
|
Integer InsertSeeding2(SeedingSuccessRate eastVO);
|
||||||
|
|
||||||
Integer Delete(String zone,String imageDate,String name);
|
Integer Delete(String zone,String imageDate,String name);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-1
@@ -15,6 +15,8 @@ public interface IVegetationHealthServices {
|
|||||||
List<VegetationHealth> sqlSeeding(String zone,String name,String year);
|
List<VegetationHealth> sqlSeeding(String zone,String name,String year);
|
||||||
|
|
||||||
List<VegetationHealth> sqlYear();
|
List<VegetationHealth> sqlYear();
|
||||||
|
List<VegetationHealth> sqlInfo(String zone,String year);
|
||||||
Integer insertSeeding(VegetationHealth health);
|
Integer insertSeeding(VegetationHealth health);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+46
-2
@@ -1,9 +1,13 @@
|
|||||||
package com.ruoyi.system.service_shate.impl;
|
package com.ruoyi.system.service_shate.impl;
|
||||||
|
|
||||||
import com.ruoyi.system.domain_shate.LandUse;
|
import com.ruoyi.common.annotation.Excel;
|
||||||
import com.ruoyi.system.domain_shate.SeedingSuccessRate;
|
import com.ruoyi.system.domain_shate.*;
|
||||||
import com.ruoyi.system.mapper_shate.LandUseMapper;
|
import com.ruoyi.system.mapper_shate.LandUseMapper;
|
||||||
|
import com.ruoyi.system.mapper_shate.SoilFactorMapper;
|
||||||
import com.ruoyi.system.service_shate.ILandUseServices;
|
import com.ruoyi.system.service_shate.ILandUseServices;
|
||||||
|
import com.ruoyi.system.service_shate.IRegionalFactorService;
|
||||||
|
import com.ruoyi.system.service_shate.ISoilFactorService;
|
||||||
|
import com.ruoyi.system.service_shate.ITopographicFactorService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
@@ -21,6 +25,15 @@ public class LandUseServiceipml implements ILandUseServices
|
|||||||
@Resource
|
@Resource
|
||||||
private LandUseMapper mapper;
|
private LandUseMapper mapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ITopographicFactorService factorService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ISoilFactorService soilFactorService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IRegionalFactorService regionalFactorService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<LandUse> sqlSeeding(String zone, String[] landUses,String year) {
|
public List<LandUse> sqlSeeding(String zone, String[] landUses,String year) {
|
||||||
List<LandUse> value=mapper.sqlSeeding(zone, landUses,year);
|
List<LandUse> value=mapper.sqlSeeding(zone, landUses,year);
|
||||||
@@ -42,4 +55,35 @@ public class LandUseServiceipml implements ILandUseServices
|
|||||||
public List<LandUse> sqlYear() {
|
public List<LandUse> sqlYear() {
|
||||||
return mapper.sqlYear();
|
return mapper.sqlYear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public UplodFile mainClass(String zone,String year) {
|
||||||
|
|
||||||
|
UplodFile file=new UplodFile();
|
||||||
|
//海拔
|
||||||
|
List<Altitude> altitude = factorService.sqlAltitude(zone,year);
|
||||||
|
//坡度
|
||||||
|
List<Slope> slopes = factorService.sqlSlope(zone,year);
|
||||||
|
//坡向
|
||||||
|
List<Aspect> aspects = factorService.sqlAspect(zone,year);
|
||||||
|
//沙化指数
|
||||||
|
List<SoilDesertification> desertifications=soilFactorService.sqlDesert(zone,year);
|
||||||
|
//湿度指数
|
||||||
|
List<SoilMoisture> moistures=soilFactorService.sqlMoisture(zone,year);
|
||||||
|
//盐渍化指数
|
||||||
|
List<SoilSalinization> salinizations=soilFactorService.sqlSalin(zone,year);
|
||||||
|
//水域因子
|
||||||
|
List<WaterFactor> waterFactors=regionalFactorService.sqlWater(zone,year);
|
||||||
|
//道路因子
|
||||||
|
List<RoadFactor> roadFactors=regionalFactorService.sqlRoad(zone,year);
|
||||||
|
file.setWaterFactors(waterFactors);
|
||||||
|
file.setRoadFactors(roadFactors);
|
||||||
|
file.setSoilMoistures(moistures);
|
||||||
|
file.setSoilSalinizations(salinizations);
|
||||||
|
file.setSoilDesertifications(desertifications);
|
||||||
|
file.setAspects(aspects);
|
||||||
|
file.setSlopes(slopes);
|
||||||
|
file.setAltitudes(altitude);
|
||||||
|
return file;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+6
@@ -22,6 +22,12 @@ public class PlantingSuitabilityServiceIpml implements IPlantingSuitabilityServi
|
|||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PlantingSuitability sqlSeeding1(String zone, String year) {
|
||||||
|
PlantingSuitability value=mapper.sqlSeeding1(zone,year);
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer InsertSeeding(PlantingSuitability suitability) {
|
public Integer InsertSeeding(PlantingSuitability suitability) {
|
||||||
return mapper.InsertSeeding(suitability);
|
return mapper.InsertSeeding(suitability);
|
||||||
|
|||||||
+1
@@ -22,6 +22,7 @@ public class SeedingSuccessServiceimpl implements ISeedingSuccessService
|
|||||||
public List<SeedingSuccessRate> sqlSeeding(String zone, String year)
|
public List<SeedingSuccessRate> sqlSeeding(String zone, String year)
|
||||||
{
|
{
|
||||||
List<SeedingSuccessRate> vaue =mapper.sqlSeeding(zone,year);
|
List<SeedingSuccessRate> vaue =mapper.sqlSeeding(zone,year);
|
||||||
|
|
||||||
return vaue;
|
return vaue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+7
@@ -30,8 +30,15 @@ public class VegetationHealthServiceimpl implements IVegetationHealthServices
|
|||||||
return mapper.sqlYear();
|
return mapper.sqlYear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<VegetationHealth> sqlInfo(String zone,String year) {
|
||||||
|
return mapper.sqlInfo(zone,year);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer insertSeeding(VegetationHealth health) {
|
public Integer insertSeeding(VegetationHealth health) {
|
||||||
return mapper.insertSeeding(health);
|
return mapper.insertSeeding(health);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,9 +55,9 @@
|
|||||||
AND type = #{type}
|
AND type = #{type}
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<!-- <if test="dateTime!= null and dateTime !=''">-->
|
<!-- <if test="dateTime!= null and dateTime !=''">-->
|
||||||
<!-- AND data_time = #{dateTime}-->
|
<!-- AND data_time = #{dateTime}-->
|
||||||
<!-- </if>-->
|
<!-- </if>-->
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@@ -91,10 +91,11 @@
|
|||||||
<if test="name!= null and name !=''">
|
<if test="name!= null and name !=''">
|
||||||
AND file_name like #{name}
|
AND file_name like #{name}
|
||||||
</if>
|
</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>
|
||||||
|
|
||||||
<select id="selectShpfile" resultMap="RM_Upload">
|
<select id="selectShpfile" resultMap="RM_Upload">
|
||||||
@@ -237,13 +238,13 @@
|
|||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<delete id="seedSuccess">
|
<delete id="seedSuccess">
|
||||||
DELETE FROM #{seed_Success}
|
DELETE FROM "seed_Success"
|
||||||
WHERE zone = #{zone}
|
WHERE zone = #{zone}
|
||||||
and image_date =#{imageDate}
|
and image_date =#{imageDate}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<delete id="vegetationDistribution">
|
<delete id="vegetationDistribution">
|
||||||
DELETE FROM "vegetation_Distrbution"
|
DELETE FROM "vegetation_Distribution"
|
||||||
WHERE zone = #{zone}
|
WHERE zone = #{zone}
|
||||||
and image_date =#{imageDate}
|
and image_date =#{imageDate}
|
||||||
</delete>
|
</delete>
|
||||||
@@ -275,8 +276,8 @@
|
|||||||
<delete id="healthy">
|
<delete id="healthy">
|
||||||
DELETE FROM healthy
|
DELETE FROM healthy
|
||||||
WHERE zone = #{zone}
|
WHERE zone = #{zone}
|
||||||
and image_date =#{imageDate}
|
and image_date =#{imageDate}
|
||||||
and resolution=#{resolution}
|
and resolution=#{resolution}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<delete id="water">
|
<delete id="water">
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="sqlYear" resultMap="RM_Seeding">
|
<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>
|
</select>
|
||||||
|
|
||||||
<insert id="insertSeeding">
|
<insert id="insertSeeding">
|
||||||
|
|||||||
@@ -34,6 +34,18 @@
|
|||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="sqlSeeding1" resultMap="RM_Seeding">
|
||||||
|
SELECT <include refid="columns"/> FROM suitability
|
||||||
|
WHERE 1=1
|
||||||
|
<if test="zone!= null and zone !=''">
|
||||||
|
AND zone = #{zone}
|
||||||
|
</if>
|
||||||
|
<if test="year!= null and year !=''">
|
||||||
|
AND year1 = #{year}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="sqlYear" resultMap="RM_Seeding">
|
<select id="sqlYear" resultMap="RM_Seeding">
|
||||||
SELECT distinct year1,ZONE FROM suitability
|
SELECT distinct year1,ZONE FROM suitability
|
||||||
</select>
|
</select>
|
||||||
@@ -57,7 +69,7 @@
|
|||||||
#{verySuitable,jdbcType=DOUBLE},
|
#{verySuitable,jdbcType=DOUBLE},
|
||||||
#{suitable,jdbcType=DOUBLE},
|
#{suitable,jdbcType=DOUBLE},
|
||||||
#{notSuitable,jdbcType=DOUBLE},
|
#{notSuitable,jdbcType=DOUBLE},
|
||||||
#{totalArea,jdbcType=DOUBLE},
|
#{totalArea,jdbcType=DOUBLE},
|
||||||
#{imageDate,jdbcType=VARCHAR},
|
#{imageDate,jdbcType=VARCHAR},
|
||||||
#{productCode1,jdbcType=VARCHAR},
|
#{productCode1,jdbcType=VARCHAR},
|
||||||
#{productCode2,jdbcType=VARCHAR},
|
#{productCode2,jdbcType=VARCHAR},
|
||||||
|
|||||||
@@ -97,9 +97,9 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="sqlRegion" resultMap="RM_Region">
|
<select id="sqlRegion" resultMap="RM_Region">
|
||||||
select a.zone zone,a.year1 year1,a.water_area water_area,
|
select a.zone as zone,a.year1 as year1,a.water_area as water_area,
|
||||||
b.road_length road_length,a.image_date image_date,
|
b.road_length as road_length,a.image_date as image_date,
|
||||||
a.product_code product_code,b.product_code product_code1
|
a.product_code as product_code,b.product_code as product_code1
|
||||||
FROM water_area a join road_length b
|
FROM water_area a join road_length b
|
||||||
on a.image_date=b.image_date
|
on a.image_date=b.image_date
|
||||||
and a.zone=b.zone
|
and a.zone=b.zone
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<result property="seedingSuccessArea" column="Seeding_success_area"/>
|
<result property="seedingSuccessArea" column="Seeding_success_area"/>
|
||||||
<result property="seedingSuccess" column="seeding_success"/>
|
<result property="seedingSuccess" column="seeding_success"/>
|
||||||
<result property="imageDate" column="Image_date"/>
|
<result property="imageDate" column="Image_date"/>
|
||||||
<result property="productCode1" column="Product_code1"/>
|
<result property="productCode1" column="productCode1"/>
|
||||||
<result property="productCode2" column="Product_code2"/>
|
<result property="productCode2" column="Product_code2"/>
|
||||||
<result property="productCode3" column="Product_code3"/>
|
<result property="productCode3" column="Product_code3"/>
|
||||||
<result property="year" column="year1"/>
|
<result property="year" column="year1"/>
|
||||||
@@ -27,14 +27,14 @@
|
|||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="sqlSeeding" resultMap="RM_Seeding">
|
<select id="sqlSeeding" resultMap="RM_Seeding">
|
||||||
select distinct a.product_code2 Product_code2,
|
select distinct a.product_code2 as Product_code2,
|
||||||
a.zone zone,
|
a.zone as zone,
|
||||||
a.seeding_success_rate seeding_success,
|
a.seeding_success_rate as seeding_success,
|
||||||
a.product_code1 productCode1,
|
a.product_code1 as productCode1,
|
||||||
a.image_date Image_date,
|
a.image_date as Image_date,
|
||||||
b.seeding_success_area Seeding_success_area,
|
b.seeding_success_area as Seeding_success_area,
|
||||||
b.product_code2 Product_code3,
|
b.product_code2 as Product_code3,
|
||||||
a.year1 year1
|
a.year1 as year1
|
||||||
from "seed_Success" a
|
from "seed_Success" a
|
||||||
left join "vegetation_Distribution" b
|
left join "vegetation_Distribution" b
|
||||||
on a.image_date=b.image_date
|
on a.image_date=b.image_date
|
||||||
|
|||||||
@@ -56,7 +56,7 @@
|
|||||||
|
|
||||||
<sql id="columns">
|
<sql id="columns">
|
||||||
<![CDATA[
|
<![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>
|
</sql>
|
||||||
|
|
||||||
@@ -77,6 +77,16 @@
|
|||||||
<select id="sqlYear" resultMap="RM_Seeding">
|
<select id="sqlYear" resultMap="RM_Seeding">
|
||||||
SELECT distinct year1,ZONE FROM healthy
|
SELECT distinct year1,ZONE FROM healthy
|
||||||
</select>
|
</select>
|
||||||
|
<select id="sqlInfo" resultMap="RM_Seeding">
|
||||||
|
select * from healthy
|
||||||
|
where 1=1
|
||||||
|
<if test="zone!= null and zone !=''">
|
||||||
|
AND zone = #{zone}
|
||||||
|
</if>
|
||||||
|
<if test="year!= null and year !=''">
|
||||||
|
AND year1=#{year}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
Reference in New Issue
Block a user