package com.unis.mobileInfo.modular.dropdownSelection.controller;

import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import com.unis.common.pojo.CommonResult;
import com.unis.mobileInfo.modular.dropdownSelection.service.SelectionService;
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 qingsong.han
 * @description:
 * @create 2024-04-28 20:17
 */
@Api(tags = "售粮排队监测预警-下拉选")
@ApiSupport(author = "UNIS_TEAM", order = 1)
@RestController
@Validated
public class SelectionController {
    @Resource
    private SelectionService selectionService;

    @ApiOperationSupport(order = 1)
    @ApiOperation("组织机构")
    @GetMapping("/client/c/mobileInfo/selection/selectionOrg")
    public CommonResult<List<Map<String, Object>>> selectionOrg() {
        return CommonResult.data(selectionService.selectionOrg());
    }

    @ApiOperationSupport(order = 1)
    @ApiOperation("车辆类型")
    @GetMapping("/client/c/mobileInfo/selection/selectionCarType")
    public CommonResult<List<Map<String, Object>>> selectionCarType() {
        return CommonResult.data(selectionService.selectCarType());
    }

}
