|
|
@ -4333,24 +4333,11 @@ namespace Myshipping.Application
|
|
|
|
ICell cell = row.GetCell(1);
|
|
|
|
ICell cell = row.GetCell(1);
|
|
|
|
if (cell != null)
|
|
|
|
if (cell != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
row.Cells[1].SetCellValue(order.SHIPPER);
|
|
|
|
row.Cells[1].SetCellValue(order.SHIPPERID);
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
row.CreateCell(1).SetCellValue(order.SHIPPER);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (i == 11)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
//收货人
|
|
|
|
|
|
|
|
ICell cell = row.GetCell(1);
|
|
|
|
|
|
|
|
if (cell != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
row.Cells[1].SetCellValue(order.CONSIGNEE);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
row.CreateCell(1).SetCellValue(order.CONSIGNEE);
|
|
|
|
row.CreateCell(1).SetCellValue(order.SHIPPERID);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (i == 11)
|
|
|
|
if (i == 11)
|
|
|
@ -4405,15 +4392,16 @@ namespace Myshipping.Application
|
|
|
|
row.CreateCell(1).SetCellValue(order.PORTLOADID);
|
|
|
|
row.CreateCell(1).SetCellValue(order.PORTLOADID);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var service = order.SERVICE;
|
|
|
|
//运输方式
|
|
|
|
//运输方式
|
|
|
|
ICell cell5 = row.GetCell(5);
|
|
|
|
ICell cell5 = row.GetCell(5);
|
|
|
|
if (cell5 != null)
|
|
|
|
if (cell5 != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
row.Cells[5].SetCellValue(order.SERVICE);
|
|
|
|
row.Cells[5].SetCellValue(_cache.GetAllMappingService().Result.Where(x => x.Module == "XiangManCangEDI" && x.Code == service).Select(x => x.MapCode).First());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
row.CreateCell(5).SetCellValue(order.SERVICE);
|
|
|
|
row.CreateCell(5).SetCellValue(_cache.GetAllMappingService().Result.Where(x => x.Module == "XiangManCangEDI" && x.Code == service).Select(x => x.MapCode).First());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -4484,11 +4472,11 @@ namespace Myshipping.Application
|
|
|
|
ICell cell = row.GetCell(1);
|
|
|
|
ICell cell = row.GetCell(1);
|
|
|
|
if (cell != null)
|
|
|
|
if (cell != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
row.Cells[1].SetCellValue(order.PONO);
|
|
|
|
row.Cells[1].SetCellValue(order.CONTRACTNO);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
row.CreateCell(1).SetCellValue(order.PONO);
|
|
|
|
row.CreateCell(1).SetCellValue(order.CONTRACTNO);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (i == 23)
|
|
|
|
if (i == 23)
|
|
|
@ -4545,11 +4533,11 @@ namespace Myshipping.Application
|
|
|
|
ICell cell3 = row.GetCell(3);
|
|
|
|
ICell cell3 = row.GetCell(3);
|
|
|
|
if (cell3 != null)
|
|
|
|
if (cell3 != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
row.Cells[3].SetCellValue(order.GOODSNAME);
|
|
|
|
row.Cells[3].SetCellValue(order.DESCRIPTION);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
row.CreateCell(3).SetCellValue(order.GOODSNAME);
|
|
|
|
row.CreateCell(3).SetCellValue(order.DESCRIPTION);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (order.KGS != null)
|
|
|
|
if (order.KGS != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -4578,7 +4566,7 @@ namespace Myshipping.Application
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (i == 38)
|
|
|
|
if (i == 39)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var c = ctn.DistinctBy(x => x.CTNALL).ToList();
|
|
|
|
var c = ctn.DistinctBy(x => x.CTNALL).ToList();
|
|
|
|
var ctnAll = string.Empty;
|
|
|
|
var ctnAll = string.Empty;
|
|
|
@ -4601,14 +4589,21 @@ namespace Myshipping.Application
|
|
|
|
if (i == 42)
|
|
|
|
if (i == 42)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
//运费支付方式
|
|
|
|
//运费支付方式
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var BLFRTCode = _cache.GetAllCodeFrt().Result.Where(x => x.EnName == order.BLFRT).Select(x => x.Code).First();
|
|
|
|
|
|
|
|
var bl = string.Empty;
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(BLFRTCode))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
bl = _cache.GetAllMappingFrt().Result.Where(x => x.Module == "XiangManCangEDI" && x.Code == BLFRTCode).Select(x => x.MapCode).First();
|
|
|
|
|
|
|
|
}
|
|
|
|
ICell cell = row.GetCell(0);
|
|
|
|
ICell cell = row.GetCell(0);
|
|
|
|
if (cell != null)
|
|
|
|
if (cell != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
row.Cells[0].SetCellValue(order.BLFRT);
|
|
|
|
row.Cells[0].SetCellValue(bl);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
row.CreateCell(0).SetCellValue(order.BLFRT);
|
|
|
|
row.CreateCell(0).SetCellValue(bl);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (i == 43)
|
|
|
|
if (i == 43)
|
|
|
@ -4626,16 +4621,43 @@ namespace Myshipping.Application
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (i == 44)
|
|
|
|
if (i == 44)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
//预付地点
|
|
|
|
var BLFRTCode = _cache.GetAllCodeFrt().Result.Where(x => x.EnName == order.BLFRT).Select(x => x.Code).First();
|
|
|
|
ICell cell = row.GetCell(1);
|
|
|
|
var bl = string.Empty;
|
|
|
|
if (cell != null)
|
|
|
|
if (!string.IsNullOrEmpty(BLFRTCode))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
row.Cells[1].SetCellValue(order.PREPARDATID);
|
|
|
|
bl = _cache.GetAllMappingFrt().Result.Where(x => x.Module == "XiangManCangEDI" && x.Code == BLFRTCode).Select(x => x.MapCode).First();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
if (bl == "预付")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
row.CreateCell(1).SetCellValue(order.PREPARDATID);
|
|
|
|
//预付地点
|
|
|
|
|
|
|
|
ICell cell = row.GetCell(1);
|
|
|
|
|
|
|
|
if (cell != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
row.Cells[1].SetCellValue(order.PREPARDATID);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
row.CreateCell(1).SetCellValue(order.PREPARDATID);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
else if((bl == "到付"))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//预付地点
|
|
|
|
|
|
|
|
ICell cell = row.GetCell(1);
|
|
|
|
|
|
|
|
if (cell != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
row.Cells[1].SetCellValue(order.PAYABLEATID);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
row.CreateCell(1).SetCellValue(order.PAYABLEATID);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (i == 45)
|
|
|
|
if (i == 45)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -5787,24 +5809,11 @@ namespace Myshipping.Application
|
|
|
|
ICell cell = row.GetCell(1);
|
|
|
|
ICell cell = row.GetCell(1);
|
|
|
|
if (cell != null)
|
|
|
|
if (cell != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
row.Cells[1].SetCellValue(order.SHIPPER);
|
|
|
|
row.Cells[1].SetCellValue(order.SHIPPERID);
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
row.CreateCell(1).SetCellValue(order.SHIPPER);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (i == 11)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
//收货人
|
|
|
|
|
|
|
|
ICell cell = row.GetCell(1);
|
|
|
|
|
|
|
|
if (cell != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
row.Cells[1].SetCellValue(order.CONSIGNEE);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
row.CreateCell(1).SetCellValue(order.CONSIGNEE);
|
|
|
|
row.CreateCell(1).SetCellValue(order.SHIPPERID);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (i == 11)
|
|
|
|
if (i == 11)
|
|
|
@ -5859,15 +5868,16 @@ namespace Myshipping.Application
|
|
|
|
row.CreateCell(1).SetCellValue(order.PORTLOADID);
|
|
|
|
row.CreateCell(1).SetCellValue(order.PORTLOADID);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var service = order.SERVICE;
|
|
|
|
//运输方式
|
|
|
|
//运输方式
|
|
|
|
ICell cell5 = row.GetCell(5);
|
|
|
|
ICell cell5 = row.GetCell(5);
|
|
|
|
if (cell5 != null)
|
|
|
|
if (cell5 != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
row.Cells[5].SetCellValue(order.SERVICE);
|
|
|
|
row.Cells[5].SetCellValue(_cache.GetAllMappingService().Result.Where(x => x.Module == "XiangManCangEDI" && x.Code == service).Select(x => x.MapCode).First());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
row.CreateCell(5).SetCellValue(order.SERVICE);
|
|
|
|
row.CreateCell(5).SetCellValue(_cache.GetAllMappingService().Result.Where(x => x.Module == "XiangManCangEDI" && x.Code == service).Select(x => x.MapCode).First());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -5938,11 +5948,11 @@ namespace Myshipping.Application
|
|
|
|
ICell cell = row.GetCell(1);
|
|
|
|
ICell cell = row.GetCell(1);
|
|
|
|
if (cell != null)
|
|
|
|
if (cell != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
row.Cells[1].SetCellValue(order.PONO);
|
|
|
|
row.Cells[1].SetCellValue(order.CONTRACTNO);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
row.CreateCell(1).SetCellValue(order.PONO);
|
|
|
|
row.CreateCell(1).SetCellValue(order.CONTRACTNO);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (i == 23)
|
|
|
|
if (i == 23)
|
|
|
@ -5999,11 +6009,11 @@ namespace Myshipping.Application
|
|
|
|
ICell cell3 = row.GetCell(3);
|
|
|
|
ICell cell3 = row.GetCell(3);
|
|
|
|
if (cell3 != null)
|
|
|
|
if (cell3 != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
row.Cells[3].SetCellValue(order.GOODSNAME);
|
|
|
|
row.Cells[3].SetCellValue(order.DESCRIPTION);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
row.CreateCell(3).SetCellValue(order.GOODSNAME);
|
|
|
|
row.CreateCell(3).SetCellValue(order.DESCRIPTION);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (order.KGS != null)
|
|
|
|
if (order.KGS != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -6022,7 +6032,7 @@ namespace Myshipping.Application
|
|
|
|
{
|
|
|
|
{
|
|
|
|
//尺码
|
|
|
|
//尺码
|
|
|
|
ICell cell5 = row.GetCell(5);
|
|
|
|
ICell cell5 = row.GetCell(5);
|
|
|
|
if (cell5!= null)
|
|
|
|
if (cell5 != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
row.Cells[5].SetCellValue(order.CBM.ToString());
|
|
|
|
row.Cells[5].SetCellValue(order.CBM.ToString());
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -6032,7 +6042,7 @@ namespace Myshipping.Application
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (i == 38)
|
|
|
|
if (i == 39)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var c = ctn.DistinctBy(x => x.CTNALL).ToList();
|
|
|
|
var c = ctn.DistinctBy(x => x.CTNALL).ToList();
|
|
|
|
var ctnAll = string.Empty;
|
|
|
|
var ctnAll = string.Empty;
|
|
|
@ -6055,14 +6065,21 @@ namespace Myshipping.Application
|
|
|
|
if (i == 42)
|
|
|
|
if (i == 42)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
//运费支付方式
|
|
|
|
//运费支付方式
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var BLFRTCode = _cache.GetAllCodeFrt().Result.Where(x => x.EnName == order.BLFRT).Select(x => x.Code).First();
|
|
|
|
|
|
|
|
var bl = string.Empty;
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(BLFRTCode))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
bl = _cache.GetAllMappingFrt().Result.Where(x => x.Module == "XiangManCangEDI" && x.Code == BLFRTCode).Select(x => x.MapCode).First();
|
|
|
|
|
|
|
|
}
|
|
|
|
ICell cell = row.GetCell(0);
|
|
|
|
ICell cell = row.GetCell(0);
|
|
|
|
if (cell != null)
|
|
|
|
if (cell != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
row.Cells[0].SetCellValue(order.BLFRT);
|
|
|
|
row.Cells[0].SetCellValue(bl);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
row.CreateCell(0).SetCellValue(order.BLFRT);
|
|
|
|
row.CreateCell(0).SetCellValue(bl);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (i == 43)
|
|
|
|
if (i == 43)
|
|
|
@ -6080,16 +6097,43 @@ namespace Myshipping.Application
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (i == 44)
|
|
|
|
if (i == 44)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
//预付地点
|
|
|
|
var BLFRTCode = _cache.GetAllCodeFrt().Result.Where(x => x.EnName == order.BLFRT).Select(x => x.Code).First();
|
|
|
|
ICell cell = row.GetCell(1);
|
|
|
|
var bl = string.Empty;
|
|
|
|
if (cell != null)
|
|
|
|
if (!string.IsNullOrEmpty(BLFRTCode))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
row.Cells[1].SetCellValue(order.PREPARDATID);
|
|
|
|
bl = _cache.GetAllMappingFrt().Result.Where(x => x.Module == "XiangManCangEDI" && x.Code == BLFRTCode).Select(x => x.MapCode).First();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
if (bl == "预付")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
row.CreateCell(1).SetCellValue(order.PREPARDATID);
|
|
|
|
//预付地点
|
|
|
|
|
|
|
|
ICell cell = row.GetCell(1);
|
|
|
|
|
|
|
|
if (cell != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
row.Cells[1].SetCellValue(order.PREPARDATID);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
row.CreateCell(1).SetCellValue(order.PREPARDATID);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
else if ((bl == "到付"))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//预付地点
|
|
|
|
|
|
|
|
ICell cell = row.GetCell(1);
|
|
|
|
|
|
|
|
if (cell != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
row.Cells[1].SetCellValue(order.PAYABLEATID);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
row.CreateCell(1).SetCellValue(order.PAYABLEATID);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (i == 45)
|
|
|
|
if (i == 45)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -6192,8 +6236,11 @@ namespace Myshipping.Application
|
|
|
|
filestream.Dispose();
|
|
|
|
filestream.Dispose();
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
//return new FileStreamResult( filestream, "application/octet-stream") { FileDownloadName = fileName };
|
|
|
|
//return new FileStreamResult( filestream, "application/octet-stream") { FileDownloadName = fileName };
|
|
|
|
return new FileStreamResult(new FileStream(Path.Combine(fileFullPath, fileName), FileMode.Open), "application/octet-stream") { FileDownloadName = fileName };
|
|
|
|
var fpath = Path.Combine(fileFullPath, fileName);
|
|
|
|
;
|
|
|
|
var fInfo = new FileInfo(fpath);
|
|
|
|
|
|
|
|
_logger.LogInformation("箱满仓文件地址:" + fpath + " " + fInfo);
|
|
|
|
|
|
|
|
return new FileStreamResult(new FileStream(fpath, FileMode.Open), "application/octet-stream") { FileDownloadName = fInfo.Name };
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|