Files
kunshan-bzfm-mes-backend/DOAN.Admin.WebApi/Controllers/MES/Material/MmRecordInboundController.cs

102 lines
3.3 KiB
C#
Raw Normal View History

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
{
/// <summary>
/// 入库记录表
/// </summary>
[Verify]
[Route("BZFM/MmRecordInbound")]
public class MmRecordInboundController : BaseController
{
/// <summary>
/// 入库记录表接口
/// </summary>
private readonly IMmRecordInboundService _MmRecordInboundService;
public MmRecordInboundController(IMmRecordInboundService MmRecordInboundService)
{
_MmRecordInboundService = MmRecordInboundService;
}
/// <summary>
/// 查询入库记录表列表
/// </summary>
/// <param name="parm"></param>
/// <returns></returns>
[HttpGet("list")]
[ActionPermissionFilter(Permission = "mmrecordinbound:list")]
public IActionResult QueryMmRecordInbound([FromQuery] MmRecordInboundQueryDto parm)
{
var response = _MmRecordInboundService.GetList(parm);
return SUCCESS(response);
}
/// <summary>
/// 查询入库记录表详情
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
[HttpGet("{Id}")]
[ActionPermissionFilter(Permission = "mmrecordinbound:query")]
public IActionResult GetMmRecordInbound(int Id)
{
var response = _MmRecordInboundService.GetInfo(Id);
var info = response.Adapt<MmRecordInboundDto>();
return SUCCESS(info);
}
/// <summary>
/// 添加入库记录表
/// </summary>
/// <returns></returns>
[HttpPost]
[ActionPermissionFilter(Permission = "mmrecordinbound:add")]
[Log(Title = "入库记录表", BusinessType = BusinessType.INSERT)]
public IActionResult AddMmRecordInbound([FromBody] MmRecordInboundDto parm)
{
var modal = parm.Adapt<MmRecordInbound>().ToCreate(HttpContext);
var response = _MmRecordInboundService.AddMmRecordInbound(modal);
return SUCCESS(response);
}
/// <summary>
/// 更新入库记录表
/// </summary>
/// <returns></returns>
[HttpPut]
[ActionPermissionFilter(Permission = "mmrecordinbound:edit")]
[Log(Title = "入库记录表", BusinessType = BusinessType.UPDATE)]
public IActionResult UpdateMmRecordInbound([FromBody] MmRecordInboundDto parm)
{
var modal = parm.Adapt<MmRecordInbound>().ToUpdate(HttpContext);
var response = _MmRecordInboundService.UpdateMmRecordInbound(modal);
return ToResponse(response);
}
/// <summary>
/// 删除入库记录表
/// </summary>
/// <returns></returns>
[HttpPost("delete/{ids}")]
[ActionPermissionFilter(Permission = "mmrecordinbound:delete")]
[Log(Title = "入库记录表", BusinessType = BusinessType.DELETE)]
public IActionResult DeleteMmRecordInbound([FromRoute]string ids)
{
var idArr = Tools.SplitAndConvert<int>(ids);
return ToResponse(_MmRecordInboundService.Delete(idArr));
}
}
}