108 lines
3.6 KiB
C#
108 lines
3.6 KiB
C#
|
|
using Microsoft.AspNetCore.Mvc;
|
|||
|
|
using DOAN.Model.Dto;
|
|||
|
|
using DOAN.Model.Business;
|
|||
|
|
using DOAN.Service.Business.IBusinessService;
|
|||
|
|
using DOAN.Admin.WebApi.Filters;
|
|||
|
|
|
|||
|
|
//创建时间:2025-09-19
|
|||
|
|
namespace DOAN.Admin.WebApi.Controllers
|
|||
|
|
{
|
|||
|
|
/// <summary>
|
|||
|
|
/// 工艺路线表
|
|||
|
|
/// </summary>
|
|||
|
|
[Verify]
|
|||
|
|
[Route("mes/process/ProcessmodelRouting")]
|
|||
|
|
public class ProcessmodelRoutingController : BaseController
|
|||
|
|
{
|
|||
|
|
/// <summary>
|
|||
|
|
/// 工艺路线表接口
|
|||
|
|
/// </summary>
|
|||
|
|
private readonly IProcessmodelRoutingService _ProcessmodelRoutingService;
|
|||
|
|
|
|||
|
|
public ProcessmodelRoutingController(IProcessmodelRoutingService ProcessmodelRoutingService)
|
|||
|
|
{
|
|||
|
|
_ProcessmodelRoutingService = ProcessmodelRoutingService;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 查询工艺路线表列表
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="parm"></param>
|
|||
|
|
/// <returns></returns>
|
|||
|
|
[HttpGet("list")]
|
|||
|
|
[ActionPermissionFilter(Permission = "process:processmodelrouting:list")]
|
|||
|
|
public IActionResult QueryProcessmodelRouting([FromQuery] ProcessmodelRoutingQueryDto parm)
|
|||
|
|
{
|
|||
|
|
var response = _ProcessmodelRoutingService.GetList(parm);
|
|||
|
|
return SUCCESS(response);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 查询工艺路线表详情
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="Id"></param>
|
|||
|
|
/// <returns></returns>
|
|||
|
|
[HttpGet("{Id}")]
|
|||
|
|
[ActionPermissionFilter(Permission = "process:processmodelrouting:query")]
|
|||
|
|
public IActionResult GetProcessmodelRouting(int Id)
|
|||
|
|
{
|
|||
|
|
var response = _ProcessmodelRoutingService.GetInfo(Id);
|
|||
|
|
|
|||
|
|
var info = response.Adapt<ProcessmodelRouting>();
|
|||
|
|
return SUCCESS(info);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 添加工艺路线表
|
|||
|
|
/// </summary>
|
|||
|
|
/// <returns></returns>
|
|||
|
|
[HttpPost]
|
|||
|
|
[ActionPermissionFilter(Permission = "process:processmodelrouting:add")]
|
|||
|
|
[Log(Title = "工艺路线表", BusinessType = BusinessType.INSERT)]
|
|||
|
|
public IActionResult AddProcessmodelRouting([FromBody] ProcessmodelRoutingDto parm)
|
|||
|
|
{
|
|||
|
|
var modal = parm.Adapt<ProcessmodelRouting>().ToCreate(HttpContext);
|
|||
|
|
|
|||
|
|
var response = _ProcessmodelRoutingService.AddProcessmodelRouting(modal);
|
|||
|
|
|
|||
|
|
return SUCCESS(response);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 更新工艺路线表
|
|||
|
|
/// </summary>
|
|||
|
|
/// <returns></returns>
|
|||
|
|
[HttpPut]
|
|||
|
|
[ActionPermissionFilter(Permission = "process:processmodelrouting:edit")]
|
|||
|
|
[Log(Title = "工艺路线表", BusinessType = BusinessType.UPDATE)]
|
|||
|
|
public IActionResult UpdateProcessmodelRouting([FromBody] ProcessmodelRoutingDto parm)
|
|||
|
|
{
|
|||
|
|
var modal = parm.Adapt<ProcessmodelRouting>().ToUpdate(HttpContext);
|
|||
|
|
var response = _ProcessmodelRoutingService.UpdateProcessmodelRouting(modal);
|
|||
|
|
|
|||
|
|
return ToResponse(response);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 删除工艺路线表
|
|||
|
|
/// </summary>
|
|||
|
|
/// <returns></returns>
|
|||
|
|
[HttpDelete("{ids}")]
|
|||
|
|
[ActionPermissionFilter(Permission = "process:processmodelrouting:delete")]
|
|||
|
|
[Log(Title = "工艺路线表", BusinessType = BusinessType.DELETE)]
|
|||
|
|
public IActionResult DeleteProcessmodelRouting(string ids)
|
|||
|
|
{
|
|||
|
|
int[] idsArr = Tools.SpitIntArrary(ids);
|
|||
|
|
if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); }
|
|||
|
|
|
|||
|
|
var response = _ProcessmodelRoutingService.Delete(idsArr);
|
|||
|
|
|
|||
|
|
return ToResponse(response);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|