Files
kunshan-bzfm-mes-backend/DOAN.Admin.WebApi/Controllers/MES/Material/MmRecordOutboundController.cs
Carl 4fa187e11d 新增BZFM物料管理相关后端接口与服务实现
本次提交为BZFM模块新增了物料管理相关的核心后端能力,包括库位、物料、物料分类、出入库记录、出入库类别等6张表的Controller、实体、DTO、Service及接口定义,实现了标准的增删改查接口,支持权限校验、AOP日志、分页查询等,完善了物料管理基础后端支撑。
2025-12-25 12:02:03 +08:00

102 lines
3.3 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.

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/MmRecordOutbound")]
public class MmRecordOutboundController : BaseController
{
/// <summary>
/// 出库记录表接口
/// </summary>
private readonly IMmRecordOutboundService _MmRecordOutboundService;
public MmRecordOutboundController(IMmRecordOutboundService MmRecordOutboundService)
{
_MmRecordOutboundService = MmRecordOutboundService;
}
/// <summary>
/// 查询出库记录表列表
/// </summary>
/// <param name="parm"></param>
/// <returns></returns>
[HttpGet("list")]
[ActionPermissionFilter(Permission = "mmrecordoutbound:list")]
public IActionResult QueryMmRecordOutbound([FromQuery] MmRecordOutboundQueryDto parm)
{
var response = _MmRecordOutboundService.GetList(parm);
return SUCCESS(response);
}
/// <summary>
/// 查询出库记录表详情
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
[HttpGet("{Id}")]
[ActionPermissionFilter(Permission = "mmrecordoutbound:query")]
public IActionResult GetMmRecordOutbound(int Id)
{
var response = _MmRecordOutboundService.GetInfo(Id);
var info = response.Adapt<MmRecordOutboundDto>();
return SUCCESS(info);
}
/// <summary>
/// 添加出库记录表
/// </summary>
/// <returns></returns>
[HttpPost]
[ActionPermissionFilter(Permission = "mmrecordoutbound:add")]
[Log(Title = "出库记录表", BusinessType = BusinessType.INSERT)]
public IActionResult AddMmRecordOutbound([FromBody] MmRecordOutboundDto parm)
{
var modal = parm.Adapt<MmRecordOutbound>().ToCreate(HttpContext);
var response = _MmRecordOutboundService.AddMmRecordOutbound(modal);
return SUCCESS(response);
}
/// <summary>
/// 更新出库记录表
/// </summary>
/// <returns></returns>
[HttpPut]
[ActionPermissionFilter(Permission = "mmrecordoutbound:edit")]
[Log(Title = "出库记录表", BusinessType = BusinessType.UPDATE)]
public IActionResult UpdateMmRecordOutbound([FromBody] MmRecordOutboundDto parm)
{
var modal = parm.Adapt<MmRecordOutbound>().ToUpdate(HttpContext);
var response = _MmRecordOutboundService.UpdateMmRecordOutbound(modal);
return ToResponse(response);
}
/// <summary>
/// 删除出库记录表
/// </summary>
/// <returns></returns>
[HttpPost("delete/{ids}")]
[ActionPermissionFilter(Permission = "mmrecordoutbound:delete")]
[Log(Title = "出库记录表", BusinessType = BusinessType.DELETE)]
public IActionResult DeleteMmRecordOutbound([FromRoute]string ids)
{
var idArr = Tools.SplitAndConvert<int>(ids);
return ToResponse(_MmRecordOutboundService.Delete(idArr));
}
}
}