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
c1ae7f3b
Commit
c1ae7f3b
authored
Nov 20, 2018
by
sherlock
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inputInvoice / outputInvoice export
parent
cb7ce216
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
31 deletions
+35
-31
InputInvoiceImportController.java
...taxtech/atms/controller/InputInvoiceImportController.java
+3
-3
OutputInvoiceController.java
.../pwc/taxtech/atms/controller/OutputInvoiceController.java
+11
-11
OutputVATInvoiceInfoDto.java
.../pwc/taxtech/atms/dto/vatdto/OutputVATInvoiceInfoDto.java
+13
-14
InputInvoiceDataImportServiceImpl.java
...s/vat/service/impl/InputInvoiceDataImportServiceImpl.java
+8
-3
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/InputInvoiceImportController.java
View file @
c1ae7f3b
...
...
@@ -94,7 +94,7 @@ public class InputInvoiceImportController {
}
}
private
int
getDownloadFilePath
(
InputInvoicePreviewQueryParam
paras
,
OutputStream
outputStream
,
String
projectId
)
{
List
<
InputInvoice
>
list
=
inputInvoiceDataImportService
.
getInputInvoiceTree
ViewData
(
paras
,
projectId
).
getList
(
);
List
<
InputInvoice
>
list
=
inputInvoiceDataImportService
.
getInputInvoiceTree
(
paras
,
projectId
);
if
(
list
.
size
()
==
0
)
{
return
0
;
}
...
...
@@ -107,9 +107,9 @@ public class InputInvoiceImportController {
inputInvoiceExportDto
.
setInvoiceDate
(
inputInvoice
.
getKPRQ
());
inputInvoiceExportDto
.
setInvoiceNumber
(
inputInvoice
.
getFPHM
());
inputInvoiceExportDto
.
setInvoiceTypeName
(
getFplx
(
inputInvoice
.
getFPLX
()));
inputInvoiceExportDto
.
setPeriodId
(
Integer
.
parseInt
(
inputInvoice
.
getRZS
J
().
substring
(
5
,
7
)));
inputInvoiceExportDto
.
setPeriodId
(
Integer
.
parseInt
(
inputInvoice
.
getRZS
Q
().
substring
(
4
,
6
)));
inputInvoiceExportDto
.
setSellerTaxNumber
(
inputInvoice
.
getXFSH
());
inputInvoiceExportDto
.
setTaxAmount
(
inputInvoice
.
getHJSE
()
!=
null
?
new
BigDecimal
(
inputInvoice
.
getHJ
J
E
().
replace
(
","
,
""
))
:
BigDecimal
.
ZERO
);
inputInvoiceExportDto
.
setTaxAmount
(
inputInvoice
.
getHJSE
()
!=
null
?
new
BigDecimal
(
inputInvoice
.
getHJ
S
E
().
replace
(
","
,
""
))
:
BigDecimal
.
ZERO
);
inputInvoiceExportDtos
.
add
(
inputInvoiceExportDto
);
}
Map
<
String
,
String
>
header
=
new
LinkedHashMap
<>();
...
...
atms-api/src/main/java/pwc/taxtech/atms/controller/OutputInvoiceController.java
View file @
c1ae7f3b
...
...
@@ -112,20 +112,20 @@ public class OutputInvoiceController {
header
.
put
(
"InvoiceNumber"
,
"发票号码"
);
header
.
put
(
"BuyerName"
,
"购方企业名称"
);
header
.
put
(
"BuyerTaxNumber"
,
"购方税号"
);
header
.
put
(
"BankAccount"
,
"银行账号"
);
header
.
put
(
"PhoneNum"
,
"地址电话"
);
//
header.put("BankAccount", "银行账号");
//
header.put("PhoneNum", "地址电话");
header
.
put
(
"InvoiceDate"
,
"开票日期"
);
header
.
put
(
"CodeVersion"
,
"商品编码版本号"
);
header
.
put
(
"DocumentNum"
,
"单据号"
);
header
.
put
(
"ProductName"
,
"商品名称"
);
header
.
put
(
"ProductStandar"
,
"规格"
);
header
.
put
(
"Unit"
,
"单位"
);
header
.
put
(
"Quantity"
,
"数量"
);
header
.
put
(
"UnitPrice"
,
"单价"
);
//
header.put("CodeVersion", "商品编码版本号");
//
header.put("DocumentNum", "单据号");
//
header.put("ProductName", "商品名称");
//
header.put("ProductStandar", "规格");
//
header.put("Unit", "单位");
//
header.put("Quantity", "数量");
//
header.put("UnitPrice", "单价");
header
.
put
(
"Amount"
,
"金额"
);
header
.
put
(
"TaxRate"
,
"税率"
);
//
header.put("TaxRate", "税率");
header
.
put
(
"TaxAmount"
,
"税额"
);
header
.
put
(
"TaxClassCode"
,
"税收分类编码"
);
//
header.put("TaxClassCode", "税收分类编码");
ExcelUtil
.
exportExcel
(
header
,
list2
,
outputStream
);
return
list
.
size
();
...
...
atms-api/src/main/java/pwc/taxtech/atms/dto/vatdto/OutputVATInvoiceInfoDto.java
View file @
c1ae7f3b
...
...
@@ -22,33 +22,32 @@ public class OutputVATInvoiceInfoDto {
private
String
buyerName
;
@ExcelCell
(
index
=
5
)
private
String
buyerTaxNumber
;
@ExcelCell
(
index
=
6
)
//
@ExcelCell(index=6)
private
String
bankAccount
;
@ExcelCell
(
index
=
7
)
//
@ExcelCell(index=7)
private
String
phoneNum
;
@ExcelCell
(
index
=
8
)
@ExcelCell
(
index
=
6
)
private
Date
invoiceDate
;
@ExcelCell
(
index
=
9
)
//
@ExcelCell(index=9)
private
String
codeVersion
;
@ExcelCell
(
index
=
11
)
//
@ExcelCell(index=11)
private
String
productName
;
@ExcelCell
(
index
=
10
)
//
@ExcelCell(index=10)
private
String
documentNum
;
@ExcelCell
(
index
=
12
)
//
@ExcelCell(index=12)
private
String
productStandard
;
@ExcelCell
(
index
=
13
)
//
@ExcelCell(index=13)
private
String
unit
;
@ExcelCell
(
index
=
14
)
//
@ExcelCell(index=14)
private
Integer
quantity
;
@ExcelCell
(
index
=
15
)
//
@ExcelCell(index=15)
private
Double
unitPrice
;
@ExcelCell
(
index
=
16
)
@ExcelCell
(
index
=
7
)
private
BigDecimal
amount
;
@ExcelCell
(
index
=
17
)
//
@ExcelCell(index=17)
private
BigDecimal
taxRate
;
@ExcelCell
(
index
=
1
8
)
@ExcelCell
(
index
=
8
)
private
BigDecimal
taxAmount
;
@ExcelCell
(
index
=
19
)
private
String
taxClassCode
;
@JsonProperty
(
"periodID"
)
private
int
periodId
;
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/InputInvoiceDataImportServiceImpl.java
View file @
c1ae7f3b
...
...
@@ -55,7 +55,7 @@ public class InputInvoiceDataImportServiceImpl {
@Autowired
private
OrganizationMapper
organizationMapper
;
public
PageInfo
<
InputInvoice
>
getInputInvoiceTreeViewData
(
InputInvoicePreviewQueryParam
paras
,
String
projectId
)
{
public
List
<
InputInvoice
>
getInputInvoiceTree
(
InputInvoicePreviewQueryParam
paras
,
String
projectId
)
{
Project
project
=
projectMapper
.
selectByPrimaryKey
(
projectId
);
Organization
organization
=
organizationMapper
.
selectByPrimaryKey
(
project
.
getOrganizationId
());
InputInvoiceExample
invoiceExample
=
new
InputInvoiceExample
();
...
...
@@ -64,7 +64,7 @@ public class InputInvoiceDataImportServiceImpl {
paras
.
getPeriodEnd
(),
Constant
.
DateFormat
.
YYYYMM
)).
andRZJGEqualTo
(
INPUT_RZJG_SUCCESS
).
andRZZTEqualTo
(
INPUT_RZZT_OVER
)
.
andFPZTNotEqualTo
(
"1"
);
PageHelper
.
startPage
(
paras
.
getPageInfo
().
getPageIndex
(),
paras
.
getPageInfo
().
getPageSize
());
List
<
InputInvoice
>
invoices
=
inputInvoiceMapper
.
selectByExample
(
invoiceExample
);
DecimalFormat
df
=
new
DecimalFormat
(
"#,###.00"
);
invoices
.
stream
().
forEach
(
x
->
{
...
...
@@ -73,7 +73,12 @@ public class InputInvoiceDataImportServiceImpl {
x
.
setRZJG
(
convertRzjg
(
x
.
getRZJG
()));
}
);
PageInfo
<
InputInvoice
>
pageInfo
=
new
PageInfo
<>(
invoices
);
return
invoices
;
}
public
PageInfo
<
InputInvoice
>
getInputInvoiceTreeViewData
(
InputInvoicePreviewQueryParam
paras
,
String
projectId
)
{
PageHelper
.
startPage
(
paras
.
getPageInfo
().
getPageIndex
(),
paras
.
getPageInfo
().
getPageSize
());
PageInfo
<
InputInvoice
>
pageInfo
=
new
PageInfo
<>(
getInputInvoiceTree
(
paras
,
projectId
));
return
pageInfo
;
}
...
...
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