Commit 0d7c4c38 by Yashvant Kantival

changes suggested by nirav bhai, bug fixes

parent 167a448f
......@@ -92,7 +92,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
"/**/*.css",
"/**/*.js")
.permitAll()
.antMatchers("/api/v1/configurations/**","/api/v1/auth/signin/**","/api/v1/msamapping/**","/api/v1/mdbmapping/**","/api/v1/l1salbsmapping/**","/api/v1/ngpatongplCalculation/**","/api/v1/ngpaCalculation/**","/api/v1/l2salbsmapping/**","/api/v1/mpbmapping/**","/api/v1/leaderCalculation/**","/api/v1/fycmapping/**","/api/v1/auth/P100Login","/api/v1/auth/SendOTP","/v2/api-docs","/api/v1/auth/ValidateOTP", "/configuration/ui", "/swagger-resources/**", "/configuration/security", "/swagger-ui.html", "/webjars/**")
.antMatchers("/api/v1/configurations/**","/api/v1/auth/signin/**","/api/v1/msamapping/**","/api/v1/mdbmapping/**","/api/v1/l1salbsmapping/**","/api/v1/l2salbsmapping/**","/api/v1/mpbmapping/**","/v2/api-docs","/configuration/ui", "/swagger-resources/**", "/configuration/security", "/swagger-ui.html", "/webjars/**")
.permitAll()
.antMatchers("/api/userPhoto", "/api/user/checkEmailAvailability")
.permitAll()
......
......@@ -79,7 +79,7 @@ public class AuthController {
String jwt;
try {
UsernamePasswordAuthenticationToken authenticationObj = new UsernamePasswordAuthenticationToken(loginRequest.getUsername(), loginRequest.getPassword());
UsernamePasswordAuthenticationToken authenticationObj = new UsernamePasswordAuthenticationToken(loginRequest.getUsername(), loginRequest.getUserId());
authenticationObj.setDetails(loginRequest);
Authentication authentication = authenticationManager.authenticate(authenticationObj);
SecurityContextHolder.getContext().setAuthentication(authentication);
......
......@@ -15,7 +15,7 @@ public class LoginRequest {
private String username;
@NotBlank
private String password;
private String userId;
private String notificationId;
......
......@@ -126,7 +126,7 @@ public class NGPACalcSerivceImpl implements NGPACalcService {
Response_JSON.put("Annual_Year_1_Validations_Met",requestJSON.getString("Annual_Year_1_Validations_Met"));
Response_JSON.put("Annual_Year_2_Validations_Met",requestJSON.getString("Annual_Year_2_Validations_Met"));
Response_JSON.put("Commission_Rate",requestJSON.getString("Commission_Rate"));
Response_JSON.put("Commission_Rate",requestJSON.getDouble("Commission_Rate"));
for( i=0;i<4;i++ ) {
basicJSONOperation1 = new JSONObject();
basicJSONOperation1.put("Validations_Met", ( ( mainTable[i][0] == 1 ) ? "Yes" : "No" ));
......
......@@ -161,7 +161,7 @@ public class NGPAtoNGPLCalcServiceImpl implements NGPAtoNGPLCalcService {
basicJSONOperation = MSA_Value.getJSONObject(0);
basicStringOperation = requestJSON.getString("FS_Type");
basicDoubleOperation = basicJSONOperation.getDouble(basicStringOperation);
earningsTable[0][0] = Math.round( ( metricsTable[0][6] * fycPersantage ) / 100 );
earningsTable[0][0] = Math.round( ( metricsTable[0][6] * requestJSON.getDouble("Commission_Rate") ) / 100 );
basicJSONOperation1 = new JSONObject();
basicJSONOperation1 = calculateFYCCreditAndWFYC("BA",earningsTable[0][0]);
......@@ -232,6 +232,7 @@ public class NGPAtoNGPLCalcServiceImpl implements NGPAtoNGPLCalcService {
Response_JSON.put("FS_Type", requestJSON.getString("FS_Type"));
Response_JSON.put("Total_Validations_Met", requestJSON.getString("Total_Validations_Met"));
Response_JSON.put("Eligible_Premium", requestJSON.getDouble("Eligible_Premium"));
Response_JSON.put("Commission_Rate", requestJSON.getDouble("Commission_Rate"));
basicJSONOperation1 = new JSONObject();
for(i=0;i<3;i++) {
......
......@@ -46,7 +46,7 @@ public class AuthProvider implements AuthenticationProvider {
LoginRequest loginRequest = new LoginRequest();
loginRequest.setUsername(username);
loginRequest.setPassword(password);
loginRequest.setUserId(password);
LOG.info("login request for user "+username);
// LDAP Service Call
......
......@@ -2,7 +2,7 @@ spring.datasource.url = jdbc:mysql://localhost:3306/imcalculator?useSSL=false&se
irecruit.datasource.url = jdbc:oracle:thin:@192.168.10.120:1521:orcl
irecruit.datasource.jndi-name=jdbc/irecruit
irecruit.jpa.hibernate.ddl-auto=update
irecruit.jpa.hibernate.ddl-auto=none
irecruit.datasource.username = root
irecruit.datasource.password = P@ssw0rd
irecruit.datasource.initialization-mode=always
......@@ -18,7 +18,7 @@ irecruit.jpa.hibernate.physical_naming_strategy=com.iRecruit.config.CustomPhysic
#naaf.datasource.driver-class-name=oracle.jdbc.driver.OracleDriver
naaf.datasource.url = jdbc:oracle:thin:@192.168.10.120:1521:orcl
naaf.jpa.hibernate.ddl-auto=update
naaf.jpa.hibernate.ddl-auto=none
naaf.datasource.username = SOUAT
naaf.datasource.password = tata
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment