物料管理
This commit is contained in:
109
ZR.Admin.WebApi/Controllers/mes/mm/MmAgvLocationController.cs
Normal file
109
ZR.Admin.WebApi/Controllers/mes/mm/MmAgvLocationController.cs
Normal file
@@ -0,0 +1,109 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using ZR.Model.Dto;
|
||||
using ZR.Admin.WebApi.Extensions;
|
||||
using ZR.Admin.WebApi.Filters;
|
||||
using ZR.Service.mes.mm.IService;
|
||||
using ZR.Model.MES.mm;
|
||||
|
||||
//创建时间:2024-04-26
|
||||
namespace ZR.Admin.WebApi.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// agv位置表
|
||||
/// </summary>
|
||||
[Verify]
|
||||
[Route("mes/mm/MmAgvLocation")]
|
||||
public class MmAgvLocationController : BaseController
|
||||
{
|
||||
/// <summary>
|
||||
/// agv位置表接口
|
||||
/// </summary>
|
||||
private readonly IMmAgvLocationService _MmAgvLocationService;
|
||||
|
||||
public MmAgvLocationController(IMmAgvLocationService MmAgvLocationService)
|
||||
{
|
||||
_MmAgvLocationService = MmAgvLocationService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询agv位置表列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("list")]
|
||||
[ActionPermissionFilter(Permission = "materialManagement:mmagvlocation:list")]
|
||||
public IActionResult QueryMmAgvLocation([FromQuery] MmAgvLocationQueryDto parm)
|
||||
{
|
||||
var response = _MmAgvLocationService.GetList(parm);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询agv位置表详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("{Id}")]
|
||||
[ActionPermissionFilter(Permission = "materialManagement:mmagvlocation:query")]
|
||||
public IActionResult GetMmAgvLocation(int Id)
|
||||
{
|
||||
var response = _MmAgvLocationService.GetInfo(Id);
|
||||
|
||||
var info = response.Adapt<MmAgvLocation>();
|
||||
return SUCCESS(info);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加agv位置表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[ActionPermissionFilter(Permission = "materialManagement:mmagvlocation:add")]
|
||||
[Log(Title = "agv位置表", BusinessType = BusinessType.INSERT)]
|
||||
public IActionResult AddMmAgvLocation([FromBody] MmAgvLocationDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<MmAgvLocation>().ToCreate(HttpContext);
|
||||
|
||||
var response = _MmAgvLocationService.AddMmAgvLocation(modal);
|
||||
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新agv位置表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
[ActionPermissionFilter(Permission = "materialManagement:mmagvlocation:edit")]
|
||||
[Log(Title = "agv位置表", BusinessType = BusinessType.UPDATE)]
|
||||
public IActionResult UpdateMmAgvLocation([FromBody] MmAgvLocationDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<MmAgvLocation>().ToUpdate(HttpContext);
|
||||
var response = _MmAgvLocationService.UpdateMmAgvLocation(modal);
|
||||
|
||||
return ToResponse(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除agv位置表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpDelete("{ids}")]
|
||||
[ActionPermissionFilter(Permission = "materialManagement:mmagvlocation:delete")]
|
||||
[Log(Title = "agv位置表", BusinessType = BusinessType.DELETE)]
|
||||
public IActionResult DeleteMmAgvLocation(string ids)
|
||||
{
|
||||
int[] idsArr = Tools.SpitIntArrary(ids);
|
||||
if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); }
|
||||
|
||||
var response = _MmAgvLocationService.Delete(idsArr);
|
||||
|
||||
return ToResponse(response);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user