报告修改
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
@ -14,6 +14,9 @@ public interface PlantingSuitabilityMapper
|
||||
{
|
||||
List<PlantingSuitability> sqlSeeding(@Param("zone") String zone);
|
||||
|
||||
PlantingSuitability sqlSeeding1(@Param("zone") String zone,
|
||||
@Param("year") String year);
|
||||
|
||||
Integer InsertSeeding(PlantingSuitability suitability);
|
||||
|
||||
List<PlantingSuitability> sqlYear();
|
||||
|
@ -2,6 +2,7 @@ package com.ruoyi.system.service_shate;
|
||||
|
||||
import com.ruoyi.system.domain_shate.LandUse;
|
||||
import com.ruoyi.system.domain_shate.SeedingSuccessRate;
|
||||
import com.ruoyi.system.domain_shate.UplodFile;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
@ -21,4 +22,6 @@ public interface ILandUseServices
|
||||
|
||||
List<LandUse> sqlYear();
|
||||
|
||||
UplodFile mainClass(String zone,String year);
|
||||
|
||||
}
|
||||
|
@ -13,6 +13,8 @@ public interface IPlantingSuitabilityService
|
||||
{
|
||||
List<PlantingSuitability> sqlSeeding(String zone);
|
||||
|
||||
PlantingSuitability sqlSeeding1(String zone,String year);
|
||||
|
||||
Integer InsertSeeding(PlantingSuitability suitability);
|
||||
|
||||
List<PlantingSuitability> sqlYear();
|
||||
|
@ -1,9 +1,13 @@
|
||||
package com.ruoyi.system.service_shate.impl;
|
||||
|
||||
import com.ruoyi.system.domain_shate.LandUse;
|
||||
import com.ruoyi.system.domain_shate.SeedingSuccessRate;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.system.domain_shate.*;
|
||||
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.IRegionalFactorService;
|
||||
import com.ruoyi.system.service_shate.ISoilFactorService;
|
||||
import com.ruoyi.system.service_shate.ITopographicFactorService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@ -21,6 +25,15 @@ public class LandUseServiceipml implements ILandUseServices
|
||||
@Resource
|
||||
private LandUseMapper mapper;
|
||||
|
||||
@Resource
|
||||
private ITopographicFactorService factorService;
|
||||
|
||||
@Resource
|
||||
private ISoilFactorService soilFactorService;
|
||||
|
||||
@Resource
|
||||
private IRegionalFactorService regionalFactorService;
|
||||
|
||||
@Override
|
||||
public List<LandUse> sqlSeeding(String zone, String[] landUses,String year) {
|
||||
List<LandUse> value=mapper.sqlSeeding(zone, landUses,year);
|
||||
@ -42,4 +55,35 @@ public class LandUseServiceipml implements ILandUseServices
|
||||
public List<LandUse> 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;
|
||||
}
|
||||
}
|
||||
|
@ -22,6 +22,12 @@ public class PlantingSuitabilityServiceIpml implements IPlantingSuitabilityServi
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlantingSuitability sqlSeeding1(String zone, String year) {
|
||||
PlantingSuitability value=mapper.sqlSeeding1(zone,year);
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer InsertSeeding(PlantingSuitability suitability) {
|
||||
return mapper.InsertSeeding(suitability);
|
||||
|
@ -34,6 +34,18 @@
|
||||
</if>
|
||||
</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 distinct year1,ZONE FROM suitability
|
||||
</select>
|
||||
|
Reference in New Issue
Block a user