Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
IncomeCalculator
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
neel
IncomeCalculator
Commits
4e8c0ddd
Commit
4e8c0ddd
authored
May 15, 2020
by
Yashvant Kantival
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NGPA To NGPL - CR For MDB And MPB
parent
94f2160e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
12 deletions
+25
-12
src/main/java/com/ic/modules/auth/service/impl/NGPAtoNGPLCalcServiceImpl.java
+25
-12
No files found.
src/main/java/com/ic/modules/auth/service/impl/NGPAtoNGPLCalcServiceImpl.java
View file @
4e8c0ddd
...
@@ -68,19 +68,26 @@ public class NGPAtoNGPLCalcServiceImpl implements NGPAtoNGPLCalcService {
...
@@ -68,19 +68,26 @@ public class NGPAtoNGPLCalcServiceImpl implements NGPAtoNGPLCalcService {
return
basicJSONOperation1
;
return
basicJSONOperation1
;
}
}
public
double
calculateMonthlyPerformanceBonus
(
Double
WFYC
)
throws
JSONException
{
public
double
calculateMonthlyPerformanceBonus
(
Double
WFYC
,
boolean
isYear1
)
throws
JSONException
{
basicDoubleOperation
=
0
;
basicDoubleOperation
=
0
;
// basicStringOperation = ;
// basicStringOperation = ;
basicJSONArrayOperation
=
leaderCalcConfig
.
getValue
(
"fyc"
);
basicJSONArrayOperation
=
leaderCalcConfig
.
getValue
(
"fyc"
);
WFYC
=
(
double
)
Math
.
round
(
WFYC
/
12
);
if
(!
isYear1
)
{
WFYC
=
(
double
)
Math
.
round
(
WFYC
/
12
);
}
for
(
i
=
0
;
i
<
basicJSONArrayOperation
.
length
();
i
++
)
{
for
(
i
=
0
;
i
<
basicJSONArrayOperation
.
length
();
i
++
)
{
if
(
WFYC
>=
basicJSONArrayOperation
.
getJSONObject
(
i
).
getDouble
(
"minval"
)
&&
WFYC
<=
basicJSONArrayOperation
.
getJSONObject
(
i
).
getDouble
(
"maxval"
))
{
if
(
WFYC
>=
basicJSONArrayOperation
.
getJSONObject
(
i
).
getDouble
(
"minval"
)
&&
WFYC
<=
basicJSONArrayOperation
.
getJSONObject
(
i
).
getDouble
(
"maxval"
))
{
basicDoubleOperation
=
Math
.
round
(
(
WFYC
*
basicJSONArrayOperation
.
getJSONObject
(
i
).
getDouble
(
"per"
)
)
/
100
);
basicDoubleOperation
=
Math
.
round
(
(
WFYC
*
basicJSONArrayOperation
.
getJSONObject
(
i
).
getDouble
(
"per"
)
)
/
100
);
}
}
}
}
return
Math
.
round
(
basicDoubleOperation
*
12
);
if
(!
isYear1
)
{
return
Math
.
round
(
basicDoubleOperation
*
12
);
}
else
{
return
Math
.
round
(
basicDoubleOperation
*
metricsTable
[
1
][
0
]
);
}
}
}
public
void
preparengpaToLeaderCareerPathTable
(
JSONObject
requestJSON
)
throws
JSONException
{
public
void
preparengpaToLeaderCareerPathTable
(
JSONObject
requestJSON
)
throws
JSONException
{
// Preparing Leader Career Path Table
// Preparing Leader Career Path Table
for
(
i
=
0
;
i
<
2
;
i
++)
{
for
(
i
=
0
;
i
<
2
;
i
++)
{
...
@@ -142,11 +149,18 @@ public class NGPAtoNGPLCalcServiceImpl implements NGPAtoNGPLCalcService {
...
@@ -142,11 +149,18 @@ public class NGPAtoNGPLCalcServiceImpl implements NGPAtoNGPLCalcService {
// basicStringOperation = "[{\"180000\":25000,\"360000\":25000,\"720000\":25000,\"1440000\":25000,\"MPB\":2},{\"180000\":25000,\"360000\":50000,\"720000\":50000,\"1440000\":50000,\"MPB\":3},{\"180000\":25000,\"360000\":50000,\"720000\":75000,\"1440000\":75000,\"MPB\":4},{\"180000\":25000,\"360000\":50000,\"720000\":75000,\"1440000\":100000,\"MPB\":5}]";
// basicStringOperation = "[{\"180000\":25000,\"360000\":25000,\"720000\":25000,\"1440000\":25000,\"MPB\":2},{\"180000\":25000,\"360000\":50000,\"720000\":50000,\"1440000\":50000,\"MPB\":3},{\"180000\":25000,\"360000\":50000,\"720000\":75000,\"1440000\":75000,\"MPB\":4},{\"180000\":25000,\"360000\":50000,\"720000\":75000,\"1440000\":100000,\"MPB\":5}]";
basicJSONArrayOperation
=
leaderCalcConfig
.
getValue
(
"mdb"
);
basicJSONArrayOperation
=
leaderCalcConfig
.
getValue
(
"mdb"
);
for
(
i
=
0
;
i
<
basicJSONArrayOperation
.
length
();
i
++
)
{
for
(
i
=
0
;
i
<
basicJSONArrayOperation
.
length
();
i
++
)
{
if
(
basicJSONArrayOperation
.
getJSONObject
(
i
).
getDouble
(
"MDB"
)
==
4
)
{
if
(
i
==
1
)
{
basicDoubleOperation
=
2
;
}
else
{
basicDoubleOperation
=
4
;
}
if
(
basicJSONArrayOperation
.
getJSONObject
(
i
).
getDouble
(
"MPB"
)
==
basicDoubleOperation
)
{
basicJSONOperation1
=
basicJSONArrayOperation
.
getJSONObject
(
i
);
basicJSONOperation1
=
basicJSONArrayOperation
.
getJSONObject
(
i
);
break
;
break
;
}
}
}
}
metricsTable
[
1
][
7
]
=
Math
.
round
(
metricsTable
[
1
][
7
]
/
metricsTable
[
1
][
0
]
);
for
(
i
=
0
;
i
<
4
;
i
++
)
{
for
(
i
=
0
;
i
<
4
;
i
++
)
{
if
(
metricsTable
[
i
][
7
]
>
180000
&&
metricsTable
[
i
][
7
]
<
360000
)
{
if
(
metricsTable
[
i
][
7
]
>
180000
&&
metricsTable
[
i
][
7
]
<
360000
)
{
MonthlyDevelopmentBonus_Year1_NGPL
[
i
]
=
basicJSONOperation1
.
getDouble
(
"monthly_ep_18"
);
MonthlyDevelopmentBonus_Year1_NGPL
[
i
]
=
basicJSONOperation1
.
getDouble
(
"monthly_ep_18"
);
...
@@ -179,15 +193,14 @@ public class NGPAtoNGPLCalcServiceImpl implements NGPAtoNGPLCalcService {
...
@@ -179,15 +193,14 @@ public class NGPAtoNGPLCalcServiceImpl implements NGPAtoNGPLCalcService {
earningsTable
[
1
][
0
]
=
Math
.
round
(
(
metricsTable
[
1
][
6
]
*
fycPersantage
)
/
100
);
earningsTable
[
1
][
0
]
=
Math
.
round
(
(
metricsTable
[
1
][
6
]
*
fycPersantage
)
/
100
);
basicJSONOperation1
=
new
JSONObject
();
basicJSONOperation1
=
new
JSONObject
();
basicJSONOperation1
=
calculateFYCCreditAndWFYC
(
"BA"
,
earningsTable
[
1
][
0
]);
basicJSONOperation1
=
calculateFYCCreditAndWFYC
(
"BA"
,
earningsTable
[
1
][
0
]
/
metricsTable
[
1
][
0
]
);
earningsTable
[
1
][
7
]
=
basicJSONOperation1
.
getDouble
(
"DT"
);
earningsTable
[
1
][
7
]
=
basicJSONOperation1
.
getDouble
(
"DT"
);
earningsTable
[
1
][
8
]
=
basicJSONOperation1
.
getDouble
(
"WFYC"
);
earningsTable
[
1
][
8
]
=
basicJSONOperation1
.
getDouble
(
"WFYC"
);
earningsTable
[
1
][
1
]
=
0
;
earningsTable
[
1
][
1
]
=
0
;
earningsTable
[
1
][
2
]
=
0
;
earningsTable
[
1
][
2
]
=
0
;
earningsTable
[
1
][
3
]
=
(
earningsTable
[
1
][
8
]
!=
0
?
calculateMonthlyPerformanceBonus
(
earningsTable
[
1
][
8
])
:
0
);
earningsTable
[
1
][
3
]
=
(
earningsTable
[
1
][
8
]
!=
0
?
calculateMonthlyPerformanceBonus
(
earningsTable
[
1
][
8
]
,
true
)
:
0
);
earningsTable
[
1
][
4
]
=
Math
.
round
(
MonthlyDevelopmentBonus_Year1_NGPL
[
1
]
*
(
12
-
metricsTable
[
1
][
0
]
)
);
earningsTable
[
1
][
4
]
=
Math
.
round
(
MonthlyDevelopmentBonus_Year1_NGPL
[
1
]
*
metricsTable
[
1
][
0
]
);
earningsTable
[
1
][
5
]
=
earningsTable
[
1
][
3
]
+
earningsTable
[
1
][
4
];
earningsTable
[
1
][
5
]
=
earningsTable
[
1
][
3
]
+
earningsTable
[
1
][
4
];
earningsTable
[
1
][
6
]
=
0
;
earningsTable
[
1
][
6
]
=
0
;
...
@@ -215,8 +228,8 @@ public class NGPAtoNGPLCalcServiceImpl implements NGPAtoNGPLCalcService {
...
@@ -215,8 +228,8 @@ public class NGPAtoNGPLCalcServiceImpl implements NGPAtoNGPLCalcService {
earningsTable
[
3
][
1
]
=
0
;
earningsTable
[
3
][
1
]
=
0
;
earningsTable
[
3
][
2
]
=
0
;
earningsTable
[
3
][
2
]
=
0
;
earningsTable
[
3
][
3
]
=
(
earningsTable
[
3
][
8
]
!=
0
?
calculateMonthlyPerformanceBonus
(
earningsTable
[
3
][
8
])
:
0
);
earningsTable
[
3
][
3
]
=
(
earningsTable
[
3
][
8
]
!=
0
?
calculateMonthlyPerformanceBonus
(
earningsTable
[
3
][
8
]
,
false
)
:
0
);
earningsTable
[
3
][
4
]
=
Math
.
round
(
ngpaToLeaderCareerPathTable
[
2
][
1
]
*
MonthlyDevelopmentBonus_Year1_NGPL
[
3
]
*
12
);
earningsTable
[
3
][
4
]
=
Math
.
round
(
MonthlyDevelopmentBonus_Year1_NGPL
[
3
]
*
12
);
earningsTable
[
3
][
5
]
=
earningsTable
[
3
][
3
]
+
earningsTable
[
3
][
4
];
earningsTable
[
3
][
5
]
=
earningsTable
[
3
][
3
]
+
earningsTable
[
3
][
4
];
earningsTable
[
3
][
6
]
=
Math
.
round
(
earningsTable
[
3
][
5
]
/
12
);
earningsTable
[
3
][
6
]
=
Math
.
round
(
earningsTable
[
3
][
5
]
/
12
);
...
@@ -284,5 +297,5 @@ public class NGPAtoNGPLCalcServiceImpl implements NGPAtoNGPLCalcService {
...
@@ -284,5 +297,5 @@ public class NGPAtoNGPLCalcServiceImpl implements NGPAtoNGPLCalcService {
return
Response_JSON
;
return
Response_JSON
;
}
}
}
}
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