From f31843d8103ad4cc7bc339443e896d45561be7e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83?= <15095123350@163.com> Date: Tue, 15 Oct 2024 10:12:20 +0800 Subject: [PATCH] 1 --- src/Khd.Core.Wcs/Wcs/CreateTaskByRecord.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Khd.Core.Wcs/Wcs/CreateTaskByRecord.cs b/src/Khd.Core.Wcs/Wcs/CreateTaskByRecord.cs index 0ff3491..7f670cb 100644 --- a/src/Khd.Core.Wcs/Wcs/CreateTaskByRecord.cs +++ b/src/Khd.Core.Wcs/Wcs/CreateTaskByRecord.cs @@ -2186,9 +2186,10 @@ namespace Khd.Core.Wcs.Wcs { if (index == 1) { - if (bill.Where(t => t.b.totalAmount - t.b.frozenAmount > needNumber).Any()) + if (bill.Where(t => t.b.totalAmount - t.b.frozenAmount >= needNumber).Any()) { bill = bill.OrderBy(t => t.a.locRow).ThenBy(t => t.a.locColumn) + .Where(t => t.b.totalAmount - t.b.frozenAmount >= needNumber) .OrderBy(t => t.b.totalAmount - t.b.frozenAmount) .ToList(); } @@ -2201,10 +2202,11 @@ namespace Khd.Core.Wcs.Wcs } else { - if (bill.Where(t => t.b.totalAmount - t.b.frozenAmount > needNumber).Any()) + if (bill.Where(t => t.b.totalAmount - t.b.frozenAmount >= needNumber).Any()) { bill = bill.OrderByDescending(t => t.a.locRow).ThenBy(t => t.a.locColumn) .OrderBy(t => t.b.totalAmount - t.b.frozenAmount) + .Where(t => t.b.totalAmount - t.b.frozenAmount >= needNumber) .ToList(); } else @@ -2220,10 +2222,11 @@ namespace Khd.Core.Wcs.Wcs bill = bill.OrderByDescending(t => t.a.locRow).ThenBy(t => t.a.locColumn).ToList(); if (index == 1) { - if (bill.Where(t => t.b.totalAmount - t.b.frozenAmount > needNumber).Any()) + if (bill.Where(t => t.b.totalAmount - t.b.frozenAmount >= needNumber).Any()) { bill = bill.OrderByDescending(t => t.a.locRow).ThenBy(t => t.a.locColumn) .OrderBy(t => t.b.totalAmount - t.b.frozenAmount) + .Where(t => t.b.totalAmount - t.b.frozenAmount >= needNumber) .ToList(); } else @@ -2235,10 +2238,11 @@ namespace Khd.Core.Wcs.Wcs } else { - if (bill.Where(t => t.b.totalAmount - t.b.frozenAmount > needNumber).Any()) + if (bill.Where(t => t.b.totalAmount - t.b.frozenAmount >= needNumber).Any()) { bill = bill.OrderBy(t => t.a.locRow).ThenBy(t => t.a.locColumn) .OrderBy(t => t.b.totalAmount - t.b.frozenAmount) + .Where(t => t.b.totalAmount - t.b.frozenAmount >= needNumber) .ToList(); } else