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
a8ebb8bb
Commit
a8ebb8bb
authored
Jun 22, 2018
by
ken.q.you
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ken 发票导出
parent
fd860975
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
128 additions
and
69 deletions
+128
-69
.gitignore
.gitignore
+1
-0
mysql-connector-java-5.1.41.jar
atms-api/etc/generator/mysql-connector-java-5.1.41.jar
+0
-0
vatGeneratorConfig.xml
atms-api/etc/generator/vatGeneratorConfig.xml
+0
-0
vat_run.bat
atms-api/etc/generator/vat_run.bat
+0
-0
AppCachePool.java
atms-api/src/main/java/pwc/taxtech/atms/AppCachePool.java
+0
-0
InputInvoiceImportController.java
...taxtech/atms/controller/InputInvoiceImportController.java
+0
-0
InvoiceManageController.java
...axtech/atms/controller/input/InvoiceManageController.java
+12
-1
CamelPagingResultDto.java
...java/pwc/taxtech/atms/dto/input/CamelPagingResultDto.java
+9
-1
InputInvoiceQueryDto.java
...java/pwc/taxtech/atms/dto/input/InputInvoiceQueryDto.java
+64
-47
InvoiceManageService.java
...n/java/pwc/taxtech/atms/service/InvoiceManageService.java
+11
-0
InvoiceManageServiceImpl.java
...c/taxtech/atms/service/impl/InvoiceManageServiceImpl.java
+31
-20
No files found.
.gitignore
View file @
a8ebb8bb
...
...
@@ -10,3 +10,4 @@ rebel.xml
/atms-web/src/main/webapp/node_modules
**/*.iml
**/.idea/
/bin/
atms-api/etc/generator/mysql-connector-java-5.1.41.jar
deleted
100644 → 0
View file @
fd860975
File deleted
atms-api/etc/generator/vatGeneratorConfig.xml
View file @
a8ebb8bb
atms-api/etc/generator/vat_run.bat
View file @
a8ebb8bb
atms-api/src/main/java/pwc/taxtech/atms/AppCachePool.java
View file @
a8ebb8bb
atms-api/src/main/java/pwc/taxtech/atms/controller/InputInvoiceImportController.java
View file @
a8ebb8bb
atms-api/src/main/java/pwc/taxtech/atms/controller/input/InvoiceManageController.java
View file @
a8ebb8bb
...
...
@@ -9,6 +9,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
import
com.github.pagehelper.PageHelper
;
import
io.swagger.annotations.ApiOperation
;
import
pwc.taxtech.atms.controller.BaseController
;
import
pwc.taxtech.atms.dto.OperationResultDto
;
import
pwc.taxtech.atms.dto.input.CamelPagingDto
;
...
...
@@ -27,13 +28,14 @@ public class InvoiceManageController extends BaseController {
@Autowired
private
InvoiceManageService
invoiceManageService
;
@ApiOperation
(
value
=
"查询所有发票"
)
@ResponseBody
@RequestMapping
(
value
=
"getInputInvoiceList"
,
method
=
RequestMethod
.
POST
)
public
CamelPagingResultDto
<
InputInvoice
>
getInputInvoiceList
(
@RequestBody
InputInvoiceQueryDto
inputInvoiceQueryDto
)
{
CamelPagingResultDto
<
InputInvoice
>
resultDto
=
new
CamelPagingResultDto
<
InputInvoice
>();
try
{
CamelPagingDto
camelPagingDto
=
inputInvoiceQueryDto
.
getPagingDto
()==
null
?
new
CamelPagingDto
():
inputInvoiceQueryDto
.
getPagingDto
();
resultDto
=
invoiceManageService
.
getInputInvoiceList
(
inputInvoiceQueryDto
);
//todo 业务代码
}
catch
(
Exception
e
)
{
...
...
@@ -42,4 +44,13 @@ public class InvoiceManageController extends BaseController {
return
resultDto
;
}
@ApiOperation
(
value
=
"导出所有关联发票"
)
@ResponseBody
@RequestMapping
(
value
=
"exportInvoiceAllInfoList"
,
method
=
RequestMethod
.
POST
)
public
String
exportInvoiceAllInfoList
(
@RequestBody
InputInvoiceQueryDto
inputInvoiceQueryDto
,
String
filename
)
{
String
filePath
=
invoiceManageService
.
exportInvoiceAllInfoList
(
inputInvoiceQueryDto
,
inputInvoiceQueryDto
.
getPagingDto
(),
filename
);
return
null
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/dto/input/CamelPagingResultDto.java
View file @
a8ebb8bb
...
...
@@ -2,13 +2,21 @@ package pwc.taxtech.atms.dto.input;
import
java.util.List
;
import
com.alibaba.fastjson.annotation.JSONField
;
public
class
CamelPagingResultDto
<
T
>
{
@JSONField
(
name
=
"List"
)
private
List
<
T
>
list
;
@JSONField
(
name
=
"PageInfo"
)
private
CamelPagingDto
pageInfo
;
private
T
calculateData
;
public
CamelPagingResultDto
()
{
super
();
}
public
List
<
T
>
getList
()
{
return
list
;
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/dto/input/InputInvoiceQueryDto.java
View file @
a8ebb8bb
...
...
@@ -20,48 +20,28 @@ public class InputInvoiceQueryDto {
//发票类型
private
Integer
invoiceType
;
//开票日期范围
private
Date
invoiceDate
;
private
Date
invoiceDateForm
;
private
Date
invoiceDateTo
;
//上传日期范围
private
Date
uploadDate
;
private
Date
uploadDateForm
;
private
Date
uploadDateTo
;
//票面金额范围
private
BigDecimal
amount
;
private
BigDecimal
amountForm
;
private
BigDecimal
amountTo
;
//发票实体
private
Integer
invoiceEntityType
;
//发票来源
private
Integer
invoiceSourceType
;
//验真分类
private
Integer
verifyType
;
//创建者
private
String
staffId
;
private
String
createBy
;
//序列号
private
String
serialNo
;
// private String buyerAddress;
//
// private String buyerBankAccountNumber;
//
// private String buyerName;
//
// private String buyerPhone;
//
// private String buyerTaxNumber;
//
// private String checkCode;
//
// private String createBy;
//
// private Date createTime;
@Override
public
String
toString
()
{
return
"InputInvoiceQueryDto [buyerBankName="
+
buyerBankName
+
", sellerName="
+
sellerName
+
", invoiceNumber="
+
invoiceNumber
+
", status="
+
status
+
", uploadType="
+
uploadType
+
", invoiceType="
+
invoiceType
+
", invoiceDate="
+
invoiceDate
+
", uploadDate="
+
uploadDate
+
", amount="
+
amount
+
", invoiceEntityType="
+
invoiceEntityType
+
", invoiceSourceType="
+
invoiceSourceType
+
", staffId="
+
staffId
+
", serialNo="
+
serialNo
+
", pagingDto="
+
pagingDto
+
"]"
;
}
private
CamelPagingDto
pagingDto
;
...
...
@@ -122,28 +102,71 @@ public class InputInvoiceQueryDto {
this
.
invoiceType
=
invoiceType
;
}
public
Date
getInvoiceDate
()
{
return
invoiceDate
;
public
Date
getInvoiceDateForm
()
{
return
invoiceDateForm
;
}
public
void
setInvoiceDateForm
(
Date
invoiceDateForm
)
{
this
.
invoiceDateForm
=
invoiceDateForm
;
}
public
Date
getInvoiceDateTo
()
{
return
invoiceDateTo
;
}
public
void
setInvoiceDateTo
(
Date
invoiceDateTo
)
{
this
.
invoiceDateTo
=
invoiceDateTo
;
}
public
Date
getUploadDateForm
()
{
return
uploadDateForm
;
}
public
void
set
InvoiceDate
(
Date
invoiceDate
)
{
this
.
invoiceDate
=
invoiceDate
;
public
void
set
UploadDateForm
(
Date
uploadDateForm
)
{
this
.
uploadDateForm
=
uploadDateForm
;
}
public
Date
getUploadDate
()
{
return
uploadDate
;
public
Date
getUploadDate
To
()
{
return
uploadDate
To
;
}
public
void
setUploadDate
(
Date
uploadDate
)
{
this
.
uploadDate
=
uploadDate
;
public
void
setUploadDate
To
(
Date
uploadDateTo
)
{
this
.
uploadDate
To
=
uploadDateTo
;
}
public
BigDecimal
getAmount
()
{
return
amount
;
public
BigDecimal
getAmount
Form
()
{
return
amount
Form
;
}
public
void
setAmount
(
BigDecimal
amount
)
{
this
.
amount
=
amount
;
public
void
setAmountForm
(
BigDecimal
amountForm
)
{
this
.
amountForm
=
amountForm
;
}
public
BigDecimal
getAmountTo
()
{
return
amountTo
;
}
public
void
setAmountTo
(
BigDecimal
amountTo
)
{
this
.
amountTo
=
amountTo
;
}
public
Integer
getVerifyType
()
{
return
verifyType
;
}
public
void
setVerifyType
(
Integer
verifyType
)
{
this
.
verifyType
=
verifyType
;
}
public
String
getCreateBy
()
{
return
createBy
;
}
public
void
setCreateBy
(
String
createBy
)
{
this
.
createBy
=
createBy
;
}
public
Integer
getInvoiceEntityType
()
{
...
...
@@ -162,13 +185,7 @@ public class InputInvoiceQueryDto {
this
.
invoiceSourceType
=
invoiceSourceType
;
}
public
String
getStaffId
()
{
return
staffId
;
}
public
void
setStaffId
(
String
staffId
)
{
this
.
staffId
=
staffId
;
}
public
String
getSerialNo
()
{
return
serialNo
;
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/InvoiceManageService.java
View file @
a8ebb8bb
package
pwc
.
taxtech
.
atms
.
service
;
import
pwc.taxtech.atms.dto.input.CamelPagingDto
;
import
pwc.taxtech.atms.dto.input.CamelPagingResultDto
;
import
pwc.taxtech.atms.dto.input.InputInvoiceQueryDto
;
import
pwc.taxtech.atms.entitiy.InputInvoice
;
...
...
@@ -13,4 +14,14 @@ public interface InvoiceManageService {
* @return list
*/
CamelPagingResultDto
<
InputInvoice
>
getInputInvoiceList
(
InputInvoiceQueryDto
inputInvoiceQueryDto
);
/**
* 导出所有关联发票
* @param inputInvoiceQueryDto
* @param pagingDto
* @param fileName
* @return
*/
String
exportInvoiceAllInfoList
(
InputInvoiceQueryDto
inputInvoiceQueryDto
,
CamelPagingDto
pagingDto
,
String
fileName
);
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/InvoiceManageServiceImpl.java
View file @
a8ebb8bb
package
pwc
.
taxtech
.
atms
.
service
.
impl
;
import
org.apache.commons.lang.ObjectUtils.Null
;
import
org.aspectj.weaver.WeakClassLoaderReference
;
import
org.hamcrest.core.Is
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
net.sf.jsqlparser.statement.select.Select
;
import
pwc.taxtech.atms.common.CommonUtils
;
import
pwc.taxtech.atms.dao.CustomerMapper
;
import
pwc.taxtech.atms.dao.InputInvoiceMapper
;
import
pwc.taxtech.atms.dto.input.CamelPagingDto
;
import
pwc.taxtech.atms.dto.input.CamelPagingResultDto
;
...
...
@@ -21,11 +17,6 @@ import pwc.taxtech.atms.entitiy.InputInvoice;
import
pwc.taxtech.atms.entitiy.InputInvoiceExample
;
import
pwc.taxtech.atms.service.InvoiceManageService
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
@Service
public
class
InvoiceManageServiceImpl
extends
BaseService
implements
InvoiceManageService
{
...
...
@@ -37,14 +28,20 @@ public class InvoiceManageServiceImpl extends BaseService implements InvoiceMana
InputInvoiceExample
example
=
new
InputInvoiceExample
();
InputInvoiceExample
.
Criteria
criteria
=
example
.
createCriteria
();
if
(
inputInvoiceQueryDto
.
getAmount
()!=
null
)
{
criteria
.
andAmountEqualTo
(
inputInvoiceQueryDto
.
getAmount
());
if
(
inputInvoiceQueryDto
.
getAmountForm
()!=
null
)
{
criteria
.
andAmountGreaterThanOrEqualTo
(
inputInvoiceQueryDto
.
getAmountForm
());
}
if
(
inputInvoiceQueryDto
.
getAmountTo
()!=
null
)
{
criteria
.
andAmountLessThanOrEqualTo
(
inputInvoiceQueryDto
.
getAmountTo
());
}
if
(
inputInvoiceQueryDto
.
getBuyerBankName
()!=
null
)
{
criteria
.
andBuyerBankNameEqualTo
(
inputInvoiceQueryDto
.
getBuyerBankName
());
}
if
(
inputInvoiceQueryDto
.
getInvoiceDate
()!=
null
)
{
criteria
.
andInvoiceDateEqualTo
(
inputInvoiceQueryDto
.
getInvoiceDate
());
if
(
inputInvoiceQueryDto
.
getInvoiceDateForm
()!=
null
)
{
criteria
.
andInvoiceDateGreaterThanOrEqualTo
(
inputInvoiceQueryDto
.
getInvoiceDateForm
());
}
if
(
inputInvoiceQueryDto
.
getInvoiceDateTo
()!=
null
)
{
criteria
.
andInvoiceDateLessThanOrEqualTo
(
inputInvoiceQueryDto
.
getInvoiceDateTo
());
}
if
(
inputInvoiceQueryDto
.
getInvoiceEntityType
()!=
null
)
{
criteria
.
andInvoiceEntityTypeEqualTo
(
inputInvoiceQueryDto
.
getInvoiceEntityType
());
...
...
@@ -64,18 +61,25 @@ public class InvoiceManageServiceImpl extends BaseService implements InvoiceMana
if
(
inputInvoiceQueryDto
.
getSerialNo
()!=
null
)
{
criteria
.
andSerialNoEqualTo
(
inputInvoiceQueryDto
.
getSerialNo
());
}
if
(
inputInvoiceQueryDto
.
getStaffId
()!=
null
)
{
criteria
.
andStaffIdEqualTo
(
inputInvoiceQueryDto
.
getStaffId
());
}
if
(
inputInvoiceQueryDto
.
getStatus
()!=
null
)
{
criteria
.
andStatusEqualTo
(
inputInvoiceQueryDto
.
getStatus
());
}
if
(
inputInvoiceQueryDto
.
getUploadDate
()!=
null
)
{
criteria
.
andUploadDateEqualTo
(
inputInvoiceQueryDto
.
getUploadDate
());
if
(
inputInvoiceQueryDto
.
getUploadDateForm
()!=
null
)
{
criteria
.
andUploadDateGreaterThanOrEqualTo
(
inputInvoiceQueryDto
.
getUploadDateForm
());
}
if
(
inputInvoiceQueryDto
.
getUploadDateTo
()!=
null
)
{
criteria
.
andUploadDateLessThanOrEqualTo
(
inputInvoiceQueryDto
.
getUploadDateTo
());
}
if
(
inputInvoiceQueryDto
.
getUploadType
()!=
null
)
{
criteria
.
andUploadTypeEqualTo
(
inputInvoiceQueryDto
.
getUploadType
());
}
if
(
inputInvoiceQueryDto
.
getVerifyType
()!=
null
)
{
criteria
.
andVerifyTypeEqualTo
(
inputInvoiceQueryDto
.
getVerifyType
());
}
if
(
inputInvoiceQueryDto
.
getCreateBy
()!=
null
)
{
criteria
.
andCreateByEqualTo
(
inputInvoiceQueryDto
.
getCreateBy
());
}
Integer
pageIndex
=
inputInvoiceQueryDto
.
getPagingDto
().
getPageIndex
()!=
null
?
inputInvoiceQueryDto
.
getPagingDto
().
getPageIndex
():
1
;
Integer
pageSize
=
inputInvoiceQueryDto
.
getPagingDto
().
getPageSize
()!=
null
?
inputInvoiceQueryDto
.
getPagingDto
().
getPageSize
():
10
;
...
...
@@ -94,4 +98,11 @@ public class InvoiceManageServiceImpl extends BaseService implements InvoiceMana
camelPagingResultDto
.
setCalculateData
(
inputInvoice
);
return
camelPagingResultDto
;
}
@Override
public
String
exportInvoiceAllInfoList
(
InputInvoiceQueryDto
inputInvoiceQueryDto
,
CamelPagingDto
pagingDto
,
String
fileName
)
{
// TODO Auto-generated method stub
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