Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
traffic-front
Project
Project
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxiaoming
traffic-front
Commits
b890e51c
Commit
b890e51c
authored
Sep 28, 2018
by
neo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[dev] user pageImpl to deserliazer
parent
5c36f7f5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
InputInvoiceImportController.java
...taxtech/atms/controller/InputInvoiceImportController.java
+1
-0
InputInvoiceDataImportServiceImpl.java
...s/vat/service/impl/InputInvoiceDataImportServiceImpl.java
+4
-3
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/InputInvoiceImportController.java
View file @
b890e51c
...
...
@@ -46,6 +46,7 @@ public class InputInvoiceImportController {
public
@ResponseBody
Page
<
InputInvoice
>
getInputInvoiceTreeViewData
(
@RequestBody
InputInvoicePreviewQueryParam
paras
)
{
Page
<
InputInvoice
>
result
=
inputInvoiceDataImportService
.
getInputInvoiceTreeViewData
(
paras
);
if
(
result
==
null
)
return
Page
.
empty
();
return
result
;
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/InputInvoiceDataImportServiceImpl.java
View file @
b890e51c
...
...
@@ -12,6 +12,7 @@ import org.apache.ibatis.session.SqlSession;
import
org.mybatis.spring.SqlSessionTemplate
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.stereotype.Service
;
import
pwc.taxtech.atms.constant.enums.EnumTbImportType
;
import
pwc.taxtech.atms.constant.enums.EnumValidationType
;
...
...
@@ -46,19 +47,19 @@ public class InputInvoiceDataImportServiceImpl extends VatAbstractService {
}
private
Page
<
InputInvoice
>
get
(
String
code
,
int
period
,
int
page
,
int
size
)
{
Page
<
InputInvoice
>
pageInput
=
Page
.
empty
()
;
Page
Impl
<
InputInvoice
>
pageInput
;
try
(
CloseableHttpClient
httpclient
=
HttpClients
.
createDefault
();)
{
HttpGet
httpget
=
new
HttpGet
(
"http://localhost:8089/input_invoices?page="
+
page
+
"&size="
+
size
+
"&code="
+
code
+
"&period="
+
period
);
try
(
CloseableHttpResponse
response
=
httpclient
.
execute
(
httpget
))
{
String
inputStr
=
EntityUtils
.
toString
(
response
.
getEntity
());
pageInput
=
new
Gson
().
fromJson
(
inputStr
,
new
TypeReference
<
Page
<
InputInvoice
>>()
{
pageInput
=
new
Gson
().
fromJson
(
inputStr
,
new
TypeReference
<
Page
Impl
<
InputInvoice
>>()
{
}.
getType
());
}
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
return
pageInput
;
return
null
;
}
...
...
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