diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index ae87e312..7af215b3 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -2663,9 +2663,7 @@ namespace Myshipping.Application var entity = await _excelrep.AsQueryable().Where(x => x.PId == templateId).OrderBy(x => x.Row).ToListAsync(); if (entity == null) { - throw Oops.Bah("当前模板未设置"); - } for (int _row = 1; _row <= entity.Max(x => x.Row); _row++) { @@ -2705,8 +2703,51 @@ namespace Myshipping.Application 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)"); + } + } } @@ -5479,8 +5520,13 @@ namespace Myshipping.Application { dic.Add("order." + descriptor.Name, descriptor.Description); } + } + dic.Add("order._PKGS", "件数(包装)"); + dic.Add("order._KGS", "毛重(KGS)"); + dic.Add("order._CBM", "尺码(CBM)"); + Dictionary dic1 = new Dictionary(); foreach (PropertyDescriptor descriptor in TypeDescriptor.GetProperties(ctn)) {