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
ae788edd
Commit
ae788edd
authored
Apr 28, 2020
by
neel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enabled audit logs in all services
parent
0fbafda4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
13 deletions
+39
-13
src/main/java/com/iRecruit/modules/auth/controller/LeaderCalc.java
+2
-1
src/main/java/com/iRecruit/modules/auth/controller/NGPACalc.java
+1
-1
src/main/java/com/iRecruit/modules/auth/controller/NGPAtoNGPLCalc.java
+1
-1
src/main/java/com/iRecruit/modules/auth/service/impl/LeaderCalcServiceImpl.java
+35
-10
No files found.
src/main/java/com/iRecruit/modules/auth/controller/LeaderCalc.java
View file @
ae788edd
...
@@ -51,8 +51,9 @@ public class LeaderCalc {
...
@@ -51,8 +51,9 @@ public class LeaderCalc {
LeaderCalcConfig
LeaderCalcConfig
;
LeaderCalcConfig
LeaderCalcConfig
;
@PostMapping
(
value
=
"/leaderCalculation"
,
headers
=
"Accept=application/json"
)
@PostMapping
(
value
=
"/leaderCalculation"
,
headers
=
"Accept=application/json"
)
@ApiOperation
(
"Create leadercalc"
)
@ApiOperation
(
"Create leadercalc"
)
// @AuditLogs(isRequest = true, isResponse = true,service="Create
leadercalc")
@AuditLogs
(
isRequest
=
true
,
isResponse
=
true
,
service
=
"
leadercalc"
)
//Neel – 20-Apr-2020 – Tata - Leader calculation – Added method for calculation of leader sheet
public
ResponseEntity
<?>
Calculate
(
@RequestBody
Map
<
String
,
Object
>
lookupRequestObject
)
throws
JsonProcessingException
{
public
ResponseEntity
<?>
Calculate
(
@RequestBody
Map
<
String
,
Object
>
lookupRequestObject
)
throws
JsonProcessingException
{
System
.
out
.
println
(
"in fyc contrroler"
);
System
.
out
.
println
(
"in fyc contrroler"
);
System
.
out
.
println
(
"in fycmapping"
);
System
.
out
.
println
(
"in fycmapping"
);
...
...
src/main/java/com/iRecruit/modules/auth/controller/NGPACalc.java
View file @
ae788edd
...
@@ -53,7 +53,7 @@ public class NGPACalc {
...
@@ -53,7 +53,7 @@ public class NGPACalc {
LeaderCalcConfig
LeaderCalcConfig
;
LeaderCalcConfig
LeaderCalcConfig
;
@PostMapping
(
value
=
"/ngpaCalculation"
,
headers
=
"Accept=application/json"
)
@PostMapping
(
value
=
"/ngpaCalculation"
,
headers
=
"Accept=application/json"
)
@ApiOperation
(
"Create ngpacalc"
)
@ApiOperation
(
"Create ngpacalc"
)
// @AuditLogs(isRequest = true, isResponse = true,service="Create leadercalc
")
@AuditLogs
(
isRequest
=
true
,
isResponse
=
true
,
service
=
"Ngpa service
"
)
@JsonSerialize
@JsonSerialize
public
ResponseEntity
<?>
CalculateNGPA
(
@RequestBody
Map
<
String
,
Object
>
lookupRequestObject
)
throws
JsonProcessingException
{
public
ResponseEntity
<?>
CalculateNGPA
(
@RequestBody
Map
<
String
,
Object
>
lookupRequestObject
)
throws
JsonProcessingException
{
System
.
out
.
println
(
"in ngpa contrroler"
);
System
.
out
.
println
(
"in ngpa contrroler"
);
...
...
src/main/java/com/iRecruit/modules/auth/controller/NGPAtoNGPLCalc.java
View file @
ae788edd
...
@@ -52,7 +52,7 @@ public class NGPAtoNGPLCalc {
...
@@ -52,7 +52,7 @@ public class NGPAtoNGPLCalc {
LeaderCalcConfig
LeaderCalcConfig
;
LeaderCalcConfig
LeaderCalcConfig
;
@PostMapping
(
value
=
"/ngpatongplCalculation"
,
headers
=
"Accept=application/json"
)
@PostMapping
(
value
=
"/ngpatongplCalculation"
,
headers
=
"Accept=application/json"
)
@ApiOperation
(
"Create ngplcalc"
)
@ApiOperation
(
"Create ngplcalc"
)
// @AuditLogs(isRequest = true, isResponse = true,service="Create leader
calc")
@AuditLogs
(
isRequest
=
true
,
isResponse
=
true
,
service
=
"ngpatongpl
calc"
)
@JsonSerialize
@JsonSerialize
public
ResponseEntity
<?>
CalculateNGPL
(
@RequestBody
Map
<
String
,
Object
>
lookupRequestObject
)
throws
JsonProcessingException
{
public
ResponseEntity
<?>
CalculateNGPL
(
@RequestBody
Map
<
String
,
Object
>
lookupRequestObject
)
throws
JsonProcessingException
{
System
.
out
.
println
(
"in ngpl contrroler"
);
System
.
out
.
println
(
"in ngpl contrroler"
);
...
...
src/main/java/com/iRecruit/modules/auth/service/impl/LeaderCalcServiceImpl.java
View file @
ae788edd
...
@@ -35,6 +35,11 @@ public class LeaderCalcServiceImpl implements LeaderCalcService {
...
@@ -35,6 +35,11 @@ public class LeaderCalcServiceImpl implements LeaderCalcService {
double
ELIGIBLE_PREMIUM
=
Calc_JSON
.
getDouble
(
"ELIGIBLE_PREMIUM"
);
double
ELIGIBLE_PREMIUM
=
Calc_JSON
.
getDouble
(
"ELIGIBLE_PREMIUM"
);
double
COMMISION_RATE
=
Calc_JSON
.
getDouble
(
"COMMISION_RATE"
);
double
COMMISION_RATE
=
Calc_JSON
.
getDouble
(
"COMMISION_RATE"
);
//Neel – 20-Apr-2020 – Tata - Leader calculation – NGPA inputs table start
JSONObject
NGPA_Inputs_DT
=
InputData
.
getJSONObject
(
"CALC_JSON"
).
getJSONObject
(
"DT"
)
JSONObject
NGPA_Inputs_DT
=
InputData
.
getJSONObject
(
"CALC_JSON"
).
getJSONObject
(
"DT"
)
.
getJSONObject
(
"NGPA_INPUTS"
);
.
getJSONObject
(
"NGPA_INPUTS"
);
JSONObject
NGPA_Inputs_L1
=
InputData
.
getJSONObject
(
"CALC_JSON"
).
getJSONObject
(
"L1"
)
JSONObject
NGPA_Inputs_L1
=
InputData
.
getJSONObject
(
"CALC_JSON"
).
getJSONObject
(
"L1"
)
...
@@ -73,9 +78,9 @@ public class LeaderCalcServiceImpl implements LeaderCalcService {
...
@@ -73,9 +78,9 @@ public class LeaderCalcServiceImpl implements LeaderCalcService {
double
Total_NGPA_WNBP_L1
=
NGPA_Inputs_L1
.
getDouble
(
"TOTAL_NGPA_WNBP_L1"
);
double
Total_NGPA_WNBP_L1
=
NGPA_Inputs_L1
.
getDouble
(
"TOTAL_NGPA_WNBP_L1"
);
double
Total_NGPA_WNBP_L2
=
NGPA_Inputs_L2
.
getDouble
(
"TOTAL_NGPA_WNBP_L2"
);
double
Total_NGPA_WNBP_L2
=
NGPA_Inputs_L2
.
getDouble
(
"TOTAL_NGPA_WNBP_L2"
);
NGPA_Inputs_DT
.
put
(
"TOTAL_NGPA_EP_
1.25_DT"
,
Multiplication
(
Total_NGPA_WNBP_Dt
,
ELIGIBLE_PREMIUM
,
1
));
NGPA_Inputs_DT
.
put
(
"TOTAL_NGPA_EP_
DT"
,
Multiplication
(
Total_NGPA_WNBP_Dt
,
ELIGIBLE_PREMIUM
,
1
));
NGPA_Inputs_L1
.
put
(
"TOTAL_NGPA_EP_
1.25_L1"
,
Multiplication
(
Total_NGPA_WNBP_L1
,
ELIGIBLE_PREMIUM
,
1
));
NGPA_Inputs_L1
.
put
(
"TOTAL_NGPA_EP_
L1"
,
Multiplication
(
Total_NGPA_WNBP_L1
,
ELIGIBLE_PREMIUM
,
1
));
NGPA_Inputs_L2
.
put
(
"TOTAL_NGPA_EP_
1.25_L2"
,
Multiplication
(
Total_NGPA_WNBP_L2
,
ELIGIBLE_PREMIUM
,
1
));
NGPA_Inputs_L2
.
put
(
"TOTAL_NGPA_EP_
L2"
,
Multiplication
(
Total_NGPA_WNBP_L2
,
ELIGIBLE_PREMIUM
,
1
));
JSONObject
Total
=
new
JSONObject
();
JSONObject
Total
=
new
JSONObject
();
Calc_JSON
.
put
(
"TOTAL"
,
Total
);
Calc_JSON
.
put
(
"TOTAL"
,
Total
);
...
@@ -92,14 +97,14 @@ public class LeaderCalcServiceImpl implements LeaderCalcService {
...
@@ -92,14 +97,14 @@ public class LeaderCalcServiceImpl implements LeaderCalcService {
JSONObject
NGPA_Inputs_TOTAL
=
TOTAL
.
getJSONObject
(
"NGPA_INPUTS"
);
JSONObject
NGPA_Inputs_TOTAL
=
TOTAL
.
getJSONObject
(
"NGPA_INPUTS"
);
double
TOTAL_NGPA_EP_125_DT
=
NGPA_Inputs_DT
.
getDouble
(
"TOTAL_NGPA_EP_
1.25_DT"
);
double
TOTAL_NGPA_EP_125_DT
=
NGPA_Inputs_DT
.
getDouble
(
"TOTAL_NGPA_EP_
DT"
);
double
TOTAL_NGPA_EP_125_L1
=
NGPA_Inputs_L1
.
getDouble
(
"TOTAL_NGPA_EP_
1.25_L1"
);
double
TOTAL_NGPA_EP_125_L1
=
NGPA_Inputs_L1
.
getDouble
(
"TOTAL_NGPA_EP_
L1"
);
double
TOTAL_NGPA_EP_125_L2
=
NGPA_Inputs_L2
.
getDouble
(
"TOTAL_NGPA_EP_
1.25_L2"
);
double
TOTAL_NGPA_EP_125_L2
=
NGPA_Inputs_L2
.
getDouble
(
"TOTAL_NGPA_EP_
L2"
);
NGPA_Inputs_TOTAL
.
put
(
"TOTAL_NGPA"
,
Addition
(
NGPA_Dt
,
NGPA_L1
,
NGPA_L2
));
NGPA_Inputs_TOTAL
.
put
(
"TOTAL_NGPA"
,
Addition
(
NGPA_Dt
,
NGPA_L1
,
NGPA_L2
));
NGPA_Inputs_TOTAL
.
put
(
"TOTAL_NGPA_WNBP_TOTAL"
,
NGPA_Inputs_TOTAL
.
put
(
"TOTAL_NGPA_WNBP_TOTAL"
,
Addition
(
Total_NGPA_WNBP_Dt
,
Total_NGPA_WNBP_L1
,
Total_NGPA_WNBP_L2
));
Addition
(
Total_NGPA_WNBP_Dt
,
Total_NGPA_WNBP_L1
,
Total_NGPA_WNBP_L2
));
NGPA_Inputs_TOTAL
.
put
(
"TOTAL_NGPA_EP_
1.25_TOTAL"
,
NGPA_Inputs_TOTAL
.
put
(
"TOTAL_NGPA_EP_
TOTAL"
,
Addition
(
TOTAL_NGPA_EP_125_DT
,
TOTAL_NGPA_EP_125_L1
,
TOTAL_NGPA_EP_125_L2
));
Addition
(
TOTAL_NGPA_EP_125_DT
,
TOTAL_NGPA_EP_125_L1
,
TOTAL_NGPA_EP_125_L2
));
NGPA_Inputs_TOTAL
.
put
(
"TOTAL_CASE_SIZE_PER_NOP"
,
Average
(
Double
.
valueOf
(
CASE_SIZE_PER_NOP_Dt
),
NGPA_Inputs_TOTAL
.
put
(
"TOTAL_CASE_SIZE_PER_NOP"
,
Average
(
Double
.
valueOf
(
CASE_SIZE_PER_NOP_Dt
),
...
@@ -110,7 +115,12 @@ public class LeaderCalcServiceImpl implements LeaderCalcService {
...
@@ -110,7 +115,12 @@ public class LeaderCalcServiceImpl implements LeaderCalcService {
NGPA_Inputs_TOTAL
.
put
(
"TOTAL_NOP_NGPA"
,
NGPA_Inputs_TOTAL
.
put
(
"TOTAL_NOP_NGPA"
,
Double
.
valueOf
(
TOTAL_NGPA_WNBP_TOTAL
)
/
Double
.
valueOf
(
TOTAL_CASE_SIZE_PER_NOP
));
Double
.
valueOf
(
TOTAL_NGPA_WNBP_TOTAL
)
/
Double
.
valueOf
(
TOTAL_CASE_SIZE_PER_NOP
));
// BAU table
//Neel – 20-Apr-2020 – Tata - Leader calculation – NGPA inputs table end
//Neel – 20-Apr-2020 – Tata - Leader calculation – BAU inputs table start
double
Active_Agent_BAU_Dt
=
BAU_Inputs_DT
.
getDouble
(
"ACTIVE_AGENT_BAU_DT"
);
double
Active_Agent_BAU_Dt
=
BAU_Inputs_DT
.
getDouble
(
"ACTIVE_AGENT_BAU_DT"
);
double
NOP_NGPA_BAU_Dt
=
BAU_Inputs_DT
.
getDouble
(
"NOP_AGENT_BAU_DT"
);
double
NOP_NGPA_BAU_Dt
=
BAU_Inputs_DT
.
getDouble
(
"NOP_AGENT_BAU_DT"
);
...
@@ -149,7 +159,11 @@ public class LeaderCalcServiceImpl implements LeaderCalcService {
...
@@ -149,7 +159,11 @@ public class LeaderCalcServiceImpl implements LeaderCalcService {
BAU_Inputs_TOTAL
.
put
(
"TOTAL_NOP_AGENT_BAU"
,
BAU_Inputs_TOTAL
.
put
(
"TOTAL_NOP_AGENT_BAU"
,
Double
.
valueOf
(
TOTAL_BAU_WNBP_TOATL
)
/
Double
.
valueOf
(
TOTAL_CASE_SIZE_PER_NOP_BAU
));
Double
.
valueOf
(
TOTAL_BAU_WNBP_TOATL
)
/
Double
.
valueOf
(
TOTAL_CASE_SIZE_PER_NOP_BAU
));
// BAU2 table
//Neel – 20-Apr-2020 – Tata - Leader calculation – BAU inputs table end
//Neel – 20-Apr-2020 – Tata - Leader calculation – BAU2 inputs table start
double
ACTIVE_AGENT_LP_DT
=
BAU_Inputs2_DT
.
getDouble
(
"ACTIVE_AGENT_LP_DT"
);
double
ACTIVE_AGENT_LP_DT
=
BAU_Inputs2_DT
.
getDouble
(
"ACTIVE_AGENT_LP_DT"
);
double
WNBP_LP_DT
=
BAU_Inputs2_DT
.
getDouble
(
"WNBP_LP_DT"
);
double
WNBP_LP_DT
=
BAU_Inputs2_DT
.
getDouble
(
"WNBP_LP_DT"
);
...
@@ -174,7 +188,14 @@ public class LeaderCalcServiceImpl implements LeaderCalcService {
...
@@ -174,7 +188,14 @@ public class LeaderCalcServiceImpl implements LeaderCalcService {
Addition
(
ACTIVE_AGENT_LP_DT
,
ACTIVE_AGENT_LP_L1
,
ACTIVE_AGENT_LP_L2
));
Addition
(
ACTIVE_AGENT_LP_DT
,
ACTIVE_AGENT_LP_L1
,
ACTIVE_AGENT_LP_L2
));
BAU_Inputs_2_TOTAL
.
put
(
"TOTAL_PA"
,
Addition
(
PA_DT
,
PA_L1
,
PA_L2
));
BAU_Inputs_2_TOTAL
.
put
(
"TOTAL_PA"
,
Addition
(
PA_DT
,
PA_L1
,
PA_L2
));
// Earning table
//Neel – 20-Apr-2020 – Tata - Leader calculation – BAU2 inputs table ends
//Neel – 20-Apr-2020 – Tata - Leader calculation – earning table starts
JSONObject
DT
=
InputData
.
getJSONObject
(
"CALC_JSON"
).
getJSONObject
(
"DT"
);
JSONObject
DT
=
InputData
.
getJSONObject
(
"CALC_JSON"
).
getJSONObject
(
"DT"
);
JSONObject
L1
=
InputData
.
getJSONObject
(
"CALC_JSON"
).
getJSONObject
(
"L1"
);
JSONObject
L1
=
InputData
.
getJSONObject
(
"CALC_JSON"
).
getJSONObject
(
"L1"
);
...
@@ -514,6 +535,10 @@ public class LeaderCalcServiceImpl implements LeaderCalcService {
...
@@ -514,6 +535,10 @@ public class LeaderCalcServiceImpl implements LeaderCalcService {
EARNING_TOTAL
.
put
(
"TOTAL_ANNUALISED_EARNING"
,
(
TOTAL_EARNING_TOTAL
*
12
));
EARNING_TOTAL
.
put
(
"TOTAL_ANNUALISED_EARNING"
,
(
TOTAL_EARNING_TOTAL
*
12
));
//Neel – 20-Apr-2020 – Tata - Leader calculation – earning table ends
System
.
out
.
println
(
Calc_JSON
);
System
.
out
.
println
(
Calc_JSON
);
return
Calc_JSON
;
return
Calc_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