This commit is contained in:
string 2025-04-08 20:25:55 +05:30
parent b898694b14
commit 30646069d2
93 changed files with 506 additions and 842 deletions

View File

@ -128,7 +128,7 @@
<factorypathentry kind="VARJAR" id="M2_REPO/net/minidev/accessors-smart/1.2/accessors-smart-1.2.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/net/minidev/accessors-smart/1.2/accessors-smart-1.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/ow2/asm/asm/5.0.4/asm-5.0.4.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/ow2/asm/asm/5.0.4/asm-5.0.4.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/nimbusds/lang-tag/1.7/lang-tag-1.7.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/com/nimbusds/lang-tag/1.7/lang-tag-1.7.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/com/nimbusds/nimbus-jose-jwt/10.0.2/nimbus-jose-jwt-10.0.2.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/com/nimbusds/nimbus-jose-jwt/10.2/nimbus-jose-jwt-10.2.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/security/spring-security-core/5.2.2.RELEASE/spring-security-core-5.2.2.RELEASE.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/security/spring-security-core/5.2.2.RELEASE/spring-security-core-5.2.2.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/security/spring-security-oauth2-core/5.2.2.RELEASE/spring-security-oauth2-core-5.2.2.RELEASE.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/security/spring-security-oauth2-core/5.2.2.RELEASE/spring-security-oauth2-core-5.2.2.RELEASE.jar" enabled="true" runInBatchMode="false"/>
<factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/social/spring-social-google/1.0.0.RELEASE/spring-social-google-1.0.0.RELEASE.jar" enabled="true" runInBatchMode="false"/> <factorypathentry kind="VARJAR" id="M2_REPO/org/springframework/social/spring-social-google/1.0.0.RELEASE/spring-social-google-1.0.0.RELEASE.jar" enabled="true" runInBatchMode="false"/>

View File

@ -199,3 +199,5 @@
2025-03-25T17:59:34.405+0530 ERROR Invalid AES key length: 14 bytes 2025-03-25T17:59:34.405+0530 ERROR Invalid AES key length: 14 bytes
2025-03-27T11:14:35.732+0530 ERROR I/O error on GET request for "http://43.205.154.152:30179/entityBuilder/Gaurav_testing": Operation timed out (Connection timed out); nested exception is java.net.ConnectException: Operation timed out (Connection timed out) 2025-03-27T11:14:35.732+0530 ERROR I/O error on GET request for "http://43.205.154.152:30179/entityBuilder/Gaurav_testing": Operation timed out (Connection timed out); nested exception is java.net.ConnectException: Operation timed out (Connection timed out)
2025-03-27T11:14:35.733+0530 ERROR I/O error on GET request for "http://43.205.154.152:30179/entityBuilder/Gaurav_testing/3": Operation timed out (Connection timed out); nested exception is java.net.ConnectException: Operation timed out (Connection timed out) 2025-03-27T11:14:35.733+0530 ERROR I/O error on GET request for "http://43.205.154.152:30179/entityBuilder/Gaurav_testing/3": Operation timed out (Connection timed out); nested exception is java.net.ConnectException: Operation timed out (Connection timed out)
2025-04-08T20:09:05.602+0530 ERROR I/O error on GET request for "http://43.205.154.152:30179/entityBuilder/Gaurav_testing/3": Operation timed out (Connection timed out); nested exception is java.net.ConnectException: Operation timed out (Connection timed out)
2025-04-08T20:09:05.602+0530 ERROR I/O error on GET request for "http://43.205.154.152:30179/entityBuilder/Gaurav_testing": Operation timed out (Connection timed out); nested exception is java.net.ConnectException: Operation timed out (Connection timed out)

View File

@ -1,33 +1,32 @@
package com.realnet.vpspack.Entity; package com.realnet.vpspack.Entity;
import lombok.*;
import com.realnet.WhoColumn.Entity.Extension; import javax.persistence.Column;
import javax.persistence.*; import javax.persistence.Entity;
import java.time.LocalDateTime; import javax.persistence.GeneratedValue;
import java.util.*; import javax.persistence.GenerationType;
import javax.persistence.Id;
import com.realnet.WhoColumn.Entity.Extension;
import lombok.Data;
@Entity @Entity
@Data @Data
public class Visa_processing extends Extension { public class Visa_processing extends Extension {
/** /**
* *
*/ */
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Id @Id
@GeneratedValue(strategy = GenerationType.IDENTITY) @GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id; private Integer id;
private String name; private String name;
@Column(length = 2000) @Column(length = 2000)
private String description; private String description;
private boolean active; private boolean active;
}
}

View File

@ -1,149 +1,99 @@
package com.realnet.vpspack.Services; package com.realnet.vpspack.Services;
import com.realnet.vpspack.Repository.Visa_administrationRepository;
import com.realnet.vpspack.Entity.Visa_administration import java.util.List;
;import java.util.*;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import com.realnet.SequenceGenerator.Service.SequenceService;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import com.realnet.realm.Entity.Realm; import com.realnet.realm.Entity.Realm;
import com.realnet.realm.Services.RealmService; import com.realnet.realm.Services.RealmService;
import org.springframework.data.domain.Pageable;
import org.springframework.http.*;
import com.realnet.users.service1.AppUserServiceImpl;
import com.realnet.users.entity1.AppUser; import com.realnet.users.entity1.AppUser;
import com.realnet.users.service1.AppUserServiceImpl;
import com.realnet.vpspack.Entity.Nationality;
import com.realnet.vpspack.Entity.Visa_administration;
import com.realnet.vpspack.Entity.Visa_status;
import com.realnet.vpspack.Repository.Visa_administrationRepository;
import com.realnet.vpspack.Entity.Visa_Status;
import com.realnet.vpspack.Services.Visa_StatusService;
import com.realnet.vpspack.Entity.Nationality;
import com.realnet.vpspack.Services.NationalityService;
import org.springframework.stereotype.Service;
@Service @Service
public class Visa_administrationService { public class Visa_administrationService {
@Autowired
private Visa_administrationRepository Repository;
@Autowired @Autowired
private AppUserServiceImpl userService; private Visa_administrationRepository Repository;
@Autowired @Autowired
private RealmService realmService; private AppUserServiceImpl userService;
@Autowired
private RealmService realmService;
@Autowired
private Visa_StatusService visa_statusserv;
@Autowired
private NationalityService nationalityserv;
public Visa_administration Savedata(Visa_administration data) {
if (data.getVisa_status() != null) {
Visa_Status get = visa_statusserv.getdetailsbyId(data.getVisa_status());
data.setVisa_statusname(get.getName());
}
if (data.getNationality() != null) {
Nationality get = nationalityserv.getdetailsbyId(data.getNationality());
data.setNationalityname(get.getName());
}
data.setUpdatedBy(getUser().getUserId());
data.setCreatedBy(getUser().getUserId());
data.setAccountId(getUser().getAccount().getAccount_id());
Visa_administration save = Repository.save(data);
return save;
}
@Autowired
private Visa_statusService visa_statusserv;
@Autowired
private NationalityService nationalityserv;
public Visa_administration Savedata(Visa_administration data) {
if (data.getVisa_status() != null) {
Visa_status get = visa_statusserv.getdetailsbyId(data.getVisa_status());
data.setVisa_statusname(get.getName());
}
if (data.getNationality() != null) {
Nationality get = nationalityserv.getdetailsbyId(data.getNationality());
data.setNationalityname(get.getName());
}
data.setUpdatedBy(getUser().getUserId());
data.setCreatedBy(getUser().getUserId());
data.setAccountId(getUser().getAccount().getAccount_id());
Visa_administration save = Repository.save(data);
return save;
}
// get all with pagination // get all with pagination
public Page<Visa_administration> getAllWithPagination(Pageable page) { public Page<Visa_administration> getAllWithPagination(Pageable page) {
return Repository.findAll(page, getUser().getUserId()); return Repository.findAll(page, getUser().getUserId());
} }
public List<Visa_administration> getdetails() {
public List<Visa_administration> getdetails() {
List<Realm> realm = realmService.findByUserId(getUser().getUserId()); List<Realm> realm = realmService.findByUserId(getUser().getUserId());
List<Visa_administration> all = Repository.findAll(getUser().getUserId()); List<Visa_administration> all = Repository.findAll(getUser().getUserId());
return all ; }
return all;
}
public Visa_administration getdetailsbyId(Integer id) { public Visa_administration getdetailsbyId(Integer id) {
return Repository.findById(id).get(); return Repository.findById(id).get();
} }
public void delete_by_id(Integer id) { public void delete_by_id(Integer id) {
Repository.deleteById(id); Repository.deleteById(id);
} }
public Visa_administration update(Visa_administration data, Integer id) {
Visa_administration old = Repository.findById(id).get();
old.setName(data.getName());
public Visa_administration update(Visa_administration data,Integer id) { old.setDescription(data.getDescription());
Visa_administration old = Repository.findById(id).get();
old.setName(data.getName()); old.setActive(data.isActive());
old.setDescription(data.getDescription()); old.setEmails(data.getEmails());
old.setActive (data.isActive()); old.setVisa_status(data.getVisa_status());
old.setEmails(data.getEmails()); old.setNationality(data.getNationality());
old.setVisa_status(data.getVisa_status()); final Visa_administration test = Repository.save(old);
old.setNationality(data.getNationality());
final Visa_administration test = Repository.save(old);
data.setUpdatedBy(getUser().getUserId()); data.setUpdatedBy(getUser().getUserId());
return test;} return test;
}
public AppUser getUser() {
public AppUser getUser() {
AppUser user = userService.getLoggedInUser(); AppUser user = userService.getLoggedInUser();
return user; return user;
}} }
}

View File

@ -1,387 +1,191 @@
package com.realnet.vpspack.Services; package com.realnet.vpspack.Services;
import com.realnet.vpspack.Repository.Visa_applicationRepository;
import com.realnet.vpspack.Entity.Visa_application import java.util.List;
;import java.util.*;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import com.realnet.SequenceGenerator.Service.SequenceService;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import com.realnet.realm.Entity.Realm; import com.realnet.realm.Entity.Realm;
import com.realnet.realm.Services.RealmService; import com.realnet.realm.Services.RealmService;
import org.springframework.data.domain.Pageable;
import org.springframework.http.*;
import com.realnet.users.service1.AppUserServiceImpl;
import com.realnet.users.entity1.AppUser; import com.realnet.users.entity1.AppUser;
import com.realnet.users.service1.AppUserServiceImpl;
import com.realnet.vpspack.Entity.Agent;
import com.realnet.vpspack.Entity.Gender;
import com.realnet.vpspack.Entity.Nationality;
import com.realnet.vpspack.Entity.Referrer;
import com.realnet.vpspack.Entity.Supplier;
import com.realnet.vpspack.Entity.Visa_entry; import com.realnet.vpspack.Entity.Visa_application;
import com.realnet.vpspack.Services.Visa_entryService; import com.realnet.vpspack.Entity.Visa_duration;
import com.realnet.vpspack.Entity.Visa_entry;
import com.realnet.vpspack.Entity.Visa_processing;
import com.realnet.vpspack.Repository.Visa_applicationRepository;
import com.realnet.vpspack.Entity.Visa_duration;
import com.realnet.vpspack.Services.Visa_durationService;
import com.realnet.vpspack.Entity.Visa_Processing;
import com.realnet.vpspack.Services.Visa_ProcessingService;
import com.realnet.vpspack.Entity.Gender;
import com.realnet.vpspack.Services.GenderService;
import com.realnet.vpspack.Entity.Referrer;
import com.realnet.vpspack.Services.ReferrerService;
import com.realnet.vpspack.Entity.Nationality;
import com.realnet.vpspack.Services.NationalityService;
import com.realnet.vpspack.Entity.Supplier;
import com.realnet.vpspack.Services.SupplierService;
import com.realnet.vpspack.Entity.Agent;
import com.realnet.vpspack.Services.AgentService;
import org.springframework.stereotype.Service;
@Service @Service
public class Visa_applicationService { public class Visa_applicationService {
@Autowired
private Visa_applicationRepository Repository;
@Autowired @Autowired
private AppUserServiceImpl userService; private Visa_applicationRepository Repository;
@Autowired @Autowired
private RealmService realmService; private AppUserServiceImpl userService;
@Autowired
private RealmService realmService;
@Autowired
private Visa_entryService visa_entry_typeserv;
@Autowired
private Visa_durationService visa_durationserv;
@Autowired
private Visa_ProcessingService visa_processingserv;
@Autowired
private GenderService genderserv;
@Autowired
private ReferrerService referrerserv;
@Autowired
private NationalityService nationalityserv;
@Autowired
private SupplierService supplierserv;
@Autowired
private AgentService agentserv;
public Visa_application Savedata(Visa_application data) {
if (data.getVisa_entry_type() != null) {
Visa_entry get = visa_entry_typeserv.getdetailsbyId(data.getVisa_entry_type());
data.setVisa_entry_typename(get.getName());
}
if (data.getVisa_duration() != null) {
Visa_duration get = visa_durationserv.getdetailsbyId(data.getVisa_duration());
data.setVisa_durationname(get.getName());
}
if (data.getVisa_processing() != null) {
Visa_Processing get = visa_processingserv.getdetailsbyId(data.getVisa_processing());
data.setVisa_processingname(get.getName());
}
if (data.getGender() != null) {
Gender get = genderserv.getdetailsbyId(data.getGender());
data.setGendername(get.getName());
}
if (data.getReferrer() != null) {
Referrer get = referrerserv.getdetailsbyId(data.getReferrer());
data.setReferrername(get.getName());
}
if (data.getNationality() != null) {
Nationality get = nationalityserv.getdetailsbyId(data.getNationality());
data.setNationalityname(get.getName());
}
if (data.getSupplier() != null) {
Supplier get = supplierserv.getdetailsbyId(data.getSupplier());
data.setSuppliername(get.getName());
}
if (data.getAgent() != null) {
Agent get = agentserv.getdetailsbyId(data.getAgent());
data.setAgentname(get.getName());
}
data.setUpdatedBy(getUser().getUserId());
data.setCreatedBy(getUser().getUserId());
data.setAccountId(getUser().getAccount().getAccount_id());
Visa_application save = Repository.save(data);
return save;
}
@Autowired
private Visa_entryService visa_entry_typeserv;
@Autowired
private Visa_durationService visa_durationserv;
@Autowired
private Visa_processingService visa_processingserv;
@Autowired
private GenderService genderserv;
@Autowired
private ReferrerService referrerserv;
@Autowired
private NationalityService nationalityserv;
@Autowired
private SupplierService supplierserv;
@Autowired
private AgentService agentserv;
public Visa_application Savedata(Visa_application data) {
if (data.getVisa_entry_type() != null) {
Visa_entry get = visa_entry_typeserv.getdetailsbyId(data.getVisa_entry_type());
data.setVisa_entry_typename(get.getName());
}
if (data.getVisa_duration() != null) {
Visa_duration get = visa_durationserv.getdetailsbyId(data.getVisa_duration());
data.setVisa_durationname(get.getName());
}
if (data.getVisa_processing() != null) {
Visa_processing get = visa_processingserv.getdetailsbyId(data.getVisa_processing());
data.setVisa_processingname(get.getName());
}
if (data.getGender() != null) {
Gender get = genderserv.getdetailsbyId(data.getGender());
data.setGendername(get.getName());
}
if (data.getReferrer() != null) {
Referrer get = referrerserv.getdetailsbyId(data.getReferrer());
data.setReferrername(get.getName());
}
if (data.getNationality() != null) {
Nationality get = nationalityserv.getdetailsbyId(data.getNationality());
data.setNationalityname(get.getName());
}
if (data.getSupplier() != null) {
Supplier get = supplierserv.getdetailsbyId(data.getSupplier());
data.setSuppliername(get.getName());
}
if (data.getAgent() != null) {
Agent get = agentserv.getdetailsbyId(data.getAgent());
data.setAgentname(get.getName());
}
data.setUpdatedBy(getUser().getUserId());
data.setCreatedBy(getUser().getUserId());
data.setAccountId(getUser().getAccount().getAccount_id());
Visa_application save = Repository.save(data);
return save;
}
// get all with pagination // get all with pagination
public Page<Visa_application> getAllWithPagination(Pageable page) { public Page<Visa_application> getAllWithPagination(Pageable page) {
return Repository.findAll(page, getUser().getUserId()); return Repository.findAll(page, getUser().getUserId());
} }
public List<Visa_application> getdetails() {
public List<Visa_application> getdetails() {
List<Realm> realm = realmService.findByUserId(getUser().getUserId()); List<Realm> realm = realmService.findByUserId(getUser().getUserId());
List<Visa_application> all = Repository.findAll(getUser().getUserId()); List<Visa_application> all = Repository.findAll(getUser().getUserId());
return all ; }
return all;
}
public Visa_application getdetailsbyId(Integer id) { public Visa_application getdetailsbyId(Integer id) {
return Repository.findById(id).get(); return Repository.findById(id).get();
} }
public void delete_by_id(Integer id) { public void delete_by_id(Integer id) {
Repository.deleteById(id); Repository.deleteById(id);
} }
public Visa_application update(Visa_application data, Integer id) {
Visa_application old = Repository.findById(id).get();
old.setName(data.getName());
public Visa_application update(Visa_application data,Integer id) { old.setDescription(data.getDescription());
Visa_application old = Repository.findById(id).get();
old.setName(data.getName()); old.setActive(data.isActive());
old.setDescription(data.getDescription()); old.setVisa_entry_type(data.getVisa_entry_type());
old.setActive (data.isActive()); old.setVisa_duration(data.getVisa_duration());
old.setVisa_entry_type(data.getVisa_entry_type()); old.setVisa_processing(data.getVisa_processing());
old.setVisa_duration(data.getVisa_duration()); old.setTravel_start_date(data.getTravel_start_date());
old.setVisa_processing(data.getVisa_processing()); old.setTravel_end_date(data.getTravel_end_date());
old.setTravel_start_date(data.getTravel_start_date()); old.setPassport_number(data.getPassport_number());
old.setTravel_end_date(data.getTravel_end_date()); old.setPassport_issue_date(data.getPassport_issue_date());
old.setPassport_number(data.getPassport_number()); old.setPassport_expiry_date(data.getPassport_expiry_date());
old.setPassport_issue_date(data.getPassport_issue_date()); old.setEmail(data.getEmail());
old.setPassport_expiry_date(data.getPassport_expiry_date()); old.setPhone_number(data.getPhone_number());
old.setEmail(data.getEmail()); old.setBirth_place(data.getBirth_place());
old.setPhone_number(data.getPhone_number()); old.setDate_of_birth(data.getDate_of_birth());
old.setBirth_place(data.getBirth_place()); old.setGender(data.getGender());
old.setDate_of_birth(data.getDate_of_birth()); old.setProfession(data.getProfession());
old.setGender(data.getGender()); old.setVisa_cost(data.getVisa_cost());
old.setProfession(data.getProfession()); old.setReferrer(data.getReferrer());
old.setVisa_cost(data.getVisa_cost()); old.setNationality(data.getNationality());
old.setReferrer(data.getReferrer()); old.setSupplier(data.getSupplier());
old.setNationality(data.getNationality()); old.setAgent(data.getAgent());
old.setSupplier(data.getSupplier()); final Visa_application test = Repository.save(old);
old.setAgent(data.getAgent());
final Visa_application test = Repository.save(old);
data.setUpdatedBy(getUser().getUserId()); data.setUpdatedBy(getUser().getUserId());
return test;} return test;
}
public AppUser getUser() {
public AppUser getUser() {
AppUser user = userService.getLoggedInUser(); AppUser user = userService.getLoggedInUser();
return user; return user;
}} }
}

View File

@ -1,182 +1,113 @@
package com.realnet.vpspack.Services; package com.realnet.vpspack.Services;
import com.realnet.vpspack.Repository.Visa_pricesRepository;
import com.realnet.vpspack.Entity.Visa_prices import java.util.List;
;import java.util.*;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import com.realnet.SequenceGenerator.Service.SequenceService;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import com.realnet.realm.Entity.Realm; import com.realnet.realm.Entity.Realm;
import com.realnet.realm.Services.RealmService; import com.realnet.realm.Services.RealmService;
import org.springframework.data.domain.Pageable;
import org.springframework.http.*;
import com.realnet.users.service1.AppUserServiceImpl;
import com.realnet.users.entity1.AppUser; import com.realnet.users.entity1.AppUser;
import com.realnet.users.service1.AppUserServiceImpl;
import com.realnet.vpspack.Entity.Visa_duration;
import com.realnet.vpspack.Entity.Visa_entry;
import com.realnet.vpspack.Entity.Visa_prices;
import com.realnet.vpspack.Entity.Visa_processing;
import com.realnet.vpspack.Repository.Visa_pricesRepository;
import com.realnet.vpspack.Entity.Visa_entry;
import com.realnet.vpspack.Services.Visa_entryService;
import com.realnet.vpspack.Entity.Visa_duration;
import com.realnet.vpspack.Services.Visa_durationService;
import com.realnet.vpspack.Entity.Visa_Processing;
import com.realnet.vpspack.Services.Visa_ProcessingService;
import org.springframework.stereotype.Service;
@Service @Service
public class Visa_pricesService { public class Visa_pricesService {
@Autowired
private Visa_pricesRepository Repository;
@Autowired @Autowired
private AppUserServiceImpl userService; private Visa_pricesRepository Repository;
@Autowired @Autowired
private RealmService realmService; private AppUserServiceImpl userService;
@Autowired
private RealmService realmService;
@Autowired
private Visa_entryService visa_entry_typeserv;
@Autowired
private Visa_durationService visa_durationserv;
@Autowired
private Visa_ProcessingService visa_processingserv;
public Visa_prices Savedata(Visa_prices data) {
if (data.getVisa_entry_type() != null) {
Visa_entry get = visa_entry_typeserv.getdetailsbyId(data.getVisa_entry_type());
data.setVisa_entry_typename(get.getName());
}
if (data.getVisa_duration() != null) {
Visa_duration get = visa_durationserv.getdetailsbyId(data.getVisa_duration());
data.setVisa_durationname(get.getName());
}
if (data.getVisa_processing() != null) {
Visa_Processing get = visa_processingserv.getdetailsbyId(data.getVisa_processing());
data.setVisa_processingname(get.getName());
}
data.setUpdatedBy(getUser().getUserId());
data.setCreatedBy(getUser().getUserId());
data.setAccountId(getUser().getAccount().getAccount_id());
Visa_prices save = Repository.save(data);
return save;
}
@Autowired
private Visa_entryService visa_entry_typeserv;
@Autowired
private Visa_durationService visa_durationserv;
@Autowired
private Visa_processingService visa_processingserv;
public Visa_prices Savedata(Visa_prices data) {
if (data.getVisa_entry_type() != null) {
Visa_entry get = visa_entry_typeserv.getdetailsbyId(data.getVisa_entry_type());
data.setVisa_entry_typename(get.getName());
}
if (data.getVisa_duration() != null) {
Visa_duration get = visa_durationserv.getdetailsbyId(data.getVisa_duration());
data.setVisa_durationname(get.getName());
}
if (data.getVisa_processing() != null) {
Visa_processing get = visa_processingserv.getdetailsbyId(data.getVisa_processing());
data.setVisa_processingname(get.getName());
}
data.setUpdatedBy(getUser().getUserId());
data.setCreatedBy(getUser().getUserId());
data.setAccountId(getUser().getAccount().getAccount_id());
Visa_prices save = Repository.save(data);
return save;
}
// get all with pagination // get all with pagination
public Page<Visa_prices> getAllWithPagination(Pageable page) { public Page<Visa_prices> getAllWithPagination(Pageable page) {
return Repository.findAll(page, getUser().getUserId()); return Repository.findAll(page, getUser().getUserId());
} }
public List<Visa_prices> getdetails() {
public List<Visa_prices> getdetails() {
List<Realm> realm = realmService.findByUserId(getUser().getUserId()); List<Realm> realm = realmService.findByUserId(getUser().getUserId());
List<Visa_prices> all = Repository.findAll(getUser().getUserId()); List<Visa_prices> all = Repository.findAll(getUser().getUserId());
return all ; }
return all;
}
public Visa_prices getdetailsbyId(Integer id) { public Visa_prices getdetailsbyId(Integer id) {
return Repository.findById(id).get(); return Repository.findById(id).get();
} }
public void delete_by_id(Integer id) { public void delete_by_id(Integer id) {
Repository.deleteById(id); Repository.deleteById(id);
} }
public Visa_prices update(Visa_prices data, Integer id) {
Visa_prices old = Repository.findById(id).get();
old.setName(data.getName());
public Visa_prices update(Visa_prices data,Integer id) { old.setDescription(data.getDescription());
Visa_prices old = Repository.findById(id).get();
old.setName(data.getName()); old.setActive(data.isActive());
old.setDescription(data.getDescription()); old.setVisa_entry_type(data.getVisa_entry_type());
old.setActive (data.isActive()); old.setVisa_duration(data.getVisa_duration());
old.setVisa_entry_type(data.getVisa_entry_type()); old.setVisa_processing(data.getVisa_processing());
old.setVisa_duration(data.getVisa_duration()); old.setTotal_price(data.getTotal_price());
old.setVisa_processing(data.getVisa_processing()); old.setCost(data.getCost());
old.setTotal_price(data.getTotal_price()); final Visa_prices test = Repository.save(old);
old.setCost(data.getCost());
final Visa_prices test = Repository.save(old);
data.setUpdatedBy(getUser().getUserId()); data.setUpdatedBy(getUser().getUserId());
return test;} return test;
}
public AppUser getUser() {
public AppUser getUser() {
AppUser user = userService.getLoggedInUser(); AppUser user = userService.getLoggedInUser();
return user; return user;
}} }
}

View File

@ -1,93 +1,73 @@
package com.realnet.vpspack.Services; package com.realnet.vpspack.Services;
import com.realnet.vpspack.Repository.Visa_processingRepository;
import com.realnet.vpspack.Entity.Visa_processing import java.util.List;
;import java.util.*;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import com.realnet.SequenceGenerator.Service.SequenceService;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import com.realnet.realm.Entity.Realm; import com.realnet.realm.Entity.Realm;
import com.realnet.realm.Services.RealmService; import com.realnet.realm.Services.RealmService;
import org.springframework.data.domain.Pageable;
import org.springframework.http.*;
import com.realnet.users.service1.AppUserServiceImpl;
import com.realnet.users.entity1.AppUser; import com.realnet.users.entity1.AppUser;
import com.realnet.users.service1.AppUserServiceImpl;
import com.realnet.vpspack.Entity.Visa_processing;
import com.realnet.vpspack.Repository.Visa_processingRepository;
import org.springframework.stereotype.Service;
@Service @Service
public class Visa_processingService { public class Visa_processingService {
@Autowired
private Visa_processingRepository Repository;
@Autowired @Autowired
private AppUserServiceImpl userService; private Visa_processingRepository Repository;
@Autowired @Autowired
private RealmService realmService; private AppUserServiceImpl userService;
@Autowired
private RealmService realmService;
public Visa_processing Savedata(Visa_processing data) {
data.setUpdatedBy(getUser().getUserId());
data.setCreatedBy(getUser().getUserId());
data.setAccountId(getUser().getAccount().getAccount_id());
Visa_processing save = Repository.save(data);
return save;
}
public Visa_processing Savedata(Visa_processing data) {
data.setUpdatedBy(getUser().getUserId());
data.setCreatedBy(getUser().getUserId());
data.setAccountId(getUser().getAccount().getAccount_id());
Visa_processing save = Repository.save(data);
return save;
}
// get all with pagination // get all with pagination
public Page<Visa_processing> getAllWithPagination(Pageable page) { public Page<Visa_processing> getAllWithPagination(Pageable page) {
return Repository.findAll(page, getUser().getUserId()); return Repository.findAll(page, getUser().getUserId());
} }
public List<Visa_processing> getdetails() {
public List<Visa_processing> getdetails() {
List<Realm> realm = realmService.findByUserId(getUser().getUserId()); List<Realm> realm = realmService.findByUserId(getUser().getUserId());
List<Visa_processing> all = Repository.findAll(getUser().getUserId()); List<Visa_processing> all = Repository.findAll(getUser().getUserId());
return all ; }
return all;
}
public Visa_processing getdetailsbyId(Integer id) { public Visa_processing getdetailsbyId(Integer id) {
return Repository.findById(id).get(); return Repository.findById(id).get();
} }
public void delete_by_id(Integer id) { public void delete_by_id(Integer id) {
Repository.deleteById(id); Repository.deleteById(id);
} }
public Visa_processing update(Visa_processing data, Integer id) {
Visa_processing old = Repository.findById(id).get();
old.setName(data.getName());
public Visa_processing update(Visa_processing data,Integer id) { old.setDescription(data.getDescription());
Visa_processing old = Repository.findById(id).get();
old.setName(data.getName()); old.setActive(data.isActive());
old.setDescription(data.getDescription()); final Visa_processing test = Repository.save(old);
old.setActive (data.isActive());
final Visa_processing test = Repository.save(old);
data.setUpdatedBy(getUser().getUserId()); data.setUpdatedBy(getUser().getUserId());
return test;} return test;
}
public AppUser getUser() {
public AppUser getUser() {
AppUser user = userService.getLoggedInUser(); AppUser user = userService.getLoggedInUser();
return user; return user;
}} }
}

View File

@ -1,7 +1,7 @@
#Generated by Maven Integration for Eclipse #Generated by Maven Integration for Eclipse
#Thu Apr 03 17:26:58 IST 2025 #Tue Apr 08 19:35:59 IST 2025
artifactId=app artifactId=app
groupId=com.realnet groupId=com.realnet
m2e.projectLocation=/Users/Gaurav Kumar/Desktop/Workspace/Workspace 2/app_builder/build_backend/cns-portal/code-extractor/builders/11096/index/demot1/demot1-test2-b/authsec_springboot/backend m2e.projectLocation=/Users/Gaurav Kumar/Desktop/Workspace/workspace 5/visa APP/visaproject/visaproject-back-b/authsec_springboot/backend
m2e.projectName=Aauthsec Spring m2e.projectName=visa app
version=1.0.0 version=1.0.0

View File

@ -1,100 +1,98 @@
# File is used by sprigboot # File is used by sprigboot
server.contextPath=/* server.contextPath=/*
server.port=9292 server.port=9292
spring.resources.static-locations=classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/,classpath:/webui/ spring.resources.static-locations=classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/,classpath:/webui/
spring.banner.location=classpath:banner_txt.txt spring.banner.location=classpath:banner_txt.txt
#Temporary disable security to enable it remove this #Temporary disable security to enable it remove this
#security.ignored=/** #security.ignored=/**
springfox.documentation.swagger.v2.path=/api-docs springfox.documentation.swagger.v2.path=/api-docs
spring.jackson.date-format=yyyy-MM-dd spring.jackson.date-format=yyyy-MM-dd
chatgpt.api.url=https://api.openai.com/v1/completions chatgpt.api.url=https://api.openai.com/v1/completions
chatgpt.api.key=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 chatgpt.api.key=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
System.Net.ServicePointManager.Expect100Continue = false; System.Net.ServicePointManager.Expect100Continue = false;
#spring.jpa.hibernate.ddl-auto=none #spring.jpa.hibernate.ddl-auto=none
#spring.jpa.hibernate.ddl-auto=update #spring.jpa.hibernate.ddl-auto=update
#spring.datasource.continue-on-error=false #spring.datasource.continue-on-error=false
# **** MY SQL DATABASE CONNECTION **** # **** MY SQL DATABASE CONNECTION ****
spring.datasource.url=jdbc:mysql://realit-prod.cj462uqsa4mz.ap-south-1.rds.amazonaws.com:3306/realnet_CNSBENEW?createDatabaseIfNotExist=true spring.datasource.url=jdbc:mysql://157.66.191.31:3306/visaapp?createDatabaseIfNotExist=true
spring.datasource.username=cnsdev spring.datasource.username=cnsdev
spring.datasource.password=cnsdevprod1212 spring.datasource.password=cnsdev2407
spring.datasource.driverClassName = com.mysql.cj.jdbc.Driver spring.datasource.driverClassName = com.mysql.cj.jdbc.Driver
spring.jpa.hibernate.ddl-auto=update spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5InnoDBDialect spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5InnoDBDialect
# Prefix Path server.servlet.contextPath=/back
#spring.jpa.show-sql=true #spring.jpa.show-sql=true
spring.jpa.properties.hibernate.format_sql=true spring.jpa.properties.hibernate.format_sql=true
spring.jpa.properties.hibernate.proc.param_null_passing=true spring.jpa.properties.hibernate.proc.param_null_passing=true
# **********paytm dependency ****** # **********paytm dependency ******
razorpay.api.key=rzp_test_xVnrBUjJWTEH0r razorpay.api.key=rzp_test_xVnrBUjJWTEH0r
razorpay.api.secret=evTXkIFcgpVtiLa1P7M7CIox razorpay.api.secret=evTXkIFcgpVtiLa1P7M7CIox
#***** MAIL SENDER #***** MAIL SENDER
spring.mail.host=smtp.gmail.com spring.mail.host=smtp.gmail.com
spring.mail.username=realitmailsender@gmail.com spring.mail.username=realitmailsender@gmail.com
spring.mail.password=epnmhzsccotnyozf spring.mail.password=epnmhzsccotnyozf
spring.mail.port=587 spring.mail.port=587
#spring.mail.properties.mail.smtp.auth=true #spring.mail.properties.mail.smtp.auth=true
spring.mail.properties.mail.smtp.starttls.enable=true spring.mail.properties.mail.smtp.starttls.enable=true
spring.mail.properties.mail.smtp.starttls.required=true spring.mail.properties.mail.smtp.starttls.required=true
# JACKSON # JACKSON
spring.jackson.serialization.FAIL_ON_EMPTY_BEANS=false spring.jackson.serialization.FAIL_ON_EMPTY_BEANS=false
spring.mail.properties.mail.smtp.auth = true spring.mail.properties.mail.smtp.auth = true
spring.mail.properties.mail.smtp.socketFactory.port = 465 spring.mail.properties.mail.smtp.socketFactory.port = 465
spring.mail.properties.mail.smtp.socketFactory.class = javax.net.ssl.SSLSocketFactory spring.mail.properties.mail.smtp.socketFactory.class = javax.net.ssl.SSLSocketFactory
spring.mail.properties.mail.smtp.socketFactory.fallback = false spring.mail.properties.mail.smtp.socketFactory.fallback = false
#******* MULTIPART RESOLVER #******* MULTIPART RESOLVER
spring.servlet.multipart.enabled=true spring.servlet.multipart.enabled=true
spring.servlet.multipart.max-file-size=100MB spring.servlet.multipart.max-file-size=100MB
spring.servlet.multipart.max-request-size=100MB spring.servlet.multipart.max-request-size=100MB
#***************OAUTH2 SOCIAL LOGIN ********* #***************OAUTH2 SOCIAL LOGIN *********
# Social login provider props # Social login provider props
spring.security.oauth2.client.registration.google.clientId=437023664181-0lm0ipgip3qbhga4nd7o4128jv4g2nv9.apps.googleusercontent.com spring.security.oauth2.client.registration.google.clientId=437023664181-0lm0ipgip3qbhga4nd7o4128jv4g2nv9.apps.googleusercontent.com
spring.security.oauth2.client.registration.google.clientSecret=I1HPyUqdJ9UONu45W1_wwfww spring.security.oauth2.client.registration.google.clientSecret=I1HPyUqdJ9UONu45W1_wwfww
spring.security.oauth2.client.registration.google.scope=profile, email spring.security.oauth2.client.registration.google.scope=profile, email
spring.security.oauth2.client.registration.linkedin.clientId=<your-client-id> spring.security.oauth2.client.registration.linkedin.clientId=<your-client-id>
spring.security.oauth2.client.registration.linkedin.clientSecret=<your-client-secret> spring.security.oauth2.client.registration.linkedin.clientSecret=<your-client-secret>
spring.security.oauth2.client.registration.linkedin.client-authentication-method=post spring.security.oauth2.client.registration.linkedin.client-authentication-method=post
spring.security.oauth2.client.registration.linkedin.authorization-grant-type=authorization_code spring.security.oauth2.client.registration.linkedin.authorization-grant-type=authorization_code
spring.security.oauth2.client.registration.linkedin.scope=r_liteprofile, r_emailaddress spring.security.oauth2.client.registration.linkedin.scope=r_liteprofile, r_emailaddress
spring.security.oauth2.client.registration.linkedin.redirect-uri={baseUrl}/login/oauth2/code/{registrationId} spring.security.oauth2.client.registration.linkedin.redirect-uri={baseUrl}/login/oauth2/code/{registrationId}
spring.security.oauth2.client.registration.linkedin.client-name=Linkedin spring.security.oauth2.client.registration.linkedin.client-name=Linkedin
spring.security.oauth2.client.registration.linkedin.provider=linkedin spring.security.oauth2.client.registration.linkedin.provider=linkedin
spring.security.oauth2.client.provider.linkedin.authorization-uri=https://www.linkedin.com/oauth/v2/authorization spring.security.oauth2.client.provider.linkedin.authorization-uri=https://www.linkedin.com/oauth/v2/authorization
spring.security.oauth2.client.provider.linkedin.token-uri=https://www.linkedin.com/oauth/v2/accessToken spring.security.oauth2.client.provider.linkedin.token-uri=https://www.linkedin.com/oauth/v2/accessToken
spring.security.oauth2.client.provider.linkedin.user-info-uri=https://api.linkedin.com/v2/me spring.security.oauth2.client.provider.linkedin.user-info-uri=https://api.linkedin.com/v2/me
spring.security.oauth2.client.provider.linkedin.user-name-attribute=id spring.security.oauth2.client.provider.linkedin.user-name-attribute=id
linkedin.email-address-uri=https://api.linkedin.com/v2/emailAddress?q=members&projection=(elements*(handle~)) linkedin.email-address-uri=https://api.linkedin.com/v2/emailAddress?q=members&projection=(elements*(handle~))
app.auth.tokenSecret=926D96C90030DD58429D2751AC1BDBBC app.auth.tokenSecret=926D96C90030DD58429D2751AC1BDBBC
app.auth.tokenExpirationMsec=864000000 app.auth.tokenExpirationMsec=864000000
# After successfully authenticating with the OAuth2 Provider, # After successfully authenticating with the OAuth2 Provider,
# we'll be generating an auth token for the user and sending the token to the # we'll be generating an auth token for the user and sending the token to the
# redirectUri mentioned by the frontend client in the /oauth2/authorization request. # redirectUri mentioned by the frontend client in the /oauth2/authorization request.
# We're not using cookies because they won't work well in mobile clients. # We're not using cookies because they won't work well in mobile clients.
app.oauth2.authorizedRedirectUris=http://localhost:8081/oauth2/redirect,myandroidapp://oauth2/redirect,myiosapp://oauth2/redirect app.oauth2.authorizedRedirectUris=http://localhost:8081/oauth2/redirect,myandroidapp://oauth2/redirect,myiosapp://oauth2/redirect
projectPath=/Users/Gaurav Kumar/Desktop/Workspace 2/app_builder/build_backend/cns-portal/code-extractor/builders/11096/index/demot1/demot1-test2-b/authsec_springboot/backend projectPath=/Users/Gaurav Kumar/Desktop/Workspace/workspace 5/visa APP/visaproject/visaproject-back-b/authsec_springboot/backend
angularProjectPath=/Users/Gaurav Kumar/Desktop/Workspace 2/app_builder/build_backend/cns-portal/code-extractor/builders/11096/index/demot1/demot1-test2-b/authsec_springboot/backend/webui angularProjectPath=/Users/Gaurav Kumar/Desktop/Workspace/workspace 5/visa APP/visaproject/visaproject-back-b/authsec_springboot/backend/webui