jianghaiqing 5 months ago
commit dc011da1b4

@ -2406,6 +2406,8 @@ namespace Myshipping.Application
bkOrder.OP = UserManager.Name;
await _repOrder.InsertAsync(bkOrder);
_logger.LogInformation($"审核通过进入订舱台账客户订舱ID{model.Id}订舱台账ID{bkOrder.Id},系统编号:{model.BOOKINGNO}");
var bkEdiExt = new BookingEDIExt();
bkEdiExt.Id = YitIdHelper.NextId();
bkEdiExt.BookingId = bkOrder.Id;
@ -2452,10 +2454,12 @@ namespace Myshipping.Application
var custNO = extObj.GetStringValue("CustNO");
if (!string.IsNullOrEmpty(custNO))
{
_logger.LogInformation($"回写订舱编号:{custNO},系统编号:{model.BOOKINGNO}");
bkOrder.CUSTNO = custNO;
await _repOrder.AsUpdateable(bkOrder).UpdateColumns(x => new { x.CUSTNO }).ExecuteCommandAsync();
CustomerBookingSyncHelper.SendCustomerBookingSync(id, BookingOrderSyncTypeEnum.CC.ToString());
_logger.LogInformation($"回写订舱号并回推客户端:{id} {custNO}");
CustomerBookingSyncHelper.SendCustomerBookingSync(bkOrder.Id, BookingOrderSyncTypeEnum.CC.ToString());
_logger.LogInformation($"回写订舱号并回推客户端:{bkOrder.Id} {custNO}");
}
}
else if (model.CARRIERID == "EMC")
@ -2464,15 +2468,18 @@ namespace Myshipping.Application
if (custNOArr.Count > 0)
{
var custNO = custNOArr.First().ToString();
_logger.LogInformation($"回写订舱编号:{custNO},系统编号:{model.BOOKINGNO}");
bkOrder.CUSTNO = custNO;
await _repOrder.AsUpdateable(bkOrder).UpdateColumns(x => new { x.CUSTNO }).ExecuteCommandAsync();
CustomerBookingSyncHelper.SendCustomerBookingSync(id, BookingOrderSyncTypeEnum.CC.ToString());
_logger.LogInformation($"回写订舱号并回推客户端:{id} {bkOrder.CUSTNO}");
CustomerBookingSyncHelper.SendCustomerBookingSync(bkOrder.Id, BookingOrderSyncTypeEnum.CC.ToString());
_logger.LogInformation($"回写订舱号并回推客户端:{bkOrder.Id} {bkOrder.CUSTNO}");
//有多票订舱编号,后台自动创建数据并对应
custNOArr.RemoveAt(0);
if (custNOArr.Count > 0)
{
_logger.LogInformation($"多订舱编号回写,系统编号:{model.BOOKINGNO}");
CustomerBookingSyncHelper.SendCustomerMultiCustNOSync(new BookingCustomerMultiCustNODto()
{
Id = model.BSNO,
@ -2721,7 +2728,7 @@ namespace Myshipping.Application
{
var staLog = new BookingStatusLog();
staLog.Status = status;
if (App.User.FindFirst(ClaimConst.CLAINM_USERID) == null)
if (App.User == null)
{
staLog.CreatedUserId = 0;
staLog.CreatedUserName = "系统";
@ -3010,15 +3017,28 @@ namespace Myshipping.Application
throw Oops.Bah($"未找到匹配的目的地:{input.DESTINATIONCODE}");
}
if (string.IsNullOrEmpty(input.SERVICECODE))
//中远的运输方式不能为空
CodeService service = null;
if (input.CARRIERID == "COSCO")
{
throw Oops.Bah("运输条款代码不能为空");
}
if (string.IsNullOrEmpty(input.SERVICECODE))
{
throw Oops.Bah("运输条款代码不能为空");
}
service = serviceList.FirstOrDefault(x => x.Code == input.SERVICECODE);
if (service == null)
{
throw Oops.Bah($"未找到匹配的运输条款:{input.SERVICECODE}");
}
var service = serviceList.FirstOrDefault(x => x.Code == input.SERVICECODE);
if (service == null)
}
else if (input.CARRIERID == "EMC") //长荣运送方式和运输形态不能为空
{
throw Oops.Bah($"未找到匹配的运输条款:{input.SERVICECODE}");
if (string.IsNullOrEmpty(input.ServiceMode) || string.IsNullOrEmpty(input.ServiceType))
{
throw Oops.Bah("运送方式和运输形态都不能为空");
}
}
if (string.IsNullOrEmpty(input.FRTCODE))
@ -3151,12 +3171,12 @@ namespace Myshipping.Application
custOrder.PORTLOADID = portLoad.EdiCode;
custOrder.PORTDISCHARGE = portDest.EnName;
custOrder.PORTDISCHARGEID = portDest.EdiCode;
custOrder.SERVICE = service.Name;
custOrder.PLACERECEIPT = placereceipt?.EnName;
custOrder.PLACERECEIPTID = placereceipt?.EdiCode;
custOrder.DESTINATION = destination.EnName;
custOrder.DESTINATIONID = destination.EdiCode;
custOrder.BLFRT = frt.EnName;
custOrder.SERVICE = service.Name;
//2024年4月19日将分拆的收发通拼接到大文本的收发通中
ContactSFT(custOrder);

@ -9510,6 +9510,11 @@
公开数据:获取目的港映射代码
</summary>
</member>
<member name="M:Myshipping.Core.Service.CommonDBService.OpenGetMappingCtn(Myshipping.Core.Service.CommonDB.Dto.OpenGetMappingCtnDto)">
<summary>
公开数据:获取箱型映射代码
</summary>
</member>
<member name="P:Myshipping.Core.Service.CommonDB.Dto.CodeCarrierDto.Code">
<summary>
代码
@ -10386,6 +10391,21 @@
船司ID
</summary>
</member>
<member name="P:Myshipping.Core.Service.CommonDB.Dto.OpenGetMappingCtnDto.Code">
<summary>
唯一代码
</summary>
</member>
<member name="P:Myshipping.Core.Service.CommonDB.Dto.OpenGetMappingCtnDto.Module">
<summary>
模块
</summary>
</member>
<member name="P:Myshipping.Core.Service.CommonDB.Dto.OpenGetMappingCtnDto.CarrierCode">
<summary>
船司ID
</summary>
</member>
<member name="T:Myshipping.Core.Service.CommonDB.Dto.RelaPortCarrierLaneDto">
<summary>
航线与港口的的关系表

@ -2382,5 +2382,22 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
return null;
}
/// <summary>
/// 公开数据:获取箱型映射代码
/// </summary>
[HttpGet("/commondb/OpenGetMappingCtn"), AllowAnonymous, ApiUser(ApiCode = "CommonDbOpenData")]
public async Task<dynamic> OpenGetMappingCtn([FromQuery] OpenGetMappingCtnDto input)
{
List<MappingCtn> list = await _sysCacheService.GetAllMappingCtn();
var map = list.FirstOrDefault(x => x.Module == input.Module && x.Code == input.Code && x.CarrierCode == input.CarrierCode);
if (map != null)
{
return new { map.MapCode, map.MapName };
}
return null;
}
#endregion
}

@ -23,4 +23,22 @@ namespace Myshipping.Core.Service.CommonDB.Dto
/// </summary>
public string CarrierCode { get; set; }
}
public class OpenGetMappingCtnDto
{
/// <summary>
/// 唯一代码
/// </summary>
public string Code { get; set; }
/// <summary>
/// 模块
/// </summary>
public string Module { get; set; }
/// <summary>
/// 船司ID
/// </summary>
public string CarrierCode { get; set; }
}
}

Loading…
Cancel
Save