|
|
|
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_RentInController : ApiController
|
|
|
|
{
|
|
|
|
private readonly ICM_RentInService _invokeService;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 构造函数
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="invokeService"></param>
|
|
|
|
public CM_RentInController(ICM_RentInService invokeService)
|
|
|
|
{
|
|
|
|
_invokeService = invokeService;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 列表
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="request"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpPost]
|
|
|
|
[Route("GetCM_RentInList")]
|
|
|
|
public async Task<DataResult<List<CM_RentInRes>>> GetCM_RentInList([FromBody] PageRequest request)
|
|
|
|
{
|
|
|
|
var res = await _invokeService.GetListByPage(request);
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 直接编辑状态
|
|
|
|
/// </summary>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpPost]
|
|
|
|
[Route("EditCM_RentIn")]
|
|
|
|
public Task<DataResult> EditCM_RentIn([FromBody] CM_RentInReq model)
|
|
|
|
{
|
|
|
|
var res = _invokeService.EditCM_RentIn(model);
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 查看租箱租入详情
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="id"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpGet]
|
|
|
|
[Route("GetCM_RentIn")]
|
|
|
|
public DataResult<CM_RentInRes> GetCM_RentIn([FromQuery] string id)
|
|
|
|
{
|
|
|
|
var res = _invokeService.GetCM_RentIn(id);
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 删除租箱租入
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="model">删除租箱租入</param>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpPost, Route("DeleteCM_RentIn")]
|
|
|
|
public async Task<DataResult> DeleteCM_RentInAsync([FromBody] IdModel model)
|
|
|
|
{
|
|
|
|
if (!ModelState.IsValid)
|
|
|
|
return DataResult.Failed(ModelState.GetErrorMessage(), MultiLanguageConst.IllegalRequest);
|
|
|
|
|
|
|
|
return await _invokeService.DeleteCM_RentInAsync(model.Ids);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 租箱租入_确认
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="id"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
|
|
|
|
|
|
[HttpPost]
|
|
|
|
[Route("CM_RentIn_Confirm")]
|
|
|
|
public Task<DataResult> CM_RentIn_Confirm([FromBody] IdModel model)
|
|
|
|
{
|
|
|
|
if (string.IsNullOrWhiteSpace(model.Id))
|
|
|
|
{
|
|
|
|
var res = _invokeService.CM_RentIn_Confirm(model.Ids);
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
|
|
|
|
var res = _invokeService.CM_RentIn_Confirm(model.Id,model.Ids);
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//[HttpPost]
|
|
|
|
//[Route("CM_RentIn_Edit_Confirm")]
|
|
|
|
//public Task<DataResult> CM_RentIn_Edit_Confirm([FromBody] IdModel model)
|
|
|
|
//{
|
|
|
|
// var res = _invokeService.CM_RentIn_Confirm(model.Id,model.Ids);
|
|
|
|
// return res;
|
|
|
|
//}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 租箱租入_取消
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="id"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpPost]
|
|
|
|
[Route("CM_RentIn_Cancel")]
|
|
|
|
public Task<DataResult> CM_RentIn_Cancel([FromBody] IdModel model)
|
|
|
|
{
|
|
|
|
if (string.IsNullOrWhiteSpace(model.Id))
|
|
|
|
{
|
|
|
|
var res = _invokeService.CM_RentIn_Cancel(model.Ids);
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
|
|
|
|
var res = _invokeService.CM_RentIn_Cancel(model.Id, model.Ids);
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 租箱租入_生成费用
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="id"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpPost]
|
|
|
|
[Route("CM_RentIn_MakeFee")]
|
|
|
|
public Task<DataResult> CM_RentIn_MakeFee([FromBody] IdModel model)
|
|
|
|
{
|
|
|
|
var res = _invokeService.CM_RentIn_MakeFee(model.Id);
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 租箱租入 待退租 明细视图
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="id"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpPost]
|
|
|
|
[Route("CM_RentIn_Detail_View")]
|
|
|
|
public Task<DataResult<List<VW_CM_NeedEndLease_DetailRes>>> CM_RentIn_Detail_View([FromBody] PageRequest request)
|
|
|
|
{
|
|
|
|
var res = _invokeService.CM_RentIn_Detail_View(request);
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 租箱租入退租_添加
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="id"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpPost]
|
|
|
|
[Route("CM_RentIn_AddCtn")]
|
|
|
|
public async Task<DataResult> CM_RentIn_AddCtn([FromBody] IdModel model)
|
|
|
|
{
|
|
|
|
return await _invokeService.CM_RentIn_AddCtn(long.Parse( model.Id), model.Ids);
|
|
|
|
//return res;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|