optimize
wet 1 year ago
parent 5870d319cb
commit 21c6439ebe

@ -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)
@ -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)
@ -5787,24 +5782,11 @@ namespace Myshipping.Application
ICell cell = row.GetCell(1);
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
{
row.CreateCell(1).SetCellValue(order.CONSIGNEE);
row.CreateCell(1).SetCellValue(order.SHIPPERID);
}
}
if (i == 11)
@ -5859,15 +5841,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 +5921,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)
@ -6032,7 +6015,7 @@ namespace Myshipping.Application
}
}
}
if (i == 38)
if (i == 39)
{
var c = ctn.DistinctBy(x => x.CTNALL).ToList();
var ctnAll = string.Empty;
@ -6055,14 +6038,20 @@ 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)

Loading…
Cancel
Save