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
a94e5592
Commit
a94e5592
authored
Jun 07, 2018
by
neo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[BUGFIX] use equal instead of == compate Integer
parent
7501a95f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
17 deletions
+17
-17
ProjectServiceImpl.java
...ava/pwc/taxtech/atms/service/impl/ProjectServiceImpl.java
+17
-17
No files found.
atms-api/src/main/java/pwc/taxtech/atms/service/impl/ProjectServiceImpl.java
View file @
a94e5592
...
...
@@ -134,11 +134,11 @@ public class ProjectServiceImpl implements ProjectService {
orgList
.
forEach
(
p
->
{
List
<
ProjectDisplayDto
>
fixList
=
data
.
stream
()
.
filter
((
Predicate
<
ProjectDisplayDto
>)
x
->
x
.
getOrganizationID
()
==
p
.
getOrganizationID
(
)
&&
x
.
getEnterpriseAccountSetID
()
==
p
.
getEnterpriseAccountSetID
(
)
&&
x
.
getServiceTypeID
()
==
p
.
getServiceTypeID
(
)
&&
x
.
getYear
()
==
p
.
getYear
(
)
&&
(
x
.
getStartPeriod
()
!=
p
.
getStartPeriod
()
||
x
.
getEndPeriod
()
!=
p
.
getEndPeriod
(
)))
.
filter
((
Predicate
<
ProjectDisplayDto
>)
x
->
x
.
getOrganizationID
()
.
equals
(
p
.
getOrganizationID
()
)
&&
x
.
getEnterpriseAccountSetID
()
.
equals
(
p
.
getEnterpriseAccountSetID
()
)
&&
x
.
getServiceTypeID
()
.
equals
(
p
.
getServiceTypeID
()
)
&&
x
.
getYear
()
.
equals
(
p
.
getYear
()
)
&&
(
!
x
.
getStartPeriod
().
equals
(
p
.
getStartPeriod
())
||
x
.
getEndPeriod
().
equals
(
p
.
getEndPeriod
()
)))
.
collect
(
Collectors
.
toList
());
if
(
fixList
!=
null
&&
!
fixList
.
isEmpty
())
{
...
...
@@ -210,7 +210,7 @@ public class ProjectServiceImpl implements ProjectService {
addProjectResult
.
setDbName
(
project
.
getDbName
());
addProjectResult
.
setProjectID
(
project
.
getID
());
return
addProjectResult
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
operationLogService
.
addDataAddLog
(
null
,
OperationModule
.
Project
,
userName
,
Message
.
Project
.
AddProjectFail
,
e
.
getMessage
(),
projectDto
.
getName
(),
LOG_TYPE
);
...
...
@@ -224,10 +224,10 @@ public class ProjectServiceImpl implements ProjectService {
@Override
public
Map
<
Integer
,
Integer
>
getProjectAllStatus
(
String
dbName
)
{
List
<
ProjectStatusManage
>
psmList
=
projectMapper
.
selectProjectAllStatus
(
dbName
);
Map
<
Integer
,
Integer
>
result
=
new
HashMap
<>(
psmList
.
size
());
psmList
.
forEach
(
m
->
{
result
.
put
(
m
.
getPeriodId
(),
m
.
getStatus
());
List
<
ProjectStatusManage
>
psmList
=
projectMapper
.
selectProjectAllStatus
(
dbName
);
Map
<
Integer
,
Integer
>
result
=
new
HashMap
<>(
psmList
.
size
());
psmList
.
forEach
(
m
->
{
result
.
put
(
m
.
getPeriodId
(),
m
.
getStatus
());
});
return
result
;
...
...
@@ -243,7 +243,7 @@ public class ProjectServiceImpl implements ProjectService {
int
post
=
Integer
.
parseInt
(
maxName
.
substring
(
3
))
+
1
;
if
(
post
>=
100000
)
{
Integer
pre
=
Integer
.
parseInt
(
String
.
valueOf
(
maxName
.
charAt
(
0
)));
pre2
=
((
char
)
(
pre
+
1
))+
""
;
pre2
=
((
char
)
(
pre
+
1
))
+
""
;
post2
=
"00000"
;
}
else
if
(
post
>=
10000
)
{
post2
=
post
+
""
;
...
...
@@ -277,12 +277,12 @@ public class ProjectServiceImpl implements ProjectService {
//判断是否已经创建过该项目
//对于VAT,只创建今年及之后年份的项目(2018.1.2经Michelle确定,已放开vat限制)
//if ((projectList != null && projectList.Count > 0) || (int.Parse(orgDto.ServiceTypeID) == 2 && orgDto.Year < DateTime.Now.Year))
if
(!
pList
.
stream
().
anyMatch
((
Predicate
<
ProjectDisplayDto
>)
t
->
t
.
getYear
()
==
dto
.
getYear
(
)
&&
t
.
getServiceTypeID
()
==
dto
.
getServiceTypeID
(
)
&&
t
.
getOrganizationID
()
==
dto
.
getOrganizationID
(
)
&&
t
.
getEnterpriseAccountSetID
()
==
dto
.
getEnterpriseAccountSetID
(
)
&&
t
.
getStartPeriod
()
==
dto
.
getStartPeriod
(
)
&&
t
.
getEndPeriod
()
==
dto
.
getEndPeriod
(
)))
{
if
(!
pList
.
stream
().
anyMatch
((
Predicate
<
ProjectDisplayDto
>)
t
->
t
.
getYear
()
.
equals
(
dto
.
getYear
()
)
&&
t
.
getServiceTypeID
()
.
equals
(
dto
.
getServiceTypeID
()
)
&&
t
.
getOrganizationID
()
.
equals
(
dto
.
getOrganizationID
()
)
&&
t
.
getEnterpriseAccountSetID
()
.
equals
(
dto
.
getEnterpriseAccountSetID
()
)
&&
t
.
getStartPeriod
()
.
equals
(
dto
.
getStartPeriod
()
)
&&
t
.
getEndPeriod
()
.
equals
(
dto
.
getEndPeriod
()
)))
{
list
.
add
(
dto
);
}
});
...
...
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