|
|
@ -2732,6 +2732,44 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
/// 接收其他系统上传订舱数据
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
/// <param name="dto"></param>
|
|
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
|
|
[HttpPost("/DataSync/UploadOrderData"), AllowAnonymous, ApiUser(ApiCode = "UploadOrderData")]
|
|
|
|
|
|
|
|
public async Task UploadOrderData(BookingOrderDto dto)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var saveDto = dto.Adapt<SaveBookingOrderInput>();
|
|
|
|
|
|
|
|
var dbModel = await _rep.AsQueryable().Filter(null, true).FirstAsync(x => x.TenantId == UserManager.TENANT_ID && x.BSNO == dto.BSNO);
|
|
|
|
|
|
|
|
if (dbModel != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
dto.Id = dbModel.Id;
|
|
|
|
|
|
|
|
saveDto.Id = dbModel.Id;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var compareModel = dbModel.Adapt<BookingOrderDto>();
|
|
|
|
|
|
|
|
var propsOrder = typeof(BookingOrderDto).GetProperties();
|
|
|
|
|
|
|
|
var changeFileds = new List<string>();
|
|
|
|
|
|
|
|
foreach (var prop in propsOrder)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (prop.Name != "ctnInputs" && prop.Name != "BookingEDIExt" && prop.Name != "ExtendState")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var v1 = prop.GetValue(compareModel);
|
|
|
|
|
|
|
|
var v2 = prop.GetValue(dto);
|
|
|
|
|
|
|
|
if (v1 != v2)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
changeFileds.Add(prop.Name);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
saveDto.ChangedFields = changeFileds;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await _bookingorderservice.Save(saveDto);
|
|
|
|
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region 下载数据
|
|
|
|
#region 下载数据
|
|
|
|