Commit 060ad42c authored by zhkwei's avatar zhkwei

Merge remote-tracking branch 'origin/dev_mysql' into dev_mysql

parents 1b068d4c 1b34c887
...@@ -456,7 +456,6 @@ ...@@ -456,7 +456,6 @@
</properties> </properties>
</profile> </profile>
<profile> <profile>
<id>staging</id> <id>staging</id>
<build> <build>
...@@ -617,7 +616,7 @@ ...@@ -617,7 +616,7 @@
</dependencies> </dependencies>
</plugin> </plugin>
<!-- See: https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+Maven --> <!-- See: https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+Maven -->
<plugin> <plugin>ll
<groupId>org.sonarsource.scanner.maven</groupId> <groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId> <artifactId>sonar-maven-plugin</artifactId>
<version>3.4.0.905</version> <version>3.4.0.905</version>
......
...@@ -8,6 +8,7 @@ import com.fasterxml.jackson.databind.SerializerProvider; ...@@ -8,6 +8,7 @@ import com.fasterxml.jackson.databind.SerializerProvider;
import java.io.IOException; import java.io.IOException;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.NumberFormat; import java.text.NumberFormat;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;
...@@ -19,11 +20,13 @@ import java.util.Locale; ...@@ -19,11 +20,13 @@ import java.util.Locale;
* version 1.0 * version 1.0
*/ */
public class ThousandConvert extends JsonSerializer<BigDecimal> { public class ThousandConvert extends JsonSerializer<BigDecimal> {
@Override @Override
public void serialize(BigDecimal value, JsonGenerator jgen, SerializerProvider arg2) public void serialize(BigDecimal value, JsonGenerator jgen, SerializerProvider arg2)
throws IOException { throws IOException {
jgen.writeString(NumberFormat.getIntegerInstance(Locale.getDefault()).format(value)); NumberFormat integerInstance = NumberFormat.getIntegerInstance(Locale.getDefault());
integerInstance.setMinimumFractionDigits(2);
integerInstance.setRoundingMode(RoundingMode.HALF_UP);
integerInstance.setGroupingUsed(true);
jgen.writeString(integerInstance.format(value));
} }
} }
package pwc.taxtech.atms.dto.analysis; package pwc.taxtech.atms.dto.analysis;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import pwc.taxtech.atms.common.ThousandConvert;
import java.math.BigDecimal; import java.math.BigDecimal;
/** /**
...@@ -10,15 +13,19 @@ import java.math.BigDecimal; ...@@ -10,15 +13,19 @@ import java.math.BigDecimal;
public class AnalysisActualTaxReturnDto { public class AnalysisActualTaxReturnDto {
private String companyName; private String companyName;
@JsonSerialize(using = ThousandConvert.class)
private BigDecimal segment1; private BigDecimal segment1;
@JsonSerialize(using = ThousandConvert.class)
private BigDecimal segment2; private BigDecimal segment2;
@JsonSerialize(using = ThousandConvert.class)
private BigDecimal segment3; private BigDecimal segment3;
@JsonSerialize(using = ThousandConvert.class)
private BigDecimal segment4; private BigDecimal segment4;
@JsonSerialize(using = ThousandConvert.class)
private BigDecimal segment5; private BigDecimal segment5;
public String getCompanyName() { public String getCompanyName() {
......
package pwc.taxtech.atms.dto.analysis; package pwc.taxtech.atms.dto.analysis;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import pwc.taxtech.atms.common.ThousandConvert;
import java.math.BigDecimal; import java.math.BigDecimal;
/** /**
...@@ -11,6 +14,7 @@ public class AnalysisDriverNumDto { ...@@ -11,6 +14,7 @@ public class AnalysisDriverNumDto {
private String driverType; private String driverType;
@JsonSerialize(using = ThousandConvert.class)
private BigDecimal driverNum; private BigDecimal driverNum;
public String getDriverType() { public String getDriverType() {
......
package pwc.taxtech.atms.dto.vatdto; package pwc.taxtech.atms.dto.vatdto;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import pwc.taxtech.atms.common.ThousandConvert;
import java.math.BigDecimal; import java.math.BigDecimal;
/** /**
...@@ -10,11 +13,16 @@ import java.math.BigDecimal; ...@@ -10,11 +13,16 @@ import java.math.BigDecimal;
* Version 1.0 * Version 1.0
**/ **/
public class EbitDataDto { public class EbitDataDto {
@JsonSerialize(using = ThousandConvert.class)
private BigDecimal ebitSubtraction; // 1. EBIT(考虑资产减值损失) private BigDecimal ebitSubtraction; // 1. EBIT(考虑资产减值损失)
@JsonSerialize(using = ThousandConvert.class)
private BigDecimal specialFactors; //考虑特殊因素 private BigDecimal specialFactors; //考虑特殊因素
private String ebitRate;// ebit比率 默认1%(可更改) private String ebitRate;// ebit比率 默认1%(可更改)
@JsonSerialize(using = ThousandConvert.class)
private BigDecimal transactionAmount; //关联交易金额 private BigDecimal transactionAmount; //关联交易金额
@JsonSerialize(using = ThousandConvert.class)
private BigDecimal sixAddTax; //6%增值税 private BigDecimal sixAddTax; //6%增值税
@JsonSerialize(using = ThousandConvert.class)
private BigDecimal totalAmountTax;// 价税合计金额 private BigDecimal totalAmountTax;// 价税合计金额
private String specialConsiderations;//特殊因素考虑 private String specialConsiderations;//特殊因素考虑
public String getSpecialConsiderations() { public String getSpecialConsiderations() {
...@@ -26,8 +34,6 @@ public class EbitDataDto { ...@@ -26,8 +34,6 @@ public class EbitDataDto {
} }
public BigDecimal getEbitSubtraction() { public BigDecimal getEbitSubtraction() {
return ebitSubtraction; return ebitSubtraction;
} }
......
...@@ -56,6 +56,7 @@ import javax.servlet.http.HttpServletRequest; ...@@ -56,6 +56,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.*; import java.io.*;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.NumberFormat;
import java.util.*; import java.util.*;
import java.util.concurrent.BlockingQueue; import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.LinkedBlockingQueue;
...@@ -1309,6 +1310,7 @@ public class ReportServiceImpl extends BaseService { ...@@ -1309,6 +1310,7 @@ public class ReportServiceImpl extends BaseService {
CellDataDto cellDataDto = null; CellDataDto cellDataDto = null;
CellDataDto cellDataDto1 = null; CellDataDto cellDataDto1 = null;
for (int i = 0; i < list.size(); i++) { for (int i = 0; i < list.size(); i++) {
if(i >=23) continue;//过滤掉多余数据
cellDataDto = new CellDataDto(); cellDataDto = new CellDataDto();
cellDataDto1 = new CellDataDto(); cellDataDto1 = new CellDataDto();
if (list.get(i).getItemName().equals("")) if (list.get(i).getItemName().equals(""))
...@@ -2520,38 +2522,6 @@ public class ReportServiceImpl extends BaseService { ...@@ -2520,38 +2522,6 @@ public class ReportServiceImpl extends BaseService {
} }
@Transactional
public void saveDatasource(String orgId, Integer period, Integer specialConsiderations, String ebitRate,
OperationResultDto<ReportDataDto> operationResultDto,
List<CellDataDto> cellDataList) {
EbitCellDataExample example = null;
List<EbitCellData> ebitCellDataList = new ArrayList<>();
for (int i = 37; i <= 43; i++) {
example = new EbitCellDataExample();
EbitCellDataExample.Criteria criteria = example.createCriteria();
criteria.andOrganizationIdEqualTo(orgId).andPeriodEqualTo(period).andColEqualTo(1).andRowEqualTo(i);
List<EbitCellData> ebitCellData = ebitCellDataMapper.selectByExample(example);
if (ebitCellData.size() == 0) {
for (CellDataDto cellDataDto : cellDataList) {
EbitCellData ebitCellData1 = new EbitCellData();
ebitCellData1.setId(idService.nextId());
ebitCellData1.setOrganizationId(orgId);
ebitCellData1.setPeriod(period);
ebitCellData1.setCreateTime(new Date());
ebitCellData1.setCol(cellDataDto.getColumnIndex());
ebitCellData1.setRow(cellDataDto.getRowIndex());
ebitCellData1.setData(cellDataDto.getCellValue());
ebitCellDataList.add(ebitCellData1);
}
ebitCellDataList.add(switchMeth(i, new EbitCellData(), operationResultDto, specialConsiderations, ebitRate, orgId, period));
ebitCellDataMapper.insertBatch(ebitCellDataList);
} else {
ebitCellDataMapper.updateByExampleSelective(switchMeth(i, new EbitCellData(), operationResultDto, specialConsiderations, ebitRate, orgId, period), example);
}
}
}
private EbitCellData switchMeth(Integer i, EbitCellData ebitCellData1, OperationResultDto<ReportDataDto> operationResultDto, Integer specialConsiderations, String ebitRate, String orgId, Integer period) { private EbitCellData switchMeth(Integer i, EbitCellData ebitCellData1, OperationResultDto<ReportDataDto> operationResultDto, Integer specialConsiderations, String ebitRate, String orgId, Integer period) {
switch (i) { switch (i) {
case 37: case 37:
...@@ -2671,6 +2641,7 @@ public class ReportServiceImpl extends BaseService { ...@@ -2671,6 +2641,7 @@ public class ReportServiceImpl extends BaseService {
@Autowired @Autowired
private JdbcTemplate jdbcTemplate; private JdbcTemplate jdbcTemplate;
private CellStyle cellStyle1 = null; private CellStyle cellStyle1 = null;
private static final String EBITTemplateCode = "VAT10086";
/** /**
* 批量导出Excel ebit利润表 * 批量导出Excel ebit利润表
...@@ -2685,7 +2656,7 @@ public class ReportServiceImpl extends BaseService { ...@@ -2685,7 +2656,7 @@ public class ReportServiceImpl extends BaseService {
File templateFile; File templateFile;
InputStream inputStream = null; InputStream inputStream = null;
TemplateExample templateExample = new TemplateExample(); TemplateExample templateExample = new TemplateExample();
templateExample.createCriteria().andCodeEqualTo("VAT10086").andNameEqualTo("VAT10086");//todo 这里是利润表模板的固定code,禁止重复 templateExample.createCriteria().andCodeEqualTo(EBITTemplateCode).andNameEqualTo(EBITTemplateCode);//todo 这里是利润表模板的固定code,禁止重复
List<Template> templates1 = templateMapper.selectByExample(templateExample); List<Template> templates1 = templateMapper.selectByExample(templateExample);
if (templates1.size() == 0) if (templates1.size() == 0)
throw new Exception("没有利润表模板,无法批量导出,请上传模板"); throw new Exception("没有利润表模板,无法批量导出,请上传模板");
...@@ -2885,7 +2856,9 @@ public class ReportServiceImpl extends BaseService { ...@@ -2885,7 +2856,9 @@ public class ReportServiceImpl extends BaseService {
sheetAt.getRow(row).getCell(col).setCellStyle(cellStyle1); sheetAt.getRow(row).getCell(col).setCellStyle(cellStyle1);
return sheetAt.getRow(row).getCell(col); return sheetAt.getRow(row).getCell(col);
} }
private static final String headerEbitTitle = "汇总利润表"; private static final String headerEbitTitle = "汇总利润表";
public void insertExcelOne(CellStyle headerCellType, XSSFWorkbook workbook1, Sheet sheetAt, Integer _index, RequestParameterDto requestParameterDto) { public void insertExcelOne(CellStyle headerCellType, XSSFWorkbook workbook1, Sheet sheetAt, Integer _index, RequestParameterDto requestParameterDto) {
headerCellType.setVerticalAlignment(VerticalAlignment.CENTER);// 垂直 headerCellType.setVerticalAlignment(VerticalAlignment.CENTER);// 垂直
headerCellType.setAlignment(HorizontalAlignment.CENTER);// 水平 headerCellType.setAlignment(HorizontalAlignment.CENTER);// 水平
...@@ -2949,7 +2922,7 @@ public class ReportServiceImpl extends BaseService { ...@@ -2949,7 +2922,7 @@ public class ReportServiceImpl extends BaseService {
//获取利润表模板Id 利润表固定模板VAT10086 //获取利润表模板Id 利润表固定模板VAT10086
public String getlxbId() throws Exception { public String getlxbId() throws Exception {
try { try {
String sql = "select * from template t where t.name = 'VAT10086' order by t.create_time desc "; String sql = "select * from template t where t.name = '" + EBITTemplateCode + "' order by t.create_time desc ";
Map<String, Object> stringObjectMap = new HashMap<>(); Map<String, Object> stringObjectMap = new HashMap<>();
stringObjectMap = jdbcTemplate.queryForList(sql).get(0); stringObjectMap = jdbcTemplate.queryForList(sql).get(0);
return stringObjectMap.get("id").toString(); return stringObjectMap.get("id").toString();
......
...@@ -3,6 +3,8 @@ package pwc.taxtech.atms.analysis.entity; ...@@ -3,6 +3,8 @@ package pwc.taxtech.atms.analysis.entity;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import pwc.taxtech.atms.entity.BaseEntity; import pwc.taxtech.atms.entity.BaseEntity;
/** /**
......
...@@ -76,6 +76,7 @@ ...@@ -76,6 +76,7 @@
<v-container ma-0 pa-0> <v-container ma-0 pa-0>
<Tableau :url="chartUrl" <Tableau :url="chartUrl"
width="100%" width="100%"
ref="tableau" ref="tableau"
:apiUrl="tableauApiUrl" :apiUrl="tableauApiUrl"
> >
...@@ -100,7 +101,7 @@ ...@@ -100,7 +101,7 @@
{ {
iconName: '#d-iconyihuankuanbufen', iconName: '#d-iconyihuankuanbufen',
active: false, active: false,
title: '税种未返还税金分析', title: '税分析',
chartUrl: process.env.VUE_APP_TABLEAU_API + 'getTableauTaxCategoryUnreturnedTax', chartUrl: process.env.VUE_APP_TABLEAU_API + 'getTableauTaxCategoryUnreturnedTax',
}, },
{ {
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
<v-bottom-nav <v-bottom-nav
:active.sync="bottomNav" :active.sync="bottomNav"
:value="true" :value="true"
color="#ffffff"
absolute absolute
style=" overflow: hidden; style=" overflow: hidden;
position: fixed; position: fixed;
...@@ -16,25 +17,25 @@ ...@@ -16,25 +17,25 @@
> >
<v-btn <v-btn
color="teal" color="#333333"
flat flat
value="panel" value="panel"
depressed depressed
:to="{name: 'panel'}" :to="{name: 'panel'}"
> >
<span style="font-size:20px ; color:#999999">仪表盘</span> <span style="font-size:20px ; ">仪表盘</span>
<v-icon color="#dddddd">table_chart</v-icon> <v-icon >table_chart</v-icon>
</v-btn> </v-btn>
<v-btn <v-btn
color="teal" color="#333333"
flat flat
value="mine" value="mine"
depressed depressed
:to="{name: 'mine'}" :to="{name: 'mine'}"
> >
<span style="font-size:20px ;color:#999999 " > 我的</span> <span style="font-size:20px ; " > 我的</span>
<v-icon color="#dddddd" >account_box</v-icon> <v-icon >account_box</v-icon>
</v-btn> </v-btn>
</v-bottom-nav> </v-bottom-nav>
......
...@@ -1181,7 +1181,9 @@ ...@@ -1181,7 +1181,9 @@
/------------------------------------------------kevin insert -----------------------------------/ /------------------------------------------------kevin insert -----------------------------------/
PWC.downloadCallBack = function (data, status, headers, fileName) { PWC.downloadCallBack = function (data, status, headers, fileName) {
var octetStreamMime = 'application/octet-stream'; var octetStreamMime = 'application/octet-stream';
var contentType = headers('content-type') || octetStreamMime; var contentType = octetStreamMime;
if (headers)
contentType = headers('content-type') || octetStreamMime;
if (window.navigator.msSaveBlob) { if (window.navigator.msSaveBlob) {
var blob = new Blob([data], { var blob = new Blob([data], {
type: contentType type: contentType
...@@ -1214,7 +1216,7 @@ ...@@ -1214,7 +1216,7 @@
scope.selectOrgOptions = { scope.selectOrgOptions = {
displayExpr: 'name', displayExpr: 'name',
valueExpr: 'id', valueExpr: 'id',
width: function() { width: function () {
return window.innerWidth / 4.5; return window.innerWidth / 4.5;
}, },
bindingOptions: { bindingOptions: {
...@@ -1227,10 +1229,10 @@ ...@@ -1227,10 +1229,10 @@
searchEnabled: true, searchEnabled: true,
noDataText: translate.instant('RevenueNoOrgData'), noDataText: translate.instant('RevenueNoOrgData'),
showSelectionControls: true, showSelectionControls: true,
visible : true, visible: true,
deferRendering : false deferRendering: false
}; };
if(exp) if (exp)
_.extend(scope.selectOrgOptions, exp); _.extend(scope.selectOrgOptions, exp);
}; };
......
.color_active[data-v-60ac6546]{color:red!important}.head[data-v-18a52f4a]{height:90px;background-color:red}.icon{width:1em;height:1em;vertical-align:-.15em;fill:currentColor;overflow:hidden}
\ No newline at end of file
.color_active[data-v-1ced4d0d]{color:red!important}.head[data-v-579027fe]{height:90px;background-color:red}.icon{width:1em;height:1em;vertical-align:-.15em;fill:currentColor;overflow:hidden}
\ No newline at end of file
...@@ -49,4 +49,4 @@ ...@@ -49,4 +49,4 @@
//send 发送 //send 发送
xmlhttp.send(); xmlhttp.send();
}*/</script><link rel=icon href=favicon.ico><title>didi2</title><link rel=stylesheet href=font_roboto.css><link rel=stylesheet href=font_material.css><link href=js/about.17654e8a.js rel=prefetch><link href=css/app.e87f05ce.css rel=preload as=style><link href=css/chunk-vendors.ce5e3dd4.css rel=preload as=style><link href=js/app.6ae9ce65.js rel=preload as=script><link href=js/chunk-vendors.670ff040.js rel=preload as=script><link href=css/chunk-vendors.ce5e3dd4.css rel=stylesheet><link href=css/app.e87f05ce.css rel=stylesheet></head><body><noscript><strong>We're sorry but didi2 doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=js/chunk-vendors.670ff040.js></script><script src=js/app.6ae9ce65.js></script></body></html> }*/</script><link rel=icon href=favicon.ico><title>didi2</title><link rel=stylesheet href=font_roboto.css><link rel=stylesheet href=font_material.css><link href=js/about.17654e8a.js rel=prefetch><link href=css/app.73dfc5ab.css rel=preload as=style><link href=css/chunk-vendors.ce5e3dd4.css rel=preload as=style><link href=js/app.07374ae8.js rel=preload as=script><link href=js/chunk-vendors.670ff040.js rel=preload as=script><link href=css/chunk-vendors.ce5e3dd4.css rel=stylesheet><link href=css/app.73dfc5ab.css rel=stylesheet></head><body><noscript><strong>We're sorry but didi2 doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=js/chunk-vendors.670ff040.js></script><script src=js/app.07374ae8.js></script></body></html>
\ No newline at end of file \ No newline at end of file
This diff is collapsed.
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