修改森林检测模块
This commit is contained in:
parent
aab12640b0
commit
da51b2a55d
@ -7,6 +7,7 @@ import com.ruoyi.system.service_yada.impl.ForestDetectionServiceImpl;
|
|||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
@ -25,14 +26,14 @@ public class ForestDetectionControer {
|
|||||||
private IForestDetectionService service;
|
private IForestDetectionService service;
|
||||||
|
|
||||||
@RequestMapping(value = "/select", method = {RequestMethod.GET})
|
@RequestMapping(value = "/select", method = {RequestMethod.GET})
|
||||||
public AjaxResult select() {
|
public AjaxResult select(@RequestParam(value = "year1",required = false) String year1) {
|
||||||
ForestDetectionVO forest = new ForestDetectionVO();
|
ForestDetectionVO forest = new ForestDetectionVO();
|
||||||
|
|
||||||
List<ChangeTable> changes = service.selectChange();
|
List<ChangeTable> changes = service.selectChange();
|
||||||
|
|
||||||
List<CloumnarTable> cloumnars = service.selectCloumnar();
|
List<CloumnarTable> cloumnars = service.selectCloumnar();
|
||||||
|
|
||||||
List<TypeTable> types = service.selectType();
|
List<TypeTable> types = service.selectType(year1);
|
||||||
|
|
||||||
List<TypeConversion> conversions = service.selectConversion();
|
List<TypeConversion> conversions = service.selectConversion();
|
||||||
|
|
||||||
|
@ -4,6 +4,8 @@ import com.ruoyi.system.domain_yada.ChangeTable;
|
|||||||
import com.ruoyi.system.domain_yada.CloumnarTable;
|
import com.ruoyi.system.domain_yada.CloumnarTable;
|
||||||
import com.ruoyi.system.domain_yada.TypeConversion;
|
import com.ruoyi.system.domain_yada.TypeConversion;
|
||||||
import com.ruoyi.system.domain_yada.TypeTable;
|
import com.ruoyi.system.domain_yada.TypeTable;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -13,7 +15,7 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
public interface ForestDetectionMapper {
|
public interface ForestDetectionMapper {
|
||||||
|
|
||||||
List<TypeTable> selectType();
|
List<TypeTable> selectType(@Param("year1") String year1);
|
||||||
|
|
||||||
List<CloumnarTable> selectCloumnar();
|
List<CloumnarTable> selectCloumnar();
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@ import com.ruoyi.system.domain_yada.ChangeTable;
|
|||||||
import com.ruoyi.system.domain_yada.CloumnarTable;
|
import com.ruoyi.system.domain_yada.CloumnarTable;
|
||||||
import com.ruoyi.system.domain_yada.TypeConversion;
|
import com.ruoyi.system.domain_yada.TypeConversion;
|
||||||
import com.ruoyi.system.domain_yada.TypeTable;
|
import com.ruoyi.system.domain_yada.TypeTable;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -13,7 +14,7 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
public interface IForestDetectionService {
|
public interface IForestDetectionService {
|
||||||
|
|
||||||
List<TypeTable> selectType();
|
List<TypeTable> selectType(@Param("year1") String year1);
|
||||||
|
|
||||||
List<CloumnarTable> selectCloumnar();
|
List<CloumnarTable> selectCloumnar();
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@ import com.ruoyi.system.domain_yada.TypeConversion;
|
|||||||
import com.ruoyi.system.domain_yada.TypeTable;
|
import com.ruoyi.system.domain_yada.TypeTable;
|
||||||
import com.ruoyi.system.mapper_yada.ForestDetectionMapper;
|
import com.ruoyi.system.mapper_yada.ForestDetectionMapper;
|
||||||
import com.ruoyi.system.service_yada.IForestDetectionService;
|
import com.ruoyi.system.service_yada.IForestDetectionService;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
@ -23,8 +24,8 @@ public class ForestDetectionServiceImpl implements IForestDetectionService {
|
|||||||
private ForestDetectionMapper mapper;
|
private ForestDetectionMapper mapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<TypeTable> selectType() {
|
public List<TypeTable> selectType(@Param("year1") String year1) {
|
||||||
return mapper.selectType();
|
return mapper.selectType(year1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -13,6 +13,9 @@
|
|||||||
|
|
||||||
<select id="selectType" resultType="com.ruoyi.system.domain_yada.TypeTable">
|
<select id="selectType" resultType="com.ruoyi.system.domain_yada.TypeTable">
|
||||||
SELECT id,class1,percentage,china,year1 FROM type_table
|
SELECT id,class1,percentage,china,year1 FROM type_table
|
||||||
|
<if test="year1!= null and year1 !=''">
|
||||||
|
where year1 = #{year1}
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user