CTU出库修改

master
1 year ago
parent d84c6017da
commit 9ccc6f1698

@ -2186,12 +2186,32 @@ namespace Khd.Core.Wcs.Wcs
{ {
if (index == 1) if (index == 1)
{ {
bill = bill.OrderBy(t => t.a.locRow).ThenBy(t => t.a.locColumn).ToList(); 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)
.ToList();
}
else
{
bill = bill.OrderBy(t => t.a.locRow).ThenBy(t => t.a.locColumn)
.OrderByDescending(t => t.b.totalAmount - t.b.frozenAmount);
}
index = 2; index = 2;
} }
else else
{ {
bill = bill.OrderByDescending(t => t.a.locRow).ThenBy(t => t.a.locColumn).ToList(); 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)
.ToList();
}
else
{
bill = bill.OrderByDescending(t => t.a.locRow).ThenBy(t => t.a.locColumn)
.OrderByDescending(t => t.b.totalAmount - t.b.frozenAmount);
}
index = 1; index = 1;
} }
} }
@ -2200,15 +2220,36 @@ namespace Khd.Core.Wcs.Wcs
bill = bill.OrderByDescending(t => t.a.locRow).ThenBy(t => t.a.locColumn).ToList(); bill = bill.OrderByDescending(t => t.a.locRow).ThenBy(t => t.a.locColumn).ToList();
if (index == 1) if (index == 1)
{ {
bill = bill.OrderByDescending(t => t.a.locRow).ThenBy(t => t.a.locColumn).ToList(); 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)
.ToList();
}
else
{
bill = bill.OrderByDescending(t => t.a.locRow).ThenBy(t => t.a.locColumn)
.OrderByDescending(t => t.b.totalAmount - t.b.frozenAmount);
}
index = 2; index = 2;
} }
else else
{ {
bill = bill.OrderBy(t => t.a.locRow).ThenBy(t => t.a.locColumn).ToList(); 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)
.ToList();
}
else
{
bill = bill.OrderBy(t => t.a.locRow).ThenBy(t => t.a.locColumn)
.OrderByDescending(t => t.b.totalAmount - t.b.frozenAmount);
}
index = 1; index = 1;
} }
} }
BaseEquip ctuEquip = StaticData.BaseEquip.First(t => t.objid == 11); BaseEquip ctuEquip = StaticData.BaseEquip.First(t => t.objid == 11);
BaseEquip lineEquip = StaticData.BaseEquip.First(t => t.objid == 20); BaseEquip lineEquip = StaticData.BaseEquip.First(t => t.objid == 20);
foreach (var b in bill) foreach (var b in bill)

Loading…
Cancel
Save