|
|
|
|
using DS.Module.Core;
|
|
|
|
|
using DS.WMS.Core.Fee.Dtos;
|
|
|
|
|
using DS.WMS.Core.Fee.Interface;
|
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
|
|
|
|
|
namespace DS.WMS.FeeApi.Controllers
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 费用记录服务
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class FeeRecordController : ApiController
|
|
|
|
|
{
|
|
|
|
|
private readonly IFeeRecordService _invokeService;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 构造函数
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="invokeService"></param>
|
|
|
|
|
public FeeRecordController(IFeeRecordService invokeService)
|
|
|
|
|
{
|
|
|
|
|
_invokeService = invokeService;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 列表
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="request"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("GetList")]
|
|
|
|
|
public DataResult<List<FeeRecordRes>> GetList([FromBody] PageRequest request)
|
|
|
|
|
{
|
|
|
|
|
var res = _invokeService.GetListByPage(request);
|
|
|
|
|
return res;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 详情
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="id"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpGet]
|
|
|
|
|
[Route("Get")]
|
|
|
|
|
public DataResult<FeeRecordRes> Get([FromQuery] string id)
|
|
|
|
|
{
|
|
|
|
|
var res = _invokeService.Get(id);
|
|
|
|
|
return res;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 编辑
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="model"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("Edit")]
|
|
|
|
|
public DataResult Edit([FromBody] FeeRecordReq model)
|
|
|
|
|
{
|
|
|
|
|
var res = _invokeService.Edit(model);
|
|
|
|
|
return res;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//[HttpPost, Route("CreateByTemplate")]
|
|
|
|
|
//public DataResult CreateByTemplate(long bid, params long[] tidArray)
|
|
|
|
|
//{
|
|
|
|
|
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
[HttpPost, Route("Delete")]
|
|
|
|
|
public DataResult Delete(string id)
|
|
|
|
|
{
|
|
|
|
|
if (!long.TryParse(id, out long value))
|
|
|
|
|
return DataResult.Error("参数无效", MultiLanguageConst.IllegalRequest) as DataResult;
|
|
|
|
|
|
|
|
|
|
var res = _invokeService.Delete(value);
|
|
|
|
|
return res;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|