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
2cf0f02e
Commit
2cf0f02e
authored
May 16, 2019
by
Cheng C Yang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Balance Sheet and Profit table
parent
4313d019
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
71 additions
and
9 deletions
+71
-9
ExportTemplatePathConstant.java
...pwc/taxtech/atms/constant/ExportTemplatePathConstant.java
+2
-0
DataPreviewController.java
...va/pwc/taxtech/atms/controller/DataPreviewController.java
+7
-0
CashFlowHeader.java
...c/taxtech/atms/dto/vatdto/excelheader/CashFlowHeader.java
+11
-0
CommonDocumentHelper.java
...a/pwc/taxtech/atms/service/impl/CommonDocumentHelper.java
+1
-0
DataPreviewSerivceImpl.java
...pwc/taxtech/atms/service/impl/DataPreviewSerivceImpl.java
+35
-0
vatPreviewService.js
...c/main/webapp/app/common/vatservices/vatPreviewService.js
+8
-0
app-overview.ctrl.js
...in/webapp/app/framework/app-overview/app-overview.ctrl.js
+2
-2
vat-import-layout.ctrl.js
...pp/vat/import/vat-import-layout/vat-import-layout.ctrl.js
+4
-4
vat-preview-cash-flow-manual.ctrl.js
...iew-cash-flow-manual/vat-preview-cash-flow-manual.ctrl.js
+1
-3
No files found.
atms-api/src/main/java/pwc/taxtech/atms/constant/ExportTemplatePathConstant.java
View file @
2cf0f02e
...
...
@@ -16,4 +16,6 @@ public final class ExportTemplatePathConstant {
public
static
final
String
ADJUSTMENT_TABLE
=
"/vat_excel_template/adjustment_table.xlsx"
;
public
static
final
String
PROFIT_LOSS_STATEMENT_PRC_MANUAL_REPORT
=
"/vat_excel_template/profit_loss_statement_prc_manual.xlsx"
;
public
static
final
String
BALANCE_SHEET_PRC_MANUAL
=
"/vat_excel_template/balance_sheet_prc_manual.xlsx"
;
public
static
final
String
CASH_FLOW_MANUAL
=
"/vat_excel_template/cash_flow_manual.xlsx"
;
}
atms-api/src/main/java/pwc/taxtech/atms/controller/DataPreviewController.java
View file @
2cf0f02e
...
...
@@ -127,6 +127,13 @@ public class DataPreviewController extends BaseController {
dataPreviewSerivceImpl
.
exportCashFlowList
(
response
,
param
,
fileName
);
}
@RequestMapping
(
value
=
"exportCFMData/get"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
void
downloadCFMQueryData
(
@RequestBody
CashFlowParam
param
,
HttpServletResponse
response
)
{
logger
.
debug
(
"enter downloadCFQueryData"
);
String
fileName
=
"testFile"
;
dataPreviewSerivceImpl
.
exportCashFlowManualList
(
response
,
param
,
fileName
);
}
@RequestMapping
(
value
=
"exportADTBData/get"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
void
downloadADTBQueryData
(
@RequestBody
AdjustmentTableParam
param
,
HttpServletResponse
response
)
{
logger
.
debug
(
"enter downloadADTBQueryData"
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/dto/vatdto/excelheader/CashFlowHeader.java
View file @
2cf0f02e
...
...
@@ -3,6 +3,7 @@ package pwc.taxtech.atms.dto.vatdto.excelheader;
public
class
CashFlowHeader
{
private
String
companyNameCn
;
private
String
companyNameEn
;
private
String
companyCode
;
private
Integer
periodStart
;
private
Integer
periodEnd
;
private
String
ledgerName
;
...
...
@@ -25,6 +26,16 @@ public class CashFlowHeader {
this
.
companyNameEn
=
companyNameEn
;
}
public
String
getCompanyCode
()
{
return
companyCode
;
}
public
void
setCompanyCode
(
String
companyCode
)
{
this
.
companyCode
=
companyCode
;
}
public
Integer
getPeriodStart
()
{
return
periodStart
;
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/CommonDocumentHelper.java
View file @
2cf0f02e
...
...
@@ -50,6 +50,7 @@ public class CommonDocumentHelper {
Streams
.
safeClose
(
os
);
}
}
public
OutputStream
toXlsxFileUsingJxls
(
Object
header
,
List
<?>
list
,
String
excelTemplatePathInClassPath
)
{
//InputStream is = Streams.fileIn(excelTemplatePathInClassPath);
InputStream
is
=
this
.
getClass
().
getResourceAsStream
(
excelTemplatePathInClassPath
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/DataPreviewSerivceImpl.java
View file @
2cf0f02e
...
...
@@ -275,6 +275,41 @@ public class DataPreviewSerivceImpl extends BaseService {
return
null
;
}
public
HttpServletResponse
exportCashFlowManualList
(
HttpServletResponse
response
,
CashFlowParam
param
,
String
fileName
)
{
//Boolean isEn = StringUtils.equals(language, "en-us");
logger
.
debug
(
"start export CashFlow list to excel"
);
//String excelTemplatePathInClassPath = "/vat_excel_template/cash_flow"+(isEn?"":"_cn") + ".xlsx";
String
excelTemplatePathInClassPath
=
ExportTemplatePathConstant
.
CASH_FLOW_MANUAL
;
CashFlowCondition
condition
=
new
CashFlowCondition
();
beanUtil
.
copyProperties
(
param
,
condition
);
PageHelper
.
startPage
(
param
.
getPageInfo
().
getPageIndex
(),
param
.
getPageInfo
().
getPageSize
());
List
<
CashFlow
>
cashFlows
=
cashFlowManualMapper
.
selectByCondition
(
condition
);
List
<
CashFlowDto
>
cashFlowDtos
=
Lists
.
newArrayList
();
cashFlows
.
forEach
(
cf
->
{
CashFlowDto
cashFlowDto
=
new
CashFlowDto
();
beanUtil
.
copyProperties
(
cf
,
cashFlowDto
);
cashFlowDtos
.
add
(
cashFlowDto
);
});
CashFlowHeader
cashFlowHeader
=
new
CashFlowHeader
();
if
(
cashFlowDtos
.
size
()
>
0
)
{
Organization
org
=
organizationMapper
.
selectByPrimaryKey
(
param
.
getOrgId
());
cashFlowHeader
.
setCompanyNameCn
(
org
.
getName
());
cashFlowHeader
.
setCompanyCode
(
org
.
getCode
());
cashFlowHeader
.
setPeriodStart
(
param
.
getPeriodStart
());
cashFlowHeader
.
setLedgerName
(
cashFlowDtos
.
get
(
0
).
getLedgerName
());
cashFlowHeader
.
setLedgerCurrencyCode
(
cashFlowDtos
.
get
(
0
).
getLedgerCurrencyCode
());
}
OutputStream
outputStream
=
commonDocumentHelper
.
toXlsxFileUsingJxls
(
cashFlowHeader
,
cashFlowDtos
,
excelTemplatePathInClassPath
);
try
{
return
responseMessageBuilder
.
getDownloadTmpResponseMessage
(
response
,
outputStream
,
fileName
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
logger
.
error
(
e
.
getMessage
());
}
return
null
;
}
public
HttpServletResponse
exportAdjustmentTableList
(
HttpServletResponse
response
,
AdjustmentTableParam
param
,
String
fileName
)
{
//Boolean isEn = StringUtils.equals(language, "en-us");
logger
.
debug
(
"start export AdjustmentTable list to excel"
);
...
...
atms-web/src/main/webapp/app/common/vatservices/vatPreviewService.js
View file @
2cf0f02e
...
...
@@ -201,6 +201,14 @@
FileSaver
.
saveAs
(
data
,
fileName
+
'_'
+
queryParm
.
periodStart
+
'-'
+
queryParm
.
periodEnd
+
'_'
+
vatSessionService
.
project
.
name
+
'.xlsx'
);
});
},
initExportCFMData
:
function
(
queryParm
,
fileName
)
{
var
thisConfig
=
apiConfig
.
create
();
thisConfig
.
responseType
=
"arraybuffer"
;
return
$http
.
post
(
'/dataPreview/exportCFMData/get'
,
queryParm
,
thisConfig
).
then
(
function
(
response
)
{
var
data
=
new
Blob
([
response
.
data
],
{
type
:
response
.
headers
(
'Content-Type'
)});
FileSaver
.
saveAs
(
data
,
fileName
+
'_'
+
queryParm
.
periodStart
+
'-'
+
queryParm
.
periodEnd
+
'_'
+
vatSessionService
.
project
.
name
+
'.xlsx'
);
});
},
getADTBDataForDisplay
:
function
(
queryParams
)
{
return
$http
.
post
(
'/dataPreview/getADTBDataForDisplay'
,
queryParams
,
apiConfig
.
createVat
());
},
...
...
atms-web/src/main/webapp/app/framework/app-overview/app-overview.ctrl.js
View file @
2cf0f02e
...
...
@@ -930,12 +930,12 @@
$state
.
go
(
'vat.previewData.coupaPurchasingReport'
);
}
else
if
(
data
[
constant
.
vatPermission
.
dataPreview
.
invoiceData
.
queryCode
])
{
$state
.
go
(
'vat.previewData.invoiceData'
);
}
else
if
(
data
[
constant
.
vatPermission
.
dataPreview
.
cashFlowManual
.
queryCode
])
{
$state
.
go
(
'vat.previewData.cashFlowManual'
);
}
else
if
(
data
[
constant
.
vatPermission
.
dataPreview
.
profitTable
.
queryCode
])
{
$state
.
go
(
'vat.previewData.vatPreviewProfitTable'
);
}
else
if
(
data
[
constant
.
vatPermission
.
dataPreview
.
balanceSheet
.
queryCode
])
{
$state
.
go
(
'vat.previewData.vatPreviewTheBalanceSheet'
);
}
else
if
(
data
[
constant
.
vatPermission
.
dataPreview
.
cashFlowManual
.
queryCode
])
{
$state
.
go
(
'vat.previewData.cashFlowManual'
);
}
else
if
(
data
[
constant
.
vatPermission
.
dataManage
.
caculateDataCode
])
{
$state
.
go
(
'vat.reductionData.caculateData'
);
}
else
if
(
data
[
constant
.
vatPermission
.
dataManage
.
revenueDetailCode
])
{
...
...
atms-web/src/main/webapp/app/vat/import/vat-import-layout/vat-import-layout.ctrl.js
View file @
2cf0f02e
...
...
@@ -81,6 +81,10 @@
text
:
$translate
.
instant
(
'invoiceData'
),
icon
:
'fa fa-file-text-o'
,
show
:
true
},
//TODO 增加TAB
{
name
:
'cashFlowManual'
,
permission
:
constant
.
vatPermission
.
dataPreview
.
cashFlowManual
.
queryCode
,
text
:
$translate
.
instant
(
'CashFlowManual'
),
icon
:
'fa fa-file-text-o'
,
show
:
true
},
{
name
:
'vatPreviewProfitTable'
,
permission
:
constant
.
vatPermission
.
dataPreview
.
profitTable
.
queryCode
,
text
:
$translate
.
instant
(
'ProfitTable'
),
icon
:
'fa fa-file-text-o'
,
show
:
true
...
...
@@ -89,10 +93,6 @@
name
:
'vatPreviewTheBalanceSheet'
,
permission
:
constant
.
vatPermission
.
dataPreview
.
balanceSheet
.
queryCode
,
text
:
$translate
.
instant
(
'offBalanceSheet'
),
icon
:
'fa fa-file-text-o'
,
show
:
true
},
{
name
:
'cashFlowManual'
,
permission
:
constant
.
vatPermission
.
dataPreview
.
cashFlowManual
.
queryCode
,
text
:
$translate
.
instant
(
'CashFlowManual'
),
icon
:
'fa fa-file-text-o'
,
show
:
true
},
{
name
:
'adjustmentTab'
,
permission
:
constant
.
vatPermission
.
dataPreview
.
adjustmentTab
.
queryCode
,
text
:
$translate
.
instant
(
'adjustmentTable'
),
icon
:
'fa fa-file-text-o'
,
show
:
false
...
...
atms-web/src/main/webapp/app/vat/preview/vat-preview-cash-flow-manual/vat-preview-cash-flow-manual.ctrl.js
View file @
2cf0f02e
...
...
@@ -212,7 +212,6 @@
// });
// var ele2 = $("#certificationDateEnd");
// ele2.datepicker({
// startDate: $scope.startDate,
...
...
@@ -240,7 +239,7 @@
$scope
.
downloadCashFlow
=
function
()
{
var
localDate
=
$filter
(
'date'
)(
new
Date
(),
'yyyyMMddHHmmss'
);
var
fileName
=
"现金流量信息"
;
vatPreviewService
.
initExportCFData
(
$scope
.
queryParams
,
fileName
).
then
(
function
(
data
)
{
vatPreviewService
.
initExportCF
M
Data
(
$scope
.
queryParams
,
fileName
).
then
(
function
(
data
)
{
if
(
data
)
{
ackMessageBox
.
success
(
translate
(
'FileExportSuccess'
));
}
...
...
@@ -251,7 +250,6 @@
$log
.
debug
(
'VatPreviewInputInvoiceController.ctor()...'
);
initPeriods
();
showPopover
();
...
...
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