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.

101 lines
2.7 KiB
C#

using DS.Module.Core;
using DS.Module.Core.Data;
using DS.WMS.Core.Code.Dtos;
using DS.WMS.Core.Info.Dtos;
using DS.WMS.Core.Info.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 ClientParamController : ApiController
{
private readonly IClientParamService _invokeService;
/// <summary>
/// 构造函数
/// </summary>
/// <param name="invokeService"></param>
public ClientParamController(IClientParamService invokeService)
{
_invokeService = invokeService;
}
/// <summary>
/// 列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpPost]
[Route("GetClientParamList")]
public DataResult<List<ClientParamRes>> GetClientParamList([FromBody] PageRequest request)
{
var res = _invokeService.GetListByPage(request);
return res;
}
/// <summary>
/// 编辑
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
[HttpPost]
[Route("EditClientParam")]
public DataResult EditClientParam([FromBody] ClientParamReq req)
{
var res = _invokeService.EditClientParam(req);
return res;
}
/// <summary>
/// 详情
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpGet]
[Route("GetClientParamInfo")]
public DataResult<ClientParamRes> GetClientParamInfo([FromQuery] string id)
{
var res = _invokeService.GetClientParamInfo(id);
return res;
}
/// <summary>
/// 批量删除
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
[HttpPost]
[Route("BatchDelClientParam")]
public DataResult BatchDelClientParam([FromBody] IdModel req)
{
var res = _invokeService.BatchDelClientParam(req);
return res;
}
/// <summary>
/// 获取租户参数下拉
/// </summary>
/// <returns></returns>
[HttpGet]
[Route("GetTenantParamSelectList")]
public DataResult<List<TenantParamSelectRes>> GetTenantParamSelectList()
{
var res = _invokeService.GetTenantParamSelectList();
return res;
}
/// <summary>
/// 获取租户参数值下拉
/// </summary>
/// <param name="code"></param>
/// <returns></returns>
[HttpGet]
[Route("GetTenantParamDataSelectList")]
public DataResult<List<TenantParamDataSelectRes>> GetTenantParamDataSelectList([FromQuery] string code)
{
var res = _invokeService.GetTenantParamDataSelectList(code);
return res;
}
}