You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

128 lines
4.0 KiB
C#

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

using DS.Module.Core;
using DS.WMS.Core.Op.Dtos;
using DS.WMS.Core.Op.Interface;
using DS.WMS.Core.Op.Method;
using Microsoft.AspNetCore.Mvc;
using static iText.StyledXmlParser.Jsoup.Select.Evaluator;
namespace DS.WMS.OpApi.Controllers
{
/// <summary>
/// 服务项目状态管理
/// </summary>
public class StatusSkuBaseManageController : ApiController
{
private readonly IStatusSkuBaseService _statusSkuBaseService;
public StatusSkuBaseManageController(IStatusSkuBaseService statusSkuBaseService)
{
_statusSkuBaseService = statusSkuBaseService;
}
#region 保存
/// <summary>
/// 保存
/// </summary>
/// <param name="info">状态详情</param>
/// <returns>返回回执</returns>
[HttpPost("Save")]
public async Task<DataResult<string>> Save([FromBody] StatusSkuBaseDto info)
{
return await _statusSkuBaseService.Save(info);
}
#endregion
#region 保存并启用
/// <summary>
/// 保存并启用
/// </summary>
/// <param name="info">状态详情</param>
/// <returns>返回回执</returns>
[HttpPost("SaveAndEnable")]
public async Task<DataResult<string>> SaveAndEnable([FromBody] StatusSkuBaseDto info)
{
return await _statusSkuBaseService.SaveAndEnable(info);
}
#endregion
#region 启用
/// <summary>
/// 启用
/// </summary>
/// <param name="ids">状态主键数组</param>
/// <returns>返回回执</returns>
[HttpPost("SetEnable")]
public async Task<DataResult<string>> SetEnable([FromBody] string[] ids)
{
return await _statusSkuBaseService.SetEnable(ids);
}
#endregion
#region 取消启用
/// <summary>
/// 取消启用
/// </summary>
/// <param name="ids">状态主键数组</param>
/// <returns>返回回执</returns>
[HttpPost("SetUnEnable")]
public async Task<DataResult<string>> SetUnEnable([FromBody] string[] ids)
{
return await _statusSkuBaseService.SetUnEnable(ids);
}
#endregion
#region 删除
/// <summary>
/// 删除
/// </summary>
/// <param name="ids">状态主键数组</param>
/// <returns>返回回执</returns>
[HttpPost("Delete")]
public async Task<DataResult<string>> Delete([FromBody] string[] ids)
{
return await _statusSkuBaseService.Delete(ids);
}
#endregion
#region 获取状态详情
/// <summary>
/// 获取状态详情
/// </summary>
/// <param name="id">状态主键</param>
/// <returns>返回回执</returns>
[HttpGet("GetInfo")]
public async Task<DataResult<StatusSkuBaseShowDto>> GetInfo(string id)
{
return await _statusSkuBaseService.GetInfo(id);
}
#endregion
#region 检索状态列表
/// <summary>
/// 检索状态列表
/// </summary>
/// <param name="queryItem">检索值</param>
/// <param name="topNum">最大返回行数默认15</param>
/// <returns>返回回执</returns>
[HttpGet("QueryList")]
public async Task<DataResult<List<StatusSkuBaseDto>>> QueryList([FromQuery] string queryItem, [FromQuery] int topNum = 15)
{
return await _statusSkuBaseService.QueryList(queryItem, topNum);
}
#endregion
#region 状态台账查询
/// <summary>
/// 状态台账查询
/// </summary>
/// <param name="querySearch">状态台账查询请求</param>
/// <returns>返回结果</returns>
[HttpPost("GetPage")]
public async Task<DataResult<List<StatusSkuBasePageDto>>> GetPageAsync([FromBody] PageRequest querySearch)
{
return await _statusSkuBaseService.GetPageAsync(querySearch);
}
#endregion
}
}