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
ef3d5130
Commit
ef3d5130
authored
Nov 14, 2018
by
sherlock
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_oracle_sherlock' into 'dev_oracle'
Dev oracle sherlock See merge request root/atms!186
parents
fd4a320a
b5c11386
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
244 additions
and
124 deletions
+244
-124
InputInvoiceImportController.java
...taxtech/atms/controller/InputInvoiceImportController.java
+27
-7
OutputInvoiceController.java
.../pwc/taxtech/atms/controller/OutputInvoiceController.java
+16
-3
ReportController.java
...in/java/pwc/taxtech/atms/controller/ReportController.java
+5
-0
InputInvoiceDetailExportDto.java
.../taxtech/atms/dto/vatdto/InputInvoiceDetailExportDto.java
+7
-6
InputInvoiceExportDto.java
...va/pwc/taxtech/atms/dto/vatdto/InputInvoiceExportDto.java
+10
-9
CellTemplateServiceImpl.java
...wc/taxtech/atms/service/impl/CellTemplateServiceImpl.java
+2
-1
TemplateGroupServiceImpl.java
...c/taxtech/atms/service/impl/TemplateGroupServiceImpl.java
+17
-2
TemplateServiceImpl.java
...va/pwc/taxtech/atms/service/impl/TemplateServiceImpl.java
+7
-5
InputInvoiceDataImportServiceImpl.java
...s/vat/service/impl/InputInvoiceDataImportServiceImpl.java
+13
-0
ReportGeneratorImpl.java
...wc/taxtech/atms/vat/service/impl/ReportGeneratorImpl.java
+89
-69
ReportServiceImpl.java
.../pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
+24
-0
TemplateExtendsMapper.xml
...es/pwc/taxtech/atms/dao/extends/TemplateExtendsMapper.xml
+1
-1
vatExportService.js
...rc/main/webapp/app/common/vatservices/vatExportService.js
+1
-1
vatReportService.js
...rc/main/webapp/app/common/vatservices/vatReportService.js
+7
-0
vat-preview-input-invoice.ctrl.js
...t-preview-input-invoice/vat-preview-input-invoice.ctrl.js
+8
-8
vat-preview-input-invoice.html
.../vat-preview-input-invoice/vat-preview-input-invoice.html
+2
-4
vat-preview-output-invoice.ctrl.js
...preview-output-invoice/vat-preview-output-invoice.ctrl.js
+7
-7
vat-report-layout.ctrl.js
...pp/vat/report/vat-report-layout/vat-report-layout.ctrl.js
+1
-1
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/InputInvoiceImportController.java
View file @
ef3d5130
...
...
@@ -22,6 +22,7 @@ import pwc.taxtech.atms.vat.service.impl.InputInvoiceDataImportServiceImpl;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.OutputStream
;
import
java.math.BigDecimal
;
import
java.util.*
;
import
static
javax
.
servlet
.
http
.
HttpServletResponse
.
SC_NO_CONTENT
;
...
...
@@ -47,11 +48,14 @@ public class InputInvoiceImportController {
public
void
downloadInvoiceQueryData
(
@RequestBody
InputInvoicePreviewQueryParam
paras
,
HttpServletResponse
response
,
@RequestHeader
(
"from"
)
String
projectId
)
{
response
.
setContentType
(
"application/vnd.ms-excel;charset=utf-8"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
UUID
.
randomUUID
()
+
".xlsx
"
);
response
.
set
Header
(
"x-file-name"
,
UUID
.
randomUUID
()
+
".xlsx
"
);
response
.
addHeader
(
"Access-Control-Expose-Headers"
,
"Content-Type,Content-Disposition,x-file-name
"
);
response
.
set
CharacterEncoding
(
"UTF-8
"
);
String
fileName
=
paras
.
getPeriodStart
()
+
"-"
+
paras
.
getPeriodEnd
();
OutputStream
os
=
null
;
try
{
response
.
addHeader
(
"Content-Disposition"
,
"attachment;filename="
+
UUID
.
randomUUID
()
+
".xls"
);
response
.
addHeader
(
"x-file-name"
,
fileName
);
os
=
response
.
getOutputStream
();
int
count
=
getDownloadFilePath
(
paras
,
os
,
projectId
);
...
...
@@ -97,7 +101,7 @@ public class InputInvoiceImportController {
List
<
InputInvoiceExportDto
>
inputInvoiceExportDtos
=
Lists
.
newArrayList
();
for
(
InputInvoice
inputInvoice
:
list
){
InputInvoiceExportDto
inputInvoiceExportDto
=
new
InputInvoiceExportDto
();
inputInvoiceExportDto
.
setAmount
(
inputInvoice
.
getHJJE
());
inputInvoiceExportDto
.
setAmount
(
inputInvoice
.
getHJJE
()
!=
null
?
new
BigDecimal
(
inputInvoice
.
getHJJE
().
replace
(
","
,
""
)):
BigDecimal
.
ZERO
);
inputInvoiceExportDto
.
setCertificationDate
(
inputInvoice
.
getRZSJ
());
inputInvoiceExportDto
.
setInvoiceCode
(
inputInvoice
.
getFPDM
());
inputInvoiceExportDto
.
setInvoiceDate
(
inputInvoice
.
getKPRQ
());
...
...
@@ -105,7 +109,7 @@ public class InputInvoiceImportController {
inputInvoiceExportDto
.
setInvoiceTypeName
(
getFplx
(
inputInvoice
.
getFPLX
()));
inputInvoiceExportDto
.
setPeriodId
(
Integer
.
parseInt
(
inputInvoice
.
getRZSJ
().
substring
(
5
,
7
)));
inputInvoiceExportDto
.
setSellerTaxNumber
(
inputInvoice
.
getXFSH
());
inputInvoiceExportDto
.
setTaxAmount
(
inputInvoice
.
getHJSE
());
inputInvoiceExportDto
.
setTaxAmount
(
inputInvoice
.
getHJSE
()
!=
null
?
new
BigDecimal
(
inputInvoice
.
getHJJE
().
replace
(
","
,
""
))
:
BigDecimal
.
ZERO
);
inputInvoiceExportDtos
.
add
(
inputInvoiceExportDto
);
}
Map
<
String
,
String
>
header
=
new
HashMap
<>();
...
...
@@ -119,6 +123,12 @@ public class InputInvoiceImportController {
header
.
put
(
"TaxAmount"
,
"税额"
);
header
.
put
(
"CertificationDate"
,
"认证日期"
);
InputInvoiceExportDto
inputInvoiceExportDto
=
new
InputInvoiceExportDto
();
inputInvoiceExportDto
.
setTaxAmount
(
inputInvoiceExportDtos
.
stream
().
map
(
InputInvoiceExportDto:
:
getTaxAmount
).
reduce
(
BigDecimal:
:
add
).
get
());
inputInvoiceExportDto
.
setAmount
(
inputInvoiceExportDtos
.
stream
().
map
(
InputInvoiceExportDto:
:
getAmount
).
reduce
(
BigDecimal:
:
add
).
get
());
InputInvoiceExportDto
black
=
new
InputInvoiceExportDto
();
inputInvoiceExportDtos
.
add
(
black
);
inputInvoiceExportDtos
.
add
(
inputInvoiceExportDto
);
ExcelSheet
excelSheetA
=
new
ExcelSheet
<>();
excelSheetA
.
setHeaders
(
header
);
excelSheetA
.
setDataset
(
inputInvoiceExportDtos
);
...
...
@@ -143,16 +153,26 @@ public class InputInvoiceImportController {
List
<
InputInvoiceDetail
>
inputInvoiceDetailList
=
inputInvoiceDataImportService
.
getInputInvoiceItemList
(
item
.
getID
());
for
(
InputInvoiceDetail
inputInvoiceDetail
:
inputInvoiceDetailList
){
InputInvoiceDetailExportDto
inputInvoiceDetailExportDto
=
new
InputInvoiceDetailExportDto
();
inputInvoiceDetailExportDto
.
setAmount
(
inputInvoiceDetail
.
getJE
());
inputInvoiceDetailExportDto
.
setAmount
(
inputInvoiceDetail
.
getJE
()
!=
null
?
new
BigDecimal
(
inputInvoiceDetail
.
getJE
().
replace
(
","
,
""
))
:
BigDecimal
.
ZERO
);
inputInvoiceDetailExportDto
.
setInvoiceCode
(
inputInvoiceDetail
.
getFPDM
());
inputInvoiceDetailExportDto
.
setInvoiceNumber
(
inputInvoiceDetail
.
getFPHM
());
inputInvoiceDetailExportDto
.
setPeriodId
(
Integer
.
parseInt
(
item
.
getRZSJ
().
substring
(
5
,
7
)));
inputInvoiceDetailExportDto
.
setProductionName
(
inputInvoiceDetail
.
getSPMC
());
inputInvoiceDetailExportDto
.
setTaxAmount
(
inputInvoiceDetail
.
getSE
());
inputInvoiceDetailExportDto
.
setTaxAmount
(
inputInvoiceDetail
.
getSE
()
!=
null
?
new
BigDecimal
(
inputInvoiceDetail
.
getSE
().
replace
(
","
,
""
))
:
BigDecimal
.
ZERO
);
inputInvoiceDetailExportDto
.
setTaxRate
(
inputInvoiceDetail
.
getSLV
());
inputInvoiceItemList
.
add
(
inputInvoiceDetailExportDto
);
}
}
InputInvoiceDetailExportDto
inputInvoiceDetailExportDto
=
new
InputInvoiceDetailExportDto
();
inputInvoiceDetailExportDto
.
setTaxAmount
(
inputInvoiceItemList
.
stream
().
map
(
InputInvoiceDetailExportDto:
:
getTaxAmount
).
reduce
(
BigDecimal:
:
add
).
get
());
inputInvoiceDetailExportDto
.
setAmount
(
inputInvoiceItemList
.
stream
().
map
(
InputInvoiceDetailExportDto:
:
getAmount
).
reduce
(
BigDecimal:
:
add
).
get
());
InputInvoiceDetailExportDto
detailBlack
=
new
InputInvoiceDetailExportDto
();
inputInvoiceItemList
.
add
(
detailBlack
);
inputInvoiceItemList
.
add
(
inputInvoiceDetailExportDto
);
excelSheetB
.
setDataset
(
inputInvoiceItemList
);
List
<
ExcelSheet
<
InputVATInvoiceBaseDto
>>
sheets
=
new
ArrayList
<>();
sheets
.
add
(
excelSheetA
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/controller/OutputInvoiceController.java
View file @
ef3d5130
...
...
@@ -2,6 +2,7 @@ package pwc.taxtech.atms.controller;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.util.StringUtil
;
import
com.google.common.collect.Lists
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.ResponseEntity
;
...
...
@@ -24,6 +25,7 @@ import pwc.taxtech.atms.vat.service.impl.OutputInvoiceServiceImpl;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.OutputStream
;
import
java.math.BigDecimal
;
import
java.util.*
;
import
static
javax
.
servlet
.
http
.
HttpServletResponse
.
SC_NO_CONTENT
;
...
...
@@ -53,11 +55,14 @@ public class OutputInvoiceController {
@RequestMapping
(
value
=
"getExportOutputInvoiceList"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
void
downloadInvoiceQueryData
(
@RequestBody
QueryOutputDto
paras
,
@RequestHeader
(
"from"
)
String
projectId
,
HttpServletResponse
response
)
{
response
.
setContentType
(
"application/vnd.ms-excel;charset=utf-8"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
UUID
.
randomUUID
()
+
".xls"
);
response
.
set
Header
(
"x-file-name"
,
UUID
.
randomUUID
()
+
".xlsx
"
);
response
.
addHeader
(
"Access-Control-Expose-Headers"
,
"Content-Type,Content-Disposition,x-file-name"
);
String
fileName
=
paras
.
getPeriodStart
()
+
"-"
+
paras
.
getPeriodEnd
(
);
response
.
set
CharacterEncoding
(
"UTF-8
"
);
OutputStream
os
=
null
;
try
{
response
.
addHeader
(
"Content-Disposition"
,
"attachment;filename="
+
UUID
.
randomUUID
()
+
".xls"
);
response
.
addHeader
(
"x-file-name"
,
fileName
);
os
=
response
.
getOutputStream
();
int
count
=
getDownloadFilePath
(
paras
,
projectId
,
os
);
...
...
@@ -86,6 +91,13 @@ public class OutputInvoiceController {
if
(
list
.
size
()
==
0
)
{
return
0
;
}
OutputVATInvoiceInfoDto
outputVATInvoiceInfoDto
=
new
OutputVATInvoiceInfoDto
();
outputVATInvoiceInfoDto
.
setTaxAmount
(
list
.
stream
().
map
(
OutputVATInvoiceInfoDto:
:
getTaxAmount
).
reduce
(
BigDecimal:
:
add
).
get
());
outputVATInvoiceInfoDto
.
setAmount
(
list
.
stream
().
map
(
OutputVATInvoiceInfoDto:
:
getAmount
).
reduce
(
BigDecimal:
:
add
).
get
());
OutputVATInvoiceInfoDto
black
=
new
OutputVATInvoiceInfoDto
();
list
.
add
(
black
);
list
.
add
(
outputVATInvoiceInfoDto
);
List
<
pwc
.
taxtech
.
atms
.
dto
.
vatdto
.
OutputVATInvoiceInfoDto
>
list2
=
new
ArrayList
<>();
list
.
stream
().
forEach
(
x
->
{
pwc
.
taxtech
.
atms
.
dto
.
vatdto
.
OutputVATInvoiceInfoDto
d
=
...
...
@@ -114,6 +126,7 @@ public class OutputInvoiceController {
header
.
put
(
"TaxRate"
,
"税率"
);
header
.
put
(
"TaxAmount"
,
"税额"
);
header
.
put
(
"TaxClassCode"
,
"税收分类编码"
);
ExcelUtil
.
exportExcel
(
header
,
list2
,
outputStream
);
return
list
.
size
();
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/controller/ReportController.java
View file @
ef3d5130
...
...
@@ -33,6 +33,11 @@ public class ReportController {
return
reportService
.
getReportTemplate
(
projectId
,
EnumServiceType
.
getEnumByCode
(
serviceType
),
period
);
}
@RequestMapping
(
value
=
"filterTemplate/{projectId}/{serviceType}/{period}"
,
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
OperationResultDto
<
List
<
ReportDto
>>
getFilterTemplate
(
@PathVariable
String
projectId
,
@PathVariable
int
serviceType
,
@PathVariable
Integer
period
)
{
return
reportService
.
getFilterReportTemplate
(
projectId
,
EnumServiceType
.
getEnumByCode
(
serviceType
),
period
);
}
@RequestMapping
(
value
=
"generateByTotal/{projectId}/{mergeManual}/{period}"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
ResponseEntity
generateAllData
(
@PathVariable
String
projectId
,
@PathVariable
Integer
period
,
...
...
atms-api/src/main/java/pwc/taxtech/atms/dto/vatdto/InputInvoiceDetailExportDto.java
View file @
ef3d5130
...
...
@@ -3,6 +3,7 @@ package pwc.taxtech.atms.dto.vatdto;
import
pwc.taxtech.atms.thirdparty.ExcelCell
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
public
class
InputInvoiceDetailExportDto
implements
Serializable
{
...
...
@@ -16,10 +17,10 @@ public class InputInvoiceDetailExportDto implements Serializable {
private
String
invoiceNumber
;
@ExcelCell
(
index
=
2
)
private
String
amount
;
private
BigDecimal
amount
;
@ExcelCell
(
index
=
1
)
private
String
taxAmount
;
private
BigDecimal
taxAmount
;
@ExcelCell
(
index
=
3
)
private
String
taxRate
;
...
...
@@ -51,19 +52,19 @@ public class InputInvoiceDetailExportDto implements Serializable {
this
.
invoiceNumber
=
invoiceNumber
;
}
public
String
getAmount
()
{
public
BigDecimal
getAmount
()
{
return
amount
;
}
public
void
setAmount
(
String
amount
)
{
public
void
setAmount
(
BigDecimal
amount
)
{
this
.
amount
=
amount
;
}
public
String
getTaxAmount
()
{
public
BigDecimal
getTaxAmount
()
{
return
taxAmount
;
}
public
void
setTaxAmount
(
String
taxAmount
)
{
public
void
setTaxAmount
(
BigDecimal
taxAmount
)
{
this
.
taxAmount
=
taxAmount
;
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/dto/vatdto/InputInvoiceExportDto.java
View file @
ef3d5130
...
...
@@ -3,11 +3,12 @@ package pwc.taxtech.atms.dto.vatdto;
import
pwc.taxtech.atms.thirdparty.ExcelCell
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
public
class
InputInvoiceExportDto
implements
Serializable
{
@ExcelCell
(
index
=
6
)
private
int
periodId
;
private
Integer
periodId
;
@ExcelCell
(
index
=
7
)
private
String
invoiceDate
;
...
...
@@ -25,19 +26,19 @@ public class InputInvoiceExportDto implements Serializable {
private
String
invoiceTypeName
;
@ExcelCell
(
index
=
4
)
private
String
amount
;
private
BigDecimal
amount
;
@ExcelCell
(
index
=
1
)
private
String
taxAmount
;
private
BigDecimal
taxAmount
;
@ExcelCell
(
index
=
2
)
private
String
certificationDate
;
public
int
getPeriodId
()
{
public
Integer
getPeriodId
()
{
return
periodId
;
}
public
void
setPeriodId
(
int
periodId
)
{
public
void
setPeriodId
(
Integer
periodId
)
{
this
.
periodId
=
periodId
;
}
...
...
@@ -81,19 +82,19 @@ public class InputInvoiceExportDto implements Serializable {
this
.
invoiceTypeName
=
invoiceTypeName
;
}
public
String
getAmount
()
{
public
BigDecimal
getAmount
()
{
return
amount
;
}
public
void
setAmount
(
String
amount
)
{
public
void
setAmount
(
BigDecimal
amount
)
{
this
.
amount
=
amount
;
}
public
String
getTaxAmount
()
{
public
BigDecimal
getTaxAmount
()
{
return
taxAmount
;
}
public
void
setTaxAmount
(
String
taxAmount
)
{
public
void
setTaxAmount
(
BigDecimal
taxAmount
)
{
this
.
taxAmount
=
taxAmount
;
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/CellTemplateServiceImpl.java
View file @
ef3d5130
...
...
@@ -290,7 +290,8 @@ public class CellTemplateServiceImpl extends AbstractService {
}
if
(
nameList
.
isEmpty
())
{
return
formula
;
// return formula;
return
"报表公式"
;
}
else
{
return
String
.
join
(
"+"
,
nameList
);
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/TemplateGroupServiceImpl.java
View file @
ef3d5130
...
...
@@ -337,6 +337,9 @@ public class TemplateGroupServiceImpl extends AbstractService {
Workbook
workbook
=
WorkbookFactory
.
create
(
inputStream
);
List
<
Template
>
filePathList
=
Lists
.
newArrayList
();
Date
now
=
new
Date
();
TemplateExample
t
=
new
TemplateExample
();
t
.
createCriteria
().
andTemplateGroupIdEqualTo
(
templateGroupId
);
int
length
=
templateMapper
.
selectByExample
(
t
).
size
();
for
(
int
i
=
0
;
i
<
workbook
.
getNumberOfSheets
();
i
++)
{
String
sheetName
=
workbook
.
getSheetName
(
i
);
String
newName
=
sheetName
+
CommonUtils
.
getUUID
()
+
POIUtil
.
getFileSuffix
(
fileName
).
get
();
...
...
@@ -346,7 +349,19 @@ public class TemplateGroupServiceImpl extends AbstractService {
throw
new
ServiceException
(
ErrorMessage
.
SystemError
);
}
ByteArrayOutputStream
bos
=
new
ByteArrayOutputStream
();
optional
.
get
().
write
(
bos
);
Workbook
wtemp
=
optional
.
get
();
Sheet
temp
=
wtemp
.
getSheetAt
(
0
);
for
(
int
j
=
temp
.
getFirstRowNum
();
j
<
temp
.
getLastRowNum
();
j
++){
Row
row
=
temp
.
getRow
(
j
);
for
(
int
k
=
row
.
getFirstCellNum
();
k
<
row
.
getLastCellNum
();
k
++){
Cell
cell
=
row
.
getCell
(
k
);
if
(!
cell
.
getCellStyle
().
getLocked
()
&&
StringUtils
.
isNotBlank
(
cell
.
getStringCellValue
())
&&
cell
.
getStringCellValue
().
equalsIgnoreCase
(
"${KeyIn}"
)){
cell
.
setCellValue
(
""
);
}
}
}
wtemp
.
write
(
bos
);
String
tmpPath
=
httpFileService
.
uploadTemplate
(
newName
,
file
);
String
[]
arr
=
sheetName
.
split
(
"_"
);
String
name
=
arr
.
length
>=
2
?
arr
[
1
]
:
arr
[
0
];
...
...
@@ -357,7 +372,7 @@ public class TemplateGroupServiceImpl extends AbstractService {
template
.
setIsActiveAssociation
(
true
);
template
.
setIsSystemType
(
false
);
template
.
setName
(
name
);
template
.
setOrderIndex
(
i
+
1
);
template
.
setOrderIndex
(
i
+
length
);
template
.
setPath
(
tmpPath
);
template
.
setReportType
(
StringUtils
.
isBlank
(
reportType
)
?
null
:
Integer
.
valueOf
(
reportType
));
template
.
setTemplateGroupId
(
templateGroupId
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/TemplateServiceImpl.java
View file @
ef3d5130
...
...
@@ -15,7 +15,9 @@ import pwc.taxtech.atms.dpo.TemplateUniqDto;
import
pwc.taxtech.atms.dto.*
;
import
pwc.taxtech.atms.dto.vatdto.TemplateByGroupDto
;
import
pwc.taxtech.atms.entity.*
;
import
pwc.taxtech.atms.vat.dao.PeriodReportMapper
;
import
pwc.taxtech.atms.vat.dao.PeriodTemplateMapper
;
import
pwc.taxtech.atms.vat.entity.PeriodReportExample
;
import
pwc.taxtech.atms.vat.entity.PeriodTemplateExample
;
import
java.util.*
;
...
...
@@ -27,7 +29,7 @@ import static java.util.stream.Collectors.groupingBy;
public
class
TemplateServiceImpl
extends
AbstractService
{
@Autowired
private
Period
TemplateMapper
periodTemplate
Mapper
;
private
Period
ReportMapper
periodReport
Mapper
;
public
void
addExistTemplate
(
TemplateAddExistDto
templateAddExistDto
){
TemplateExample
t
=
new
TemplateExample
();
...
...
@@ -308,10 +310,10 @@ public class TemplateServiceImpl extends AbstractService {
taxReturnGroup
.
setName
(
TemplateGroupType
.
TaxReturn
.
name
());
List
<
TemplateDto
>
templateDtos2
=
new
ArrayList
<>();
templates
.
stream
().
filter
(
x
->
{
Period
TemplateExample
periodTemplateExample
=
new
PeriodTemplate
Example
();
period
TemplateExample
.
createCriteria
().
andTemplateGroupIdEqualTo
(
templateGroupId
)
.
and
TemplateIdEqualTo
(
x
.
getId
()
);
return
x
.
getTemplateGroupId
().
equals
(
templateGroupId
)
&&
period
TemplateMapper
.
selectByExample
(
periodTemplate
Example
).
size
()
>
0
;
Period
ReportExample
periodReportExample
=
new
PeriodReport
Example
();
period
ReportExample
.
createCriteria
().
andTemplateIdEqualTo
(
x
.
getId
()
)
.
and
ProjectIdEqualTo
(
projectId
);
return
x
.
getTemplateGroupId
().
equals
(
templateGroupId
)
&&
period
ReportMapper
.
selectByExample
(
periodReport
Example
).
size
()
>
0
;
}).
collect
(
Collectors
.
toList
()).
forEach
(
a
->
{
TemplateDto
templateDto
=
new
TemplateDto
();
CommonUtils
.
copyProperties
(
a
,
templateDto
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/InputInvoiceDataImportServiceImpl.java
View file @
ef3d5130
...
...
@@ -7,6 +7,7 @@ import org.apache.ibatis.session.SqlSession;
import
org.mybatis.spring.SqlSessionTemplate
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.StringUtils
;
import
pwc.taxtech.atms.common.util.DateUtils
;
import
pwc.taxtech.atms.constant.enums.EnumTbImportType
;
import
pwc.taxtech.atms.constant.enums.EnumValidationType
;
...
...
@@ -67,12 +68,24 @@ public class InputInvoiceDataImportServiceImpl {
invoices
.
stream
().
forEach
(
x
->
{
x
.
setHJJE
(
df
.
format
(
new
BigDecimal
(
x
.
getHJJE
())));
x
.
setHJSE
(
df
.
format
(
new
BigDecimal
(
x
.
getHJSE
())));
x
.
setRZJG
(
convertRzjg
(
x
.
getRZJG
()));
}
);
PageInfo
<
InputInvoice
>
pageInfo
=
new
PageInfo
<>(
invoices
);
return
pageInfo
;
}
private
String
convertRzjg
(
String
rzjg
){
if
(
StringUtils
.
isEmpty
(
rzjg
))
return
""
;
switch
(
rzjg
){
case
"0"
:
return
"认证成功"
;
case
"1"
:
return
"认证失败"
;
default
:
return
"未认证"
;
}
}
public
List
<
InputVATInvoiceDto
>
getInputInvoiceList
(
Integer
period
)
{
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportGeneratorImpl.java
View file @
ef3d5130
...
...
@@ -10,6 +10,7 @@ import org.apache.poi.ss.formula.udf.DefaultUDFFinder;
import
org.apache.poi.ss.formula.udf.UDFFinder
;
import
org.apache.poi.ss.usermodel.*
;
import
org.apache.poi.xssf.usermodel.XSSFCell
;
import
org.apache.poi.xssf.usermodel.XSSFFormulaEvaluator
;
import
org.apache.poi.xssf.usermodel.XSSFWorkbook
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -174,80 +175,99 @@ public class ReportGeneratorImpl {
periodCellTemplateConfigMapper
.
updateByPrimaryKeySelective
(
periodCellTemplateConfig
);
}
String
regexNormalCell
=
"[A-Z]{1,2}((?!0)[0-9]{1,3})"
;
p
=
Pattern
.
compile
(
regexNormalCell
);
m
=
p
.
matcher
(
sourceFormula
);
while
(
m
.
find
())
{
//如果找到普通单元格的公式,就去workbook里查找对应的格子取数据,然后放到DataSource,作为普通单元格数据源的数据
//找到一个格子就加一条数据
String
findStr
=
m
.
group
();
//A12,A13,A15,how to get A and 12 or A and 13
String
regexColumn
=
"[A-Z]{1,2}"
;
Pattern
pp
=
Pattern
.
compile
(
regexColumn
);
Matcher
mm
=
pp
.
matcher
(
findStr
);
while
(
mm
.
find
())
{
String
colStr
=
mm
.
group
();
int
colNum
=
FormulaHelper
.
excelColStrToNum
(
colStr
,
colStr
.
length
());
int
rowNum
=
Integer
.
parseInt
(
StringUtils
.
removeStart
(
findStr
,
colStr
));
Row
row
=
sheet
.
getRow
(
rowNum
-
1
);
if
(
row
!=
null
)
{
Cell
cell
=
row
.
getCell
(
colNum
-
1
);
if
(
cell
!=
null
)
{
//开始取值然后存放到DataSource
PeriodDataSource
dataSource
=
new
PeriodDataSource
();
dataSource
.
setId
(
distributedIdService
.
nextId
());
dataSource
.
setColumnIndex
(
colNum
-
1
);
dataSource
.
setRowIndex
(
rowNum
-
1
);
if
(((
XSSFCell
)
cell
).
getRawValue
()
!=
"#VALUE!"
)
{
dataSource
.
setAmount
(
new
BigDecimal
(
((
XSSFCell
)
cell
).
getRawValue
()
!=
null
?
((
XSSFCell
)
cell
).
getRawValue
()
:
(
StringUtils
.
isNotBlank
(
cell
.
getStringCellValue
()))
?
cell
.
getStringCellValue
()
:
Double
.
toString
(
cell
.
getNumericCellValue
())));
}
else
{
dataSource
.
setAmount
(
new
BigDecimal
(
"0.0"
));
String
regexNormalCell
=
"[A-Z]{1,2}((?!0)[0-9]{1,3})"
;
p
=
Pattern
.
compile
(
regexNormalCell
);
m
=
p
.
matcher
(
sourceFormula
);
while
(
m
.
find
())
{
//如果找到普通单元格的公式,就去workbook里查找对应的格子取数据,然后放到DataSource,作为普通单元格数据源的数据
//找到一个格子就加一条数据
String
findStr
=
m
.
group
();
//A12,A13,A15,how to get A and 12 or A and 13
String
regexColumn
=
"[A-Z]{1,2}"
;
Pattern
pp
=
Pattern
.
compile
(
regexColumn
);
Matcher
mm
=
pp
.
matcher
(
findStr
);
while
(
mm
.
find
())
{
String
colStr
=
mm
.
group
();
int
colNum
=
FormulaHelper
.
excelColStrToNum
(
colStr
,
colStr
.
length
());
int
rowNum
=
Integer
.
parseInt
(
StringUtils
.
removeStart
(
findStr
,
colStr
));
Row
row
=
sheet
.
getRow
(
rowNum
-
1
);
if
(
row
!=
null
)
{
Cell
cell
=
row
.
getCell
(
colNum
-
1
);
if
(
cell
!=
null
)
{
//开始取值然后存放到DataSource
PeriodDataSource
dataSource
=
new
PeriodDataSource
();
dataSource
.
setId
(
distributedIdService
.
nextId
());
dataSource
.
setColumnIndex
(
colNum
-
1
);
dataSource
.
setRowIndex
(
rowNum
-
1
);
if
(((
XSSFCell
)
cell
).
getRawValue
()
!=
"#VALUE!"
)
{
if
(
StringUtils
.
isNotBlank
(
cell
.
getStringCellValue
())
&&
StringUtils
.
isNumeric
(
cell
.
getStringCellValue
().
replace
(
"."
,
""
))){
dataSource
.
setAmount
(
new
BigDecimal
(
cell
.
getStringCellValue
()));
}
else
if
(
StringUtils
.
isBlank
(
cell
.
getStringCellValue
())){
dataSource
.
setAmount
(
new
BigDecimal
(
Double
.
toString
(
cell
.
getNumericCellValue
())));
}
// else {
// cell.setCellFormula(cell.getStringCellValue());
// FormulaEvaluator formulaEvaluator = new XSSFFormulaEvaluator((XSSFWorkbook) workbook);
// dataSource.setAmount(new BigDecimal(formulaEvaluator.evaluate(cell).getNumberValue()));
// }
// dataSource.setAmount(new BigDecimal(
// ((XSSFCell) cell).getRawValue() != null ?
// ((XSSFCell) cell).getRawValue()
// : (StringUtils.isNotBlank(cell.getStringCellValue())) ?
// cell.getStringCellValue()
// : Double.toString(cell.getNumericCellValue())));
}
else
{
dataSource
.
setAmount
(
new
BigDecimal
(
"0.0"
));
}
dataSource
.
setName
(
"ReportDataSource"
);
dataSource
.
setDescription
(
findStr
);
dataSource
.
setCreateTime
(
new
Date
());
dataSource
.
setUpdateTime
(
new
Date
());
dataSource
.
setCreateBy
(
"Admin"
);
dataSource
.
setUpdateBy
(
"Admin"
);
dataSource
.
setPeriod
(
period
);
dataSource
.
setCellTemplateId
(
periodCellTemplateConfig
.
getCellTemplateId
());
dataSource
.
setType
(
FormulaDataSourceType
.
Report
.
getCode
());
dataSource
.
setProjectId
(
projectId
);
periodDataSourceMapper
.
insertSelective
(
dataSource
);
//这里有个问题就是DataSource的数据有了,但是celldatasource的数据没有,后面无法关联celldata和DataSource
//解决办法就是 在存DataSource的时候就先把celldata的数据加好
//然后把celldatasource的数据也加好
//然后在外面去更新celldata和celldatasource的数据
//还有就是把公式里的数据源放到内存,在所有算完之后再统一加数据源
}
dataSource
.
setName
(
"ReportDataSource"
);
dataSource
.
setDescription
(
findStr
);
dataSource
.
setCreateTime
(
new
Date
());
dataSource
.
setUpdateTime
(
new
Date
());
dataSource
.
setCreateBy
(
"Admin"
);
dataSource
.
setUpdateBy
(
"Admin"
);
dataSource
.
setPeriod
(
period
);
dataSource
.
setCellTemplateId
(
periodCellTemplateConfig
.
getCellTemplateId
());
dataSource
.
setType
(
FormulaDataSourceType
.
Report
.
getCode
());
dataSource
.
setProjectId
(
projectId
);
periodDataSourceMapper
.
insertSelective
(
dataSource
);
//这里有个问题就是DataSource的数据有了,但是celldatasource的数据没有,后面无法关联celldata和DataSource
//解决办法就是 在存DataSource的时候就先把celldata的数据加好
//然后把celldatasource的数据也加好
//然后在外面去更新celldata和celldatasource的数据
//还有就是把公式里的数据源放到内存,在所有算完之后再统一加数据源
}
}
}
}
Optional
<
PeriodCellTemplate
>
tempPeriodCellTemplate
=
resources
.
getPeriodCellTemplates
().
stream
()
.
filter
(
a
->
a
.
getCellTemplateId
().
equals
(
periodCellTemplateConfig
.
getCellTemplateId
()))
.
findFirst
();
if
(
tempPeriodCellTemplate
.
isPresent
())
{
PeriodCellData
cellData
=
new
PeriodCellData
();
Long
cellDataId
=
distributedIdService
.
nextId
();
cellData
.
setId
(
cellDataId
);
cellData
.
setReportId
(
reportId
);
cellData
.
setCellTemplateId
(
tempPeriodCellTemplate
.
get
().
getCellTemplateId
());
String
data
;
if
(
sheet
.
getRow
(
tempPeriodCellTemplate
.
get
().
getRowIndex
())
!=
null
&&
sheet
.
getRow
(
tempPeriodCellTemplate
.
get
().
getRowIndex
())
.
getCell
(
tempPeriodCellTemplate
.
get
().
getColumnIndex
())
!=
null
)
{
Cell
cell
=
sheet
.
getRow
(
tempPeriodCellTemplate
.
get
().
getRowIndex
())
.
getCell
(
tempPeriodCellTemplate
.
get
().
getColumnIndex
());
data
=
((
XSSFCell
)
cell
).
getRawValue
();
if
(
data
!=
null
&&
data
.
equals
(
"#VALUE!"
))
{
data
=
"0.0"
;
}
//evaluator.evaluate(cell);
Optional
<
PeriodCellTemplate
>
tempPeriodCellTemplate
=
resources
.
getPeriodCellTemplates
().
stream
()
.
filter
(
a
->
a
.
getCellTemplateId
().
equals
(
periodCellTemplateConfig
.
getCellTemplateId
()))
.
findFirst
();
if
(
tempPeriodCellTemplate
.
isPresent
())
{
PeriodCellData
cellData
=
new
PeriodCellData
();
Long
cellDataId
=
distributedIdService
.
nextId
();
cellData
.
setId
(
cellDataId
);
cellData
.
setReportId
(
reportId
);
cellData
.
setCellTemplateId
(
tempPeriodCellTemplate
.
get
().
getCellTemplateId
());
String
data
;
if
(
sheet
.
getRow
(
tempPeriodCellTemplate
.
get
().
getRowIndex
())
!=
null
&&
sheet
.
getRow
(
tempPeriodCellTemplate
.
get
().
getRowIndex
())
.
getCell
(
tempPeriodCellTemplate
.
get
().
getColumnIndex
())
!=
null
)
{
Cell
cell
=
sheet
.
getRow
(
tempPeriodCellTemplate
.
get
().
getRowIndex
())
.
getCell
(
tempPeriodCellTemplate
.
get
().
getColumnIndex
());
data
=
((
XSSFCell
)
cell
).
getRawValue
();
if
(
data
!=
null
&&
data
.
equals
(
"#VALUE!"
))
{
FormulaEvaluator
formulaEvaluator
=
new
XSSFFormulaEvaluator
((
XSSFWorkbook
)
workbook
);
try
{
data
=
formulaEvaluator
.
evaluate
(
cell
).
getStringValue
();
}
catch
(
Exception
e
){
logger
.
error
(
e
.
getStackTrace
().
toString
());
data
=
"0.0"
;
}
}
//evaluator.evaluate(cell);
// if (cell.getCellTypeEnum().equals(CellType.NUMERIC)||cell.getCellTypeEnum().equals(CellType.FORMULA)) {
// data = Double.toString(cell.getNumericCellValue());
// } else {
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
View file @
ef3d5130
...
...
@@ -3,6 +3,7 @@ package pwc.taxtech.atms.vat.service.impl;
import
com.alibaba.fastjson.JSON
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Sets
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.poi.ss.usermodel.FormulaEvaluator
;
import
org.apache.poi.ss.usermodel.Workbook
;
...
...
@@ -13,6 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Component
;
import
org.springframework.transaction.annotation.Transactional
;
import
pwc.taxtech.atms.common.CommonUtils
;
import
pwc.taxtech.atms.common.util.BeanUtil
;
import
pwc.taxtech.atms.common.util.MyAsserts
;
import
pwc.taxtech.atms.common.util.SpringContextUtil
;
import
pwc.taxtech.atms.constant.Constant
;
...
...
@@ -107,6 +109,25 @@ public class ReportServiceImpl {
@Autowired
private
PeriodApproveMapper
periodApprovalMapper
;
public
OperationResultDto
<
List
<
ReportDto
>>
getFilterReportTemplate
(
String
projectId
,
EnumServiceType
serviceType
,
Integer
periodParam
)
{
OperationResultDto
<
List
<
ReportDto
>>
result
=
new
OperationResultDto
<>();
CommonUtils
.
copyProperties
(
getReportTemplate
(
projectId
,
serviceType
,
periodParam
),
result
);
if
(!
result
.
getResult
()
||
CollectionUtils
.
isEmpty
(
result
.
getData
()))
return
result
;
int
period
=
periodParam
!=
null
?
periodParam
:
0
;
PeriodTemplateExample
periodTemplateExample
=
new
PeriodTemplateExample
();
periodTemplateExample
.
createCriteria
().
andProjectIdEqualTo
(
projectId
)
.
andPeriodEqualTo
(
period
);
List
<
PeriodTemplate
>
periodTemplateList
=
periodTemplateMapper
.
selectByExample
(
periodTemplateExample
);
List
<
String
>
ids
=
Lists
.
newArrayList
();
periodTemplateList
.
stream
().
forEach
(
x
->
ids
.
add
(
x
.
getTemplateId
()
+
""
));
List
<
ReportDto
>
reportDtos
=
result
.
getData
().
stream
().
filter
(
x
->
{
return
ids
.
contains
(
x
.
getTemplateId
());
}).
collect
(
Collectors
.
toList
());
result
.
setData
(
reportDtos
);
return
result
;
}
public
OperationResultDto
<
List
<
ReportDto
>>
getReportTemplate
(
String
projectId
,
EnumServiceType
serviceType
,
Integer
periodParam
)
{
int
period
=
periodParam
!=
null
?
periodParam
:
0
;
OperationResultDto
<
List
<
ReportDto
>>
operationResult
=
new
OperationResultDto
<>();
...
...
@@ -159,7 +180,10 @@ public class ReportServiceImpl {
map
.
put
(
"projectId"
,
projectId
);
map
.
put
(
"templateGroupID"
,
templateGroupId
);
List
<
ReportDto
>
reportDtos
=
templateMapper
.
getTemplateLeftJoinReport
(
map
);
if
(
reportDtos
.
isEmpty
())
{
operationResult
.
setResultMsg
(
"No Template"
);
return
operationResult
;
...
...
atms-dao/src/main/resources/pwc/taxtech/atms/dao/extends/TemplateExtendsMapper.xml
View file @
ef3d5130
...
...
@@ -98,7 +98,7 @@
</where>
</select>
<resultMap
id=
"reportDto"
type=
"pwc.taxtech.atms.d
to.vatdt
o.ReportDto"
>
<resultMap
id=
"reportDto"
type=
"pwc.taxtech.atms.d
p
o.ReportDto"
>
<id
column=
"ID"
jdbcType=
"VARCHAR"
property=
"id"
/>
<result
column=
"PERIOD"
jdbcType=
"INTEGER"
property=
"period"
/>
<result
column=
"TEMPLATE_ID"
jdbcType=
"INTEGER"
property=
"templateId"
/>
...
...
atms-web/src/main/webapp/app/common/vatservices/vatExportService.js
View file @
ef3d5130
...
...
@@ -15,7 +15,7 @@
headers
=
headers
();
// Get the filename from the x-filename header or default to "download.bin"
var
filename
=
decodeURI
(
headers
[
'x-file-name'
])
||
defaultFileName
;
var
filename
=
decodeURI
(
headers
[
'x-file-name'
])
+
defaultFileName
;
// Determine the content type from the header or default to "application/octet-stream"
var
contentType
=
headers
[
'content-type'
]
||
octetStreamMime
;
...
...
atms-web/src/main/webapp/app/common/vatservices/vatReportService.js
View file @
ef3d5130
...
...
@@ -76,6 +76,13 @@
return
$http
.
get
(
'/Report/template/'
+
projectId
+
'/'
+
serviceType
+
'/'
+
period
,
apiConfig
.
createVat
());
},
getFilterTemplate
:
function
(
projectId
,
serviceType
,
period
)
{
if
(
!
_
.
isNumber
(
period
))
{
period
=
0
;
}
return
$http
.
get
(
'/Report/filterTemplate/'
+
projectId
+
'/'
+
serviceType
+
'/'
+
period
,
apiConfig
.
createVat
());
},
getCellVoucher
:
function
(
cellDataID
)
{
return
$http
.
get
(
'/Report/cellVoucher/'
+
cellDataID
,
apiConfig
.
createVat
());
},
...
...
atms-web/src/main/webapp/app/vat/preview/vat-preview-input-invoice/vat-preview-input-invoice.ctrl.js
View file @
ef3d5130
...
...
@@ -529,7 +529,7 @@
SweetAlert
.
warning
(
"没有数据可以下载"
);
return
;
}
vatExportService
.
exportToExcel
(
data
,
status
,
headers
,
'进项发票信息.xls
x
'
);
vatExportService
.
exportToExcel
(
data
,
status
,
headers
,
'进项发票信息.xls'
);
});
};
...
...
@@ -572,16 +572,16 @@
enableColumnMenus
:
false
,
columnDefs
:
[
{
name
:
$translate
.
instant
(
'ImportErrorPopUpNoCol'
),
width
:
'5%'
,
cellTemplate
:
'<div class="ui-grid-cell-contents"><span>{{row.entity.index}}<span></div>'
},
{
name
:
$translate
.
instant
(
'InvoiceQJ'
),
width
:
'8%'
,
cellTemplate
:
'<div class="ui-grid-cell-contents"><span>{{row.entity.periodID}}<span></div>'
},
//
{ name: $translate.instant('InvoiceQJ'), width: '8%', cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.periodID}}<span></div>' },
{
name
:
$translate
.
instant
(
'InvoiceKPRQ'
),
width
:
'10.5%'
,
cellTemplate
:
'<div class="ui-grid-cell-contents"><span>{{row.entity.kprq | date:"yyyy-MM-dd"}}<span></div>'
},
{
name
:
$translate
.
instant
(
'InvoiceFPDM'
),
width
:
'10.5%'
,
cellTemplate
:
'<div class="ui-grid-cell-contents"><span title="{{row.entity.fpdm}}">{{row.entity.fpdm}}</span></div>'
},
{
name
:
$translate
.
instant
(
'InvoiceFPHM'
),
width
:
'10.5%'
,
cellTemplate
:
'<div class="ui-grid-cell-contents"><span title="{{row.entity.fphm}}">{{row.entity.fphm}}</span></div>'
},
{
name
:
$translate
.
instant
(
'InvoiceGHFSH'
),
width
:
'1
2
%'
,
cellTemplate
:
'<div class="ui-grid-cell-contents"><span title="{{row.entity.xfsh}}">{{row.entity.xfsh}}</span></div>'
},
{
name
:
$translate
.
instant
(
'InvoiceFPLX'
),
width
:
'
8
%'
,
cellTemplate
:
'<div class="ui-grid-cell-contents"><span title="{{row.entity.fplx}}">增值税专票</span></div>'
},
{
name
:
$translate
.
instant
(
'InvoiceJE'
),
headerCellClass
:
'right'
,
width
:
'
8
%'
,
cellTemplate
:
'<div class="ui-grid-cell-contents right"><span style="float:right">{{row.entity.hjje}}</span></div>'
},
{
name
:
$translate
.
instant
(
'InvoiceSE'
),
headerCellClass
:
'right'
,
width
:
'
8
%'
,
cellTemplate
:
'<div class="ui-grid-cell-contents right"><span style="float:right">{{row.entity.hjse}}</span></div>'
},
{
name
:
$translate
.
instant
(
'InvoiceRZRQ'
),
width
:
'1
0
.5%'
,
cellTemplate
:
'<div class="ui-grid-cell-contents"><span>{{row.entity.rzsj | date:"yyyy-MM-dd"}}</span></div>'
},
{
name
:
$translate
.
instant
(
'InvoiceRZJG'
),
width
:
'
8%'
,
cellTemplate
:
'<div class="ui-grid-cell-contents"><span>{{row.entity.certificationResult
}}</span></div>'
}
{
name
:
$translate
.
instant
(
'InvoiceGHFSH'
),
width
:
'1
4
%'
,
cellTemplate
:
'<div class="ui-grid-cell-contents"><span title="{{row.entity.xfsh}}">{{row.entity.xfsh}}</span></div>'
},
{
name
:
$translate
.
instant
(
'InvoiceFPLX'
),
width
:
'
9
%'
,
cellTemplate
:
'<div class="ui-grid-cell-contents"><span title="{{row.entity.fplx}}">增值税专票</span></div>'
},
{
name
:
$translate
.
instant
(
'InvoiceJE'
),
headerCellClass
:
'right'
,
width
:
'
9
%'
,
cellTemplate
:
'<div class="ui-grid-cell-contents right"><span style="float:right">{{row.entity.hjje}}</span></div>'
},
{
name
:
$translate
.
instant
(
'InvoiceSE'
),
headerCellClass
:
'right'
,
width
:
'
9
%'
,
cellTemplate
:
'<div class="ui-grid-cell-contents right"><span style="float:right">{{row.entity.hjse}}</span></div>'
},
{
name
:
$translate
.
instant
(
'InvoiceRZRQ'
),
width
:
'1
2
.5%'
,
cellTemplate
:
'<div class="ui-grid-cell-contents"><span>{{row.entity.rzsj | date:"yyyy-MM-dd"}}</span></div>'
},
{
name
:
$translate
.
instant
(
'InvoiceRZJG'
),
width
:
'
10%'
,
cellTemplate
:
'<div class="ui-grid-cell-contents"><span>{{row.entity.rzjg
}}</span></div>'
}
],
onRegisterApi
:
function
(
gridApi
)
{
$scope
.
gridApi
=
gridApi
;
...
...
atms-web/src/main/webapp/app/vat/preview/vat-preview-input-invoice/vat-preview-input-invoice.html
View file @
ef3d5130
<div
class=
"vat-preview-input-invoice"
id=
"mainPreviewDiv"
>
<div
class=
"top-area-wrapper"
>
<div
class=
"top-area-wrapper"
style=
"margin-top: 10px"
>
<!--<button class="filter-button"
atms-popover ng-mouseenter="prepareSummary()" ng-click="showPopover()"
popover-container="body" popover-auto-hide="true" data-overwrite="true"
...
...
@@ -8,10 +8,8 @@
data-templateurl="/app/vat/preview/vat-preview-input-invoice/vat-preview-input-invoice-search.html">
<i class="fa fa-filter" aria-hidden="true"></i>
</button>-->
<div></div><div></div>
<span
translate=
"IncomeInvoiceTitle"
class=
"text-bold"
></span>
|
<span
class=
"text-bold"
translate=
"InvoiceQJ"
></span>
:
<input
type=
"text"
class=
"form-control input-width-middle"
style=
"position: relative; top: -33px; left: 160px;"
id=
"input-invoice-period-picker"
/>
<input
type=
"text"
class=
"form-control input-width-middle"
style=
"position: relative; top: -30px; left: 130px;"
id=
"input-invoice-period-picker"
/>
<span
ng-click=
"downloadInputInvoice()"
style=
"position: relative; top: -61px; left: 95%;"
><i
class=
"fa fa-file-excel-o"
aria-hidden=
"true"
></i>
{{'ExportBtn' | translate}}
</span>
</div>
...
...
atms-web/src/main/webapp/app/vat/preview/vat-preview-output-invoice/vat-preview-output-invoice.ctrl.js
View file @
ef3d5130
...
...
@@ -465,7 +465,7 @@
SweetAlert
.
warning
(
"没有数据可以下载"
);
return
;
}
vatExportService
.
exportToExcel
(
data
,
status
,
headers
,
'销项发票信息.xls
x
'
);
vatExportService
.
exportToExcel
(
data
,
status
,
headers
,
'销项发票信息.xls'
);
}).
error
(
function
()
{
SweetAlert
.
error
(
$translate
.
instant
(
'PleaseContactAdministrator'
));
});
...
...
@@ -480,10 +480,10 @@
name
:
$translate
.
instant
(
'ImportErrorPopUpNoCol'
),
width
:
'5%'
,
cellTemplate
:
'<div class="ui-grid-cell-contents" ><span>{{row.entity.index}}<span></div>'
},
{
name
:
$translate
.
instant
(
'PeriodId'
),
width
:
'5%'
,
cellTemplate
:
'<div class="ui-grid-cell-contents" title="{{row.entity.periodID}}"><span>{{row.entity.periodID}}<span></div>'
},
//
{
//
name: $translate.instant('PeriodId'), width: '5%',
//
cellTemplate: '<div class="ui-grid-cell-contents" title="{{row.entity.periodID}}"><span>{{row.entity.periodID}}<span></div>'
//
},
{
name
:
$translate
.
instant
(
'InvoiceDate'
),
width
:
'10%'
,
cellTemplate
:
'<div class="ui-grid-cell-contents" ><span>{{row.entity.kprq | date:"yyyy-MM-dd"}}</span></div>'
...
...
@@ -501,11 +501,11 @@
cellTemplate
:
'<div class="ui-grid-cell-contents" title="{{row.entity.fphm}}"><span>{{row.entity.fphm}}</span></div>'
},
{
name
:
$translate
.
instant
(
'BuyerName'
),
width
:
'1
5
%'
,
name
:
$translate
.
instant
(
'BuyerName'
),
width
:
'1
8
%'
,
cellTemplate
:
'<div class="ui-grid-cell-contents" title="{{row.entity.gfmc}}"><span>{{row.entity.gfmc}}</span></div>'
},
{
name
:
$translate
.
instant
(
'BuyerTaxNumber'
),
width
:
'1
5
%'
,
name
:
$translate
.
instant
(
'BuyerTaxNumber'
),
width
:
'1
8
%'
,
cellTemplate
:
'<div class="ui-grid-cell-contents" title="{{row.entity.gfsh}}"><span>{{row.entity.gfsh}}</span></div>'
},
//{
...
...
atms-web/src/main/webapp/app/vat/report/vat-report-layout/vat-report-layout.ctrl.js
View file @
ef3d5130
...
...
@@ -19,7 +19,7 @@
//projectID = '0cf0945f-d41c-4df3-8235-ae693d5e724d';
$q
.
all
([
templateGroupService
.
getGroupTemplateByGroupID
(
48372654336679936
,
projectID
),
vatReportService
.
getTemplate
(
vatSessionService
.
project
.
id
,
constant
.
serviceType
.
VAT
,
vatSessionService
.
month
)
vatReportService
.
get
Filter
Template
(
vatSessionService
.
project
.
id
,
constant
.
serviceType
.
VAT
,
vatSessionService
.
month
)
]).
then
(
function
(
result
)
{
if
(
!
_
.
isEmpty
(
result
[
0
])
&&
!
_
.
isEmpty
(
result
[
0
].
data
)
&&
!
_
.
isEmpty
(
result
[
0
].
data
.
data
)
&&
!
_
.
isEmpty
(
result
[
1
])
&&
!
_
.
isEmpty
(
result
[
1
].
data
)
&&
!
_
.
isEmpty
(
result
[
1
].
data
.
data
))
{
...
...
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