|
|
|
|
using DS.Module.Core;
|
|
|
|
|
using DS.Module.Core.Data;
|
|
|
|
|
using DS.WMS.Core.Code.Dtos;
|
|
|
|
|
using DS.WMS.Core.Code.Interface;
|
|
|
|
|
using DS.WMS.Core.Sys.Dtos;
|
|
|
|
|
using DS.WMS.Core.Sys.Interface;
|
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
|
|
|
|
|
namespace DS.WMS.MainApi.Controllers;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 自定义列表字段设置 模块
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class CustomColumnSetController : ApiController
|
|
|
|
|
{
|
|
|
|
|
private readonly ICustomColumnSetService _invokeService;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 构造函数
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="invokeService"></param>
|
|
|
|
|
public CustomColumnSetController(ICustomColumnSetService invokeService)
|
|
|
|
|
{
|
|
|
|
|
_invokeService = invokeService;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 列表
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="request"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("GetColumnSetList")]
|
|
|
|
|
public async Task<DataResult<List<CustomColumnSetRes>>> GetCustomColumnSetList([FromBody] PageRequest request)
|
|
|
|
|
{
|
|
|
|
|
var res = await _invokeService.GetListByPage(request);
|
|
|
|
|
return res;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 编辑
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="req"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("EditCustomColumnSet")]
|
|
|
|
|
public async Task<DataResult> EditCustomColumnSet([FromBody] CustomColumnSetReq req)
|
|
|
|
|
{
|
|
|
|
|
var res = await _invokeService.EditCustomColumnSet(req);
|
|
|
|
|
return res;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 详情
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="id">Id</param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpGet]
|
|
|
|
|
[Route("GetCustomColumnSetInfo")]
|
|
|
|
|
public async Task<DataResult<CustomColumnSetRes>> GetCustomColumnSetInfo([FromQuery] string id)
|
|
|
|
|
{
|
|
|
|
|
var res = await _invokeService.GetCustomColumnSetInfo(id);
|
|
|
|
|
return res;
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 按模块获取列表设置详情
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="code">自定义列表代码</param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpGet]
|
|
|
|
|
[Route("GetCustomColumnSetInfoByCode")]
|
|
|
|
|
public async Task<DataResult<CustomColumnSetRes>> GetCustomColumnSetInfoByCode([FromQuery] string code)
|
|
|
|
|
{
|
|
|
|
|
var res = await _invokeService.GetCustomColumnSetInfoByCode(code);
|
|
|
|
|
return res;
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 批量删除
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="req">req</param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("BatchDelCustomColumnSet")]
|
|
|
|
|
public async Task<DataResult> BatchDelCustomColumnSet([FromBody] IdModel req)
|
|
|
|
|
{
|
|
|
|
|
var res = await _invokeService.BatchDelCustomColumnSet(req);
|
|
|
|
|
return res;
|
|
|
|
|
}
|
|
|
|
|
}
|