106 lines
3.7 KiB
C#
106 lines
3.7 KiB
C#
using DOAN.Model;
|
||
using DOAN.Model.Dto;
|
||
using DOAN.Service.Business.IBusinessService;
|
||
using Microsoft.AspNetCore.Mvc;
|
||
|
||
//创建时间:2025-09-02
|
||
namespace DOAN.Admin.WebApi.Controllers
|
||
{
|
||
/// <summary>
|
||
/// 折叠台,追溯码绑定检测数据列描述字典
|
||
/// </summary>
|
||
[Route("business/TraceDictZdParameter")]
|
||
public class TraceDictZdParameterController : BaseController
|
||
{
|
||
/// <summary>
|
||
/// 折叠台,追溯码绑定检测数据列描述字典接口
|
||
/// </summary>
|
||
private readonly ITraceDictZdParameterService _TraceDictZdParameterService;
|
||
|
||
public TraceDictZdParameterController(ITraceDictZdParameterService TraceDictZdParameterService)
|
||
{
|
||
_TraceDictZdParameterService = TraceDictZdParameterService;
|
||
}
|
||
|
||
/// <summary>
|
||
/// 查询折叠台,追溯码绑定检测数据列描述字典列表
|
||
/// </summary>
|
||
/// <param name="parm"></param>
|
||
/// <returns></returns>
|
||
[HttpGet("list")]
|
||
[AllowAnonymous]
|
||
public IActionResult QueryTraceDictZdParameter([FromQuery] TraceDictZdParameterQueryDto parm)
|
||
{
|
||
var response = _TraceDictZdParameterService.GetList(parm);
|
||
return SUCCESS(response);
|
||
}
|
||
|
||
|
||
/// <summary>
|
||
/// 查询折叠台,追溯码绑定检测数据列描述字典详情
|
||
/// </summary>
|
||
/// <param name="Id"></param>
|
||
/// <returns></returns>
|
||
[HttpGet("{Id}")]
|
||
[AllowAnonymous]
|
||
public IActionResult GetTraceDictZdParameter(int Id)
|
||
{
|
||
var response = _TraceDictZdParameterService.GetInfo(Id);
|
||
|
||
var info = response.Adapt<TraceDictZdParameter>();
|
||
return SUCCESS(info);
|
||
}
|
||
|
||
/// <summary>
|
||
/// 添加折叠台,追溯码绑定检测数据列描述字典
|
||
/// </summary>
|
||
/// <returns></returns>
|
||
[HttpPost]
|
||
[AllowAnonymous]
|
||
[Log(Title = "折叠台,追溯码绑定检测数据列描述字典", BusinessType = BusinessType.INSERT)]
|
||
public IActionResult AddTraceDictZdParameter([FromBody] TraceDictZdParameterDto parm)
|
||
{
|
||
var modal = parm.Adapt<TraceDictZdParameter>().ToCreate(HttpContext);
|
||
|
||
var response = _TraceDictZdParameterService.AddTraceDictZdParameter(modal);
|
||
|
||
return SUCCESS(response);
|
||
}
|
||
|
||
/// <summary>
|
||
/// 更新折叠台,追溯码绑定检测数据列描述字典
|
||
/// </summary>
|
||
/// <returns></returns>
|
||
[HttpPut]
|
||
[AllowAnonymous]
|
||
[Log(Title = "折叠台,追溯码绑定检测数据列描述字典", BusinessType = BusinessType.UPDATE)]
|
||
public IActionResult UpdateTraceDictZdParameter([FromBody] TraceDictZdParameterDto parm)
|
||
{
|
||
var modal = parm.Adapt<TraceDictZdParameter>().ToUpdate(HttpContext);
|
||
var response = _TraceDictZdParameterService.UpdateTraceDictZdParameter(modal);
|
||
|
||
return ToResponse(response);
|
||
}
|
||
|
||
/// <summary>
|
||
/// 删除折叠台,追溯码绑定检测数据列描述字典
|
||
/// </summary>
|
||
/// <returns></returns>
|
||
[HttpDelete("{ids}")]
|
||
[AllowAnonymous]
|
||
[Log(Title = "折叠台,追溯码绑定检测数据列描述字典", BusinessType = BusinessType.DELETE)]
|
||
public IActionResult DeleteTraceDictZdParameter(string ids)
|
||
{
|
||
int[] idsArr = Tools.SpitIntArrary(ids);
|
||
if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); }
|
||
|
||
var response = _TraceDictZdParameterService.Delete(idsArr);
|
||
|
||
return ToResponse(response);
|
||
}
|
||
|
||
|
||
|
||
|
||
}
|
||
} |