using Microsoft.AspNetCore.Mvc; using DOAN.Model.BZFM.Dto; using DOAN.Model.BZFM; using DOAN.Service.BZFM.IBZFMService; using DOAN.Admin.WebApi.Filters; //创建时间:2025-12-25 namespace DOAN.Admin.WebApi.Controllers.BZFM { /// /// 入库记录表 /// [Verify] [Route("BZFM/MmRecordInbound")] public class MmRecordInboundController : BaseController { /// /// 入库记录表接口 /// private readonly IMmRecordInboundService _MmRecordInboundService; public MmRecordInboundController(IMmRecordInboundService MmRecordInboundService) { _MmRecordInboundService = MmRecordInboundService; } /// /// 查询入库记录表列表 /// /// /// [HttpGet("list")] [ActionPermissionFilter(Permission = "mmrecordinbound:list")] public IActionResult QueryMmRecordInbound([FromQuery] MmRecordInboundQueryDto parm) { var response = _MmRecordInboundService.GetList(parm); return SUCCESS(response); } /// /// 查询入库记录表详情 /// /// /// [HttpGet("{Id}")] [ActionPermissionFilter(Permission = "mmrecordinbound:query")] public IActionResult GetMmRecordInbound(int Id) { var response = _MmRecordInboundService.GetInfo(Id); var info = response.Adapt(); return SUCCESS(info); } /// /// 添加入库记录表 /// /// [HttpPost] [ActionPermissionFilter(Permission = "mmrecordinbound:add")] [Log(Title = "入库记录表", BusinessType = BusinessType.INSERT)] public IActionResult AddMmRecordInbound([FromBody] MmRecordInboundDto parm) { var modal = parm.Adapt().ToCreate(HttpContext); var response = _MmRecordInboundService.AddMmRecordInbound(modal); return SUCCESS(response); } /// /// 更新入库记录表 /// /// [HttpPut] [ActionPermissionFilter(Permission = "mmrecordinbound:edit")] [Log(Title = "入库记录表", BusinessType = BusinessType.UPDATE)] public IActionResult UpdateMmRecordInbound([FromBody] MmRecordInboundDto parm) { var modal = parm.Adapt().ToUpdate(HttpContext); var response = _MmRecordInboundService.UpdateMmRecordInbound(modal); return ToResponse(response); } /// /// 删除入库记录表 /// /// [HttpPost("delete/{ids}")] [ActionPermissionFilter(Permission = "mmrecordinbound:delete")] [Log(Title = "入库记录表", BusinessType = BusinessType.DELETE)] public IActionResult DeleteMmRecordInbound([FromRoute]string ids) { var idArr = Tools.SplitAndConvert(ids); return ToResponse(_MmRecordInboundService.Delete(idArr)); } } }