diff --git a/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java b/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java index f9801fb..e24c10e 100644 --- a/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java +++ b/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java @@ -69,6 +69,15 @@ public class BuilderService { executeDump(true); // ADD OTHER SERVICE +addCustomMenu( "Testc","Testc", "Transcations"); + + +addCustomMenu( "Testb","Testb", "Transcations"); + + +addCustomMenu( "Testa","Testa", "Transcations"); + + System.out.println("dashboard and menu inserted..."); diff --git a/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashb/Controllers/TestaController.java b/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashb/Controllers/TestaController.java new file mode 100644 index 0000000..0fcbdc4 --- /dev/null +++ b/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashb/Controllers/TestaController.java @@ -0,0 +1,107 @@ +package com.realnet.dashb.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.*; +import com.realnet.fnd.response.EntityResponse; +import org.springframework.http.*; +import org.springframework.beans.factory.annotation.*; +import com.realnet.dashb.Entity.Testa; +import com.realnet.dashb.Services.TestaService ; + + + + + + + + +@RequestMapping(value = "/Testa") + @CrossOrigin("*") +@RestController +public class TestaController { + @Autowired + private TestaService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + @PostMapping("/Testa") + public Testa Savedata(@RequestBody Testa data) { + Testa save = Service.Savedata(data) ; + + + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Testa/{id}") + public Testa update(@RequestBody Testa data,@PathVariable Integer id ) { + Testa update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Testa/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Testa") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Testa") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Testa/{id}") + public Testa getdetailsbyId(@PathVariable Integer id ) { + Testa get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Testa/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + + + +} \ No newline at end of file diff --git a/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashb/Controllers/TestbController.java b/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashb/Controllers/TestbController.java new file mode 100644 index 0000000..e3999e3 --- /dev/null +++ b/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashb/Controllers/TestbController.java @@ -0,0 +1,115 @@ +package com.realnet.dashb.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.*; +import com.realnet.fnd.response.EntityResponse; +import org.springframework.http.*; +import org.springframework.beans.factory.annotation.*; +import com.realnet.dashb.Entity.Testb; +import com.realnet.dashb.Services.TestbService ; + + + + + + + + + + +@RequestMapping(value = "/Testb") + @CrossOrigin("*") +@RestController +public class TestbController { + @Autowired + private TestbService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + + + @PostMapping("/Testb") + public Testb Savedata(@RequestBody Testb data) { + Testb save = Service.Savedata(data) ; + + + + + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Testb/{id}") + public Testb update(@RequestBody Testb data,@PathVariable Integer id ) { + Testb update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Testb/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Testb") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Testb") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Testb/{id}") + public Testb getdetailsbyId(@PathVariable Integer id ) { + Testb get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Testb/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + + + + + +} \ No newline at end of file diff --git a/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashb/Controllers/TestcController.java b/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashb/Controllers/TestcController.java new file mode 100644 index 0000000..cd163de --- /dev/null +++ b/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashb/Controllers/TestcController.java @@ -0,0 +1,115 @@ +package com.realnet.dashb.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.*; +import com.realnet.fnd.response.EntityResponse; +import org.springframework.http.*; +import org.springframework.beans.factory.annotation.*; +import com.realnet.dashb.Entity.Testc; +import com.realnet.dashb.Services.TestcService ; + + + + + + + + + + +@RequestMapping(value = "/Testc") + @CrossOrigin("*") +@RestController +public class TestcController { + @Autowired + private TestcService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + + + @PostMapping("/Testc") + public Testc Savedata(@RequestBody Testc data) { + Testc save = Service.Savedata(data) ; + + + + + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Testc/{id}") + public Testc update(@RequestBody Testc data,@PathVariable Integer id ) { + Testc update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Testc/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Testc") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Testc") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Testc/{id}") + public Testc getdetailsbyId(@PathVariable Integer id ) { + Testc get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Testc/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + + + + + +} \ No newline at end of file diff --git a/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashb/Controllers/tokenFree_TestaController.java b/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashb/Controllers/tokenFree_TestaController.java new file mode 100644 index 0000000..b0e05e0 --- /dev/null +++ b/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashb/Controllers/tokenFree_TestaController.java @@ -0,0 +1,107 @@ +package com.realnet.dashb.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.*; +import com.realnet.fnd.response.EntityResponse; +import org.springframework.http.*; +import org.springframework.beans.factory.annotation.*; +import com.realnet.dashb.Entity.Testa; +import com.realnet.dashb.Services.TestaService ; + + + + + + + + +@RequestMapping(value = "/token/Testa") + @CrossOrigin("*") +@RestController +public class tokenFree_TestaController { + @Autowired + private TestaService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + @PostMapping("/Testa") + public Testa Savedata(@RequestBody Testa data) { + Testa save = Service.Savedata(data) ; + + + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Testa/{id}") + public Testa update(@RequestBody Testa data,@PathVariable Integer id ) { + Testa update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Testa/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Testa") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Testa") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Testa/{id}") + public Testa getdetailsbyId(@PathVariable Integer id ) { + Testa get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Testa/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + + + +} \ No newline at end of file diff --git a/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashb/Controllers/tokenFree_TestbController.java b/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashb/Controllers/tokenFree_TestbController.java new file mode 100644 index 0000000..2347fe9 --- /dev/null +++ b/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashb/Controllers/tokenFree_TestbController.java @@ -0,0 +1,115 @@ +package com.realnet.dashb.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.*; +import com.realnet.fnd.response.EntityResponse; +import org.springframework.http.*; +import org.springframework.beans.factory.annotation.*; +import com.realnet.dashb.Entity.Testb; +import com.realnet.dashb.Services.TestbService ; + + + + + + + + + + +@RequestMapping(value = "/token/Testb") + @CrossOrigin("*") +@RestController +public class tokenFree_TestbController { + @Autowired + private TestbService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + + + @PostMapping("/Testb") + public Testb Savedata(@RequestBody Testb data) { + Testb save = Service.Savedata(data) ; + + + + + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Testb/{id}") + public Testb update(@RequestBody Testb data,@PathVariable Integer id ) { + Testb update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Testb/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Testb") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Testb") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Testb/{id}") + public Testb getdetailsbyId(@PathVariable Integer id ) { + Testb get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Testb/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + + + + + +} \ No newline at end of file diff --git a/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashb/Controllers/tokenFree_TestcController.java b/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashb/Controllers/tokenFree_TestcController.java new file mode 100644 index 0000000..5fa8547 --- /dev/null +++ b/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashb/Controllers/tokenFree_TestcController.java @@ -0,0 +1,115 @@ +package com.realnet.dashb.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.*; +import com.realnet.fnd.response.EntityResponse; +import org.springframework.http.*; +import org.springframework.beans.factory.annotation.*; +import com.realnet.dashb.Entity.Testc; +import com.realnet.dashb.Services.TestcService ; + + + + + + + + + + +@RequestMapping(value = "/token/Testc") + @CrossOrigin("*") +@RestController +public class tokenFree_TestcController { + @Autowired + private TestcService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + + + @PostMapping("/Testc") + public Testc Savedata(@RequestBody Testc data) { + Testc save = Service.Savedata(data) ; + + + + + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Testc/{id}") + public Testc update(@RequestBody Testc data,@PathVariable Integer id ) { + Testc update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Testc/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Testc") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Testc") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Testc/{id}") + public Testc getdetailsbyId(@PathVariable Integer id ) { + Testc get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Testc/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + + + + + +} \ No newline at end of file diff --git a/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashb/Entity/Testa.java b/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashb/Entity/Testa.java new file mode 100644 index 0000000..5dcce13 --- /dev/null +++ b/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashb/Entity/Testa.java @@ -0,0 +1,36 @@ +package com.realnet.dashb.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + + + + + + + @Entity + @Data + public class Testa extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String name; + +private int papulation; + +private int male_papulation; + +private int female_papulation; + + +} diff --git a/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashb/Entity/Testb.java b/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashb/Entity/Testb.java new file mode 100644 index 0000000..57c6eb5 --- /dev/null +++ b/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashb/Entity/Testb.java @@ -0,0 +1,41 @@ +package com.realnet.dashb.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + + + + + + + + + @Entity + @Data + public class Testb extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String contry_name; + +@Column(length = 2000) +private String state_name; + +private int papulation; + +private int male_papulation; + +private int female_papulation; + + +} diff --git a/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashb/Entity/Testc.java b/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashb/Entity/Testc.java new file mode 100644 index 0000000..00334c3 --- /dev/null +++ b/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashb/Entity/Testc.java @@ -0,0 +1,41 @@ +package com.realnet.dashb.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + + + + + + + + + @Entity + @Data + public class Testc extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String state_name; + +@Column(length = 2000) +private String district_name; + +private int papulation; + +private int male_papulation; + +private int female_papulation; + + +} diff --git a/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashb/Repository/TestaRepository.java b/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashb/Repository/TestaRepository.java new file mode 100644 index 0000000..5596a02 --- /dev/null +++ b/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashb/Repository/TestaRepository.java @@ -0,0 +1,32 @@ +package com.realnet.dashb.Repository; + + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; + +import org.springframework.stereotype.Repository; +import java.util.*; + + + + + + + + + + + +import com.realnet.dashb.Entity.Testa; + +@Repository +public interface TestaRepository extends JpaRepository { + +@Query(value = "select * from testa where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from testa where created_by=?1", nativeQuery = true) + Page findAll( Long creayedBy,Pageable page); +} \ No newline at end of file diff --git a/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashb/Repository/TestbRepository.java b/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashb/Repository/TestbRepository.java new file mode 100644 index 0000000..e67c7d1 --- /dev/null +++ b/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashb/Repository/TestbRepository.java @@ -0,0 +1,34 @@ +package com.realnet.dashb.Repository; + + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; + +import org.springframework.stereotype.Repository; +import java.util.*; + + + + + + + + + + + + + +import com.realnet.dashb.Entity.Testb; + +@Repository +public interface TestbRepository extends JpaRepository { + +@Query(value = "select * from testb where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from testb where created_by=?1", nativeQuery = true) + Page findAll( Long creayedBy,Pageable page); +} \ No newline at end of file diff --git a/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashb/Repository/TestcRepository.java b/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashb/Repository/TestcRepository.java new file mode 100644 index 0000000..82ae8e2 --- /dev/null +++ b/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashb/Repository/TestcRepository.java @@ -0,0 +1,34 @@ +package com.realnet.dashb.Repository; + + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; + +import org.springframework.stereotype.Repository; +import java.util.*; + + + + + + + + + + + + + +import com.realnet.dashb.Entity.Testc; + +@Repository +public interface TestcRepository extends JpaRepository { + +@Query(value = "select * from testc where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from testc where created_by=?1", nativeQuery = true) + Page findAll( Long creayedBy,Pageable page); +} \ No newline at end of file diff --git a/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashb/Services/TestaService.java b/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashb/Services/TestaService.java new file mode 100644 index 0000000..76b33aa --- /dev/null +++ b/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashb/Services/TestaService.java @@ -0,0 +1,103 @@ +package com.realnet.dashb.Services; +import com.realnet.dashb.Repository.TestaRepository; +import com.realnet.dashb.Entity.Testa +;import java.util.*; + +import org.springframework.beans.factory.annotation.Autowired; +import com.realnet.SequenceGenerator.Service.SequenceService; +import org.springframework.data.domain.Page; +import com.realnet.realm.Entity.Realm; +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 org.springframework.stereotype.Service; + +@Service + public class TestaService { +@Autowired +private TestaRepository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + + + + + + + +public Testa Savedata(Testa data) { + + + + + + + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Testa save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll( getUser().getUserId(),page); + } +public List getdetails() { + List realm = realmService.findByUserId(getUser().getUserId()); +List all = Repository.findAll(getUser().getUserId()); + + return all ; } + + +public Testa getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Testa update(Testa data,Integer id) { + Testa old = Repository.findById(id).get(); +old.setName(data.getName()); + +old.setPapulation(data.getPapulation()); + +old.setMale_papulation(data.getMale_papulation()); + +old.setFemale_papulation(data.getFemale_papulation()); + +final Testa test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + + + + + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashb/Services/TestbService.java b/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashb/Services/TestbService.java new file mode 100644 index 0000000..14c7c41 --- /dev/null +++ b/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashb/Services/TestbService.java @@ -0,0 +1,113 @@ +package com.realnet.dashb.Services; +import com.realnet.dashb.Repository.TestbRepository; +import com.realnet.dashb.Entity.Testb +;import java.util.*; + +import org.springframework.beans.factory.annotation.Autowired; +import com.realnet.SequenceGenerator.Service.SequenceService; +import org.springframework.data.domain.Page; +import com.realnet.realm.Entity.Realm; +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 org.springframework.stereotype.Service; + +@Service + public class TestbService { +@Autowired +private TestbRepository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + + + + + + + + + +public Testb Savedata(Testb data) { + + + + + + + + + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Testb save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll( getUser().getUserId(),page); + } +public List getdetails() { + List realm = realmService.findByUserId(getUser().getUserId()); +List all = Repository.findAll(getUser().getUserId()); + + return all ; } + + +public Testb getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Testb update(Testb data,Integer id) { + Testb old = Repository.findById(id).get(); +old.setContry_name(data.getContry_name()); + +old.setState_name(data.getState_name()); + +old.setPapulation(data.getPapulation()); + +old.setMale_papulation(data.getMale_papulation()); + +old.setFemale_papulation(data.getFemale_papulation()); + +final Testb test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + + + + + + + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashb/Services/TestcService.java b/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashb/Services/TestcService.java new file mode 100644 index 0000000..53e9ece --- /dev/null +++ b/testdash003-back-b/authsec_springboot/backend/src/main/java/com/realnet/dashb/Services/TestcService.java @@ -0,0 +1,113 @@ +package com.realnet.dashb.Services; +import com.realnet.dashb.Repository.TestcRepository; +import com.realnet.dashb.Entity.Testc +;import java.util.*; + +import org.springframework.beans.factory.annotation.Autowired; +import com.realnet.SequenceGenerator.Service.SequenceService; +import org.springframework.data.domain.Page; +import com.realnet.realm.Entity.Realm; +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 org.springframework.stereotype.Service; + +@Service + public class TestcService { +@Autowired +private TestcRepository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + + + + + + + + + +public Testc Savedata(Testc data) { + + + + + + + + + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Testc save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll( getUser().getUserId(),page); + } +public List getdetails() { + List realm = realmService.findByUserId(getUser().getUserId()); +List all = Repository.findAll(getUser().getUserId()); + + return all ; } + + +public Testc getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Testc update(Testc data,Integer id) { + Testc old = Repository.findById(id).get(); +old.setState_name(data.getState_name()); + +old.setDistrict_name(data.getDistrict_name()); + +old.setPapulation(data.getPapulation()); + +old.setMale_papulation(data.getMale_papulation()); + +old.setFemale_papulation(data.getFemale_papulation()); + +final Testc test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + + + + + + + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/testdash003-ds-d/authsec_mysql/mysql/wf_table/wf_table.sql b/testdash003-ds-d/authsec_mysql/mysql/wf_table/wf_table.sql new file mode 100755 index 0000000..d16abf8 --- /dev/null +++ b/testdash003-ds-d/authsec_mysql/mysql/wf_table/wf_table.sql @@ -0,0 +1,6 @@ +CREATE TABLE ds.Testa(id BIGINT NOT NULL AUTO_INCREMENT, female_papulation int, papulation int, male_papulation int, name VARCHAR(400), PRIMARY KEY (id)); + +CREATE TABLE ds.Testb(id BIGINT NOT NULL AUTO_INCREMENT, female_papulation int, male_papulation int, state_name VARCHAR(400), contry_name VARCHAR(400), papulation int, PRIMARY KEY (id)); + +CREATE TABLE ds.Testc(id BIGINT NOT NULL AUTO_INCREMENT, female_papulation int, district_name VARCHAR(400), male_papulation int, state_name VARCHAR(400), papulation int, PRIMARY KEY (id)); + diff --git a/testdash003-front-f/authsec_angular_clarity_modern/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/dashb/Testa/Testa.component.html b/testdash003-front-f/authsec_angular_clarity_modern/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/dashb/Testa/Testa.component.html new file mode 100644 index 0000000..1b8f056 --- /dev/null +++ b/testdash003-front-f/authsec_angular_clarity_modern/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/dashb/Testa/Testa.component.html @@ -0,0 +1,362 @@ + +
+
+
+
+

TestA

+
+
+
+ + +
+
+ + +
+
+ +
+
+
+ + +
+
+
+ + + + LOADING ... + +
{{error}}
+
+ + + + + + Name + + + + + + + + + Papulation + + + + + + + + + Male Papulation + + + + + + + + + Female Papulation + + + + + + + Action + + + + +{{user.name }} + + +{{user.papulation }} + + +{{user.male_papulation }} + + +{{user.female_papulation }} + + + + + + + +
Who Column
+
Account ID: {{user.accountId}}
+
Created At: {{user.createdAt| date}}
+
Created By: {{user.createdBy}}
+
Updated At: {{user.updatedAt | date}}
+
Updated By: {{user.updatedBy}}
+
+
+
+ + + + + + + + + + +
+ + + + Record per page + {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} + of {{pagination.totalItems}} Records + + +
+ +
+
+
+ +
Name{{user.name}}
+ + +
Papulation{{user.papulation}}
+ + +
Male Papulation{{user.male_papulation}}
+ + +
Female Papulation{{user.female_papulation}}
+ + +
+ +
+
+ + + + + + + + + + + + + + +