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;
///
/// 查询条件设置 模块
///
public class QuerySetController : ApiController
{
private readonly IQuerySetService _invokeService;
///
/// 构造函数
///
///
public QuerySetController(IQuerySetService invokeService)
{
_invokeService = invokeService;
}
///
/// 列表
///
///
///
[HttpPost]
[Route("GetQuerySetList")]
public DataResult> GetQuerySetList([FromBody] PageRequest request)
{
var res = _invokeService.GetListByPage(request);
return res;
}
///
/// 编辑
///
///
///
[HttpPost]
[Route("EditQuerySet")]
public DataResult EditQuerySet([FromBody] CodeQuerySetReq req)
{
var res = _invokeService.EditQuerySet(req);
return res;
}
///
/// 详情
///
/// Id
///
[HttpGet]
[Route("GetQuerySetInfo")]
public DataResult GetQuerySetInfo([FromQuery] string id)
{
var res = _invokeService.GetQuerySetInfo(id);
return res;
}
///
/// 按模块获取查询条件设置详情
///
/// 权限模块id
///
[HttpGet]
[Route("GetQuerySetInfoByModule")]
public DataResult GetQuerySetInfoByModule([FromQuery] string permissionId)
{
var res = _invokeService.GetQuerySetInfoByModule(permissionId);
return res;
}
/////
///// 删除
/////
///// Id
/////
//[HttpGet]
//[Route("DelQuerySet")]
//public DataResult DelQuerySet([FromQuery] string id)
//{
// var res = _invokeService.DelQuerySet(id);
// return res;
//}
///
/// 批量删除
///
/// req
///
[HttpGet]
[Route("BatchDelQuerySet")]
public DataResult BatchDelQuerySet([FromBody]IdModel req)
{
var res = _invokeService.BatchDelQuerySet(req);
return res;
}
}