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
a601b30a
Commit
a601b30a
authored
Mar 14, 2022
by
陶然
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化查询接口所属信息
parent
9414e60e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
RestfulPayment.Split.cs
Src/Transforms/RestfulPayment.Split.cs
+4
-3
RestfulPayment.cs
Src/Transforms/RestfulPayment.cs
+9
-0
No files found.
Src/Transforms/RestfulPayment.Split.cs
View file @
a601b30a
...
...
@@ -11,9 +11,10 @@ namespace Kivii.Finances.Transforms
{
public
enum
OwnerType
{
Department
=
0
,
Organization
=
1
,
Member
=
2
Unsupport
=
0
,
Department
=
1
,
Organization
=
2
,
Member
=
3
}
[
Api
(
Description
=
"业务认领"
)]
...
...
Src/Transforms/RestfulPayment.cs
View file @
a601b30a
...
...
@@ -38,6 +38,8 @@ namespace Kivii.Finances.Transforms
#
endregion
public
OwnerType
OwnerType
{
get
;
set
;
}
=
OwnerType
.
Unsupport
;
public
bool
?
IsPayee
{
get
;
set
;
}
//查收款还是付款
public
bool
?
IsSplit
{
get
;
set
;
}
//查是否已经拆分认领
...
...
@@ -52,6 +54,9 @@ namespace Kivii.Finances.Transforms
request
=
request
.
PopulateWith
(
this
);
var
sqlExpress
=
autoQuery
.
CreateQuery
(
Request
,
conn
,
request
,
dynamicParams
);
sqlExpress
.
Where
(
o
=>
o
.
OffsetKvid
==
Guid
.
Empty
&&
Sql
.
In
(
o
.
Type
,
PaymentType
.
AliPay
,
PaymentType
.
WeChat
,
PaymentType
.
Bank
,
PaymentType
.
Cash
,
PaymentType
.
Pos
));
if
(
OwnerType
==
OwnerType
.
Organization
)
sqlExpress
.
And
(
o
=>
o
.
OwnerKvid
==
KiviiContext
.
CurrentMember
.
OrganizationKvid
||
o
.
OwnerKvid
==
Guid
.
Empty
);
if
(
OwnerType
==
OwnerType
.
Department
)
sqlExpress
.
And
(
o
=>
o
.
OwnerKvid
==
KiviiContext
.
CurrentMember
.
DepartmentKvid
||
o
.
OwnerKvid
==
Guid
.
Empty
);
if
(
OwnerType
==
OwnerType
.
Member
)
sqlExpress
.
And
(
o
=>
o
.
OwnerKvid
==
KiviiContext
.
CurrentMember
.
Kvid
||
o
.
OwnerKvid
==
Guid
.
Empty
);
if
(
IsSplit
!=
null
)
{
if
(
IsSplit
.
Value
)
sqlExpress
.
And
(
o
=>
o
.
AmountSplited
>
0
&&
o
.
AmountSplited
==
o
.
Amount
);
...
...
@@ -271,6 +276,7 @@ namespace Kivii.Finances.Transforms
public
string
QueryValues
{
get
;
set
;
}
#
endregion
public
OwnerType
OwnerType
{
get
;
set
;
}
=
OwnerType
.
Unsupport
;
public
bool
?
IsBiz
{
get
;
set
;
}
//Split,Pos,Cash,WeChat..
public
override
object
OnExecution
(
IRequest
req
,
IResponse
res
)
...
...
@@ -282,6 +288,9 @@ namespace Kivii.Finances.Transforms
var
request
=
new
RestfulQuery
<
Payment
>();
request
=
request
.
PopulateWith
(
this
);
var
sqlExpress
=
autoQuery
.
CreateQuery
(
Request
,
conn
,
request
,
dynamicParams
);
if
(
OwnerType
==
OwnerType
.
Organization
)
sqlExpress
.
And
(
o
=>
o
.
OwnerKvid
==
KiviiContext
.
CurrentMember
.
OrganizationKvid
||
o
.
OwnerKvid
==
Guid
.
Empty
);
if
(
OwnerType
==
OwnerType
.
Department
)
sqlExpress
.
And
(
o
=>
o
.
OwnerKvid
==
KiviiContext
.
CurrentMember
.
DepartmentKvid
||
o
.
OwnerKvid
==
Guid
.
Empty
);
if
(
OwnerType
==
OwnerType
.
Member
)
sqlExpress
.
And
(
o
=>
o
.
OwnerKvid
==
KiviiContext
.
CurrentMember
.
Kvid
||
o
.
OwnerKvid
==
Guid
.
Empty
);
if
(
IsBiz
==
null
)
sqlExpress
.
Where
(
o
=>
o
.
OffsetKvid
==
Guid
.
Empty
&&
Sql
.
In
(
o
.
Type
,
PaymentType
.
WeChat
,
PaymentType
.
Cash
,
PaymentType
.
AliPay
,
PaymentType
.
Pos
,
PaymentType
.
Split
,
PaymentType
.
Refund
,
PaymentType
.
UnBiz
));
else
if
(
IsBiz
.
Value
)
sqlExpress
.
Where
(
o
=>
o
.
OffsetKvid
==
Guid
.
Empty
&&
Sql
.
In
(
o
.
Type
,
PaymentType
.
WeChat
,
PaymentType
.
Cash
,
PaymentType
.
AliPay
,
PaymentType
.
Pos
,
PaymentType
.
Split
));
else
sqlExpress
.
Where
(
o
=>
o
.
OffsetKvid
==
Guid
.
Empty
&&
Sql
.
In
(
o
.
Type
,
PaymentType
.
Refund
,
PaymentType
.
UnBiz
));
...
...
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