118 lines
3.9 KiB
C#
118 lines
3.9 KiB
C#
using Microsoft.AspNetCore.Mvc;
|
||
using RIZO.Model.Mes.Dto;
|
||
using RIZO.Model.Mes;
|
||
using RIZO.Service.Mes.IMesService;
|
||
using RIZO.Service.Mes.IMesService.MasterData;
|
||
using RIZO.Model.Mes.Dto.MasterData;
|
||
using RIZO.Model.Mes.MasterData;
|
||
|
||
//创建时间:2025-11-11
|
||
namespace RIZO.Admin.WebApi.Controllers.Mes.MasterData
|
||
{
|
||
/// <summary>
|
||
/// 产线管理基础信息表
|
||
/// </summary>
|
||
[Route("mes/ProductionLine")]
|
||
[AllowAnonymous]
|
||
public class ProductionLineController : BaseController
|
||
{
|
||
/// <summary>
|
||
/// 产线管理基础信息表接口
|
||
/// </summary>
|
||
private readonly IProductionLineService _ProductionLineService;
|
||
|
||
public ProductionLineController(IProductionLineService ProductionLineService)
|
||
{
|
||
_ProductionLineService = ProductionLineService;
|
||
}
|
||
|
||
/// <summary>
|
||
/// 查询产线管理基础信息表列表
|
||
/// </summary>
|
||
/// <param name="parm"></param>
|
||
/// <returns></returns>
|
||
[HttpGet("list")]
|
||
[ActionPermissionFilter(Permission = "productionline:list")]
|
||
public IActionResult QueryProductionLine([FromQuery] ProductionLineQueryDto parm)
|
||
{
|
||
var response = _ProductionLineService.GetList(parm);
|
||
return SUCCESS(response);
|
||
}
|
||
|
||
|
||
/// <summary>
|
||
/// 查询产线管理基础信息表详情
|
||
/// </summary>
|
||
/// <param name="Id"></param>
|
||
/// <returns></returns>
|
||
[HttpGet("{Id}")]
|
||
[ActionPermissionFilter(Permission = "productionline:query")]
|
||
public IActionResult GetProductionLine(long Id)
|
||
{
|
||
var response = _ProductionLineService.GetInfo(Id);
|
||
|
||
var info = response.Adapt<ProductionLineDto>();
|
||
return SUCCESS(info);
|
||
}
|
||
|
||
/// <summary>
|
||
/// 添加产线管理基础信息表
|
||
/// </summary>
|
||
/// <returns></returns>
|
||
[HttpPost]
|
||
[ActionPermissionFilter(Permission = "productionline:add")]
|
||
[Log(Title = "产线管理基础信息表", BusinessType = BusinessType.INSERT)]
|
||
public IActionResult AddProductionLine([FromBody] ProductionLineDto parm)
|
||
{
|
||
var modal = parm.Adapt<ProductionLine>().ToCreate(HttpContext);
|
||
|
||
var response = _ProductionLineService.AddProductionLine(modal);
|
||
|
||
return SUCCESS(response);
|
||
}
|
||
|
||
/// <summary>
|
||
/// 更新产线管理基础信息表
|
||
/// </summary>
|
||
/// <returns></returns>
|
||
[HttpPut]
|
||
[ActionPermissionFilter(Permission = "productionline:edit")]
|
||
[Log(Title = "产线管理基础信息表", BusinessType = BusinessType.UPDATE)]
|
||
public IActionResult UpdateProductionLine([FromBody] ProductionLineDto parm)
|
||
{
|
||
var modal = parm.Adapt<ProductionLine>().ToUpdate(HttpContext);
|
||
var response = _ProductionLineService.UpdateProductionLine(modal);
|
||
|
||
return ToResponse(response);
|
||
}
|
||
|
||
/// <summary>
|
||
/// 删除产线管理基础信息表
|
||
/// </summary>
|
||
/// <returns></returns>
|
||
[HttpPost("delete/{ids}")]
|
||
[ActionPermissionFilter(Permission = "productionline:delete")]
|
||
[Log(Title = "产线管理基础信息表", BusinessType = BusinessType.DELETE)]
|
||
public IActionResult DeleteProductionLine([FromRoute]string ids)
|
||
{
|
||
var idArr = Tools.SplitAndConvert<long>(ids);
|
||
|
||
return ToResponse(_ProductionLineService.Delete(idArr));
|
||
}
|
||
|
||
/// <summary>
|
||
/// 查询所有产线信息下拉列表
|
||
/// </summary>
|
||
/// <param name="parm"></param>
|
||
/// <returns></returns>
|
||
[HttpGet("getAllLine")]
|
||
[ActionPermissionFilter(Permission = "productionline:list")]
|
||
public IActionResult GetAllLine()
|
||
{
|
||
var response = _ProductionLineService.GetAllLine();
|
||
return SUCCESS(response);
|
||
}
|
||
|
||
|
||
}
|
||
} |