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
8302f314
Commit
8302f314
authored
Apr 22, 2019
by
kevin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_mysql' of
http://code.tech.tax.asia.pwcinternal.com/root/atms
into dev_mysql
parents
77ad3248
ce5d78ce
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
239 additions
and
68 deletions
+239
-68
SystemConfig.java
...ain/java/pwc/taxtech/atms/common/config/SystemConfig.java
+10
-0
TableauController.java
...n/java/pwc/taxtech/atms/controller/TableauController.java
+6
-0
TaxDocumentController.java
...va/pwc/taxtech/atms/controller/TaxDocumentController.java
+40
-0
TableauService.java
...in/java/pwc/taxtech/atms/service/impl/TableauService.java
+6
-0
ReportServiceImpl.java
.../pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
+7
-7
KPSR.java
.../taxtech/atms/vat/service/impl/report/functions/KPSR.java
+23
-11
conf.properties
atms-api/src/main/resources/conf/conf.properties
+2
-0
conf_profile_dev.properties
atms-api/src/main/resources/conf/conf_profile_dev.properties
+1
-0
conf_profile_pub.properties
atms-api/src/main/resources/conf/conf_profile_pub.properties
+2
-0
conf_profile_staging.properties
...i/src/main/resources/conf/conf_profile_staging.properties
+2
-0
conf_profile_uat.properties
atms-api/src/main/resources/conf/conf_profile_uat.properties
+1
-0
module-part2.js
atms-web/src/main/webapp/Scripts/module-part2.js
+18
-0
index.html
atms-web/src/main/webapp/WEB-INF/templates/index.html
+1
-1
app.json
atms-web/src/main/webapp/app-resources/i18n/zh-CN/app.json
+1
-0
dashboard.ctrl.js
...webapp/app/analysis/dashboard/dashboard/dashboard.ctrl.js
+35
-0
dashboard.html
...in/webapp/app/analysis/dashboard/dashboard/dashboard.html
+2
-0
dashboard.js
...main/webapp/app/analysis/dashboard/dashboard/dashboard.js
+23
-0
dashboard.less
...in/webapp/app/analysis/dashboard/dashboard/dashboard.less
+2
-0
tax-document-list.ctrl.js
...ocumentManage/tax-document-list/tax-document-list.ctrl.js
+47
-46
tax-document-list.svc.js
...DocumentManage/tax-document-list/tax-document-list.svc.js
+10
-3
No files found.
atms-api/src/main/java/pwc/taxtech/atms/common/config/SystemConfig.java
View file @
8302f314
...
...
@@ -37,6 +37,8 @@ public class SystemConfig {
private
String
tableauAustralianTax
;
@Value
(
"${tableau_brazilian_tax}"
)
private
String
tableauBrazilianTax
;
@Value
(
"${tableau_dashboard}"
)
private
String
tableauDashboard
;
public
String
getLongiApiBasicUser
()
{
return
this
.
longiApiBasicUser
;
...
...
@@ -157,4 +159,12 @@ public class SystemConfig {
public
void
setTableauBrazilianTax
(
String
tableauBrazilianTax
)
{
this
.
tableauBrazilianTax
=
tableauBrazilianTax
;
}
public
String
getTableauDashboard
()
{
return
this
.
tableauDashboard
;
}
public
void
setTableauDashboard
(
String
tableauDashboard
)
{
this
.
tableauDashboard
=
tableauDashboard
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/controller/TableauController.java
View file @
8302f314
...
...
@@ -83,4 +83,10 @@ public class TableauController extends BaseController {
return
ApiResultDto
.
success
(
tableauService
.
getBrazilianTax
().
orElse
(
StringUtils
.
EMPTY
));
}
@ResponseBody
@GetMapping
(
"dashboard"
)
public
ApiResultDto
getDashboard
()
{
return
ApiResultDto
.
success
(
tableauService
.
getBrazilianTax
().
orElse
(
StringUtils
.
EMPTY
));
}
}
atms-api/src/main/java/pwc/taxtech/atms/controller/TaxDocumentController.java
View file @
8302f314
...
...
@@ -9,14 +9,18 @@ import org.apache.commons.collections.CollectionUtils;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.poi.ss.usermodel.CellType
;
import
org.apache.poi.ss.usermodel.DateUtil
;
import
org.apache.poi.ss.usermodel.Workbook
;
import
org.apache.poi.ss.usermodel.WorkbookFactory
;
import
org.apache.poi.xssf.usermodel.XSSFCell
;
import
org.apache.poi.xssf.usermodel.XSSFRow
;
import
org.apache.poi.xssf.usermodel.XSSFSheet
;
import
org.apache.poi.xssf.usermodel.XSSFWorkbook
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.MediaType
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
pwc.taxtech.atms.common.POIUtil
;
import
pwc.taxtech.atms.common.PageResultVo
;
import
pwc.taxtech.atms.common.util.DateUtils
;
import
pwc.taxtech.atms.constant.enums.FileUploadEnum
;
...
...
@@ -24,6 +28,7 @@ import pwc.taxtech.atms.dpo.OrgSelectDto;
import
pwc.taxtech.atms.dto.TaxDocumentDto
;
import
pwc.taxtech.atms.entity.TaxDocument
;
import
pwc.taxtech.atms.service.impl.DidiFileUploadService
;
import
pwc.taxtech.atms.service.impl.HttpFileService
;
import
pwc.taxtech.atms.service.impl.OrganizationServiceImpl
;
import
pwc.taxtech.atms.service.impl.TaxDocumentServiceImpl
;
import
pwc.taxtech.atms.thirdparty.ExcelUtil
;
...
...
@@ -48,6 +53,8 @@ public class TaxDocumentController {
private
DidiFileUploadService
didiFileUploadService
;
@Autowired
private
OrganizationServiceImpl
organizationService
;
@Autowired
HttpFileService
httpFileService
;
@PostMapping
(
"selectList"
)
@ResponseBody
public
PageResultVo
<
TaxDocument
>
selectTaxDocumentList
(
@RequestBody
TaxDocumentDto
taxDocumentDto
)
{
...
...
@@ -394,4 +401,37 @@ public class TaxDocumentController {
dataArray
.
add
(
sheetJson
);
}
}
@RequestMapping
(
value
=
"/convertExcel"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
@ResponseBody
public
void
convertExcel
(
HttpServletResponse
response
,
String
url
){
InputStream
is
=
null
;
Workbook
tWorkbook
=
null
;
Workbook
workbook
=
new
XSSFWorkbook
();
OutputStream
ouputStream
=
null
;
try
{
is
=
httpFileService
.
getUserTemplate
(
url
);
tWorkbook
=
WorkbookFactory
.
create
(
is
);
for
(
int
i
=
0
;
i
<
tWorkbook
.
getNumberOfSheets
();
i
++){
POIUtil
.
cloneSheet
(
tWorkbook
.
getSheetAt
(
i
),
workbook
.
createSheet
(
tWorkbook
.
getSheetAt
(
i
).
getSheetName
()));
}
response
.
setContentType
(
"multipart/form-data"
);
ouputStream
=
response
.
getOutputStream
();
tWorkbook
.
write
(
ouputStream
);
}
catch
(
Exception
e
){
e
.
printStackTrace
();
}
finally
{
try
{
if
(
ouputStream
!=
null
)
{
ouputStream
.
close
();
}
if
(
is
!=
null
){
is
.
close
();
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/TableauService.java
View file @
8302f314
...
...
@@ -113,4 +113,10 @@ public class TableauService extends BaseService {
return
optional
.
map
(
s
->
String
.
format
(
systemConfig
.
getTableauBrazilianTax
(),
getTicket
(
s
).
orElse
(
StringUtils
.
EMPTY
)));
}
public
Optional
<
String
>
getDashboard
()
{
Optional
<
String
>
optional
=
authUserHelper
.
getCurrentAuditor
();
return
optional
.
map
(
s
->
String
.
format
(
systemConfig
.
getTableauDashboard
(),
getTicket
(
s
).
orElse
(
StringUtils
.
EMPTY
)));
}
}
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
View file @
8302f314
...
...
@@ -231,8 +231,7 @@ public class ReportServiceImpl extends BaseService {
return
operationResult
;
}
private
void
clearPeriodData
(
String
projectId
,
Integer
period
,
List
<
Long
>
templateIds
,
boolean
isMergeManualData
)
{
if
(
templateIds
.
isEmpty
())
templateIds
.
add
(
Long
.
MAX_VALUE
);
private
void
clearPeriodData
(
String
projectId
,
Integer
period
,
boolean
isMergeManualData
)
{
PeriodFormulaBlockExample
periodFormulaBlockExample
=
new
PeriodFormulaBlockExample
();
periodFormulaBlockExample
.
createCriteria
().
andProjectIdEqualTo
(
projectId
).
andPeriodEqualTo
(
period
);
periodFormulaBlockMapper
.
deleteByExample
(
periodFormulaBlockExample
);
...
...
@@ -242,15 +241,15 @@ public class ReportServiceImpl extends BaseService {
periodTaxRuleSettingMapper
.
deleteByExample
(
periodTaxRuleSettingExample
);
PeriodCellTemplateExample
periodCellTemplateExample
=
new
PeriodCellTemplateExample
();
periodCellTemplateExample
.
createCriteria
().
andProjectIdEqualTo
(
projectId
).
andPeriodEqualTo
(
period
)
.
andReportTemplateIdNotIn
(
templateIds
)
;
periodCellTemplateExample
.
createCriteria
().
andProjectIdEqualTo
(
projectId
).
andPeriodEqualTo
(
period
);
periodCellTemplateMapper
.
deleteByExample
(
periodCellTemplateExample
);
PeriodCellTemplateConfigExample
periodCellTemplateConfigExample
=
new
PeriodCellTemplateConfigExample
();
periodCellTemplateConfigExample
.
createCriteria
().
andProjectIdEqualTo
(
projectId
).
andPeriodEqualTo
(
period
)
.
andReportTemplateIdNotIn
(
templateIds
)
;
periodCellTemplateConfigExample
.
createCriteria
().
andProjectIdEqualTo
(
projectId
).
andPeriodEqualTo
(
period
);
periodCellTemplateConfigMapper
.
deleteByExample
(
periodCellTemplateConfigExample
);
PeriodTemplateExample
periodTemplateExample
=
new
PeriodTemplateExample
();
periodTemplateExample
.
createCriteria
().
andProjectIdEqualTo
(
projectId
).
andPeriodEqualTo
(
period
)
.
andTemplateIdNotIn
(
templateIds
)
;
periodTemplateExample
.
createCriteria
().
andProjectIdEqualTo
(
projectId
).
andPeriodEqualTo
(
period
);
periodTemplateMapper
.
deleteByExample
(
periodTemplateExample
);
PeriodTaxPayerReportRuleExample
periodTaxPayerReportRuleExample
=
new
PeriodTaxPayerReportRuleExample
();
...
...
@@ -304,12 +303,13 @@ public class ReportServiceImpl extends BaseService {
}
private
void
updateConfig
(
String
projectId
,
Integer
period
,
Boolean
isMergeManualData
,
List
<
Template
>
templates
,
PeriodJob
job
)
{
List
<
Long
>
exceptTemplateIds
=
templateMapper
.
getIdsForExceptTemplate
();
//财务报表不删除,这个逻辑用不到,先注释掉
// List<Long> exceptTemplateIds = templateMapper.getIdsForExceptTemplate();
//根据收入类型映射生成开票记录关联数据
assembleInvoiceRecord
(
projectId
,
period
,
isMergeManualData
);
//生成trial_balance_final数据
assembleTrialBalanceFinal
(
projectId
,
period
);
clearPeriodData
(
projectId
,
period
,
exceptTemplateIds
,
isMergeManualData
);
clearPeriodData
(
projectId
,
period
,
isMergeManualData
);
copyTemplateAndConfigFromAdmin
(
projectId
,
templates
,
period
);
setStatus
(
job
,
STATUS_END
);
periodJobMapper
.
updateByPrimaryKey
(
job
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/KPSR.java
View file @
8302f314
...
...
@@ -52,31 +52,35 @@ public class KPSR extends FunctionBase implements FreeRefFunction {
private
double
assembleData
(
String
revenueTypeName
,
List
<
OutputInvoiceDataSourceDto
>
contain
,
Integer
billType
,
Integer
amountType
,
OperationEvaluationContext
ec
)
{
String
queryDate
=
formulaContext
.
getYear
()
+
(
formulaContext
.
getPeriod
()
<
10
?
(
"0"
+
formulaContext
.
getPeriod
())
:
(
formulaContext
.
getPeriod
()
+
""
));
// RevenueTypeMappingExample typeMappingExample = new RevenueTypeMappingExample();
// typeMappingExample.createCriteria().andOrgIdEqualTo(formulaContext.getOrganizationId())
// .andRevenueTypeNameEqualTo(revenueTypeName).andStartDateLessThanOrEqualTo(queryDate)
// .andEndDateGreaterThanOrEqualTo(queryDate);
// List<RevenueTypeMapping> typeMappingList = SpringContextUtil.revenueTypeMappingMapper.selectByExample(typeMappingExample);
// if (CollectionUtils.isEmpty(typeMappingList)) {
// return 0.0;
// }
// List<String> revenueTypes = typeMappingList.stream()
// .map(o -> o.getRevenueTypeName()).collect(Collectors.toList());
RevenueConfigExample
configExample
=
new
RevenueConfigExample
();
configExample
.
createCriteria
().
andOrgIdEqualTo
(
formulaContext
.
getOrganizationId
()).
andStartDateLessThanOrEqualTo
(
queryDate
)
.
andEndDateGreaterThanOrEqualTo
(
queryDate
).
andNameEqualTo
(
revenueTypeName
);
.
andEndDateGreaterThanOrEqualTo
(
queryDate
).
andNameEqualTo
(
revenueTypeName
)
.
andStatusEqualTo
(
0
)
;
List
<
RevenueConfig
>
configDatas
=
SpringContextUtil
.
revenueConfigMapper
.
selectByExample
(
configExample
);
if
(
CollectionUtils
.
isEmpty
(
configDatas
))
{
return
0.0
;
}
RevenueTypeMappingExample
typeMappingExample
=
new
RevenueTypeMappingExample
();
typeMappingExample
.
createCriteria
().
andOrgIdEqualTo
(
formulaContext
.
getOrganizationId
())
.
andRevenueTypeNameEqualTo
(
revenueTypeName
).
andStartDateLessThanOrEqualTo
(
queryDate
)
.
andEndDateGreaterThanOrEqualTo
(
queryDate
).
andStatusEqualTo
(
0
);
List
<
RevenueTypeMapping
>
typeMappingList
=
SpringContextUtil
.
revenueTypeMappingMapper
.
selectByExample
(
typeMappingExample
);
if
(
CollectionUtils
.
isEmpty
(
typeMappingList
))
{
return
0.0
;
}
List
<
Long
>
revenueTypeIds
=
configDatas
.
stream
()
.
map
(
o
->
o
.
getId
()).
collect
(
Collectors
.
toList
());
List
<
InvoiceRecord
>
billDetails
=
new
ArrayList
<>();
InvoiceRecordExample
invoiceRecordExample
=
new
InvoiceRecordExample
();
InvoiceRecordExample
invoiceRecordExample
=
null
;
for
(
RevenueTypeMapping
typeMapping:
typeMappingList
){
invoiceRecordExample
=
new
InvoiceRecordExample
();
invoiceRecordExample
.
createCriteria
().
andRevenueCofIdIn
(
revenueTypeIds
)
.
andProjectIdEqualTo
(
formulaContext
.
getProjectId
())
.
andPeriodEqualTo
(
Integer
.
valueOf
(
queryDate
))
.
andTaxRateEqualTo
(
typeMapping
.
getTaxRate
())
.
andDepartmentEqualTo
(
typeMapping
.
getOuName
())
.
andInvoiceTypeEqualTo
(
InvoiceRecordEnum
.
InvoiceType
.
MAPPING
.
get
(
billType
));
List
<
InvoiceRecord
>
billDetails1
=
SpringContextUtil
.
invoiceRecordMapper
.
selectByExample
(
invoiceRecordExample
);
if
(
CollectionUtils
.
isNotEmpty
(
billDetails1
)){
...
...
@@ -92,11 +96,19 @@ public class KPSR extends FunctionBase implements FreeRefFunction {
invoiceRecordExample
.
createCriteria
().
andModifyRevenueCofIdIn
(
revenueTypeIds
)
.
andProjectIdEqualTo
(
formulaContext
.
getProjectId
())
.
andPeriodEqualTo
(
Integer
.
valueOf
(
queryDate
))
.
andTaxRateEqualTo
(
typeMapping
.
getTaxRate
())
.
andDepartmentEqualTo
(
typeMapping
.
getOuName
())
.
andInvoiceTypeEqualTo
(
InvoiceRecordEnum
.
InvoiceType
.
MAPPING
.
get
(
billType
));
List
<
InvoiceRecord
>
billDetails2
=
SpringContextUtil
.
invoiceRecordMapper
.
selectByExample
(
invoiceRecordExample
);
if
(
CollectionUtils
.
isNotEmpty
(
billDetails2
)){
billDetails
.
addAll
(
billDetails2
);
}
}
for
(
InvoiceRecord
invoiceRecord
:
billDetails
)
{
OutputInvoiceDataSourceDto
outputInvoiceDataSourceDto
=
new
OutputInvoiceDataSourceDto
();
outputInvoiceDataSourceDto
.
setAmount
(
FormulaHelper
.
roundValue
(
invoiceRecord
.
getInvoiceAmount
(),
...
...
atms-api/src/main/resources/conf/conf.properties
View file @
8302f314
...
...
@@ -81,3 +81,4 @@ tableau_global_overview=${tableau_global_overview}
tableau_mexican_tax
=
${tableau_mexican_tax}
tableau_australian_tax
=
${tableau_australian_tax}
tableau_brazilian_tax
=
${tableau_brazilian_tax}
tableau_dashboard
=
${tableau_dashboard}
\ No newline at end of file
atms-api/src/main/resources/conf/conf_profile_dev.properties
View file @
8302f314
...
...
@@ -70,3 +70,4 @@ tableau_global_overview=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_2019
tableau_mexican_tax
=
http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/Mexico?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_australian_tax
=
http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/Australia?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_brazilian_tax
=
http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/Brazil?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_dashboard
=
http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/Brazil?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
atms-api/src/main/resources/conf/conf_profile_pub.properties
View file @
8302f314
...
...
@@ -74,3 +74,5 @@ tableau_global_overview=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_2019
tableau_mexican_tax
=
http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/Mexico?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_australian_tax
=
http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/Australia?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_brazilian_tax
=
http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/Brazil?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_dashboard
=
http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/Brazil?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
atms-api/src/main/resources/conf/conf_profile_staging.properties
View file @
8302f314
...
...
@@ -69,3 +69,5 @@ tableau_global_overview=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_2019
tableau_mexican_tax
=
http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/Mexico?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_australian_tax
=
http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/Australia?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_brazilian_tax
=
http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/Brazil?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_dashboard
=
http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/Brazil?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
atms-api/src/main/resources/conf/conf_profile_uat.properties
View file @
8302f314
...
...
@@ -74,4 +74,5 @@ tableau_global_overview=http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/
tableau_mexican_tax
=
http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/Mexico?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_australian_tax
=
http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/Australia?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_brazilian_tax
=
http://172.20.201.98:8090/trusted/%s/views/UAT_20190409/Brazil?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_dashboard
=
http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/Brazil?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
atms-web/src/main/webapp/Scripts/module-part2.js
View file @
8302f314
...
...
@@ -1905,5 +1905,22 @@ var analysisModule = angular.module('app.analysis', ['ui.grid', 'ui.router','ui.
resolve
:
scriptDependencyProvider
.
createDependenciesMap
(
scriptDependencyProvider
.
analysis
),
sticky
:
true
});
$stateProvider
.
state
({
name
:
'analysisDashboard'
,
url
:
"/analysis/analysisDashboard"
,
dsr
:
true
,
views
:
{
'importContent'
:
{
controller
:
[
'$scope'
,
'$state'
,
'appTranslation'
,
function
(
$scope
,
$state
,
appTranslation
)
{
$scope
.
state
=
$state
;
appTranslation
.
load
([
appTranslation
.
appPart
]);
}],
template
:
'<analysis-dashboard></analysis-dashboard>'
}
},
resolve
:
scriptDependencyProvider
.
createDependenciesMap
(
scriptDependencyProvider
.
analysis
),
sticky
:
true
});
}]);
\ No newline at end of file
atms-web/src/main/webapp/WEB-INF/templates/index.html
View file @
8302f314
...
...
@@ -63,7 +63,7 @@
<!--@Html.AntiForgeryToken()-->
<div
class=
"wrapper"
>
<app-nav></app-nav>
<div
class=
"page-wrapper"
style=
"position:relative;overflow-x:hidden;
overflow-y:auto;
margin-top:55px"
>
<div
class=
"page-wrapper"
style=
"position:relative;overflow-x:hidden;margin-top:55px"
>
<div
class=
"main-contents"
ui-view
></div>
<div
class=
"data-import-contents"
ui-view=
"importContent"
></div>
<!--style="display: none"-->
</div>
...
...
atms-web/src/main/webapp/app-resources/i18n/zh-CN/app.json
View file @
8302f314
...
...
@@ -907,6 +907,7 @@
"MenuAustralianTax"
:
"澳洲税务分析"
,
"MenuBrazilianTax"
:
"巴西税务分析"
,
"MenuOtherCountries"
:
"其他国家税务分析"
,
"MenuDashboard"
:
"Dashboard"
,
"ApproveCommitted"
:
"审核中"
,
"ApproveAgreed"
:
"通过"
,
...
...
atms-web/src/main/webapp/app/analysis/dashboard/dashboard/dashboard.ctrl.js
0 → 100644
View file @
8302f314
analysisModule
.
controller
(
'AnalysisDashboardController'
,
[
'$scope'
,
'$filter'
,
'$log'
,
'$translate'
,
'$http'
,
'SweetAlert'
,
'apiConfig'
,
function
(
$scope
,
$filter
,
$log
,
$translate
,
$http
,
SweetAlert
,
apiConfig
)
{
'use strict'
;
function
init
()
{
$http
.
get
(
'/tableau/dashboard'
,
apiConfig
.
createVat
())
.
success
(
function
(
res
)
{
if
(
res
&&
0
===
res
.
code
)
{
var
placeholderDiv
=
document
.
getElementById
(
'vizContainer'
);
var
url
=
res
.
data
;
var
options
=
{
onFirstInteractive
:
function
()
{
// The viz is now ready and can be safely used.
console
.
log
(
"Run this code when the viz has finished loading."
);
}
};
try
{
new
tableau
.
Viz
(
placeholderDiv
,
url
,
options
);
}
catch
(
e
)
{
}
}
else
{
SweetAlert
.
error
(
$translate
.
instant
(
'SystemError'
));
}
});
}
init
();
(
function
initialize
()
{
})();
}
]);
\ No newline at end of file
atms-web/src/main/webapp/app/analysis/dashboard/dashboard/dashboard.html
0 → 100644
View file @
8302f314
<div
id=
"vizContainer"
style=
"display: flex; justify-content: center; height: 90%"
></div>
\ No newline at end of file
atms-web/src/main/webapp/app/analysis/dashboard/dashboard/dashboard.js
0 → 100644
View file @
8302f314
analysisModule
.
directive
(
'analysisDashboard'
,
[
'$log'
,
function
(
$log
)
{
'use strict'
;
return
{
restrict
:
'E'
,
templateUrl
:
'/app/analysis/dashboard/dashboard/dashboard.html'
+
'?_='
+
Math
.
random
(),
scope
:
{
serviceTypeId
:
"=?"
,
periodId
:
"=?"
},
controller
:
'AnalysisDashboardController'
,
link
:
function
(
scope
,
element
)
{
$
(
'.main-contents'
)[
0
].
style
.
width
=
"260px"
;
$
(
'.data-import-contents'
)[
0
].
style
.
display
=
"block"
;
$
(
'.main-contents'
)[
0
].
style
.
float
=
"left"
;
$
(
'.main-contents'
)[
0
].
style
.
styleFloat
=
"left"
;
$
(
'.main-contents'
)[
0
].
style
.
cssFloat
=
"left"
;
}
};
}
]);
\ No newline at end of file
atms-web/src/main/webapp/app/analysis/dashboard/dashboard/dashboard.less
0 → 100644
View file @
8302f314
@import "~/app-resources/less/theme.less";
\ No newline at end of file
atms-web/src/main/webapp/app/taxDocumentManage/tax-document-list/tax-document-list.ctrl.js
View file @
8302f314
...
...
@@ -1313,8 +1313,8 @@ taxDocumentManageModule.directive('multiFileUploader', function () {
taxDocumentManageModule
.
directive
(
'filePreview'
,
function
()
{
return
{
restrict
:
'EA'
,
controller
:
[
'$scope'
,
'$translate'
,
'SweetAlert'
,
'$compile'
,
'taxDocumentListService'
,
'$q'
,
function
(
$scope
,
$translate
,
SweetAlert
,
$compile
,
taxDocumentListService
,
$q
)
{
controller
:
[
'$
log'
,
'$
scope'
,
'$translate'
,
'SweetAlert'
,
'$compile'
,
'taxDocumentListService'
,
'$q'
,
function
(
$
log
,
$
scope
,
$translate
,
SweetAlert
,
$compile
,
taxDocumentListService
,
$q
)
{
$scope
.
previewData
=
[];
/**上传时预览的功能取消 2019/3/8*/
...
...
@@ -1406,8 +1406,8 @@ taxDocumentManageModule.directive('filePreview', function () {
var
fileType
=
fileName
.
split
(
"."
).
pop
();
if
(
/xlsx|xls/i
.
test
(
fileType
))
{
taxDocumentListService
.
viewExcelBySpread
(
filePositionUrl
).
then
(
function
(
reportSpread
)
{
$
(
'#busy-indicator-container'
).
show
();
taxDocumentListService
.
viewExcelBySpread
(
file
Type
,
file
PositionUrl
).
then
(
function
(
reportSpread
)
{
var
spreadCtrl
=
new
GC
.
Spread
.
Sheets
.
Workbook
(
document
.
getElementById
(
"excetlContainer"
));
if
(
spreadCtrl
)
{
spreadCtrl
.
destroy
();
...
...
@@ -1416,10 +1416,11 @@ taxDocumentManageModule.directive('filePreview', function () {
if
(
!
_
.
isEmpty
(
reportSpread
))
{
initSpreadExcel
(
reportSpread
).
then
(
function
(
spread
)
{
/* return locateCell(spread, true);*/
$
(
'#busy-indicator-container'
).
hide
();
});
}
},
function
(
data
)
{
$
(
'#busy-indicator-container'
).
hide
();
$log
.
info
(
data
);
});
}
...
...
@@ -1441,49 +1442,49 @@ taxDocumentManageModule.directive('filePreview', function () {
var
initSpreadExcel
=
function
(
reportSpread
)
{
$
(
"#filePreviewPop"
).
modal
(
"show"
);
var
spread
=
new
GC
.
Spread
.
Sheets
.
Workbook
(
document
.
getElementById
(
"excetlContainer"
));
spread
.
suspendPaint
();
//
spread.suspendPaint();
spread
.
fromJSON
(
reportSpread
);
spread
.
options
.
showVerticalScrollbar
=
true
;
spread
.
options
.
showHorizontalScrollbar
=
true
;
spread
.
options
.
scrollbarMaxAlign
=
true
;
spread
.
options
.
scrollbarShowMax
=
true
;
spread
.
options
.
tabNavigationVisible
=
true
;
if
(
constant
.
regesterInformation
.
active
)
{
spread
.
options
.
tabEditable
=
false
;
spread
.
options
.
tabStripVisible
=
false
;
spread
.
options
.
newTabVisible
=
false
;
}
spread
.
options
.
allowUndo
=
false
;
spread
.
options
.
allowUserResize
=
false
;
spread
.
options
.
allowUserDragDrop
=
false
;
spread
.
options
.
allowUserDragFill
=
false
;
spread
.
options
.
allowUserEditFormula
=
false
;
spread
.
options
.
allowContextMenu
=
false
;
//todo:注册之后这里去掉注释
//var sheet = spread.getActiveSheet();
var
sheet
;
if
(
constant
.
regesterInformation
.
active
)
{
sheet
=
spread
.
getActiveSheet
();
}
else
{
sheet
=
spread
.
getSheet
(
1
);
}
if
(
sheet
!=
null
)
{
sheet
.
options
.
rowHeaderVisible
=
true
;
sheet
.
options
.
colHeaderVisible
=
true
;
sheet
.
options
.
gridline
.
showVerticalGridline
=
true
;
sheet
.
options
.
gridline
.
showHorizontalGridline
=
true
;
sheet
.
options
.
isProtected
=
true
;
sheet
.
clearSelection
();
}
// setColWidth(sheet);
// if(sheet.getRowCount() <= 38)
// scope.relation.addEbitRow(sheet)
// if (scope.templateId && scope.reportSource) {
// setData();
// spread.options.showVerticalScrollbar = true;
// spread.options.showHorizontalScrollbar = true;
// spread.options.scrollbarMaxAlign = true;
// spread.options.scrollbarShowMax = true;
// spread.options.tabNavigationVisible = true;
// if (constant.regesterInformation.active) {
// spread.options.tabEditable = false;
// spread.options.tabStripVisible = false;
// spread.options.newTabVisible = false;
// }
// spread.options.allowUndo = false;
// spread.options.allowUserResize = false;
// spread.options.allowUserDragDrop = false;
// spread.options.allowUserDragFill = false;
// spread.options.allowUserEditFormula = false;
// spread.options.allowContextMenu = false;
// //todo:注册之后这里去掉注释
// //var sheet = spread.getActiveSheet();
//
// var sheet;
// if (constant.regesterInformation.active) {
// sheet = spread.getActiveSheet();
// } else {
// sheet = spread.getSheet(1);
// }
// if (sheet != null) {
// sheet.options.rowHeaderVisible = true;
// sheet.options.colHeaderVisible = true;
// sheet.options.gridline.showVerticalGridline = true;
// sheet.options.gridline.showHorizontalGridline = true;
// sheet.options.isProtected = true;
// sheet.clearSelection();
// }
sheet
.
setRowResizable
(
0
,
false
,
GC
.
Spread
.
Sheets
.
SheetArea
.
viewport
);
spread
.
resumePaint
();
// // setColWidth(sheet);
// // if(sheet.getRowCount() <= 38)
// // scope.relation.addEbitRow(sheet)
// // if (scope.templateId && scope.reportSource) {
// // setData();
// // }
// sheet.setRowResizable(0, false, GC.Spread.Sheets.SheetArea.viewport);
// spread.resumePaint();
return
$q
.
when
(
spread
);
};
...
...
atms-web/src/main/webapp/app/taxDocumentManage/tax-document-list/tax-document-list.svc.js
View file @
8302f314
...
...
@@ -183,12 +183,17 @@ taxDocumentManageModule.factory('taxDocumentListService',
return
defer
.
promise
;
},
viewExcelBySpread
:
function
(
url
)
{
viewExcelBySpread
:
function
(
fileType
,
url
)
{
var
deferred
=
$q
.
defer
();
var
promise
=
deferred
.
promise
;
var
xhr
=
new
XMLHttpRequest
();
xhr
.
open
(
'GET'
,
url
,
true
);
// 也可以使用POST方式,根据接口
if
(
"xls"
==
fileType
){
xhr
.
open
(
'POST'
,
apiInterceptor
.
webApiHostUrl
+
'/taxDoc/convertExcel'
,
true
);
xhr
.
setRequestHeader
(
"Authorization"
,
apiInterceptor
.
tokenType
+
' '
+
apiInterceptor
.
apiToken
());
}
else
{
xhr
.
open
(
'GET'
,
url
,
true
);
}
xhr
.
responseType
=
"blob"
;
// 返回类型blob
// 定义请求完成的处理函数,请求前也可以增加加载框/禁用下载按钮逻辑
xhr
.
onload
=
function
()
{
...
...
@@ -207,7 +212,9 @@ taxDocumentManageModule.factory('taxDocumentListService',
}
};
// 发送ajax请求
xhr
.
send
();
var
data
=
new
FormData
();
data
.
append
(
"url"
,
url
);
xhr
.
send
(
data
);
return
promise
;
}
};
...
...
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