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
fa3fbe94
Commit
fa3fbe94
authored
Jun 20, 2018
by
eddie.woo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
8e2726d7
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
209 additions
and
9 deletions
+209
-9
pom.xml
atms-api/pom.xml
+6
-0
InvoiceManageController.java
...axtech/atms/controller/input/InvoiceManageController.java
+38
-0
CamelPagingDto.java
.../main/java/pwc/taxtech/atms/dto/input/CamelPagingDto.java
+34
-0
CamelPagingResultDto.java
...java/pwc/taxtech/atms/dto/input/CamelPagingResultDto.java
+35
-0
InputInvoiceQueryDto.java
...java/pwc/taxtech/atms/dto/input/InputInvoiceQueryDto.java
+14
-0
InvoiceManageService.java
...n/java/pwc/taxtech/atms/service/InvoiceManageService.java
+15
-0
DistributedIDService.java
...a/pwc/taxtech/atms/service/impl/DistributedIDService.java
+27
-1
InvoiceManageServiceImpl.java
...c/taxtech/atms/service/impl/InvoiceManageServiceImpl.java
+16
-0
conf.properties
atms-api/src/main/resources/conf/conf.properties
+6
-2
conf_profile_dev.properties
atms-api/src/main/resources/conf/conf_profile_dev.properties
+6
-2
conf_profile_pub.properties
atms-api/src/main/resources/conf/conf_profile_pub.properties
+6
-2
conf_profile_staging.properties
...i/src/main/resources/conf/conf_profile_staging.properties
+6
-2
No files found.
atms-api/pom.xml
View file @
fa3fbe94
...
...
@@ -322,6 +322,12 @@
<artifactId>
mybatis-generator-maven-plugin
</artifactId>
<version>
1.3.6
</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.github.pagehelper/pagehelper -->
<dependency>
<groupId>
com.github.pagehelper
</groupId>
<artifactId>
pagehelper
</artifactId>
<version>
5.1.4
</version>
</dependency>
</dependencies>
<profiles>
...
...
atms-api/src/main/java/pwc/taxtech/atms/controller/input/InvoiceManageController.java
0 → 100644
View file @
fa3fbe94
package
pwc
.
taxtech
.
atms
.
controller
.
input
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
pwc.taxtech.atms.controller.BaseController
;
import
pwc.taxtech.atms.dto.input.CamelPagingResultDto
;
import
pwc.taxtech.atms.dto.input.InputInvoiceQueryDto
;
import
pwc.taxtech.atms.entitiy.InputInvoice
;
import
pwc.taxtech.atms.service.InvoiceManageService
;
import
java.util.List
;
@Controller
@RequestMapping
(
value
=
"api/v1/invoiceManage"
)
public
class
InvoiceManageController
extends
BaseController
{
@Autowired
private
InvoiceManageService
invoiceManageService
;
@ResponseBody
@RequestMapping
(
value
=
"getInputInvoiceList"
,
method
=
RequestMethod
.
POST
)
public
CamelPagingResultDto
<
InputInvoice
>
getInputInvoiceList
(
@RequestBody
InputInvoiceQueryDto
inputInvoiceQueryDto
)
{
//todo 参数校验
CamelPagingResultDto
resultDto
=
new
CamelPagingResultDto
();
try
{
List
<
InputInvoice
>
list
=
invoiceManageService
.
getInputInvoiceList
(
inputInvoiceQueryDto
);
resultDto
.
setList
(
list
);
//todo 业务代码
}
catch
(
Exception
e
)
{
logger
.
error
(
"getInputInvoiceList error."
,
e
);
}
return
resultDto
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/dto/input/CamelPagingDto.java
0 → 100644
View file @
fa3fbe94
package
pwc
.
taxtech
.
atms
.
dto
.
input
;
import
com.alibaba.fastjson.annotation.JSONField
;
public
class
CamelPagingDto
{
private
Integer
totalCount
;
private
Integer
pageIndex
;
private
Integer
pageSize
;
public
Integer
getTotalCount
()
{
return
totalCount
;
}
public
void
setTotalCount
(
Integer
totalCount
)
{
this
.
totalCount
=
totalCount
;
}
public
Integer
getPageIndex
()
{
return
pageIndex
;
}
public
void
setPageIndex
(
Integer
pageIndex
)
{
this
.
pageIndex
=
pageIndex
;
}
public
Integer
getPageSize
()
{
return
pageSize
;
}
public
void
setPageSize
(
Integer
pageSize
)
{
this
.
pageSize
=
pageSize
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/dto/input/CamelPagingResultDto.java
0 → 100644
View file @
fa3fbe94
package
pwc
.
taxtech
.
atms
.
dto
.
input
;
import
java.util.List
;
public
class
CamelPagingResultDto
<
T
>
{
private
List
<
T
>
list
;
private
CamelPagingDto
pageInfo
;
private
T
calculateData
;
public
List
<
T
>
getList
()
{
return
list
;
}
public
void
setList
(
List
<
T
>
list
)
{
this
.
list
=
list
;
}
public
CamelPagingDto
getPageInfo
()
{
return
pageInfo
;
}
public
void
setPageInfo
(
CamelPagingDto
pageInfo
)
{
this
.
pageInfo
=
pageInfo
;
}
public
T
getCalculateData
()
{
return
calculateData
;
}
public
void
setCalculateData
(
T
calculateData
)
{
this
.
calculateData
=
calculateData
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/dto/input/InputInvoiceQueryDto.java
0 → 100644
View file @
fa3fbe94
package
pwc
.
taxtech
.
atms
.
dto
.
input
;
public
class
InputInvoiceQueryDto
{
//todo 添加其他参数
private
CamelPagingDto
pagingDto
;
public
CamelPagingDto
getPagingDto
()
{
return
pagingDto
;
}
public
void
setPagingDto
(
CamelPagingDto
pagingDto
)
{
this
.
pagingDto
=
pagingDto
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/service/InvoiceManageService.java
0 → 100644
View file @
fa3fbe94
package
pwc
.
taxtech
.
atms
.
service
;
import
pwc.taxtech.atms.dto.input.InputInvoiceQueryDto
;
import
pwc.taxtech.atms.entitiy.InputInvoice
;
import
java.util.List
;
public
interface
InvoiceManageService
{
/**
* 条件分页查询
* @param inputInvoiceQueryDto param
* @return list
*/
List
<
InputInvoice
>
getInputInvoiceList
(
InputInvoiceQueryDto
inputInvoiceQueryDto
);
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/DistributedIDService.java
View file @
fa3fbe94
package
pwc
.
taxtech
.
atms
.
service
.
impl
;
public
class
DistributedIDService
{
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
pwc.taxtech.atms.common.util.SnowFlake
;
import
javax.annotation.PostConstruct
;
@Service
public
class
DistributedIDService
extends
BaseService
{
@Value
(
"${distributed_id_datacenter}"
)
private
Integer
dataCenterId
;
@Value
(
"${distributed_id_machine}"
)
private
Integer
machineId
;
private
SnowFlake
snowFlake
;
@PostConstruct
public
void
init
()
{
snowFlake
=
new
SnowFlake
(
dataCenterId
,
machineId
);
}
/**
* 获取ID
*
* @return long
*/
public
long
nextId
()
{
return
snowFlake
.
nextId
();
}
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/InvoiceManageServiceImpl.java
0 → 100644
View file @
fa3fbe94
package
pwc
.
taxtech
.
atms
.
service
.
impl
;
import
org.springframework.stereotype.Service
;
import
pwc.taxtech.atms.dto.input.InputInvoiceQueryDto
;
import
pwc.taxtech.atms.entitiy.InputInvoice
;
import
pwc.taxtech.atms.service.InvoiceManageService
;
import
java.util.List
;
@Service
public
class
InvoiceManageServiceImpl
extends
BaseService
implements
InvoiceManageService
{
@Override
public
List
<
InputInvoice
>
getInputInvoiceList
(
InputInvoiceQueryDto
inputInvoiceQueryDto
)
{
return
null
;
}
}
atms-api/src/main/resources/conf/conf.properties
View file @
fa3fbe94
...
...
@@ -18,4 +18,8 @@ jwt.powerToken=${jwt.powerToken}
ftp.host
=
${ftp.host}
ftp.port
=
${ftp.port}
ftp.user
=
${ftp.user}
ftp.pwd
=
${ftp.pwd}
\ No newline at end of file
ftp.pwd
=
${ftp.pwd}
#Distributed ID Generate
distributed_id_datacenter
=
${distributed_id_datacenter}
distributed_id_machine
=
${distributed_id_machine}
\ No newline at end of file
atms-api/src/main/resources/conf/conf_profile_dev.properties
View file @
fa3fbe94
...
...
@@ -17,4 +17,8 @@ jwt.powerToken=xxxx
ftp.host
=
cnshaappulv004.asia.pwcinternal.com
ftp.port
=
21
ftp.user
=
ftpuser
ftp.pwd
=
12345678
\ No newline at end of file
ftp.pwd
=
12345678
#Distributed ID Generate
distributed_id_datacenter
=
1
distributed_id_machine
=
1
\ No newline at end of file
atms-api/src/main/resources/conf/conf_profile_pub.properties
View file @
fa3fbe94
...
...
@@ -17,4 +17,8 @@ jwt.powerToken=
ftp.host
=
cnshaappulv004.asia.pwcinternal.com
ftp.port
=
21
ftp.user
=
ftpuser
ftp.pwd
=
12345678
\ No newline at end of file
ftp.pwd
=
12345678
#Distributed ID Generate
distributed_id_datacenter
=
1
distributed_id_machine
=
1
\ No newline at end of file
atms-api/src/main/resources/conf/conf_profile_staging.properties
View file @
fa3fbe94
...
...
@@ -17,4 +17,8 @@ jwt.powerToken=xxxx
ftp.host
=
cnshaappulv004.asia.pwcinternal.com
ftp.port
=
21
ftp.user
=
ftpuser
ftp.pwd
=
12345678
\ No newline at end of file
ftp.pwd
=
12345678
#Distributed ID Generate
distributed_id_datacenter
=
1
distributed_id_machine
=
1
\ No newline at end of file
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