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 @@
</properties>
</profile>
<profile>
<id>staging</id>
<build>
......@@ -617,7 +616,7 @@
</dependencies>
</plugin>
<!-- See: https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+Maven -->
<plugin>
<plugin>ll
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.4.0.905</version>
......
......@@ -8,6 +8,7 @@ import com.fasterxml.jackson.databind.SerializerProvider;
import java.io.IOException;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.NumberFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
......@@ -19,11 +20,13 @@ import java.util.Locale;
* version 1.0
*/
public class ThousandConvert extends JsonSerializer<BigDecimal> {
@Override
public void serialize(BigDecimal value, JsonGenerator jgen, SerializerProvider arg2)
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;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import pwc.taxtech.atms.common.ThousandConvert;
import java.math.BigDecimal;
/**
......@@ -10,15 +13,19 @@ import java.math.BigDecimal;
public class AnalysisActualTaxReturnDto {
private String companyName;
@JsonSerialize(using = ThousandConvert.class)
private BigDecimal segment1;
@JsonSerialize(using = ThousandConvert.class)
private BigDecimal segment2;
@JsonSerialize(using = ThousandConvert.class)
private BigDecimal segment3;
@JsonSerialize(using = ThousandConvert.class)
private BigDecimal segment4;
@JsonSerialize(using = ThousandConvert.class)
private BigDecimal segment5;
public String getCompanyName() {
......
package pwc.taxtech.atms.dto.analysis;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import pwc.taxtech.atms.common.ThousandConvert;
import java.math.BigDecimal;
/**
......@@ -11,6 +14,7 @@ public class AnalysisDriverNumDto {
private String driverType;
@JsonSerialize(using = ThousandConvert.class)
private BigDecimal driverNum;
public String getDriverType() {
......
package pwc.taxtech.atms.dto.vatdto;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import pwc.taxtech.atms.common.ThousandConvert;
import java.math.BigDecimal;
/**
......@@ -10,11 +13,16 @@ import java.math.BigDecimal;
* Version 1.0
**/
public class EbitDataDto {
@JsonSerialize(using = ThousandConvert.class)
private BigDecimal ebitSubtraction; // 1. EBIT(考虑资产减值损失)
@JsonSerialize(using = ThousandConvert.class)
private BigDecimal specialFactors; //考虑特殊因素
private String ebitRate;// ebit比率 默认1%(可更改)
@JsonSerialize(using = ThousandConvert.class)
private BigDecimal transactionAmount; //关联交易金额
@JsonSerialize(using = ThousandConvert.class)
private BigDecimal sixAddTax; //6%增值税
@JsonSerialize(using = ThousandConvert.class)
private BigDecimal totalAmountTax;// 价税合计金额
private String specialConsiderations;//特殊因素考虑
public String getSpecialConsiderations() {
......@@ -26,8 +34,6 @@ public class EbitDataDto {
}
public BigDecimal getEbitSubtraction() {
return ebitSubtraction;
}
......
......@@ -56,6 +56,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.math.BigDecimal;
import java.text.NumberFormat;
import java.util.*;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
......@@ -1309,6 +1310,7 @@ public class ReportServiceImpl extends BaseService {
CellDataDto cellDataDto = null;
CellDataDto cellDataDto1 = null;
for (int i = 0; i < list.size(); i++) {
if(i >=23) continue;//过滤掉多余数据
cellDataDto = new CellDataDto();
cellDataDto1 = new CellDataDto();
if (list.get(i).getItemName().equals(""))
......@@ -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) {
switch (i) {
case 37:
......@@ -2671,6 +2641,7 @@ public class ReportServiceImpl extends BaseService {
@Autowired
private JdbcTemplate jdbcTemplate;
private CellStyle cellStyle1 = null;
private static final String EBITTemplateCode = "VAT10086";
/**
* 批量导出Excel ebit利润表
......@@ -2685,7 +2656,7 @@ public class ReportServiceImpl extends BaseService {
File templateFile;
InputStream inputStream = null;
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);
if (templates1.size() == 0)
throw new Exception("没有利润表模板,无法批量导出,请上传模板");
......@@ -2885,7 +2856,9 @@ public class ReportServiceImpl extends BaseService {
sheetAt.getRow(row).getCell(col).setCellStyle(cellStyle1);
return sheetAt.getRow(row).getCell(col);
}
private static final String headerEbitTitle = "汇总利润表";
public void insertExcelOne(CellStyle headerCellType, XSSFWorkbook workbook1, Sheet sheetAt, Integer _index, RequestParameterDto requestParameterDto) {
headerCellType.setVerticalAlignment(VerticalAlignment.CENTER);// 垂直
headerCellType.setAlignment(HorizontalAlignment.CENTER);// 水平
......@@ -2949,7 +2922,7 @@ public class ReportServiceImpl extends BaseService {
//获取利润表模板Id 利润表固定模板VAT10086
public String getlxbId() throws Exception {
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<>();
stringObjectMap = jdbcTemplate.queryForList(sql).get(0);
return stringObjectMap.get("id").toString();
......
......@@ -3,6 +3,8 @@ package pwc.taxtech.atms.analysis.entity;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import pwc.taxtech.atms.entity.BaseEntity;
/**
......
......@@ -76,6 +76,7 @@
<v-container ma-0 pa-0>
<Tableau :url="chartUrl"
width="100%"
ref="tableau"
:apiUrl="tableauApiUrl"
>
......@@ -100,7 +101,7 @@
{
iconName: '#d-iconyihuankuanbufen',
active: false,
title: '税种未返还税金分析',
title: '税分析',
chartUrl: process.env.VUE_APP_TABLEAU_API + 'getTableauTaxCategoryUnreturnedTax',
},
{
......
......@@ -7,6 +7,7 @@
<v-bottom-nav
:active.sync="bottomNav"
:value="true"
color="#ffffff"
absolute
style=" overflow: hidden;
position: fixed;
......@@ -16,25 +17,25 @@
>
<v-btn
color="teal"
color="#333333"
flat
value="panel"
depressed
:to="{name: 'panel'}"
>
<span style="font-size:20px ; color:#999999">仪表盘</span>
<v-icon color="#dddddd">table_chart</v-icon>
<span style="font-size:20px ; ">仪表盘</span>
<v-icon >table_chart</v-icon>
</v-btn>
<v-btn
color="teal"
color="#333333"
flat
value="mine"
depressed
:to="{name: 'mine'}"
>
<span style="font-size:20px ;color:#999999 " > 我的</span>
<v-icon color="#dddddd" >account_box</v-icon>
<span style="font-size:20px ; " > 我的</span>
<v-icon >account_box</v-icon>
</v-btn>
</v-bottom-nav>
......
......@@ -1181,7 +1181,9 @@
/------------------------------------------------kevin insert -----------------------------------/
PWC.downloadCallBack = function (data, status, headers, fileName) {
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) {
var blob = new Blob([data], {
type: contentType
......@@ -1214,7 +1216,7 @@
scope.selectOrgOptions = {
displayExpr: 'name',
valueExpr: 'id',
width: function() {
width: function () {
return window.innerWidth / 4.5;
},
bindingOptions: {
......@@ -1227,10 +1229,10 @@
searchEnabled: true,
noDataText: translate.instant('RevenueNoOrgData'),
showSelectionControls: true,
visible : true,
deferRendering : false
visible: true,
deferRendering: false
};
if(exp)
if (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 @@
//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>
\ No newline at end of file
}*/</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
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