package com.ruoyi.web.controller.shate;

import com.alibaba.fastjson.JSON;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.domain_shate.LandUse;
import com.ruoyi.system.domain_shate.SeedingSuccessRate;
import com.ruoyi.system.domain_shate.UplodFile;
import com.ruoyi.system.domain_shate.VegetationHealth;
import com.ruoyi.system.service_shate.*;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author: JinSheng Song
 * @Date: 2022/7/11 9:49
 * 文件删除接口
 */

public class UploadFile
{

    private IDateUploadService seedingService;

    public  void UploadFile1(String Uplod,String zone,String imageDate,IDateUploadService service,String resolution)
    {
        seedingService=service;
        Integer num=0;
        switch (Uplod)
        {
            case "Altitude":
                //海拔
                num=seedingService.altitude(zone,imageDate);
                break;
            case "Aspect":
                //坡向
                num=seedingService.aspect(zone,imageDate);
                break;
            case "Landuse":
                //土地利用类型1
                num=seedingService.landuse(zone,imageDate);
                break;
            case "Landuse_Planting":
                //土地利用类型2
                num=seedingService.landuse(zone,imageDate);
                break;
            case "Suitability":
                //种植适宜性
                num=seedingService.suitability(zone,imageDate);
                break;
            case "Road":
                //道路指数
                num=seedingService.road(zone,imageDate);
                break;
            case "Seed_Success":
                //种植适应性1
                num=seedingService.seedSuccess(zone,imageDate);
                break;
            case "Vegetation_Distribution":
                //种植适宜性
                num=seedingService.vegetationDistribution(zone,imageDate);
                break;
            case "Slope":
                //坡度
                num=seedingService.slope(zone,imageDate);
                break;
            case "Desertification":
                //土壤沙化指数
                num=seedingService.desertification(zone,imageDate);
                break;
            case "Moisture":
                //土壤湿度指数
                num=seedingService.moisture(zone,imageDate);
                break;
            case "Salinization":
                //土壤盐渍化指数
                num=seedingService.salinization(zone,imageDate);
                break;
            case "Healthy":
                //植被健康状况
                num=seedingService.healthy(zone,imageDate,resolution);
                break;
            case "Water":
                //水分因素
                num=seedingService.water(zone,imageDate);
                break;

            case "Water_area":
                //土壤盐渍化指数
                num=seedingService.waterArea(zone,imageDate);
                break;
            case "Road_length":
                //植被健康状况
                break;
            case "Climate_index":
                //水分因素
                num=seedingService.climateIndex(zone,imageDate);
                break;
            default: num=0;
        }
    }
}
