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
9f4c0f11
Commit
9f4c0f11
authored
Jun 10, 2019
by
Prayas Jain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added Billability by functional group service call
parent
570708e6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
73 additions
and
55 deletions
+73
-55
ReportsController.java
...n/java/com/nisum/myteam/controller/ReportsController.java
+58
-46
AllocationChangeController.js
.../webapp/WEB-INF/controllers/AllocationChangeController.js
+7
-7
ChartsController.js
src/main/webapp/WEB-INF/controllers/ChartsController.js
+5
-2
custom-theme.css
src/main/webapp/WEB-INF/css/custom-theme.css
+3
-0
No files found.
src/main/java/com/nisum/myteam/controller/ReportsController.java
View file @
9f4c0f11
package
com
.
nisum
.
myteam
.
controller
;
package
com
.
nisum
.
myteam
.
controller
;
import
static
org
.
springframework
.
data
.
mongodb
.
core
.
aggregation
.
Aggregation
.
group
;
import
static
org
.
springframework
.
data
.
mongodb
.
core
.
aggregation
.
Aggregation
.
group
;
...
@@ -319,49 +320,63 @@ public class ReportsController {
...
@@ -319,49 +320,63 @@ public class ReportsController {
return
new
ResponseEntity
<>(
empList
,
HttpStatus
.
OK
);
return
new
ResponseEntity
<>(
empList
,
HttpStatus
.
OK
);
}
}
@RequestMapping
(
value
=
"/billabilityByFunctionalGroup"
,
@RequestMapping
(
value
=
"/billabilityByFunctionalGroup"
,
method
=
RequestMethod
.
GET
,
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_VALUE
)
produces
=
MediaType
.
APPLICATION_JSON_VALUE
)
public
ReportVo
billabilityReportByFunctionalGroup
(){
public
ReportVo
billabilityReportByFunctionalGroup
(){
ReportVo
reportVo
=
new
ReportVo
();
ReportVo
reportVo
=
new
ReportVo
();
Map
<
String
,
Object
>
billableData
=
new
HashMap
();
Map
<
String
,
Object
>
billableData
=
new
HashMap
();
Map
<
String
,
Object
>
nonBillableData
=
new
HashMap
();
Map
<
String
,
Object
>
nonBillableData
=
new
HashMap
();
List
<
Object
>
billableCount
=
new
ArrayList
<>();
Map
<
String
,
Object
>
traineeData
=
new
HashMap
();
List
<
Object
>
nonBillableCount
=
new
ArrayList
<>();
List
<
Object
>
billableCount
=
new
ArrayList
<>();
billableData
.
put
(
"name"
,
"Billable"
);
List
<
Object
>
nonBillableCount
=
new
ArrayList
<>();
nonBillableData
.
put
(
"name"
,
"Non Billable"
);
List
<
Object
>
traineeCount
=
new
ArrayList
<>();
for
(
String
functionalGroup:
reportVo
.
getCategoriesList
()){
billableData
.
put
(
"name"
,
"Billable"
);
Map
<
String
,
Object
>
billableObj
=
new
HashMap
();
nonBillableData
.
put
(
"name"
,
"Non-Billable"
);
Map
<
String
,
Object
>
nonbillableObj
=
new
HashMap
();
traineeData
.
put
(
"name"
,
"Trainee"
);
Integer
billableC
=
0
;
for
(
String
functionalGroup:
reportVo
.
getCategoriesList
()){
Integer
nonBillableC
=
0
;
Map
<
String
,
Object
>
billableObj
=
new
HashMap
();
float
billper
;
Map
<
String
,
Object
>
nonbillableObj
=
new
HashMap
();
float
nonBillPer
;
// Map<String,Object> traineeObj = new HashMap();
List
<
Employee
>
employeeList
=
employeeService
.
getAllEmployees
().
stream
().
Integer
billableC
=
0
;
filter
(
e
->
e
.
getFunctionalGroup
().
equals
(
functionalGroup
)).
collect
(
Collectors
.
toList
());
Integer
nonBillableC
=
0
;
for
(
Employee
employee:
employeeList
){
Integer
traineeC
=
0
;
Resource
resource
=
resourceService
.
getLatestResourceByEmpId
(
employee
.
getEmployeeId
());
// float traineePer;
if
(
resource
!=
null
&&
resource
.
getBillableStatus
().
equals
(
"Billable"
)){
float
billper
;
billableC
++;
float
nonBillPer
;
}
else
{
List
<
Employee
>
employeeList
=
employeeService
.
getAllEmployees
().
stream
().
nonBillableC
++;
filter
(
e
->
e
.
getFunctionalGroup
().
equals
(
functionalGroup
)).
collect
(
Collectors
.
toList
());
}
for
(
Employee
employee:
employeeList
){
}
Resource
resource
=
resourceService
.
getLatestResourceByEmpId
(
employee
.
getEmployeeId
());
billper
=
((
billableC
/
(
float
)
employeeList
.
size
())*
100
);
if
(
resource
!=
null
&&
resource
.
getBillableStatus
().
equals
(
"Billable"
)){
nonBillPer
=
nonBillableC
/(
float
)
employeeList
.
size
()*
100
;
billableC
++;
billableObj
.
put
(
"percent"
,
billper
);
}
else
if
(
resource
!=
null
&&
resource
.
getBillableStatus
().
equals
(
"Trainee"
))
{
billableObj
.
put
(
"y"
,
billableC
);
traineeC
++;
nonbillableObj
.
put
(
"percent"
,
nonBillPer
);
}
else
{
nonbillableObj
.
put
(
"y"
,
nonBillableC
);
nonBillableC
++;
billableCount
.
add
(
billableObj
);
}
nonBillableCount
.
add
(
nonbillableObj
);
}
}
billper
=
((
billableC
/
(
float
)(
employeeList
.
size
()
-
traineeC
))*
100
);
billableData
.
put
(
"data"
,
billableCount
);
nonBillPer
=
nonBillableC
/(
float
)
(
employeeList
.
size
()-
traineeC
)*
100
;
nonBillableData
.
put
(
"data"
,
nonBillableCount
);
// traineePer = traineeC / (float) employeeList.size()*100;
reportVo
.
getSeriesDataList
().
add
(
billableData
);
billableObj
.
put
(
"percent"
,
billper
);
reportVo
.
getSeriesDataList
().
add
(
nonBillableData
);
billableObj
.
put
(
"y"
,
billableC
);
return
reportVo
;
nonbillableObj
.
put
(
"percent"
,
nonBillPer
);
nonbillableObj
.
put
(
"y"
,
nonBillableC
);
// traineeObj.put("percent", traineePer);
// traineeObj.put("y", traineeC);
billableCount
.
add
(
billableObj
);
nonBillableCount
.
add
(
nonbillableObj
);
traineeCount
.
add
(
traineeC
);
}
billableData
.
put
(
"data"
,
billableCount
);
nonBillableData
.
put
(
"data"
,
nonBillableCount
);
traineeData
.
put
(
"data"
,
traineeCount
);
reportVo
.
getSeriesDataList
().
add
(
billableData
);
reportVo
.
getSeriesDataList
().
add
(
nonBillableData
);
reportVo
.
getSeriesDataList
().
add
(
traineeData
);
return
reportVo
;
}
}
...
@@ -436,9 +451,6 @@ public class ReportsController {
...
@@ -436,9 +451,6 @@ public class ReportsController {
seriesDetails
.
add
(
reportSeriesRecord
);
seriesDetails
.
add
(
reportSeriesRecord
);
}
}
System
.
out
.
println
(
seriesDetails
);
reportData
.
setCategoriesList
(
catagories
);
reportData
.
setCategoriesList
(
catagories
);
reportData
.
setSeriesDataList
(
seriesDetails
);
reportData
.
setSeriesDataList
(
seriesDetails
);
return
new
ResponseEntity
<>(
reportData
,
HttpStatus
.
OK
);
return
new
ResponseEntity
<>(
reportData
,
HttpStatus
.
OK
);
...
...
src/main/webapp/WEB-INF/controllers/AllocationChangeController.js
View file @
9f4c0f11
...
@@ -18,13 +18,13 @@ myApp.controller("allocationChangeReportController",function($scope,exportUiGrid
...
@@ -18,13 +18,13 @@ myApp.controller("allocationChangeReportController",function($scope,exportUiGrid
enableFiltering
:
true
,
enableFiltering
:
true
,
enableHorizontalScrollbar
:
1
,
enableHorizontalScrollbar
:
1
,
columnDefs
:
[
columnDefs
:
[
{
field
:
'employeeId'
,
displayName
:
'Emp
loyee
Id'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
true
,
width
:
100
},
{
field
:
'employeeId'
,
displayName
:
'Emp Id'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
true
,
width
:
100
},
{
field
:
'employeeName'
,
displayName
:
'Emp
loyee
Name'
,
enableColumnMenu
:
false
,
enableSorting
:
true
,
enableFiltering
:
true
,
width
:
200
},
{
field
:
'employeeName'
,
displayName
:
'Emp Name'
,
enableColumnMenu
:
false
,
enableSorting
:
true
,
enableFiltering
:
true
,
width
:
200
},
{
name
:
' prevAccountName'
,
displayName
:
'Prev
ious Client'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
fals
e
,
width
:
100
},
{
name
:
' prevAccountName'
,
displayName
:
'Prev
Client'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
tru
e
,
width
:
100
},
{
field
:
'prevProjectName'
,
displayName
:
'Prev
ious
Project'
,
enableColumnMenu
:
false
,
enableSorting
:
true
,
enableFiltering
:
true
,
width
:
150
},
{
field
:
'prevProjectName'
,
displayName
:
'Prev Project'
,
enableColumnMenu
:
false
,
enableSorting
:
true
,
enableFiltering
:
true
,
width
:
150
},
{
name
:
'prevBillableStatus'
,
displayName
:
'Prev
ious
Billability'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
false
,
width
:
100
},
{
name
:
'prevBillableStatus'
,
displayName
:
'Prev Billability'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
false
,
width
:
100
},
{
name
:
'prevBillingStartDate'
,
displayName
:
'Prev
ious
Billing Start Date'
,
cellFilter
:
'date:"dd-MMM-yyyy"'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
false
,
width
:
150
},
{
name
:
'prevBillingStartDate'
,
displayName
:
'Prev Billing Start Date'
,
cellFilter
:
'date:"dd-MMM-yyyy"'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
false
,
width
:
150
},
{
name
:
'prevBillingEndDate'
,
displayName
:
'Prev
ious
Billing Start Date'
,
cellFilter
:
'date:"dd-MMM-yyyy"'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
false
,
width
:
150
},
{
name
:
'prevBillingEndDate'
,
displayName
:
'Prev Billing Start Date'
,
cellFilter
:
'date:"dd-MMM-yyyy"'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
false
,
width
:
150
},
{
name
:
'currentAccountName'
,
displayName
:
'Current Client'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
false
,
width
:
100
},
{
name
:
'currentAccountName'
,
displayName
:
'Current Client'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
false
,
width
:
100
},
{
name
:
'currentBillableStatus'
,
displayName
:
'Current Billability'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
false
,
width
:
100
},
{
name
:
'currentBillableStatus'
,
displayName
:
'Current Billability'
,
enableColumnMenu
:
false
,
enableSorting
:
false
,
enableFiltering
:
false
,
width
:
100
},
{
field
:
'currentProjectName'
,
displayName
:
'Current Project'
,
enableColumnMenu
:
false
,
enableSorting
:
true
,
enableFiltering
:
true
,
width
:
150
},
{
field
:
'currentProjectName'
,
displayName
:
'Current Project'
,
enableColumnMenu
:
false
,
enableSorting
:
true
,
enableFiltering
:
true
,
width
:
150
},
...
...
src/main/webapp/WEB-INF/controllers/ChartsController.js
View file @
9f4c0f11
...
@@ -91,10 +91,13 @@ myApp.directive('hcPieChart', function () {
...
@@ -91,10 +91,13 @@ myApp.directive('hcPieChart', function () {
$scope
.
getMyTeamDetails
=
function
(
seriesName
,
category
,
optionName
,
title
){
$scope
.
getMyTeamDetails
=
function
(
seriesName
,
category
,
optionName
,
title
){
if
(
title
.
trim
()
==
'Employees Overview Report'
){
if
(
title
.
trim
()
==
'Billability By Functional Group'
){
if
(
category
==
'I&A'
){
category
=
'I%26A'
;
}
$http
({
$http
({
method
:
"GET"
,
method
:
"GET"
,
url
:
appConfig
.
appUri
+
"
/reports/fetchEmployeeDetailsByFG?fGroup="
+
option
Name
url
:
appConfig
.
appUri
+
"
reports/fetchEmployeeDetailsByFGAndBillability?fGroup="
+
category
+
"&billableStatus="
+
series
Name
}).
then
(
function
mySuccess
(
response
)
{
}).
then
(
function
mySuccess
(
response
)
{
$scope
.
gridOptions
.
data
=
response
.
data
;
$scope
.
gridOptions
.
data
=
response
.
data
;
if
(
response
.
data
.
length
>
10
){
if
(
response
.
data
.
length
>
10
){
...
...
src/main/webapp/WEB-INF/css/custom-theme.css
View file @
9f4c0f11
...
@@ -512,6 +512,9 @@ i.fa.fa-refresh:hover {
...
@@ -512,6 +512,9 @@ i.fa.fa-refresh:hover {
height: auto !important;
height: auto !important;
max-height: calc(350px - 20px);
max-height: calc(350px - 20px);
} */
} */
.ui-grid-icon-cancel
{
color
:
black
;
}
md-toolbar
._md-toolbar-transitions
{
md-toolbar
._md-toolbar-transitions
{
min-height
:
50px
!important
;
min-height
:
50px
!important
;
}
}
...
...
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