Commit 3946dc4a by 陶然

优化

parent 25009ce4
......@@ -31,14 +31,14 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Kivii.Common.V4.5, Version=5.6.2022.4000, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Kivii.Common.5.6.2022.4000\lib\net45\Kivii.Common.V4.5.dll</HintPath>
<Reference Include="Kivii.Common.V4.5, Version=5.6.2022.4020, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Kivii.Common.5.6.2022.4020\lib\net45\Kivii.Common.V4.5.dll</HintPath>
</Reference>
<Reference Include="Kivii.Core.V4.5, Version=5.6.2022.4000, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Kivii.Core.5.6.2022.4000\lib\net45\Kivii.Core.V4.5.dll</HintPath>
</Reference>
<Reference Include="Kivii.Linq.V4.5, Version=5.6.2022.4011, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Kivii.Linq.5.6.2022.4011\lib\net45\Kivii.Linq.V4.5.dll</HintPath>
<Reference Include="Kivii.Linq.V4.5, Version=5.6.2022.4020, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Kivii.Linq.5.6.2022.4021\lib\net45\Kivii.Linq.V4.5.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
......
......@@ -25,7 +25,7 @@ namespace Kivii.Finances.Transforms
var settlements = connF.Select<Settlement>(o => Sql.In(o.Kvid, Kvids));
(settlements.Count != Kvids.Count).ThrowIfTrue("所选结算和查询结果不一致!");
settlements.Exists(o => o.OffsetKvid != Guid.Empty).ThrowIfTrue("存在已作废结算,无法重复作废");
settlements.Exists(o => o.AmountPayment != o.Amount).ThrowIfTrue("作废错误:作废的结算中包含未收款的结算!");
settlements.Exists(o => o.AmountPayment <= 0).ThrowIfTrue("作废错误:作废的结算中包含未收款的结算!");
//connF.Exists<Settlement>(o => o.AmountPayment != o.Amount && Sql.In(o.Kvid, Kvids)).ThrowIfTrue("作废错误:作废的结算中包含未收款的结算!");
////如果泛型类型不是Settlement本身就需要判断
//if (typeof(G) != typeof(Settlement)) connE.Exists<EntitySettlement<G>>(o => o.AmountPayment != o.Amount && Sql.In(o.Kvid, Kvids)).ThrowIfTrue("作废错误:作废的结算中包含未收款的结算!");
......
......@@ -291,7 +291,7 @@ namespace Kivii.Finances.Transforms
if (IsPayed != null)
{
if (IsPayed.Value) sqlExpress.And(o => o.AmountPayment == o.Amount);
else sqlExpress.And(o => o.AmountPayment < o.Amount || o.AmountPayment == 0);
else sqlExpress.And(o => o.AmountPayment < o.Amount || o.AmountPayment <= 0);
}
if (IsBilled != null)
{
......
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Kivii.Common" version="5.6.2022.4000" targetFramework="net45" />
<package id="Kivii.Common" version="5.6.2022.4020" targetFramework="net45" />
<package id="Kivii.Core" version="5.6.2022.4000" targetFramework="net45" />
<package id="Kivii.Linq" version="5.6.2022.4011" targetFramework="net45" />
<package id="Kivii.Linq" version="5.6.2022.4021" targetFramework="net45" />
</packages>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment