using DS.Module.Core;
using DS.Module.Core.Data;
using DS.WMS.Core.Code.Dtos;
using DS.WMS.Core.Code.Interface;
using Microsoft.AspNetCore.Mvc;
namespace DS.WMS.MainApi.Controllers;
///
/// 国家信息服务
///
public class CodeCountryController : ApiController
{
private readonly ICodeCountryService _invokeService;
///
/// 构造函数
///
///
public CodeCountryController(ICodeCountryService invokeService)
{
_invokeService = invokeService;
}
///
/// 列表
///
///
///
[HttpPost]
[Route("GetCodeCountryList")]
public DataResult> GetCodeCountryList([FromBody] PageRequest request)
{
var res = _invokeService.GetClientListByPage(request);
return res;
}
///
/// 编辑
///
///
///
[HttpPost]
[Route("EditCodeCountry")]
public DataResult EditCodeCountry([FromBody] CodeCountryReq model)
{
var res = _invokeService.EditClientCodeCountry(model);
return res;
}
///
/// 详情
///
///
///
[HttpGet]
[Route("GetCodeCountryInfo")]
public DataResult GetCodeCountryInfo([FromQuery] string id)
{
var res = _invokeService.GetClientCodeCountryInfo(id);
return res;
}
///
/// 获取国家信息列表-基础库
///
///
///
[HttpPost]
[Route("GetBasicsCodeCountryList")]
public DataResult> GetBasicsCodeCountryList([FromBody] PageRequest request)
{
var res = _invokeService.GetCodeCountryList(request);
return res;
}
///
/// 导入国家信息类型-基础库
///
///
///
[HttpPost]
[Route("ImportCodeCountry")]
public DataResult ImportCodeCountry([FromBody] IdModel req)
{
var res = _invokeService.ImportCodeCountry(req);
return res;
}
///
/// 获取当前租户已有的国家信息
///
///
[HttpGet]
[Route("GetExistCodeCountryList")]
public DataResult> GetExistCodeCountryList()
{
var res = _invokeService.GetExistCodeCountryList();
return res;
}
///
/// 批量删除
///
/// 主表Ids
///
[HttpPost]
[Route("BatchDelCodeCountry")]
public DataResult BatchDelCodeCountry([FromBody] IdModel req)
{
var res = _invokeService.BatchDelCodeCountry(req);
return res;
}
}