Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PERFORMA_REPLICA
Overview
Overview
Details
Activity
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
Muhammad Usman
PERFORMA_REPLICA
Commits
055d0806
Commit
055d0806
authored
Oct 27, 2017
by
Harsh Shah
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
For Role Fit Factors displaying % of tScore of Factor vs Max value for that specific factor
parent
3a8b9caf
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
46 additions
and
39 deletions
+46
-39
ClassNormalisation.java
cmsWebApp/src/performa/orm/ClassNormalisation.java
+8
-0
JobApplication.java
cmsWebApp/src/performa/orm/JobApplication.java
+3
-20
LevelNormalisation.java
cmsWebApp/src/performa/orm/LevelNormalisation.java
+8
-0
AnalysisEngine.java
cmsWebApp/src/performa/utils/AnalysisEngine.java
+20
-12
view_application_tab_applicant.jsp
...nsions/adminportal/inc/view_application_tab_applicant.jsp
+5
-5
view_applicants_shortlist_grid.jsp
...extensions/adminportal/view_applicants_shortlist_grid.jsp
+2
-2
No files found.
cmsWebApp/src/performa/orm/ClassNormalisation.java
View file @
055d0806
package
performa
.
orm
;
package
performa
.
orm
;
import
oneit.utils.math.NullArith
;
public
class
ClassNormalisation
extends
BaseClassNormalisation
public
class
ClassNormalisation
extends
BaseClassNormalisation
{
{
...
@@ -16,4 +18,9 @@ public class ClassNormalisation extends BaseClassNormalisation
...
@@ -16,4 +18,9 @@ public class ClassNormalisation extends BaseClassNormalisation
{
{
return
"ClassNormalisation"
;
return
"ClassNormalisation"
;
}
}
public
Double
getRoleFitScore
(
Integer
weightedScore
)
{
return
NullArith
.
round
(((
10
*
((
weightedScore
-
getWghtMeanScore
())
/
getWghtStddevScore
()))
+
50
),
1
);
}
}
}
\ No newline at end of file
cmsWebApp/src/performa/orm/JobApplication.java
View file @
055d0806
...
@@ -314,7 +314,7 @@ public class JobApplication extends BaseJobApplication
...
@@ -314,7 +314,7 @@ public class JobApplication extends BaseJobApplication
try
try
{
{
Map
<
FactorClass
,
Map
<
FactorLevelLink
,
Map
>>
factorScoreDetails
=
new
LinkedHashMap
();
Map
<
FactorClass
,
Map
<
FactorLevelLink
,
Map
>>
factorScoreDetails
=
new
LinkedHashMap
();
Map
<
FactorClass
,
Tuple
.
T
2
<
Double
,
ColorCode
>>
roleScoreMap
=
(
Map
<
FactorClass
,
Tuple
.
T2
<
Double
,
ColorCod
e
>>)
getRoleFit
();
Map
<
FactorClass
,
Tuple
.
T
3
<
Double
,
ColorCode
,
Double
>>
roleScoreMap
=
(
Map
<
FactorClass
,
Tuple
.
T3
<
Double
,
ColorCode
,
Doubl
e
>>)
getRoleFit
();
for
(
FactorClass
factorClass
:
getSortedFactorClasses
())
for
(
FactorClass
factorClass
:
getSortedFactorClasses
())
{
{
...
@@ -335,7 +335,7 @@ public class JobApplication extends BaseJobApplication
...
@@ -335,7 +335,7 @@ public class JobApplication extends BaseJobApplication
public
Double
getRoleFitScore
()
public
Double
getRoleFitScore
()
{
{
return
getRoleFit
()
!=
null
&&
getRoleFit
().
get
(
null
)
!=
null
?
((
Tuple
.
T
2
<
Double
,
ColorCod
e
>)
getRoleFit
().
get
(
null
)).
get0
()
:
0
d
;
return
getRoleFit
()
!=
null
&&
getRoleFit
().
get
(
null
)
!=
null
?
((
Tuple
.
T
3
<
Double
,
ColorCode
,
Doubl
e
>)
getRoleFit
().
get
(
null
)).
get0
()
:
0
d
;
}
}
public
Long
getCultureFitScore
()
public
Long
getCultureFitScore
()
...
@@ -375,26 +375,9 @@ public class JobApplication extends BaseJobApplication
...
@@ -375,26 +375,9 @@ public class JobApplication extends BaseJobApplication
return
score
>=
80
?
"green"
:
(
score
>=
60
?
"yellow"
:
"red-b"
);
return
score
>=
80
?
"green"
:
(
score
>=
60
?
"yellow"
:
"red-b"
);
}
}
//This will return relative percentage considering topper as 100%
public
Double
getRoleFitPercentage
()
public
Double
getRoleFitPercentage
()
{
{
Double
myScore
=
getRoleFitScore
();
return
getRoleFit
()
!=
null
&&
getRoleFit
().
get
(
null
)
!=
null
?
((
Tuple
.
T3
<
Double
,
ColorCode
,
Double
>)
getRoleFit
().
get
(
null
)).
get2
()
:
0
d
;
if
(
myScore
>
0
&&
getCandidate
()
!=
null
&&
getJob
()
!=
null
&&
getJob
().
getLevel
()
!=
null
)
{
TestAnalysis
testAnalysis
=
getCandidate
().
getTestAnalysisFor
(
getJob
().
getLevel
());
if
(
testAnalysis
!=
null
)
{
Double
topScore
=
AnalysisEngine
.
getSuitabilityScore
(
testAnalysis
,
true
).
get0
();
if
(
topScore
>
0
)
{
return
NullArith
.
round
(
NullArith
.
divide
(
NullArith
.
multiply
(
myScore
,
100
),
topScore
),
2
);
}
}
}
return
0
d
;
}
}
public
List
<
AppProcessOption
>
getValidProcessOptions
()
public
List
<
AppProcessOption
>
getValidProcessOptions
()
...
...
cmsWebApp/src/performa/orm/LevelNormalisation.java
View file @
055d0806
package
performa
.
orm
;
package
performa
.
orm
;
import
oneit.utils.math.NullArith
;
public
class
LevelNormalisation
extends
BaseLevelNormalisation
public
class
LevelNormalisation
extends
BaseLevelNormalisation
{
{
...
@@ -16,4 +18,9 @@ public class LevelNormalisation extends BaseLevelNormalisation
...
@@ -16,4 +18,9 @@ public class LevelNormalisation extends BaseLevelNormalisation
{
{
return
"LevelNormalisation"
;
return
"LevelNormalisation"
;
}
}
public
Double
getRoleFitScore
(
Double
weightedScore
)
{
return
NullArith
.
round
(((
10
*
((
weightedScore
-
getWghtMeanScore
())
/
getWghtStddevScore
()))
+
50
),
2
);
}
}
}
\ No newline at end of file
cmsWebApp/src/performa/utils/AnalysisEngine.java
View file @
055d0806
...
@@ -413,12 +413,12 @@ public class AnalysisEngine
...
@@ -413,12 +413,12 @@ public class AnalysisEngine
return
roleFitMap
;
return
roleFitMap
;
}
}
public
static
Map
<
FactorClass
,
Tuple
.
T
2
<
Double
,
ColorCod
e
>>
getRoleFitSuitability
(
Candidate
candidate
,
Level
level
)
public
static
Map
<
FactorClass
,
Tuple
.
T
3
<
Double
,
ColorCode
,
Doubl
e
>>
getRoleFitSuitability
(
Candidate
candidate
,
Level
level
)
{
{
LogMgr
.
log
(
JobApplication
.
LOG
,
LogLevel
.
PROCESSING1
,
"AnalysisEngine --> getRoleFitSuitability called for candidate "
,
candidate
,
" Level "
,
level
);
LogMgr
.
log
(
JobApplication
.
LOG
,
LogLevel
.
PROCESSING1
,
"AnalysisEngine --> getRoleFitSuitability called for candidate "
,
candidate
,
" Level "
,
level
);
TestAnalysis
testAnalysis
=
candidate
.
getTestAnalysisFor
(
level
);
TestAnalysis
testAnalysis
=
candidate
.
getTestAnalysisFor
(
level
);
Map
<
FactorClass
,
Tuple
.
T
2
<
Double
,
ColorCod
e
>>
scoreMap
=
new
HashMap
();
Map
<
FactorClass
,
Tuple
.
T
3
<
Double
,
ColorCode
,
Doubl
e
>>
scoreMap
=
new
HashMap
();
if
(
testAnalysis
!=
null
&&
testAnalysis
.
getCandidateClassScoresCount
()
>
0
)
if
(
testAnalysis
!=
null
&&
testAnalysis
.
getCandidateClassScoresCount
()
>
0
)
{
{
...
@@ -429,30 +429,36 @@ public class AnalysisEngine
...
@@ -429,30 +429,36 @@ public class AnalysisEngine
CandidateClassScore
candidateClassScore
=
testAnalysis
.
pipelineTestAnalysis
().
toCandidateClassScores
(
candidateClassScoreFilter
).
val
();
CandidateClassScore
candidateClassScore
=
testAnalysis
.
pipelineTestAnalysis
().
toCandidateClassScores
(
candidateClassScoreFilter
).
val
();
ClassNormalisation
classNormalisation
=
level
.
getClassNormalisationFor
(
factorClass
);
ClassNormalisation
classNormalisation
=
level
.
getClassNormalisationFor
(
factorClass
);
Double
score
=
0
d
;
Double
score
=
0
d
;
Double
maxScore
=
0
d
;
Double
scorePercentage
=
0
d
;
ColorCode
colorCode
=
null
;
ColorCode
colorCode
=
null
;
if
(
candidateClassScore
!=
null
&&
classNormalisation
!=
null
&&
NullArith
.
greaterThan
(
classNormalisation
.
getWghtStddevScore
(),
0
d
))
if
(
candidateClassScore
!=
null
&&
classNormalisation
!=
null
&&
NullArith
.
greaterThan
(
classNormalisation
.
getWghtStddevScore
(),
0
d
))
{
{
score
=
NullArith
.
round
(((
10
*
((
candidateClassScore
.
getWghtdClassScore
()
-
classNormalisation
.
getWghtMeanScore
())
/
classNormalisation
.
getWghtStddevScore
()))
+
50
),
1
);
score
=
classNormalisation
.
getRoleFitScore
(
candidateClassScore
.
getWghtdClassScore
());
maxScore
=
classNormalisation
.
getRoleFitScore
(
candidateClassScore
.
getMaxWghtdClassScore
());
colorCode
=
candidateClassScore
.
getColorCode
();
colorCode
=
candidateClassScore
.
getColorCode
();
scorePercentage
=
NullArith
.
round
(
NullArith
.
divide
(
NullArith
.
multiply
(
score
,
100
),
maxScore
),
2
);
}
}
scoreMap
.
put
(
factorClass
,
new
Tuple
.
T
2
(
score
,
colorCod
e
));
scoreMap
.
put
(
factorClass
,
new
Tuple
.
T
3
(
score
,
colorCode
,
scorePercentag
e
));
}
}
scoreMap
.
put
(
null
,
getSuitabilityScore
(
testAnalysis
,
false
));
scoreMap
.
put
(
null
,
getSuitabilityScore
(
testAnalysis
));
}
}
LogMgr
.
log
(
JobApplication
.
LOG
,
LogLevel
.
PROCESSING1
,
"AnalysisEngine --> getRoleFitSuitability completed for candidate "
,
candidate
,
" Level "
,
level
);
LogMgr
.
log
(
JobApplication
.
LOG
,
LogLevel
.
PROCESSING1
,
"AnalysisEngine --> getRoleFitSuitability completed for candidate "
,
candidate
,
" Level "
,
level
);
return
scoreMap
;
return
scoreMap
;
}
}
public
static
Tuple
.
T
2
<
Double
,
ColorCode
>
getSuitabilityScore
(
TestAnalysis
testAnalysis
,
boolean
maxScore
)
public
static
Tuple
.
T
3
<
Double
,
ColorCode
,
Double
>
getSuitabilityScore
(
TestAnalysis
testAnalysis
)
{
{
LogMgr
.
log
(
JobApplication
.
LOG
,
LogLevel
.
PROCESSING1
,
"AnalysisEngine --> getSuitabilityScore called for testAnalysis "
,
testAnalysis
);
LogMgr
.
log
(
JobApplication
.
LOG
,
LogLevel
.
PROCESSING1
,
"AnalysisEngine --> getSuitabilityScore called for testAnalysis "
,
testAnalysis
);
Double
totalScore
=
maxScore
?
testAnalysis
.
getMaxWghtdLevelScore
()
:
testAnalysis
.
getWghtdLevelScore
();
Double
rawScore
=
testAnalysis
.
getWghtdLevelScore
();
Double
wghtdMeanScore
=
0
d
;
Double
wghtdMeanScore
=
0
d
;
Double
wghtdStdDevScore
=
0
d
;
Double
wghtdStdDevScore
=
0
d
;
Double
suitabilityScore
=
0
d
;
Double
suitabilityScore
=
0
d
;
Double
maxScore
=
0
d
;
Double
suitabilityPercent
=
0
d
;
ColorCode
colorCode
=
null
;
ColorCode
colorCode
=
null
;
LevelNormalisation
levelNormalisation
=
testAnalysis
.
getLevel
().
getLevelNormalisation
();
LevelNormalisation
levelNormalisation
=
testAnalysis
.
getLevel
().
getLevelNormalisation
();
...
@@ -461,18 +467,20 @@ public class AnalysisEngine
...
@@ -461,18 +467,20 @@ public class AnalysisEngine
{
{
wghtdMeanScore
=
levelNormalisation
.
getWghtMeanScore
();
wghtdMeanScore
=
levelNormalisation
.
getWghtMeanScore
();
wghtdStdDevScore
=
levelNormalisation
.
getWghtStddevScore
();
wghtdStdDevScore
=
levelNormalisation
.
getWghtStddevScore
();
}
if
(
wghtdStdDevScore
>
0
d
)
if
(
wghtdStdDevScore
>
0
d
)
{
{
suitabilityScore
=
NullArith
.
round
(((
10
*
((
totalScore
-
wghtdMeanScore
)
/
wghtdStdDevScore
))
+
50
),
2
);
suitabilityScore
=
levelNormalisation
.
getRoleFitScore
(
rawScore
);
maxScore
=
levelNormalisation
.
getRoleFitScore
(
testAnalysis
.
getMaxWghtdLevelScore
());
suitabilityPercent
=
NullArith
.
round
(
NullArith
.
divide
(
NullArith
.
multiply
(
suitabilityScore
,
100
),
maxScore
),
2
);
}
}
}
if
(
total
Score
>=
wghtdMeanScore
)
if
(
raw
Score
>=
wghtdMeanScore
)
{
{
colorCode
=
ColorCode
.
GREEN
;
colorCode
=
ColorCode
.
GREEN
;
}
}
else
if
(
total
Score
<
(
wghtdMeanScore
-
wghtdStdDevScore
))
else
if
(
raw
Score
<
(
wghtdMeanScore
-
wghtdStdDevScore
))
{
{
colorCode
=
ColorCode
.
RED
;
colorCode
=
ColorCode
.
RED
;
}
}
...
@@ -482,7 +490,7 @@ public class AnalysisEngine
...
@@ -482,7 +490,7 @@ public class AnalysisEngine
}
}
LogMgr
.
log
(
JobApplication
.
LOG
,
LogLevel
.
PROCESSING1
,
"AnalysisEngine --> getSuitabilityScore completed for testAnalysis "
,
testAnalysis
,
" Score:"
,
suitabilityScore
,
" Color:"
,
colorCode
);
LogMgr
.
log
(
JobApplication
.
LOG
,
LogLevel
.
PROCESSING1
,
"AnalysisEngine --> getSuitabilityScore completed for testAnalysis "
,
testAnalysis
,
" Score:"
,
suitabilityScore
,
" Color:"
,
colorCode
);
return
new
Tuple
.
T
2
(
suitabilityScore
,
colorCode
);
return
new
Tuple
.
T
3
(
suitabilityScore
,
colorCode
,
suitabilityPercent
);
}
}
public
static
Map
<
FactorLevelLink
,
Map
>
getFactorScoreDetails
(
Candidate
candidate
,
Level
level
,
FactorClass
factorClass
)
public
static
Map
<
FactorLevelLink
,
Map
>
getFactorScoreDetails
(
Candidate
candidate
,
Level
level
,
FactorClass
factorClass
)
...
...
cmsWebApp/webroot/extensions/adminportal/inc/view_application_tab_applicant.jsp
View file @
055d0806
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
String tabText = candidate.getToString();
String tabText = candidate.getToString();
String currentPage = WebUtils.getSamePageInRenderMode(request, WebUtils.VIEW_APPLICATION);
String currentPage = WebUtils.getSamePageInRenderMode(request, WebUtils.VIEW_APPLICATION);
Map<FactorClass, Tuple.T
2<Double, ColorCode>> roleScoreMap = (Map<FactorClass, Tuple.T2<Double, ColorCod
e>>)jobApplication.getRoleFit();
Map<FactorClass, Tuple.T
3<Double, ColorCode, Double>> roleScoreMap = (Map<FactorClass, Tuple.T3<Double, ColorCode, Doubl
e>>)jobApplication.getRoleFit();
%>
%>
<script>
<script>
function tabToggle(tab, selectDiv) {
function tabToggle(tab, selectDiv) {
...
@@ -117,7 +117,7 @@
...
@@ -117,7 +117,7 @@
<div class="applicant-sub-part">
<div class="applicant-sub-part">
<div class="applicant-left">
<div class="applicant-left">
<%
<%
Tuple.T
2<Double, ColorCode> roleFitData = (jobApplication.getRoleFit()!=null && jobApplication.getRoleFit().get(null)!=null) ? (Tuple.T2<Double, ColorCod
e>) jobApplication.getRoleFit().get(null) : null;
Tuple.T
3<Double, ColorCode, Double> roleFitData = (jobApplication.getRoleFit()!=null && jobApplication.getRoleFit().get(null)!=null) ? (Tuple.T3<Double, ColorCode, Doubl
e>) jobApplication.getRoleFit().get(null) : null;
String colorClass = "percent-" +(roleFitData!=null ? roleFitData.get1().getCSSClass() : "green");
String colorClass = "percent-" +(roleFitData!=null ? roleFitData.get1().getCSSClass() : "green");
List<FactorScore> factorScores = jobApplication.getRoleAreaOfConcerns();
List<FactorScore> factorScores = jobApplication.getRoleAreaOfConcerns();
List<Tuple.T2> cultureConcerns = jobApplication.getCultureAreaOfConcerns();
List<Tuple.T2> cultureConcerns = jobApplication.getCultureAreaOfConcerns();
...
@@ -126,7 +126,7 @@
...
@@ -126,7 +126,7 @@
<div class="<%= job.getIncludeAssessmentCriteria()==Boolean.TRUE ? "col-sm-4" : "col-sm-6" %> col-xs-12 text-center thr-block role-fit" href="#1a" data-toggle="tab" id="progress1" onClick="tabToggle('#tab1', '.role-fit')">
<div class="<%= job.getIncludeAssessmentCriteria()==Boolean.TRUE ? "col-sm-4" : "col-sm-6" %> col-xs-12 text-center thr-block role-fit" href="#1a" data-toggle="tab" id="progress1" onClick="tabToggle('#tab1', '.role-fit')">
<label class="progress-label">role fit</label>
<label class="progress-label">role fit</label>
<div class="<%= colorClass %> fixed-width">
<div class="<%= colorClass %> fixed-width">
<p style="display:none;"><oneit:toString value="<%=
jobApplication.getRoleFitPercentage() %>"
mode="TwoDPDouble" nullValue="0"/></p>
<p style="display:none;"><oneit:toString value="<%=
roleFitData!=null ? roleFitData.get2() : 0d %>"
mode="TwoDPDouble" nullValue="0"/></p>
</div>
</div>
<div class="row four-label">
<div class="row four-label">
<%
<%
...
@@ -280,14 +280,14 @@
...
@@ -280,14 +280,14 @@
for(FactorClass factorClass : factorClassDtls.keySet())
for(FactorClass factorClass : factorClassDtls.keySet())
{
{
Map<FactorLevelLink, Map> factorDetails = factorClassDtls.get(factorClass);
Map<FactorLevelLink, Map> factorDetails = factorClassDtls.get(factorClass);
Double rating = roleScoreMap.get(factorClass).get
0
();
Double rating = roleScoreMap.get(factorClass).get
2
();
ColorCode colorCode = roleScoreMap.get(factorClass).get1();
ColorCode colorCode = roleScoreMap.get(factorClass).get1();
String cssClass = colorCode.getCSSClass();
String cssClass = colorCode.getCSSClass();
%>
%>
<div class="main-pro-bar">
<div class="main-pro-bar">
<div class="pro-bar">
<div class="pro-bar">
<span class="appli-label"><oneit:toString value="<%= factorClass %>" mode="EscapeHTML"/></span>
<span class="appli-label"><oneit:toString value="<%= factorClass %>" mode="EscapeHTML"/></span>
<span class="appli-percen gray"><oneit:toString value="<%= rating %>" mode="WholeNumber"/></span>
<span class="appli-percen gray"><oneit:toString value="<%= rating %>" mode="
Percentage
WholeNumber"/></span>
<span class="appli-progress-bar">
<span class="appli-progress-bar">
<div class="progress">
<div class="progress">
<div class="progress-bar <%= cssClass %>" role="progressbar" aria-valuenow="<%= rating %>" aria-valuemin="0" aria-valuemax="100" style="width:<%= rating %>%"></div>
<div class="progress-bar <%= cssClass %>" role="progressbar" aria-valuenow="<%= rating %>" aria-valuemin="0" aria-valuemax="100" style="width:<%= rating %>%"></div>
...
...
cmsWebApp/webroot/extensions/adminportal/view_applicants_shortlist_grid.jsp
View file @
055d0806
...
@@ -116,7 +116,7 @@
...
@@ -116,7 +116,7 @@
Integer overallRank = jobApplication.getOverallRank();
Integer overallRank = jobApplication.getOverallRank();
Boolean isTopRank = CollectionUtils.equals(overallRank, 1);
Boolean isTopRank = CollectionUtils.equals(overallRank, 1);
Map<FactorClass, Tuple.T
2<Double, ColorCode>> roleScoreMap = (Map<FactorClass, Tuple.T2<Double, ColorCod
e>>)jobApplication.getRoleFit();
Map<FactorClass, Tuple.T
3<Double, ColorCode, Double>> roleScoreMap = (Map<FactorClass, Tuple.T3<Double, ColorCode, Doubl
e>>)jobApplication.getRoleFit();
%>
%>
<div class="<%= "appl-c-box " + (i == 0 ? " cb-one" : "")%> ">
<div class="<%= "appl-c-box " + (i == 0 ? " cb-one" : "")%> ">
<!--TODO: need to work on the logic. just added to demonstrate that there are 3 different colors for this-->
<!--TODO: need to work on the logic. just added to demonstrate that there are 3 different colors for this-->
...
@@ -157,7 +157,7 @@
...
@@ -157,7 +157,7 @@
<oneit:toString value="<%= factorClass %>" mode="EscapeHTML"/>
<oneit:toString value="<%= factorClass %>" mode="EscapeHTML"/>
</div>
</div>
<div class="detail-no green">
<div class="detail-no green">
<oneit:toString value="<%= roleScoreMap.get(factorClass).get
0
() %>" mode="PercentageWholeNumber"/>
<oneit:toString value="<%= roleScoreMap.get(factorClass).get
2
() %>" mode="PercentageWholeNumber"/>
</div>
</div>
</div>
</div>
<%
<%
...
...
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