|
|
|
@ -18,6 +18,10 @@ namespace DS.WMS.OpApi.Controllers
|
|
|
|
|
{
|
|
|
|
|
private readonly IBookingSlotService _bookingSlotService;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="bookingSlotService"></param>
|
|
|
|
|
public BookingSlotServiceController(IBookingSlotService bookingSlotService)
|
|
|
|
|
{
|
|
|
|
|
_bookingSlotService = bookingSlotService;
|
|
|
|
@ -35,7 +39,7 @@ namespace DS.WMS.OpApi.Controllers
|
|
|
|
|
[Route("ApiReceive")]
|
|
|
|
|
public async Task<DataResult<long>> ApiReceive(string jsonData, IFormFile file = null, IFormFile modifyFile = null)
|
|
|
|
|
{
|
|
|
|
|
return await _bookingSlotService.ApiReceive(jsonData, file, modifyFile);
|
|
|
|
|
return await _bookingSlotService.ApiReceive(jsonData, null, null);
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
@ -47,7 +51,7 @@ namespace DS.WMS.OpApi.Controllers
|
|
|
|
|
/// <returns>返回详情</returns>
|
|
|
|
|
[HttpGet]
|
|
|
|
|
[Route("Detail")]
|
|
|
|
|
public async Task<DataResult<BookingSlotBaseSaveOutput>> Detail(long id)
|
|
|
|
|
public async Task<DataResult<BookingSlotBaseSaveOutput>> Detail([FromQuery] long id)
|
|
|
|
|
{
|
|
|
|
|
return await _bookingSlotService.Detail(id);
|
|
|
|
|
}
|
|
|
|
@ -63,11 +67,9 @@ namespace DS.WMS.OpApi.Controllers
|
|
|
|
|
/// <returns>可用的舱位列表(含可用的箱子列表)</returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("GetAvailableSlots")]
|
|
|
|
|
public async Task<DataResult<List<BookingSlotBaseWithCtnDto>>> GetAvailableSlots(BookingSlotBaseDto slotInput = null,
|
|
|
|
|
List<long> slotIdListInput = null,
|
|
|
|
|
PageWithTotal pageInfo = null)
|
|
|
|
|
public async Task<DataResult<List<BookingSlotBaseWithCtnDto>>> GetAvailableSlots([FromBody] BookingSlotBaseDto slotInput )
|
|
|
|
|
{
|
|
|
|
|
return await _bookingSlotService.GetAvailableSlots(slotInput, slotIdListInput, pageInfo);
|
|
|
|
|
return await _bookingSlotService.GetAvailableSlots(slotInput, null, null);
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
@ -80,9 +82,9 @@ namespace DS.WMS.OpApi.Controllers
|
|
|
|
|
/// <returns>(指定订舱记录是否已经引入过舱位数据,现有舱位及箱子是否满足需求,提示信息)</returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("CheckImportSlots")]
|
|
|
|
|
public async Task<(bool isExists, bool isEnough, string message)> CheckImportSlots(List<BookingSlotBaseWithCtnDto> slots, long bookingOrderId)
|
|
|
|
|
public async Task<DataResult> CheckImportSlots([FromBody] List<BookingSlotBaseWithCtnDto> slots)
|
|
|
|
|
{
|
|
|
|
|
return await _bookingSlotService.CheckImportSlots(slots, bookingOrderId);
|
|
|
|
|
return null;//await _bookingSlotService.CheckImportSlots(slots, 0);
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
@ -97,9 +99,9 @@ namespace DS.WMS.OpApi.Controllers
|
|
|
|
|
/// <returns>(是否成功,提示消息)</returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("ImportSlots")]
|
|
|
|
|
public async Task<(bool isSuccess, string message)> ImportSlots(List<BookingSlotBaseWithCtnDto> slots, long bookingOrderId, bool isCheck, BookingGenerateDto generateModel = null)
|
|
|
|
|
public async Task<DataResult> ImportSlots([FromBody] List<BookingSlotBaseWithCtnDto> slots)
|
|
|
|
|
{
|
|
|
|
|
return await _bookingSlotService.ImportSlots(slots, bookingOrderId, isCheck, generateModel);
|
|
|
|
|
return null;//await _bookingSlotService.ImportSlots(slots, 0, false, null);
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
@ -111,7 +113,7 @@ namespace DS.WMS.OpApi.Controllers
|
|
|
|
|
/// <returns>返回列表</returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("PageStock")]
|
|
|
|
|
public async Task<dynamic> PageStock([FromBody] BookingSlotStockPageInput input)
|
|
|
|
|
public async Task<DataResult> PageStock([FromBody] BookingSlotStockPageInput input)
|
|
|
|
|
{
|
|
|
|
|
return await _bookingSlotService.PageStock(input);
|
|
|
|
|
}
|
|
|
|
@ -125,9 +127,11 @@ namespace DS.WMS.OpApi.Controllers
|
|
|
|
|
/// <returns>返回列表</returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("RefreshStock")]
|
|
|
|
|
public async Task RefreshStock([FromBody] BookingSlotStockUpdateModel input)
|
|
|
|
|
public async Task<DataResult> RefreshStock([FromBody] BookingSlotStockUpdateModel input)
|
|
|
|
|
{
|
|
|
|
|
await _bookingSlotService.RefreshStock(input);
|
|
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
@ -138,8 +142,8 @@ namespace DS.WMS.OpApi.Controllers
|
|
|
|
|
/// <param name="input">舱位详情</param>
|
|
|
|
|
/// <returns>返回输出</returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("Save")]
|
|
|
|
|
public async Task<DataResult<BookingSlotBaseSaveOutput>> Save([FromBody] BookingSlotBaseSaveInput input)
|
|
|
|
|
[Route("Save3")]
|
|
|
|
|
public async Task<DataResult<BookingSlotBaseSaveOutput>> Save3([FromBody] BookingSlotBaseSaveInput input)
|
|
|
|
|
{
|
|
|
|
|
return await _bookingSlotService.Save(input);
|
|
|
|
|
}
|
|
|
|
@ -153,7 +157,7 @@ namespace DS.WMS.OpApi.Controllers
|
|
|
|
|
/// <returns>返回附件列表</returns>
|
|
|
|
|
[HttpGet]
|
|
|
|
|
[Route("GetFile")]
|
|
|
|
|
public async Task<DataResult<List<OpFileRes>>> GetFile(long id)
|
|
|
|
|
public async Task<DataResult<List<OpFileRes>>> GetFile([FromQuery] long id)
|
|
|
|
|
{
|
|
|
|
|
return await _bookingSlotService.GetFile(id);
|
|
|
|
|
}
|
|
|
|
@ -167,7 +171,7 @@ namespace DS.WMS.OpApi.Controllers
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("Page")]
|
|
|
|
|
public async Task<dynamic> Page([FromBody] BookingSlotBasePageInput input)
|
|
|
|
|
public async Task<DataResult> Page([FromBody] BookingSlotBasePageInput input)
|
|
|
|
|
{
|
|
|
|
|
return await _bookingSlotService.Page(input);
|
|
|
|
|
}
|
|
|
|
@ -183,9 +187,9 @@ namespace DS.WMS.OpApi.Controllers
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("InnerApiReceive")]
|
|
|
|
|
public async Task<long> InnerApiReceive(BookingSlotBaseApiDto dto, DynameFileInfo file = null, DynameFileInfo modifyFile = null)
|
|
|
|
|
public async Task<DataResult<long>> InnerApiReceive([FromBody] BookingSlotBaseApiDto dto)
|
|
|
|
|
{
|
|
|
|
|
return await _bookingSlotService.InnerApiReceive(dto, file, modifyFile);
|
|
|
|
|
return null;// await _bookingSlotService.InnerApiReceive(dto, null, null);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
@ -199,9 +203,9 @@ namespace DS.WMS.OpApi.Controllers
|
|
|
|
|
/// <returns>返回舱位变更比对结果</returns>
|
|
|
|
|
[HttpGet]
|
|
|
|
|
[Route("GetSlotCompareResult")]
|
|
|
|
|
public async Task<List<CompareResultDetailInfo>> GetSlotCompareResult(long id, string batchNo)
|
|
|
|
|
public async Task<DataResult<List<CompareResultDetailInfo>>> GetSlotCompareResult([FromQuery] long id, [FromQuery] string batchNo)
|
|
|
|
|
{
|
|
|
|
|
return await _bookingSlotService.GetSlotCompareResult(id, batchNo);
|
|
|
|
|
return null;//await _bookingSlotService.GetSlotCompareResult(id, batchNo);
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
@ -213,9 +217,9 @@ namespace DS.WMS.OpApi.Controllers
|
|
|
|
|
/// <returns>返回回执</returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("ImportSlotFromFile")]
|
|
|
|
|
public async Task<TaskManageOrderResultDto> ImportSlotFromFile(IFormFile file)
|
|
|
|
|
public async Task<DataResult> ImportSlotFromFile([FromBody] IFormFile file)
|
|
|
|
|
{
|
|
|
|
|
return await _bookingSlotService.ImportSlotFromFile(file);
|
|
|
|
|
return null;//await _bookingSlotService.ImportSlotFromFile(file);
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
@ -226,10 +230,10 @@ namespace DS.WMS.OpApi.Controllers
|
|
|
|
|
/// <param name="model">生成订舱订单请求</param>
|
|
|
|
|
/// <returns>返回回执</returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("ImportSlotFromFile")]
|
|
|
|
|
public async Task<TaskManageOrderResultDto> CreateBookingOrder([FromBody] BookingGenerateDto model)
|
|
|
|
|
[Route("CreateBookingOrder")]
|
|
|
|
|
public async Task<DataResult> CreateBookingOrder([FromBody] BookingGenerateDto model)
|
|
|
|
|
{
|
|
|
|
|
return await _bookingSlotService.CreateBookingOrder(model);
|
|
|
|
|
return null;// await _bookingSlotService.CreateBookingOrder(model);
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
@ -241,9 +245,9 @@ namespace DS.WMS.OpApi.Controllers
|
|
|
|
|
/// <returns>返回回执</returns>
|
|
|
|
|
[HttpGet]
|
|
|
|
|
[Route("SearchBookingSlotWithOrderById")]
|
|
|
|
|
public async Task<BookingSlotWithOrderDto> SearchBookingSlotWithOrderById(long id)
|
|
|
|
|
public async Task<DataResult<BookingSlotWithOrderDto>> SearchBookingSlotWithOrderById([FromQuery] long id)
|
|
|
|
|
{
|
|
|
|
|
return await _bookingSlotService.SearchBookingSlotWithOrderById(id);
|
|
|
|
|
return null; //await _bookingSlotService.SearchBookingSlotWithOrderById(id);
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
@ -256,9 +260,9 @@ namespace DS.WMS.OpApi.Controllers
|
|
|
|
|
/// <returns>返回回执</returns>
|
|
|
|
|
[HttpGet]
|
|
|
|
|
[Route("SearchBookingSlotWithOrderByNo")]
|
|
|
|
|
public async Task<BookingSlotWithOrderDto> SearchBookingSlotWithOrderByNo(string slotBookingNo, long tenantId)
|
|
|
|
|
public async Task<DataResult<BookingSlotWithOrderDto>> SearchBookingSlotWithOrderByNo([FromQuery] string slotBookingNo, [FromQuery] long tenantId)
|
|
|
|
|
{
|
|
|
|
|
return await _bookingSlotService.SearchBookingSlotWithOrderByNo(slotBookingNo, tenantId);
|
|
|
|
|
return null; //await _bookingSlotService.SearchBookingSlotWithOrderByNo(slotBookingNo, tenantId);
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
@ -267,13 +271,12 @@ namespace DS.WMS.OpApi.Controllers
|
|
|
|
|
/// 请求BC比对
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="bcSrcDto">BC详情</param>
|
|
|
|
|
/// <param name="bcTargetDto">BC变更后详情</param>
|
|
|
|
|
/// <returns>返回回执</returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("ExcuteCompare")]
|
|
|
|
|
public async Task<string> ExcuteCompare(ParserBCInfoDto bcSrcDto, ParserBCInfoDto bcTargetDto)
|
|
|
|
|
public async Task<DataResult<string>> ExcuteCompare([FromBody] ParserBCInfoDto bcSrcDto)
|
|
|
|
|
{
|
|
|
|
|
return await _bookingSlotService.ExcuteCompare(bcSrcDto, bcTargetDto);
|
|
|
|
|
return null;// await _bookingSlotService.ExcuteCompare(bcSrcDto, null);
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
@ -282,15 +285,12 @@ namespace DS.WMS.OpApi.Controllers
|
|
|
|
|
/// 推送BC变更比对
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="bcSrcDto">原舱位详情</param>
|
|
|
|
|
/// <param name="bcTargetDto">变更后舱位详情</param>
|
|
|
|
|
/// <param name="slotId">舱位主键</param>
|
|
|
|
|
/// <param name="reqBatchNo">请求批次号用来区分对应的哪个批次任务</param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("PushCompareBCInfo")]
|
|
|
|
|
public async Task PushCompareBCInfo(ParserBCInfoDto bcSrcDto, ParserBCInfoDto bcTargetDto, long slotId, string reqBatchNo)
|
|
|
|
|
public async Task<DataResult<string>> PushCompareBCInfo([FromBody] ParserBCInfoDto bcSrcDto)
|
|
|
|
|
{
|
|
|
|
|
await _bookingSlotService.PushCompareBCInfo(bcSrcDto, bcTargetDto, slotId, reqBatchNo);
|
|
|
|
|
return null;// _bookingSlotService.PushCompareBCInfo(bcSrcDto, null, 0, "");
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
@ -304,9 +304,9 @@ namespace DS.WMS.OpApi.Controllers
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("MeasureDiffCautionTask")]
|
|
|
|
|
public async Task MeasureDiffCautionTask(ParserBCInfoDto bcSrcDto, ParserBCInfoDto bcTargetDto, long slotId)
|
|
|
|
|
public async Task<DataResult> MeasureDiffCautionTask([FromBody] ParserBCInfoDto bcSrcDto)
|
|
|
|
|
{
|
|
|
|
|
await _bookingSlotService.MeasureDiffCautionTask(bcSrcDto, bcTargetDto, slotId);
|
|
|
|
|
return null;// await _bookingSlotService.MeasureDiffCautionTask(bcSrcDto, null, 0);
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
@ -319,9 +319,9 @@ namespace DS.WMS.OpApi.Controllers
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpGet]
|
|
|
|
|
[Route("QueryBookingSlot")]
|
|
|
|
|
public async Task<long> QueryBookingSlot(string slotBookingNo, string CarrierId)
|
|
|
|
|
public async Task<DataResult<long>> QueryBookingSlot([FromQuery] string slotBookingNo, [FromQuery] string CarrierId)
|
|
|
|
|
{
|
|
|
|
|
return await _bookingSlotService.QueryBookingSlot(slotBookingNo, CarrierId);
|
|
|
|
|
return null;// await _bookingSlotService.QueryBookingSlot(slotBookingNo, CarrierId);
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
@ -333,9 +333,9 @@ namespace DS.WMS.OpApi.Controllers
|
|
|
|
|
/// <returns>返回舱位详情</returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("GetSlotList")]
|
|
|
|
|
public async Task<List<BookingSlotBaseSaveOutput>> GetSlotList(long[] ids)
|
|
|
|
|
public async Task<DataResult<List<BookingSlotBaseSaveOutput>>> GetSlotList([FromBody] long[] ids)
|
|
|
|
|
{
|
|
|
|
|
return await _bookingSlotService.GetSlotList(ids);
|
|
|
|
|
return null;// await _bookingSlotService.GetSlotList(ids);
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
@ -347,9 +347,9 @@ namespace DS.WMS.OpApi.Controllers
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("GetMergeList")]
|
|
|
|
|
public async Task<BookingSlotMergeResultDto> GetMergeList(QueryMergeSlotDto model)
|
|
|
|
|
public async Task<DataResult<BookingSlotMergeResultDto>> GetMergeList([FromBody] QueryMergeSlotDto model)
|
|
|
|
|
{
|
|
|
|
|
return await _bookingSlotService.GetMergeList(model);
|
|
|
|
|
return null;// await _bookingSlotService.GetMergeList(model);
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
@ -361,9 +361,9 @@ namespace DS.WMS.OpApi.Controllers
|
|
|
|
|
/// <returns>返回回执</returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("MergeCreateBookingOrder")]
|
|
|
|
|
public async Task<TaskManageOrderResultDto> MergeCreateBookingOrder(BookingGenerateDto model)
|
|
|
|
|
public async Task<DataResult<TaskManageOrderResultDto>> MergeCreateBookingOrder([FromBody] BookingGenerateDto model)
|
|
|
|
|
{
|
|
|
|
|
return await _bookingSlotService.MergeCreateBookingOrder(model);
|
|
|
|
|
return null;// await _bookingSlotService.MergeCreateBookingOrder(model);
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
}
|
|
|
|
|