2025-11-03 16:57:55 +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-03
|
|
|
|
|
|
namespace DOAN.Admin.WebApi.Controllers
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
///
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Verify]
|
|
|
|
|
|
[Route("business/ProcessmodelOperationStep")]
|
2025-11-04 20:56:03 +08:00
|
|
|
|
public class ProcessmodelWorkStepController : BaseController
|
2025-11-03 16:57:55 +08:00
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 接口
|
|
|
|
|
|
/// </summary>
|
2025-11-04 20:56:03 +08:00
|
|
|
|
private readonly IProcessmodelWorkStepService _ProcessmodelOperationStepService;
|
2025-11-03 16:57:55 +08:00
|
|
|
|
|
2025-11-04 20:56:03 +08:00
|
|
|
|
public ProcessmodelWorkStepController(IProcessmodelWorkStepService ProcessmodelOperationStepService)
|
2025-11-03 16:57:55 +08:00
|
|
|
|
{
|
|
|
|
|
|
_ProcessmodelOperationStepService = ProcessmodelOperationStepService;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 查询列表
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="parm"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet("list")]
|
|
|
|
|
|
[ActionPermissionFilter(Permission = "business:processmodeloperationstep:list")]
|
2025-11-04 20:56:03 +08:00
|
|
|
|
public IActionResult QueryProcessmodelOperationStep([FromQuery] ProcessmodelWorkStepQueryDto parm)
|
2025-11-03 16:57:55 +08:00
|
|
|
|
{
|
|
|
|
|
|
var response = _ProcessmodelOperationStepService.GetList(parm);
|
|
|
|
|
|
return SUCCESS(response);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 查询详情
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="Id"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet("{Id}")]
|
|
|
|
|
|
[ActionPermissionFilter(Permission = "business:processmodeloperationstep:query")]
|
2025-11-04 20:56:03 +08:00
|
|
|
|
public IActionResult GetProcessmodelOperationStep(long Id)
|
2025-11-03 16:57:55 +08:00
|
|
|
|
{
|
|
|
|
|
|
var response = _ProcessmodelOperationStepService.GetInfo(Id);
|
|
|
|
|
|
|
2025-11-04 20:56:03 +08:00
|
|
|
|
var info = response.Adapt<ProcessmodelWorkStep>();
|
2025-11-03 16:57:55 +08:00
|
|
|
|
return SUCCESS(info);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 添加
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost]
|
|
|
|
|
|
[ActionPermissionFilter(Permission = "business:processmodeloperationstep:add")]
|
|
|
|
|
|
[Log(Title = "", BusinessType = BusinessType.INSERT)]
|
2025-11-04 20:56:03 +08:00
|
|
|
|
public IActionResult AddProcessmodelOperationStep([FromBody] ProcessmodeWorkStepDto parm)
|
2025-11-03 16:57:55 +08:00
|
|
|
|
{
|
2025-11-04 20:56:03 +08:00
|
|
|
|
var modal = parm.Adapt<ProcessmodelWorkStep>().ToCreate(HttpContext);
|
2025-11-03 16:57:55 +08:00
|
|
|
|
|
2025-11-04 20:56:03 +08:00
|
|
|
|
var response = _ProcessmodelOperationStepService.AddProcessmodelWorkStep(modal);
|
2025-11-03 16:57:55 +08:00
|
|
|
|
|
|
|
|
|
|
return SUCCESS(response);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 更新
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPut]
|
|
|
|
|
|
[ActionPermissionFilter(Permission = "business:processmodeloperationstep:edit")]
|
|
|
|
|
|
[Log(Title = "", BusinessType = BusinessType.UPDATE)]
|
2025-11-04 20:56:03 +08:00
|
|
|
|
public IActionResult UpdateProcessmodelOperationStep([FromBody] ProcessmodeWorkStepDto parm)
|
2025-11-03 16:57:55 +08:00
|
|
|
|
{
|
2025-11-04 20:56:03 +08:00
|
|
|
|
var modal = parm.Adapt<ProcessmodelWorkStep>().ToUpdate(HttpContext);
|
|
|
|
|
|
var response = _ProcessmodelOperationStepService.UpdateProcessmodelWorkStep(modal);
|
2025-11-03 16:57:55 +08:00
|
|
|
|
|
|
|
|
|
|
return ToResponse(response);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 删除
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
2025-11-05 18:12:05 +08:00
|
|
|
|
[HttpDelete("deleteStep{id}")]
|
2025-11-03 16:57:55 +08:00
|
|
|
|
[ActionPermissionFilter(Permission = "business:processmodeloperationstep:delete")]
|
|
|
|
|
|
[Log(Title = "", BusinessType = BusinessType.DELETE)]
|
2025-11-05 18:12:05 +08:00
|
|
|
|
public IActionResult DeleteProcessmodelOperationStep(long id)
|
2025-11-03 16:57:55 +08:00
|
|
|
|
{
|
2025-11-05 18:12:05 +08:00
|
|
|
|
var response = _ProcessmodelOperationStepService.Delete(id);
|
2025-11-03 16:57:55 +08:00
|
|
|
|
|
|
|
|
|
|
return ToResponse(response);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-11-04 20:56:03 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 查询设备列表
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="stepCode"></param>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet("uniqueList")]
|
|
|
|
|
|
public IActionResult GetUniqueList(string stepCode)
|
|
|
|
|
|
{
|
|
|
|
|
|
var response = _ProcessmodelOperationStepService.GetUniqueValueList(stepCode);
|
|
|
|
|
|
return SUCCESS(response);
|
|
|
|
|
|
}
|
2025-11-03 16:57:55 +08:00
|
|
|
|
|
2025-11-05 15:42:30 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 设备列表
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpGet("accountList")]
|
|
|
|
|
|
public IActionResult GetAccountList()
|
|
|
|
|
|
{
|
|
|
|
|
|
var response = _ProcessmodelOperationStepService.GetAccountList();
|
|
|
|
|
|
return SUCCESS(response);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-11-05 10:22:05 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 新增设备
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost("addUnique")]
|
|
|
|
|
|
[Log(Title = "", BusinessType = BusinessType.INSERT)]
|
|
|
|
|
|
public IActionResult AddUnique([FromBody] UniqueQueryDto parm)
|
|
|
|
|
|
{
|
|
|
|
|
|
var response = _ProcessmodelOperationStepService.AddUniqueValue(parm);
|
|
|
|
|
|
|
|
|
|
|
|
return SUCCESS(response);
|
|
|
|
|
|
}
|
2025-11-03 16:57:55 +08:00
|
|
|
|
|
2025-11-05 10:22:05 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 删除设备
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns></returns>
|
2025-11-05 18:12:05 +08:00
|
|
|
|
[HttpDelete("deleteAccount{id}")]
|
2025-11-05 10:22:05 +08:00
|
|
|
|
[Log(Title = "", BusinessType = BusinessType.DELETE)]
|
|
|
|
|
|
public IActionResult DeleteUnique(long id)
|
|
|
|
|
|
{
|
|
|
|
|
|
var response = _ProcessmodelOperationStepService.Delete(id);
|
|
|
|
|
|
|
|
|
|
|
|
return ToResponse(response);
|
|
|
|
|
|
}
|
2025-11-03 16:57:55 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|