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
ca06f27b
Commit
ca06f27b
authored
Nov 09, 2018
by
neo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DEV] add formual datasorce
parent
52edaa46
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
24 deletions
+4
-24
ReportGeneratorImpl.java
...wc/taxtech/atms/vat/service/impl/ReportGeneratorImpl.java
+0
-23
ReportServiceImpl.java
.../pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
+4
-1
No files found.
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportGeneratorImpl.java
View file @
ca06f27b
...
...
@@ -286,29 +286,6 @@ public class ReportGeneratorImpl {
cellData
.
setProjectId
(
projectId
);
cellData
.
setPeriod
(
period
);
if
(
periodCellTemplateConfig
.
getDataSourceType
().
intValue
()
==
FormulaDataSourceType
.
KeyInSource
.
getCode
())
{
if
(!
isMergeMunual
)
{
PeriodDataSource
dataSource
=
new
PeriodDataSource
();
dataSource
.
setId
(
distributedIdService
.
nextId
());
if
(
tempPeriodCellTemplate
.
isPresent
())
{
dataSource
.
setColumnIndex
(
tempPeriodCellTemplate
.
get
().
getColumnIndex
());
dataSource
.
setRowIndex
(
tempPeriodCellTemplate
.
get
().
getRowIndex
());
}
dataSource
.
setAmount
(
new
BigDecimal
(
"0"
));
dataSource
.
setName
(
"ManualDataSource"
);
dataSource
.
setDescription
(
"ManualDataSource"
);
dataSource
.
setCreateTime
(
new
Date
());
dataSource
.
setUpdateTime
(
new
Date
());
dataSource
.
setCreateBy
(
"Admin"
);
dataSource
.
setUpdateBy
(
"Admin"
);
dataSource
.
setPeriod
(
period
);
dataSource
.
setProjectId
(
projectId
);
dataSource
.
setCellTemplateId
(
tempPeriodCellTemplate
.
get
().
getCellTemplateId
());
dataSource
.
setType
(
FormulaDataSourceType
.
KeyInSource
.
getCode
());
periodDataSourceMapper
.
insertSelective
(
dataSource
);
}
}
//after insert celldata, insert the celldatasource for link celldata and datasource
PeriodDataSourceExample
dataSourceExample
=
new
PeriodDataSourceExample
();
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
View file @
ca06f27b
...
...
@@ -854,6 +854,7 @@ public class ReportServiceImpl {
PeriodCellData
cellData
=
periodCellDataMapper
.
selectByPrimaryKey
(
data
.
getCellId
());
if
(
cellData
.
getData
()
!=
data
.
getAmount
().
toString
())
{
cellData
.
setData
(
data
.
getAmount
().
toString
());
if
(
StringUtils
.
isEmpty
(
cellData
.
getFormulaExp
()))
cellData
.
setFormulaExp
(
data
.
getAmount
().
toString
());
periodCellDataMapper
.
updateByPrimaryKeySelective
(
cellData
);
}
}
...
...
@@ -861,7 +862,9 @@ public class ReportServiceImpl {
List
<
DataSourceExtendDto
>
dataSourceExtendDtos
=
periodDataSourceMapper
.
getManualDataSource
(
data
.
getCellId
());
PeriodCellTemplateExample
periodCellTemplateExample
=
new
PeriodCellTemplateExample
();
periodCellTemplateExample
.
createCriteria
().
andCellTemplateIdEqualTo
(
Long
.
parseLong
(
data
.
getCellTemplateId
())).
andPeriodEqualTo
(
data
.
getPeriod
());
periodCellTemplateExample
.
createCriteria
().
andCellTemplateIdEqualTo
(
Long
.
parseLong
(
data
.
getCellTemplateId
()))
.
andPeriodEqualTo
(
data
.
getPeriod
()).
andProjectIdEqualTo
(
projectId
);
Optional
<
PeriodCellTemplate
>
periodCellTemplate
=
periodCellTemplateMapper
.
selectByExample
(
periodCellTemplateExample
).
stream
().
findFirst
();
BigDecimal
originalAmount
=
new
BigDecimal
(
"0"
);
...
...
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