Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
Kivii.Biz.Finances.V2.0
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
陶然
Kivii.Biz.Finances.V2.0
Commits
382f26d5
Commit
382f26d5
authored
Apr 13, 2022
by
陶然
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增性能分析
parent
4181e7df
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
RestfulPay.cs
Src/Transforms/RestfulPay.cs
+7
-2
RestfulSettlement.cs
Src/Transforms/RestfulSettlement.cs
+3
-1
No files found.
Src/Transforms/RestfulPay.cs
View file @
382f26d5
...
...
@@ -11,7 +11,7 @@ using System.Threading.Tasks;
namespace
Kivii.Finances.Transforms
{
[
Api
(
Description
=
"
付
款登记"
)]
[
Api
(
Description
=
"
收
款登记"
)]
[
RequiresAnyRole
(
SystemRoles
.
Everyone
)]
public
class
PayPaying
:
RestfulExecution
<
Pay
>
{
...
...
@@ -51,6 +51,8 @@ namespace Kivii.Finances.Transforms
if
(
PayingMethods
.
Count
==
1
)
//单笔付款登记
{
using
(
KiviiContext
.
Profiler
(
"单个方式收款"
))
{
var
payingMethod
=
PayingMethods
[
0
];
if
(
payingMethod
.
Type
==
PayType
.
Payment
)
{
...
...
@@ -219,10 +221,13 @@ namespace Kivii.Finances.Transforms
throw
ex
;
}
}
}
return
rtns
;
}
else
//组合付款登记
{
using
(
KiviiContext
.
Profiler
(
"组合方式收款"
))
{
var
paymentKvids
=
PayingMethods
.
Where
(
o
=>
o
.
Type
==
PayType
.
Payment
).
ToList
().
ConvertAll
(
o
=>
o
.
Kvid
);
var
accountKvids
=
PayingMethods
.
Where
(
o
=>
o
.
Type
==
PayType
.
Account
).
ToList
().
ConvertAll
(
o
=>
o
.
Kvid
);
var
discountKvids
=
PayingMethods
.
Where
(
o
=>
o
.
Type
==
PayType
.
Discount
).
ToList
().
ConvertAll
(
o
=>
o
.
Kvid
);
...
...
@@ -352,7 +357,7 @@ namespace Kivii.Finances.Transforms
subTrans
.
ForEach
(
o
=>
o
?.
Rollback
());
throw
ex
;
}
}
return
rtns
;
}
}
...
...
Src/Transforms/RestfulSettlement.cs
View file @
382f26d5
...
...
@@ -62,6 +62,8 @@ namespace Kivii.Finances.Transforms
try
{
using
(
KiviiContext
.
Profiler
(
"创建结算"
))
{
foreach
(
var
item
in
Items
)
{
if
(
item
.
Amount
!=
item
.
Details
.
Sum
(
o
=>
o
.
Amount
)
||
item
.
AmountPlan
!=
item
.
Details
.
Sum
(
o
=>
o
.
AmountPlan
))
throw
new
Exception
(
"项目明细总费用和结算主体总费用不一致!"
);
...
...
@@ -120,7 +122,7 @@ namespace Kivii.Finances.Transforms
}
#
endregion
}
}
tranE
?.
Commit
();
tranF
?.
Commit
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment