Files
SecMPS/api_sqlsugar/VolPro.WebApi/Controllers/Warehouse/Partial/warehouse_carsController.cs
2026-05-15 23:22:48 +08:00

56 lines
1.5 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*
*接口编写处...
*如果接口需要做Action的权限验证请在Action上使用属性
*如: [ApiActionPermission("warehouse_cars",Enums.ActionPermissionOptions.Search)]
*/
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
using VolPro.Entity.DomainModels;
using Warehouse.IServices;
namespace Warehouse.Controllers
{
public partial class warehouse_carsController
{
private readonly Iwarehouse_carsService _service;//访问业务代码
private readonly IHttpContextAccessor _httpContextAccessor;
[ActivatorUtilitiesConstructor]
public warehouse_carsController(
Iwarehouse_carsService service,
IHttpContextAccessor httpContextAccessor
)
: base(service)
{
_service = service;
_httpContextAccessor = httpContextAccessor;
}
[Route("GetCarStatus"), HttpGet]
[AllowAnonymous]
public async Task<IActionResult> GetCarStatus(int carid)
{
return Json(_service.GetCarStatus(carid));
}
[Route("GetCarNumber"), HttpGet]
[AllowAnonymous]
public int GetCarNumber()
{
return _service.GetCarNumber();
}
[Route("GetCarList"), HttpGet]
[AllowAnonymous]
public List<warehouse_cars> GetCarList()
{
return _service.GetCarList();
}
}
}