|
|
|
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_RentOutController : ApiController
|
|
|
|
{
|
|
|
|
private readonly ICM_RentOutService _invokeService;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 构造函数
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="invokeService"></param>
|
|
|
|
public CM_RentOutController(ICM_RentOutService invokeService)
|
|
|
|
{
|
|
|
|
_invokeService = invokeService;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 列表
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="request"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpPost]
|
|
|
|
[Route("GetCM_RentOutList")]
|
|
|
|
public async Task<DataResult<List<CM_RentOutRes>>> GetCM_RentOutList([FromBody] PageRequest request)
|
|
|
|
{
|
|
|
|
var res = await _invokeService.GetListByPage(request);
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 直接编辑状态
|
|
|
|
/// </summary>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpPost]
|
|
|
|
[Route("EditCM_RentOut")]
|
|
|
|
public Task<DataResult> EditCM_RentOut([FromBody] CM_RentOutReq model)
|
|
|
|
{
|
|
|
|
var res = _invokeService.EditCM_RentOut(model);
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 查看租箱租出详情
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="id"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpGet]
|
|
|
|
[Route("GetCM_RentOut")]
|
|
|
|
public DataResult<CM_RentOutRes> GetCM_RentOut([FromQuery] string id)
|
|
|
|
{
|
|
|
|
var res = _invokeService.GetCM_RentOut(id);
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 删除租箱租出
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="model">删除租箱租出</param>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpPost, Route("DeleteCM_RentOut")]
|
|
|
|
public async Task<DataResult> DeleteCM_RentOutAsync([FromBody] IdModel model)
|
|
|
|
{
|
|
|
|
if (!ModelState.IsValid)
|
|
|
|
return DataResult.Failed(ModelState.GetErrorMessage(), MultiLanguageConst.IllegalRequest);
|
|
|
|
|
|
|
|
return await _invokeService.DeleteCM_RentOutAsync(model.Ids);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 租箱租出_确认
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="id"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
|
|
|
|
|
|
[HttpPost]
|
|
|
|
[Route("CM_RentOut_Confirm")]
|
|
|
|
public Task<DataResult> CM_RentOut_Confirm([FromBody] IdModel model)
|
|
|
|
{
|
|
|
|
if (string.IsNullOrWhiteSpace(model.Id))
|
|
|
|
{
|
|
|
|
var res = _invokeService.CM_RentOut_Confirm(model.Ids);
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
|
|
|
|
var res = _invokeService.CM_RentOut_Confirm(model.Id, model.Ids);
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//[HttpPost]
|
|
|
|
//[Route("CM_RentOut_Edit_Confirm")]
|
|
|
|
//public Task<DataResult> CM_RentOut_Edit_Confirm([FromBody] IdModel model)
|
|
|
|
//{
|
|
|
|
// var res = _invokeService.CM_RentOut_Confirm(model.Id,model.Ids);
|
|
|
|
// return res;
|
|
|
|
//}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 租箱租出_取消
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="id"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpPost]
|
|
|
|
[Route("CM_RentOut_Cancel")]
|
|
|
|
public Task<DataResult> CM_RentOut_Cancel([FromBody] IdModel model)
|
|
|
|
{
|
|
|
|
if (string.IsNullOrWhiteSpace(model.Id))
|
|
|
|
{
|
|
|
|
var res = _invokeService.CM_RentOut_Cancel(model.Ids);
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
|
|
|
|
var res = _invokeService.CM_RentOut_Cancel(model.Id, model.Ids);
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 租箱租出_生成费用
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="id"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpPost]
|
|
|
|
[Route("CM_RentOut_MakeFee")]
|
|
|
|
public Task<DataResult> CM_RentOut_MakeFee([FromBody] IdModel model)
|
|
|
|
{
|
|
|
|
var res = _invokeService.CM_RentOut_MakeFee(model.Id);
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 租箱租出 待租出 明细视图
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="id"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpPost]
|
|
|
|
[Route("CM_RentOut_NeedRent_View")]
|
|
|
|
public Task<DataResult<List<VW_CM_RentOut_NeedRentRes>>> CM_RentOut_NeedRent_View([FromBody] PageRequest request)
|
|
|
|
{
|
|
|
|
var res = _invokeService.CM_RentOut_NeedRent_View(request);
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 租箱租出 待退租 明细_视图
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="id"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpPost]
|
|
|
|
[Route("CM_RentOut_NeedEndLease_View")]
|
|
|
|
public Task<DataResult<List<VW_CM_RentOut_NeedEndLeaseRes>>> CM_RentOut_NeedEndLease_View([FromBody] PageRequest request)
|
|
|
|
{
|
|
|
|
var res = _invokeService.CM_RentOut_NeedEndLease_View(request);
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 租箱租出_添加
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="id"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpPost]
|
|
|
|
[Route("CM_RentOut_AddCtn")]
|
|
|
|
public async Task<DataResult> CM_RentOut_AddCtn([FromBody] IdModel model)
|
|
|
|
{
|
|
|
|
return await _invokeService.CM_RentOut_AddCtn(long.Parse(model.Id), model.Ids);
|
|
|
|
//return res;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 租箱租出退租_添加
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="id"></param>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpPost]
|
|
|
|
[Route("CM_RentOut_EndLease_AddCtn")]
|
|
|
|
public async Task<DataResult> CM_RentOut_EndLease_AddCtn([FromBody] IdModel model)
|
|
|
|
{
|
|
|
|
return await _invokeService.CM_RentOut_EndLease_AddCtn(long.Parse(model.Id), model.Ids);
|
|
|
|
//return res;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|