Commit 482db203 authored by eddie.woo's avatar eddie.woo

tableau分析图表

parent ddb37e77
......@@ -12,6 +12,32 @@ public class SystemConfig {
@Value("${longi_api_gl_balance}")
private String longiApiGlBalance;
//tableau相关配置
@Value("${tableau_get_ticket}")
private String tableauGetTicket;
@Value("${tableau_unreturned_tax}")
private String tableauUnreturnedTax;
@Value("${tableau_tax_comparison}")
private String tableauTaxComparison;
@Value("${tableau_other_countries}")
private String tableauOtherCountries;
@Value("${tableau_cost_analysis}")
private String tableauCostAnalysis;
@Value("${tableau_profit_and_loss}")
private String tableauProfitAndLoss;
@Value("${tableau_other_domestic_data}")
private String tableauOtherDomesticData;
@Value("${tableau_doc_situation}")
private String tableauDocSituation;
@Value("${tableau_global_overview}")
private String tableauGlobalOverview;
@Value("${tableau_mexican_tax}")
private String tableauMexicanTax;
@Value("${tableau_australian_tax}")
private String tableauAustralianTax;
@Value("${tableau_brazilian_tax}")
private String tableauBrazilianTax;
public String getLongiApiBasicUser() {
return this.longiApiBasicUser;
}
......@@ -35,4 +61,100 @@ public class SystemConfig {
public void setLongiApiGlBalance(String longiApiGlBalance) {
this.longiApiGlBalance = longiApiGlBalance;
}
public String getTableauGetTicket() {
return this.tableauGetTicket;
}
public void setTableauGetTicket(String tableauGetTicket) {
this.tableauGetTicket = tableauGetTicket;
}
public String getTableauUnreturnedTax() {
return this.tableauUnreturnedTax;
}
public void setTableauUnreturnedTax(String tableauUnreturnedTax) {
this.tableauUnreturnedTax = tableauUnreturnedTax;
}
public String getTableauTaxComparison() {
return this.tableauTaxComparison;
}
public void setTableauTaxComparison(String tableauTaxComparison) {
this.tableauTaxComparison = tableauTaxComparison;
}
public String getTableauOtherCountries() {
return this.tableauOtherCountries;
}
public void setTableauOtherCountries(String tableauOtherCountries) {
this.tableauOtherCountries = tableauOtherCountries;
}
public String getTableauCostAnalysis() {
return this.tableauCostAnalysis;
}
public void setTableauCostAnalysis(String tableauCostAnalysis) {
this.tableauCostAnalysis = tableauCostAnalysis;
}
public String getTableauProfitAndLoss() {
return this.tableauProfitAndLoss;
}
public void setTableauProfitAndLoss(String tableauProfitAndLoss) {
this.tableauProfitAndLoss = tableauProfitAndLoss;
}
public String getTableauOtherDomesticData() {
return this.tableauOtherDomesticData;
}
public void setTableauOtherDomesticData(String tableauOtherDomesticData) {
this.tableauOtherDomesticData = tableauOtherDomesticData;
}
public String getTableauDocSituation() {
return this.tableauDocSituation;
}
public void setTableauDocSituation(String tableauDocSituation) {
this.tableauDocSituation = tableauDocSituation;
}
public String getTableauGlobalOverview() {
return this.tableauGlobalOverview;
}
public void setTableauGlobalOverview(String tableauGlobalOverview) {
this.tableauGlobalOverview = tableauGlobalOverview;
}
public String getTableauMexicanTax() {
return this.tableauMexicanTax;
}
public void setTableauMexicanTax(String tableauMexicanTax) {
this.tableauMexicanTax = tableauMexicanTax;
}
public String getTableauAustralianTax() {
return this.tableauAustralianTax;
}
public void setTableauAustralianTax(String tableauAustralianTax) {
this.tableauAustralianTax = tableauAustralianTax;
}
public String getTableauBrazilianTax() {
return this.tableauBrazilianTax;
}
public void setTableauBrazilianTax(String tableauBrazilianTax) {
this.tableauBrazilianTax = tableauBrazilianTax;
}
}
package pwc.taxtech.atms.controller;
import org.apache.commons.lang3.StringUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import pwc.taxtech.atms.dto.ApiResultDto;
import pwc.taxtech.atms.service.impl.TableauService;
import javax.annotation.Resource;
@RestController
@RequestMapping("/api/v1/tableau")
public class TableauController extends BaseController {
@Resource
private TableauService tableauService;
@ResponseBody
@GetMapping("unreturnedTax")
public ApiResultDto getUnreturnedTax() {
return ApiResultDto.success(tableauService.getUnreturnedTax().orElse(StringUtils.EMPTY));
}
@ResponseBody
@GetMapping("taxComparison")
public ApiResultDto getTaxComparison() {
return ApiResultDto.success(tableauService.getTaxComparison().orElse(StringUtils.EMPTY));
}
@ResponseBody
@GetMapping("otherCountries")
public ApiResultDto getOtherCountries() {
return ApiResultDto.success(tableauService.getOtherCountries().orElse(StringUtils.EMPTY));
}
@ResponseBody
@GetMapping("costAnalysis")
public ApiResultDto getCostAnalysis() {
return ApiResultDto.success(tableauService.getCostAnalysis().orElse(StringUtils.EMPTY));
}
@ResponseBody
@GetMapping("profitAndLoss")
public ApiResultDto getProfitAndLoss() {
return ApiResultDto.success(tableauService.getProfitAndLoss().orElse(StringUtils.EMPTY));
}
@ResponseBody
@GetMapping("otherDomesticData")
public ApiResultDto getOtherDomesticData() {
return ApiResultDto.success(tableauService.getOtherDomesticData().orElse(StringUtils.EMPTY));
}
@ResponseBody
@GetMapping("docSituation")
public ApiResultDto getDocSituation() {
return ApiResultDto.success(tableauService.getDocSituation().orElse(StringUtils.EMPTY));
}
@ResponseBody
@GetMapping("globalOverview")
public ApiResultDto getGlobalOverview() {
return ApiResultDto.success(tableauService.getGlobalOverview().orElse(StringUtils.EMPTY));
}
@ResponseBody
@GetMapping("mexicanTax")
public ApiResultDto getMexicanTax() {
return ApiResultDto.success(tableauService.getMexicanTax().orElse(StringUtils.EMPTY));
}
@ResponseBody
@GetMapping("australianTax")
public ApiResultDto getAustralianTax() {
return ApiResultDto.success(tableauService.getAustralianTax().orElse(StringUtils.EMPTY));
}
@ResponseBody
@GetMapping("brazilianTax")
public ApiResultDto getBrazilianTax() {
return ApiResultDto.success(tableauService.getBrazilianTax().orElse(StringUtils.EMPTY));
}
}
package pwc.taxtech.atms.service.impl;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.common.config.SystemConfig;
import javax.annotation.Resource;
import java.io.IOException;
import java.util.Optional;
@Service
public class TableauService extends BaseService {
@Resource
private SystemConfig systemConfig;
/**
* 获取ticket
*
* @param username 用户名
* @return Optional<String>
*/
public Optional<String> getTicket(String username) {
CloseableHttpClient httpClient = null;
try {
String ticketUrl = String.format(systemConfig.getTableauGetTicket(), username);
httpClient = HttpClients.createDefault();
HttpPost httpPost = new HttpPost(ticketUrl);
HttpResponse httpResponse = httpClient.execute(httpPost);
String response = IOUtils.toString(httpResponse.getEntity().getContent(), "UTF-8");
return StringUtils.equals(response, "-1") ? Optional.empty() : Optional.of(response);
} catch (Exception e) {
logger.error("getTicket error.", e);
} finally {
if (null != httpClient) {
try {
httpClient.close();
} catch (IOException e) {
logger.error("close httpClient error.", e);
}
}
}
return Optional.empty();
}
public Optional<String> getUnreturnedTax() {
Optional<String> optional = authUserHelper.getCurrentAuditor();
return optional.map(s -> String.format(systemConfig.getTableauUnreturnedTax(),
getTicket(s).orElse(StringUtils.EMPTY)));
}
public Optional<String> getTaxComparison() {
Optional<String> optional = authUserHelper.getCurrentAuditor();
return optional.map(s -> String.format(systemConfig.getTableauTaxComparison(),
getTicket(s).orElse(StringUtils.EMPTY)));
}
public Optional<String> getOtherCountries() {
Optional<String> optional = authUserHelper.getCurrentAuditor();
return optional.map(s -> String.format(systemConfig.getTableauOtherCountries(),
getTicket(s).orElse(StringUtils.EMPTY)));
}
public Optional<String> getCostAnalysis() {
Optional<String> optional = authUserHelper.getCurrentAuditor();
return optional.map(s -> String.format(systemConfig.getTableauCostAnalysis(),
getTicket(s).orElse(StringUtils.EMPTY)));
}
public Optional<String> getProfitAndLoss() {
Optional<String> optional = authUserHelper.getCurrentAuditor();
return optional.map(s -> String.format(systemConfig.getTableauProfitAndLoss(),
getTicket(s).orElse(StringUtils.EMPTY)));
}
public Optional<String> getOtherDomesticData() {
Optional<String> optional = authUserHelper.getCurrentAuditor();
return optional.map(s -> String.format(systemConfig.getTableauOtherDomesticData(),
getTicket(s).orElse(StringUtils.EMPTY)));
}
public Optional<String> getDocSituation() {
Optional<String> optional = authUserHelper.getCurrentAuditor();
return optional.map(s -> String.format(systemConfig.getTableauDocSituation(),
getTicket(s).orElse(StringUtils.EMPTY)));
}
public Optional<String> getGlobalOverview() {
Optional<String> optional = authUserHelper.getCurrentAuditor();
return optional.map(s -> String.format(systemConfig.getTableauGlobalOverview(),
getTicket(s).orElse(StringUtils.EMPTY)));
}
public Optional<String> getMexicanTax() {
Optional<String> optional = authUserHelper.getCurrentAuditor();
return optional.map(s -> String.format(systemConfig.getTableauMexicanTax(),
getTicket(s).orElse(StringUtils.EMPTY)));
}
public Optional<String> getAustralianTax() {
Optional<String> optional = authUserHelper.getCurrentAuditor();
return optional.map(s -> String.format(systemConfig.getTableauAustralianTax(),
getTicket(s).orElse(StringUtils.EMPTY)));
}
public Optional<String> getBrazilianTax() {
Optional<String> optional = authUserHelper.getCurrentAuditor();
return optional.map(s -> String.format(systemConfig.getTableauBrazilianTax(),
getTicket(s).orElse(StringUtils.EMPTY)));
}
}
......@@ -147,7 +147,8 @@ public class ReportGeneratorImpl {
List<PeriodFormulaBlock> periodFormulaBlocks = periodFormulaBlockMapper.selectByExample(periodFormulaBlockExample2);
//TODO:如果formula 为 ND(100) +ND(22) ,需要使用正则表达式拆分出自定义公式,然后根据自定义公式取formulablock 的数据进行替换
String regex = "[A-Z]*\\([\\-A-Za-z0-9\\\"\\,\\.\\:\\u4e00-\\u9fa5\\%]*\\)";
// String regex = "[A-Z]*\\([\\-A-Za-z0-9\\\"\\,\\.\\:\\u4e00-\\u9fa5\\%]*\\)";
String regex = "[A-Z]*\\([^(^)]*\\)";
Pattern p = Pattern.compile(regex);
String sourceFormula = StringUtils.isNotBlank(periodCellTemplateConfig.getKeyValueParsedFormula()) ?
periodCellTemplateConfig.getKeyValueParsedFormula() :
......
......@@ -58,3 +58,17 @@ org_sync_url=${org_sync_url}
org_sync_token=${org_sync_token}
ebs_call_url=${ebs_call_url}
#tableau config
tableau_get_ticket=${tableau_get_ticket}
tableau_unreturned_tax=${tableau_unreturned_tax}
tableau_tax_comparison=${tableau_tax_comparison}
tableau_other_countries=${tableau_other_countries}
tableau_cost_analysis=${tableau_cost_analysis}
tableau_profit_and_loss=${tableau_profit_and_loss}
tableau_other_domestic_data=${tableau_other_domestic_data}
tableau_doc_situation=${tableau_doc_situation}
tableau_global_overview=${tableau_global_overview}
tableau_mexican_tax=${tableau_mexican_tax}
tableau_australian_tax=${tableau_australian_tax}
tableau_brazilian_tax=${tableau_brazilian_tax}
\ No newline at end of file
......@@ -45,7 +45,7 @@ file_upload_query_url=http://47.94.233.173:11006/resource/erp_tax_system
#didi-config
#ϵַget_user_info_url=http://mis.diditaxi.com.cn/auth/sso/api/
#���ϵ�ַget_user_info_url=http://mis.diditaxi.com.cn/auth/sso/api/
check_ticket=false
get_user_info_url=http://mis-test.diditaxi.com.cn/auth/sso/api/
app_id=2500
......@@ -56,3 +56,17 @@ org_sync_url=http://10.96.238.10/erp-main-data-test-v2/api/companies
org_sync_token=174af08f
ebs_call_url=http://172.20.201.201:8020/ebs-proxy-test/dts
#tableau config
tableau_get_ticket=http://47.94.233.173:16010/trusted?username=%s
tableau_unreturned_tax=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet8?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_tax_comparison=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet14?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_other_countries=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet8?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_cost_analysis=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet19?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_profit_and_loss=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet26?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_other_domestic_data=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet32?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_doc_situation=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet8?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_global_overview=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet8?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_mexican_tax=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet8?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/sheet8?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/sheet8?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
......@@ -48,7 +48,7 @@ env_type=pub
file_upload_post_url=http://100.69.238.155:8000/resource/erp_tax_system
file_upload_query_url=http://100.69.238.155:8001/resource/erp_tax_system
#ϵַget_user_info_url=http://mis.diditaxi.com.cn/auth/sso/api/
#���ϵ�ַget_user_info_url=http://mis.diditaxi.com.cn/auth/sso/api/
check_ticket=true
get_user_info_url=http://mis.diditaxi.com.cn/auth/sso/api/
app_id=2500
......@@ -59,3 +59,17 @@ org_sync_url=http://10.96.238.10/erp-main-data-test-v2/api/companies
org_sync_token=174af08f
ebs_call_url=http://172.20.201.201:8020/ebs-proxy-test/dts
#tableau config
tableau_get_ticket=http://47.94.233.173:16010/trusted?username=%s
tableau_unreturned_tax=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet8?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_tax_comparison=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet14?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_other_countries=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet8?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_cost_analysis=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet19?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_profit_and_loss=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet26?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_other_domestic_data=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet32?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_doc_situation=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet8?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_global_overview=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet8?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_mexican_tax=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet8?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/sheet8?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/sheet8?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
......@@ -43,7 +43,7 @@ env_type=dev
file_upload_post_url=http://47.94.233.173:11005/resource/erp_tax_system
file_upload_query_url=http://47.94.233.173:11006/resource/erp_tax_system
#ϵַget_user_info_url=http://mis.diditaxi.com.cn/auth/sso/api/
#���ϵ�ַget_user_info_url=http://mis.diditaxi.com.cn/auth/sso/api/
check_ticket=false
get_user_info_url=http://mis-test.diditaxi.com.cn/auth/sso/api/
app_id=2500
......@@ -54,3 +54,17 @@ org_sync_url=http://10.96.238.10/erp-main-data-test-v2/api/companies
org_sync_token=174af08f
ebs_call_url=http://172.20.201.201:8020/ebs-proxy-test/dts
#tableau config
tableau_get_ticket=http://47.94.233.173:16010/trusted?username=%s
tableau_unreturned_tax=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet8?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_tax_comparison=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet14?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_other_countries=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet8?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_cost_analysis=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet19?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_profit_and_loss=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet26?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_other_domestic_data=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet32?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_doc_situation=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet8?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_global_overview=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet8?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
tableau_mexican_tax=http://10.158.230.16:8890/trusted/%s/views/Didi_Tax_20190307/sheet8?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/sheet8?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/sheet8?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no&:toolbar=no
......@@ -1700,5 +1700,175 @@ var analysisModule = angular.module('app.analysis', ['ui.grid', 'ui.router','ui.
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.analysis),
sticky: true
});
$stateProvider.state({
name: 'australianTax',
url: "/analysis/australianTax",
dsr: true,
views: {
'importContent': {
controller: ['$scope', '$state','appTranslation',
function ($scope, $state, appTranslation) {
$scope.state = $state;
appTranslation.load([appTranslation.appPart]);
}],
template: '<australian-tax></australian-tax>'
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.analysis),
sticky: true
});
$stateProvider.state({
name: 'brazilianTax',
url: "/analysis/brazilianTax",
dsr: true,
views: {
'importContent': {
controller: ['$scope', '$state','appTranslation',
function ($scope, $state, appTranslation) {
$scope.state = $state;
appTranslation.load([appTranslation.appPart]);
}],
template: '<brazilian-tax></brazilian-tax>'
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.analysis),
sticky: true
});
$stateProvider.state({
name: 'costAnalysis',
url: "/analysis/costAnalysis",
dsr: true,
views: {
'importContent': {
controller: ['$scope', '$state','appTranslation',
function ($scope, $state, appTranslation) {
$scope.state = $state;
appTranslation.load([appTranslation.appPart]);
}],
template: '<cost-analysis></cost-analysis>'
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.analysis),
sticky: true
});
$stateProvider.state({
name: 'docSituation',
url: "/analysis/docSituation",
dsr: true,
views: {
'importContent': {
controller: ['$scope', '$state','appTranslation',
function ($scope, $state, appTranslation) {
$scope.state = $state;
appTranslation.load([appTranslation.appPart]);
}],
template: '<doc-situation></doc-situation>'
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.analysis),
sticky: true
});
$stateProvider.state({
name: 'globalOverview',
url: "/analysis/globalOverview",
dsr: true,
views: {
'importContent': {
controller: ['$scope', '$state','appTranslation',
function ($scope, $state, appTranslation) {
$scope.state = $state;
appTranslation.load([appTranslation.appPart]);
}],
template: '<global-overview></global-overview>'
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.analysis),
sticky: true
});
$stateProvider.state({
name: 'mexicanTax',
url: "/analysis/mexicanTax",
dsr: true,
views: {
'importContent': {
controller: ['$scope', '$state','appTranslation',
function ($scope, $state, appTranslation) {
$scope.state = $state;
appTranslation.load([appTranslation.appPart]);
}],
template: '<mexican-tax></mexican-tax>'
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.analysis),
sticky: true
});
$stateProvider.state({
name: 'otherDomesticData',
url: "/analysis/otherDomesticData",
dsr: true,
views: {
'importContent': {
controller: ['$scope', '$state','appTranslation',
function ($scope, $state, appTranslation) {
$scope.state = $state;
appTranslation.load([appTranslation.appPart]);
}],
template: '<other-domestic-data></other-domestic-data>'
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.analysis),
sticky: true
});
$stateProvider.state({
name: 'otherCountries',
url: "/analysis/otherCountries",
dsr: true,
views: {
'importContent': {
controller: ['$scope', '$state','appTranslation',
function ($scope, $state, appTranslation) {
$scope.state = $state;
appTranslation.load([appTranslation.appPart]);
}],
template: '<other-countries></other-countries>'
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.analysis),
sticky: true
});
$stateProvider.state({
name: 'profitAndLoss',
url: "/analysis/profitAndLoss",
dsr: true,
views: {
'importContent': {
controller: ['$scope', '$state','appTranslation',
function ($scope, $state, appTranslation) {
$scope.state = $state;
appTranslation.load([appTranslation.appPart]);
}],
template: '<profit-and-loss></profit-and-loss>'
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.analysis),
sticky: true
});
$stateProvider.state({
name: 'taxComparison',
url: "/analysis/taxComparison",
dsr: true,
views: {
'importContent': {
controller: ['$scope', '$state','appTranslation',
function ($scope, $state, appTranslation) {
$scope.state = $state;
appTranslation.load([appTranslation.appPart]);
}],
template: '<tax-comparison></tax-comparison>'
}
},
resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.analysis),
sticky: true
});
}]);
\ No newline at end of file
analysisModule.controller('AustralianTaxController', ['$scope','$filter', '$log', '$translate', '$http','SweetAlert',
'apiConfig',
function ($scope,$filter, $log, $translate, $http,SweetAlert,apiConfig) {
'use strict';
function init() {
$http.get('/tableau/australianTax', 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
<div id="vizContainer" style="display: flex; justify-content: center; height: 90%"></div>
\ No newline at end of file
analysisModule.directive('australianTax', ['$log',
function ($log) {
'use strict';
return {
restrict: 'E',
templateUrl: '/app/analysis/dashboard/australian-tax/australian-tax.html' + '?_=' + Math.random(),
scope: {
serviceTypeId: "=?",
periodId: "=?"
},
controller: 'AustralianTaxController',
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
@import "~/app-resources/less/theme.less";
\ No newline at end of file
analysisModule.controller('BrazilianTaxController', ['$scope','$filter', '$log', '$translate', '$http','SweetAlert',
'apiConfig',
function ($scope,$filter, $log, $translate, $http,SweetAlert,apiConfig) {
'use strict';
function init() {
$http.get('/tableau/brazilianTax', 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
<div id="vizContainer" style="display: flex; justify-content: center; height: 90%"></div>
\ No newline at end of file
analysisModule.directive('brazilianTax', ['$log',
function ($log) {
'use strict';
return {
restrict: 'E',
templateUrl: '/app/analysis/dashboard/brazilian-tax/brazilian-tax.html' + '?_=' + Math.random(),
scope: {
serviceTypeId: "=?",
periodId: "=?"
},
controller: 'BrazilianTaxController',
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
@import "~/app-resources/less/theme.less";
\ No newline at end of file
analysisModule.controller('CostAnalysisController', ['$scope','$filter', '$log', '$translate', '$http','SweetAlert',
'apiConfig',
function ($scope,$filter, $log, $translate, $http,SweetAlert,apiConfig) {
'use strict';
function init() {
$http.get('/tableau/costAnalysis', 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
<div id="vizContainer" style="display: flex; justify-content: center; height: 90%"></div>
\ No newline at end of file
analysisModule.directive('costAnalysis', ['$log',
function ($log) {
'use strict';
return {
restrict: 'E',
templateUrl: '/app/analysis/dashboard/cost-analysis/cost-analysis.html' + '?_=' + Math.random(),
scope: {
serviceTypeId: "=?",
periodId: "=?"
},
controller: 'CostAnalysisController',
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
@import "~/app-resources/less/theme.less";
\ No newline at end of file
analysisModule.controller('DocSituationController', ['$scope','$filter', '$log', '$translate', '$http','SweetAlert',
'apiConfig',
function ($scope,$filter, $log, $translate, $http,SweetAlert,apiConfig) {
'use strict';
function init() {
$http.get('/tableau/docSituation', 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
<div id="vizContainer" style="display: flex; justify-content: center; height: 90%"></div>
\ No newline at end of file
analysisModule.directive('docSituation', ['$log',
function ($log) {
'use strict';
return {
restrict: 'E',
templateUrl: '/app/analysis/dashboard/doc-situation/doc-situation.html' + '?_=' + Math.random(),
scope: {
serviceTypeId: "=?",
periodId: "=?"
},
controller: 'DocSituationController',
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
@import "~/app-resources/less/theme.less";
\ No newline at end of file
analysisModule.controller('GlobalOverviewController', ['$scope','$filter', '$log', '$translate', '$http','SweetAlert',
'apiConfig',
function ($scope,$filter, $log, $translate, $http,SweetAlert,apiConfig) {
'use strict';
function init() {
$http.get('/tableau/globalOverview', 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
<div id="vizContainer" style="display: flex; justify-content: center; height: 90%"></div>
\ No newline at end of file
analysisModule.directive('globalOverview', ['$log',
function ($log) {
'use strict';
return {
restrict: 'E',
templateUrl: '/app/analysis/dashboard/global-overview/global-overview.html' + '?_=' + Math.random(),
scope: {
serviceTypeId: "=?",
periodId: "=?"
},
controller: 'GlobalOverviewController',
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
@import "~/app-resources/less/theme.less";
\ No newline at end of file
analysisModule.controller('MexicanTaxController', ['$scope','$filter', '$log', '$translate', '$http','SweetAlert',
'apiConfig',
function ($scope,$filter, $log, $translate, $http,SweetAlert,apiConfig) {
'use strict';
function init() {
$http.get('/tableau/mexicanTax', 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
<div id="vizContainer" style="display: flex; justify-content: center; height: 90%"></div>
\ No newline at end of file
analysisModule.directive('mexicanTax', ['$log',
function ($log) {
'use strict';
return {
restrict: 'E',
templateUrl: '/app/analysis/dashboard/mexican-tax/mexican-tax.html' + '?_=' + Math.random(),
scope: {
serviceTypeId: "=?",
periodId: "=?"
},
controller: 'MexicanTaxController',
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
@import "~/app-resources/less/theme.less";
\ No newline at end of file
analysisModule.controller('OtherCountriesController', ['$scope','$filter', '$log', '$translate', '$http','SweetAlert',
'apiConfig',
function ($scope,$filter, $log, $translate, $http,SweetAlert,apiConfig) {
'use strict';
function init() {
$http.get('/tableau/otherCountries', 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
<div id="vizContainer" style="display: flex; justify-content: center; height: 90%"></div>
\ No newline at end of file
analysisModule.directive('otherCountries', ['$log',
function ($log) {
'use strict';
return {
restrict: 'E',
templateUrl: '/app/analysis/dashboard/other-countries/other-countries.html' + '?_=' + Math.random(),
scope: {
serviceTypeId: "=?",
periodId: "=?"
},
controller: 'OtherCountriesController',
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
@import "~/app-resources/less/theme.less";
\ No newline at end of file
analysisModule.controller('OtherDomesticDataController', ['$scope','$filter', '$log', '$translate', '$http','SweetAlert',
'apiConfig',
function ($scope,$filter, $log, $translate, $http,SweetAlert,apiConfig) {
'use strict';
function init() {
$http.get('/tableau/otherDomesticData', 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
<div id="vizContainer" style="display: flex; justify-content: center; height: 90%"></div>
\ No newline at end of file
analysisModule.directive('otherDomesticData', ['$log',
function ($log) {
'use strict';
return {
restrict: 'E',
templateUrl: '/app/analysis/dashboard/other-domestic-data/other-domestic-data.html' + '?_=' + Math.random(),
scope: {
serviceTypeId: "=?",
periodId: "=?"
},
controller: 'OtherDomesticDataController',
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
@import "~/app-resources/less/theme.less";
\ No newline at end of file
analysisModule.controller('ProfitAndLossController', ['$scope','$filter', '$log', '$translate', '$http','SweetAlert',
'apiConfig',
function ($scope,$filter, $log, $translate, $http,SweetAlert,apiConfig) {
'use strict';
function init() {
$http.get('/tableau/profitAndLoss', 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
<div id="vizContainer" style="display: flex; justify-content: center; height: 90%"></div>
\ No newline at end of file
analysisModule.directive('profitAndLoss', ['$log',
function ($log) {
'use strict';
return {
restrict: 'E',
templateUrl: '/app/analysis/dashboard/profit-and-loss/profit-and-loss.html' + '?_=' + Math.random(),
scope: {
serviceTypeId: "=?",
periodId: "=?"
},
controller: 'ProfitAndLossController',
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
@import "~/app-resources/less/theme.less";
\ No newline at end of file
analysisModule.controller('TaxComparisonController', ['$scope','$filter', '$log', '$translate', '$http','SweetAlert',
'apiConfig',
function ($scope,$filter, $log, $translate, $http,SweetAlert,apiConfig) {
'use strict';
function init() {
$http.get('/tableau/taxComparison', 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
<div id="vizContainer" style="display: flex; justify-content: center; height: 90%"></div>
\ No newline at end of file
analysisModule.directive('taxComparison', ['$log',
function ($log) {
'use strict';
return {
restrict: 'E',
templateUrl: '/app/analysis/dashboard/tax-comparison/tax-comparison.html' + '?_=' + Math.random(),
scope: {
serviceTypeId: "=?",
periodId: "=?"
},
controller: 'TaxComparisonController',
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
@import "~/app-resources/less/theme.less";
\ No newline at end of file
analysisModule.controller('UnreturnedTaxController', ['$scope','$filter', '$log', '$translate', '$timeout',
function ($scope,$filter, $log, $translate, $timeout) {
analysisModule.controller('UnreturnedTaxController', ['$scope','$filter', '$log', '$translate', '$http','SweetAlert',
'apiConfig',
function ($scope,$filter, $log, $translate, $http,SweetAlert,apiConfig) {
'use strict';
function init() {
$http.get('/tableau/unreturnedTax', apiConfig.createVat())
.success(function (res) {
if (res && 0 === res.code) {
var placeholderDiv = document.getElementById('vizContainer');
var url = 'http://10.158.230.16:8890/trusted/b4TGi86ySyuKfWyvE8vnww==:Rel9fneoVyJ58IukJ5ve-_k1/views/Didi_Tax_20190307/sheet8?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no';
var url = res.data;
var options = {
hideTabs: true,
width: "90%",
height: "500px",
onFirstInteractive: function() {
// The viz is now ready and can be safely used.
console.log("Run this code when the viz has finished loading.");
}
};
$scope.viz = new tableau.Viz(placeholderDiv, url, options);
try{
new tableau.Viz(placeholderDiv, url, options);
}catch (e) {
}
}else {
SweetAlert.error($translate.instant('SystemError'));
}
});
}
init();
......
<!--<script type='text/javascript' src='http://10.158.230.16:8890/javascripts/api/tableau-2.min.js'></script>-->
<div class='tableauPlaceholder' style='width: 1920px; height: 848px;'>
<!--<object class='tableauViz' width='1920' height='848' style='display:none;'>-->
<!--<param name='host_url' value='http%3A%2F%2F10.158.230.16%3A8890%2F'/>-->
<!--<param name='embed_code_version' value='3'/>-->
<!--<param name='site_root' value=''/>-->
<!--<param name='name' value='Didi_Tax_20190307&#47;sheet8'/>-->
<!--<param name='tabs' value='no'/>-->
<!--<param name='toolbar' value='yes'/>-->
<!--<param name='showAppBanner' value='false'/>-->
<!--<param name='filter' value='iframeSizedToWindow=true'/>-->
<!--<param name="ticket" value="g2-zt7USSSmP7mPfZU2P1Q==:kZimvabueyV0_38cviKedMKz"/>-->
<!--</object>-->
<div id="vizContainer" style="display: flex; justify-content: center"></div>
</div>
<!--<iframe src="http://10.158.230.16:8890/trusted/JS6C48CESm6veO9zZqFLHw==:0dKT6t0QE0OeVhKYRQ7k471k/views/Didi_Tax_20190307/sheet8?iframeSizedToWindow=true&:embed=y&:showAppBanner=false&:display_count=no&:showVizHome=no"-->
<!--width="800" height="600"></iframe>-->
\ No newline at end of file
<div id="vizContainer" style="display: flex; justify-content: center; height: 90%"></div>
\ No newline at end of file
......@@ -10,7 +10,11 @@
},
controller: 'UnreturnedTaxController',
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";
}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment