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
3fb96405
Commit
3fb96405
authored
Aug 24, 2018
by
neo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[dev] when not fund celltemplate get and insert datasource
parent
ad11e28d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
4 deletions
+28
-4
BBParasBo.java
.../src/main/java/pwc/taxtech/atms/dto/vatdto/BBParasBo.java
+12
-0
CurrentPeriodBo.java
...ain/java/pwc/taxtech/atms/dto/vatdto/CurrentPeriodBo.java
+8
-0
Exceptions.java
.../src/main/java/pwc/taxtech/atms/exception/Exceptions.java
+1
-1
BB.java
...wc/taxtech/atms/vat/service/impl/report/functions/BB.java
+7
-3
No files found.
atms-api/src/main/java/pwc/taxtech/atms/dto/vatdto/BBParasBo.java
View file @
3fb96405
...
...
@@ -95,4 +95,16 @@ public class BBParasBo {
this
.
year
=
curYear
;
this
.
formulaExpression
=
otherBo
.
formulaExpression
;
}
@Override
public
String
toString
()
{
return
"BBParasBo{"
+
"reportCode='"
+
reportCode
+
'\''
+
", columnIndex="
+
columnIndex
+
", rowIndex="
+
rowIndex
+
", period="
+
period
+
", year="
+
year
+
", formulaExpression='"
+
formulaExpression
+
'\''
+
'}'
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/dto/vatdto/CurrentPeriodBo.java
View file @
3fb96405
...
...
@@ -35,4 +35,12 @@ public class CurrentPeriodBo {
return
new
CurrentPeriodBo
(
parameterPeriod
);
}
}
@Override
public
String
toString
()
{
return
"CurrentPeriodBo{"
+
"curYear="
+
curYear
+
", curPeriod="
+
curPeriod
+
'}'
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/exception/Exceptions.java
View file @
3fb96405
package
pwc
.
taxtech
.
atms
.
exception
;
public
class
Exceptions
{
public
static
final
FormulaException
BB_CELL_TEMP_NULL
=
new
FormulaException
(
"cell template
data is null
"
);
public
static
final
FormulaException
BB_CELL_TEMP_NULL
=
new
FormulaException
(
"cell template
group is null or empty
"
);
public
static
final
FormulaException
BB_REPORT_NULL
=
new
FormulaException
(
"cell report is null"
);
public
static
final
FormulaException
BB_CELL_DATA_NULL
=
new
FormulaException
(
"cell data is null"
);
public
static
final
FormulaException
BB_CELL_DATA_EMPTY
=
new
FormulaException
(
"cell data is empty"
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/BB.java
View file @
3fb96405
...
...
@@ -57,11 +57,14 @@ public class BB extends FunctionBase implements FreeRefFunction {
ReportCellDataSourceDto
nullCellDto
=
ReportCellDataSourceDto
.
nullDataSource
(
bo
,
curPeriod
);
ds
.
add
(
nullCellDto
);
CellTemplatePerGroupDto
cellTemplateData
=
agent
.
getCellTemplateGroupDto
(
formulaContext
.
getReportTemplateGroupID
(),
formulaContext
.
getProjectID
()).
stream
().
filter
(
dto
->
dto
.
getRowIndex
()
==
bo
.
getColumnIndex
()
-
1
&&
dto
.
getColumnIndex
()
==
bo
.
getColumnIndex
()
-
1
).
findFirst
().
get
();
BigDecimal
cellValue
=
BigDecimal
.
ZERO
;
try
{
CellTemplatePerGroupDto
cellTemplateData
=
agent
.
getCellTemplateGroupDto
(
formulaContext
.
getReportTemplateGroupID
(),
formulaContext
.
getProjectID
()).
stream
().
filter
(
dto
->
dto
.
getRowIndex
()
==
bo
.
getColumnIndex
()
-
1
&&
dto
.
getColumnIndex
()
==
bo
.
getColumnIndex
()
-
1
).
findFirst
().
orElseThrow
(()
->
{
throw
Exceptions
.
BB_CELL_TEMP_NULL
;
});
MyAsserts
.
assertNotNull
(
cellTemplateData
,
Exceptions
.
BB_CELL_TEMP_NULL
);
nullCellDto
.
fixedWithGroup
(
cellTemplateData
);
...
...
@@ -129,6 +132,7 @@ public class BB extends FunctionBase implements FreeRefFunction {
LOGGER
.
debug
(
"cell static value "
);
return
cellValue
;
}
finally
{
LOGGER
.
warn
(
"error for bb cacls for {} and current for {}"
,
bo
.
toString
(),
curPeriod
.
toString
());
Long
dataSourceID
=
saveDataSource
(
ec
,
ds
,
FormulaDataSourceDetailType
.
ReportCellDataSourceDto
,
cellValue
,
formulaContext
.
getPeriod
(),
formulaContext
.
getReportTemplateGroupID
());
saveFormulaBlock
(
formulaContext
.
getPeriod
(),
ec
,
bo
.
expression
(
curPeriod
.
getCurPeriod
(),
curPeriod
.
getCurYear
()),
cellValue
,
dataSourceID
);
...
...
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