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
bc7eee70
Commit
bc7eee70
authored
May 14, 2019
by
Vijay Akula
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolved the errors in Resourcescontroller
parent
236ee698
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
4 deletions
+14
-4
ResourceAllocationController.java
...nisum/myteam/controller/ResourceAllocationController.java
+2
-2
IResourceAllocationService.java
.../com/nisum/myteam/service/IResourceAllocationService.java
+2
-1
ResourceAllocationService.java
.../nisum/myteam/service/impl/ResourceAllocationService.java
+10
-1
No files found.
src/main/java/com/nisum/myteam/controller/ResourceAllocationController.java
View file @
bc7eee70
...
...
@@ -61,7 +61,7 @@ public class ResourceAllocationController {
}
}
ResponseDetails
responseDetails
=
new
ResponseDetails
(
new
Date
(),
resourceAllocService
.
respMap
.
get
(
"statusCode"
).
toString
(
),
resourceAllocService
.
respMap
.
get
(
"message"
).
toString
(),
ResponseDetails
responseDetails
=
new
ResponseDetails
(
new
Date
(),
Integer
.
parseInt
(
resourceAllocService
.
respMap
.
get
(
"statusCode"
).
toString
()
),
resourceAllocService
.
respMap
.
get
(
"message"
).
toString
(),
"Error message desc"
,
null
,
request
.
getRequestURI
(),
"Resource details"
,
resourceAllocationReq
);
return
new
ResponseEntity
<
ResponseDetails
>(
responseDetails
,
HttpStatus
.
OK
);
...
...
@@ -85,7 +85,7 @@ public class ResourceAllocationController {
resourceAllocService
.
updateResource
(
resourceAllocationReq
,
loginEmpId
);
}
ResponseDetails
createResponseDetails
=
new
ResponseDetails
(
new
Date
(),
resourceAllocService
.
respMap
.
get
(
"statusCode"
).
toString
(
),
resourceAllocService
.
respMap
.
get
(
"message"
).
toString
(),
ResponseDetails
createResponseDetails
=
new
ResponseDetails
(
new
Date
(),
Integer
.
parseInt
(
resourceAllocService
.
respMap
.
get
(
"statusCode"
).
toString
()
),
resourceAllocService
.
respMap
.
get
(
"message"
).
toString
(),
"Resource description"
,
null
,
request
.
getContextPath
(),
"Resource details"
,
resourceAllocationReq
);
return
new
ResponseEntity
<
ResponseDetails
>(
createResponseDetails
,
HttpStatus
.
OK
);
}
...
...
src/main/java/com/nisum/myteam/service/IResourceAllocationService.java
View file @
bc7eee70
...
...
@@ -2,7 +2,6 @@ package com.nisum.myteam.service;
import
com.nisum.myteam.exception.handler.MyTeamException
;
import
com.nisum.myteam.model.dao.Employee
;
import
com.nisum.myteam.model.dao.Resource
;
import
com.nisum.myteam.model.dao.ResourceAllocation
;
import
com.nisum.myteam.model.vo.MyProjectAllocationVO
;
import
com.nisum.myteam.model.vo.ResourceVO
;
...
...
@@ -62,5 +61,7 @@ public interface IResourceAllocationService {
public
List
<
ResourceAllocation
>
getAllResources
();
public
void
deleteResourcesUnderProject
(
String
projectId
);
}
src/main/java/com/nisum/myteam/service/impl/ResourceAllocationService.java
View file @
bc7eee70
...
...
@@ -175,7 +175,7 @@ public class ResourceAllocationService implements IResourceAllocationService {
public
void
updateResource
(
ResourceAllocation
resourceAllocReq
,
String
loginEmpId
)
throws
MyTeamException
{
ResourceAllocation
resourceAllocationPers
=
resourceAllocationRepo
.
save
(
resourceAllocReq
);
respMap
.
put
(
"statusCode"
,
801
;
respMap
.
put
(
"statusCode"
,
801
)
;
respMap
.
put
(
"message"
,
"Resource updated successfully"
);
respMap
.
put
(
"resourceObj"
,
resourceAllocationPers
);
...
...
@@ -390,4 +390,13 @@ public class ResourceAllocationService implements IResourceAllocationService {
}
public
void
deleteResourcesUnderProject
(
String
projectId
)
{
Query
query
=
new
Query
(
Criteria
.
where
(
"projectId"
).
is
(
projectId
));
List
<
ResourceAllocation
>
list
=
mongoTemplate
.
find
(
query
,
ResourceAllocation
.
class
);
resourceAllocationRepo
.
delete
(
list
);
}
}
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