同步东胜

master
wanghaomei 7 months ago
parent 78d54e5333
commit 432fe5e82f

@ -10060,6 +10060,25 @@ namespace Myshipping.Application
}).Distinct().ToListAsync();
}
//等拓展数据
var extData = await _repextendstate.AsQueryable().Filter(null, true).FirstAsync(x => x.bookingId == item.Id);
if (extData != null)
{
dto.ExtendState = extData.Adapt<BookingExtendStateDto>();
}
//提箱返场
var statusloglist = _repStatuslog.AsQueryable().Filter(null, true).Where(x => x.BookingId == item.Id && (x.Status == "提箱" || x.Status == "返场") && x.IsDeleted == false).ToList();
var statuslogId = statusloglist.Select(x => x.Id).ToList();
//运踪状态详情
var statuslogdetaillist = _statuslogdetail.AsQueryable().Where(x => statuslogId.Contains(x.PId)).ToList();
var staLogListDto = statusloglist.Adapt<List<BookingStatusLogSyncDto>>();
dto.StatusLogs = staLogListDto;
foreach (var sl in dto.StatusLogs)
{
var detailList = statuslogdetaillist.Where(x => x.PId == sl.Id).ToList();
sl.Details = detailList.Adapt<List<BookingStatusLogDetailSyncDto>>();
}
var childrens = await _rep.AsQueryable().Filter(null, true).Where(x => x.ParentId == item.Id && x.TenantId == UserManager.TENANT_ID && x.IsDeleted == false).ToListAsync();
dto.childrens = childrens.Adapt<List<Children>>();

@ -834,6 +834,17 @@ namespace Myshipping.Application.Service.DataSync.Dto
/// 附件列表
/// </summary>
public List<DownloadFile> Files { get; set; }
/// <summary>
/// 拓展数据
/// </summary>
public BookingExtendStateDto ExtendState { get; set; }
/// <summary>
/// 运踪详情
/// </summary>
public List<BookingStatusLogSyncDto> StatusLogs { get; set; }
}
@ -1649,5 +1660,102 @@ namespace Myshipping.Application.Service.DataSync.Dto
}
/// <summary>
/// 拓展数据
/// </summary>
public class BookingExtendStateDto
{
/// <summary>
/// 提箱小票未申请
/// </summary>
public int noApply { get; set; }
/// <summary>
/// 提箱小票已申请未打印
/// </summary>
public int applyNoPrint { get; set; }
/// <summary>
/// 提箱小票已打印
/// </summary>
public int print { get; set; }
/// <summary>
/// 提箱小票有效期起始时间
/// </summary>
public DateTime? TxxpBeginTime { get; set; }
/// <summary>
/// 提箱小票有效期终止时间
/// </summary>
public DateTime? TxxpEndTime { get; set; }
/// <summary>
/// 提箱小票pdf地址
/// </summary>
public string TxxpPdfUrl { get; set; }
}
/// <summary>
/// 货运跟踪
/// </summary>
public class BookingStatusLogSyncDto
{
/// <summary>
/// id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 业务id
/// </summary>
public long? BookingId { get; set; }
/// <summary>
/// 状态
/// </summary>
public string Status { get; set; }
/// <summary>
/// 状态时间
/// </summary>
public DateTime? OpTime { get; set; }
/// <summary>
/// 类别
/// </summary>
public string Category { get; set; }
/// <summary>
/// 状态分类
/// </summary>
public string Type { get; set; }
/// <summary>
/// 提单号
/// </summary>
public string MBLNO { get; set; }
/// <summary>
/// 明细详情
/// </summary>
public List<BookingStatusLogDetailSyncDto> Details { get; set; }
}
/// <summary>
/// 货运跟踪详情
/// </summary>
public class BookingStatusLogDetailSyncDto
{
/// <summary>
/// 状态
/// </summary>
public string Status { get; set; }
/// <summary>
/// 箱号
/// </summary>
public string CNTRNO { get; set; }
/// <summary>
/// 状态时间
/// </summary>
public DateTime? OPTime { get; set; }
}
}

Loading…
Cancel
Save