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
31918b3c
Commit
31918b3c
authored
Jan 05, 2023
by
陶然
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化接口
parent
29ccb808
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
RestfulPayment.Offset.cs
Src/Transforms/RestfulPayment.Offset.cs
+9
-1
No files found.
Src/Transforms/RestfulPayment.Offset.cs
View file @
31918b3c
...
@@ -153,7 +153,7 @@ namespace Kivii.Finances.Transforms
...
@@ -153,7 +153,7 @@ namespace Kivii.Finances.Transforms
(
payments
.
Exists
(
o
=>
o
.
OffsetKvid
==
Guid
.
Empty
)).
ThrowIfTrue
(
"收付款未冲账,无需撤销"
);
(
payments
.
Exists
(
o
=>
o
.
OffsetKvid
==
Guid
.
Empty
)).
ThrowIfTrue
(
"收付款未冲账,无需撤销"
);
//(payments.Exists(o => o.PayeeAccountKvid == Guid.Empty)).ThrowIfTrue("收款账户(PayeeAccountKvid)为空!");
//(payments.Exists(o => o.PayeeAccountKvid == Guid.Empty)).ThrowIfTrue("收款账户(PayeeAccountKvid)为空!");
(
payments
.
Exists
(
o
=>
o
.
PayerAccountKvid
==
Guid
.
Empty
)).
ThrowIfTrue
(
"付款账户(PayerAccountKvid)为空!"
);
(
payments
.
Exists
(
o
=>
o
.
PayerAccountKvid
==
Guid
.
Empty
)).
ThrowIfTrue
(
"付款账户(PayerAccountKvid)为空!"
);
var
offsetPayments
=
conn
.
Select
<
Payment
>(
o
=>
Sql
.
In
(
o
.
OffsetKvid
,
payments
.
ConvertAll
(
p
=>
p
.
Kvid
)));
var
allAccountDetails
=
new
List
<
AccountDetail
>();
var
allAccountDetails
=
new
List
<
AccountDetail
>();
var
allAcceptPayments
=
new
List
<
Payment
>();
var
allAcceptPayments
=
new
List
<
Payment
>();
var
allAcceptPays
=
new
List
<
Pay
>();
var
allAcceptPays
=
new
List
<
Pay
>();
...
@@ -192,6 +192,14 @@ namespace Kivii.Finances.Transforms
...
@@ -192,6 +192,14 @@ namespace Kivii.Finances.Transforms
conn
.
Insert
(
item
);
conn
.
Insert
(
item
);
}
}
}
}
if
(!
offsetPayments
.
IsNullOrEmpty
())
{
//删除offsetPayments的数据
var
updateOffsetPayments
=
conn
.
From
<
Payment
>();
updateOffsetPayments
=
updateOffsetPayments
.
Update
(
o
=>
o
.
Status
);
updateOffsetPayments
=
updateOffsetPayments
.
Where
(
o
=>
Sql
.
In
(
o
.
Kvid
,
offsetPayments
.
ConvertAll
(
p
=>
p
.
Kvid
)));
conn
.
UpdateOnly
<
Payment
>(
new
Payment
{
Status
=
-
1
},
updateOffsetPayments
);
}
trans
.
Commit
();
trans
.
Commit
();
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
...
...
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