optimize
wet 2 years ago
parent 53e6406b95
commit 6def95f3f6

@ -2663,9 +2663,7 @@ namespace Myshipping.Application
var entity = await _excelrep.AsQueryable().Where(x => x.PId == templateId).OrderBy(x => x.Row).ToListAsync(); var entity = await _excelrep.AsQueryable().Where(x => x.PId == templateId).OrderBy(x => x.Row).ToListAsync();
if (entity == null) if (entity == null)
{ {
throw Oops.Bah("当前模板未设置"); throw Oops.Bah("当前模板未设置");
} }
for (int _row = 1; _row <= entity.Max(x => x.Row); _row++) for (int _row = 1; _row <= entity.Max(x => x.Row); _row++)
{ {
@ -2705,9 +2703,52 @@ namespace Myshipping.Application
row.CreateCell(_cellNum - 1).SetCellValue(value); row.CreateCell(_cellNum - 1).SetCellValue(value);
} }
} }
}
if (name.Split('.')[0].ToLower() == "order" && name.Split('.')[1].ToLower() == "_PKGS")
{
ICell cell = row.GetCell(_cellNum - 1);
if (cell != null)
{
row.Cells[_cellNum - 1].SetCellValue(order.PKGS + "("+order.KINDPKGS + ")");
}
else
{
row.CreateCell(_cellNum - 1).SetCellValue(order.PKGS + "(" + order.KINDPKGS + ")");
}
}
if (name.Split('.')[0].ToLower() == "order" && name.Split('.')[1].ToLower() == "_KGS")
{
ICell cell = row.GetCell(_cellNum - 1);
if (cell != null)
{
row.Cells[_cellNum - 1].SetCellValue(order.KGS + "(KGS)");
}
else
{
row.CreateCell(_cellNum - 1).SetCellValue(order.KGS + "(KGS)");
} }
}
if (name.Split('.')[0].ToLower() == "order" && name.Split('.')[1].ToLower() == "_CBM")
{
ICell cell = row.GetCell(_cellNum - 1);
if (cell != null)
{
row.Cells[_cellNum - 1].SetCellValue(order.CBM + "(CBM)");
}
else
{
row.CreateCell(_cellNum - 1).SetCellValue(order.CBM + "(CBM)");
}
}
} }
if (name.Split('.')[0].ToLower() == "edi") if (name.Split('.')[0].ToLower() == "edi")
@ -5479,8 +5520,13 @@ namespace Myshipping.Application
{ {
dic.Add("order." + descriptor.Name, descriptor.Description); dic.Add("order." + descriptor.Name, descriptor.Description);
} }
} }
dic.Add("order._PKGS", "件数(包装)");
dic.Add("order._KGS", "毛重(KGS)");
dic.Add("order._CBM", "尺码(CBM)");
Dictionary<string, string> dic1 = new Dictionary<string, string>(); Dictionary<string, string> dic1 = new Dictionary<string, string>();
foreach (PropertyDescriptor descriptor in TypeDescriptor.GetProperties(ctn)) foreach (PropertyDescriptor descriptor in TypeDescriptor.GetProperties(ctn))
{ {

Loading…
Cancel
Save