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
aa1a4474
Commit
aa1a4474
authored
Mar 31, 2019
by
eddie.woo
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
23275658
86e861e2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
5 deletions
+16
-5
POIUtil.java
atms-api/src/main/java/pwc/taxtech/atms/common/POIUtil.java
+10
-0
ReportServiceImpl.java
.../pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
+5
-4
PeriodCellDataExtendsMapper.xml
...tech/atms/vat/dao/extends/PeriodCellDataExtendsMapper.xml
+1
-1
No files found.
atms-api/src/main/java/pwc/taxtech/atms/common/POIUtil.java
View file @
aa1a4474
package
pwc
.
taxtech
.
atms
.
common
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.poi.hssf.usermodel.HSSFWorkbook
;
import
org.apache.poi.ss.usermodel.*
;
import
org.apache.poi.ss.util.CellRangeAddress
;
import
org.apache.poi.xssf.usermodel.XSSFWorkbook
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.Optional
;
public
class
POIUtil
{
...
...
@@ -88,6 +91,13 @@ public class POIUtil {
}
public
static
void
cloneSheetAndStyle
(
Sheet
sheet
,
Sheet
targetSheet
,
Workbook
tWorkbook
)
{
//设置合并单元格
List
<
CellRangeAddress
>
merges
=
sheet
.
getMergedRegions
();
if
(
CollectionUtils
.
isNotEmpty
(
merges
)){
for
(
CellRangeAddress
merge
:
merges
){
targetSheet
.
addMergedRegion
(
merge
);
}
}
for
(
int
r
=
sheet
.
getFirstRowNum
();
r
<=
sheet
.
getLastRowNum
();
r
++)
{
Row
row
=
sheet
.
getRow
(
r
);
if
(
null
==
row
)
{
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
View file @
aa1a4474
...
...
@@ -1808,10 +1808,11 @@ public class ReportServiceImpl extends BaseService {
cellData
.
setFormulaExp
(
data
.
getKeyinData
());
periodCellDataMapper
.
updateByPrimaryKeySelective
(
cellData
);
}
else
if
(
data
.
getAmount
()
!=
null
&&
cellData
.
getData
()
!=
data
.
getAmount
().
toString
())
{
cellData
.
setData
(
data
.
getAmount
().
toString
());
if
(
StringUtils
.
isEmpty
(
cellData
.
getFormulaExp
()))
cellData
.
setFormulaExp
(
data
.
getAmount
().
toString
());
periodCellDataMapper
.
updateByPrimaryKeySelective
(
cellData
);
//TODO Eddie确认逻辑
// cellData.setData(data.getAmount().toString());
// if (StringUtils.isEmpty(cellData.getFormulaExp()))
// cellData.setFormulaExp(data.getAmount().toString());
// periodCellDataMapper.updateByPrimaryKeySelective(cellData);
}
}
...
...
atms-dao/src/main/resources/pwc/taxtech/atms/vat/dao/extends/PeriodCellDataExtendsMapper.xml
View file @
aa1a4474
...
...
@@ -113,7 +113,7 @@
<select
id =
"selectReportData"
resultType=
"pwc.taxtech.atms.dpo.AnalysisSalesValueDto"
>
select cell_template.row_index as rowIndex,
cell_template.column_index as columnIndex,
concat(CONVERT(cell_data.data, decimal(18,
4
)) + if(data_source.amount is null, 0, data_source.amount)) as data
concat(CONVERT(cell_data.data, decimal(18,
2
)) + if(data_source.amount is null, 0, data_source.amount)) as data
from period_cell_data cell_data
left join period_cell_template cell_template
on cell_data.cell_template_id = cell_template.cell_template_id
...
...
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