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
b39f07d4
Commit
b39f07d4
authored
Feb 28, 2019
by
gary
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、剩余5个表的excel导出
2、organization_accounting_rate添加source字段
parent
c1ab40d8
Show whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
529 additions
and
95 deletions
+529
-95
ErrorMessage.java
...in/java/pwc/taxtech/atms/common/message/ErrorMessage.java
+1
-0
CountTypeConstant.java
...ain/java/pwc/taxtech/atms/constant/CountTypeConstant.java
+1
-1
ExportTemplatePathConstant.java
...pwc/taxtech/atms/constant/ExportTemplatePathConstant.java
+16
-0
DataPreviewController.java
...va/pwc/taxtech/atms/controller/DataPreviewController.java
+38
-0
OrganizationAccountingRateDto.java
.../atms/dto/organization/OrganizationAccountingRateDto.java
+36
-0
CertifiedInvoicesListHeader.java
...s/dto/vatdto/excelheader/CertifiedInvoicesListHeader.java
+34
-0
CommonDocumentHelper.java
...a/pwc/taxtech/atms/service/impl/CommonDocumentHelper.java
+28
-0
DataPreviewSerivceImpl.java
...pwc/taxtech/atms/service/impl/DataPreviewSerivceImpl.java
+151
-37
certified_invoices_list.xlsx
...resources/vat_excel_template/certified_invoices_list.xlsx
+0
-0
coupa_purchasing_report.xlsx
...resources/vat_excel_template/coupa_purchasing_report.xlsx
+0
-0
invoice_data.xlsx
...i/src/main/resources/vat_excel_template/invoice_data.xlsx
+0
-0
invoice_record.xlsx
...src/main/resources/vat_excel_template/invoice_record.xlsx
+0
-0
red_letter_info_tab.xlsx
...ain/resources/vat_excel_template/red_letter_info_tab.xlsx
+0
-0
OrganizationAccountingRate.java
...a/pwc/taxtech/atms/entity/OrganizationAccountingRate.java
+36
-0
OrganizationAccountingRateExample.java
...axtech/atms/entity/OrganizationAccountingRateExample.java
+70
-0
OrganizationAccountingRateMapper.xml
...pwc/taxtech/atms/dao/OrganizationAccountingRateMapper.xml
+25
-8
constant.js
atms-web/src/main/webapp/app/common/utils/constant.js
+8
-0
vatPreviewService.js
...c/main/webapp/app/common/vatservices/vatPreviewService.js
+41
-0
vat-preview-certified-invoices-list.ctrl.js
...invoices-list/vat-preview-certified-invoices-list.ctrl.js
+7
-7
vat-preview-certified-invoices-list.html
...ed-invoices-list/vat-preview-certified-invoices-list.html
+1
-1
vat-preview-coupa-purchasing-report.ctrl.js
...hasing-report/vat-preview-coupa-purchasing-report.ctrl.js
+9
-10
vat-preview-coupa-purchasing-report.html
...urchasing-report/vat-preview-coupa-purchasing-report.html
+1
-1
vat-preview-invoice-data.ctrl.js
...vat-preview-invoice-data/vat-preview-invoice-data.ctrl.js
+7
-9
vat-preview-invoice-data.html
...ew/vat-preview-invoice-data/vat-preview-invoice-data.html
+1
-1
vat-preview-invoice-record.ctrl.js
...preview-invoice-record/vat-preview-invoice-record.ctrl.js
+7
-9
vat-preview-invoice-record.html
...at-preview-invoice-record/vat-preview-invoice-record.html
+1
-1
vat-preview-red-letter-info-tab.ctrl.js
...d-letter-info-tab/vat-preview-red-letter-info-tab.ctrl.js
+9
-9
vat-preview-red-letter-info-tab.html
...-red-letter-info-tab/vat-preview-red-letter-info-tab.html
+1
-1
No files found.
atms-api/src/main/java/pwc/taxtech/atms/common/message/ErrorMessage.java
View file @
b39f07d4
...
...
@@ -11,6 +11,7 @@ public class ErrorMessage {
public
static
final
String
NoSelectSheet
=
"NoSelectSheet"
;
public
static
final
String
DIDNOTSELECTPERIOD
=
"You should select period!"
;
public
static
final
String
ImportFailed
=
"ImportFailed!"
;
public
static
final
String
ExportFailed
=
"ExportFailed!"
;
...
...
atms-api/src/main/java/pwc/taxtech/atms/constant/
enums/
CountTypeConstant.java
→
atms-api/src/main/java/pwc/taxtech/atms/constant/CountTypeConstant.java
View file @
b39f07d4
package
pwc
.
taxtech
.
atms
.
constant
.
enums
;
package
pwc
.
taxtech
.
atms
.
constant
;
/**
* @Auther: Gary J Li
...
...
atms-api/src/main/java/pwc/taxtech/atms/constant/ExportTemplatePathConstant.java
0 → 100644
View file @
b39f07d4
package
pwc
.
taxtech
.
atms
.
constant
;
/**
* @Auther: Gary J Li
* @Date: 27/02/2019 20:47
* @Description:
*/
public
final
class
ExportTemplatePathConstant
{
public
static
final
String
INVOICES_RECORD
=
"/vat_excel_template/invoice_record.xlsx"
;
public
static
final
String
CASH_FLOW
=
"/vat_excel_template/cash_flow.xlsx"
;
public
static
final
String
CERTIFIED_INVOICES_LIST
=
"/vat_excel_template/certified_invoices_list.xlsx"
;
public
static
final
String
RED_LETTER_INFO_TAB
=
"/vat_excel_template/red_letter_info_tab.xlsx"
;
public
static
final
String
COUPA_PURCHASING_REPORT
=
"/vat_excel_template/coupa_purchasing_report.xlsx"
;
public
static
final
String
INVOICE_DATA
=
"/vat_excel_template/invoice_data.xlsx"
;
}
atms-api/src/main/java/pwc/taxtech/atms/controller/DataPreviewController.java
View file @
b39f07d4
...
...
@@ -187,4 +187,42 @@ public class DataPreviewController extends BaseController {
logger
.
error
(
String
.
format
(
"下载科目余额表-生成文件异常:%s"
,
e
.
getMessage
()));
}
}
@RequestMapping
(
value
=
"exportIRData/get"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
void
downloadIRQueryData
(
@RequestBody
InvoiceRecordParam
param
,
HttpServletResponse
response
)
{
logger
.
debug
(
"enter downloadIRQueryData"
);
String
fileName
=
"testFile"
;
dataPreviewSerivceImpl
.
exportInvoiceRecordList
(
response
,
param
,
fileName
);
}
@RequestMapping
(
value
=
"exportCILData/get"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
void
downloadCILQueryData
(
@RequestBody
CertifiedInvoicesListParam
param
,
HttpServletResponse
response
)
{
logger
.
debug
(
"enter downloadCILQueryData"
);
String
fileName
=
"testFile"
;
dataPreviewSerivceImpl
.
exportCILList
(
response
,
param
,
fileName
);
}
@RequestMapping
(
value
=
"exportRLITData/get"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
void
downloadRLITQueryData
(
@RequestBody
RedLetterInfoTableParam
param
,
HttpServletResponse
response
)
{
logger
.
debug
(
"enter downloadRLITQueryData"
);
String
fileName
=
"testFile"
;
dataPreviewSerivceImpl
.
exportRLITList
(
response
,
param
,
fileName
);
}
@RequestMapping
(
value
=
"exportCPRData/get"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
void
downloadCPRQueryData
(
@RequestBody
CoupaPurchasingReportParam
param
,
HttpServletResponse
response
)
{
logger
.
debug
(
"enter downloadCPRQueryData"
);
String
fileName
=
"testFile"
;
dataPreviewSerivceImpl
.
exportCPRList
(
response
,
param
,
fileName
);
}
@RequestMapping
(
value
=
"exportIDData/get"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
void
downloadIDQueryData
(
@RequestBody
InvoiceDataParam
param
,
HttpServletResponse
response
)
{
logger
.
debug
(
"enter downloadIDQueryData"
);
String
fileName
=
"testFile"
;
dataPreviewSerivceImpl
.
exportIDList
(
response
,
param
,
fileName
);
}
}
atms-api/src/main/java/pwc/taxtech/atms/dto/organization/OrganizationAccountingRateDto.java
View file @
b39f07d4
...
...
@@ -48,6 +48,17 @@ public class OrganizationAccountingRateDto implements Serializable {
*/
private
Integer
period
;
/**
* Database Column Remarks:
* 来源
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column organization_accounting_rate.source
*
* @mbg.generated
*/
private
String
source
;
/**
* Database Column Remarks:
* 汇率类型
...
...
@@ -216,6 +227,30 @@ public class OrganizationAccountingRateDto implements Serializable {
this
.
period
=
period
;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column organization_accounting_rate.source
*
* @return the value of organization_accounting_rate.source
*
* @mbg.generated
*/
public
String
getSource
()
{
return
source
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column organization_accounting_rate.source
*
* @param source the value for organization_accounting_rate.source
*
* @mbg.generated
*/
public
void
setSource
(
String
source
)
{
this
.
source
=
source
==
null
?
null
:
source
.
trim
();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column organization_accounting_rate.convertion_type
...
...
@@ -423,6 +458,7 @@ public class OrganizationAccountingRateDto implements Serializable {
sb
.
append
(
", id="
).
append
(
id
);
sb
.
append
(
", organizationId="
).
append
(
organizationId
);
sb
.
append
(
", period="
).
append
(
period
);
sb
.
append
(
", source="
).
append
(
source
);
sb
.
append
(
", convertionType="
).
append
(
convertionType
);
sb
.
append
(
", currencyFrom="
).
append
(
currencyFrom
);
sb
.
append
(
", currencyTo="
).
append
(
currencyTo
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/dto/vatdto/excelheader/CertifiedInvoicesListHeader.java
0 → 100644
View file @
b39f07d4
package
pwc
.
taxtech
.
atms
.
dto
.
vatdto
.
excelheader
;
public
class
CertifiedInvoicesListHeader
{
private
String
taxPayerNumber
;
private
Integer
period
;
private
String
unit
;
public
String
getTaxPayerNumber
()
{
return
taxPayerNumber
;
}
public
void
setTaxPayerNumber
(
String
taxPayerNumber
)
{
this
.
taxPayerNumber
=
taxPayerNumber
;
}
public
Integer
getPeriod
()
{
return
period
;
}
public
void
setPeriod
(
Integer
period
)
{
this
.
period
=
period
;
}
public
String
getUnit
()
{
return
unit
;
}
public
void
setUnit
(
String
unit
)
{
this
.
unit
=
unit
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/CommonDocumentHelper.java
View file @
b39f07d4
...
...
@@ -79,5 +79,33 @@ public class CommonDocumentHelper {
return
os
;
}
public
OutputStream
toXlsxFileUsingJxls
(
List
<?>
list
,
String
excelTemplatePathInClassPath
)
{
//InputStream is = Streams.fileIn(excelTemplatePathInClassPath);
InputStream
is
=
this
.
getClass
().
getResourceAsStream
(
excelTemplatePathInClassPath
);
OutputStream
os
=
new
ByteArrayOutputStream
();
Context
context
=
new
Context
();
context
.
putVar
(
"list"
,
list
);
context
.
putVar
(
"REPORT_DATE"
,
new
Date
());
JxlsHelper
jxlsHelper
=
JxlsHelper
.
getInstance
();
Transformer
transformer
=
jxlsHelper
.
createTransformer
(
is
,
os
);
JexlExpressionEvaluator
evaluator
=
(
JexlExpressionEvaluator
)
transformer
.
getTransformationConfig
()
.
getExpressionEvaluator
();
// evaluator.getJexlEngine().setSilent(true); // 设置静默模式,不报警告
Map
<
String
,
Object
>
funcs
=
new
HashMap
<
String
,
Object
>();
funcs
.
put
(
"myutils"
,
new
JxlsUtils
());
evaluator
.
getJexlEngine
().
setFunctions
(
funcs
);
// jxlsHelper.setUseFastFormulaProcessor(false); //与统计函数有关
try
{
jxlsHelper
.
processTemplate
(
context
,
transformer
);
}
catch
(
IOException
e
)
{
logger
.
error
(
"error when calling processTemplate:"
+
e
,
e
);
throw
Lang
.
wrapThrow
(
e
);
}
finally
{
Streams
.
safeClose
(
is
);
Streams
.
safeClose
(
os
);
}
return
os
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/DataPreviewSerivceImpl.java
View file @
b39f07d4
...
...
@@ -5,14 +5,17 @@ import com.github.pagehelper.PageHelper;
import
com.github.pagehelper.PageInfo
;
import
com.google.common.collect.Lists
;
import
org.springframework.stereotype.Service
;
import
pwc.taxtech.atms.constant.enums.CountTypeConstant
;
import
pwc.taxtech.atms.constant.enums.CountTypeEnum
;
import
pwc.taxtech.atms.common.message.ErrorMessage
;
import
pwc.taxtech.atms.constant.CountTypeConstant
;
import
pwc.taxtech.atms.constant.ExportTemplatePathConstant
;
import
pwc.taxtech.atms.dao.OrganizationMapper
;
import
pwc.taxtech.atms.dto.vatdto.*
;
import
pwc.taxtech.atms.dto.vatdto.dd.*
;
import
pwc.taxtech.atms.dto.vatdto.dd.TrialBalanceDto
;
import
pwc.taxtech.atms.dto.vatdto.excelheader.CashFlowHeader
;
import
pwc.taxtech.atms.dto.vatdto.excelheader.CertifiedInvoicesListHeader
;
import
pwc.taxtech.atms.entity.Organization
;
import
pwc.taxtech.atms.exception.ServiceException
;
import
pwc.taxtech.atms.thirdparty.ExcelUtil
;
import
pwc.taxtech.atms.vat.dao.*
;
import
pwc.taxtech.atms.vat.dpo.*
;
...
...
@@ -135,7 +138,7 @@ public class DataPreviewSerivceImpl extends BaseService {
//Boolean isEn = StringUtils.equals(language, "en-us");
logger
.
debug
(
"start export input invoice list to excel"
);
//String excelTemplatePathInClassPath = "/vat_excel_template/cash_flow"+(isEn?"":"_cn") + ".xlsx";
String
excelTemplatePathInClassPath
=
"/vat_excel_template/cash_flow.xlsx"
;
String
excelTemplatePathInClassPath
=
ExportTemplatePathConstant
.
CASH_FLOW
;
CashFlowCondition
condition
=
new
CashFlowCondition
();
beanUtil
.
copyProperties
(
param
,
condition
);
PageHelper
.
startPage
(
param
.
getPageInfo
().
getPageIndex
(),
param
.
getPageInfo
().
getPageSize
());
...
...
@@ -303,41 +306,10 @@ public class DataPreviewSerivceImpl extends BaseService {
*/
public
PageInfo
<
InvoiceDataDto
>
getIDDataForDisplay
(
InvoiceDataParam
param
)
{
InvoiceDataCondition
condition
=
beanUtil
.
copyProperties
(
param
,
new
InvoiceDataCondition
());
Page
page
=
Page
Helper
.
startPage
(
condition
.
getPageInfo
().
getPageIndex
(),
condition
.
getPageInfo
().
getPageSize
());
PageHelper
.
startPage
(
condition
.
getPageInfo
().
getPageIndex
(),
condition
.
getPageInfo
().
getPageSize
());
List
<
InvoiceData
>
invoiceDatas
=
invoiceDataMapper
.
selectByCondition
(
condition
);
List
<
InvoiceDataDto
>
invoiceDataDtos
=
generalIDDtoList
();
if
(
invoiceDatas
.
size
()>
0
){
invoiceDatas
.
forEach
(
id
->
{
setIDValue
(
invoiceDataDtos
,
"专票正数发票份数"
,
id
.
getCountType
(),
id
.
getSpecialInvoiceAmount1
());
setIDValue
(
invoiceDataDtos
,
"专票负数发票份数"
,
id
.
getCountType
(),
id
.
getSpecialInvoiceAmount2
());
setIDValue
(
invoiceDataDtos
,
"专票正数废票份数"
,
id
.
getCountType
(),
id
.
getSpecialInvoiceAmount3
());
setIDValue
(
invoiceDataDtos
,
"专票负数废票份数"
,
id
.
getCountType
(),
id
.
getSpecialInvoiceAmount4
());
setIDValue
(
invoiceDataDtos
,
"专票销项正废金额"
,
id
.
getCountType
(),
id
.
getSpecialInvoiceSalesAmount1
());
setIDValue
(
invoiceDataDtos
,
"专票销项正数金额"
,
id
.
getCountType
(),
id
.
getSpecialInvoiceSalesAmount2
());
setIDValue
(
invoiceDataDtos
,
"专票销项负废金额"
,
id
.
getCountType
(),
id
.
getSpecialInvoiceSalesAmount3
());
setIDValue
(
invoiceDataDtos
,
"专票销项负数金额"
,
id
.
getCountType
(),
id
.
getSpecialInvoiceSalesAmount4
());
setIDValue
(
invoiceDataDtos
,
"专票实际销项金额"
,
id
.
getCountType
(),
id
.
getSpecialInvoiceSalesAmount5
());
setIDValue
(
invoiceDataDtos
,
"专票销项正废税额"
,
id
.
getCountType
(),
id
.
getSpecialInvoiceTaxAmount1
());
setIDValue
(
invoiceDataDtos
,
"专票销项正数税额"
,
id
.
getCountType
(),
id
.
getSpecialInvoiceTaxAmount2
());
setIDValue
(
invoiceDataDtos
,
"专票销项负废税额"
,
id
.
getCountType
(),
id
.
getSpecialInvoiceTaxAmount3
());
setIDValue
(
invoiceDataDtos
,
"专票销项负数税额"
,
id
.
getCountType
(),
id
.
getSpecialInvoiceTaxAmount4
());
setIDValue
(
invoiceDataDtos
,
"专票实际销项税额"
,
id
.
getCountType
(),
id
.
getSpecialInvoiceTaxAmount5
());
setIDValue
(
invoiceDataDtos
,
"普票正数发票份数"
,
id
.
getCountType
(),
id
.
getInvoiceAmount1
());
setIDValue
(
invoiceDataDtos
,
"普票负数发票份数"
,
id
.
getCountType
(),
id
.
getInvoiceAmount2
());
setIDValue
(
invoiceDataDtos
,
"普票正数废票份数"
,
id
.
getCountType
(),
id
.
getInvoiceAmount3
());
setIDValue
(
invoiceDataDtos
,
"普票负数废票份数"
,
id
.
getCountType
(),
id
.
getInvoiceAmount4
());
setIDValue
(
invoiceDataDtos
,
"普票销项正废金额"
,
id
.
getCountType
(),
id
.
getInvoiceSalesAmount1
());
setIDValue
(
invoiceDataDtos
,
"普票销项正数金额"
,
id
.
getCountType
(),
id
.
getInvoiceSalesAmount2
());
setIDValue
(
invoiceDataDtos
,
"普票销项负废金额"
,
id
.
getCountType
(),
id
.
getInvoiceSalesAmount3
());
setIDValue
(
invoiceDataDtos
,
"普票销项负数金额"
,
id
.
getCountType
(),
id
.
getInvoiceSalesAmount4
());
setIDValue
(
invoiceDataDtos
,
"普票实际销项金额"
,
id
.
getCountType
(),
id
.
getInvoiceSalesAmount5
());
setIDValue
(
invoiceDataDtos
,
"普票销项正废税额"
,
id
.
getCountType
(),
id
.
getInvoiceTaxAmount1
());
setIDValue
(
invoiceDataDtos
,
"普票销项正数税额"
,
id
.
getCountType
(),
id
.
getInvoiceTaxAmount2
());
setIDValue
(
invoiceDataDtos
,
"普票销项负废税额"
,
id
.
getCountType
(),
id
.
getInvoiceTaxAmount3
());
setIDValue
(
invoiceDataDtos
,
"普票销项负数税额"
,
id
.
getCountType
(),
id
.
getInvoiceTaxAmount4
());
setIDValue
(
invoiceDataDtos
,
"普票实际销项税额"
,
id
.
getCountType
(),
id
.
getInvoiceTaxAmount5
());
});
}
generalIDDtoList
(
invoiceDatas
,
invoiceDataDtos
);
PageInfo
<
InvoiceDataDto
>
pageInfo
=
new
PageInfo
<>(
invoiceDataDtos
);
pageInfo
.
setTotal
(
invoiceDataDtos
.
size
());
pageInfo
.
setPageNum
(
param
.
getPageInfo
().
getPageIndex
());
...
...
@@ -429,6 +401,115 @@ public class DataPreviewSerivceImpl extends BaseService {
}
}
public
HttpServletResponse
exportInvoiceRecordList
(
HttpServletResponse
response
,
InvoiceRecordParam
param
,
String
fileName
)
{
//String excelTemplatePathInClassPath = "/vat_excel_template/cash_flow"+(isEn?"":"_cn") + ".xlsx";
String
excelTemplatePathInClassPath
=
ExportTemplatePathConstant
.
INVOICES_RECORD
;
InvoiceRecordCondition
condition
=
beanUtil
.
copyProperties
(
param
,
new
InvoiceRecordCondition
());
List
<
InvoiceRecord
>
invoiceDatas
=
invoiceRecordMapper
.
selectByCondition
(
condition
);
List
<
InvoiceRecordDto
>
invoiceDataDtos
=
Lists
.
newArrayList
();
invoiceDatas
.
forEach
(
id
->
{
InvoiceRecordDto
invoiceRecordDto
=
beanUtil
.
copyProperties
(
id
,
new
InvoiceRecordDto
());
invoiceDataDtos
.
add
(
invoiceRecordDto
);
});
OutputStream
outputStream
=
commonDocumentHelper
.
toXlsxFileUsingJxls
(
invoiceDataDtos
,
excelTemplatePathInClassPath
);
try
{
return
responseMessageBuilder
.
getDownloadTmpResponseMessage
(
response
,
outputStream
,
fileName
);
}
catch
(
Exception
e
)
{
logger
.
error
(
String
.
format
(
"导出发票记录异常:%s"
,
e
.
getMessage
()));
}
return
null
;
}
public
HttpServletResponse
exportCILList
(
HttpServletResponse
response
,
CertifiedInvoicesListParam
param
,
String
fileName
)
{
//String excelTemplatePathInClassPath = "/vat_excel_template/cash_flow"+(isEn?"":"_cn") + ".xlsx";
String
excelTemplatePathInClassPath
=
ExportTemplatePathConstant
.
CERTIFIED_INVOICES_LIST
;
CertifiedInvoicesListCondition
condition
=
beanUtil
.
copyProperties
(
param
,
new
CertifiedInvoicesListCondition
());
List
<
CertifiedInvoicesList
>
datas
=
certifiedInvoicesListMapper
.
selectByCondition
(
condition
);
if
(
datas
.
size
()<
1
){
throw
new
ServiceException
(
ErrorMessage
.
ExportFailed
);
}
CertifiedInvoicesListHeader
header
=
new
CertifiedInvoicesListHeader
();
Organization
org
=
organizationMapper
.
selectByPrimaryKey
(
param
.
getOrgId
());
header
.
setTaxPayerNumber
(
org
.
getTaxPayerNumber
());
header
.
setPeriod
(
param
.
getPeriodStart
());
header
.
setUnit
(
datas
.
get
(
0
).
getUnit
());
List
<
CertifiedInvoicesListDto
>
dtoList
=
Lists
.
newArrayList
();
datas
.
forEach
(
cil
->
{
CertifiedInvoicesListDto
dto
=
beanUtil
.
copyProperties
(
cil
,
new
CertifiedInvoicesListDto
());
dtoList
.
add
(
dto
);
});
OutputStream
outputStream
=
commonDocumentHelper
.
toXlsxFileUsingJxls
(
header
,
dtoList
,
excelTemplatePathInClassPath
);
try
{
return
responseMessageBuilder
.
getDownloadTmpResponseMessage
(
response
,
outputStream
,
fileName
);
}
catch
(
Exception
e
)
{
logger
.
error
(
String
.
format
(
"导出已认证发票清单异常:%s"
,
e
.
getMessage
()));
}
return
null
;
}
public
HttpServletResponse
exportCPRList
(
HttpServletResponse
response
,
CoupaPurchasingReportParam
param
,
String
fileName
)
{
//String excelTemplatePathInClassPath = "/vat_excel_template/cash_flow"+(isEn?"":"_cn") + ".xlsx";
String
excelTemplatePathInClassPath
=
ExportTemplatePathConstant
.
COUPA_PURCHASING_REPORT
;
CoupaPurchasingReportCondition
condition
=
beanUtil
.
copyProperties
(
param
,
new
CoupaPurchasingReportCondition
());
List
<
CoupaPurchasingReport
>
datas
=
coupaPurchasingReportMapper
.
selectByCondition
(
condition
);
if
(
datas
.
size
()<
1
){
throw
new
ServiceException
(
ErrorMessage
.
ExportFailed
);
}
List
<
CoupaPurchasingReportDto
>
dtos
=
Lists
.
newArrayList
();
datas
.
forEach
(
d
->
{
CoupaPurchasingReportDto
dto
=
beanUtil
.
copyProperties
(
d
,
new
CoupaPurchasingReportDto
());
dtos
.
add
(
dto
);
});
OutputStream
outputStream
=
commonDocumentHelper
.
toXlsxFileUsingJxls
(
dtos
,
excelTemplatePathInClassPath
);
try
{
return
responseMessageBuilder
.
getDownloadTmpResponseMessage
(
response
,
outputStream
,
fileName
);
}
catch
(
Exception
e
)
{
logger
.
error
(
String
.
format
(
"导出Coupa发票报告异常:%s"
,
e
.
getMessage
()));
}
return
null
;
}
public
HttpServletResponse
exportRLITList
(
HttpServletResponse
response
,
RedLetterInfoTableParam
param
,
String
fileName
)
{
//String excelTemplatePathInClassPath = "/vat_excel_template/cash_flow"+(isEn?"":"_cn") + ".xlsx";
String
excelTemplatePathInClassPath
=
ExportTemplatePathConstant
.
RED_LETTER_INFO_TAB
;
RedLetterInfoTableCondition
condition
=
beanUtil
.
copyProperties
(
param
,
new
RedLetterInfoTableCondition
());
List
<
RedLetterInfoTable
>
datas
=
redLetterInfoTableMapper
.
selectByCondition
(
condition
);
if
(
datas
.
size
()<
1
){
throw
new
ServiceException
(
ErrorMessage
.
ExportFailed
);
}
List
<
RedLetterInfoTableDto
>
dtos
=
Lists
.
newArrayList
();
datas
.
forEach
(
d
->
{
RedLetterInfoTableDto
dto
=
beanUtil
.
copyProperties
(
d
,
new
RedLetterInfoTableDto
());
dtos
.
add
(
dto
);
});
OutputStream
outputStream
=
commonDocumentHelper
.
toXlsxFileUsingJxls
(
dtos
,
excelTemplatePathInClassPath
);
try
{
return
responseMessageBuilder
.
getDownloadTmpResponseMessage
(
response
,
outputStream
,
fileName
);
}
catch
(
Exception
e
)
{
logger
.
error
(
String
.
format
(
"导出红字信息表异常:%s"
,
e
.
getMessage
()));
}
return
null
;
}
public
HttpServletResponse
exportIDList
(
HttpServletResponse
response
,
InvoiceDataParam
param
,
String
fileName
)
{
//String excelTemplatePathInClassPath = "/vat_excel_template/cash_flow"+(isEn?"":"_cn") + ".xlsx";
String
excelTemplatePathInClassPath
=
ExportTemplatePathConstant
.
INVOICE_DATA
;
InvoiceDataCondition
condition
=
beanUtil
.
copyProperties
(
param
,
new
InvoiceDataCondition
());
List
<
InvoiceData
>
datas
=
invoiceDataMapper
.
selectByCondition
(
condition
);
if
(
datas
.
size
()<
1
){
throw
new
ServiceException
(
ErrorMessage
.
ExportFailed
);
}
List
<
InvoiceDataDto
>
dtos
=
generalIDDtoList
();
generalIDDtoList
(
datas
,
dtos
);
OutputStream
outputStream
=
commonDocumentHelper
.
toXlsxFileUsingJxls
(
dtos
,
excelTemplatePathInClassPath
);
try
{
return
responseMessageBuilder
.
getDownloadTmpResponseMessage
(
response
,
outputStream
,
fileName
);
}
catch
(
Exception
e
)
{
logger
.
error
(
String
.
format
(
"导出发票资料异常:%s"
,
e
.
getMessage
()));
}
return
null
;
}
private
Map
<
String
,
String
>
generalTBHeader
()
{
Map
<
String
,
String
>
header
=
new
LinkedHashMap
<>();
header
.
put
(
"Date"
,
"数据日期"
);
...
...
@@ -607,7 +688,40 @@ public class DataPreviewSerivceImpl extends BaseService {
return
header
;
}
private
void
generalIDDtoList
(
List
<
InvoiceData
>
invoiceDatas
,
List
<
InvoiceDataDto
>
invoiceDataDtos
)
{
if
(
invoiceDatas
.
size
()>
0
){
invoiceDatas
.
forEach
(
id
->
{
setIDValue
(
invoiceDataDtos
,
"专票正数发票份数"
,
id
.
getCountType
(),
id
.
getSpecialInvoiceAmount1
());
setIDValue
(
invoiceDataDtos
,
"专票负数发票份数"
,
id
.
getCountType
(),
id
.
getSpecialInvoiceAmount2
());
setIDValue
(
invoiceDataDtos
,
"专票正数废票份数"
,
id
.
getCountType
(),
id
.
getSpecialInvoiceAmount3
());
setIDValue
(
invoiceDataDtos
,
"专票负数废票份数"
,
id
.
getCountType
(),
id
.
getSpecialInvoiceAmount4
());
setIDValue
(
invoiceDataDtos
,
"专票销项正废金额"
,
id
.
getCountType
(),
id
.
getSpecialInvoiceSalesAmount1
());
setIDValue
(
invoiceDataDtos
,
"专票销项正数金额"
,
id
.
getCountType
(),
id
.
getSpecialInvoiceSalesAmount2
());
setIDValue
(
invoiceDataDtos
,
"专票销项负废金额"
,
id
.
getCountType
(),
id
.
getSpecialInvoiceSalesAmount3
());
setIDValue
(
invoiceDataDtos
,
"专票销项负数金额"
,
id
.
getCountType
(),
id
.
getSpecialInvoiceSalesAmount4
());
setIDValue
(
invoiceDataDtos
,
"专票实际销项金额"
,
id
.
getCountType
(),
id
.
getSpecialInvoiceSalesAmount5
());
setIDValue
(
invoiceDataDtos
,
"专票销项正废税额"
,
id
.
getCountType
(),
id
.
getSpecialInvoiceTaxAmount1
());
setIDValue
(
invoiceDataDtos
,
"专票销项正数税额"
,
id
.
getCountType
(),
id
.
getSpecialInvoiceTaxAmount2
());
setIDValue
(
invoiceDataDtos
,
"专票销项负废税额"
,
id
.
getCountType
(),
id
.
getSpecialInvoiceTaxAmount3
());
setIDValue
(
invoiceDataDtos
,
"专票销项负数税额"
,
id
.
getCountType
(),
id
.
getSpecialInvoiceTaxAmount4
());
setIDValue
(
invoiceDataDtos
,
"专票实际销项税额"
,
id
.
getCountType
(),
id
.
getSpecialInvoiceTaxAmount5
());
setIDValue
(
invoiceDataDtos
,
"普票正数发票份数"
,
id
.
getCountType
(),
id
.
getInvoiceAmount1
());
setIDValue
(
invoiceDataDtos
,
"普票负数发票份数"
,
id
.
getCountType
(),
id
.
getInvoiceAmount2
());
setIDValue
(
invoiceDataDtos
,
"普票正数废票份数"
,
id
.
getCountType
(),
id
.
getInvoiceAmount3
());
setIDValue
(
invoiceDataDtos
,
"普票负数废票份数"
,
id
.
getCountType
(),
id
.
getInvoiceAmount4
());
setIDValue
(
invoiceDataDtos
,
"普票销项正废金额"
,
id
.
getCountType
(),
id
.
getInvoiceSalesAmount1
());
setIDValue
(
invoiceDataDtos
,
"普票销项正数金额"
,
id
.
getCountType
(),
id
.
getInvoiceSalesAmount2
());
setIDValue
(
invoiceDataDtos
,
"普票销项负废金额"
,
id
.
getCountType
(),
id
.
getInvoiceSalesAmount3
());
setIDValue
(
invoiceDataDtos
,
"普票销项负数金额"
,
id
.
getCountType
(),
id
.
getInvoiceSalesAmount4
());
setIDValue
(
invoiceDataDtos
,
"普票实际销项金额"
,
id
.
getCountType
(),
id
.
getInvoiceSalesAmount5
());
setIDValue
(
invoiceDataDtos
,
"普票销项正废税额"
,
id
.
getCountType
(),
id
.
getInvoiceTaxAmount1
());
setIDValue
(
invoiceDataDtos
,
"普票销项正数税额"
,
id
.
getCountType
(),
id
.
getInvoiceTaxAmount2
());
setIDValue
(
invoiceDataDtos
,
"普票销项负废税额"
,
id
.
getCountType
(),
id
.
getInvoiceTaxAmount3
());
setIDValue
(
invoiceDataDtos
,
"普票销项负数税额"
,
id
.
getCountType
(),
id
.
getInvoiceTaxAmount4
());
setIDValue
(
invoiceDataDtos
,
"普票实际销项税额"
,
id
.
getCountType
(),
id
.
getInvoiceTaxAmount5
());
});
}
}
private
List
<
InvoiceDataDto
>
generalIDDtoList
()
{
List
<
InvoiceDataDto
>
invoiceDataDtos
=
Lists
.
newArrayList
();
...
...
atms-api/src/main/resources/vat_excel_template/certified_invoices_list.xlsx
0 → 100644
View file @
b39f07d4
File added
atms-api/src/main/resources/vat_excel_template/coupa_purchasing_report.xlsx
0 → 100644
View file @
b39f07d4
File added
atms-api/src/main/resources/vat_excel_template/invoice_data.xlsx
0 → 100644
View file @
b39f07d4
File added
atms-api/src/main/resources/vat_excel_template/invoice_record.xlsx
0 → 100644
View file @
b39f07d4
File added
atms-api/src/main/resources/vat_excel_template/red_letter_info_tab.xlsx
0 → 100644
View file @
b39f07d4
File added
atms-dao/src/main/java/pwc/taxtech/atms/entity/OrganizationAccountingRate.java
View file @
b39f07d4
...
...
@@ -44,6 +44,17 @@ public class OrganizationAccountingRate extends BaseEntity implements Serializab
*/
private
Integer
period
;
/**
* Database Column Remarks:
* 来源
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column organization_accounting_rate.source
*
* @mbg.generated
*/
private
String
source
;
/**
* Database Column Remarks:
* 汇率类型
...
...
@@ -212,6 +223,30 @@ public class OrganizationAccountingRate extends BaseEntity implements Serializab
this
.
period
=
period
;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column organization_accounting_rate.source
*
* @return the value of organization_accounting_rate.source
*
* @mbg.generated
*/
public
String
getSource
()
{
return
source
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column organization_accounting_rate.source
*
* @param source the value for organization_accounting_rate.source
*
* @mbg.generated
*/
public
void
setSource
(
String
source
)
{
this
.
source
=
source
==
null
?
null
:
source
.
trim
();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column organization_accounting_rate.convertion_type
...
...
@@ -419,6 +454,7 @@ public class OrganizationAccountingRate extends BaseEntity implements Serializab
sb
.
append
(
", id="
).
append
(
id
);
sb
.
append
(
", organizationId="
).
append
(
organizationId
);
sb
.
append
(
", period="
).
append
(
period
);
sb
.
append
(
", source="
).
append
(
source
);
sb
.
append
(
", convertionType="
).
append
(
convertionType
);
sb
.
append
(
", currencyFrom="
).
append
(
currencyFrom
);
sb
.
append
(
", currencyTo="
).
append
(
currencyTo
);
...
...
atms-dao/src/main/java/pwc/taxtech/atms/entity/OrganizationAccountingRateExample.java
View file @
b39f07d4
...
...
@@ -385,6 +385,76 @@ public class OrganizationAccountingRateExample {
return
(
Criteria
)
this
;
}
public
Criteria
andSourceIsNull
()
{
addCriterion
(
"source is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSourceIsNotNull
()
{
addCriterion
(
"source is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSourceEqualTo
(
String
value
)
{
addCriterion
(
"source ="
,
value
,
"source"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSourceNotEqualTo
(
String
value
)
{
addCriterion
(
"source <>"
,
value
,
"source"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSourceGreaterThan
(
String
value
)
{
addCriterion
(
"source >"
,
value
,
"source"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSourceGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"source >="
,
value
,
"source"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSourceLessThan
(
String
value
)
{
addCriterion
(
"source <"
,
value
,
"source"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSourceLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"source <="
,
value
,
"source"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSourceLike
(
String
value
)
{
addCriterion
(
"source like"
,
value
,
"source"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSourceNotLike
(
String
value
)
{
addCriterion
(
"source not like"
,
value
,
"source"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSourceIn
(
List
<
String
>
values
)
{
addCriterion
(
"source in"
,
values
,
"source"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSourceNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"source not in"
,
values
,
"source"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSourceBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"source between"
,
value1
,
value2
,
"source"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSourceNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"source not between"
,
value1
,
value2
,
"source"
);
return
(
Criteria
)
this
;
}
public
Criteria
andConvertionTypeIsNull
()
{
addCriterion
(
"convertion_type is null"
);
return
(
Criteria
)
this
;
...
...
atms-dao/src/main/resources/pwc/taxtech/atms/dao/OrganizationAccountingRateMapper.xml
View file @
b39f07d4
...
...
@@ -9,6 +9,7 @@
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"organization_id"
jdbcType=
"VARCHAR"
property=
"organizationId"
/>
<result
column=
"period"
jdbcType=
"INTEGER"
property=
"period"
/>
<result
column=
"source"
jdbcType=
"VARCHAR"
property=
"source"
/>
<result
column=
"convertion_type"
jdbcType=
"VARCHAR"
property=
"convertionType"
/>
<result
column=
"currency_from"
jdbcType=
"VARCHAR"
property=
"currencyFrom"
/>
<result
column=
"currency_to"
jdbcType=
"VARCHAR"
property=
"currencyTo"
/>
...
...
@@ -89,8 +90,8 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, organization_id, period,
convertion_type, currency_from, currency_to, start_date
,
end_date, rate, create_time, update_time
id, organization_id, period,
source, convertion_type, currency_from, currency_to
,
start_date,
end_date, rate, create_time, update_time
</sql>
<select
id=
"selectByExample"
parameterType=
"pwc.taxtech.atms.entity.OrganizationAccountingRateExample"
resultMap=
"BaseResultMap"
>
<!--
...
...
@@ -144,13 +145,15 @@
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into organization_accounting_rate (id, organization_id, period,
convertion_type, currency_from, currency_to,
start_date, end_date, rate,
create_time, update_time)
source, convertion_type, currency_from,
currency_to, start_date, end_date,
rate, create_time, update_time
)
values (#{id,jdbcType=BIGINT}, #{organizationId,jdbcType=VARCHAR}, #{period,jdbcType=INTEGER},
#{convertionType,jdbcType=VARCHAR}, #{currencyFrom,jdbcType=VARCHAR}, #{currencyTo,jdbcType=VARCHAR},
#{startDate,jdbcType=TIMESTAMP}, #{endDate,jdbcType=TIMESTAMP}, #{rate,jdbcType=REAL},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
#{source,jdbcType=VARCHAR}, #{convertionType,jdbcType=VARCHAR}, #{currencyFrom,jdbcType=VARCHAR},
#{currencyTo,jdbcType=VARCHAR}, #{startDate,jdbcType=TIMESTAMP}, #{endDate,jdbcType=TIMESTAMP},
#{rate,jdbcType=REAL}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"pwc.taxtech.atms.entity.OrganizationAccountingRate"
>
<!--
...
...
@@ -168,6 +171,9 @@
<if
test=
"period != null"
>
period,
</if>
<if
test=
"source != null"
>
source,
</if>
<if
test=
"convertionType != null"
>
convertion_type,
</if>
...
...
@@ -203,6 +209,9 @@
<if
test=
"period != null"
>
#{period,jdbcType=INTEGER},
</if>
<if
test=
"source != null"
>
#{source,jdbcType=VARCHAR},
</if>
<if
test=
"convertionType != null"
>
#{convertionType,jdbcType=VARCHAR},
</if>
...
...
@@ -255,6 +264,9 @@
<if
test=
"record.period != null"
>
period = #{record.period,jdbcType=INTEGER},
</if>
<if
test=
"record.source != null"
>
source = #{record.source,jdbcType=VARCHAR},
</if>
<if
test=
"record.convertionType != null"
>
convertion_type = #{record.convertionType,jdbcType=VARCHAR},
</if>
...
...
@@ -293,6 +305,7 @@
set id = #{record.id,jdbcType=BIGINT},
organization_id = #{record.organizationId,jdbcType=VARCHAR},
period = #{record.period,jdbcType=INTEGER},
source = #{record.source,jdbcType=VARCHAR},
convertion_type = #{record.convertionType,jdbcType=VARCHAR},
currency_from = #{record.currencyFrom,jdbcType=VARCHAR},
currency_to = #{record.currencyTo,jdbcType=VARCHAR},
...
...
@@ -318,6 +331,9 @@
<if
test=
"period != null"
>
period = #{period,jdbcType=INTEGER},
</if>
<if
test=
"source != null"
>
source = #{source,jdbcType=VARCHAR},
</if>
<if
test=
"convertionType != null"
>
convertion_type = #{convertionType,jdbcType=VARCHAR},
</if>
...
...
@@ -353,6 +369,7 @@
update organization_accounting_rate
set organization_id = #{organizationId,jdbcType=VARCHAR},
period = #{period,jdbcType=INTEGER},
source = #{source,jdbcType=VARCHAR},
convertion_type = #{convertionType,jdbcType=VARCHAR},
currency_from = #{currencyFrom,jdbcType=VARCHAR},
currency_to = #{currencyTo,jdbcType=VARCHAR},
...
...
atms-web/src/main/webapp/app/common/utils/constant.js
View file @
b39f07d4
...
...
@@ -1467,6 +1467,14 @@ constant.NationalEconomicIndustryList =[
constant
.
maxButtonTitleLength
=
20
;
constant
.
exportExcelFileName
=
{
invoicesRecord
:
"invoices_record_"
,
certifiedInvoicesList
:
"certified_invoices_list_"
,
redLetterInfoTab
:
"red_letter_info_tab_"
,
coupaPurchasingReport
:
"coupa_purchasing_report_"
,
invoiceData
:
"invoice_data_"
};
...
...
atms-web/src/main/webapp/app/common/vatservices/vatPreviewService.js
View file @
b39f07d4
...
...
@@ -219,17 +219,57 @@
getIRDataForDisplay
:
function
(
queryParams
)
{
return
$http
.
post
(
'/dataPreview/getIRDataForDisplay'
,
queryParams
,
apiConfig
.
createVat
());
},
initExportIRData
:
function
(
queryParm
,
fileName
)
{
var
thisConfig
=
apiConfig
.
create
();
thisConfig
.
responseType
=
"arraybuffer"
;
return
$http
.
post
(
'/dataPreview/exportIRData/get'
,
queryParm
,
thisConfig
).
then
(
function
(
response
)
{
var
data
=
new
Blob
([
response
.
data
],
{
type
:
response
.
headers
(
'Content-Type'
)});
FileSaver
.
saveAs
(
data
,
fileName
+
'.xlsx'
);
});
},
getCPRDataForDisplay
:
function
(
queryParams
)
{
return
$http
.
post
(
'/dataPreview/getCPRDataForDisplay'
,
queryParams
,
apiConfig
.
createVat
());
},
initExportCPRData
:
function
(
queryParm
,
fileName
)
{
var
thisConfig
=
apiConfig
.
create
();
thisConfig
.
responseType
=
"arraybuffer"
;
return
$http
.
post
(
'/dataPreview/exportCPRData/get'
,
queryParm
,
thisConfig
).
then
(
function
(
response
)
{
var
data
=
new
Blob
([
response
.
data
],
{
type
:
response
.
headers
(
'Content-Type'
)});
FileSaver
.
saveAs
(
data
,
fileName
+
'.xlsx'
);
});
},
getRLITDataForDisplay
:
function
(
queryParams
)
{
return
$http
.
post
(
'/dataPreview/getRLITDataForDisplay'
,
queryParams
,
apiConfig
.
createVat
());
},
initExportRLITData
:
function
(
queryParm
,
fileName
)
{
var
thisConfig
=
apiConfig
.
create
();
thisConfig
.
responseType
=
"arraybuffer"
;
return
$http
.
post
(
'/dataPreview/exportRLITData/get'
,
queryParm
,
thisConfig
).
then
(
function
(
response
)
{
var
data
=
new
Blob
([
response
.
data
],
{
type
:
response
.
headers
(
'Content-Type'
)});
FileSaver
.
saveAs
(
data
,
fileName
+
'.xlsx'
);
});
},
getCILDataForDisplay
:
function
(
queryParams
)
{
return
$http
.
post
(
'/dataPreview/getCILDataForDisplay'
,
queryParams
,
apiConfig
.
createVat
());
},
initExportCILData
:
function
(
queryParm
,
fileName
)
{
var
thisConfig
=
apiConfig
.
create
();
thisConfig
.
responseType
=
"arraybuffer"
;
return
$http
.
post
(
'/dataPreview/exportCILData/get'
,
queryParm
,
thisConfig
).
then
(
function
(
response
)
{
var
data
=
new
Blob
([
response
.
data
],
{
type
:
response
.
headers
(
'Content-Type'
)});
FileSaver
.
saveAs
(
data
,
fileName
+
'.xlsx'
);
});
},
getIDDataForDisplay
:
function
(
queryParams
)
{
return
$http
.
post
(
'/dataPreview/getIDDataForDisplay'
,
queryParams
,
apiConfig
.
createVat
());
},
initExportIDData
:
function
(
queryParm
,
fileName
)
{
var
thisConfig
=
apiConfig
.
create
();
thisConfig
.
responseType
=
"arraybuffer"
;
return
$http
.
post
(
'/dataPreview/exportIDData/get'
,
queryParm
,
thisConfig
).
then
(
function
(
response
)
{
var
data
=
new
Blob
([
response
.
data
],
{
type
:
response
.
headers
(
'Content-Type'
)});
FileSaver
.
saveAs
(
data
,
fileName
+
'.xlsx'
);
});
}
};
}]);
\ No newline at end of file
atms-web/src/main/webapp/app/vat/preview/vat-preview-certified-invoices-list/vat-preview-certified-invoices-list.ctrl.js
View file @
b39f07d4
...
...
@@ -232,13 +232,13 @@
ele2
.
datepicker
(
"setDate"
,
$scope
.
queryParams
.
certificationDateEnd
);
};
var
downloadInputInvoice
=
function
()
{
vatPreviewService
.
getExportInputInvoiceList
(
$scope
.
queryParams
).
success
(
function
(
data
,
status
,
headers
)
{
if
(
status
===
204
){
SweetAlert
.
warning
(
"没有数据可以下载"
);
return
;
var
downloadCertifiedInvoicesList
=
function
()
{
var
localDate
=
$filter
(
'date'
)(
new
Date
(),
'yyyyMMddHHmmss'
);
var
fileName
=
constant
.
exportExcelFileName
.
certifiedInvoicesList
+
localDate
;
vatPreviewService
.
initExportCILData
(
$scope
.
queryParams
,
fileName
).
then
(
function
(
data
)
{
if
(
data
)
{
ackMessageBox
.
success
(
translate
(
'FileExportSuccess'
));
}
vatExportService
.
exportToExcel
(
data
,
status
,
headers
,
'进项发票信息.xls'
);
});
};
...
...
@@ -298,7 +298,7 @@
$scope
.
doDataFilterReset
=
doDataFilterReset
;
$scope
.
showPopover
=
showPopover
;
$scope
.
download
InputInvoice
=
downloadInputInvoice
;
$scope
.
download
CertifiedInvoicesList
=
downloadCertifiedInvoicesList
;
initPeriods
();
initCertifiedInvoicesListPagination
();
...
...
atms-web/src/main/webapp/app/vat/preview/vat-preview-certified-invoices-list/vat-preview-certified-invoices-list.html
View file @
b39f07d4
...
...
@@ -10,7 +10,7 @@
</button>-->
<span
translate=
"CertifiedInvoicesListTitle"
class=
"text-bold"
></span>
|
<span
class=
"text-bold"
translate=
"InvoiceQJ"
></span>
:
<input
type=
"text"
class=
"form-control input-width-middle periodInput"
style=
"position: relative; top: -30px; left: 230px;"
id=
"input-invoice-period-picker"
/>
<span
ng-click=
"download
InputInvoice
()"
style=
"position: relative; top: -61px; left: 95%;"
><i
class=
"fa fa-file-excel-o"
aria-hidden=
"true"
></i>
{{'ExportBtn' | translate}}
</span>
<span
ng-click=
"download
CertifiedInvoicesList
()"
style=
"position: relative; top: -61px; left: 95%;"
><i
class=
"fa fa-file-excel-o"
aria-hidden=
"true"
></i>
{{'ExportBtn' | translate}}
</span>
</div>
<!--<div style="margin-bottom: 8px;margin-left: 30px">
...
...
atms-web/src/main/webapp/app/vat/preview/vat-preview-coupa-purchasing-report/vat-preview-coupa-purchasing-report.ctrl.js
View file @
b39f07d4
vatModule
.
controller
(
'VatPreviewCoupaPurchasingReportController'
,
[
'$rootScope'
,
'$scope'
,
'$log'
,
'$translate'
,
'$timeout'
,
'SweetAlert'
,
'$q'
,
'uiGridConstants'
,
'$interval'
,
'vatPreviewService'
,
'browserService'
,
'vatSessionService'
,
'region'
,
'enums'
,
'vatExportService'
,
function
(
$rootScope
,
$scope
,
$log
,
$translate
,
$timeout
,
SweetAlert
,
$q
,
uiGridConstants
,
$interval
,
vatPreviewService
,
browserService
,
vatSessionService
,
region
,
enums
,
vatExportService
)
{
vatModule
.
controller
(
'VatPreviewCoupaPurchasingReportController'
,
[
'$rootScope'
,
'$scope'
,
'$log'
,
'$filter'
,
'$translate'
,
'$timeout'
,
'SweetAlert'
,
'$q'
,
'uiGridConstants'
,
'$interval'
,
'vatPreviewService'
,
'browserService'
,
'vatSessionService'
,
'region'
,
'enums'
,
'vatExportService'
,
function
(
$rootScope
,
$scope
,
$log
,
$filter
,
$translate
,
$timeout
,
SweetAlert
,
$q
,
uiGridConstants
,
$interval
,
vatPreviewService
,
browserService
,
vatSessionService
,
region
,
enums
,
vatExportService
)
{
'use strict'
;
$scope
.
startDate
=
new
Date
(
vatSessionService
.
project
.
year
,
0
,
1
);
...
...
@@ -236,14 +236,13 @@
ele2
.
datepicker
(
"setDate"
,
$scope
.
queryParams
.
certificationDateEnd
);
};
//导出进项发票数据
var
downloadInputInvoice
=
function
()
{
va
tPreviewService
.
getExportInputInvoiceList
(
$scope
.
queryParams
).
success
(
function
(
data
,
status
,
headers
)
{
if
(
status
===
204
)
{
SweetAlert
.
warning
(
"没有数据可以下载"
);
return
;
var
downloadCPR
=
function
()
{
var
localDate
=
$filter
(
'date'
)(
new
Date
(),
'yyyyMMddHHmmss'
);
va
r
fileName
=
constant
.
exportExcelFileName
.
coupaPurchasingReport
+
localDate
;
vatPreviewService
.
initExportCPRData
(
$scope
.
queryParams
,
fileName
).
then
(
function
(
data
)
{
if
(
data
)
{
ackMessageBox
.
success
(
translate
(
'FileExportSuccess'
))
;
}
vatExportService
.
exportToExcel
(
data
,
status
,
headers
,
'进项发票信息.xls'
);
});
};
...
...
@@ -320,7 +319,7 @@
$scope
.
doDataFilterReset
=
doDataFilterReset
;
$scope
.
prepareSummary
=
prepareSummary
;
$scope
.
showPopover
=
showPopover
;
$scope
.
download
InputInvoice
=
downloadInputInvoice
;
$scope
.
download
CPR
=
downloadCPR
;
initPeriods
();
initCoupaPurchasingReportPagination
();
...
...
atms-web/src/main/webapp/app/vat/preview/vat-preview-coupa-purchasing-report/vat-preview-coupa-purchasing-report.html
View file @
b39f07d4
...
...
@@ -10,7 +10,7 @@
</button>-->
<span
translate=
"CoupaPurchasingReportTitle"
class=
"text-bold"
></span>
|
<span
class=
"text-bold"
translate=
"InvoiceQJ"
></span>
:
<input
type=
"text"
class=
"form-control input-width-middle periodInput"
style=
"position: relative; top: -30px; left: 230px;"
id=
"input-invoice-period-picker"
/>
<span
ng-click=
"download
InputInvoice
()"
style=
"position: relative; top: -61px; left: 95%;"
><i
class=
"fa fa-file-excel-o"
aria-hidden=
"true"
></i>
{{'ExportBtn' | translate}}
</span>
<span
ng-click=
"download
CPR
()"
style=
"position: relative; top: -61px; left: 95%;"
><i
class=
"fa fa-file-excel-o"
aria-hidden=
"true"
></i>
{{'ExportBtn' | translate}}
</span>
</div>
<!-- <div style="margin-bottom: 8px;margin-left: 30px">
...
...
atms-web/src/main/webapp/app/vat/preview/vat-preview-invoice-data/vat-preview-invoice-data.ctrl.js
View file @
b39f07d4
vatModule
.
controller
(
'VatPreviewInvoiceDataController'
,
[
'$rootScope'
,
'$scope'
,
'$log'
,
'$translate'
,
'$timeout'
,
'SweetAlert'
,
'$q'
,
'uiGridConstants'
,
'$interval'
,
'vatPreviewService'
,
'browserService'
,
'vatSessionService'
,
'region'
,
'enums'
,
'vatExportService'
,
function
(
$rootScope
,
$scope
,
$log
,
$translate
,
$timeout
,
SweetAlert
,
$q
,
uiGridConstants
,
$interval
,
vatPreviewService
,
browserService
,
vatSessionService
,
region
,
enums
,
vatExportService
)
{
vatModule
.
controller
(
'VatPreviewInvoiceDataController'
,
[
'$rootScope'
,
'$scope'
,
'$log'
,
'$filter'
,
'$translate'
,
'$timeout'
,
'SweetAlert'
,
'$q'
,
'uiGridConstants'
,
'$interval'
,
'vatPreviewService'
,
'browserService'
,
'vatSessionService'
,
'region'
,
'enums'
,
'vatExportService'
,
function
(
$rootScope
,
$scope
,
$log
,
$filter
,
$translate
,
$timeout
,
SweetAlert
,
$q
,
uiGridConstants
,
$interval
,
vatPreviewService
,
browserService
,
vatSessionService
,
region
,
enums
,
vatExportService
)
{
'use strict'
;
$scope
.
startDate
=
new
Date
(
vatSessionService
.
project
.
year
,
0
,
1
);
...
...
@@ -276,14 +276,12 @@
});
var
downloadID
=
function
()
{
vatPreviewService
.
initExportIDData
(
$scope
.
queryParams
).
success
(
function
(
data
,
status
,
headers
)
{
if
(
status
===
204
){
SweetAlert
.
warning
(
"没有数据可以下载"
);
return
;
var
localDate
=
$filter
(
'date'
)(
new
Date
(),
'yyyyMMddHHmmss'
);
var
fileName
=
constant
.
exportExcelFileName
.
invoiceData
+
localDate
;
vatPreviewService
.
initExportIDData
(
$scope
.
queryParams
,
fileName
).
then
(
function
(
data
)
{
if
(
data
)
{
ackMessageBox
.
success
(
translate
(
'FileExportSuccess'
));
}
vatExportService
.
exportToExcel
(
data
,
status
,
headers
,
'日记账信息.xls'
);
}).
error
(
function
()
{
SweetAlert
.
error
(
$translate
.
instant
(
'PleaseContactAdministrator'
));
});
};
...
...
atms-web/src/main/webapp/app/vat/preview/vat-preview-invoice-data/vat-preview-invoice-data.html
View file @
b39f07d4
...
...
@@ -10,7 +10,7 @@
</button>-->
<span
translate=
"InvoiceDataTitle"
class=
"text-bold"
></span>
|
<span
class=
"text-bold"
translate=
"InvoiceQJ"
></span>
:
<input
type=
"text"
class=
"form-control input-width-middle periodInput"
style=
"position: relative; top: -30px; left: 180px;"
id=
"input-invoice-period-picker"
/>
<span
ng-click=
"downloadI
nputInvoice
()"
style=
"position: relative; top: -61px; left: 95%;"
><i
class=
"fa fa-file-excel-o"
aria-hidden=
"true"
></i>
{{'ExportBtn' | translate}}
</span>
<span
ng-click=
"downloadI
D
()"
style=
"position: relative; top: -61px; left: 95%;"
><i
class=
"fa fa-file-excel-o"
aria-hidden=
"true"
></i>
{{'ExportBtn' | translate}}
</span>
</div>
<!--<div style="margin-bottom: 8px;margin-left: 30px">
...
...
atms-web/src/main/webapp/app/vat/preview/vat-preview-invoice-record/vat-preview-invoice-record.ctrl.js
View file @
b39f07d4
vatModule
.
controller
(
'VatPreviewInvoiceRecordController'
,
[
'$rootScope'
,
'$scope'
,
'$log'
,
'$translate'
,
'$timeout'
,
'SweetAlert'
,
'$q'
,
'uiGridConstants'
,
'$interval'
,
'vatPreviewService'
,
'browserService'
,
'vatSessionService'
,
'region'
,
'enums'
,
'vatExportService'
,
function
(
$rootScope
,
$scope
,
$log
,
$translate
,
$timeout
,
SweetAlert
,
$q
,
uiGridConstants
,
$interval
,
vatPreviewService
,
browserService
,
vatSessionService
,
region
,
enums
,
vatExportService
)
{
vatModule
.
controller
(
'VatPreviewInvoiceRecordController'
,
[
'$rootScope'
,
'$scope'
,
'$
filter'
,
'$
log'
,
'$translate'
,
'$timeout'
,
'SweetAlert'
,
'$q'
,
'uiGridConstants'
,
'$interval'
,
'vatPreviewService'
,
'browserService'
,
'vatSessionService'
,
'region'
,
'enums'
,
'vatExportService'
,
function
(
$rootScope
,
$scope
,
$
filter
,
$
log
,
$translate
,
$timeout
,
SweetAlert
,
$q
,
uiGridConstants
,
$interval
,
vatPreviewService
,
browserService
,
vatSessionService
,
region
,
enums
,
vatExportService
)
{
'use strict'
;
$scope
.
startDate
=
new
Date
(
vatSessionService
.
project
.
year
,
0
,
1
);
...
...
@@ -276,14 +276,12 @@
});
var
downloadIR
=
function
()
{
vatPreviewService
.
initExportIRData
(
$scope
.
queryParams
).
success
(
function
(
data
,
status
,
headers
)
{
if
(
status
===
204
){
SweetAlert
.
warning
(
"没有数据可以下载"
);
return
;
var
localDate
=
$filter
(
'date'
)(
new
Date
(),
'yyyyMMddHHmmss'
);
var
fileName
=
constant
.
exportExcelFileName
.
invoicesRecord
+
localDate
;
vatPreviewService
.
initExportIRData
(
$scope
.
queryParams
,
fileName
).
then
(
function
(
data
)
{
if
(
data
)
{
ackMessageBox
.
success
(
translate
(
'FileExportSuccess'
));
}
vatExportService
.
exportToExcel
(
data
,
status
,
headers
,
'日记账信息.xls'
);
}).
error
(
function
()
{
SweetAlert
.
error
(
$translate
.
instant
(
'PleaseContactAdministrator'
));
});
};
...
...
atms-web/src/main/webapp/app/vat/preview/vat-preview-invoice-record/vat-preview-invoice-record.html
View file @
b39f07d4
...
...
@@ -10,7 +10,7 @@
</button>-->
<span
translate=
"InvoiceRecordTitle"
class=
"text-bold"
></span>
|
<span
class=
"text-bold"
translate=
"InvoiceQJ"
></span>
:
<input
type=
"text"
class=
"form-control input-width-middle periodInput"
style=
"position: relative; top: -30px; left: 180px;"
id=
"input-invoice-period-picker"
/>
<span
ng-click=
"downloadI
nputInvoice
()"
style=
"position: relative; top: -61px; left: 95%;"
><i
class=
"fa fa-file-excel-o"
aria-hidden=
"true"
></i>
{{'ExportBtn' | translate}}
</span>
<span
ng-click=
"downloadI
R
()"
style=
"position: relative; top: -61px; left: 95%;"
><i
class=
"fa fa-file-excel-o"
aria-hidden=
"true"
></i>
{{'ExportBtn' | translate}}
</span>
</div>
<!--<div style="margin-bottom: 8px;margin-left: 30px">
...
...
atms-web/src/main/webapp/app/vat/preview/vat-preview-red-letter-info-tab/vat-preview-red-letter-info-tab.ctrl.js
View file @
b39f07d4
vatModule
.
controller
(
'VatPreviewRedLetterInfoTabController'
,
[
'$rootScope'
,
'$scope'
,
'$log'
,
'$translate'
,
'$timeout'
,
'SweetAlert'
,
'$q'
,
'uiGridConstants'
,
'$interval'
,
'vatPreviewService'
,
'browserService'
,
'vatSessionService'
,
'region'
,
'enums'
,
'vatExportService'
,
function
(
$rootScope
,
$scope
,
$log
,
$translate
,
$timeout
,
SweetAlert
,
$q
,
uiGridConstants
,
$interval
,
vatPreviewService
,
browserService
,
vatSessionService
,
region
,
enums
,
vatExportService
)
{
vatModule
.
controller
(
'VatPreviewRedLetterInfoTabController'
,
[
'$rootScope'
,
'$scope'
,
'$log'
,
'$filter'
,
'$translate'
,
'$timeout'
,
'SweetAlert'
,
'$q'
,
'uiGridConstants'
,
'$interval'
,
'vatPreviewService'
,
'browserService'
,
'vatSessionService'
,
'region'
,
'enums'
,
'vatExportService'
,
function
(
$rootScope
,
$scope
,
$log
,
$filter
,
$translate
,
$timeout
,
SweetAlert
,
$q
,
uiGridConstants
,
$interval
,
vatPreviewService
,
browserService
,
vatSessionService
,
region
,
enums
,
vatExportService
)
{
'use strict'
;
$scope
.
startDate
=
new
Date
(
vatSessionService
.
project
.
year
,
0
,
1
);
...
...
@@ -245,13 +245,13 @@
})
};
var
downloadInputInvoice
=
function
()
{
vatPreviewService
.
getExportInputInvoiceList
(
$scope
.
queryParams
).
success
(
function
(
data
,
status
,
headers
)
{
if
(
status
===
204
){
SweetAlert
.
warning
(
"没有数据可以下载"
);
return
;
var
downloadRLIT
=
function
()
{
var
localDate
=
$filter
(
'date'
)(
new
Date
(),
'yyyyMMddHHmmss'
);
var
fileName
=
constant
.
exportExcelFileName
.
redLetterInfoTab
+
localDate
;
vatPreviewService
.
initExportRLITData
(
$scope
.
queryParams
,
fileName
).
then
(
function
(
data
)
{
if
(
data
)
{
ackMessageBox
.
success
(
translate
(
'FileExportSuccess'
));
}
vatExportService
.
exportToExcel
(
data
,
status
,
headers
,
'进项发票信息.xls'
);
});
};
...
...
@@ -311,7 +311,7 @@
$scope
.
doDataFilterReset
=
doDataFilterReset
;
$scope
.
showPopover
=
showPopover
;
$scope
.
download
InputInvoice
=
downloadInputInvoice
;
$scope
.
download
RLIT
=
downloadRLIT
;
initPeriods
();
initRedLetterInfoTabItemPagination
();
...
...
atms-web/src/main/webapp/app/vat/preview/vat-preview-red-letter-info-tab/vat-preview-red-letter-info-tab.html
View file @
b39f07d4
...
...
@@ -10,7 +10,7 @@
</button>-->
<span
translate=
"RedLetterInformationTableTitle"
class=
"text-bold"
></span>
|
<span
class=
"text-bold"
translate=
"InvoiceQJ"
></span>
:
<input
type=
"text"
class=
"form-control input-width-middle periodInput"
style=
"position: relative; top: -30px; left: 230px;"
id=
"input-invoice-period-picker"
/>
<span
ng-click=
"download
InputInvoice
()"
style=
"position: relative; top: -61px; left: 95%;"
><i
class=
"fa fa-file-excel-o"
aria-hidden=
"true"
></i>
{{'ExportBtn' | translate}}
</span>
<span
ng-click=
"download
RLIT
()"
style=
"position: relative; top: -61px; left: 95%;"
><i
class=
"fa fa-file-excel-o"
aria-hidden=
"true"
></i>
{{'ExportBtn' | translate}}
</span>
</div>
<!-- <div style="margin-bottom: 8px;margin-left: 30px">
...
...
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