using System.ComponentModel.DataAnnotations; using Entity.DbModel.Station; using Entity.DbModel.System.App; using Entity.Dto.Req; using HybirdFrameworkCore.Entity; using Microsoft.AspNetCore.Mvc; using Service.Station; namespace WebStarter.Controllers; /// /// 车辆管理 /// [ApiController] [Route("api/[controller]")] public class VehicleController { private readonly VehicleService _vehicleService; /// /// /// /// public VehicleController(VehicleService vehicleService) { _vehicleService = vehicleService; } /// /// 查询车队分页 /// /// 查询参数 /// [HttpPost] [Route("GetVehiclePage")] public async Task> GetVehiclePage( [FromBody] PageVehicleReq req) { return await _vehicleService.Page(req); } /// /// 获取所有车队 /// /// [HttpPost] [Route("GetVehicleList")] public Result> GetVehicleList() { return Result>.Success(_vehicleService.GetVehicle()); } /// /// 新增车队 /// /// /// [HttpPost] [Route("add")] public Result AddVehicle([FromBody] AddVehicleReq input) { return _vehicleService.AddVehicleReq(input); } /// /// 修改车队 /// /// /// [HttpPost] [Route("UpdateVehicle")] public async Task> UpdateVehicle([FromBody] UpdateVehicleReq user) { return _vehicleService.UpdateVehicle(user); } /// /// 删除车队 /// /// /// [HttpPost] [Route("delete")] public async Task> DeleteVehicle([FromBody] List ids) { return _vehicleService.DeleteVehicle(ids); } }