using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using AutoTurnOver.Services;
using Microsoft.AspNetCore.Cors;

namespace AutoTurnOver.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class CommonController : BaseController
    {
        /// <summary>
        /// 获取仓库列表
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public JsonResult ListWareHouse(int? type)
        {
            var list = new CommonServices().ListWareHouse(type);
            return new JsonResult(list);
        }

        /// <summary>
        /// 获取仓库类型列表
        /// </summary>
        /// <returns></returns>
        public JsonResult ListWareHouseType()
        {
            var list = new CommonServices().ListWareHouseType();
            return new JsonResult(list);
        }


    }
}