/*
 * Copyright [2022] [https://www.xiaonuo.vip]
 *
 * Snowy采用APACHE LICENSE 2.0开源协议，您在使用过程中，需要注意以下几点：
 *
 * 1.请不要删除和修改根目录下的LICENSE文件。
 * 2.请不要删除和修改Snowy源码头部的版权声明。
 * 3.本项目代码可免费商业使用，商业使用请保留源码和相关描述文件的项目出处，作者声明等。
 * 4.分发源码时候，请注明软件出处 https://www.xiaonuo.vip
 * 5.不可二次分发开源参与同类竞品，如有想法可联系团队xiaonuobase@qq.com商议合作。
 * 6.若您的项目无法满足以上几点，需要更多功能代码，获取Snowy商业授权许可，请在官网购买授权，地址为 https://www.xiaonuo.vip
 */
package vip.xiaonuo.biz.modular.depotMapPage.controller;

import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
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 vip.xiaonuo.biz.modular.depotAlarm.param.DepotAlarmPageParam;
import vip.xiaonuo.biz.modular.depotMapPage.entity.MapZoneCountVo;
import vip.xiaonuo.biz.modular.depotMapPage.entity.MapZoneSumGroupVo;
import vip.xiaonuo.biz.modular.depotMapPage.entity.WaitApprovalCountGroupVo;
import vip.xiaonuo.common.pojo.CommonResult;
import vip.xiaonuo.biz.modular.depotMapPage.param.DepotMapPagePageParam;
import vip.xiaonuo.biz.modular.depotMapPage.service.DepotMapPageService;

import javax.annotation.Resource;

/**
 * 地图页信息表控制器
 *
 * @author xiang
 * @date 2023/09/20 09:09
 */
@Api(tags = "地图页信息表控制器")
@ApiSupport(author = "SNOWY_TEAM", order = 1)
@RestController
@Validated
public class DepotMapPageController {

    @Resource
    private DepotMapPageService depotMapPageService;

    /**
     * 获取地图页信息表分页
     *
     * @author xiang
     * @date 2023/09/20 09:09
     */
    @ApiOperationSupport(order = 1)
    @ApiOperation("获取地图页信息表分页")
    @GetMapping("/biz/depotMapPage/page")
    public CommonResult<Object> page(DepotMapPagePageParam depotMapPagePageParam) {
        return CommonResult.data(depotMapPageService.page(depotMapPagePageParam));
    }

    /**
     * 获取地图页信息_地区粮库数量列表
     *
     * @author xiang
     * @date 2023/09/20 09:09
     */
    @ApiOperationSupport(order = 1)
    @ApiOperation("获取地图页信息_地区粮库数量列表")
    @GetMapping("/biz/depotMapPage/mapZoneCount")
    public CommonResult<Object> mapZoneCount(MapZoneCountVo vo) {
        return CommonResult.data(depotMapPageService.mapZoneCount(vo.getName() == null ? "黑龙江省" : vo.getName()));
    }

    /**
     * 获取地图页信息_订单额统计
     *
     * @author xiang
     * @date 2023/09/20 09:09
     */
    @ApiOperationSupport(order = 1)
    @ApiOperation("获取地图页信息_订单额统计")
    @GetMapping("/biz/depotMapPage/orderSum")
    public CommonResult<Object> orderSum() {
        return CommonResult.data(depotMapPageService.orderSum());
    }

    /**
     * 获取地图页信息_主流地价格列表
     *
     * @author xiang
     * @date 2023/09/20 09:09
     */
    @ApiOperationSupport(order = 1)
    @ApiOperation("获取地图页信息_主流地价格列表")
    @GetMapping("/biz/depotMapPage/mainZonePrice")
    public CommonResult<Object> mainZonePrice() {
        return CommonResult.data(depotMapPageService.mainZonePrice());
    }

    /**
     * 获取地图页信息_期货信息列表
     *
     * @author xiang
     * @date 2023/09/20 09:09
     */
    @ApiOperationSupport(order = 1)
    @ApiOperation("获取地图页信息_期货信息列表")
    @GetMapping("/biz/depotMapPage/mapZoneFutures")
    public CommonResult<Object> mapZoneFutures() {
        return CommonResult.data(depotMapPageService.mapZoneFutures());
    }

    /**
     * 获取地图页信息_地区交易额列表
     *
     * @author xiang
     * @date 2023/09/20 09:09
     */
    @ApiOperationSupport(order = 1)
    @ApiOperation("获取地图页信息_地区交易额列表")
    @GetMapping("/biz/depotMapPage/mapZoneSum")
    public CommonResult<Object> mapZoneSum(MapZoneSumGroupVo vo) {
        return CommonResult.data(depotMapPageService.mapZoneSum(vo.getAddressName() == null ? "黑龙江省" : vo.getAddressName()));
    }

    /**
     * 获取地图页信息_地区交易额弹框
     *
     * @author xiang
     * @date 2023/09/20 09:09
     */
    @ApiOperationSupport(order = 1)
    @ApiOperation("获取地图页信息_地区交易额弹框")
    @GetMapping("/biz/depotMapPage/mapZoneSumGroup")
    public CommonResult<Object> mapZoneSumGroup(MapZoneSumGroupVo vo) {
        return CommonResult.data(depotMapPageService.mapZoneSumGroup(vo.getAddressName()));
    }

    /**
     * 获取地图页信息_预约审批统计
     *
     * @author xiang
     * @date 2023/09/20 09:09
     */
    @ApiOperationSupport(order = 1)
    @ApiOperation("获取地图页信息_预约审批统计")
    @GetMapping("/biz/depotMapPage/waitApprovalSum")
    public CommonResult<Object> waitApprovalSum() {
        return CommonResult.data(depotMapPageService.waitApprovalSum());
    }

    /**
     * 获取地图页信息_预约审批列表
     *
     * @author xiang
     * @date 2023/09/20 09:09
     */
    @ApiOperationSupport(order = 1)
    @ApiOperation("获取地图页信息_预约审批列表")
    @GetMapping("/biz/depotMapPage/waitApprovalGroup")
    public CommonResult<Object> waitApprovalGroup() {
        return CommonResult.data(depotMapPageService.waitApprovalGroup());
    }

    /**
     * 获取地图页信息_预约审批弹框
     *
     * @author xiang
     * @date 2023/09/20 09:09
     */
    @ApiOperationSupport(order = 1)
    @ApiOperation("获取地图页信息_预约审批弹框")
    @GetMapping("/biz/depotMapPage/waitApprovalList")
    public CommonResult<Object> waitApprovalList(WaitApprovalCountGroupVo param) {
        return CommonResult.data(depotMapPageService.waitApprovalList(param.getDepotId(), param.getTitleName()));
    }

    /**
     * 获取地图页信息_报警统计
     *
     * @author xiang
     * @date 2023/09/20 09:09
     */
    @ApiOperationSupport(order = 1)
    @ApiOperation("获取地图页信息_获取报警统计")
    @GetMapping("/biz/depotMapPage/waitProcessSum")
    public CommonResult<Object> waitProcessSum() {
        return CommonResult.data(depotMapPageService.waitProcessSum());
    }

    /**
     * 获取地图页信息_报警弹框
     *
     * @author xiang
     * @date 2023/09/20 09:09
     */
    @ApiOperationSupport(order = 1)
    @ApiOperation("获取地图页信息_报警弹框")
    @GetMapping("/biz/depotMapPage/waitProcessList")
    public CommonResult<Object> waitProcessList(DepotAlarmPageParam param) {
        return CommonResult.data(depotMapPageService.waitProcessList(param));
    }

    /**
     * 获取地图页信息_粮库出库入库
     *
     * @author xiang
     * @date 2023/09/20 09:09
     */
    @ApiOperationSupport(order = 1)
    @ApiOperation("获取地图页信息_粮库出库入库")
    @GetMapping("/biz/depotMapPage/workSum")
    public CommonResult<Object> workSum() {
        return CommonResult.data(depotMapPageService.workSum());
    }

}
