|
|
|
@ -122,7 +122,8 @@ namespace Myshipping.Application
|
|
|
|
|
{
|
|
|
|
|
entity.CARRIER = _cache.GetAllCodeCarrier().Result.Where(x => x.Code == entity.CARRIERID).Select(x => x.EdiCode).FirstOrDefault();
|
|
|
|
|
}
|
|
|
|
|
if (entity.CARGOID!="D") {
|
|
|
|
|
if (entity.CARGOID != "D")
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
entity.DCLASS = string.Empty;
|
|
|
|
|
entity.DUNNO = string.Empty;
|
|
|
|
@ -160,6 +161,7 @@ namespace Myshipping.Application
|
|
|
|
|
{
|
|
|
|
|
entity.CARRIER = _cache.GetAllCodeCarrier().Result.Where(x => x.Code == entity.CARRIERID).Select(x => x.EdiCode).FirstOrDefault();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (entity.CARGOID != "D")
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
@ -367,13 +369,11 @@ namespace Myshipping.Application
|
|
|
|
|
{
|
|
|
|
|
await _seaeedi.UpdateAsync(x => x.Id == Id, x => new BookingOrderSeaeEdi { State = "已发送", SENDREMARK = SENDREMARK });
|
|
|
|
|
}
|
|
|
|
|
if (type == "0")
|
|
|
|
|
{
|
|
|
|
|
await _seaeedi.UpdateAsync(x => x.Id == Id, x => new BookingOrderSeaeEdi { State = "已直发", SENDREMARK = SENDREMARK });
|
|
|
|
|
}
|
|
|
|
|
if (type == "1")
|
|
|
|
|
if (type == "0" || type == "1")
|
|
|
|
|
{
|
|
|
|
|
await _seaeedi.UpdateAsync(x => x.Id == Id, x => new BookingOrderSeaeEdi { State = "已直发", SENDREMARK = SENDREMARK });
|
|
|
|
|
await _rep.SetGoodsStatus("YFCD", Id);
|
|
|
|
|
await _rep.SendBookingOrder(new long[] { Id });
|
|
|
|
|
}
|
|
|
|
|
if (type == "2")
|
|
|
|
|
{
|
|
|
|
@ -387,52 +387,9 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if (type == "3"|| type == "0"||type == "1") {
|
|
|
|
|
#region 插入货运动态
|
|
|
|
|
//配置中所有的货物状态
|
|
|
|
|
var config = _goodsStatusConfig.AsQueryable().Where(config => config.CreatedUserId == order.CreatedUserId).ToList().DistinctBy(x => x.StatusName).Select(config => new GoodsStatusQuery
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
ConfigId = config.Id,
|
|
|
|
|
SystemCode = config.SystemCode,
|
|
|
|
|
StatusName = config.StatusName,
|
|
|
|
|
FinishTime = null,
|
|
|
|
|
FinishUser = null,
|
|
|
|
|
FinishUserId = null,
|
|
|
|
|
IsPublic = false,
|
|
|
|
|
ExtData = null,
|
|
|
|
|
Remark = null,
|
|
|
|
|
Sort = config.Sort
|
|
|
|
|
}).ToList();
|
|
|
|
|
|
|
|
|
|
var ConfigId = config.Where(x => x.SystemCode == "YFCD").Select(x => x.ConfigId).First();
|
|
|
|
|
|
|
|
|
|
await _goodsStatus.InsertAsync(new BookingGoodsStatus
|
|
|
|
|
{
|
|
|
|
|
bookingId= Id,
|
|
|
|
|
ConfigId= ConfigId,
|
|
|
|
|
FinishTime=DateTime.Now,
|
|
|
|
|
FinishUser= order.CreatedUserName,
|
|
|
|
|
FinishUserId = order.CreatedUserId,
|
|
|
|
|
IsPublic=false
|
|
|
|
|
});
|
|
|
|
|
List<long> tslist = new List<long>();
|
|
|
|
|
tslist.Add((long)Id);
|
|
|
|
|
var itemcode = _cache.GetAllTenantParam().Result.Where(x => x.ParaCode == "BOOKING_DATA_PUSH" && x.TenantId == UserManager.TENANT_ID).Select(x => x.ItemCode).FirstOrDefault();
|
|
|
|
|
if (!string.IsNullOrEmpty(itemcode))
|
|
|
|
|
{
|
|
|
|
|
if (itemcode == "true")
|
|
|
|
|
await _rep.SendBookingOrder(tslist.ToArray());
|
|
|
|
|
_logger.LogInformation(Id + "自动订舱货物状态推送成功!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|