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