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
7d75d2c6
Commit
7d75d2c6
authored
Jul 12, 2018
by
neo.wang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_neo' into 'dev'
[DEV] add some data for data save in bb See merge request root/atms!66
parents
c1904df7
4c8882f2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
7 deletions
+14
-7
FormulaDataSourceDto.java
...ava/pwc/taxtech/atms/dto/vatdto/FormulaDataSourceDto.java
+1
-1
ReportCellDataSourceDto.java
.../pwc/taxtech/atms/dto/vatdto/ReportCellDataSourceDto.java
+1
-0
FormulaAgent.java
.../java/pwc/taxtech/atms/vat/service/impl/FormulaAgent.java
+10
-6
ReportFormulaFactory.java
...c/taxtech/atms/vat/service/impl/ReportFormulaFactory.java
+2
-0
No files found.
atms-api/src/main/java/pwc/taxtech/atms/dto/vatdto/FormulaDataSourceDto.java
View file @
7d75d2c6
...
@@ -3,7 +3,7 @@ package pwc.taxtech.atms.dto.vatdto;
...
@@ -3,7 +3,7 @@ package pwc.taxtech.atms.dto.vatdto;
import
pwc.taxtech.atms.constant.enums.CellDataSourceType
;
import
pwc.taxtech.atms.constant.enums.CellDataSourceType
;
public
class
FormulaDataSourceDto
extends
DataSourceDto
{
public
class
FormulaDataSourceDto
extends
DataSourceDto
{
Integer
type
;
public
Integer
type
;
public
FormulaDataSourceDto
()
{
public
FormulaDataSourceDto
()
{
super
();
super
();
...
...
atms-api/src/main/java/pwc/taxtech/atms/dto/vatdto/ReportCellDataSourceDto.java
View file @
7d75d2c6
...
@@ -39,6 +39,7 @@ public class ReportCellDataSourceDto extends FormulaDataSourceDto {
...
@@ -39,6 +39,7 @@ public class ReportCellDataSourceDto extends FormulaDataSourceDto {
public
static
ReportCellDataSourceDto
extractFromGroup
(
BBParasBo
bbParasBo
,
CurrentPeriodBo
currentPeriodBo
,
public
static
ReportCellDataSourceDto
extractFromGroup
(
BBParasBo
bbParasBo
,
CurrentPeriodBo
currentPeriodBo
,
CellData
cellData
,
CellTemplatePerGroupDto
cellTemplateData
)
{
CellData
cellData
,
CellTemplatePerGroupDto
cellTemplateData
)
{
ReportCellDataSourceDto
dataSource
=
new
ReportCellDataSourceDto
();
ReportCellDataSourceDto
dataSource
=
new
ReportCellDataSourceDto
();
dataSource
.
name
=
DataSourceName
.
ReportDataSource
;
dataSource
.
year
=
currentPeriodBo
.
curYear
;
dataSource
.
year
=
currentPeriodBo
.
curYear
;
dataSource
.
period
=
currentPeriodBo
.
curPeriod
;
dataSource
.
period
=
currentPeriodBo
.
curPeriod
;
dataSource
.
columnIndex
=
bbParasBo
.
getColumnIndex
();
dataSource
.
columnIndex
=
bbParasBo
.
getColumnIndex
();
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/FormulaAgent.java
View file @
7d75d2c6
...
@@ -9,6 +9,7 @@ import pwc.taxtech.atms.dto.vatdto.CellTemplatePerGroupDto;
...
@@ -9,6 +9,7 @@ import pwc.taxtech.atms.dto.vatdto.CellTemplatePerGroupDto;
import
pwc.taxtech.atms.dto.vatdto.FormulaDataSourceDto
;
import
pwc.taxtech.atms.dto.vatdto.FormulaDataSourceDto
;
import
pwc.taxtech.atms.entitiy.ProjectServiceType
;
import
pwc.taxtech.atms.entitiy.ProjectServiceType
;
import
pwc.taxtech.atms.entitiy.ProjectServiceTypeExample
;
import
pwc.taxtech.atms.entitiy.ProjectServiceTypeExample
;
import
pwc.taxtech.atms.service.impl.DistributedIDService
;
import
pwc.taxtech.atms.vat.dao.CellDataMapper
;
import
pwc.taxtech.atms.vat.dao.CellDataMapper
;
import
pwc.taxtech.atms.vat.dao.FormulaProjectMapper
;
import
pwc.taxtech.atms.vat.dao.FormulaProjectMapper
;
import
pwc.taxtech.atms.vat.dao.ReportMapper
;
import
pwc.taxtech.atms.vat.dao.ReportMapper
;
...
@@ -18,6 +19,7 @@ import pwc.taxtech.atms.vat.entity.DataSource;
...
@@ -18,6 +19,7 @@ import pwc.taxtech.atms.vat.entity.DataSource;
import
pwc.taxtech.atms.vat.entity.Report
;
import
pwc.taxtech.atms.vat.entity.Report
;
import
pwc.taxtech.atms.vat.entity.ReportExample
;
import
pwc.taxtech.atms.vat.entity.ReportExample
;
import
java.math.BigDecimal
;
import
java.util.List
;
import
java.util.List
;
import
static
pwc
.
taxtech
.
atms
.
constant
.
Constant
.
FIRST_OR_DEFAULT
;
import
static
pwc
.
taxtech
.
atms
.
constant
.
Constant
.
FIRST_OR_DEFAULT
;
...
@@ -32,6 +34,8 @@ public class FormulaAgent extends VatAbstractService {
...
@@ -32,6 +34,8 @@ public class FormulaAgent extends VatAbstractService {
public
ReportMapper
reportMapper
;
public
ReportMapper
reportMapper
;
@Autowired
@Autowired
public
CellDataMapper
cellDataMapper
;
public
CellDataMapper
cellDataMapper
;
@Autowired
public
DistributedIDService
distributedIDService
;
public
List
<
CellTemplatePerGroupDto
>
getCellTemplateGroupDto
(
Long
templateGroupId
,
String
projectId
)
{
public
List
<
CellTemplatePerGroupDto
>
getCellTemplateGroupDto
(
Long
templateGroupId
,
String
projectId
)
{
...
@@ -73,20 +77,20 @@ public class FormulaAgent extends VatAbstractService {
...
@@ -73,20 +77,20 @@ public class FormulaAgent extends VatAbstractService {
return
null
;
return
null
;
}
}
public
void
save
(
List
<
FormulaDataSourceDto
>
dataSourceDtos
){
public
void
save
(
List
<
FormulaDataSourceDto
>
dataSourceDtos
)
{
dataSourceDtos
.
forEach
(
m
->
{
dataSourceDtos
.
forEach
(
m
->
{
DataSource
ds
=
new
DataSource
();
DataSource
ds
=
new
DataSource
();
ds
.
setAmount
(
m
.
getAmount
());
ds
.
setAmount
(
m
.
getAmount
()
==
null
?
new
BigDecimal
(
0
)
:
m
.
getAmount
()
);
ds
.
setCreateBy
(
m
.
getCreator
());
ds
.
setCreateBy
(
m
.
getCreator
());
ds
.
setCreateTime
(
m
.
getCreateTime
());
ds
.
setCreateTime
(
m
.
getCreateTime
());
ds
.
setDescription
(
m
.
getDescription
());
ds
.
setDescription
(
m
.
getDescription
()
==
null
?
""
:
m
.
getDescription
()
);
ds
.
setKeyValueDataId
(
m
.
getKeyValueDataID
());
ds
.
setKeyValueDataId
(
m
.
getKeyValueDataID
());
ds
.
setName
(
m
.
getName
());
ds
.
setName
(
m
.
getName
());
ds
.
setId
(
m
.
getId
());
ds
.
setId
(
m
.
getId
());
ds
.
setType
(
m
.
getType
()
);
ds
.
setType
(
m
.
type
);
ds
.
setUpdateBy
(
m
.
getUpdater
());
ds
.
setUpdateBy
(
m
.
getUpdater
());
ds
.
setUpdateTime
(
m
.
getUpdateTime
());
ds
.
setUpdateTime
(
m
.
getUpdateTime
());
ds
.
setId
(
distributedIDService
.
nextId
());
dataSourceMapper
.
insert
(
ds
);
dataSourceMapper
.
insert
(
ds
);
});
});
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportFormulaFactory.java
View file @
7d75d2c6
...
@@ -116,6 +116,8 @@ public class ReportFormulaFactory {
...
@@ -116,6 +116,8 @@ public class ReportFormulaFactory {
MyAsserts
.
assertNotNull
(
cellData
,
Exceptions
.
BB_CELL_DATA_NULL
);
MyAsserts
.
assertNotNull
(
cellData
,
Exceptions
.
BB_CELL_DATA_NULL
);
nullCellDto
=
ReportCellDataSourceDto
.
extractFromGroup
(
bo
,
curPeriod
,
cellData
,
cellTemplateData
);
nullCellDto
=
ReportCellDataSourceDto
.
extractFromGroup
(
bo
,
curPeriod
,
cellData
,
cellTemplateData
);
closeDataSource
.
clean
();
closeDataSource
.
addDS
(
nullCellDto
);
// todo: fix datasource name by templateList(neo)
// todo: fix datasource name by templateList(neo)
MyAsserts
.
assertNotNull
(
cellData
.
getData
(),
Exceptions
.
BB_CELL_DATA_NULL
);
MyAsserts
.
assertNotNull
(
cellData
.
getData
(),
Exceptions
.
BB_CELL_DATA_NULL
);
...
...
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