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
3644e09b
Commit
3644e09b
authored
May 16, 2020
by
Yashvant Kantival
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Commenting System.out.print, IncomeCalc Files ONLY
parent
ee32d33a
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
61 additions
and
61 deletions
+61
-61
src/main/java/com/ic/constant/LeaderCalcConfig.java
+6
-6
src/main/java/com/ic/modules/auth/controller/FycMappingController.java
+4
-4
src/main/java/com/ic/modules/auth/controller/L1slabsMappingController.java
+4
-4
src/main/java/com/ic/modules/auth/controller/L2slabsMappingController.java
+4
-4
src/main/java/com/ic/modules/auth/controller/LeaderCalc.java
+7
-7
src/main/java/com/ic/modules/auth/controller/MDBMappingController.java
+4
-4
src/main/java/com/ic/modules/auth/controller/MpbMappingController.java
+4
-4
src/main/java/com/ic/modules/auth/controller/MsaMappingController.java
+4
-4
src/main/java/com/ic/modules/auth/controller/NGPACalc.java
+5
-5
src/main/java/com/ic/modules/auth/controller/NGPAtoNGPLCalc.java
+5
-5
src/main/java/com/ic/modules/auth/service/impl/LeaderCalcServiceImpl.java
+14
-14
No files found.
src/main/java/com/ic/constant/LeaderCalcConfig.java
View file @
3644e09b
...
...
@@ -122,8 +122,8 @@ public class LeaderCalcConfig {
}
System
.
out
.
println
(
"jarrayMsa"
);
System
.
out
.
println
(
jarrayMsa
);
//
System.out.println("jarrayMsa");
//
System.out.println(jarrayMsa);
LeaderMpbMappingJSon
.
put
(
"LeaderMpbMapping"
,
jarray
);
LeaderFycMapping
.
put
(
"LeaderFycMapping"
,
jarrayfyc
);
...
...
@@ -147,10 +147,10 @@ public class LeaderCalcConfig {
jarrayl2slabsconfig
=
LeaderL2SlabsMapping
.
getJSONArray
(
"LeaderL2SlabsMapping"
);
jarrayMDBconfig
=
LeaderMdbMapping
.
getJSONArray
(
"MPBMapping"
);
System
.
out
.
println
(
jarraympbconfig
);
System
.
out
.
println
(
jarrayfycconfig
);
System
.
out
.
println
(
jarrayl1slabsconfig
);
System
.
out
.
println
(
jarrayMDBconfig
);
//
System.out.println(jarraympbconfig);
//
System.out.println(jarrayfycconfig);
//
System.out.println(jarrayl1slabsconfig);
//
System.out.println(jarrayMDBconfig);
}
public
JSONArray
getValue
(
String
key
)
{
...
...
src/main/java/com/ic/modules/auth/controller/FycMappingController.java
View file @
3644e09b
...
...
@@ -56,8 +56,8 @@ public class FycMappingController {
@ApiOperation
(
"Create fycmapping"
)
@AuditLogs
(
isRequest
=
true
,
isResponse
=
true
,
service
=
"Create fycmapping"
)
public
ResponseEntity
<?>
createFycmapping
(
@RequestBody
fycDto
fycMapping
)
{
System
.
out
.
println
(
"in fyc contrroler"
);
System
.
out
.
println
(
"in fycmapping"
);
//
System.out.println("in fyc contrroler");
//
System.out.println("in fycmapping");
FycMapping
fyc
=
null
;
try
{
fyc
=
fycMappingService
.
save
(
fycMapping
,
true
);
...
...
@@ -77,8 +77,8 @@ public class FycMappingController {
@ApiOperation
(
"update fycmapping"
)
@AuditLogs
(
isRequest
=
true
,
isResponse
=
true
,
service
=
"Create fycmapping"
)
public
ResponseEntity
<?>
updateFycmapping
(
@RequestBody
fycDto
fycMapping
)
{
//Neel – 20-Apr-2020 – Tata - Fyc mapping – Added function for Store data of fyc from table
System
.
out
.
println
(
"in fyc contrroler"
);
System
.
out
.
println
(
"in fycmapping"
);
//
System.out.println("in fyc contrroler");
//
System.out.println("in fycmapping");
FycMapping
fycupdate
=
null
;
try
{
fycupdate
=
fycMappingService
.
save
(
fycMapping
,
false
);
...
...
src/main/java/com/ic/modules/auth/controller/L1slabsMappingController.java
View file @
3644e09b
...
...
@@ -54,8 +54,8 @@ public class L1slabsMappingController {
@AuditLogs
(
isRequest
=
true
,
isResponse
=
true
,
service
=
"Create l1salbsmapping"
)
//Neel – 20-Apr-2020 – Tata - l1 slabs mapping – Added function for store all data of l1 slabs table
public
ResponseEntity
<?>
createL1slabsmapping
(
@RequestBody
L1slabsDto
l1slabsmapping
)
{
System
.
out
.
println
(
"in l1salbsmapping contrroler"
);
System
.
out
.
println
(
"in l1salbsmapping"
);
//
System.out.println("in l1salbsmapping contrroler");
//
System.out.println("in l1salbsmapping");
L1slabsMapping
l1
=
null
;
try
{
l1
=
l1slabsMappingService
.
save
(
l1slabsmapping
,
true
);
...
...
@@ -76,8 +76,8 @@ public class L1slabsMappingController {
@ApiOperation
(
"update l1salbsmapping"
)
@AuditLogs
(
isRequest
=
true
,
isResponse
=
true
,
service
=
"Create l1salbsmapping"
)
public
ResponseEntity
<?>
updateL1slabsmapping
(
@RequestBody
L1slabsDto
l1slabsmapping
)
{
System
.
out
.
println
(
"in l1salbsmapping contrroler"
);
System
.
out
.
println
(
"in l1salbsmapping"
);
//
System.out.println("in l1salbsmapping contrroler");
//
System.out.println("in l1salbsmapping");
L1slabsMapping
l1
=
null
;
try
{
l1
=
l1slabsMappingService
.
save
(
l1slabsmapping
,
false
);
...
...
src/main/java/com/ic/modules/auth/controller/L2slabsMappingController.java
View file @
3644e09b
...
...
@@ -57,8 +57,8 @@ public class L2slabsMappingController {
//Neel – 20-Apr-2020 – Tata - l2 slabs mapping – Added function for store all data of l1 slabs table
public
ResponseEntity
<?>
createL1slabsmapping
(
@RequestBody
L2slabsDto
l2slabsmapping
)
{
System
.
out
.
println
(
"in l2salbsmapping contrroler"
);
System
.
out
.
println
(
"in l2salbsmapping"
);
//
System.out.println("in l2salbsmapping contrroler");
//
System.out.println("in l2salbsmapping");
L2slabsMapping
l2
=
null
;
try
{
l2
=
l2slabsMappingService
.
save
(
l2slabsmapping
,
true
);
...
...
@@ -78,8 +78,8 @@ public class L2slabsMappingController {
@ApiOperation
(
"update l2salbsmapping"
)
@AuditLogs
(
isRequest
=
true
,
isResponse
=
true
,
service
=
"Create l2salbsmapping"
)
public
ResponseEntity
<?>
updateL1slabsmapping
(
@RequestBody
L2slabsDto
l2slabsmapping
)
{
System
.
out
.
println
(
"in l2salbsmapping contrroler"
);
System
.
out
.
println
(
"in l2salbsmapping"
);
//
System.out.println("in l2salbsmapping contrroler");
//
System.out.println("in l2salbsmapping");
L2slabsMapping
l2
=
null
;
try
{
l2
=
l2slabsMappingService
.
save
(
l2slabsmapping
,
false
);
...
...
src/main/java/com/ic/modules/auth/controller/LeaderCalc.java
View file @
3644e09b
...
...
@@ -56,8 +56,8 @@ public class 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
{
System
.
out
.
println
(
"in fyc contrroler"
);
System
.
out
.
println
(
"in fycmapping"
);
//
System.out.println("in fyc contrroler");
//
System.out.println("in fycmapping");
ObjectMapper
mapper
=
new
ObjectMapper
();
String
data
=
mapper
.
writeValueAsString
(
lookupRequestObject
);
...
...
@@ -67,7 +67,7 @@ public class LeaderCalc {
try
{
System
.
out
.
println
(
"in try"
);
//
System.out.println("in try");
// Yashvant - 16 May 2020 - 0000 - Validation For JSON Keys ( < , > )
if
(
checkValidation
(
data
)
)
{
calc
=
leaderCalcService
.
calculate
(
data
);
...
...
@@ -75,8 +75,8 @@ public class LeaderCalc {
else
{
return
new
ResponseEntity
(
new
ApiResponse
(
StatusCode
.
UNEXPECTED_ERROR
,
true
,
"Request Contains Invalid Input"
,
calc
),
HttpStatus
.
BAD_REQUEST
);
}
System
.
out
.
println
(
"after operation calc"
);
System
.
out
.
println
(
calc
);
//
System.out.println("after operation calc");
//
System.out.println(calc);
...
...
@@ -84,7 +84,7 @@ public class LeaderCalc {
calc
=
new
JSONObject
();
calc
.
put
(
"Error_Code"
,
"503"
);
calc
.
put
(
"Error_Message"
,
"Technical Error caught while calculating"
);
System
.
out
.
println
(
e
);
//
System.out.println(e);
e
.
printStackTrace
();
return
new
ResponseEntity
(
new
ApiResponse
(
StatusCode
.
RESOURCE_NOT_FOUND
,
true
,
"calculation failed"
,
calc
),
HttpStatus
.
NOT_FOUND
);
}
catch
(
Exception
e
)
{
...
...
@@ -93,7 +93,7 @@ public class LeaderCalc {
calc
.
put
(
"Error_Code"
,
"503"
);
calc
.
put
(
"Error_Message"
,
"Technical Error caught while calculating"
);
e
.
printStackTrace
();
System
.
out
.
println
(
e
);
//
System.out.println(e);
return
new
ResponseEntity
(
new
ApiResponse
(
StatusCode
.
UNEXPECTED_ERROR
,
true
,
"calculation failed"
,
calc
),
HttpStatus
.
BAD_REQUEST
);
}
...
...
src/main/java/com/ic/modules/auth/controller/MDBMappingController.java
View file @
3644e09b
...
...
@@ -62,8 +62,8 @@ public class MDBMappingController {
@AuditLogs
(
isRequest
=
true
,
isResponse
=
true
,
service
=
"Create mdbmapping"
)
//Neel – 20-Apr-2020 – Tata - mdb mapping – Added function for storing all data of mdb mapping table
public
ResponseEntity
<?>
createmdbsmapping
(
@RequestBody
MDBDto
mdbmapping
)
{
System
.
out
.
println
(
"in mdb contrroler"
);
System
.
out
.
println
(
"in mdbmapping"
);
//
System.out.println("in mdb contrroler");
//
System.out.println("in mdbmapping");
MDBMapping
mdb
=
null
;
try
{
mdb
=
mdbMappingService
.
save
(
mdbmapping
,
true
);
...
...
@@ -83,8 +83,8 @@ public class MDBMappingController {
@ApiOperation
(
"update mdbmapping"
)
@AuditLogs
(
isRequest
=
true
,
isResponse
=
true
,
service
=
"Create mdbmapping"
)
public
ResponseEntity
<?>
updatemdbsmapping
(
@RequestBody
MDBDto
mdbmapping
)
{
System
.
out
.
println
(
"in mdb contrroler"
);
System
.
out
.
println
(
"in mdbmapping"
);
//
System.out.println("in mdb contrroler");
//
System.out.println("in mdbmapping");
MDBMapping
mdb
=
null
;
try
{
mdb
=
mdbMappingService
.
save
(
mdbmapping
,
false
);
...
...
src/main/java/com/ic/modules/auth/controller/MpbMappingController.java
View file @
3644e09b
...
...
@@ -55,8 +55,8 @@ public class MpbMappingController {
@AuditLogs
(
isRequest
=
true
,
isResponse
=
true
,
service
=
"Create mpbmapping"
)
//Neel – 20-Apr-2020 – Tata - mdb mapping – Added function for storing all data of mdb mapping table
public
ResponseEntity
<?>
createMpbmapping
(
@RequestBody
mpbDto
mpbMapping
)
{
System
.
out
.
println
(
"in mpb contrroler"
);
System
.
out
.
println
(
"in mpbmapping"
);
//
System.out.println("in mpb contrroler");
//
System.out.println("in mpbmapping");
MpbMapping
mpb
=
null
;
try
{
mpb
=
mpbMappingService
.
save
(
mpbMapping
,
true
);
...
...
@@ -75,8 +75,8 @@ public class MpbMappingController {
@ApiOperation
(
"update mpbmapping"
)
@AuditLogs
(
isRequest
=
true
,
isResponse
=
true
,
service
=
"update mpbmapping"
)
public
ResponseEntity
<?>
updateMpbmapping
(
@RequestBody
mpbDto
mpbMapping
)
{
System
.
out
.
println
(
"in mpb contrroler"
);
System
.
out
.
println
(
"in mpbmapping"
);
//
System.out.println("in mpb contrroler");
//
System.out.println("in mpbmapping");
MpbMapping
mpb
=
null
;
try
{
mpb
=
mpbMappingService
.
save
(
mpbMapping
,
false
);
...
...
src/main/java/com/ic/modules/auth/controller/MsaMappingController.java
View file @
3644e09b
...
...
@@ -60,8 +60,8 @@ public class MsaMappingController {
@ApiOperation
(
"Create msamapping"
)
@AuditLogs
(
isRequest
=
true
,
isResponse
=
true
,
service
=
"Create msamapping"
)
public
ResponseEntity
<?>
createMsamapping
(
@RequestBody
MsaDto
msaMapping
)
{
System
.
out
.
println
(
"in mpb contrroler"
);
System
.
out
.
println
(
"in mpbmapping"
);
//
System.out.println("in mpb contrroler");
//
System.out.println("in mpbmapping");
MsaMapping
msa
=
null
;
try
{
msa
=
msaMappingService
.
save
(
msaMapping
,
true
);
...
...
@@ -82,8 +82,8 @@ public class MsaMappingController {
@ApiOperation
(
"Create msamapping"
)
@AuditLogs
(
isRequest
=
true
,
isResponse
=
true
,
service
=
"update msamapping"
)
public
ResponseEntity
<?>
updateMsamapping
(
@RequestBody
MsaDto
msaMapping
)
{
System
.
out
.
println
(
"in mpb contrroler"
);
System
.
out
.
println
(
"in mpbmapping"
);
//
System.out.println("in mpb contrroler");
//
System.out.println("in mpbmapping");
MsaMapping
msa
=
null
;
try
{
msa
=
msaMappingService
.
save
(
msaMapping
,
false
);
...
...
src/main/java/com/ic/modules/auth/controller/NGPACalc.java
View file @
3644e09b
...
...
@@ -56,7 +56,7 @@ public class NGPACalc {
@AuditLogs
(
isRequest
=
true
,
isResponse
=
true
,
service
=
"Ngpa service"
)
@JsonSerialize
public
ResponseEntity
<?>
CalculateNGPA
(
@RequestBody
Map
<
String
,
Object
>
lookupRequestObject
)
throws
JsonProcessingException
{
System
.
out
.
println
(
"in ngpa contrroler"
);
//
System.out.println("in ngpa contrroler");
ObjectMapper
mapper
=
new
ObjectMapper
();
...
...
@@ -66,15 +66,15 @@ public class NGPACalc {
JSONObject
calc
=
null
;
try
{
System
.
out
.
println
(
"in try"
);
//
System.out.println("in try");
calc
=
nGPACalcService
.
prepareAllFormula
(
requestJSON
);
System
.
out
.
println
(
"after operation calc"
);
System
.
out
.
println
(
calc
);
//
System.out.println("after operation calc");
//
System.out.println(calc);
result
=
new
HashMap
<
String
,
Object
>();
result
.
put
(
"response"
,
calc
);
System
.
out
.
println
(
result
);
//
System.out.println(result);
}
catch
(
ResourceNotFoundException
e
)
{
e
.
printStackTrace
();
...
...
src/main/java/com/ic/modules/auth/controller/NGPAtoNGPLCalc.java
View file @
3644e09b
...
...
@@ -56,7 +56,7 @@ public class NGPAtoNGPLCalc {
@AuditLogs
(
isRequest
=
true
,
isResponse
=
true
,
service
=
"ngpatongplcalc"
)
@JsonSerialize
public
ResponseEntity
<?>
CalculateNGPL
(
@RequestBody
Map
<
String
,
Object
>
lookupRequestObject
)
throws
JsonProcessingException
{
System
.
out
.
println
(
"in ngpl contrroler"
);
//
System.out.println("in ngpl contrroler");
ObjectMapper
mapper
=
new
ObjectMapper
();
...
...
@@ -66,7 +66,7 @@ public class NGPAtoNGPLCalc {
JSONObject
calc
=
null
;
try
{
System
.
out
.
println
(
"in try"
);
//
System.out.println("in try");
// Yashvant - 16 May 2020 - 0000 - Validation For JSON Keys ( < , > )
if
(
checkValidation
(
requestJSON
)
)
{
calc
=
nGPAtoNGPLCalcService
.
prepareAllFormula
(
requestJSON
);
...
...
@@ -74,13 +74,13 @@ public class NGPAtoNGPLCalc {
else
{
return
new
ResponseEntity
(
new
ApiResponse
(
StatusCode
.
UNEXPECTED_ERROR
,
true
,
"Request Contains Invalid Input"
,
calc
),
HttpStatus
.
BAD_REQUEST
);
}
System
.
out
.
println
(
"after operation calc"
);
System
.
out
.
println
(
calc
);
//
System.out.println("after operation calc");
//
System.out.println(calc);
result
=
new
HashMap
<
String
,
Object
>();
result
.
put
(
"response"
,
calc
);
System
.
out
.
println
(
result
);
//
System.out.println(result);
}
catch
(
ResourceNotFoundException
e
)
{
e
.
printStackTrace
();
...
...
src/main/java/com/ic/modules/auth/service/impl/LeaderCalcServiceImpl.java
View file @
3644e09b
...
...
@@ -358,8 +358,8 @@ public class LeaderCalcServiceImpl implements LeaderCalcService {
// MDB mappings
JSONArray
mdb2array
=
leaderCalcConfig
.
getValue
(
"mdb"
);
System
.
out
.
println
(
"mdb2array"
);
System
.
out
.
println
(
mdb2array
);
//
System.out.println("mdb2array");
//
System.out.println(mdb2array);
...
...
@@ -372,8 +372,8 @@ public class LeaderCalcServiceImpl implements LeaderCalcService {
double
MDB
=
mdb2array
.
getJSONObject
(
i
).
getDouble
(
"MDB"
);
System
.
out
.
println
(
MDB
);
System
.
out
.
println
(
NGPA_Dt
);
//
System.out.println(MDB);
//
System.out.println(NGPA_Dt);
// double maxval = fycarrqay.getJSONObject(i).getDouble("maxval");
// double per = fycarrqay.getJSONObject(i).getDouble("per");
...
...
@@ -389,11 +389,11 @@ public class LeaderCalcServiceImpl implements LeaderCalcService {
}
System
.
out
.
println
(
"val180000"
);
System
.
out
.
println
(
monthly_ep_18
);
System
.
out
.
println
(
monthly_ep_36
);
System
.
out
.
println
(
monthly_ep_72
);
System
.
out
.
println
(
monthly_ep_144
);
//
System.out.println("val180000");
//
System.out.println(monthly_ep_18);
//
System.out.println(monthly_ep_36);
//
System.out.println(monthly_ep_72);
//
System.out.println(monthly_ep_144);
if
(
NGPA_Dt
>
5
)
{
...
...
@@ -414,8 +414,8 @@ public class LeaderCalcServiceImpl implements LeaderCalcService {
EARNING_DT
.
put
(
"MONTHLY_DEVELOPMENT_BONUS_DT"
,
monthly_ep_144
);
}
}
// System.out.println("neel");
System
.
out
.
println
(
EARNING_DT
.
getDouble
(
"MONTHLY_DEVELOPMENT_BONUS_DT"
));
//
//
System.out.println("neel");
//
System.out.println(EARNING_DT.getDouble("MONTHLY_DEVELOPMENT_BONUS_DT"));
double
MONTHLY_DEVELOPMENT_BONUS_DT
=
EARNING_DT
.
getDouble
(
"MONTHLY_DEVELOPMENT_BONUS_DT"
);
EARNING_L1
.
put
(
"MONTHLY_DEVELOPMENT_BONUS_L1"
,
0
);
...
...
@@ -451,8 +451,8 @@ public class LeaderCalcServiceImpl implements LeaderCalcService {
EARNING_L1
.
put
(
"ACTIVATION_L1"
,
(
Active_Agent_BAU_L1
*
multiplier
)
+
(
ACTIVE_AGENT_LP_L1
*
500
));
JSONArray
L2Slabsarray
=
leaderCalcConfig
.
getValue
(
"l2slabs"
);
System
.
out
.
println
(
"L2Slabsarray"
);
System
.
out
.
println
(
L2Slabsarray
);
//
System.out.println("L2Slabsarray");
//
System.out.println(L2Slabsarray);
double
multiplierL2
=
0
;
if
(
leader_designation
.
equalsIgnoreCase
(
"PBA"
)
||
leader_designation
.
equalsIgnoreCase
(
"BA"
))
{
...
...
@@ -532,7 +532,7 @@ public class LeaderCalcServiceImpl implements LeaderCalcService {
// Neel – 20-Apr-2020 – Tata - Leader calculation – earning table ends
System
.
out
.
println
(
Calc_JSON
);
//
System.out.println(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