2025-11-06 20:28:30 +08:00
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
|
using DOAN.Model.Dto;
|
|
|
|
|
|
using DOAN.Model.Business;
|
|
|
|
|
|
using DOAN.Service.Business.IBusinessService;
|
|
|
|
|
|
using DOAN.Admin.WebApi.Filters;
|
|
|
|
|
|
|
|
|
|
|
|
//创建时间:2025-11-06
|
|
|
|
|
|
namespace DOAN.Admin.WebApi.Controllers
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 工艺建模工步表
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Verify]
|
2025-11-06 23:24:47 +08:00
|
|
|
|
[Route("mes/process/ProModelWorkStep")]
|
2025-11-06 20:28:30 +08:00
|
|
|
|
public class ProModelWorkStepController : BaseController
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 工艺建模工步表接口
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
private readonly IProModelWorkStepService _ProModelWorkStepService;
|
|
|
|
|
|
|
|
|
|
|
|
public ProModelWorkStepController(IProModelWorkStepService ProModelWorkStepService)
|
|
|
|
|
|
{
|
|
|
|
|
|
_ProModelWorkStepService = ProModelWorkStepService;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 查询工艺建模工步表列表
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="parm"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet("list")]
|
2025-11-06 23:24:47 +08:00
|
|
|
|
[ActionPermissionFilter(Permission = "process:promodelworkstep:list")]
|
2025-11-06 20:28:30 +08:00
|
|
|
|
public IActionResult QueryProModelWorkStep([FromQuery] ProModelWorkStepQueryDto parm)
|
|
|
|
|
|
{
|
|
|
|
|
|
var response = _ProModelWorkStepService.GetList(parm);
|
|
|
|
|
|
return SUCCESS(response);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 查询工艺建模工步表详情
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="Id"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet("{Id}")]
|
2025-11-06 23:24:47 +08:00
|
|
|
|
[ActionPermissionFilter(Permission = "process:promodelworkstep:query")]
|
2025-11-06 20:28:30 +08:00
|
|
|
|
public IActionResult GetProModelWorkStep(long Id)
|
|
|
|
|
|
{
|
|
|
|
|
|
var response = _ProModelWorkStepService.GetInfo(Id);
|
|
|
|
|
|
|
|
|
|
|
|
var info = response.Adapt<ProModelWorkStep>();
|
|
|
|
|
|
return SUCCESS(info);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 添加工艺建模工步表
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost]
|
2025-11-06 23:24:47 +08:00
|
|
|
|
[ActionPermissionFilter(Permission = "process:promodelworkstep:add")]
|
2025-11-06 20:28:30 +08:00
|
|
|
|
[Log(Title = "工艺建模工步表", BusinessType = BusinessType.INSERT)]
|
|
|
|
|
|
public IActionResult AddProModelWorkStep([FromBody] ProModelWorkStepDto parm)
|
|
|
|
|
|
{
|
|
|
|
|
|
var modal = parm.Adapt<ProModelWorkStep>().ToCreate(HttpContext);
|
|
|
|
|
|
|
|
|
|
|
|
var response = _ProModelWorkStepService.AddProModelWorkStep(modal);
|
|
|
|
|
|
|
|
|
|
|
|
return SUCCESS(response);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 更新工艺建模工步表
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPut]
|
2025-11-06 23:24:47 +08:00
|
|
|
|
[ActionPermissionFilter(Permission = "process:promodelworkstep:edit")]
|
2025-11-06 20:28:30 +08:00
|
|
|
|
[Log(Title = "工艺建模工步表", BusinessType = BusinessType.UPDATE)]
|
|
|
|
|
|
public IActionResult UpdateProModelWorkStep([FromBody] ProModelWorkStepDto parm)
|
|
|
|
|
|
{
|
|
|
|
|
|
var modal = parm.Adapt<ProModelWorkStep>().ToUpdate(HttpContext);
|
|
|
|
|
|
var response = _ProModelWorkStepService.UpdateProModelWorkStep(modal);
|
|
|
|
|
|
|
|
|
|
|
|
return ToResponse(response);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 删除工艺建模工步表
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpDelete("{ids}")]
|
2025-11-06 23:24:47 +08:00
|
|
|
|
[ActionPermissionFilter(Permission = "process:promodelworkstep:delete")]
|
2025-11-06 20:28:30 +08:00
|
|
|
|
[Log(Title = "工艺建模工步表", BusinessType = BusinessType.DELETE)]
|
|
|
|
|
|
public IActionResult DeleteProModelWorkStep(string ids)
|
|
|
|
|
|
{
|
|
|
|
|
|
int[] idsArr = Tools.SpitIntArrary(ids);
|
|
|
|
|
|
if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); }
|
|
|
|
|
|
|
|
|
|
|
|
var response = _ProModelWorkStepService.Delete(idsArr);
|
|
|
|
|
|
|
|
|
|
|
|
return ToResponse(response);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-11-06 23:24:47 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 获取工序列表
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet("modelProcessList")]
|
|
|
|
|
|
[ActionPermissionFilter(Permission = "process:promodelworkstep:modelProcessList")]
|
|
|
|
|
|
public IActionResult GetModelProcessList()
|
|
|
|
|
|
{
|
|
|
|
|
|
var response = _ProModelWorkStepService.GetModelProcessList();
|
|
|
|
|
|
return SUCCESS(response);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 查询设备列表
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="parm"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet("uniqueList")]
|
|
|
|
|
|
public IActionResult GetUniqueList(UniqueDto parm)
|
|
|
|
|
|
{
|
|
|
|
|
|
var response = _ProModelWorkStepService.GetUniqueValueList(parm);
|
|
|
|
|
|
return SUCCESS(response);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 设备列表
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet("accountList")]
|
|
|
|
|
|
public IActionResult GetAccountList()
|
|
|
|
|
|
{
|
|
|
|
|
|
var response = _ProModelWorkStepService.GetAccountList();
|
|
|
|
|
|
return SUCCESS(response);
|
|
|
|
|
|
}
|
2025-11-06 20:28:30 +08:00
|
|
|
|
|
2025-11-06 23:24:47 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 新增设备
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost("addUnique")]
|
|
|
|
|
|
[Log(Title = "", BusinessType = BusinessType.INSERT)]
|
|
|
|
|
|
public IActionResult AddUnique([FromBody] UniqueQueryDto parm)
|
|
|
|
|
|
{
|
|
|
|
|
|
var response = _ProModelWorkStepService.AddUniqueValue(parm);
|
2025-11-06 20:28:30 +08:00
|
|
|
|
|
2025-11-06 23:24:47 +08:00
|
|
|
|
return SUCCESS(response);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 删除设备
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpDelete("deleteAccount{id}")]
|
|
|
|
|
|
[Log(Title = "", BusinessType = BusinessType.DELETE)]
|
|
|
|
|
|
public IActionResult DeleteUnique(long id)
|
|
|
|
|
|
{
|
|
|
|
|
|
var response = _ProModelWorkStepService.Delete(id);
|
2025-11-06 20:28:30 +08:00
|
|
|
|
|
2025-11-06 23:24:47 +08:00
|
|
|
|
return ToResponse(response);
|
|
|
|
|
|
}
|
2025-11-06 20:28:30 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|