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.

117 lines
3.4 KiB
C#

using DS.Module.Core;
using DS.Module.Core.Data;
using DS.WMS.ContainerManagement.Info.Dtos;
using DS.WMS.ContainerManagement.Info.Entity;
using DS.WMS.ContainerManagement.Info.Interface;
using DS.WMS.Core.Code.Dtos;
using DS.WMS.Core.Op.Dtos;
using DS.WMS.Core.Op.Interface;
using DS.WMS.Core.Op.View;
using Microsoft.AspNetCore.Mvc;
namespace DS.WMS.ContainerManagementApi.Controllers;
/// <summary>
/// 箱管_月结账单
/// </summary>
public class CM_CustFeeDuiController : ApiController
{
private readonly ICM_CustFeeDuiService _invokeService;
/// <summary>
/// 构造函数
/// </summary>
/// <param name="invokeService"></param>
public CM_CustFeeDuiController(ICM_CustFeeDuiService invokeService)
{
_invokeService = invokeService;
}
/// <summary>
/// 列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpPost]
[Route("GetCM_CustFeeDuiList")]
public async Task<DataResult<List<CM_CustFeeDuiRes>>> GetCM_CustFeeDuiList([FromBody] PageRequest request)
{
var res = await _invokeService.GetListByPage(request);
return res;
}
/// <summary>
/// 直接编辑
/// </summary>
/// <returns></returns>
[HttpPost]
[Route("EditCM_CustFeeDui")]
public Task<DataResult> EditCM_CustFeeDui([FromBody] CM_CustFeeDuiReq model)
{
var res = _invokeService.EditCM_CustFeeDui(model);
return res;
}
/// <summary>
/// 查看详情
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpGet]
[Route("GetCM_CustFeeDui")]
public DataResult<CM_CustFeeDuiRes> GetCM_CustFeeDui([FromQuery] string id)
{
var res = _invokeService.GetCM_CustFeeDui(id);
return res;
}
/// <summary>
/// 删除月结账单
/// </summary>
/// <param name="model">月结账单id</param>
/// <returns></returns>
[HttpPost, Route("DeleteCM_CustFeeDui")]
public async Task<DataResult> DeleteCM_CustFeeDuiAsync([FromBody] IdModel model)
{
if (!ModelState.IsValid)
return DataResult.Failed(ModelState.GetErrorMessage(), MultiLanguageConst.IllegalRequest);
return await _invokeService.DeleteCM_CustFeeDuiAsync(model.Ids);
}
/// <summary>
///
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
[HttpPost]
[Route("GetVW_CM_FeeBase_Detail")]
public async Task<DataResult<List<VW_CM_FeeBase_DetailRes>>> GetVW_CM_FeeBase_Detail([FromBody] PageRequest request)
{
var res = await _invokeService.GetVW_CM_FeeBase_Detail(request);
return res;
}
[HttpPost, Route("AddVW_CM_FeeBase_Detail")]
public async Task<DataResult> AddVW_CM_FeeBase_Detail( [FromBody] IdModel Idmodel)
{
if (!ModelState.IsValid)
return DataResult.Failed(ModelState.GetErrorMessage(), MultiLanguageConst.IllegalRequest);
return await _invokeService.AddVW_CM_FeeBase_Detail(long.Parse(Idmodel.Id), Idmodel.Ids);
}
/// <summary>
/// 租箱租入_生成费用
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpPost]
[Route("CM_CustFeeDui_MakeFee")]
public Task<DataResult> CM_CustFeeDui_MakeFee([FromBody] IdModel model)
{
var res = _invokeService.CM_CustFeeDui_MakeFee(long.Parse(model.Id));
return res;
}
}