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
6d94ee50
Commit
6d94ee50
authored
May 13, 2019
by
Vijay Akula
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added status codes for projects
parent
1bb325c8
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
90 additions
and
68 deletions
+90
-68
ProjectController.java
...n/java/com/nisum/myteam/controller/ProjectController.java
+5
-8
Resource.java
src/main/java/com/nisum/myteam/model/dao/Resource.java
+53
-53
ResourceAllocation.java
...n/java/com/nisum/myteam/model/dao/ResourceAllocation.java
+0
-3
MyProjectAllocationVO.java
...java/com/nisum/myteam/model/vo/MyProjectAllocationVO.java
+1
-1
ResourceAllocationService.java
.../nisum/myteam/service/impl/ResourceAllocationService.java
+1
-1
ProjectStatus.java
...main/java/com/nisum/myteam/statuscodes/ProjectStatus.java
+5
-2
ResourceCodes.java
...main/java/com/nisum/myteam/statuscodes/ResourceCodes.java
+25
-0
No files found.
src/main/java/com/nisum/myteam/controller/ProjectController.java
View file @
6d94ee50
...
...
@@ -136,13 +136,13 @@ public class ProjectController {
projects
=
projectService
.
getRoleBasedProjects
(
employeeId
);
ResponseDetails
getRespDetails
=
new
ResponseDetails
(
new
Date
(),
604
,
"Retrieved the projects successfully"
,
ResponseDetails
getRespDetails
=
new
ResponseDetails
(
new
Date
(),
ProjectStatus
.
GET_PROJECTS
.
getCode
(),
ProjectStatus
.
GET_PROJECTS
.
getMessage
()
,
"Projects list"
,
projects
,
request
.
getRequestURI
(),
"Project details"
,
null
);
return
new
ResponseEntity
<
ResponseDetails
>(
getRespDetails
,
HttpStatus
.
OK
);
}
else
{
projects
=
projectService
.
getProjectsInsteadOfRole
();
ResponseDetails
getRespDetails
=
new
ResponseDetails
(
new
Date
(),
604
,
"Retrieved the projects successfully"
,
ResponseDetails
getRespDetails
=
new
ResponseDetails
(
new
Date
(),
ProjectStatus
.
GET_PROJECTS
.
getCode
(),
ProjectStatus
.
GET_PROJECTS
.
getMessage
()
,
"Projects list"
,
projects
,
request
.
getRequestURI
(),
"Project details"
,
null
);
return
new
ResponseEntity
<
ResponseDetails
>(
getRespDetails
,
HttpStatus
.
OK
);
...
...
@@ -156,7 +156,7 @@ public class ProjectController {
}
ResponseDetails
getRespDetails
=
new
ResponseDetails
(
new
Date
(),
606
,
"Please Provide valid employee id"
,
ResponseDetails
getRespDetails
=
new
ResponseDetails
(
new
Date
(),
ProjectStatus
.
EMPLOYEE_NOT_EXISTS
.
getCode
(),
ProjectStatus
.
EMPLOYEE_NOT_EXISTS
.
getMessage
()
,
"Projects list"
,
null
,
request
.
getRequestURI
(),
"Project details"
,
null
);
return
new
ResponseEntity
<
ResponseDetails
>(
getRespDetails
,
HttpStatus
.
OK
);
...
...
@@ -170,20 +170,17 @@ public class ProjectController {
if
(
deliveryLeadId
!=
null
&&
!
""
.
equalsIgnoreCase
(
deliveryLeadId
))
{
ResponseDetails
getRespDetails
=
new
ResponseDetails
(
new
Date
(),
604
,
"Retrieved the projects successfully"
,
ResponseDetails
getRespDetails
=
new
ResponseDetails
(
new
Date
(),
ProjectStatus
.
GET_PROJECTS
.
getCode
(),
ProjectStatus
.
GET_PROJECTS
.
getMessage
()
,
"Projects list under delivery lead"
,
projectService
.
getProjectsUnderDeliveryLead
(
deliveryLeadId
),
request
.
getRequestURI
(),
"Project details"
,
null
);
return
new
ResponseEntity
<
ResponseDetails
>(
getRespDetails
,
HttpStatus
.
OK
);
}
ResponseDetails
getRespDetails
=
new
ResponseDetails
(
new
Date
(),
606
,
"Please Provide valid Delivery lead id"
,
ResponseDetails
getRespDetails
=
new
ResponseDetails
(
new
Date
(),
ProjectStatus
.
DELIVERYLEAD_NOT_EXISTS
.
getCode
(),
ProjectStatus
.
DELIVERYLEAD_NOT_EXISTS
.
getMessage
()
,
"Projects list under delivery lead"
,
null
,
request
.
getRequestURI
(),
"Project details"
,
null
);
return
new
ResponseEntity
<
ResponseDetails
>(
getRespDetails
,
HttpStatus
.
OK
);
}
}
src/main/java/com/nisum/myteam/model/dao/Resource.java
View file @
6d94ee50
package
com
.
nisum
.
myteam
.
model
.
dao
;
import
java.io.Serializable
;
import
java.util.Date
;
import
com.nisum.myteam.model.AuditFields
;
import
org.bson.types.ObjectId
;
import
org.springframework.data.annotation.Id
;
import
org.springframework.data.mongodb.core.mapping.Document
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
org.springframework.format.annotation.DateTimeFormat.ISO
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
import
lombok.NoArgsConstructor
;
import
lombok.Setter
;
import
lombok.ToString
;
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@ToString
@Document
(
collection
=
"resources"
)
public
class
Resource
extends
AuditFields
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@Id
private
ObjectId
id
;
private
String
employeeId
;
private
String
employeeName
;
private
String
emailId
;
private
String
role
;
private
String
shift
;
private
String
projectId
;
private
String
projectName
;
private
String
account
;
private
String
experience
;
private
String
designation
;
private
String
billableStatus
;
private
String
mobileNumber
;
@DateTimeFormat
(
iso
=
ISO
.
DATE
)
private
Date
startDate
;
@DateTimeFormat
(
iso
=
ISO
.
DATE
)
private
Date
endDate
;
@DateTimeFormat
(
iso
=
ISO
.
DATE
)
private
Date
newBillingStartDate
;
private
boolean
active
;
private
String
accountId
;
private
String
domainId
;
}
//
package com.nisum.myteam.model.dao;
//
//
import java.io.Serializable;
//
import java.util.Date;
//
//
import com.nisum.myteam.model.AuditFields;
//
import org.bson.types.ObjectId;
//
import org.springframework.data.annotation.Id;
//
import org.springframework.data.mongodb.core.mapping.Document;
//
import org.springframework.format.annotation.DateTimeFormat;
//
import org.springframework.format.annotation.DateTimeFormat.ISO;
//
//
import lombok.AllArgsConstructor;
//
import lombok.Getter;
//
import lombok.NoArgsConstructor;
//
import lombok.Setter;
//
import lombok.ToString;
//
//
@Setter
//
@Getter
//
@AllArgsConstructor
//
@NoArgsConstructor
//
@ToString
//
@Document(collection = "resources")
//
public class Resource extends AuditFields implements Serializable {
//
//
private static final long serialVersionUID = 1L;
//
//
@Id
//
private ObjectId id;
//
private String employeeId;
//
private String employeeName;
//
private String emailId;
//
private String role;
//
private String shift;
//
private String projectId;
//
private String projectName;
//
private String account;
//
private String experience;
//
private String designation;
//
private String billableStatus;
//
private String mobileNumber;
//
@DateTimeFormat(iso = ISO.DATE)
//
private Date startDate;
//
@DateTimeFormat(iso = ISO.DATE)
//
private Date endDate;
//
@DateTimeFormat(iso = ISO.DATE)
//
private Date newBillingStartDate;
//
private boolean active;
//
//
private String accountId;
//
private String domainId;
//
}
src/main/java/com/nisum/myteam/model/dao/ResourceAllocation.java
View file @
6d94ee50
...
...
@@ -27,7 +27,6 @@ public class ResourceAllocation extends AuditFields implements Serializable {
private
String
employeeId
;
private
String
projectId
;
//private String projectName;
@DateTimeFormat
(
iso
=
ISO
.
DATE
)
private
String
billableStatus
;
...
...
@@ -39,8 +38,6 @@ public class ResourceAllocation extends AuditFields implements Serializable {
@DateTimeFormat
(
iso
=
ISO
.
DATE
,
pattern
=
"yyyy-MM-dd'T'HH:mm:ss.SSSX"
)
private
Date
billingEndDate
;
// private boolean active;
private
String
resourceRole
;
}
src/main/java/com/nisum/myteam/model/vo/MyProjectAllocationVO.java
View file @
6d94ee50
...
...
@@ -29,6 +29,6 @@ public class MyProjectAllocationVO {
private
String
shift
;
private
String
resourceStatus
;
private
List
<
HashMap
<
String
,
String
>>
deliverLeadIds
;
private
List
<
HashMap
<
String
,
String
>>
deliver
y
LeadIds
;
}
src/main/java/com/nisum/myteam/service/impl/ResourceAllocationService.java
View file @
6d94ee50
...
...
@@ -303,7 +303,7 @@ public class ResourceAllocationService implements IResourceAllocationService {
}
if
(
project
.
getDeliveryLeadIds
()
!=
null
)
{
myProject
.
setDeliverLeadIds
(
employeeService
.
getDeliveryManagerMap
(
project
.
getDeliveryLeadIds
()));
myProject
.
setDeliver
y
LeadIds
(
employeeService
.
getDeliveryManagerMap
(
project
.
getDeliveryLeadIds
()));
}
myProjectList
.
add
(
myProject
);
}
...
...
src/main/java/com/nisum/myteam/statuscodes/ProjectStatus.java
View file @
6d94ee50
...
...
@@ -8,8 +8,11 @@ public enum ProjectStatus {
ALREADY_EXISTED
(
703
,
"Project is already existed"
),
PROJECTID_IS_NOT_EXISTS
(
704
,
"Project Id is not existed"
),
PROJECT_NAME_IS_NOT_EXISTS
(
705
,
"Project is not existed"
),
IS_NOT_FOUND
(
706
,
"Domain is Not found"
),
GET_DOMIAINS
(
707
,
"Retrieved the domains successfully"
);
IS_NOT_FOUND
(
706
,
"Project is Not found"
),
GET_PROJECTS
(
707
,
"Retrieved the projects successfully"
),
EMPLOYEE_NOT_EXISTS
(
708
,
"Please Provide valid employee id"
),
DELIVERYLEAD_NOT_EXISTS
(
709
,
"Please Provide valid Delivery lead id"
);
private
int
code
;
private
String
message
;
...
...
src/main/java/com/nisum/myteam/statuscodes/ResourceCodes.java
0 → 100644
View file @
6d94ee50
package
com
.
nisum
.
myteam
.
statuscodes
;
public
enum
ResourceCodes
{
CREATE
(
800
,
""
);
private
int
code
;
private
String
message
;
private
ResourceCodes
(
int
code
,
String
message
){
this
.
code
=
code
;
this
.
message
=
message
;
}
public
int
getCode
()
{
return
this
.
code
;
}
public
String
getMessage
()
{
return
this
.
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