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
3e0f1967
Commit
3e0f1967
authored
Jul 24, 2019
by
vikram singh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated isReleased method for future allocation
parent
5949358b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
ResourceService.java
...n/java/com/nisum/myteam/service/impl/ResourceService.java
+3
-6
No files found.
src/main/java/com/nisum/myteam/service/impl/ResourceService.java
View file @
3e0f1967
...
@@ -428,20 +428,17 @@ public class ResourceService implements IResourceService {
...
@@ -428,20 +428,17 @@ public class ResourceService implements IResourceService {
public
boolean
isReleased
(
Resource
resourceReq
){
public
boolean
isReleased
(
Resource
resourceReq
){
String
message
=
""
;
String
message
=
""
;
boolean
released
=
fals
e
;
boolean
released
=
tru
e
;
List
<
Resource
>
resourceList
=
resourceRepo
.
findByEmployeeId
(
resourceReq
.
getEmployeeId
());
List
<
Resource
>
resourceList
=
resourceRepo
.
findByEmployeeId
(
resourceReq
.
getEmployeeId
());
Resource
currentAllocation
=
getCurrentAllocationIfNotReturnNull
(
resourceReq
.
getEmployeeId
());
Resource
currentAllocation
=
getCurrentAllocationIfNotReturnNull
(
resourceReq
.
getEmployeeId
());
if
(
currentAllocation
==
null
){
if
(
currentAllocation
==
null
){
Resource
latestAllocation
=
getLatestAllocation
(
resourceList
.
stream
().
filter
(
r
->
r
.
getBillingEndDate
().
compareTo
(
resourceReq
.
getBillingStartDate
())
<
0
).
collect
(
Collectors
.
toList
()));
Resource
latestAllocation
=
getLatestAllocation
(
resourceList
.
stream
().
filter
(
r
->
r
.
getBillingEndDate
().
compareTo
(
resourceReq
.
getBillingStartDate
())
<
0
).
collect
(
Collectors
.
toList
()));
if
(
latestAllocation
!=
null
&&
latestAllocation
.
getStatus
().
equals
(
MyTeamUtils
.
STATUS_ENGAGED
)){
if
(
!
resourceReq
.
getStatus
().
equals
(
MyTeamUtils
.
STATUS_PROPOSED
)
&&
latestAllocation
!=
null
&&
latestAllocation
.
getStatus
().
equals
(
MyTeamUtils
.
STATUS_ENGAGED
)){
//not released
//not released
released
=
false
;
message
=
"Resource is not released from "
+
projectService
.
getProjectByProjectId
(
latestAllocation
.
getProjectId
()).
getProjectName
();
message
=
"Resource is not released from "
+
projectService
.
getProjectByProjectId
(
latestAllocation
.
getProjectId
()).
getProjectName
();
respMap
.
put
(
"statusCode"
,
810
);
respMap
.
put
(
"statusCode"
,
810
);
}
else
{
released
=
true
;
}
}
}
else
{
released
=
true
;
}
}
respMap
.
put
(
"message"
,
message
);
respMap
.
put
(
"message"
,
message
);
...
...
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