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
c2cbb382
Commit
c2cbb382
authored
Apr 17, 2019
by
Memorydoc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#
parent
0603dea0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
9 deletions
+18
-9
ReportServiceImpl.java
.../pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
+17
-8
tb-ebit-form.ctrl.js
...b/src/main/webapp/app/analysis/table/tb-ebit-form.ctrl.js
+1
-1
No files found.
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
View file @
c2cbb382
...
...
@@ -6,12 +6,15 @@ import com.github.pagehelper.PageHelper;
import
com.github.pagehelper.PageInfo
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Sets
;
import
com.grapecity.documents.excel.V
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.map.HashedMap
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.poi.hssf.usermodel.HSSFCell
;
import
org.apache.poi.hssf.usermodel.HSSFCellStyle
;
import
org.apache.poi.openxml4j.exceptions.InvalidFormatException
;
import
org.apache.poi.ss.usermodel.*
;
import
org.apache.poi.ss.util.CellRangeAddress
;
import
org.apache.poi.xssf.usermodel.*
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -1789,18 +1792,18 @@ public class ReportServiceImpl extends BaseService {
continue
;
}
}
BigDecimal
subtract
=
yysr
.
subtract
(
yycb
).
add
(
yysjfj
).
add
(
xsfy
).
add
(
glfy
).
add
(
yffy
).
add
(
zcjzss
);
BigDecimal
subtract
=
yysr
.
subtract
(
yycb
).
subtract
(
yysjfj
).
subtract
(
xsfy
).
subtract
(
glfy
).
subtract
(
yffy
).
subtract
(
zcjzss
);
ebitDataDto
.
setEbitSubtraction
(
subtract
);
ebitDataDto
.
setSpecialFactors
(
subtract
.
add
(
spec
));
ebitDataDto
.
setEbitRate
(
String
.
valueOf
(
rate
));
ebitDataDto
.
setTransactionAmount
(
ebitDataDto
.
getSpecialFactors
().
multiply
(
new
BigDecimal
(
ebitDataDto
.
getEbitRate
())));
ebitDataDto
.
setTransactionAmount
(
ebitDataDto
.
getSpecialFactors
().
multiply
(
new
BigDecimal
(
ebitDataDto
.
getEbitRate
()))
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
)
);
if
(
ebitRate
.
indexOf
(
"%"
)
!=
-
1
)
{
ebitDataDto
.
setEbitRate
(
ebitRate
);
}
else
{
ebitDataDto
.
setEbitRate
(
ebitRate
+
"%"
);
}
ebitDataDto
.
setSixAddTax
(
ebitDataDto
.
getTransactionAmount
().
multiply
(
new
BigDecimal
(
0.06
)
.
setScale
(
2
,
BigDecimal
.
ROUND_UP
)
));
ebitDataDto
.
setTotalAmountTax
(
ebitDataDto
.
getTransactionAmount
().
multiply
(
new
BigDecimal
(
1.06
)
.
setScale
(
2
,
BigDecimal
.
ROUND_UP
)
));
ebitDataDto
.
setSixAddTax
(
ebitDataDto
.
getTransactionAmount
().
multiply
(
new
BigDecimal
(
0.06
)
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
));
ebitDataDto
.
setTotalAmountTax
(
ebitDataDto
.
getTransactionAmount
().
multiply
(
new
BigDecimal
(
1.06
)
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
));
ebitDataDto
.
setSpecialConsiderations
(
specialConsiderations
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
...
...
@@ -2605,6 +2608,7 @@ public class ReportServiceImpl extends BaseService {
@Autowired
private
JdbcTemplate
jdbcTemplate
;
private
static
CellStyle
cellStyle1
=
null
;
/**
* 批量导出Excel ebit利润表
...
...
@@ -2680,8 +2684,10 @@ public class ReportServiceImpl extends BaseService {
List
<
Integer
>
cols
=
Lists
.
newArrayList
();
FileExcelUtil
.
deleteColumn
(
sheetAt
,
1
,
cols
);
//var profileList = ["EBIT考虑资产减值损失", "", "", "", "", "", ""];
List
<
String
>
ebitTitle
=
Lists
.
newArrayList
(
"EBIT考虑资产减值损失"
,
"加:特殊因素考虑"
,
"EBIT(考虑特殊因素)"
,
"EBIT rate"
,
"关联交易金额"
,
"6%增值税"
,
"价税合计金额"
);
//设置单元格居右
cellStyle1
=
workbook1
.
createCellStyle
();
//创建样式
cellStyle1
.
setAlignment
(
HorizontalAlignment
.
RIGHT
);
//给第一个sheet创建ebit 行
for
(
int
i
=
37
;
i
<=
43
;
i
++)
{
sheetAt
.
createRow
(
i
).
createCell
(
0
).
setCellValue
(
ebitTitle
.
get
(
i
-
37
));
...
...
@@ -2760,6 +2766,11 @@ public class ReportServiceImpl extends BaseService {
_index
++;
}
///合并单元格
cellStyle1
.
setVerticalAlignment
(
VerticalAlignment
.
CENTER
);
// 垂直
cellStyle1
.
setAlignment
(
HorizontalAlignment
.
CENTER
);
// 水平
sheetAt
.
addMergedRegion
(
new
CellRangeAddress
(
0
,
0
,
1
,
_index
+
4
));
//sheetAt.getRow(0).getCell(1).setCellStyle(cellStyle1);
/* for (int i = 0; i < ebitSpreadData.size(); i++) {
DidiFileIUploadParam fileParam = new DidiFileIUploadParam();
fileParam.setUuids(Arrays.asList(ebitSpreadData.get(i).getFileKey()));
...
...
@@ -2804,11 +2815,9 @@ public class ReportServiceImpl extends BaseService {
}
else
{
sheetAt
.
getRow
(
row
).
getCell
(
col
).
setCellValue
(
data
);
}
sheetAt
.
getRow
(
row
).
getCell
(
col
).
setCellStyle
(
cellStyle1
);
}
/* public void insertData(String templateId, Integer period, Sheet sheet, int beginCell) {
List<Project> projects = projectMapper.selectByExample(example1);
for (EbitCell project : ebitCellData) {
String projectId = getProjId(project.getOrganizationId(), period);
...
...
atms-web/src/main/webapp/app/analysis/table/tb-ebit-form.ctrl.js
View file @
c2cbb382
...
...
@@ -3140,7 +3140,7 @@
sheet
.
setValue
(
40
,
2
,
$scope
.
_ebitResult
.
rate
+
"%"
);
sheet
.
setValue
(
41
,
2
,
$scope
.
_ebitResult
.
gljyye
);
sheet
.
setValue
(
42
,
2
,
$scope
.
_ebitResult
.
sixAddtax
);
sheet
.
setValue
(
43
,
2
,
$scope
.
_ebitResult
.
klzcjsz
);
sheet
.
setValue
(
43
,
2
,
$scope
.
_ebitResult
.
tsklys
);
}
setTimeout
(
function
(){
spreadTODb
();},
1000
)
}
...
...
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