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
7a39c235
Commit
7a39c235
authored
Jun 25, 2018
by
Rajeshekar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MT-55: FreePool end date issue
parent
1a415bb2
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
8 deletions
+32
-8
ReportsController.java
...n/java/com/nisum/mytime/controller/ReportsController.java
+6
-4
EmployeeRolesRepo.java
...n/java/com/nisum/mytime/repository/EmployeeRolesRepo.java
+2
-1
ProjectServiceImpl.java
...ain/java/com/nisum/mytime/service/ProjectServiceImpl.java
+21
-1
UserServiceImpl.java
src/main/java/com/nisum/mytime/service/UserServiceImpl.java
+3
-2
No files found.
src/main/java/com/nisum/mytime/controller/ReportsController.java
View file @
7a39c235
...
@@ -97,10 +97,11 @@ public class ReportsController {
...
@@ -97,10 +97,11 @@ public class ReportsController {
ProjectionOperation
projectToMatchModel
=
project
()
ProjectionOperation
projectToMatchModel
=
project
()
.
andExpression
(
"functionalGroup"
).
as
(
"name"
).
andExpression
(
"y"
)
.
andExpression
(
"functionalGroup"
).
as
(
"name"
).
andExpression
(
"y"
)
.
as
(
"y"
);
.
as
(
"y"
);
MatchOperation
matchStage
=
Aggregation
.
match
(
new
Criteria
(
"empStatus"
).
is
(
"Active"
));
Aggregation
agg
=
newAggregation
(
Aggregation
agg
=
newAggregation
(
// match(Criteria.where("employeeId").gt(10)),
// match(Criteria.where("employeeId").gt(10)),
group
(
"functionalGroup"
).
count
().
as
(
"y"
),
matchStage
,
group
(
"functionalGroup"
).
count
().
as
(
"y"
),
project
(
"y"
).
and
(
"functionalGroup"
).
previousOperation
(),
project
(
"y"
).
and
(
"functionalGroup"
).
previousOperation
(),
projectToMatchModel
,
projectToMatchModel
,
...
@@ -287,10 +288,11 @@ public class ReportsController {
...
@@ -287,10 +288,11 @@ public class ReportsController {
ProjectionOperation
projectToMatchModel
=
project
()
ProjectionOperation
projectToMatchModel
=
project
()
.
andExpression
(
"functionalGroup"
).
as
(
"name"
).
andExpression
(
"y"
)
.
andExpression
(
"functionalGroup"
).
as
(
"name"
).
andExpression
(
"y"
)
.
as
(
"y"
);
.
as
(
"y"
);
MatchOperation
matchStage
=
Aggregation
.
match
(
new
Criteria
(
"empStatus"
).
is
(
"Active"
));
Aggregation
agg
=
newAggregation
(
Aggregation
agg
=
newAggregation
(
// match(Criteria.where("employeeId").gt(10)),
// match(Criteria.where("employeeId").gt(10)),
group
(
"functionalGroup"
).
count
().
as
(
"y"
),
matchStage
,
group
(
"functionalGroup"
).
count
().
as
(
"y"
),
project
(
"y"
).
and
(
"functionalGroup"
).
previousOperation
(),
project
(
"y"
).
and
(
"functionalGroup"
).
previousOperation
(),
projectToMatchModel
,
projectToMatchModel
,
...
...
src/main/java/com/nisum/mytime/repository/EmployeeRolesRepo.java
View file @
7a39c235
...
@@ -15,5 +15,6 @@ public interface EmployeeRolesRepo
...
@@ -15,5 +15,6 @@ public interface EmployeeRolesRepo
EmployeeRoles
findByEmployeeName
(
String
employeeName
);
EmployeeRoles
findByEmployeeName
(
String
employeeName
);
List
<
EmployeeRoles
>
findByFunctionalGroup
(
String
functionalGroup
);
List
<
EmployeeRoles
>
findByEmpStatusAndFunctionalGroup
(
String
empStatus
,
String
functionalGroup
);
}
}
src/main/java/com/nisum/mytime/service/ProjectServiceImpl.java
View file @
7a39c235
...
@@ -177,7 +177,11 @@ public class ProjectServiceImpl implements ProjectService {
...
@@ -177,7 +177,11 @@ public class ProjectServiceImpl implements ProjectService {
projectTeamMate
.
getEmployeeId
(),
"Nisum0000"
,
true
);
projectTeamMate
.
getEmployeeId
(),
"Nisum0000"
,
true
);
if
(
activeBenchProject
!=
null
||
activeBenchProject
.
size
()
!=
0
)
{
if
(
activeBenchProject
!=
null
||
activeBenchProject
.
size
()
!=
0
)
{
for
(
ProjectTeamMate
pteamMate
:
activeBenchProject
)
{
for
(
ProjectTeamMate
pteamMate
:
activeBenchProject
)
{
Date
d
=
pT
.
getStartDate
()
!=
null
?
pT
.
getStartDate
()
:
new
Date
();
d
.
setDate
(
d
.
getDate
()
-
1
);
pteamMate
.
setActive
(
false
);
pteamMate
.
setActive
(
false
);
pteamMate
.
setEndDate
(
d
);
projectTeamMatesRepo
.
save
(
pteamMate
);
projectTeamMatesRepo
.
save
(
pteamMate
);
}
}
}
}
...
@@ -271,8 +275,9 @@ public class ProjectServiceImpl implements ProjectService {
...
@@ -271,8 +275,9 @@ public class ProjectServiceImpl implements ProjectService {
existingTeammate
.
setActive
(
false
);
existingTeammate
.
setActive
(
false
);
existingTeammate
.
setEndDate
(
new
Date
());
existingTeammate
.
setEndDate
(
new
Date
());
BillingDetails
billingDetails
=
new
BillingDetails
();
BillingDetails
billingDetails
=
new
BillingDetails
();
billingDetails
.
setBillableStatus
(
"
Bench
"
);
billingDetails
.
setBillableStatus
(
"
Non-Billable
"
);
billingDetails
.
setBillingStartDate
(
new
Date
());
billingDetails
.
setBillingStartDate
(
new
Date
());
billingDetails
.
setAccount
(
"Nisum"
);
billingDetails
.
setActive
(
true
);
billingDetails
.
setActive
(
true
);
billingDetails
.
setEmployeeId
(
existingTeammate
.
getEmployeeId
());
billingDetails
.
setEmployeeId
(
existingTeammate
.
getEmployeeId
());
billingDetails
.
setEmployeeName
(
existingTeammate
.
getEmployeeName
());
billingDetails
.
setEmployeeName
(
existingTeammate
.
getEmployeeName
());
...
@@ -291,6 +296,21 @@ public class ProjectServiceImpl implements ProjectService {
...
@@ -291,6 +296,21 @@ public class ProjectServiceImpl implements ProjectService {
updateEmployeeBilling
(
billingDetailsExisting
);
updateEmployeeBilling
(
billingDetailsExisting
);
}
}
projectTeamMatesRepo
.
save
(
existingTeammate
);
projectTeamMatesRepo
.
save
(
existingTeammate
);
ProjectTeamMate
newBenchAllocation
=
new
ProjectTeamMate
();
newBenchAllocation
.
setAccount
(
"Nisum"
);
newBenchAllocation
.
setBillableStatus
(
"Non-Billable"
);
newBenchAllocation
.
setDesignation
(
existingTeammate
.
getDesignation
());
newBenchAllocation
.
setEmailId
(
existingTeammate
.
getEmailId
());
newBenchAllocation
.
setEmployeeId
(
existingTeammate
.
getEmployeeId
());
newBenchAllocation
.
setActive
(
true
);
newBenchAllocation
.
setEmployeeName
(
existingTeammate
.
getEmployeeName
());
newBenchAllocation
.
setProjectId
(
"Nisum0000"
);
newBenchAllocation
.
setStartDate
(
new
Date
());
Project
p
=
projectRepo
.
findByProjectId
(
"Nisum0000"
);
newBenchAllocation
.
setProjectName
(
p
.
getProjectName
());
newBenchAllocation
.
setManagerId
(
p
.
getManagerId
());
newBenchAllocation
.
setManagerName
(
p
.
getManagerName
());
projectTeamMatesRepo
.
save
(
newBenchAllocation
);
updateShiftDetails
(
existingTeammate
);
updateShiftDetails
(
existingTeammate
);
}
}
...
...
src/main/java/com/nisum/mytime/service/UserServiceImpl.java
View file @
7a39c235
...
@@ -419,7 +419,8 @@ public class UserServiceImpl implements UserService {
...
@@ -419,7 +419,8 @@ public class UserServiceImpl implements UserService {
@Override
@Override
public
List
<
EmployeeRoles
>
getEmployeesByFunctionalGrp
(
public
List
<
EmployeeRoles
>
getEmployeesByFunctionalGrp
(
String
functionalGrp
)
{
String
functionalGrp
)
{
return
employeeRolesRepo
.
findByFunctionalGroup
(
functionalGrp
);
return
employeeRolesRepo
.
findByEmpStatusAndFunctionalGroup
(
"Active"
,
functionalGrp
);
}
}
}
}
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