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
dc35fcc2
Commit
dc35fcc2
authored
Jun 13, 2019
by
Md Suleman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated resource allocation service and controller
parent
743d5b79
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
110 additions
and
68 deletions
+110
-68
ResourceController.java
.../java/com/nisum/myteam/controller/ResourceController.java
+18
-0
ResourceVO.java
src/main/java/com/nisum/myteam/model/vo/ResourceVO.java
+1
-0
ResourceService.java
...n/java/com/nisum/myteam/service/impl/ResourceService.java
+91
-68
No files found.
src/main/java/com/nisum/myteam/controller/ResourceController.java
View file @
dc35fcc2
...
@@ -293,5 +293,23 @@ public class ResourceController {
...
@@ -293,5 +293,23 @@ public class ResourceController {
}
}
@RequestMapping
(
value
=
"/resources/moveToOpenPool"
,
method
=
RequestMethod
.
PUT
,
produces
=
MediaType
.
APPLICATION_JSON_VALUE
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
public
ResponseEntity
<?>
moveResourceToOpenPool
(
@RequestBody
Resource
resource
,
@RequestParam
(
value
=
"loginEmpId"
)
String
loginEmpId
,
HttpServletRequest
request
)
throws
MyTeamException
{
ResponseDetails
responseDetails
;
if
(
StringUtils
.
isNotBlank
(
loginEmpId
))
{
Resource
result
=
resourceService
.
sendResourceToOpenPool
(
resource
,
loginEmpId
);
responseDetails
=
new
ResponseDetails
(
new
Date
(),
Integer
.
parseInt
(
resourceService
.
respMap
.
get
(
"statusCode"
).
toString
()),
resourceService
.
respMap
.
get
(
"message"
).
toString
(),
"Resource description"
,
null
,
request
.
getContextPath
(),
"Resource details"
,
result
);
}
else
{
responseDetails
=
new
ResponseDetails
(
new
Date
(),
820
,
"Please provide the valid Employee Id"
,
"Employee Id is not valid"
,
null
,
request
.
getRequestURI
(),
"Resource details"
,
resource
);
}
return
new
ResponseEntity
<
ResponseDetails
>(
responseDetails
,
HttpStatus
.
OK
);
}
}
}
src/main/java/com/nisum/myteam/model/vo/ResourceVO.java
View file @
dc35fcc2
...
@@ -23,6 +23,7 @@ public class ResourceVO {
...
@@ -23,6 +23,7 @@ public class ResourceVO {
private
String
emailId
;
private
String
emailId
;
private
String
projectId
;
private
String
projectId
;
private
String
projectName
;
private
String
projectName
;
private
String
status
;
@DateTimeFormat
(
iso
=
DateTimeFormat
.
ISO
.
DATE
)
@DateTimeFormat
(
iso
=
DateTimeFormat
.
ISO
.
DATE
)
private
String
billableStatus
;
private
String
billableStatus
;
...
...
src/main/java/com/nisum/myteam/service/impl/ResourceService.java
View file @
dc35fcc2
This diff is collapsed.
Click to expand it.
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