zhangxiaofeng 8 months ago
commit e96ecc7871

@ -395,8 +395,8 @@ namespace Myshipping.Application
TaskBCInfoDto bcTargetDto = dto.DataObj.Adapt<TaskBCInfoDto>();
//提取箱信息
var ctnList = _repCtn.AsQueryable()
.Where(x => x.IsDeleted == false && x.TenantId == UserManager.TENANT_ID
var ctnList = _repCtn.AsQueryable().Filter(null, true)
.Where(x => x.IsDeleted == false && x.TenantId.Value == UserManager.TENANT_ID
&& x.SLOT_ID == model.Id).ToList();
if (ctnList != null)
@ -1210,6 +1210,7 @@ namespace Myshipping.Application
/// </summary>
/// <param name="model">生成订舱订单请求</param>
/// <returns>返回回执</returns>
[HttpPost("/BookingSlot/CreateBookingOrder")]
public async Task<TaskManageOrderResultDto> CreateBookingOrder(BookingGenerateDto model)
{
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
@ -1476,7 +1477,7 @@ namespace Myshipping.Application
/// </summary>
/// <param name="id"></param>
/// <returns>返回回执</returns>
[HttpGet("/BookingSlot/SearchBookingSlotWithOrderById")]
public async Task<BookingSlotWithOrderDto> SearchBookingSlotWithOrderById(long id)
{
BookingSlotWithOrderDto dto = null;
@ -1490,7 +1491,7 @@ namespace Myshipping.Application
return dto;
}
var list =_repAllocation.AsQueryable().Where(a => a.BOOKING_SLOT_ID == id).ToList();
var list = _repAllocation.AsQueryable().Where(a => a.BOOKING_SLOT_ID == id).ToList();
dto = new BookingSlotWithOrderDto
{
@ -1513,7 +1514,7 @@ namespace Myshipping.Application
/// </summary>
/// <param name="slotBookingNo">订舱编号</param>
/// <returns>返回回执</returns>
[HttpGet("/BookingSlot/SearchBookingSlotWithOrderByNo")]
public async Task<BookingSlotWithOrderDto> SearchBookingSlotWithOrderByNo(string slotBookingNo)
{
BookingSlotWithOrderDto dto = null;
@ -1543,6 +1544,43 @@ namespace Myshipping.Application
return dto;
}
#endregion
/// <summary>
/// 校验是否可以生成订舱订单
/// </summary>
/// <param name="id">舱位主键</param>
/// <returns></returns>
[HttpGet("/BookingSlot/ValidateCreateBookingOrder")]
public async Task<TaskManageOrderResultDto> ValidateCreateBookingOrder(long id)
{
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
var slotInfo = await _repBase.AsQueryable().FirstAsync(a => a.Id == id);
if (slotInfo == null)
{
throw Oops.Oh($"获取舱位失败,舱位不存在或已作废");
}
//if(so)
return result;
}
/// <summary>
/// 批量发送邮件提醒(发送客户)
/// </summary>
/// <param name="ids">舱位主键组</param>
/// <returns></returns>
[HttpPost("/BookingSlot/SendEmail")]
public async Task<TaskManageOrderResultDto> SendEmail([FromBody]long[] ids)
{
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
result.succ = true;
return result;
}
}

@ -1,4 +1,5 @@
using Microsoft.AspNetCore.Http;
using Furion.FriendlyException;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Myshipping.Application.Entity;
using Myshipping.Application.Event;
@ -112,5 +113,20 @@ namespace Myshipping.Application
/// <returns>返回回执</returns>
Task<BookingSlotWithOrderDto> SearchBookingSlotWithOrderByNo(string slotBookingNo);
/// <summary>
/// 校验是否可以生成订舱订单
/// </summary>
/// <param name="id">舱位主键</param>
/// <returns></returns>
Task<TaskManageOrderResultDto> ValidateCreateBookingOrder(long id);
/// <summary>
/// 批量发送邮件提醒(发送客户)
/// </summary>
/// <param name="ids">舱位主键组</param>
/// <returns></returns>
Task<TaskManageOrderResultDto> SendEmail(long[] ids);
}
}
Loading…
Cancel
Save