Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mytime
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Narendar Vakiti
mytime
Commits
df3921de
Unverified
Commit
df3921de
authored
Aug 08, 2018
by
mshaik-nisum-com
Committed by
GitHub
Aug 08, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #134 from nisum-inc/FEATURE/CodeRefactoringForAddEmployeeToTeam
CodeRefactoringForAddEmployeeToTeam
parents
dd147301
3c8c4d04
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
ProjectServiceImpl.java
...ain/java/com/nisum/mytime/service/ProjectServiceImpl.java
+6
-7
No files found.
src/main/java/com/nisum/mytime/service/ProjectServiceImpl.java
View file @
df3921de
...
...
@@ -999,24 +999,23 @@ public class ProjectServiceImpl implements ProjectService {
@Override
public
String
addProjectTeamMateWithCheck
(
ProjectTeamMate
projectTeamMate
)
throws
MyTimeException
{
int
count
=
0
;
boolean
flag
=
false
;
String
projectName
=
null
;
String
fromDate
=
null
;
String
toDate
=
null
;
List
<
ProjectTeamMate
>
teamMateList
=
projectTeamMatesRepo
.
find
All
(
);
List
<
ProjectTeamMate
>
teamMateList
=
projectTeamMatesRepo
.
find
ByEmployeeId
(
projectTeamMate
.
getEmployeeId
()
);
for
(
ProjectTeamMate
projectMate
:
teamMateList
)
{
if
(
project
TeamMate
.
getEmployeeId
().
equals
(
projectMate
.
getEmployeeId
())
&&
project
Mate
.
getEndDate
()!=
null
&&
(
projectMate
.
getEndDate
().
compareTo
(
new
Date
())>
0
)
if
(
projectMate
.
getEndDate
()!=
null
&&
(
projectMate
.
getEndDate
().
compareTo
(
new
Date
())>
0
)
&&
!
projectMate
.
getProjectId
().
equals
(
"Nisum0000"
))
{
if
(++
count
==
1
)
{
flag
=
true
;
projectName
=
projectMate
.
getProjectName
();
fromDate
=
projectMate
.
getStartDate
().
toString
();
toDate
=
projectMate
.
getEndDate
().
toString
();
}
break
;
}
}
if
(
count
>
0
)
if
(
flag
==
true
)
return
"Resource "
+
projectTeamMate
.
getEmployeeId
()
+
" already Assigned to the "
+
projectName
+
" Project"
+
" from "
+
fromDate
+
"to "
+
toDate
;
else
...
...
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