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.
151 lines
3.8 KiB
C#
151 lines
3.8 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_BuyCtnController : ApiController
|
|
{
|
|
private readonly ICM_BuyCtnService _invokeService;
|
|
|
|
/// <summary>
|
|
/// 构造函数
|
|
/// </summary>
|
|
/// <param name="invokeService"></param>
|
|
public CM_BuyCtnController(ICM_BuyCtnService invokeService)
|
|
{
|
|
_invokeService = invokeService;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 列表
|
|
/// </summary>
|
|
/// <param name="request"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("GetCM_BuyCtnList")]
|
|
public async Task<DataResult<List<CM_BuyCtnRes>>> GetCM_BuyCtnList([FromBody] PageRequest request)
|
|
{
|
|
var res = await _invokeService.GetListByPage(request);
|
|
return res;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 直接编辑状态
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("EditCM_BuyCtn")]
|
|
public Task<DataResult> EditCM_BuyCtn([FromBody] CM_BuyCtnReq model)
|
|
{
|
|
var res = _invokeService.EditCM_BuyCtn(model);
|
|
return res;
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// 查看买箱详情
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
[HttpGet]
|
|
[Route("GetCM_BuyCtn")]
|
|
public DataResult<CM_BuyCtnRes> GetCM_BuyCtn([FromQuery] string id)
|
|
{
|
|
var res = _invokeService.GetCM_BuyCtn(id);
|
|
return res;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 删除买箱
|
|
/// </summary>
|
|
/// <param name="model">删除买箱</param>
|
|
/// <returns></returns>
|
|
[HttpPost, Route("DeleteCM_BuyCtn")]
|
|
public async Task<DataResult> DeleteCM_BuyCtnAsync([FromBody] IdModel model)
|
|
{
|
|
if (!ModelState.IsValid)
|
|
return DataResult.Failed(ModelState.GetErrorMessage(), MultiLanguageConst.IllegalRequest);
|
|
|
|
return await _invokeService.DeleteCM_BuyCtnAsync(model.Ids);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 买箱_确认
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
|
|
|
|
[HttpPost]
|
|
[Route("CM_BuyCtn_Confirm")]
|
|
public Task<DataResult> CM_BuyCtn_Confirm([FromBody] IdModel model)
|
|
{
|
|
if (string.IsNullOrWhiteSpace(model.Id))
|
|
{
|
|
var res = _invokeService.CM_BuyCtn_Confirm(model.Ids);
|
|
return res;
|
|
}
|
|
else
|
|
{
|
|
|
|
var res = _invokeService.CM_BuyCtn_Confirm(model.Id,model.Ids);
|
|
return res;
|
|
}
|
|
}
|
|
|
|
//[HttpPost]
|
|
//[Route("CM_BuyCtn_Edit_Confirm")]
|
|
//public Task<DataResult> CM_BuyCtn_Edit_Confirm([FromBody] IdModel model)
|
|
//{
|
|
// var res = _invokeService.CM_BuyCtn_Confirm(model.Id,model.Ids);
|
|
// return res;
|
|
//}
|
|
|
|
/// <summary>
|
|
/// 买箱_取消
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("CM_BuyCtn_Cancel")]
|
|
public Task<DataResult> CM_BuyCtn_Cancel([FromBody] IdModel model)
|
|
{
|
|
if (string.IsNullOrWhiteSpace(model.Id))
|
|
{
|
|
var res = _invokeService.CM_BuyCtn_Cancel(model.Ids);
|
|
return res;
|
|
}
|
|
else
|
|
{
|
|
|
|
var res = _invokeService.CM_BuyCtn_Cancel(model.Id, model.Ids);
|
|
return res;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 买箱_生成费用
|
|
/// </summary>
|
|
/// <param name="id"></param>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[Route("CM_BuyCtn_MakeFee")]
|
|
public Task<DataResult> CM_BuyCtn_MakeFee([FromBody] IdModel model)
|
|
{
|
|
var res = _invokeService.CM_BuyCtn_MakeFee(model.Id);
|
|
return res;
|
|
}
|
|
|
|
|
|
} |