using DS.Module.Core;
using DS.Module.Core.Data;
using DS.WMS.Core.Info.Dtos;
using DS.WMS.Core.Info.Interface;
using DS.WMS.Core.Sys.Dtos;
using DS.WMS.Core.Sys.Entity;
using DS.WMS.Core.Sys.Interface;
using Microsoft.AspNetCore.Mvc;
namespace DS.WMS.MainApi.Controllers;
///
/// 客户财务账期信息-模块
///
public class ClientAccountDateController : ApiController
{
private readonly IClientAccountDateService _invokeService;
///
/// 构造函数
///
///
public ClientAccountDateController(IClientAccountDateService invokeService)
{
_invokeService = invokeService;
}
///
/// 列表
///
///
///
[HttpPost]
[Route("GetClientAccountDateList")]
public DataResult> GetClientAccountDateList([FromBody] PageRequest request)
{
var res = _invokeService.GetListByPage(request);
return res;
}
///
/// 编辑
///
///
///
[HttpPost]
[Route("EditClientAccountDate")]
public DataResult EditClientAccountDate([FromBody] ClientAccountDateReq req)
{
var res = _invokeService.EditClientAccountDate(req);
return res;
}
///
/// 详情
///
///
///
[HttpGet]
[Route("GetClientAccountDateInfo")]
public DataResult GetClientAccountDateInfo([FromQuery] string id)
{
var res = _invokeService.GetClientAccountDateInfo(id);
return res;
}
///
/// 根据ID删除
///
///
///
[HttpPost, Route("Delete")]
public async Task DeleteAsync([FromBody] IdModel model)
{
if (!ModelState.IsValid)
return DataResult.Failed(ModelState.GetErrorMessage(), MultiLanguageConst.IllegalRequest);
return await _invokeService.DeleteAsync(model);
}
///
/// 获取组织机构银行账户列表
///
/// 账户币别,可空
///
[HttpPost, Route("GetTenantBanks")]
public async Task>> GetTenantBanksAsync(string? currency = null)
{
return await _invokeService.GetTenantBanksAsync(currency);
}
}