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
88bd2194
Commit
88bd2194
authored
Sep 28, 2018
by
neo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[dev] add output page
parent
fc1f45ae
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
102 additions
and
4 deletions
+102
-4
InputInvoiceImportController.java
...taxtech/atms/controller/InputInvoiceImportController.java
+1
-2
OutputInvoice.java
.../main/java/pwc/taxtech/atms/dto/vatdto/OutputInvoice.java
+66
-0
OutputInvoiceServiceImpl.java
...xtech/atms/vat/service/impl/OutputInvoiceServiceImpl.java
+26
-0
OutputInvoiceController.java
...a/pwc/taxtech/invoice/output/OutputInvoiceController.java
+9
-2
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/InputInvoiceImportController.java
View file @
88bd2194
...
...
@@ -47,8 +47,7 @@ public class InputInvoiceImportController {
@RequestMapping
(
value
=
"inputInvoicePreviewList"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
@ResponseBody
PagingResultDto
<
InputInvoice
>
getInputInvoiceTreeViewData
(
@RequestBody
InputInvoicePreviewQueryParam
paras
,
@RequestHeader
String
from
)
{
logger
.
warn
(
"get from {}"
,
from
);
PagingResultDto
<
InputInvoice
>
getInputInvoiceTreeViewData
(
@RequestBody
InputInvoicePreviewQueryParam
paras
)
{
return
inputInvoiceDataImportService
.
getInputInvoiceTreeViewData
(
paras
);
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/dto/vatdto/OutputInvoice.java
0 → 100644
View file @
88bd2194
package
pwc
.
taxtech
.
atms
.
dto
.
vatdto
;
import
lombok.Getter
;
import
lombok.Setter
;
@Getter
@Setter
public
class
OutputInvoice
{
private
String
id
;
private
String
fpqqlsh
;
private
String
fpdm
;
private
String
fphm
;
private
String
kprq
;
private
String
fplxdm
;
private
String
ewm
;
private
String
jqbh
;
private
String
jym
;
private
String
gfmc
;
private
String
gfsh
;
private
String
gfdzdh
;
private
String
gfyhzh
;
private
String
xfsh
;
private
String
xfmc
;
private
String
xfdzdh
;
private
String
xfyhzh
;
private
String
bz
;
private
String
skr
;
private
String
fhr
;
private
String
kpr
;
private
String
kddh
;
private
String
kduuid
;
private
String
fplx
;
private
String
kpzt
;
private
String
fpzt
;
private
String
yfpdm
;
private
String
yfphm
;
private
String
gfgsbm
;
private
String
xfgsbm
;
private
String
spbh
;
private
String
xtly
;
private
String
cjsj
;
private
String
hjje
;
private
String
hjse
;
private
String
jshj
;
private
String
xxbbh
;
private
String
dyzt
;
private
String
gdjlh
;
private
String
zkje
;
private
String
zkse
;
private
String
zkjshj
;
private
String
slv
;
private
String
qy
;
private
String
jszt
;
private
String
kdgs
;
private
String
shzt
;
private
String
thkpsq
;
private
String
jsfj
;
private
String
sqr
;
private
String
bscdm
;
private
String
bsc
;
private
String
qydm
;
private
String
sqbh
;
private
String
htbh
;
private
String
sqrq
;
private
String
yzrq
;
}
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/OutputInvoiceServiceImpl.java
View file @
88bd2194
package
pwc
.
taxtech
.
atms
.
vat
.
service
.
impl
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.TypeReference
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.http.client.methods.CloseableHttpResponse
;
import
org.apache.http.client.methods.HttpGet
;
import
org.apache.http.impl.client.CloseableHttpClient
;
import
org.apache.http.impl.client.HttpClients
;
import
org.apache.http.util.EntityUtils
;
import
org.apache.ibatis.jdbc.ScriptRunner
;
import
org.apache.ibatis.session.SqlSession
;
import
org.mybatis.spring.SqlSessionTemplate
;
...
...
@@ -13,6 +20,8 @@ import pwc.taxtech.atms.constant.enums.EnumTbImportType;
import
pwc.taxtech.atms.dpo.PagingResultDto
;
import
pwc.taxtech.atms.dto.OperationResultDto
;
import
pwc.taxtech.atms.dto.vatdto.ImportOutputInvoiceDto
;
import
pwc.taxtech.atms.dto.vatdto.InputInvoice
;
import
pwc.taxtech.atms.dto.vatdto.OutputInvoice
;
import
pwc.taxtech.atms.dto.vatdto.QueryEvidenceDto
;
import
pwc.taxtech.atms.vat.dao.ImportFileMapper
;
import
pwc.taxtech.atms.vat.dpo.OutputVATInvoiceInfoDto
;
...
...
@@ -23,6 +32,7 @@ import pwc.taxtech.atms.vat.entity.OutputVatInvoiceExample;
import
pwc.taxtech.atms.vat.entity.OutputVatInvoiceItem
;
import
pwc.taxtech.atms.vat.entity.OutputVatInvoiceItemExample
;
import
java.io.IOException
;
import
java.io.StringReader
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
...
...
@@ -57,6 +67,22 @@ public class OutputInvoiceServiceImpl extends VatAbstractService {
return
qResult
;
}
private
PagingResultDto
<
OutputInvoice
>
get
(
String
code
,
int
period
,
int
page
,
int
size
)
{
PagingResultDto
<
OutputInvoice
>
pageInput
=
null
;
try
(
CloseableHttpClient
httpclient
=
HttpClients
.
createDefault
();)
{
HttpGet
httpget
=
new
HttpGet
(
"http://localhost:8089/output_invoices?page="
+
page
+
"&size="
+
size
+
"&code="
+
code
+
"&period="
+
period
);
try
(
CloseableHttpResponse
response
=
httpclient
.
execute
(
httpget
))
{
String
inputStr
=
EntityUtils
.
toString
(
response
.
getEntity
());
pageInput
=
JSONObject
.
parseObject
(
inputStr
,
new
TypeReference
<
PagingResultDto
<
OutputInvoice
>>()
{
}.
getType
());
}
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
return
pageInput
;
}
public
OperationResultDto
<
List
<
OutputVATInvoiceInfoDto
>>
getExportOutputInvoiceList
(
QueryOutputDto
queryDto
)
{
OperationResultDto
<
List
<
OutputVATInvoiceInfoDto
>>
result
=
new
OperationResultDto
<>();
List
<
OutputVATInvoiceInfoDto
>
finalList
=
getQueryList
(
queryDto
);
...
...
atms-invoice/src/main/java/pwc/taxtech/invoice/output/OutputInvoiceController.java
View file @
88bd2194
...
...
@@ -6,6 +6,8 @@ import org.springframework.data.domain.PageRequest;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
pwc.taxtech.invoice.common.PagingDto
;
import
pwc.taxtech.invoice.common.PagingResultDto
;
import
static
org
.
springframework
.
web
.
bind
.
annotation
.
RequestMethod
.
GET
;
...
...
@@ -16,7 +18,12 @@ public class OutputInvoiceController {
OutputInvoiceRepository
repository
;
@RequestMapping
(
method
=
GET
)
public
Page
<
OutputInvoice
>
getAll
(
@RequestParam
(
defaultValue
=
"0"
)
int
page
,
@RequestParam
(
defaultValue
=
"20"
)
int
size
)
{
return
repository
.
findAll
(
PageRequest
.
of
(
page
,
size
));
public
PagingResultDto
<
OutputInvoice
>
getAll
(
@RequestParam
(
defaultValue
=
"0"
)
int
page
,
@RequestParam
(
defaultValue
=
"20"
)
int
size
)
{
if
(
page
<
0
)
page
=
0
;
Page
<
OutputInvoice
>
pageResult
=
repository
.
findAll
(
PageRequest
.
of
(
page
-
1
,
size
));
PagingResultDto
<
OutputInvoice
>
pageReturn
=
new
PagingResultDto
();
pageReturn
.
setList
(
pageResult
.
getContent
());
pageReturn
.
setPageInfo
(
new
PagingDto
(
pageResult
.
getTotalPages
(),
pageResult
.
getPageable
().
getPageNumber
(),
pageResult
.
getPageable
().
getPageSize
()));
return
pageReturn
;
}
}
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