From 9e0b3c08f54d51d3bbc168fe51bd7f222998a5ff Mon Sep 17 00:00:00 2001 From: wet <1034391973@qq.com> Date: Tue, 23 May 2023 17:58:55 +0800 Subject: [PATCH] 1 --- .../BookingOrder/BookingOrderService.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index 731cd0a3..55ba949d 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -2711,7 +2711,7 @@ namespace Myshipping.Application { var value = string.Empty; if (order.PKGS!=null) { - if (order.PKGS.ToString().Split('.').Count() > 1) + if (order.PKGS.ToString().Split('.').Count() > 1&&Convert.ToInt32(order.PKGS.ToString().Split('.')[1])>0) { value = string.Format("{0:F2}", order.PKGS); } @@ -2724,11 +2724,11 @@ namespace Myshipping.Application if (cell != null) { - row.Cells[_cellNum - 1].SetCellValue(value + "(" + order.KINDPKGS + ")"); + row.Cells[_cellNum - 1].SetCellValue(value + order.KINDPKGS ); } else { - row.CreateCell(_cellNum - 1).SetCellValue(value + "(" + order.KINDPKGS + ")"); + row.CreateCell(_cellNum - 1).SetCellValue(value + order.KINDPKGS ); } } @@ -2737,7 +2737,7 @@ namespace Myshipping.Application var value = string.Empty; if (order.KGS != null) { - if (order.KGS.ToString().Split('.').Count() > 1) + if (order.KGS.ToString().Split('.').Count() > 1 && Convert.ToInt32(order.KGS.ToString().Split('.')[1]) > 0) { value = string.Format("{0:F2}", order.KGS); } @@ -2750,11 +2750,11 @@ namespace Myshipping.Application ICell cell = row.GetCell(_cellNum - 1); if (cell != null) { - row.Cells[_cellNum - 1].SetCellValue(value + "(KGS)"); + row.Cells[_cellNum - 1].SetCellValue(value + "KGS"); } else { - row.CreateCell(_cellNum - 1).SetCellValue(value + "(KGS)"); + row.CreateCell(_cellNum - 1).SetCellValue(value + "KGS"); } @@ -2765,7 +2765,7 @@ namespace Myshipping.Application var value = string.Empty; if (order.CBM != null) { - if (order.CBM.ToString().Split('.').Count() > 1) + if (order.CBM.ToString().Split('.').Count() > 1 && Convert.ToInt32(order.CBM.ToString().Split('.')[1]) > 0) { value = string.Format("{0:F2}", order.CBM); } @@ -2778,11 +2778,11 @@ namespace Myshipping.Application ICell cell = row.GetCell(_cellNum - 1); if (cell != null) { - row.Cells[_cellNum - 1].SetCellValue(value + "(CBM)"); + row.Cells[_cellNum - 1].SetCellValue(value + "CBM"); } else { - row.CreateCell(_cellNum - 1).SetCellValue(value + "(CBM)"); + row.CreateCell(_cellNum - 1).SetCellValue(value + "CBM"); } }