|
|
|
@ -492,9 +492,9 @@ namespace Myshipping.Application
|
|
|
|
|
{
|
|
|
|
|
itconfig.RemoveAll(x => x.ConfigId == ii.ConfigId);
|
|
|
|
|
}
|
|
|
|
|
item.IsVGM=itgoods.Where(x => x.StatusName == "提交VGM").FirstOrDefault()==null?null: itgoods.Where(x => x.StatusName == "提交VGM").Select(x=>x.FinishTime).FirstOrDefault();
|
|
|
|
|
item.IsCanDan = itgoods.Where(x => x.StatusName == "提交舱单").FirstOrDefault() == null ? null : itgoods.Where(x => x.StatusName == "提交舱单").Select(x => x.FinishTime).FirstOrDefault();
|
|
|
|
|
item.IsZZFX = itgoods.Where(x => x.StatusName == "装载放行").FirstOrDefault() == null ? null : itgoods.Where(x => x.StatusName == "装载放行").Select(x => x.FinishTime).FirstOrDefault();
|
|
|
|
|
item.IsVGM=itgoods.Where(x => x.SystemCode == "YFVGM").FirstOrDefault()==null?null: itgoods.Where(x => x.SystemCode == "YFVGM").Select(x=>x.FinishTime).FirstOrDefault();
|
|
|
|
|
item.IsCanDan = itgoods.Where(x => x.SystemCode == "YFCD").FirstOrDefault() == null ? null : itgoods.Where(x => x.SystemCode == "YFCD").Select(x => x.FinishTime).FirstOrDefault();
|
|
|
|
|
item.IsZZFX = itgoods.Where(x => x.SystemCode == "ZZFX").FirstOrDefault() == null ? null : itgoods.Where(x => x.SystemCode == "ZZFX").Select(x => x.FinishTime).FirstOrDefault();
|
|
|
|
|
item.GoodsStatusList = itgoods.Union<GoodsStatusList>(itconfig).OrderBy(x => x.Sort).ToList();
|
|
|
|
|
////获取提箱返场状态
|
|
|
|
|
//var statuslog = statusloglist.Where(x => x.BookingId == item.Id).OrderByDescending(x => x.CreatedTime).ToList();
|
|
|
|
@ -506,7 +506,7 @@ namespace Myshipping.Application
|
|
|
|
|
//}
|
|
|
|
|
var statusids = statusloglist.Where(x => x.BookingId == item.Id).Select(x => x.Id).ToList();
|
|
|
|
|
var dto = statuslogdetaillist.Where(x => statusids.Contains(x.PId)).ToList();
|
|
|
|
|
List<CNTRNODto> CNTRNODtolist =new List<CNTRNODto>();
|
|
|
|
|
List<CNTRNODto> CNTRNODtolist = new List<CNTRNODto>();
|
|
|
|
|
foreach (var d in dto)
|
|
|
|
|
{
|
|
|
|
|
var ctn = CNTRNODtolist.Where(x => x.CNTRNO == d.CNTRNO).FirstOrDefault();
|
|
|
|
@ -871,9 +871,9 @@ namespace Myshipping.Application
|
|
|
|
|
{
|
|
|
|
|
itconfig.RemoveAll(x => x.ConfigId == ii.ConfigId);
|
|
|
|
|
}
|
|
|
|
|
item.IsVGM = itgoods.Where(x => x.StatusName == "提交VGM").FirstOrDefault() == null ? null : itgoods.Where(x => x.StatusName == "提交VGM").Select(x => x.FinishTime).FirstOrDefault();
|
|
|
|
|
item.IsCanDan = itgoods.Where(x => x.StatusName == "提交舱单").FirstOrDefault() == null ? null : itgoods.Where(x => x.StatusName == "提交舱单").Select(x => x.FinishTime).FirstOrDefault();
|
|
|
|
|
item.IsZZFX = itgoods.Where(x => x.StatusName == "装载放行").FirstOrDefault() == null ? null : itgoods.Where(x => x.StatusName == "装载放行").Select(x => x.FinishTime).FirstOrDefault();
|
|
|
|
|
item.IsVGM = itgoods.Where(x => x.SystemCode == "YFVGM").FirstOrDefault() == null ? null : itgoods.Where(x => x.SystemCode == "YFVGM").Select(x => x.FinishTime).FirstOrDefault();
|
|
|
|
|
item.IsCanDan = itgoods.Where(x => x.SystemCode == "YFCD").FirstOrDefault() == null ? null : itgoods.Where(x => x.SystemCode == "YFCD").Select(x => x.FinishTime).FirstOrDefault();
|
|
|
|
|
item.IsZZFX = itgoods.Where(x => x.SystemCode == "ZZFX").FirstOrDefault() == null ? null : itgoods.Where(x => x.SystemCode == "ZZFX").Select(x => x.FinishTime).FirstOrDefault();
|
|
|
|
|
item.GoodsStatusList = itgoods.Union<GoodsStatusList>(itconfig).OrderBy(x => x.Sort).ToList();
|
|
|
|
|
//获取提箱返场状态
|
|
|
|
|
//var statuslog = statusloglist.Where(x => x.BookingId == item.Id).OrderByDescending(x => x.CreatedTime).ToList();
|
|
|
|
@ -2854,6 +2854,9 @@ namespace Myshipping.Application
|
|
|
|
|
throw Oops.Bah($"邮件发送失败:{sendResult.Value}");
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
//设置货物状态-放舱
|
|
|
|
|
SetGoogsStatus("YFC", bookingId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
@ -3605,6 +3608,9 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
//订舱状态
|
|
|
|
|
await SaveBookingStatus(bookingId, "sta_xhz", "下货纸");
|
|
|
|
|
|
|
|
|
|
//设置货物状态:已发下货纸,并回传东胜
|
|
|
|
|
SetGoogsStatus("YFXHZ", bookingId);
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
@ -4262,33 +4268,7 @@ namespace Myshipping.Application
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//设置货物状态:已发VGM,并回传东胜
|
|
|
|
|
var gsCfg = _goodsStatusConfig.FirstOrDefault(x => x.SystemCode == "YFVGM" && x.CreatedUserId == UserManager.UserId);
|
|
|
|
|
if (gsCfg != null)
|
|
|
|
|
{
|
|
|
|
|
_logger.LogInformation($"发送VGM检查货物状态:{bookingId},{order.MBLNO}");
|
|
|
|
|
var gs = _goodsStatus.FirstOrDefault(x => x.ConfigId == gsCfg.Id && x.bookingId == bookingId);
|
|
|
|
|
if (gs == null)
|
|
|
|
|
{
|
|
|
|
|
gs = new BookingGoodsStatus();
|
|
|
|
|
gs.bookingId = bookingId;
|
|
|
|
|
gs.ConfigId = gsCfg.Id;
|
|
|
|
|
gs.FinishUser = UserManager.Name;
|
|
|
|
|
gs.FinishTime = DateTime.Now;
|
|
|
|
|
gs.FinishUserId = UserManager.UserId;
|
|
|
|
|
await _goodsStatus.InsertAsync(gs);
|
|
|
|
|
|
|
|
|
|
_logger.LogInformation($"发送VGM后自动完成货物状态,Id:{bookingId},提单号:{order.MBLNO},操作人:{UserManager.Name}");
|
|
|
|
|
|
|
|
|
|
//推送东胜
|
|
|
|
|
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) && itemcode == "true")
|
|
|
|
|
{
|
|
|
|
|
await SendBookingOrder(new long[] { bookingId });
|
|
|
|
|
|
|
|
|
|
_logger.LogInformation($"发送VGM后货物状态推送东胜完成,Id:{bookingId},提单号:{order.MBLNO},操作人:{UserManager.Name}");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
SetGoogsStatus("YFVGM", bookingId);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -8408,6 +8388,43 @@ namespace Myshipping.Application
|
|
|
|
|
}
|
|
|
|
|
return order;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 设置货物状态完成,并推送东胜
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="code"></param>
|
|
|
|
|
/// <param name="bookingId"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public async Task SetGoogsStatus(string code, long bookingId)
|
|
|
|
|
{
|
|
|
|
|
var gsCfg = _goodsStatusConfig.FirstOrDefault(x => x.SystemCode == code && x.CreatedUserId == UserManager.UserId);
|
|
|
|
|
if (gsCfg != null)
|
|
|
|
|
{
|
|
|
|
|
_logger.LogInformation($"发送VGM检查货物状态:{bookingId}");
|
|
|
|
|
var gs = _goodsStatus.FirstOrDefault(x => x.ConfigId == gsCfg.Id && x.bookingId == bookingId);
|
|
|
|
|
if (gs == null)
|
|
|
|
|
{
|
|
|
|
|
gs = new BookingGoodsStatus();
|
|
|
|
|
gs.bookingId = bookingId;
|
|
|
|
|
gs.ConfigId = gsCfg.Id;
|
|
|
|
|
gs.FinishUser = UserManager.Name;
|
|
|
|
|
gs.FinishTime = DateTime.Now;
|
|
|
|
|
gs.FinishUserId = UserManager.UserId;
|
|
|
|
|
await _goodsStatus.InsertAsync(gs);
|
|
|
|
|
|
|
|
|
|
_logger.LogInformation($"发送VGM后自动完成货物状态,Id:{bookingId},操作人:{UserManager.Name}");
|
|
|
|
|
|
|
|
|
|
//推送东胜
|
|
|
|
|
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) && itemcode == "true")
|
|
|
|
|
{
|
|
|
|
|
await SendBookingOrder(new long[] { bookingId });
|
|
|
|
|
|
|
|
|
|
_logger.LogInformation($"发送VGM后货物状态推送东胜完成,Id:{bookingId},操作人:{UserManager.Name}");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 临时测试使用
|
|
|
|
|