118 lines
4.0 KiB
C#
118 lines
4.0 KiB
C#
using Microsoft.AspNetCore.Mvc;
|
||
using DOAN.Model.Dto;
|
||
using DOAN.Service.Business.IBusinessService;
|
||
using DOAN.Admin.WebApi.Filters;
|
||
using DOAN.Model.MES.process;
|
||
|
||
//创建时间:2025-11-06
|
||
namespace DOAN.Admin.WebApi.Controllers
|
||
{
|
||
/// <summary>
|
||
/// 工艺建模工序表
|
||
/// </summary>
|
||
[Verify]
|
||
[Route("mes/process/ProModelProcess")]
|
||
public class ProModelProcessController : BaseController
|
||
{
|
||
/// <summary>
|
||
/// 工艺建模工序表接口
|
||
/// </summary>
|
||
private readonly IProModelProcessService _ProModelProcessService;
|
||
|
||
public ProModelProcessController(IProModelProcessService ProModelProcessService)
|
||
{
|
||
_ProModelProcessService = ProModelProcessService;
|
||
}
|
||
|
||
/// <summary>
|
||
/// 查询工艺建模工序表列表
|
||
/// </summary>
|
||
/// <param name="parm"></param>
|
||
/// <returns></returns>
|
||
[HttpGet("list")]
|
||
[ActionPermissionFilter(Permission = "process:promodelprocess:list")]
|
||
public IActionResult QueryProModelProcess([FromQuery] ProModelProcessQueryDto parm)
|
||
{
|
||
var response = _ProModelProcessService.GetList(parm);
|
||
return SUCCESS(response);
|
||
}
|
||
|
||
|
||
/// <summary>
|
||
/// 查询工艺建模工序表详情
|
||
/// </summary>
|
||
/// <param name="Id"></param>
|
||
/// <returns></returns>
|
||
[HttpGet("{Id}")]
|
||
[ActionPermissionFilter(Permission = "process:promodelprocess:query")]
|
||
public IActionResult GetProModelProcess(long Id)
|
||
{
|
||
var response = _ProModelProcessService.GetInfo(Id);
|
||
|
||
var info = response.Adapt<ProModelProcess>();
|
||
return SUCCESS(info);
|
||
}
|
||
|
||
/// <summary>
|
||
/// 添加工艺建模工序表
|
||
/// </summary>
|
||
/// <returns></returns>
|
||
[HttpPost]
|
||
[ActionPermissionFilter(Permission = "process:promodelprocess:add")]
|
||
[Log(Title = "工艺建模工序表", BusinessType = BusinessType.INSERT)]
|
||
public IActionResult AddProModelProcess([FromBody] ProModelProcessDto parm)
|
||
{
|
||
var modal = parm.Adapt<ProModelProcess>().ToCreate(HttpContext);
|
||
|
||
var response = _ProModelProcessService.AddProModelProcess(modal);
|
||
|
||
return SUCCESS(response);
|
||
}
|
||
|
||
/// <summary>
|
||
/// 更新工艺建模工序表
|
||
/// </summary>
|
||
/// <returns></returns>
|
||
[HttpPut]
|
||
[ActionPermissionFilter(Permission = "process:promodelprocess:edit")]
|
||
[Log(Title = "工艺建模工序表", BusinessType = BusinessType.UPDATE)]
|
||
public IActionResult UpdateProModelProcess([FromBody] ProModelProcessDto parm)
|
||
{
|
||
var modal = parm.Adapt<ProModelProcess>().ToUpdate(HttpContext);
|
||
var response = _ProModelProcessService.UpdateProModelProcess(modal);
|
||
|
||
return ToResponse(response);
|
||
}
|
||
|
||
/// <summary>
|
||
/// 删除工艺建模工序表
|
||
/// </summary>
|
||
/// <returns></returns>
|
||
[HttpDelete("{ids}")]
|
||
[ActionPermissionFilter(Permission = "process:promodelprocess:delete")]
|
||
[Log(Title = "工艺建模工序表", BusinessType = BusinessType.DELETE)]
|
||
public IActionResult DeleteProModelProcess(string ids)
|
||
{
|
||
int[] idsArr = Tools.SpitIntArrary(ids);
|
||
if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); }
|
||
|
||
var response = _ProModelProcessService.Delete(idsArr);
|
||
|
||
return ToResponse(response);
|
||
}
|
||
|
||
/// <summary>
|
||
/// 查询工艺路线列表
|
||
/// </summary>
|
||
/// <returns></returns>
|
||
[HttpGet("modelRoutingList")]
|
||
[ActionPermissionFilter(Permission = "process:promodelprocess:modelRoutingList")]
|
||
public IActionResult GetModelRoutingList()
|
||
{
|
||
var response = _ProModelProcessService.GetModelRoutingList();
|
||
return SUCCESS(response);
|
||
}
|
||
|
||
|
||
}
|
||
} |