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
5d2d0d7d
Commit
5d2d0d7d
authored
Aug 09, 2018
by
neo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[bugfix] assert for null dbName for specialed period
parent
65f47fb2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
0 deletions
+6
-0
MyAsserts.java
...src/main/java/pwc/taxtech/atms/common/util/MyAsserts.java
+4
-0
Exceptions.java
.../src/main/java/pwc/taxtech/atms/exception/Exceptions.java
+1
-0
BB.java
...wc/taxtech/atms/vat/service/impl/report/functions/BB.java
+1
-0
No files found.
atms-api/src/main/java/pwc/taxtech/atms/common/util/MyAsserts.java
View file @
5d2d0d7d
...
...
@@ -27,6 +27,10 @@ public class MyAsserts {
if
(
obj
==
null
||
obj
.
isEmpty
())
throw
exception
;
}
public
static
void
assertNotEmpty
(
String
obj
,
FormulaException
exception
)
{
if
(
obj
==
null
||
obj
.
isEmpty
())
throw
exception
;
}
public
static
void
assertNotEmpty
(
Collection
obj
,
ApiException
exception
)
{
if
(
obj
==
null
||
obj
.
isEmpty
())
throw
exception
;
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/exception/Exceptions.java
View file @
5d2d0d7d
...
...
@@ -5,4 +5,5 @@ public class Exceptions {
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"
);
public
static
final
FormulaException
BB_EMPTY
=
new
FormulaException
(
"db name is empty"
);
}
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/BB.java
View file @
5d2d0d7d
...
...
@@ -84,6 +84,7 @@ public class BB extends FunctionBase implements FreeRefFunction {
String
dbName
=
agent
.
getPastProjectDbName
(
curPeriod
.
getCurYear
(),
formulaContext
.
getOrganizationID
());
MyAsserts
.
assertNotEmpty
(
dbName
,
Exceptions
.
BB_EMPTY
);
String
currentProjectDb
=
ShardingContextHolder
.
getDataSourceKey
();
CellData
cellData
=
null
;
if
(
currentProjectDb
.
equals
(
dbName
))
{
...
...
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