diff --git a/Myshipping.Application/Service/BookingOrderSeaeEdi/BookingOrderSeaeEdiService.cs b/Myshipping.Application/Service/BookingOrderSeaeEdi/BookingOrderSeaeEdiService.cs index 4bf0bc9b..33793b25 100644 --- a/Myshipping.Application/Service/BookingOrderSeaeEdi/BookingOrderSeaeEdiService.cs +++ b/Myshipping.Application/Service/BookingOrderSeaeEdi/BookingOrderSeaeEdiService.cs @@ -422,18 +422,22 @@ namespace Myshipping.Application checkResult.Add($"舱单主单中箱子的【总尺码】与订舱中箱子的【总尺码】不一致"); } - if (分单箱子列表.Sum(x => x.PKGS) != bkOrderCtnList.Sum(x => x.PKGS)) + if (分单箱子列表.Count > 0) { - checkResult.Add($"舱单分单中箱子的【总件数】与订舱中箱子的【总件数】不一致"); - } - if (分单箱子列表.Sum(x => x.KGS) != bkOrderCtnList.Sum(x => x.KGS)) - { - checkResult.Add($"舱单分单中箱子的【总重量】与订舱中箱子的【总重量】不一致"); - } - if (分单箱子列表.Sum(x => x.CBM) != bkOrderCtnList.Sum(x => x.CBM)) - { - checkResult.Add($"舱单分单中箱子的【总尺码】与订舱中箱子的【总尺码】不一致"); + if (分单箱子列表.Sum(x => x.PKGS) != bkOrderCtnList.Sum(x => x.PKGS)) + { + checkResult.Add($"舱单分单中箱子的【总件数】与订舱中箱子的【总件数】不一致"); + } + if (分单箱子列表.Sum(x => x.KGS) != bkOrderCtnList.Sum(x => x.KGS)) + { + checkResult.Add($"舱单分单中箱子的【总重量】与订舱中箱子的【总重量】不一致"); + } + if (分单箱子列表.Sum(x => x.CBM) != bkOrderCtnList.Sum(x => x.CBM)) + { + checkResult.Add($"舱单分单中箱子的【总尺码】与订舱中箱子的【总尺码】不一致"); + } } + // 再按箱号比较 foreach (var item in 主单箱子列表.GroupBy(x => x.CNTRNO))