|
|
|
@ -10368,7 +10368,7 @@ namespace Myshipping.Application
|
|
|
|
|
if (item.SPLIT_OR_MERGE_FLAG.Value == 2)
|
|
|
|
|
{
|
|
|
|
|
//如果当前是主票
|
|
|
|
|
if(dto.CUSTNO.Equals(dto.HBLNO,StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
if (dto.CUSTNO.Equals(dto.HBLNO, StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
{
|
|
|
|
|
var allOrderList = await _rep.AsQueryable().Filter(null, true).Where(x => dto.HBLNO == x.HBLNO && (x.SPLIT_OR_MERGE_FLAG != null && x.SPLIT_OR_MERGE_FLAG == 2)
|
|
|
|
|
&& x.TenantId == UserManager.TENANT_ID && x.IsDeleted == false).ToListAsync();
|
|
|
|
@ -10376,7 +10376,7 @@ namespace Myshipping.Application
|
|
|
|
|
if (allOrderList.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
var allOrderIds = allOrderList.Select(x => x.Id).ToList();
|
|
|
|
|
var currCtn = await _repCtn.AsQueryable().Filter(null, true).Where(x => x.BILLID != null && allOrderIds.Contains(x.BILLID.Value)
|
|
|
|
|
var currCtn = await _repCtn.AsQueryable().Filter(null, true).Where(x => x.BILLID != null && allOrderIds.Contains(x.BILLID.Value)
|
|
|
|
|
&& x.IsDeleted == false).ToListAsync();
|
|
|
|
|
|
|
|
|
|
dto.ctnInputs = currCtn.Adapt<List<BookingCtnDto>>();
|
|
|
|
@ -12892,6 +12892,39 @@ namespace Myshipping.Application
|
|
|
|
|
/// 接收BC信息更新订舱
|
|
|
|
|
/// </summary>
|
|
|
|
|
[AllowAnonymous]
|
|
|
|
|
[HttpPost("/BookingOrder/ReceiveBookingReject")]
|
|
|
|
|
[ApiUser(ApiCode = "ReceiveBookingReject")]
|
|
|
|
|
public async Task<ReceiveBcInfoResultDto> ReceiveBookingReject(ReceiveBookingRejectInputDto input)
|
|
|
|
|
{
|
|
|
|
|
// 客户订舱:运营端发送订舱数据给客户端
|
|
|
|
|
if (App.Configuration["RunType"] == CommonConst.RUN_TYPE_DJY)
|
|
|
|
|
{
|
|
|
|
|
return new ReceiveBcInfoResultDto(false, "非运营端,接收失败");
|
|
|
|
|
}
|
|
|
|
|
if (string.IsNullOrWhiteSpace(input.CUSTNO))
|
|
|
|
|
{
|
|
|
|
|
return new ReceiveBcInfoResultDto(false, "CUSTNO不能为空");
|
|
|
|
|
}
|
|
|
|
|
var list = await _rep.AsQueryable().Filter(null, true).Where(x => x.CUSTNO == input.CUSTNO)
|
|
|
|
|
.ToListAsync();
|
|
|
|
|
|
|
|
|
|
if (list.Count == 0)
|
|
|
|
|
{
|
|
|
|
|
string msg = $"通过CUSTNO查询订舱用于推送拒绝请求时,未查询到数据,CUSTNO:【{input.CUSTNO}】,结束";
|
|
|
|
|
_logger.LogInformation(msg);
|
|
|
|
|
return new ReceiveBcInfoResultDto(false, msg);
|
|
|
|
|
}
|
|
|
|
|
_logger.LogInformation($"通过CUSTNO查询订舱用于推送拒绝请求时,查询到{list.Count}条数据,CUSTNO:【{input.CUSTNO}】,开始推送客户端");
|
|
|
|
|
foreach (var item in list)
|
|
|
|
|
{
|
|
|
|
|
CustomerBookingSyncHelper.SendCustomerBookingSync(item.Id, BookingOrderSyncTypeEnum.REJECT.ToString());
|
|
|
|
|
}
|
|
|
|
|
return new ReceiveBcInfoResultDto(true, $"接收成功,共匹配到{list.Count}条订舱记录");
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 接收BC信息更新订舱
|
|
|
|
|
/// </summary>
|
|
|
|
|
[AllowAnonymous]
|
|
|
|
|
[HttpPost("/BookingOrder/ReceiveBcInfo")]
|
|
|
|
|
[ApiUser(ApiCode = "ReceiveBcInfo")]
|
|
|
|
|
public async Task<ReceiveBcInfoResultDto> ReceiveBcInfo(ReceiveBcInfoDto input)
|
|
|
|
|