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