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.
142 lines
3.9 KiB
C#
142 lines
3.9 KiB
C#
3 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_RentOneWay_InController : ApiController
|
||
|
{
|
||
|
private readonly ICM_RentOneWay_InService _invokeService;
|
||
|
|
||
|
/// <summary>
|
||
|
/// 构造函数
|
||
|
/// </summary>
|
||
|
/// <param name="invokeService"></param>
|
||
|
public CM_RentOneWay_InController(ICM_RentOneWay_InService invokeService)
|
||
|
{
|
||
|
_invokeService = invokeService;
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 列表
|
||
|
/// </summary>
|
||
|
/// <param name="request"></param>
|
||
|
/// <returns></returns>
|
||
|
[HttpPost]
|
||
|
[Route("GetCM_RentOneWay_InList")]
|
||
|
public async Task<DataResult<List<CM_RentOneWay_InRes>>> GetCM_RentOneWay_InList([FromBody] PageRequest request)
|
||
|
{
|
||
|
var res = await _invokeService.GetListByPage(request);
|
||
|
return res;
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 直接编辑
|
||
|
/// </summary>
|
||
|
/// <returns></returns>
|
||
|
[HttpPost]
|
||
|
[Route("EditCM_RentOneWay_In")]
|
||
|
public Task<DataResult> EditCM_RentOneWay([FromBody] CM_RentOneWay_InReq model)
|
||
|
{
|
||
|
var res = _invokeService.EditCM_RentOneWay_In(model);
|
||
|
return res;
|
||
|
}
|
||
|
|
||
|
|
||
|
/// <summary>
|
||
|
/// 查看单程业务详情
|
||
|
/// </summary>
|
||
|
/// <param name="id"></param>
|
||
|
/// <returns></returns>
|
||
|
[HttpGet]
|
||
|
[Route("GetCM_RentOneWay_In")]
|
||
|
public DataResult<CM_RentOneWay_InRes> GetCM_RentOneWay_In([FromQuery] string id)
|
||
|
{
|
||
|
var res = _invokeService.GetCM_RentOneWay_In(id);
|
||
|
return res;
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 删除单程租入业务
|
||
|
/// </summary>
|
||
|
/// <param name="model">删除单程业务</param>
|
||
|
/// <returns></returns>
|
||
|
[HttpPost, Route("DeleteCM_RentOneWay_In")]
|
||
|
public async Task<DataResult> DeleteCM_RentOneWay_InAsync([FromBody] IdModel model)
|
||
|
{
|
||
|
if (!ModelState.IsValid)
|
||
|
return DataResult.Failed(ModelState.GetErrorMessage(), MultiLanguageConst.IllegalRequest);
|
||
|
|
||
|
return await _invokeService.DeleteCM_RentOneWay_InAsync(model.Ids);
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 单程租入_确认
|
||
|
/// </summary>
|
||
|
/// <param name="id"></param>
|
||
|
/// <returns></returns>
|
||
|
|
||
|
|
||
|
[HttpPost]
|
||
|
[Route("CM_RentOneWay_In_Confirm")]
|
||
|
public Task<DataResult> CM_RentOneWay_In_Confirm([FromBody] IdModel model)
|
||
|
{
|
||
|
if (string.IsNullOrWhiteSpace(model.Id))
|
||
|
{
|
||
|
var res = _invokeService.CM_RentOneWay_In_Confirm(model.Ids);
|
||
|
return res;
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
|
||
|
var res = _invokeService.CM_RentOneWay_In_Confirm(model.Id, model.Ids);
|
||
|
return res;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 单程租入业务_取消
|
||
|
/// </summary>
|
||
|
/// <param name="id"></param>
|
||
|
/// <returns></returns>
|
||
|
[HttpPost]
|
||
|
[Route("CM_RentOneWay_In_Cancel")]
|
||
|
public Task<DataResult> CM_RentOneWay_In_Cancel([FromBody] IdModel model)
|
||
|
{
|
||
|
if (string.IsNullOrWhiteSpace(model.Id))
|
||
|
{
|
||
|
var res = _invokeService.CM_RentOneWay_In_Cancel(model.Ids);
|
||
|
return res;
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
|
||
|
var res = _invokeService.CM_RentOneWay_In_Cancel(model.Id, model.Ids);
|
||
|
return res;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 单程租入业务_添加
|
||
|
/// </summary>
|
||
|
/// <param name="id"></param>
|
||
|
/// <returns></returns>
|
||
|
//[HttpPost]
|
||
|
//[Route("CM_RentOneWay_AddCtn")]
|
||
|
//public async Task<DataResult> CM_RentOneWay_In_AddCtn([FromBody] IdModel model)
|
||
|
//{
|
||
|
// return await _invokeService.CM_RentOneWay_In_AddCtn(long.Parse(model.Id), model.Ids);
|
||
|
// //return res;
|
||
|
//}
|
||
|
|
||
|
}
|