新增BZFM物料管理相关后端接口与服务实现
本次提交为BZFM模块新增了物料管理相关的核心后端能力,包括库位、物料、物料分类、出入库记录、出入库类别等6张表的Controller、实体、DTO、Service及接口定义,实现了标准的增删改查接口,支持权限校验、AOP日志、分页查询等,完善了物料管理基础后端支撑。
This commit is contained in:
@@ -0,0 +1,102 @@
|
||||
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/MmLocation")]
|
||||
public class MmLocationController : BaseController
|
||||
{
|
||||
/// <summary>
|
||||
/// 库位表接口
|
||||
/// </summary>
|
||||
private readonly IMmLocationService _MmLocationService;
|
||||
|
||||
public MmLocationController(IMmLocationService MmLocationService)
|
||||
{
|
||||
_MmLocationService = MmLocationService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询库位表列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("list")]
|
||||
[ActionPermissionFilter(Permission = "mmlocation:list")]
|
||||
public IActionResult QueryMmLocation([FromQuery] MmLocationQueryDto parm)
|
||||
{
|
||||
var response = _MmLocationService.GetList(parm);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询库位表详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("{Id}")]
|
||||
[ActionPermissionFilter(Permission = "mmlocation:query")]
|
||||
public IActionResult GetMmLocation(int Id)
|
||||
{
|
||||
var response = _MmLocationService.GetInfo(Id);
|
||||
|
||||
var info = response.Adapt<MmLocationDto>();
|
||||
return SUCCESS(info);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加库位表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[ActionPermissionFilter(Permission = "mmlocation:add")]
|
||||
[Log(Title = "库位表", BusinessType = BusinessType.INSERT)]
|
||||
public IActionResult AddMmLocation([FromBody] MmLocationDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<MmLocation>().ToCreate(HttpContext);
|
||||
|
||||
var response = _MmLocationService.AddMmLocation(modal);
|
||||
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新库位表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
[ActionPermissionFilter(Permission = "mmlocation:edit")]
|
||||
[Log(Title = "库位表", BusinessType = BusinessType.UPDATE)]
|
||||
public IActionResult UpdateMmLocation([FromBody] MmLocationDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<MmLocation>().ToUpdate(HttpContext);
|
||||
var response = _MmLocationService.UpdateMmLocation(modal);
|
||||
|
||||
return ToResponse(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除库位表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost("delete/{ids}")]
|
||||
[ActionPermissionFilter(Permission = "mmlocation:delete")]
|
||||
[Log(Title = "库位表", BusinessType = BusinessType.DELETE)]
|
||||
public IActionResult DeleteMmLocation([FromRoute]string ids)
|
||||
{
|
||||
var idArr = Tools.SplitAndConvert<int>(ids);
|
||||
|
||||
return ToResponse(_MmLocationService.Delete(idArr));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
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/MmMaterialCategory")]
|
||||
public class MmMaterialCategoryController : BaseController
|
||||
{
|
||||
/// <summary>
|
||||
/// 物料分类表接口
|
||||
/// </summary>
|
||||
private readonly IMmMaterialCategoryService _MmMaterialCategoryService;
|
||||
|
||||
public MmMaterialCategoryController(IMmMaterialCategoryService MmMaterialCategoryService)
|
||||
{
|
||||
_MmMaterialCategoryService = MmMaterialCategoryService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询物料分类表列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("list")]
|
||||
[ActionPermissionFilter(Permission = "mmmaterialcategory:list")]
|
||||
public IActionResult QueryMmMaterialCategory([FromQuery] MmMaterialCategoryQueryDto parm)
|
||||
{
|
||||
var response = _MmMaterialCategoryService.GetList(parm);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询物料分类表详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("{Id}")]
|
||||
[ActionPermissionFilter(Permission = "mmmaterialcategory:query")]
|
||||
public IActionResult GetMmMaterialCategory(int Id)
|
||||
{
|
||||
var response = _MmMaterialCategoryService.GetInfo(Id);
|
||||
|
||||
var info = response.Adapt<MmMaterialCategoryDto>();
|
||||
return SUCCESS(info);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加物料分类表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[ActionPermissionFilter(Permission = "mmmaterialcategory:add")]
|
||||
[Log(Title = "物料分类表", BusinessType = BusinessType.INSERT)]
|
||||
public IActionResult AddMmMaterialCategory([FromBody] MmMaterialCategoryDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<MmMaterialCategory>().ToCreate(HttpContext);
|
||||
|
||||
var response = _MmMaterialCategoryService.AddMmMaterialCategory(modal);
|
||||
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新物料分类表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
[ActionPermissionFilter(Permission = "mmmaterialcategory:edit")]
|
||||
[Log(Title = "物料分类表", BusinessType = BusinessType.UPDATE)]
|
||||
public IActionResult UpdateMmMaterialCategory([FromBody] MmMaterialCategoryDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<MmMaterialCategory>().ToUpdate(HttpContext);
|
||||
var response = _MmMaterialCategoryService.UpdateMmMaterialCategory(modal);
|
||||
|
||||
return ToResponse(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除物料分类表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost("delete/{ids}")]
|
||||
[ActionPermissionFilter(Permission = "mmmaterialcategory:delete")]
|
||||
[Log(Title = "物料分类表", BusinessType = BusinessType.DELETE)]
|
||||
public IActionResult DeleteMmMaterialCategory([FromRoute]string ids)
|
||||
{
|
||||
var idArr = Tools.SplitAndConvert<int>(ids);
|
||||
|
||||
return ToResponse(_MmMaterialCategoryService.Delete(idArr));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
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/MmMaterial")]
|
||||
public class MmMaterialController : BaseController
|
||||
{
|
||||
/// <summary>
|
||||
/// 物料表接口
|
||||
/// </summary>
|
||||
private readonly IMmMaterialService _MmMaterialService;
|
||||
|
||||
public MmMaterialController(IMmMaterialService MmMaterialService)
|
||||
{
|
||||
_MmMaterialService = MmMaterialService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询物料表列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("list")]
|
||||
[ActionPermissionFilter(Permission = "mmmaterial:list")]
|
||||
public IActionResult QueryMmMaterial([FromQuery] MmMaterialQueryDto parm)
|
||||
{
|
||||
var response = _MmMaterialService.GetList(parm);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询物料表详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("{Id}")]
|
||||
[ActionPermissionFilter(Permission = "mmmaterial:query")]
|
||||
public IActionResult GetMmMaterial(int Id)
|
||||
{
|
||||
var response = _MmMaterialService.GetInfo(Id);
|
||||
|
||||
var info = response.Adapt<MmMaterialDto>();
|
||||
return SUCCESS(info);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加物料表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[ActionPermissionFilter(Permission = "mmmaterial:add")]
|
||||
[Log(Title = "物料表", BusinessType = BusinessType.INSERT)]
|
||||
public IActionResult AddMmMaterial([FromBody] MmMaterialDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<MmMaterial>().ToCreate(HttpContext);
|
||||
|
||||
var response = _MmMaterialService.AddMmMaterial(modal);
|
||||
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新物料表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
[ActionPermissionFilter(Permission = "mmmaterial:edit")]
|
||||
[Log(Title = "物料表", BusinessType = BusinessType.UPDATE)]
|
||||
public IActionResult UpdateMmMaterial([FromBody] MmMaterialDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<MmMaterial>().ToUpdate(HttpContext);
|
||||
var response = _MmMaterialService.UpdateMmMaterial(modal);
|
||||
|
||||
return ToResponse(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除物料表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost("delete/{ids}")]
|
||||
[ActionPermissionFilter(Permission = "mmmaterial:delete")]
|
||||
[Log(Title = "物料表", BusinessType = BusinessType.DELETE)]
|
||||
public IActionResult DeleteMmMaterial([FromRoute]string ids)
|
||||
{
|
||||
var idArr = Tools.SplitAndConvert<int>(ids);
|
||||
|
||||
return ToResponse(_MmMaterialService.Delete(idArr));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
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));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
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));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
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/MmTransactionType")]
|
||||
public class MmTransactionTypeController : BaseController
|
||||
{
|
||||
/// <summary>
|
||||
/// 出入库类别对照表接口
|
||||
/// </summary>
|
||||
private readonly IMmTransactionTypeService _MmTransactionTypeService;
|
||||
|
||||
public MmTransactionTypeController(IMmTransactionTypeService MmTransactionTypeService)
|
||||
{
|
||||
_MmTransactionTypeService = MmTransactionTypeService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询出入库类别对照表列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("list")]
|
||||
[ActionPermissionFilter(Permission = "mmtransactiontype:list")]
|
||||
public IActionResult QueryMmTransactionType([FromQuery] MmTransactionTypeQueryDto parm)
|
||||
{
|
||||
var response = _MmTransactionTypeService.GetList(parm);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询出入库类别对照表详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("{Id}")]
|
||||
[ActionPermissionFilter(Permission = "mmtransactiontype:query")]
|
||||
public IActionResult GetMmTransactionType(int Id)
|
||||
{
|
||||
var response = _MmTransactionTypeService.GetInfo(Id);
|
||||
|
||||
var info = response.Adapt<MmTransactionTypeDto>();
|
||||
return SUCCESS(info);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加出入库类别对照表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[ActionPermissionFilter(Permission = "mmtransactiontype:add")]
|
||||
[Log(Title = "出入库类别对照表", BusinessType = BusinessType.INSERT)]
|
||||
public IActionResult AddMmTransactionType([FromBody] MmTransactionTypeDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<MmTransactionType>().ToCreate(HttpContext);
|
||||
|
||||
var response = _MmTransactionTypeService.AddMmTransactionType(modal);
|
||||
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新出入库类别对照表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
[ActionPermissionFilter(Permission = "mmtransactiontype:edit")]
|
||||
[Log(Title = "出入库类别对照表", BusinessType = BusinessType.UPDATE)]
|
||||
public IActionResult UpdateMmTransactionType([FromBody] MmTransactionTypeDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<MmTransactionType>().ToUpdate(HttpContext);
|
||||
var response = _MmTransactionTypeService.UpdateMmTransactionType(modal);
|
||||
|
||||
return ToResponse(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除出入库类别对照表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost("delete/{ids}")]
|
||||
[ActionPermissionFilter(Permission = "mmtransactiontype:delete")]
|
||||
[Log(Title = "出入库类别对照表", BusinessType = BusinessType.DELETE)]
|
||||
public IActionResult DeleteMmTransactionType([FromRoute]string ids)
|
||||
{
|
||||
var idArr = Tools.SplitAndConvert<int>(ids);
|
||||
|
||||
return ToResponse(_MmTransactionTypeService.Delete(idArr));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user