Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
Kivii.Domain.Contents
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.Domain.Contents
Commits
753e3fa2
Commit
753e3fa2
authored
Nov 10, 2022
by
仙女 小
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接口添加筛选条件
parent
157637f5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
Kivii.Domain.Contents.dll
Kivii's Dlls/Kivii.Domain.Contents.dll
+0
-0
RestfulReport.cs
Src/Transforms/RestfulReport.cs
+4
-3
No files found.
Kivii's Dlls/Kivii.Domain.Contents.dll
View file @
753e3fa2
No preview for this file type
Src/Transforms/RestfulReport.cs
View file @
753e3fa2
...
@@ -15,14 +15,15 @@ namespace Kivii.Domain.Contents.Transforms
...
@@ -15,14 +15,15 @@ namespace Kivii.Domain.Contents.Transforms
public
string
VerificationCode
{
get
;
set
;
}
public
string
VerificationCode
{
get
;
set
;
}
public
override
object
OnExecution
(
IRequest
req
,
IResponse
res
)
public
override
object
OnExecution
(
IRequest
req
,
IResponse
res
)
{
{
(
ReportId
.
IsNullOrEmpty
()
||
VerificationCode
.
IsNullOrEmpty
()).
ThrowIfTrue
(
"未传入报告号和验证码信息!"
);
var
conn
=
KiviiContext
.
GetOpenedDbConnection
<
Report
>();
var
conn
=
KiviiContext
.
GetOpenedDbConnection
<
Report
>();
var
queryReport
=
conn
.
From
<
Report
>();
var
queryReport
=
conn
.
From
<
Report
>();
queryReport
.
Where
(
o
=>
o
.
ReportId
==
ReportId
&&
o
.
TypeEx
!=
"J"
);
queryReport
.
Where
(
o
=>
o
.
ReportId
==
ReportId
&&
o
.
TypeEx
!=
"J"
&&
o
.
Status
==
int
.
MaxValue
);
var
report
=
conn
.
Select
(
queryReport
).
FirstOrDefault
();
var
report
=
conn
.
Select
(
queryReport
).
FirstOrDefault
();
(
report
==
null
).
ThrowIfTrue
(
"未查询到报告!请重新核对报告号信息."
);
(
report
==
null
).
ThrowIfTrue
(
"未查询到报告!请重新核对报告号信息."
);
var
code
=
report
.
Kvid
.
ToString
();
var
code
=
report
.
Kvid
.
ToString
();
code
=
code
.
Substring
(
code
.
Length
-
4
,
4
);
code
=
code
.
Substring
(
code
.
Length
-
4
,
4
)
.
ToLower
()
;
(
code
!=
VerificationCode
).
ThrowIfTrue
(
"验证码匹配失败!请重新核对验证码信息."
);
(
code
!=
VerificationCode
.
ToLower
()
).
ThrowIfTrue
(
"验证码匹配失败!请重新核对验证码信息."
);
var
rtns
=
new
RestfulQueryResponse
<
Report
>();
var
rtns
=
new
RestfulQueryResponse
<
Report
>();
rtns
.
Results
=
new
List
<
Report
>();
rtns
.
Results
=
new
List
<
Report
>();
rtns
.
Results
.
Add
(
report
);
rtns
.
Results
.
Add
(
report
);
...
...
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