|
|
|
@ -4333,24 +4333,11 @@ namespace Myshipping.Application
|
|
|
|
|
ICell cell = row.GetCell(1);
|
|
|
|
|
if (cell != null)
|
|
|
|
|
{
|
|
|
|
|
row.Cells[1].SetCellValue(order.SHIPPER);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
row.CreateCell(1).SetCellValue(order.SHIPPER);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (i == 11)
|
|
|
|
|
{
|
|
|
|
|
//收货人
|
|
|
|
|
ICell cell = row.GetCell(1);
|
|
|
|
|
if (cell != null)
|
|
|
|
|
{
|
|
|
|
|
row.Cells[1].SetCellValue(order.CONSIGNEE);
|
|
|
|
|
row.Cells[1].SetCellValue(order.SHIPPERID);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
row.CreateCell(1).SetCellValue(order.CONSIGNEE);
|
|
|
|
|
row.CreateCell(1).SetCellValue(order.SHIPPERID);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (i == 11)
|
|
|
|
@ -4405,15 +4392,16 @@ namespace Myshipping.Application
|
|
|
|
|
row.CreateCell(1).SetCellValue(order.PORTLOADID);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var service = order.SERVICE;
|
|
|
|
|
//运输方式
|
|
|
|
|
ICell cell5 = row.GetCell(5);
|
|
|
|
|
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
|
|
|
|
|
{
|
|
|
|
|
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);
|
|
|
|
|
if (cell != null)
|
|
|
|
|
{
|
|
|
|
|
row.Cells[1].SetCellValue(order.PONO);
|
|
|
|
|
row.Cells[1].SetCellValue(order.CONTRACTNO);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
row.CreateCell(1).SetCellValue(order.PONO);
|
|
|
|
|
row.CreateCell(1).SetCellValue(order.CONTRACTNO);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (i == 23)
|
|
|
|
@ -4545,11 +4533,11 @@ namespace Myshipping.Application
|
|
|
|
|
ICell cell3 = row.GetCell(3);
|
|
|
|
|
if (cell3 != null)
|
|
|
|
|
{
|
|
|
|
|
row.Cells[3].SetCellValue(order.GOODSNAME);
|
|
|
|
|
row.Cells[3].SetCellValue(order.DESCRIPTION);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
row.CreateCell(3).SetCellValue(order.GOODSNAME);
|
|
|
|
|
row.CreateCell(3).SetCellValue(order.DESCRIPTION);
|
|
|
|
|
}
|
|
|
|
|
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 ctnAll = string.Empty;
|
|
|
|
@ -4601,14 +4589,21 @@ namespace Myshipping.Application
|
|
|
|
|
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);
|
|
|
|
|
if (cell != null)
|
|
|
|
|
{
|
|
|
|
|
row.Cells[0].SetCellValue(order.BLFRT);
|
|
|
|
|
row.Cells[0].SetCellValue(bl);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
row.CreateCell(0).SetCellValue(order.BLFRT);
|
|
|
|
|
row.CreateCell(0).SetCellValue(bl);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (i == 43)
|
|
|
|
@ -4626,16 +4621,43 @@ namespace Myshipping.Application
|
|
|
|
|
}
|
|
|
|
|
if (i == 44)
|
|
|
|
|
{
|
|
|
|
|
//预付地点
|
|
|
|
|
ICell cell = row.GetCell(1);
|
|
|
|
|
if (cell != null)
|
|
|
|
|
var BLFRTCode = _cache.GetAllCodeFrt().Result.Where(x => x.EnName == order.BLFRT).Select(x => x.Code).First();
|
|
|
|
|
var bl = string.Empty;
|
|
|
|
|
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)
|
|
|
|
|
{
|
|
|
|
@ -5787,24 +5809,11 @@ namespace Myshipping.Application
|
|
|
|
|
ICell cell = row.GetCell(1);
|
|
|
|
|
if (cell != null)
|
|
|
|
|
{
|
|
|
|
|
row.Cells[1].SetCellValue(order.SHIPPER);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
row.CreateCell(1).SetCellValue(order.SHIPPER);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (i == 11)
|
|
|
|
|
{
|
|
|
|
|
//收货人
|
|
|
|
|
ICell cell = row.GetCell(1);
|
|
|
|
|
if (cell != null)
|
|
|
|
|
{
|
|
|
|
|
row.Cells[1].SetCellValue(order.CONSIGNEE);
|
|
|
|
|
row.Cells[1].SetCellValue(order.SHIPPERID);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
row.CreateCell(1).SetCellValue(order.CONSIGNEE);
|
|
|
|
|
row.CreateCell(1).SetCellValue(order.SHIPPERID);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (i == 11)
|
|
|
|
@ -5859,15 +5868,16 @@ namespace Myshipping.Application
|
|
|
|
|
row.CreateCell(1).SetCellValue(order.PORTLOADID);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var service = order.SERVICE;
|
|
|
|
|
//运输方式
|
|
|
|
|
ICell cell5 = row.GetCell(5);
|
|
|
|
|
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
|
|
|
|
|
{
|
|
|
|
|
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);
|
|
|
|
|
if (cell != null)
|
|
|
|
|
{
|
|
|
|
|
row.Cells[1].SetCellValue(order.PONO);
|
|
|
|
|
row.Cells[1].SetCellValue(order.CONTRACTNO);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
row.CreateCell(1).SetCellValue(order.PONO);
|
|
|
|
|
row.CreateCell(1).SetCellValue(order.CONTRACTNO);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (i == 23)
|
|
|
|
@ -5999,11 +6009,11 @@ namespace Myshipping.Application
|
|
|
|
|
ICell cell3 = row.GetCell(3);
|
|
|
|
|
if (cell3 != null)
|
|
|
|
|
{
|
|
|
|
|
row.Cells[3].SetCellValue(order.GOODSNAME);
|
|
|
|
|
row.Cells[3].SetCellValue(order.DESCRIPTION);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
row.CreateCell(3).SetCellValue(order.GOODSNAME);
|
|
|
|
|
row.CreateCell(3).SetCellValue(order.DESCRIPTION);
|
|
|
|
|
}
|
|
|
|
|
if (order.KGS != null)
|
|
|
|
|
{
|
|
|
|
@ -6022,7 +6032,7 @@ namespace Myshipping.Application
|
|
|
|
|
{
|
|
|
|
|
//尺码
|
|
|
|
|
ICell cell5 = row.GetCell(5);
|
|
|
|
|
if (cell5!= null)
|
|
|
|
|
if (cell5 != null)
|
|
|
|
|
{
|
|
|
|
|
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 ctnAll = string.Empty;
|
|
|
|
@ -6055,14 +6065,21 @@ namespace Myshipping.Application
|
|
|
|
|
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);
|
|
|
|
|
if (cell != null)
|
|
|
|
|
{
|
|
|
|
|
row.Cells[0].SetCellValue(order.BLFRT);
|
|
|
|
|
row.Cells[0].SetCellValue(bl);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
row.CreateCell(0).SetCellValue(order.BLFRT);
|
|
|
|
|
row.CreateCell(0).SetCellValue(bl);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (i == 43)
|
|
|
|
@ -6080,16 +6097,43 @@ namespace Myshipping.Application
|
|
|
|
|
}
|
|
|
|
|
if (i == 44)
|
|
|
|
|
{
|
|
|
|
|
//预付地点
|
|
|
|
|
ICell cell = row.GetCell(1);
|
|
|
|
|
if (cell != null)
|
|
|
|
|
var BLFRTCode = _cache.GetAllCodeFrt().Result.Where(x => x.EnName == order.BLFRT).Select(x => x.Code).First();
|
|
|
|
|
var bl = string.Empty;
|
|
|
|
|
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)
|
|
|
|
|
{
|
|
|
|
@ -6192,8 +6236,11 @@ namespace Myshipping.Application
|
|
|
|
|
filestream.Dispose();
|
|
|
|
|
#endregion
|
|
|
|
|
//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 };
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|