build_app

This commit is contained in:
risadmin_prod 2024-09-16 05:06:24 +00:00
parent 48813a1df0
commit 870c7ff716
11 changed files with 1458 additions and 0 deletions

View File

@ -69,6 +69,9 @@ public class BuilderService {
executeDump(true); executeDump(true);
// ADD OTHER SERVICE // ADD OTHER SERVICE
addCustomMenu( "Forma", "Transcations");
System.out.println("dashboard and menu inserted..."); System.out.println("dashboard and menu inserted...");

View File

@ -0,0 +1,106 @@
package com.realnet.basicp1.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.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.beans.factory.annotation.*;
import com.realnet.basicp1.Entity.Forma;
import com.realnet.basicp1.Services.FormaService ;
@RequestMapping(value = "/Forma")
@CrossOrigin("*")
@RestController
public class FormaController {
@Autowired
private FormaService Service;
@Value("${projectPath}")
private String projectPath;
@PostMapping("/Forma")
public Forma Savedata(@RequestBody Forma data) {
Forma save = Service.Savedata(data) ;
System.out.println("data saved..." + save);
return save;
}
@PutMapping("/Forma/{id}")
public Forma update(@RequestBody Forma data,@PathVariable Integer id ) {
Forma update = Service.update(data,id);
System.out.println("data update..." + update);
return update;
}
// get all with pagination
@GetMapping("/Forma/getall/page")
public Page<Forma> getall(@RequestParam(value = "page", required = false) Integer page,
@RequestParam(value = "size", required = false) Integer size) {
Pageable paging = PageRequest.of(page, size);
Page<Forma> get = Service.getAllWithPagination(paging);
return get;
}
@GetMapping("/Forma")
public List<Forma> getdetails() {
List<Forma> get = Service.getdetails();
return get;
}
// get all without authentication
@GetMapping("/token/Forma")
public List<Forma> getallwioutsec() {
List<Forma> get = Service.getdetails();
return get;
}
@GetMapping("/Forma/{id}")
public Forma getdetailsbyId(@PathVariable Integer id ) {
Forma get = Service.getdetailsbyId(id);
return get;
}
@DeleteMapping("/Forma/{id}")
public void delete_by_id(@PathVariable Integer id ) {
Service.delete_by_id(id);
}
}

View File

@ -0,0 +1,24 @@
package com.realnet.basicp1.Controllers;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.realnet.basicp1.Entity.Forma_ListFilter1;
import com.realnet.basicp1.Services.Forma_ListFilter1Service ;
@RequestMapping(value = "/Forma_ListFilter1")
@RestController
public class Forma_ListFilter1Controller {
@Autowired
private Forma_ListFilter1Service Service;
@GetMapping("/Forma_ListFilter1")
public List<Forma_ListFilter1> getlist() {
List<Forma_ListFilter1> get = Service.getlistbuilder();
return get;
}
@GetMapping("/Forma_ListFilter11")
public List<Forma_ListFilter1> getlistwithparam( ) {
List<Forma_ListFilter1> get = Service.getlistbuilderparam( );
return get;
}
}

View File

@ -0,0 +1,70 @@
package com.realnet.basicp1.Entity;
import lombok.*;
import com.realnet.WhoColumn.Extension;
import javax.persistence.*;
import java.time.LocalDateTime;
import java.util.*;
@Entity
@Data
public class Forma extends Extension {
/**
*
*/
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
private String names;
private String city;
private String gender;
private boolean a;
private boolean b;
private boolean c;
private String filetestname;
private String filetestpath ;
private String imagetestname;
private String imagetestpath ;
private String audiotestname;
private String audiotestpath ;
private String videotestname;
private String videotestpath ;
}

View File

@ -0,0 +1,14 @@
package com.realnet.basicp1.Entity;
import lombok.*;
import javax.persistence.*;
import java.time.LocalDateTime;
import java.util.*;
@Data
public class Forma_ListFilter1 {
private Integer id;
private String names;
}

View File

@ -0,0 +1,31 @@
package com.realnet.basicp1.Repository;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import java.util.*;
import com.realnet.basicp1.Entity.Forma;
@Repository
public interface FormaRepository extends JpaRepository<Forma, Integer> {
}

View File

@ -0,0 +1,130 @@
package com.realnet.basicp1.Services;
import com.realnet.basicp1.Repository.FormaRepository;
import com.realnet.basicp1.Entity.Forma;import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import com.realnet.SequenceGenerator.Service.SequenceService;
import com.realnet.Notification.Entity.NotificationService;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import com.realnet.users.service1.AppUserServiceImpl;
import com.realnet.users.entity1.AppUser;
import org.springframework.stereotype.Service;
@Service
public class FormaService {
@Autowired
private FormaRepository Repository;
@Autowired
private AppUserServiceImpl userService;
public Forma Savedata(Forma data) {
Forma save = Repository.save(data);
return save;
}
// get all with pagination
public Page<Forma> getAllWithPagination(Pageable page) {
return Repository.findAll(page);
}
public List<Forma> getdetails() {
return (List<Forma>) Repository.findAll();
}
public Forma getdetailsbyId(Integer id) {
return Repository.findById(id).get();
}
public void delete_by_id(Integer id) {
Repository.deleteById(id);
}
public Forma update(Forma data,Integer id) {
Forma old = Repository.findById(id).get();
old.setNames(data.getNames());
old.setCity(data.getCity());
old.setGender(data.getGender());
old.setA(data.isA());
old.setB(data.isB());
old.setC(data.isC());
final Forma test = Repository.save(old);
return test;}
public AppUser getUser() {
AppUser user = userService.getLoggedInUser();
return user;
}}

View File

@ -0,0 +1,47 @@
package com.realnet.basicp1.Services;
import java.util.*;
import com.realnet.basicp1.Repository.FormaRepository;
import com.realnet.basicp1.Entity.Forma;
import com.realnet.basicp1.Entity.Forma_ListFilter1;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class Forma_ListFilter1Service {
@Autowired
private FormaRepository Repository;
public List<Forma_ListFilter1> getlistbuilder() {
List<Forma> list= Repository.findAll();
ArrayList<Forma_ListFilter1> l = new ArrayList<>();
for (Forma data : list) {
{
Forma_ListFilter1 dummy = new Forma_ListFilter1();
dummy.setId(data.getId());
dummy.setNames(data.getNames());
l.add(dummy);
}
}
return l;}
public List<Forma_ListFilter1> getlistbuilderparam( ) {
List<Forma> list= Repository.findAll();
ArrayList<Forma_ListFilter1> l = new ArrayList<>();
for (Forma data : list) {
{
Forma_ListFilter1 dummy = new Forma_ListFilter1();
dummy.setId(data.getId());
dummy.setNames(data.getNames());
l.add(dummy);
}
}
return l;}
}

View File

@ -0,0 +1,2 @@
CREATE TABLE db.Forma(id BIGINT NOT NULL AUTO_INCREMENT, checkbss VARCHAR(400), names VARCHAR(400), gender VARCHAR(400), city VARCHAR(400), Imagetest VARCHAR(400), videotest VARCHAR(400), audiotest VARCHAR(400), Filetest VARCHAR(400), PRIMARY KEY (id));

View File

@ -1,3 +1,5 @@
import Forma from "./Components/BuilderComponents/basicp1/Forma/Forma";
import Stt from "./Components/BuilderComponents/feedback_formn/Stt/Stt"; import Stt from "./Components/BuilderComponents/feedback_formn/Stt/Stt";
import React from "react"; import React from "react";
@ -44,6 +46,9 @@ function App() {
<Route path="/Extension" element={<Extension/>} /> <Route path="/Extension" element={<Extension/>} />
{/* buildercomponents */} {/* buildercomponents */}
<Route path="/Forma" element={<Forma />} />
<Route path="/Stt" element={<Stt />} /> <Route path="/Stt" element={<Stt />} />
<Route path="/setup" element={<SetupView />} /> <Route path="/setup" element={<SetupView />} />