舱单校验调整:解决没分单情况下误提示的bug

master
zhangxiaofeng 8 months ago
parent bb5ac81940
commit 5435d32abb

@ -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))

Loading…
Cancel
Save