package com.unis.reserveLayout.modular.dataSystemInfo.controller;

/**
 * 成品粮监管
 *
 * @author ZeroLiYi
 * @date  2024/06/04 11:37
 */

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import com.unis.basic.info.modular.orgInfo.param.OrgInfoPageParam;
import com.unis.basic.info.modular.orgInfo.service.OrgInfoService;
import com.unis.common.pojo.CommonResult;
import com.unis.reserveLayout.modular.dataSystemInfo.param.DataPageParam;
import com.unis.reserveLayout.modular.dataSystemInfo.service.DataService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

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





/**
 * 储备布局地理信息系统
 *
 * @author ZeroLiYi
 * @date  2024/06/04 11:37
 */

@Api(tags = "储备布局地理信息系统")
@ApiSupport(author = "UNIS_TEAM", order = 1)
@RestController
@Validated
public class DataController {

    @Resource
    private DataService dataService;

    @Resource
    private OrgInfoService orgInfoService;

    /**
     * 储备布局地理信息系统-库区列表分页
     *
     * @author ZeroLiYi
     * @date  2024/06/12 11:37
     */
    @ApiOperationSupport(order = 1)
    @ApiOperation("储备布局地理信息系统-库区列表分页")
    @GetMapping("/dataSystemInfo/selectOrgInfoPage")
    public CommonResult<IPage<Map<String,Object>>> selectOrgInfoPage(OrgInfoPageParam orgInfoPageParam) {
        return CommonResult.data(orgInfoService.findPage(orgInfoPageParam));
    }

    /**
     * 储备布局地理信息系统-库区数量
     *
     * @author ZeroLiYi
     * @date  2024/06/12 11:37
     */
    @ApiOperationSupport(order = 2)
    @ApiOperation("储备布局地理信息系统-库区数量")
    @GetMapping("/dataSystemInfo/selectOrgInfoCount")
    public CommonResult<Integer> selectOrgInfoCount() {
        return CommonResult.data(orgInfoService.selectOrgInfoCount());
    }

    /**
     * 储备布局地理信息系统-仓房分页
     *
     * @author ZeroLiYi
     * @date  2024/06/12 11:37
     */
    @ApiOperationSupport(order = 3)
    @ApiOperation("储备布局地理信息系统-仓房分页")
    @GetMapping("/dataSystemInfo/selectStoreHousePage")
    public CommonResult<IPage<Map<String,Object>>> selectStoreHousePage(OrgInfoPageParam orgInfoPageParam) {
        return CommonResult.data(orgInfoService.selectStoreHousePage(orgInfoPageParam));
    }


    /**
     * 储备布局地理信息系统-仓房数量
     *
     * @author ZeroLiYi
     * @date  2024/06/12 11:37
     */
    @ApiOperationSupport(order = 4)
    @ApiOperation("储备布局地理信息系统-仓房数量")
    @GetMapping("/dataSystemInfo/selectStoreHouseCount")
    public CommonResult<Integer> selectStoreHouseCount() {
        return CommonResult.data(orgInfoService.selectStoreHouseCount());
    }

    /**
     * 储备布局地理信息系统-粮食总库存
     *
     * @author ZeroLiYi
     * @date  2024/06/12 11:37
     */
    @ApiOperationSupport(order =    5)
    @ApiOperation("储备布局地理信息系统-粮食总库存")
    @GetMapping("/dataSystemInfo/selectInventoryCount")
    public CommonResult<Integer> selectInventoryCount() {
        return CommonResult.data(orgInfoService.selectInventoryCount());
    }

    /**
     * 储备布局地理信息系统-粮食库存性质
     *
     * @author ZeroLiYi
     * @date  2024/06/12 11:37
     */
    @ApiOperationSupport(order = 6)
    @ApiOperation("储备布局地理信息系统-粮食库存性质")
    @GetMapping("/dataSystemInfo/selectGrainNatureName")
    public CommonResult<List<Map<String, Object>>> selectGrainNatureName(DataPageParam dataPageParam) {
        return CommonResult.data(orgInfoService.selectGrainNatureName(dataPageParam));
    }

    /**
     * 储备布局地理信息系统-库存数量分页
     *
     * @author ZeroLiYi
     * @date  2024/06/12 11:37
     */
    @ApiOperationSupport(order = 7)
    @ApiOperation("储备布局地理信息系统-库存明细分页")
    @GetMapping("/dataSystemInfo/selectKcCountPage")
    public CommonResult<IPage<Map<String,Object>>> selectKcCountPage() {
        return CommonResult.data(orgInfoService.selectKcCountPage());
    }

    /**
     * 储备布局地理信息系统-库存图表
     *
     * @author ZeroLiYi
     * @date  2024/06/12 11:37
     */
    @ApiOperationSupport(order =8)
    @ApiOperation("储备布局地理信息系统-库存图表")
    @GetMapping("/dataSystemInfo/selectKcGrainGrade")
    public CommonResult<List<Map<String,Object>>> selectKcGrainGradeChart() {
        return CommonResult.data(orgInfoService.selectKcChart());
    }

    /**
     * 储备布局地理信息系统-库存图表
     *
     * @author ZeroLiYi
     * @date  2024/06/12 11:37
     */
    @ApiOperationSupport(order = 9)
    @ApiOperation("储备布局地理信息系统-库存图表")
    @GetMapping("/dataSystemInfo/selectKcGrainNature")
    public CommonResult<List<Map<String,Object>>> selectKcGrainNatureChart() {
        return CommonResult.data(orgInfoService.selectKcGrainNatureChart());
    }


    /**
     * 储备布局地理信息系统-库存报告-总库存
     *
     * @author ZeroLiYi
     * @date  2024/06/12 11:37
     */
    @ApiOperationSupport(order = 9)
    @ApiOperation("储备布局地理信息系统-库存报告-总库存")
    @GetMapping("/dataSystemInfo/selectKcSumRepot")
    public CommonResult<List<Map<String,Object>>> selectKcSumRepot(DataPageParam dataPageParam) {
        return CommonResult.data(orgInfoService.selectKcSumRepot(dataPageParam));
    }


    /**
     * 储备布局地理信息系统-库存报告-根据品种查询
     *
     * @author ZeroLiYi
     * @date  2024/06/12 11:37
     */
    @ApiOperationSupport(order = 9)
    @ApiOperation("储备布局地理信息系统-库存报告-根据品种查询")
    @GetMapping("/dataSystemInfo/selectKcGrainGradeRepot")
    public CommonResult<List<Map<String,Object>>> selectKcGrainGradeRepot(DataPageParam dataPageParam) {
        return CommonResult.data(orgInfoService.selectKcGrainGradeRepot(dataPageParam));
    }

    /**
     * 储备布局地理信息系统-库存报告-根据品种查询
     *
     * @author ZeroLiYi
     * @date  2024/06/12 11:37
     */
    @ApiOperationSupport(order = 9)
    @ApiOperation("储备布局地理信息系统-库存报告-根据品种查询")
    @GetMapping("/dataSystemInfo/selectKcGrainNatureRepot")
    public CommonResult<List<Map<String,Object>>> selectKcGrainNatureRepot(DataPageParam dataPageParam) {
        return CommonResult.data(orgInfoService.selectKcGrainNatureRepot(dataPageParam));
    }

    /**
     * 储备布局地理信息系统-库存报告-根据年限查询
     *
     * @author ZeroLiYi
     * @date  2024/06/12 11:37
     */
    @ApiOperationSupport(order = 9)
    @ApiOperation("储备布局地理信息系统-库存报告-根据年限查询")
    @GetMapping("/dataSystemInfo/selectKcYearRepot")
    public CommonResult<List<Map<String,Object>>> selectKcYearRepot(DataPageParam dataPageParam) {
        return CommonResult.data(orgInfoService.selectKcYearRepot(dataPageParam));
    }








}
