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.

177 lines
4.6 KiB
C#

4 months ago
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_SellCtnController : ApiController
{
private readonly ICM_SellCtnService _invokeService;
/// <summary>
/// 构造函数
/// </summary>
/// <param name="invokeService"></param>
public CM_SellCtnController(ICM_SellCtnService invokeService)
{
_invokeService = invokeService;
}
/// <summary>
/// 列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpPost]
[Route("GetCM_SellCtnList")]
public async Task<DataResult<List<CM_SellCtnRes>>> GetCM_SellCtnList([FromBody] PageRequest request)
{
var res = await _invokeService.GetListByPage(request);
return res;
}
/// <summary>
/// 直接编辑状态
/// </summary>
/// <returns></returns>
[HttpPost]
[Route("EditCM_SellCtn")]
public Task<DataResult> EditCM_SellCtn([FromBody] CM_SellCtnReq model)
{
var res = _invokeService.EditCM_SellCtn(model);
return res;
}
/// <summary>
/// 查看卖箱详情
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpGet]
[Route("GetCM_SellCtn")]
public DataResult<CM_SellCtnRes> GetCM_SellCtn([FromQuery] string id)
{
var res = _invokeService.GetCM_SellCtn(id);
return res;
}
/// <summary>
/// 删除卖箱
/// </summary>
/// <param name="model">删除卖箱</param>
/// <returns></returns>
[HttpPost, Route("DeleteCM_SellCtn")]
public async Task<DataResult> DeleteCM_SellCtnAsync([FromBody] IdModel model)
{
if (!ModelState.IsValid)
return DataResult.Failed(ModelState.GetErrorMessage(), MultiLanguageConst.IllegalRequest);
return await _invokeService.DeleteCM_SellCtnAsync(model.Ids);
}
/// <summary>
/// 卖箱_确认
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpPost]
[Route("CM_SellCtn_Confirm")]
public Task<DataResult> CM_SellCtn_Confirm([FromBody] IdModel model)
{
if (string.IsNullOrWhiteSpace(model.Id))
{
var res = _invokeService.CM_SellCtn_Confirm(model.Ids);
return res;
}
else
{
var res = _invokeService.CM_SellCtn_Confirm(model.Id,model.Ids);
return res;
}
}
//[HttpPost]
//[Route("CM_SellCtn_Edit_Confirm")]
//public Task<DataResult> CM_SellCtn_Edit_Confirm([FromBody] IdModel model)
//{
// var res = _invokeService.CM_SellCtn_Confirm(model.Id,model.Ids);
// return res;
//}
/// <summary>
/// 卖箱_取消
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpPost]
[Route("CM_SellCtn_Cancel")]
public Task<DataResult> CM_SellCtn_Cancel([FromBody] IdModel model)
{
if (string.IsNullOrWhiteSpace(model.Id))
{
var res = _invokeService.CM_SellCtn_Cancel(model.Ids);
return res;
}
else
{
var res = _invokeService.CM_SellCtn_Cancel(model.Id, model.Ids);
return res;
}
}
/// <summary>
/// 卖箱_生成费用
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpPost]
[Route("CM_SellCtn_MakeFee")]
public Task<DataResult> CM_SellCtn_MakeFee([FromBody] IdModel model)
{
var res = _invokeService.CM_SellCtn_MakeFee(model.Id);
return res;
}
/// <summary>
/// 卖箱 待卖箱 明细视图
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpPost]
[Route("CM_SellCtn_Detail_View")]
public Task<DataResult<List<VW_CM_SellCtn_NeedSellRes>>> CM_SellCtn_Detail_View([FromBody] PageRequest request)
4 months ago
{
var res = _invokeService.CM_SellCtn_Detail_View(request);
return res;
}
/// <summary>
/// 卖箱 待卖箱_明细添加
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpPost]
[Route("CM_SellCtn_AddCtn")]
public async Task<DataResult> CM_SellCtn_AddCtn([FromBody] IdModel model)
{
return await _invokeService.CM_SellCtn_AddCtn(long.Parse( model.Id), model.Ids);
//return res;
}
}