optimize
wet 1 year ago
parent 2284a092ed
commit e6b40d306c

@ -492,9 +492,9 @@ namespace Myshipping.Application
{
itconfig.RemoveAll(x => x.ConfigId == ii.ConfigId);
}
item.IsVGM=itgoods.Where(x => x.StatusName == "提交VGM").FirstOrDefault()==null?false:true;
item.IsCanDan = itgoods.Where(x => x.StatusName == "已舱").FirstOrDefault() == null ? false : true;
item.IsZZFX = itgoods.Where(x => x.StatusName == "装载放行").FirstOrDefault() == null ? false : true;
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.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 =null;
List<CNTRNODto> CNTRNODtolist =new List<CNTRNODto>();
foreach (var d in dto)
{
var ctn = CNTRNODtolist.Where(x => x.CNTRNO == d.CNTRNO).FirstOrDefault();
@ -550,7 +550,7 @@ namespace Myshipping.Application
}
item.statuslogs = CNTRNODtolist;
item.statuslogs1 = CNTRNODtolist;
}
return list;
@ -871,9 +871,9 @@ namespace Myshipping.Application
{
itconfig.RemoveAll(x => x.ConfigId == ii.ConfigId);
}
item.IsVGM = itgoods.Where(x => x.StatusName == "提交VGM").FirstOrDefault() == null ? false : true;
item.IsCanDan = itgoods.Where(x => x.StatusName == "已舱").FirstOrDefault() == null ? false : true;
item.IsZZFX = itgoods.Where(x => x.StatusName == "装载放行").FirstOrDefault() == null ? false : true;
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.GoodsStatusList = itgoods.Union<GoodsStatusList>(itconfig).OrderBy(x => x.Sort).ToList();
//获取提箱返场状态
//var statuslog = statusloglist.Where(x => x.BookingId == item.Id).OrderByDescending(x => x.CreatedTime).ToList();
@ -886,7 +886,7 @@ namespace Myshipping.Application
//item.statuslogs = dto;
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 = null;
List<CNTRNODto> CNTRNODtolist = new List<CNTRNODto>();
foreach (var d in dto)
{
var ctn = CNTRNODtolist.Where(x => x.CNTRNO == d.CNTRNO).FirstOrDefault();
@ -930,7 +930,7 @@ namespace Myshipping.Application
}
item.statuslogs = CNTRNODtolist;
item.statuslogs1 = CNTRNODtolist;
}
return list;

@ -814,7 +814,7 @@ namespace Myshipping.Application.Service.BookingOrder.Dto
public List<BookingRemark> bookremark { get; set; }
public List<CNTRNODto> statuslogs { get; set; }
public List<CNTRNODto> statuslogs1 { get; set; }
public List<GoodsStatusList> GoodsStatusList { get; set; }
@ -941,15 +941,15 @@ namespace Myshipping.Application.Service.BookingOrder.Dto
/// <summary>
/// 提交VGM
/// </summary>
public bool IsVGM { get; set; }
public DateTime? IsVGM { get; set; }
/// <summary>
/// 提单舱单
/// </summary>
public bool IsCanDan { get; set; }
public DateTime? IsCanDan { get; set; }
/// <summary>
/// 装载放行
/// </summary>
public bool IsZZFX { get; set; }
public DateTime? IsZZFX { get; set; }
}
}

Loading…
Cancel
Save