commit af8edee8b18fdd4e06105a6ba1c548e1a9093c21 Author: Azmat-7860 Date: Thu Oct 22 23:53:50 2026 +0530 adding base Project diff --git a/backend/.classpath b/backend/.classpath new file mode 100644 index 0000000..e16ec96 --- /dev/null +++ b/backend/.classpath @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/backend/.factorypath b/backend/.factorypath new file mode 100644 index 0000000..5602677 --- /dev/null +++ b/backend/.factorypath @@ -0,0 +1,307 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/backend/.project b/backend/.project new file mode 100644 index 0000000..b02cd1e --- /dev/null +++ b/backend/.project @@ -0,0 +1,28 @@ + + + app + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.springframework.ide.eclipse.boot.validation.springbootbuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/backend/.settings/org.eclipse.core.resources.prefs b/backend/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..abdea9a --- /dev/null +++ b/backend/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,4 @@ +eclipse.preferences.version=1 +encoding//src/main/java=UTF-8 +encoding//src/main/resources=UTF-8 +encoding/=UTF-8 diff --git a/backend/.settings/org.eclipse.jdt.apt.core.prefs b/backend/.settings/org.eclipse.jdt.apt.core.prefs new file mode 100644 index 0000000..dfa4f3a --- /dev/null +++ b/backend/.settings/org.eclipse.jdt.apt.core.prefs @@ -0,0 +1,4 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.apt.aptEnabled=true +org.eclipse.jdt.apt.genSrcDir=target/generated-sources/annotations +org.eclipse.jdt.apt.genTestSrcDir=target/generated-test-sources/test-annotations diff --git a/backend/.settings/org.eclipse.jdt.core.prefs b/backend/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..90b69d4 --- /dev/null +++ b/backend/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,10 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.methodParameters=generate +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore +org.eclipse.jdt.core.compiler.processAnnotations=enabled +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/backend/.settings/org.eclipse.m2e.core.prefs b/backend/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/backend/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/backend/.settings/org.springframework.ide.eclipse.prefs b/backend/.settings/org.springframework.ide.eclipse.prefs new file mode 100644 index 0000000..a12794d --- /dev/null +++ b/backend/.settings/org.springframework.ide.eclipse.prefs @@ -0,0 +1,2 @@ +boot.validation.initialized=true +eclipse.preferences.version=1 diff --git a/backend/.swagger-codegen-ignore b/backend/.swagger-codegen-ignore new file mode 100644 index 0000000..19d3377 --- /dev/null +++ b/backend/.swagger-codegen-ignore @@ -0,0 +1,23 @@ +# Swagger Codegen Ignore +# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# Thsi matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/backend/BaseProject/aa/Connector/Controller/ConnectorController.java b/backend/BaseProject/aa/Connector/Controller/ConnectorController.java new file mode 100644 index 0000000..9f04c2b --- /dev/null +++ b/backend/BaseProject/aa/Connector/Controller/ConnectorController.java @@ -0,0 +1,79 @@ +package com.realnet.Connector.Controller; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.Connector.Entity.Connector; +import com.realnet.Connector.Repository.Connectorrepository; +import com.realnet.users.entity.Sys_Accounts; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; + +@RestController +@RequestMapping("/connector") +public class ConnectorController { + + @Autowired + private Connectorrepository connectorrepository; + @Autowired + private AppUserServiceImpl userService; + + + //ADD DATA + @PostMapping("/Connectorjson") + public ResponseEntity save(@RequestBody Connector connector) { + AppUser loggedInUser = userService.getLoggedInUser(); + Long account_id = loggedInUser.getAccount().getAccount_id(); + connector.setAccountId(account_id); + Connector save = connectorrepository.save(connector); + return new ResponseEntity<>(save, HttpStatus.OK); + + } + + //UPDATE BY ID + @PutMapping("/Connectorjson/{id}") + public ResponseEntity update(@PathVariable Long id, @RequestBody Connector connector) { + Connector con = connectorrepository.findById(id).orElseThrow(null); + con.setName(connector.getName()); + con.setConnector_json(connector.getConnector_json()); + + Connector save = connectorrepository.save(con); + return new ResponseEntity<>(save, HttpStatus.OK); + + } + + //GET ALL + @GetMapping("/Connectorjson") + public ResponseEntity getall() { + List save = connectorrepository.findAll(); + return new ResponseEntity<>(save, HttpStatus.OK); + + } + + //GET BY ID + @GetMapping("/Connectorjson/{id}") + public ResponseEntity getbyid(@PathVariable Long id) { + Connector con = connectorrepository.findById(id).orElseThrow(null); + return new ResponseEntity<>(con, HttpStatus.OK); + + } + + //DELETE BY ID + @DeleteMapping("/Connectorjson/{id}") + public void delete(@PathVariable Long id){ + Connector con = connectorrepository.findById(id).orElseThrow(null); + connectorrepository.delete(con); + + } +} diff --git a/backend/BaseProject/aa/Connector/Controller/MappingController.java b/backend/BaseProject/aa/Connector/Controller/MappingController.java new file mode 100644 index 0000000..aec54be --- /dev/null +++ b/backend/BaseProject/aa/Connector/Controller/MappingController.java @@ -0,0 +1,81 @@ +package com.realnet.Connector.Controller; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; +import com.realnet.Connector.Entity.Connector; +import com.realnet.Connector.Entity.Mapping; +import com.realnet.Connector.Repository.Connectorrepository; + +@RestController +@RequestMapping("/token/connector/mapping") +public class MappingController { + + @Autowired + private Connectorrepository connectorrepository; + + @PostMapping("/mapping") + public Object connector(@RequestBody Mapping mapping) { + List list = new ArrayList<>(); + +// Map param = new HashMap(); + String str =mapping.getMappingString(); + JsonParser parser = new JsonParser(); + JsonElement element = parser.parse(str); + JsonObject obj = element.getAsJsonObject(); + + //get key from get api + Set> entries = obj.entrySet(); + for (Map.Entry entry : entries) { + + String key = entry.getKey(); + String string = key.toString(); + list.add(string); + } + return list; + +} + @PostMapping("/mapping1") + public Object connector1(@RequestBody Mapping mapping) { + List list = new ArrayList<>(); + +// Map param = new HashMap(); + String str =mapping.getMappingString(); + JsonParser parser = new JsonParser(); + JsonElement element = parser.parse(str); + JsonObject obj = element.getAsJsonObject(); + + //get values from get api + Set> entries = obj.entrySet(); + for (Map.Entry entry : entries) { + + String string2 = entry.getValue().getAsString(); + list.add(string2); + } + return list; + +} + //get api for call connector by name for job(by gk) + @GetMapping("/connectorname/{name}") + public ResponseEntity getconnector(@PathVariable String name) { + Connector save = connectorrepository.findconnectorbyname(name); + return new ResponseEntity<>(save, HttpStatus.OK); + + } + +} diff --git a/backend/BaseProject/aa/Connector/Entity/Connector.java b/backend/BaseProject/aa/Connector/Entity/Connector.java new file mode 100644 index 0000000..8de5289 --- /dev/null +++ b/backend/BaseProject/aa/Connector/Entity/Connector.java @@ -0,0 +1,33 @@ +package com.realnet.Connector.Entity; + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Lob; +import javax.persistence.Column; + +import com.realnet.Dashboard1.Entity.dashbord_Who_collumn; + +import lombok.Data; + +@Entity +@Data +public class Connector extends dashbord_Who_collumn { + + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private String name; + @Column(length = 15000) + private String get_str; + @Lob + private String connector_json; + +} diff --git a/backend/BaseProject/aa/Connector/Entity/Mapping.java b/backend/BaseProject/aa/Connector/Entity/Mapping.java new file mode 100644 index 0000000..0e23d56 --- /dev/null +++ b/backend/BaseProject/aa/Connector/Entity/Mapping.java @@ -0,0 +1,9 @@ +package com.realnet.Connector.Entity; + +import lombok.Data; + +@Data +public class Mapping { + + private String mappingString; +} diff --git a/backend/BaseProject/aa/Connector/Repository/Connectorrepository.java b/backend/BaseProject/aa/Connector/Repository/Connectorrepository.java new file mode 100644 index 0000000..1d83c69 --- /dev/null +++ b/backend/BaseProject/aa/Connector/Repository/Connectorrepository.java @@ -0,0 +1,15 @@ +package com.realnet.Connector.Repository; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.stereotype.Repository; + +import com.realnet.Connector.Entity.Connector; +@Repository +public interface Connectorrepository extends JpaRepository{ + + + @Query(value = "select * from connector where name=?1", nativeQuery = true) + Connector findconnectorbyname(String name); + +} diff --git a/backend/BaseProject/aha/html-css-simply-recipes-main/final/404.html b/backend/BaseProject/aha/html-css-simply-recipes-main/final/404.html new file mode 100644 index 0000000..14f0af7 --- /dev/null +++ b/backend/BaseProject/aha/html-css-simply-recipes-main/final/404.html @@ -0,0 +1,61 @@ + + + + + + + Error || Final + + + + + + + + + + + + + +
+
+

404

+

page not found

+
+
+ + + + + diff --git a/backend/BaseProject/aha/html-css-simply-recipes-main/final/about.html b/backend/BaseProject/aha/html-css-simply-recipes-main/final/about.html new file mode 100644 index 0000000..2e5af22 --- /dev/null +++ b/backend/BaseProject/aha/html-css-simply-recipes-main/final/about.html @@ -0,0 +1,115 @@ + + + + + + + About || Final + + + + + + + + + + + + + +
+
+
+

I'm baby coloring book poke taxidermy

+

+ Taxidermy forage glossier letterpress heirloom before they sold out + you probably haven't heard of them banh mi biodiesel chia. +

+

+ Taiyaki tumblr flexitarian jean shorts brunch, aesthetic salvia + retro. +

+ contact +
+ + Person Pouring Salt in Bowl +
+ +
+ + + + + diff --git a/backend/BaseProject/aha/html-css-simply-recipes-main/final/assets/about.jpeg b/backend/BaseProject/aha/html-css-simply-recipes-main/final/assets/about.jpeg new file mode 100644 index 0000000..6539080 Binary files /dev/null and b/backend/BaseProject/aha/html-css-simply-recipes-main/final/assets/about.jpeg differ diff --git a/backend/BaseProject/aha/html-css-simply-recipes-main/final/assets/favicon.ico b/backend/BaseProject/aha/html-css-simply-recipes-main/final/assets/favicon.ico new file mode 100644 index 0000000..b8fecd8 Binary files /dev/null and b/backend/BaseProject/aha/html-css-simply-recipes-main/final/assets/favicon.ico differ diff --git a/backend/BaseProject/aha/html-css-simply-recipes-main/final/assets/logo.svg b/backend/BaseProject/aha/html-css-simply-recipes-main/final/assets/logo.svg new file mode 100644 index 0000000..3daa6a4 --- /dev/null +++ b/backend/BaseProject/aha/html-css-simply-recipes-main/final/assets/logo.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/backend/BaseProject/aha/html-css-simply-recipes-main/final/assets/main.jpeg b/backend/BaseProject/aha/html-css-simply-recipes-main/final/assets/main.jpeg new file mode 100644 index 0000000..4420530 Binary files /dev/null and b/backend/BaseProject/aha/html-css-simply-recipes-main/final/assets/main.jpeg differ diff --git a/backend/BaseProject/aha/html-css-simply-recipes-main/final/assets/recipes/recipe-1.jpeg b/backend/BaseProject/aha/html-css-simply-recipes-main/final/assets/recipes/recipe-1.jpeg new file mode 100644 index 0000000..85b4ab6 Binary files /dev/null and b/backend/BaseProject/aha/html-css-simply-recipes-main/final/assets/recipes/recipe-1.jpeg differ diff --git a/backend/BaseProject/aha/html-css-simply-recipes-main/final/assets/recipes/recipe-2.jpeg b/backend/BaseProject/aha/html-css-simply-recipes-main/final/assets/recipes/recipe-2.jpeg new file mode 100644 index 0000000..2a5109e Binary files /dev/null and b/backend/BaseProject/aha/html-css-simply-recipes-main/final/assets/recipes/recipe-2.jpeg differ diff --git a/backend/BaseProject/aha/html-css-simply-recipes-main/final/assets/recipes/recipe-3.jpeg b/backend/BaseProject/aha/html-css-simply-recipes-main/final/assets/recipes/recipe-3.jpeg new file mode 100644 index 0000000..02f0bee Binary files /dev/null and b/backend/BaseProject/aha/html-css-simply-recipes-main/final/assets/recipes/recipe-3.jpeg differ diff --git a/backend/BaseProject/aha/html-css-simply-recipes-main/final/assets/recipes/recipe-4.jpeg b/backend/BaseProject/aha/html-css-simply-recipes-main/final/assets/recipes/recipe-4.jpeg new file mode 100644 index 0000000..63c2bb7 Binary files /dev/null and b/backend/BaseProject/aha/html-css-simply-recipes-main/final/assets/recipes/recipe-4.jpeg differ diff --git a/backend/BaseProject/aha/html-css-simply-recipes-main/final/contact.html b/backend/BaseProject/aha/html-css-simply-recipes-main/final/contact.html new file mode 100644 index 0000000..b396f23 --- /dev/null +++ b/backend/BaseProject/aha/html-css-simply-recipes-main/final/contact.html @@ -0,0 +1,129 @@ + + + + + + + Contact || Final + + + + + + + + + + + + + +
+
+
+

Want To Get In Touch?

+

+ Four dollar toast biodiesel plaid salvia actually pickled banjo + bespoke mlkshk intelligentsia edison bulb synth. +

+

Cardigan prism bicycle rights put a bird on it deep v.

+

+ Hashtag swag health goth air plant, raclette listicle fingerstache + cold-pressed fanny pack bicycle rights cardigan poke. +

+
+
+
+
+ + +
+
+ + +
+
+ + +
+ +
+
+
+ + +
+ + + + + diff --git a/backend/BaseProject/aha/html-css-simply-recipes-main/final/css/main.css b/backend/BaseProject/aha/html-css-simply-recipes-main/final/css/main.css new file mode 100644 index 0000000..e7f936c --- /dev/null +++ b/backend/BaseProject/aha/html-css-simply-recipes-main/final/css/main.css @@ -0,0 +1,746 @@ +*, +::after, +::before { + box-sizing: border-box; +} +/* fonts */ + +@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600&family=Montserrat&display=swap'); +html { + font-size: 100%; +} /*16px*/ + +:root { + /* colors */ + --primary-100: #e2e0ff; + --primary-200: #c1beff; + --primary-300: #a29dff; + --primary-400: #837dff; + --primary-500: #645cff; + --primary-600: #504acc; + --primary-700: #3c3799; + --primary-800: #282566; + --primary-900: #141233; + + /* grey */ + --grey-50: #f8fafc; + --grey-100: #f1f5f9; + --grey-200: #e2e8f0; + --grey-300: #cbd5e1; + --grey-400: #94a3b8; + --grey-500: #64748b; + --grey-600: #475569; + --grey-700: #334155; + --grey-800: #1e293b; + --grey-900: #0f172a; + /* rest of the colors */ + --black: #222; + --white: #fff; + --red-light: #f8d7da; + --red-dark: #842029; + --green-light: #d1e7dd; + --green-dark: #0f5132; + + /* fonts */ + --headingFont: 'Roboto', sans-serif; + --bodyFont: 'Nunito', sans-serif; + --smallText: 0.7em; + /* rest of the vars */ + --backgroundColor: var(--grey-50); + --textColor: var(--grey-900); + --borderRadius: 0.25rem; + --letterSpacing: 1px; + --transition: 0.3s ease-in-out all; + --max-width: 1120px; + --fixed-width: 600px; + + /* box shadow*/ + --shadow-1: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); + --shadow-2: 0 4px 6px -1px rgba(0, 0, 0, 0.1), + 0 2px 4px -1px rgba(0, 0, 0, 0.06); + --shadow-3: 0 10px 15px -3px rgba(0, 0, 0, 0.1), + 0 4px 6px -2px rgba(0, 0, 0, 0.05); + --shadow-4: 0 20px 25px -5px rgba(0, 0, 0, 0.1), + 0 10px 10px -5px rgba(0, 0, 0, 0.04); +} + +body { + background: var(--backgroundColor); + font-family: var(--bodyFont); + font-weight: 400; + line-height: 1.75; + color: var(--textColor); +} + +p { + margin-top: 0; + margin-bottom: 1.5rem; + max-width: 40em; +} + +h1, +h2, +h3, +h4, +h5 { + margin: 0; + margin-bottom: 1.38rem; + font-family: var(--headingFont); + font-weight: 400; + line-height: 1.3; + text-transform: capitalize; + letter-spacing: var(--letterSpacing); +} + +h1 { + margin-top: 0; + font-size: 3.052rem; +} + +h2 { + font-size: 2.441rem; +} + +h3 { + font-size: 1.953rem; +} + +h4 { + font-size: 1.563rem; +} + +h5 { + font-size: 1.25rem; +} + +small, +.text-small { + font-size: var(--smallText); +} + +a { + text-decoration: none; +} +ul { + list-style-type: none; + padding: 0; +} + +.img { + width: 100%; + display: block; + object-fit: cover; +} +/* buttons */ + +.btn { + cursor: pointer; + color: var(--white); + background: var(--primary-500); + border: transparent; + border-radius: var(--borderRadius); + letter-spacing: var(--letterSpacing); + padding: 0.375rem 0.75rem; + box-shadow: var(--shadow-1); + transition: var(--transtion); + text-transform: capitalize; + display: inline-block; +} +.btn:hover { + background: var(--primary-700); + box-shadow: var(--shadow-3); +} +.btn-hipster { + color: var(--primary-500); + background: var(--primary-200); +} +.btn-hipster:hover { + color: var(--primary-200); + background: var(--primary-700); +} +.btn-block { + width: 100%; +} + +/* alerts */ +.alert { + padding: 0.375rem 0.75rem; + margin-bottom: 1rem; + border-color: transparent; + border-radius: var(--borderRadius); +} + +.alert-danger { + color: var(--red-dark); + background: var(--red-light); +} +.alert-success { + color: var(--green-dark); + background: var(--green-light); +} +/* form */ + +.form { + width: 90vw; + max-width: var(--fixed-width); + background: var(--white); + border-radius: var(--borderRadius); + box-shadow: var(--shadow-2); + padding: 2rem 2.5rem; + margin: 3rem auto; +} +.form-label { + display: block; + font-size: var(--smallText); + margin-bottom: 0.5rem; + text-transform: capitalize; + letter-spacing: var(--letterSpacing); +} +.form-input, +.form-textarea { + width: 100%; + padding: 0.375rem 0.75rem; + border-radius: var(--borderRadius); + background: var(--backgroundColor); + border: 1px solid var(--grey-200); +} + +.form-row { + margin-bottom: 1rem; +} + +.form-textarea { + height: 7rem; +} +::placeholder { + font-family: inherit; + color: var(--grey-400); +} +.form-alert { + color: var(--red-dark); + letter-spacing: var(--letterSpacing); + text-transform: capitalize; +} +/* alert */ + +@keyframes spinner { + to { + transform: rotate(360deg); + } +} + +.loading { + width: 6rem; + height: 6rem; + border: 5px solid var(--grey-400); + border-radius: 50%; + border-top-color: var(--primary-500); + animation: spinner 0.6s linear infinite; +} +.loading { + margin: 0 auto; +} +/* title */ + +.title { + text-align: center; +} + +.title-underline { + background: var(--primary-500); + width: 7rem; + height: 0.25rem; + margin: 0 auto; + margin-top: -1rem; +} + +/* +=============== +Navbar +=============== +*/ + +.navbar { + display: flex; + align-items: center; + justify-content: center; +} +.nav-center { + width: 90vw; + max-width: var(--max-width); +} +.nav-header { + height: 6rem; + display: flex; + justify-content: space-between; + align-items: center; +} +.nav-header img { + width: 200px; +} +.nav-logo { + display: flex; + align-items: flex-end; +} + +.nav-btn { + padding: 0.15rem 0.75rem; +} +.nav-btn i { + font-size: 1.25rem; +} +.nav-links { + height: 0; + overflow: hidden; + display: flex; + flex-direction: column; + transition: var(--transition); +} +.show-links { + height: 23.9375rem; +} + +.nav-link { + display: block; + text-align: center; + font-size: 1.25rem; + text-transform: capitalize; + color: var(--grey-900); + letter-spacing: var(--letterSpacing); + padding: 1rem 0; + border-top: 1px solid var(--grey-500); + transition: var(--transition); +} +.nav-link:hover { + color: var(--primary-500); +} + +.contact-link a { + padding: 0.15rem 1rem; +} + +@media screen and (min-width: 992px) { + .navbar { + height: 6rem; + } + .nav-center { + display: flex; + align-items: center; + } + .nav-header { + padding: 0; + margin-right: 2rem; + height: auto; + } + + .nav-btn { + display: none; + } + .nav-links { + height: auto !important; + flex-direction: row; + align-items: center; + width: 100%; + } + .nav-link { + padding: 0; + border-top: none; + margin-right: 1rem; + font-size: 1rem; + } + .contact-link { + margin-right: 0; + margin-left: auto; + } +} +/* +=============== +Page +=============== +*/ + +.page { + width: 90vw; + max-width: var(--max-width); + margin: 0 auto; +} +.page { + padding-top: 2rem; + min-height: calc(100vh - (6rem + 4rem)); +} +/* +=============== +Footer +=============== +*/ + +.page-footer { + text-align: center; + height: 4rem; + display: flex; + align-items: center; + justify-content: center; + background: var(--black); + color: var(--white); +} +.page-footer h5 { + margin-top: 0; + margin-bottom: 0; +} +.page-footer p { + margin-bottom: 0; +} +.page-footer .footer-logo, +.page-footer a { + color: var(--primary-500); +} +/* +=============== +Hero +=============== +*/ + +.hero { + height: 40vh; + position: relative; + margin-bottom: 2rem; + background: url('../assets/main.jpeg') center/cover no-repeat; + border-radius: var(--borderRadius); +} +.hero-container { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + display: flex; + align-items: center; + justify-content: center; + background: rgba(0, 0, 0, 0.4); + border-radius: var(--borderRadius); +} +.hero-text { + color: var(--white); + text-align: center; +} + +@media only screen and (min-width: 768px) { + .hero-text h1 { + font-size: 4rem; + margin-bottom: 0; + } +} + +/* +=============== +Recipes +=============== +*/ + +.recipes-container { + display: grid; + gap: 2rem 1rem; +} + +.recipes-list { + display: grid; + gap: 2rem 1rem; + padding-bottom: 3rem; +} +.tags-container { + order: 1; + display: flex; + flex-direction: column; + padding-bottom: 3rem; + /* background: blue; */ +} +.tags-container h4 { + margin-bottom: 0.5rem; + font-weight: 500; +} +.tags-list { + display: grid; + grid-template-columns: 1fr 1fr 1fr; +} +.tags-list a { + text-transform: capitalize; + display: block; + color: var(--grey-500); + transition: var(--transition); +} +.tags-list a:hover { + color: var(--primary-500); +} +.recipe { + display: block; +} +.recipe-img { + height: 15rem; + border-radius: var(--borderRadius); + margin-bottom: 1rem; +} +.recipe h5 { + margin-bottom: 0; + margin-top: 0.25rem; + line-height: 1; + color: var(--grey-700); +} +.recipe p { + margin-bottom: 0; + line-height: 1; + color: var(--grey-500); + margin-top: 0.5rem; + letter-spacing: var(--letterSpacing); +} +@media screen and (min-width: 576px) { + .recipes-list { + grid-template-columns: 1fr 1fr; + } + .recipe-img { + height: 10rem; + } +} + +@media screen and (min-width: 992px) { + .recipes-container { + grid-template-columns: 200px 1fr; + gap: 1rem; + } + .recipes-list { + grid-template-columns: 1fr 1fr; + } + + .recipe p { + font-size: 0.85rem; + } + .tags-container { + order: 0; + /* background: blue; */ + } + .tags-list { + display: grid; + grid-template-columns: 1fr; + } +} + +@media screen and (min-width: 1200px) { + .recipe h5 { + font-size: 1.15rem; + } + .recipes-list { + grid-template-columns: 1fr 1fr 1fr; + } +} +/* +=============== +Error +=============== +*/ +.error-page { + text-align: center; + padding-top: 5rem; +} +.error-page h1 { + font-size: 9rem; +} +/* +=============== +About Page +=============== +*/ + +.about-page h2 { + text-transform: none; + font-weight: bold; +} +.about-page { + display: grid; + gap: 2rem 4rem; + padding-bottom: 3rem; +} +.about-img { + border-radius: var(--borderRadius); + height: 300px; +} + +@media screen and (min-width: 992px) { + .about-page { + grid-template-columns: 1fr 1fr; + grid-template-rows: 400px; + align-items: center; + } + .about-img { + height: 100%; + } +} + +.featured-title { + text-align: center; +} +/* +=============== +Contact Page +=============== +*/ +.contact-form { + width: 100%; + margin: 0; +} +.contact-container { + display: grid; + gap: 2rem 3rem; + padding-bottom: 3rem; +} +@media screen and (min-width: 992px) { + .contact-container { + grid-template-columns: 1fr 450px; + align-items: center; + } +} + +/* +=============== +Tags Page +=============== +*/ + +.tags-wrapper { + display: grid; + gap: 2rem; + padding-bottom: 3rem; +} +.tag { + background: var(--grey-500); + border-radius: var(--borderRadius); + text-align: center; + color: var(--white); + transition: var(--transition); + padding: 0.75rem 0; +} +.tag:hover { + background: var(--primary-500); +} +.tag h5, +.tag p { + margin-bottom: 0; +} +.tag h5 { + font-weight: 600; +} +@media screen and (min-width: 576px) { + .tags-wrapper { + grid-template-columns: 1fr 1fr; + } +} +@media screen and (min-width: 992px) { + .tags-wrapper { + grid-template-columns: 1fr 1fr 1fr; + } +} + +/* +=============== +Recipe Template +=============== +*/ + +.recipe-hero { + display: grid; + gap: 3rem; +} + +.recipe-hero-img { + height: 300px; + border-radius: var(--borderRadius); +} +.recipe-info p { + color: var(--grey-600); +} +.recipe-icons { + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 1rem; + margin: 2rem 0; + text-align: center; +} +.recipe-icons i { + font-size: 1.5rem; + color: var(--primary-500); +} +.recipe-icons h5, +.recipe-icons p { + margin-bottom: 0; + font-size: 0.85em; +} + +.recipe-icons p { + color: var(--grey-600); +} +.recipe-tags { + display: flex; + align-items: center; + flex-wrap: wrap; + font-size: 0.7em; + font-weight: 600; +} +.recipe-tags a { + background: var(--primary-500); + border-radius: var(--borderRadius); + color: var(--white); + padding: 0.05rem 0.5rem; + margin: 0 0.25rem; + text-transform: capitalize; +} +@media screen and (min-width: 992px) { + .recipe-hero { + grid-template-columns: 4fr 5fr; + align-items: center; + } +} +.recipe-content { + padding: 3rem 0; + display: grid; + gap: 2rem 5rem; +} +@media screen and (min-width: 992px) { + .recipe-content { + grid-template-columns: 2fr 1fr; + } +} +.single-instruction header { + display: grid; + grid-template-columns: auto 1fr; + gap: 1.5rem; + align-items: center; +} +.single-instruction header p { + text-transform: uppercase; + font-weight: 600; + color: var(--primary-500); + margin-bottom: 0; +} +.single-instruction > p { + color: var(--grey-700); +} + +.single-instruction header div { + height: 2px; + background: var(--grey-300); +} + +.second-column { + display: grid; + row-gap: 2rem; +} + +.single-ingredient { + border-bottom: 2px solid var(--grey-300); + padding-bottom: 0.75rem; + color: var(--grey-700); +} +.single-tool { + border-bottom: 2px solid var(--grey-300); + padding-bottom: 0.75rem; + color: var(--primary-500); + text-transform: capitalize; +} diff --git a/backend/BaseProject/aha/html-css-simply-recipes-main/final/css/normalize.css b/backend/BaseProject/aha/html-css-simply-recipes-main/final/css/normalize.css new file mode 100644 index 0000000..2768db4 --- /dev/null +++ b/backend/BaseProject/aha/html-css-simply-recipes-main/final/css/normalize.css @@ -0,0 +1,351 @@ +/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ + +/* Document + ========================================================================== */ + +/** + * 1. Correct the line height in all browsers. + * 2. Prevent adjustments of font size after orientation changes in iOS. + */ + +html { + line-height: 1.15; /* 1 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} + +/* Sections + ========================================================================== */ + +/** + * Remove the margin in all browsers. + */ + +body { + margin: 0; +} + +/** + * Render the `main` element consistently in IE. + */ + +main { + display: block; +} + +/** + * Correct the font size and margin on `h1` elements within `section` and + * `article` contexts in Chrome, Firefox, and Safari. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +/* Grouping content + ========================================================================== */ + +/** + * 1. Add the correct box sizing in Firefox. + * 2. Show the overflow in Edge and IE. + */ + +hr { + box-sizing: content-box; /* 1 */ + height: 0; /* 1 */ + overflow: visible; /* 2 */ +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +pre { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/* Text-level semantics + ========================================================================== */ + +/** + * Remove the gray background on active links in IE 10. + */ + +a { + background-color: transparent; +} + +/** + * 1. Remove the bottom border in Chrome 57- + * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. + */ + +abbr[title] { + border-bottom: none; /* 1 */ + text-decoration: underline; /* 2 */ + text-decoration: underline dotted; /* 2 */ +} + +/** + * Add the correct font weight in Chrome, Edge, and Safari. + */ + +b, +strong { + font-weight: bolder; +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +code, +kbd, +samp { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/** + * Add the correct font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` elements from affecting the line height in + * all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sub { + bottom: -0.25em; +} + +sup { + top: -0.5em; +} + +/* Embedded content + ========================================================================== */ + +/** + * Remove the border on images inside links in IE 10. + */ + +img { + border-style: none; +} + +/* Forms + ========================================================================== */ + +/** + * 1. Change the font styles in all browsers. + * 2. Remove the margin in Firefox and Safari. + */ + +button, +input, +optgroup, +select, +textarea { + font-family: inherit; /* 1 */ + font-size: 100%; /* 1 */ + line-height: 1.15; /* 1 */ + margin: 0; /* 2 */ +} + +/** + * Show the overflow in IE. + * 1. Show the overflow in Edge. + */ + +button, +input { + /* 1 */ + overflow: visible; +} + +/** + * Remove the inheritance of text transform in Edge, Firefox, and IE. + * 1. Remove the inheritance of text transform in Firefox. + */ + +button, +select { + /* 1 */ + text-transform: none; +} + +/** + * Correct the inability to style clickable types in iOS and Safari. + */ + +button, +[type='button'], +[type='reset'], +[type='submit'] { + -webkit-appearance: button; +} + +/** + * Remove the inner border and padding in Firefox. + */ + +button::-moz-focus-inner, +[type='button']::-moz-focus-inner, +[type='reset']::-moz-focus-inner, +[type='submit']::-moz-focus-inner { + border-style: none; + padding: 0; +} + +/** + * Restore the focus styles unset by the previous rule. + */ + +button:-moz-focusring, +[type='button']:-moz-focusring, +[type='reset']:-moz-focusring, +[type='submit']:-moz-focusring { + outline: 1px dotted ButtonText; +} + +/** + * Correct the padding in Firefox. + */ + +fieldset { + padding: 0.35em 0.75em 0.625em; +} + +/** + * 1. Correct the text wrapping in Edge and IE. + * 2. Correct the color inheritance from `fieldset` elements in IE. + * 3. Remove the padding so developers are not caught out when they zero out + * `fieldset` elements in all browsers. + */ + +legend { + box-sizing: border-box; /* 1 */ + color: inherit; /* 2 */ + display: table; /* 1 */ + max-width: 100%; /* 1 */ + padding: 0; /* 3 */ + white-space: normal; /* 1 */ +} + +/** + * Add the correct vertical alignment in Chrome, Firefox, and Opera. + */ + +progress { + vertical-align: baseline; +} + +/** + * Remove the default vertical scrollbar in IE 10+. + */ + +textarea { + overflow: auto; +} + +/** + * 1. Add the correct box sizing in IE 10. + * 2. Remove the padding in IE 10. + */ + +[type='checkbox'], +[type='radio'] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Correct the cursor style of increment and decrement buttons in Chrome. + */ + +[type='number']::-webkit-inner-spin-button, +[type='number']::-webkit-outer-spin-button { + height: auto; +} + +/** + * 1. Correct the odd appearance in Chrome and Safari. + * 2. Correct the outline style in Safari. + */ + +[type='search'] { + -webkit-appearance: textfield; /* 1 */ + outline-offset: -2px; /* 2 */ +} + +/** + * Remove the inner padding in Chrome and Safari on macOS. + */ + +[type='search']::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * 1. Correct the inability to style clickable types in iOS and Safari. + * 2. Change font properties to `inherit` in Safari. + */ + +::-webkit-file-upload-button { + -webkit-appearance: button; /* 1 */ + font: inherit; /* 2 */ +} + +/* Interactive + ========================================================================== */ + +/* + * Add the correct display in Edge, IE 10+, and Firefox. + */ + +details { + display: block; +} + +/* + * Add the correct display in all browsers. + */ + +summary { + display: list-item; +} + +/* Misc + ========================================================================== */ + +/** + * Add the correct display in IE 10+. + */ + +template { + display: none; +} + +/** + * Add the correct display in IE 10. + */ + +[hidden] { + display: none; +} diff --git a/backend/BaseProject/aha/html-css-simply-recipes-main/final/index.html b/backend/BaseProject/aha/html-css-simply-recipes-main/final/index.html new file mode 100644 index 0000000..1c90443 --- /dev/null +++ b/backend/BaseProject/aha/html-css-simply-recipes-main/final/index.html @@ -0,0 +1,130 @@ + + + + + + + Simply Recipes || Final + + + + + + + + + + + + + + +
+ +
+
+
+

simply recipes

+

no fluff, just recipes

+
+
+
+ +
+ +
+

recipes

+ +
+ + + + +
+
+ + + + + + diff --git a/backend/BaseProject/aha/html-css-simply-recipes-main/final/js/app.js b/backend/BaseProject/aha/html-css-simply-recipes-main/final/js/app.js new file mode 100644 index 0000000..d20828d --- /dev/null +++ b/backend/BaseProject/aha/html-css-simply-recipes-main/final/js/app.js @@ -0,0 +1,19 @@ +const getElement = (selector) => { + const element = document.querySelector(selector) + + if (element) return element + throw Error( + `Please double check your class names, there is no ${selector} class` + ) +} + +const links = getElement('.nav-links') +const navBtnDOM = getElement('.nav-btn') + +navBtnDOM.addEventListener('click', () => { + links.classList.toggle('show-links') +}) + +const date = getElement('#date') +const currentYear = new Date().getFullYear() +date.textContent = currentYear diff --git a/backend/BaseProject/aha/html-css-simply-recipes-main/final/recipes.html b/backend/BaseProject/aha/html-css-simply-recipes-main/final/recipes.html new file mode 100644 index 0000000..2b6f379 --- /dev/null +++ b/backend/BaseProject/aha/html-css-simply-recipes-main/final/recipes.html @@ -0,0 +1,119 @@ + + + + + + + Recipes || Final + + + + + + + + + + + + + + +
+
+ +
+

recipes

+ +
+ + + +
+
+ + + + + + diff --git a/backend/BaseProject/aha/html-css-simply-recipes-main/final/single-recipe.html b/backend/BaseProject/aha/html-css-simply-recipes-main/final/single-recipe.html new file mode 100644 index 0000000..32aa9e7 --- /dev/null +++ b/backend/BaseProject/aha/html-css-simply-recipes-main/final/single-recipe.html @@ -0,0 +1,159 @@ + + + + + + + Single Recipe || Final + + + + + + + + + + + + + +
+
+
+ +
+

Banana Pancakes

+

+ Shabby chic humblebrag banh mi bushwick, banjo kale chips + meggings. Cred selfies sartorial, cloud bread disrupt blue bottle + seitan. Dreamcatcher tousled bitters, health goth vegan venmo + whatever street art lyft shabby chic pitchfork beard. Drinking + vinegar poke tbh, iPhone coloring book polaroid truffaut tousled + ramps pug trust fund letterpress. Portland four loko austin + chicharrones bitters single-origin coffee. Leggings letterpress + occupy pour-over. +

+
+
+ +
prep time
+

30 min.

+
+
+ +
cook time
+

15 min.

+
+
+ +
serving
+

6 servings

+
+
+

+ Tags : beef + breakfast + pancakes + food +

+
+
+ +
+
+

instructions

+ +
+
+

step 1

+
+
+

+ I'm baby mustache man braid fingerstache small batch venmo + succulents shoreditch. +

+
+ + +
+
+

step 2

+
+
+

+ Pabst pitchfork you probably haven't heard of them, asymmetrical + seitan tousled succulents wolf banh mi man bun bespoke selfies + freegan ethical hexagon. +

+
+ + +
+
+

step 3

+
+
+

+ Polaroid iPhone bitters chambray. Cornhole swag kombucha + live-edge. +

+
+ +
+
+
+

ingredients

+

1 1/2 cups dry pancake mix

+

1/2 cup flax seed meal

+

1 cup skim milk

+
+
+

tools

+

Hand Blender

+

Large Heavy Pot With Lid

+

Measuring Spoons

+

Measuring Cups

+
+
+
+
+
+ + + + + diff --git a/backend/BaseProject/aha/html-css-simply-recipes-main/final/tag-template.html b/backend/BaseProject/aha/html-css-simply-recipes-main/final/tag-template.html new file mode 100644 index 0000000..c07ce44 --- /dev/null +++ b/backend/BaseProject/aha/html-css-simply-recipes-main/final/tag-template.html @@ -0,0 +1,109 @@ + + + + + + + Recipe Template || Final + + + + + + + + + + + + + +
+ + +
+ + + + + diff --git a/backend/BaseProject/aha/html-css-simply-recipes-main/final/tags.html b/backend/BaseProject/aha/html-css-simply-recipes-main/final/tags.html new file mode 100644 index 0000000..50caf75 --- /dev/null +++ b/backend/BaseProject/aha/html-css-simply-recipes-main/final/tags.html @@ -0,0 +1,89 @@ + + + + + + + Tags || Final + + + + + + + + + + + + + +
+
+ + +
beef
+

1 recipe

+
+ + + +
breakfast
+

2 recipe

+
+ + + +
carrots
+

3 recipe

+
+ + + +
dinner
+

4 recipe

+
+ + + +
food
+

1 recipe

+
+ +
+
+ + + + + diff --git a/backend/BaseProject/aha/html-css-simply-recipes-main/starter/404.html b/backend/BaseProject/aha/html-css-simply-recipes-main/starter/404.html new file mode 100644 index 0000000..e470aa0 --- /dev/null +++ b/backend/BaseProject/aha/html-css-simply-recipes-main/starter/404.html @@ -0,0 +1,24 @@ + + + + + + + Error || Starter + + + + + + + + + + +

Error Page

+ + + diff --git a/backend/BaseProject/aha/html-css-simply-recipes-main/starter/about.html b/backend/BaseProject/aha/html-css-simply-recipes-main/starter/about.html new file mode 100644 index 0000000..6bee1a1 --- /dev/null +++ b/backend/BaseProject/aha/html-css-simply-recipes-main/starter/about.html @@ -0,0 +1,24 @@ + + + + + + + About || Starter + + + + + + + + + + +

About Page

+ + + diff --git a/backend/BaseProject/aha/html-css-simply-recipes-main/starter/assets/about.jpeg b/backend/BaseProject/aha/html-css-simply-recipes-main/starter/assets/about.jpeg new file mode 100644 index 0000000..6539080 Binary files /dev/null and b/backend/BaseProject/aha/html-css-simply-recipes-main/starter/assets/about.jpeg differ diff --git a/backend/BaseProject/aha/html-css-simply-recipes-main/starter/assets/favicon.ico b/backend/BaseProject/aha/html-css-simply-recipes-main/starter/assets/favicon.ico new file mode 100644 index 0000000..b8fecd8 Binary files /dev/null and b/backend/BaseProject/aha/html-css-simply-recipes-main/starter/assets/favicon.ico differ diff --git a/backend/BaseProject/aha/html-css-simply-recipes-main/starter/assets/logo.svg b/backend/BaseProject/aha/html-css-simply-recipes-main/starter/assets/logo.svg new file mode 100644 index 0000000..3daa6a4 --- /dev/null +++ b/backend/BaseProject/aha/html-css-simply-recipes-main/starter/assets/logo.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/backend/BaseProject/aha/html-css-simply-recipes-main/starter/assets/main.jpeg b/backend/BaseProject/aha/html-css-simply-recipes-main/starter/assets/main.jpeg new file mode 100644 index 0000000..4420530 Binary files /dev/null and b/backend/BaseProject/aha/html-css-simply-recipes-main/starter/assets/main.jpeg differ diff --git a/backend/BaseProject/aha/html-css-simply-recipes-main/starter/assets/recipes/recipe-1.jpeg b/backend/BaseProject/aha/html-css-simply-recipes-main/starter/assets/recipes/recipe-1.jpeg new file mode 100644 index 0000000..85b4ab6 Binary files /dev/null and b/backend/BaseProject/aha/html-css-simply-recipes-main/starter/assets/recipes/recipe-1.jpeg differ diff --git a/backend/BaseProject/aha/html-css-simply-recipes-main/starter/assets/recipes/recipe-2.jpeg b/backend/BaseProject/aha/html-css-simply-recipes-main/starter/assets/recipes/recipe-2.jpeg new file mode 100644 index 0000000..2a5109e Binary files /dev/null and b/backend/BaseProject/aha/html-css-simply-recipes-main/starter/assets/recipes/recipe-2.jpeg differ diff --git a/backend/BaseProject/aha/html-css-simply-recipes-main/starter/assets/recipes/recipe-3.jpeg b/backend/BaseProject/aha/html-css-simply-recipes-main/starter/assets/recipes/recipe-3.jpeg new file mode 100644 index 0000000..02f0bee Binary files /dev/null and b/backend/BaseProject/aha/html-css-simply-recipes-main/starter/assets/recipes/recipe-3.jpeg differ diff --git a/backend/BaseProject/aha/html-css-simply-recipes-main/starter/assets/recipes/recipe-4.jpeg b/backend/BaseProject/aha/html-css-simply-recipes-main/starter/assets/recipes/recipe-4.jpeg new file mode 100644 index 0000000..63c2bb7 Binary files /dev/null and b/backend/BaseProject/aha/html-css-simply-recipes-main/starter/assets/recipes/recipe-4.jpeg differ diff --git a/backend/BaseProject/aha/html-css-simply-recipes-main/starter/contact.html b/backend/BaseProject/aha/html-css-simply-recipes-main/starter/contact.html new file mode 100644 index 0000000..e1195d0 --- /dev/null +++ b/backend/BaseProject/aha/html-css-simply-recipes-main/starter/contact.html @@ -0,0 +1,24 @@ + + + + + + + Contact || Starter + + + + + + + + + + +

Contact Page

+ + + diff --git a/backend/BaseProject/aha/html-css-simply-recipes-main/starter/css/main.css b/backend/BaseProject/aha/html-css-simply-recipes-main/starter/css/main.css new file mode 100644 index 0000000..74d7489 --- /dev/null +++ b/backend/BaseProject/aha/html-css-simply-recipes-main/starter/css/main.css @@ -0,0 +1,262 @@ +*, +::after, +::before { + box-sizing: border-box; +} +/* fonts */ + +@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600&family=Montserrat&display=swap'); +html { + font-size: 100%; +} /*16px*/ + +:root { + /* colors */ + --primary-100: #e2e0ff; + --primary-200: #c1beff; + --primary-300: #a29dff; + --primary-400: #837dff; + --primary-500: #645cff; + --primary-600: #504acc; + --primary-700: #3c3799; + --primary-800: #282566; + --primary-900: #141233; + + /* grey */ + --grey-50: #f8fafc; + --grey-100: #f1f5f9; + --grey-200: #e2e8f0; + --grey-300: #cbd5e1; + --grey-400: #94a3b8; + --grey-500: #64748b; + --grey-600: #475569; + --grey-700: #334155; + --grey-800: #1e293b; + --grey-900: #0f172a; + /* rest of the colors */ + --black: #222; + --white: #fff; + --red-light: #f8d7da; + --red-dark: #842029; + --green-light: #d1e7dd; + --green-dark: #0f5132; + + /* fonts */ + --headingFont: 'Roboto', sans-serif; + --bodyFont: 'Nunito', sans-serif; + --smallText: 0.7em; + /* rest of the vars */ + --backgroundColor: var(--grey-50); + --textColor: var(--grey-900); + --borderRadius: 0.25rem; + --letterSpacing: 1px; + --transition: 0.3s ease-in-out all; + --max-width: 1120px; + --fixed-width: 600px; + + /* box shadow*/ + --shadow-1: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); + --shadow-2: 0 4px 6px -1px rgba(0, 0, 0, 0.1), + 0 2px 4px -1px rgba(0, 0, 0, 0.06); + --shadow-3: 0 10px 15px -3px rgba(0, 0, 0, 0.1), + 0 4px 6px -2px rgba(0, 0, 0, 0.05); + --shadow-4: 0 20px 25px -5px rgba(0, 0, 0, 0.1), + 0 10px 10px -5px rgba(0, 0, 0, 0.04); +} + +body { + background: var(--backgroundColor); + font-family: var(--bodyFont); + font-weight: 400; + line-height: 1.75; + color: var(--textColor); +} + +p { + margin-top: 0; + margin-bottom: 1.5rem; + max-width: 40em; +} + +h1, +h2, +h3, +h4, +h5 { + margin: 0; + margin-bottom: 1.38rem; + font-family: var(--headingFont); + font-weight: 400; + line-height: 1.3; + text-transform: capitalize; + letter-spacing: var(--letterSpacing); +} + +h1 { + margin-top: 0; + font-size: 3.052rem; +} + +h2 { + font-size: 2.441rem; +} + +h3 { + font-size: 1.953rem; +} + +h4 { + font-size: 1.563rem; +} + +h5 { + font-size: 1.25rem; +} + +small, +.text-small { + font-size: var(--smallText); +} + +a { + text-decoration: none; +} +ul { + list-style-type: none; + padding: 0; +} + +.img { + width: 100%; + display: block; + object-fit: cover; +} +/* buttons */ + +.btn { + cursor: pointer; + color: var(--white); + background: var(--primary-500); + border: transparent; + border-radius: var(--borderRadius); + letter-spacing: var(--letterSpacing); + padding: 0.375rem 0.75rem; + box-shadow: var(--shadow-1); + transition: var(--transtion); + text-transform: capitalize; + display: inline-block; +} +.btn:hover { + background: var(--primary-700); + box-shadow: var(--shadow-3); +} +.btn-hipster { + color: var(--primary-500); + background: var(--primary-200); +} +.btn-hipster:hover { + color: var(--primary-200); + background: var(--primary-700); +} +.btn-block { + width: 100%; +} + +/* alerts */ +.alert { + padding: 0.375rem 0.75rem; + margin-bottom: 1rem; + border-color: transparent; + border-radius: var(--borderRadius); +} + +.alert-danger { + color: var(--red-dark); + background: var(--red-light); +} +.alert-success { + color: var(--green-dark); + background: var(--green-light); +} +/* form */ + +.form { + width: 90vw; + max-width: var(--fixed-width); + background: var(--white); + border-radius: var(--borderRadius); + box-shadow: var(--shadow-2); + padding: 2rem 2.5rem; + margin: 3rem auto; +} +.form-label { + display: block; + font-size: var(--smallText); + margin-bottom: 0.5rem; + text-transform: capitalize; + letter-spacing: var(--letterSpacing); +} +.form-input, +.form-textarea { + width: 100%; + padding: 0.375rem 0.75rem; + border-radius: var(--borderRadius); + background: var(--backgroundColor); + border: 1px solid var(--grey-200); +} + +.form-row { + margin-bottom: 1rem; +} + +.form-textarea { + height: 7rem; +} +::placeholder { + font-family: inherit; + color: var(--grey-400); +} +.form-alert { + color: var(--red-dark); + letter-spacing: var(--letterSpacing); + text-transform: capitalize; +} +/* alert */ + +@keyframes spinner { + to { + transform: rotate(360deg); + } +} + +.loading { + width: 6rem; + height: 6rem; + border: 5px solid var(--grey-400); + border-radius: 50%; + border-top-color: var(--primary-500); + animation: spinner 0.6s linear infinite; +} +.loading { + margin: 0 auto; +} +/* title */ + +.title { + text-align: center; +} + +.title-underline { + background: var(--primary-500); + width: 7rem; + height: 0.25rem; + margin: 0 auto; + margin-top: -1rem; +} + +/* +=============== +Navbar +=============== +*/ + diff --git a/backend/BaseProject/aha/html-css-simply-recipes-main/starter/css/normalize.css b/backend/BaseProject/aha/html-css-simply-recipes-main/starter/css/normalize.css new file mode 100644 index 0000000..2768db4 --- /dev/null +++ b/backend/BaseProject/aha/html-css-simply-recipes-main/starter/css/normalize.css @@ -0,0 +1,351 @@ +/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ + +/* Document + ========================================================================== */ + +/** + * 1. Correct the line height in all browsers. + * 2. Prevent adjustments of font size after orientation changes in iOS. + */ + +html { + line-height: 1.15; /* 1 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} + +/* Sections + ========================================================================== */ + +/** + * Remove the margin in all browsers. + */ + +body { + margin: 0; +} + +/** + * Render the `main` element consistently in IE. + */ + +main { + display: block; +} + +/** + * Correct the font size and margin on `h1` elements within `section` and + * `article` contexts in Chrome, Firefox, and Safari. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +/* Grouping content + ========================================================================== */ + +/** + * 1. Add the correct box sizing in Firefox. + * 2. Show the overflow in Edge and IE. + */ + +hr { + box-sizing: content-box; /* 1 */ + height: 0; /* 1 */ + overflow: visible; /* 2 */ +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +pre { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/* Text-level semantics + ========================================================================== */ + +/** + * Remove the gray background on active links in IE 10. + */ + +a { + background-color: transparent; +} + +/** + * 1. Remove the bottom border in Chrome 57- + * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. + */ + +abbr[title] { + border-bottom: none; /* 1 */ + text-decoration: underline; /* 2 */ + text-decoration: underline dotted; /* 2 */ +} + +/** + * Add the correct font weight in Chrome, Edge, and Safari. + */ + +b, +strong { + font-weight: bolder; +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +code, +kbd, +samp { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/** + * Add the correct font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` elements from affecting the line height in + * all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sub { + bottom: -0.25em; +} + +sup { + top: -0.5em; +} + +/* Embedded content + ========================================================================== */ + +/** + * Remove the border on images inside links in IE 10. + */ + +img { + border-style: none; +} + +/* Forms + ========================================================================== */ + +/** + * 1. Change the font styles in all browsers. + * 2. Remove the margin in Firefox and Safari. + */ + +button, +input, +optgroup, +select, +textarea { + font-family: inherit; /* 1 */ + font-size: 100%; /* 1 */ + line-height: 1.15; /* 1 */ + margin: 0; /* 2 */ +} + +/** + * Show the overflow in IE. + * 1. Show the overflow in Edge. + */ + +button, +input { + /* 1 */ + overflow: visible; +} + +/** + * Remove the inheritance of text transform in Edge, Firefox, and IE. + * 1. Remove the inheritance of text transform in Firefox. + */ + +button, +select { + /* 1 */ + text-transform: none; +} + +/** + * Correct the inability to style clickable types in iOS and Safari. + */ + +button, +[type='button'], +[type='reset'], +[type='submit'] { + -webkit-appearance: button; +} + +/** + * Remove the inner border and padding in Firefox. + */ + +button::-moz-focus-inner, +[type='button']::-moz-focus-inner, +[type='reset']::-moz-focus-inner, +[type='submit']::-moz-focus-inner { + border-style: none; + padding: 0; +} + +/** + * Restore the focus styles unset by the previous rule. + */ + +button:-moz-focusring, +[type='button']:-moz-focusring, +[type='reset']:-moz-focusring, +[type='submit']:-moz-focusring { + outline: 1px dotted ButtonText; +} + +/** + * Correct the padding in Firefox. + */ + +fieldset { + padding: 0.35em 0.75em 0.625em; +} + +/** + * 1. Correct the text wrapping in Edge and IE. + * 2. Correct the color inheritance from `fieldset` elements in IE. + * 3. Remove the padding so developers are not caught out when they zero out + * `fieldset` elements in all browsers. + */ + +legend { + box-sizing: border-box; /* 1 */ + color: inherit; /* 2 */ + display: table; /* 1 */ + max-width: 100%; /* 1 */ + padding: 0; /* 3 */ + white-space: normal; /* 1 */ +} + +/** + * Add the correct vertical alignment in Chrome, Firefox, and Opera. + */ + +progress { + vertical-align: baseline; +} + +/** + * Remove the default vertical scrollbar in IE 10+. + */ + +textarea { + overflow: auto; +} + +/** + * 1. Add the correct box sizing in IE 10. + * 2. Remove the padding in IE 10. + */ + +[type='checkbox'], +[type='radio'] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Correct the cursor style of increment and decrement buttons in Chrome. + */ + +[type='number']::-webkit-inner-spin-button, +[type='number']::-webkit-outer-spin-button { + height: auto; +} + +/** + * 1. Correct the odd appearance in Chrome and Safari. + * 2. Correct the outline style in Safari. + */ + +[type='search'] { + -webkit-appearance: textfield; /* 1 */ + outline-offset: -2px; /* 2 */ +} + +/** + * Remove the inner padding in Chrome and Safari on macOS. + */ + +[type='search']::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * 1. Correct the inability to style clickable types in iOS and Safari. + * 2. Change font properties to `inherit` in Safari. + */ + +::-webkit-file-upload-button { + -webkit-appearance: button; /* 1 */ + font: inherit; /* 2 */ +} + +/* Interactive + ========================================================================== */ + +/* + * Add the correct display in Edge, IE 10+, and Firefox. + */ + +details { + display: block; +} + +/* + * Add the correct display in all browsers. + */ + +summary { + display: list-item; +} + +/* Misc + ========================================================================== */ + +/** + * Add the correct display in IE 10+. + */ + +template { + display: none; +} + +/** + * Add the correct display in IE 10. + */ + +[hidden] { + display: none; +} diff --git a/backend/BaseProject/aha/html-css-simply-recipes-main/starter/index.html b/backend/BaseProject/aha/html-css-simply-recipes-main/starter/index.html new file mode 100644 index 0000000..e89a673 --- /dev/null +++ b/backend/BaseProject/aha/html-css-simply-recipes-main/starter/index.html @@ -0,0 +1,24 @@ + + + + + + + Simply Recipes || Starter + + + + + + + + + + +

Home Page

+ + + diff --git a/backend/BaseProject/aha/html-css-simply-recipes-main/starter/js/app.js b/backend/BaseProject/aha/html-css-simply-recipes-main/starter/js/app.js new file mode 100644 index 0000000..d20828d --- /dev/null +++ b/backend/BaseProject/aha/html-css-simply-recipes-main/starter/js/app.js @@ -0,0 +1,19 @@ +const getElement = (selector) => { + const element = document.querySelector(selector) + + if (element) return element + throw Error( + `Please double check your class names, there is no ${selector} class` + ) +} + +const links = getElement('.nav-links') +const navBtnDOM = getElement('.nav-btn') + +navBtnDOM.addEventListener('click', () => { + links.classList.toggle('show-links') +}) + +const date = getElement('#date') +const currentYear = new Date().getFullYear() +date.textContent = currentYear diff --git a/backend/BaseProject/aha/html-css-simply-recipes-main/starter/recipes.html b/backend/BaseProject/aha/html-css-simply-recipes-main/starter/recipes.html new file mode 100644 index 0000000..f352042 --- /dev/null +++ b/backend/BaseProject/aha/html-css-simply-recipes-main/starter/recipes.html @@ -0,0 +1,24 @@ + + + + + + + Recipes || Starter + + + + + + + + + + +

Recipes Page

+ + + diff --git a/backend/BaseProject/aha/html-css-simply-recipes-main/starter/single-recipe.html b/backend/BaseProject/aha/html-css-simply-recipes-main/starter/single-recipe.html new file mode 100644 index 0000000..6cfc261 --- /dev/null +++ b/backend/BaseProject/aha/html-css-simply-recipes-main/starter/single-recipe.html @@ -0,0 +1,24 @@ + + + + + + + Single Recipe || Starter + + + + + + + + + + +

Single Recipe Page

+ + + diff --git a/backend/BaseProject/aha/html-css-simply-recipes-main/starter/tag-template.html b/backend/BaseProject/aha/html-css-simply-recipes-main/starter/tag-template.html new file mode 100644 index 0000000..41cc413 --- /dev/null +++ b/backend/BaseProject/aha/html-css-simply-recipes-main/starter/tag-template.html @@ -0,0 +1,24 @@ + + + + + + + Beef|| Starter + + + + + + + + + + +

Tag Template Page

+ + + diff --git a/backend/BaseProject/aha/html-css-simply-recipes-main/starter/tags.html b/backend/BaseProject/aha/html-css-simply-recipes-main/starter/tags.html new file mode 100644 index 0000000..83422e6 --- /dev/null +++ b/backend/BaseProject/aha/html-css-simply-recipes-main/starter/tags.html @@ -0,0 +1,24 @@ + + + + + + + Tags || Starter + + + + + + + + + + +

Tags Page

+ + + diff --git a/backend/BaseProject/ashwini/Connector/Controller/ConnectorController.java b/backend/BaseProject/ashwini/Connector/Controller/ConnectorController.java new file mode 100644 index 0000000..9f04c2b --- /dev/null +++ b/backend/BaseProject/ashwini/Connector/Controller/ConnectorController.java @@ -0,0 +1,79 @@ +package com.realnet.Connector.Controller; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.Connector.Entity.Connector; +import com.realnet.Connector.Repository.Connectorrepository; +import com.realnet.users.entity.Sys_Accounts; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; + +@RestController +@RequestMapping("/connector") +public class ConnectorController { + + @Autowired + private Connectorrepository connectorrepository; + @Autowired + private AppUserServiceImpl userService; + + + //ADD DATA + @PostMapping("/Connectorjson") + public ResponseEntity save(@RequestBody Connector connector) { + AppUser loggedInUser = userService.getLoggedInUser(); + Long account_id = loggedInUser.getAccount().getAccount_id(); + connector.setAccountId(account_id); + Connector save = connectorrepository.save(connector); + return new ResponseEntity<>(save, HttpStatus.OK); + + } + + //UPDATE BY ID + @PutMapping("/Connectorjson/{id}") + public ResponseEntity update(@PathVariable Long id, @RequestBody Connector connector) { + Connector con = connectorrepository.findById(id).orElseThrow(null); + con.setName(connector.getName()); + con.setConnector_json(connector.getConnector_json()); + + Connector save = connectorrepository.save(con); + return new ResponseEntity<>(save, HttpStatus.OK); + + } + + //GET ALL + @GetMapping("/Connectorjson") + public ResponseEntity getall() { + List save = connectorrepository.findAll(); + return new ResponseEntity<>(save, HttpStatus.OK); + + } + + //GET BY ID + @GetMapping("/Connectorjson/{id}") + public ResponseEntity getbyid(@PathVariable Long id) { + Connector con = connectorrepository.findById(id).orElseThrow(null); + return new ResponseEntity<>(con, HttpStatus.OK); + + } + + //DELETE BY ID + @DeleteMapping("/Connectorjson/{id}") + public void delete(@PathVariable Long id){ + Connector con = connectorrepository.findById(id).orElseThrow(null); + connectorrepository.delete(con); + + } +} diff --git a/backend/BaseProject/ashwini/Connector/Controller/MappingController.java b/backend/BaseProject/ashwini/Connector/Controller/MappingController.java new file mode 100644 index 0000000..aec54be --- /dev/null +++ b/backend/BaseProject/ashwini/Connector/Controller/MappingController.java @@ -0,0 +1,81 @@ +package com.realnet.Connector.Controller; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; +import com.realnet.Connector.Entity.Connector; +import com.realnet.Connector.Entity.Mapping; +import com.realnet.Connector.Repository.Connectorrepository; + +@RestController +@RequestMapping("/token/connector/mapping") +public class MappingController { + + @Autowired + private Connectorrepository connectorrepository; + + @PostMapping("/mapping") + public Object connector(@RequestBody Mapping mapping) { + List list = new ArrayList<>(); + +// Map param = new HashMap(); + String str =mapping.getMappingString(); + JsonParser parser = new JsonParser(); + JsonElement element = parser.parse(str); + JsonObject obj = element.getAsJsonObject(); + + //get key from get api + Set> entries = obj.entrySet(); + for (Map.Entry entry : entries) { + + String key = entry.getKey(); + String string = key.toString(); + list.add(string); + } + return list; + +} + @PostMapping("/mapping1") + public Object connector1(@RequestBody Mapping mapping) { + List list = new ArrayList<>(); + +// Map param = new HashMap(); + String str =mapping.getMappingString(); + JsonParser parser = new JsonParser(); + JsonElement element = parser.parse(str); + JsonObject obj = element.getAsJsonObject(); + + //get values from get api + Set> entries = obj.entrySet(); + for (Map.Entry entry : entries) { + + String string2 = entry.getValue().getAsString(); + list.add(string2); + } + return list; + +} + //get api for call connector by name for job(by gk) + @GetMapping("/connectorname/{name}") + public ResponseEntity getconnector(@PathVariable String name) { + Connector save = connectorrepository.findconnectorbyname(name); + return new ResponseEntity<>(save, HttpStatus.OK); + + } + +} diff --git a/backend/BaseProject/ashwini/Connector/Entity/Connector.java b/backend/BaseProject/ashwini/Connector/Entity/Connector.java new file mode 100644 index 0000000..8de5289 --- /dev/null +++ b/backend/BaseProject/ashwini/Connector/Entity/Connector.java @@ -0,0 +1,33 @@ +package com.realnet.Connector.Entity; + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Lob; +import javax.persistence.Column; + +import com.realnet.Dashboard1.Entity.dashbord_Who_collumn; + +import lombok.Data; + +@Entity +@Data +public class Connector extends dashbord_Who_collumn { + + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private String name; + @Column(length = 15000) + private String get_str; + @Lob + private String connector_json; + +} diff --git a/backend/BaseProject/ashwini/Connector/Entity/Mapping.java b/backend/BaseProject/ashwini/Connector/Entity/Mapping.java new file mode 100644 index 0000000..0e23d56 --- /dev/null +++ b/backend/BaseProject/ashwini/Connector/Entity/Mapping.java @@ -0,0 +1,9 @@ +package com.realnet.Connector.Entity; + +import lombok.Data; + +@Data +public class Mapping { + + private String mappingString; +} diff --git a/backend/BaseProject/ashwini/Connector/Repository/Connectorrepository.java b/backend/BaseProject/ashwini/Connector/Repository/Connectorrepository.java new file mode 100644 index 0000000..1d83c69 --- /dev/null +++ b/backend/BaseProject/ashwini/Connector/Repository/Connectorrepository.java @@ -0,0 +1,15 @@ +package com.realnet.Connector.Repository; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.stereotype.Repository; + +import com.realnet.Connector.Entity.Connector; +@Repository +public interface Connectorrepository extends JpaRepository{ + + + @Query(value = "select * from connector where name=?1", nativeQuery = true) + Connector findconnectorbyname(String name); + +} diff --git a/backend/BaseProject/projecttest/model/TestModel.java b/backend/BaseProject/projecttest/model/TestModel.java new file mode 100644 index 0000000..9dcd130 --- /dev/null +++ b/backend/BaseProject/projecttest/model/TestModel.java @@ -0,0 +1,15 @@ +package com.realnet.model; + +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; + +public class TestModel { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private int id; + private String name; + private String email; + private String mob_no; +} diff --git a/backend/BaseProject/test3/Demo Code Extractor/Abc_1665647440047_back.zip b/backend/BaseProject/test3/Demo Code Extractor/Abc_1665647440047_back.zip new file mode 100644 index 0000000..e35579f Binary files /dev/null and b/backend/BaseProject/test3/Demo Code Extractor/Abc_1665647440047_back.zip differ diff --git a/backend/BaseProject/test3/Demo Code Extractor/Abc_1665647440047_back/Controllers/AbcController.java b/backend/BaseProject/test3/Demo Code Extractor/Abc_1665647440047_back/Controllers/AbcController.java new file mode 100644 index 0000000..4b90753 --- /dev/null +++ b/backend/BaseProject/test3/Demo Code Extractor/Abc_1665647440047_back/Controllers/AbcController.java @@ -0,0 +1,42 @@ +package com.realnet.Abc_1665647440047_back.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import com.realnet.Abc_1665647440047_back.Entity.Abc; +import com.realnet.Abc_1665647440047_back.Services.AbcService ; +@RequestMapping(value = "/_1665647440047_back") +@RestController +public class AbcController { + + @Autowired + private AbcService Service; + + @PostMapping("/Abc") + + public Abc Savedata(@RequestBody Abc data) { + Abc save = Service.Savedata(data) ; + return save; + } + + + @GetMapping("/Abc") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Abc/{id}") + public Abc getdetailsbyId(@PathVariable Long id ) { + Abc get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Abc/{id}") + public void delete_by_id(@PathVariable Long id ) { + Service.delete_by_id(id); + + } +@PutMapping("/Abc/{id}") + public Abc update(@RequestBody Abc data,@PathVariable Long id ) { + Abc update = Service.update(data,id); + return update; + } +} \ No newline at end of file diff --git a/backend/BaseProject/test3/Demo Code Extractor/Abc_1665647440047_back/Entity/Abc.java b/backend/BaseProject/test3/Demo Code Extractor/Abc_1665647440047_back/Entity/Abc.java new file mode 100644 index 0000000..5c33750 --- /dev/null +++ b/backend/BaseProject/test3/Demo Code Extractor/Abc_1665647440047_back/Entity/Abc.java @@ -0,0 +1,18 @@ +package com.realnet.Abc_1665647440047_back.Entity; + import lombok.*; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + @Entity + @Data + public class Abc{ + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private String name; + private int name_id; + + } \ No newline at end of file diff --git a/backend/BaseProject/test3/Demo Code Extractor/Abc_1665647440047_back/Repository/AbcRepository.java b/backend/BaseProject/test3/Demo Code Extractor/Abc_1665647440047_back/Repository/AbcRepository.java new file mode 100644 index 0000000..2576449 --- /dev/null +++ b/backend/BaseProject/test3/Demo Code Extractor/Abc_1665647440047_back/Repository/AbcRepository.java @@ -0,0 +1,13 @@ +package com.realnet.Abc_1665647440047_back.Repository; + + +import org.springframework.data.jpa.repository.JpaRepository; + +import org.springframework.stereotype.Repository; + + +import com.realnet.Abc_1665647440047_back.Entity.Abc; + +@Repository +public interface AbcRepository extends JpaRepository { +} \ No newline at end of file diff --git a/backend/BaseProject/test3/Demo Code Extractor/Abc_1665647440047_back/Services/AbcService.java b/backend/BaseProject/test3/Demo Code Extractor/Abc_1665647440047_back/Services/AbcService.java new file mode 100644 index 0000000..a26061b --- /dev/null +++ b/backend/BaseProject/test3/Demo Code Extractor/Abc_1665647440047_back/Services/AbcService.java @@ -0,0 +1,37 @@ +package com.realnet.Abc_1665647440047_back.Services; +import com.realnet.Abc_1665647440047_back.Repository.AbcRepository; +import com.realnet.Abc_1665647440047_back.Entity.Abc;import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.stereotype.Service; + +@Service + public class AbcService { +@Autowired +private AbcRepository Repository; +public Abc Savedata(Abc data) { + return Repository.save(data); + } + + +public List getdetails() { + return (List) Repository.findAll(); + } + + +public Abc getdetailsbyId(Long id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Long id) { + Repository.deleteById(id); +} + + +public Abc update(Abc data,Long id) { + Abc old = Repository.findById(id).get(); +old.setName(data.getName()); +old.setName_id(data.getName_id()); +final Abc test = Repository.save(old); + return test;}} \ No newline at end of file diff --git a/backend/BaseProject/test3/Demo Code Extractor/model.zip b/backend/BaseProject/test3/Demo Code Extractor/model.zip new file mode 100644 index 0000000..ee66204 Binary files /dev/null and b/backend/BaseProject/test3/Demo Code Extractor/model.zip differ diff --git a/backend/BaseProject/test3/Demo Code Extractor/model/TestModel.java b/backend/BaseProject/test3/Demo Code Extractor/model/TestModel.java new file mode 100644 index 0000000..9dcd130 --- /dev/null +++ b/backend/BaseProject/test3/Demo Code Extractor/model/TestModel.java @@ -0,0 +1,15 @@ +package com.realnet.model; + +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; + +public class TestModel { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private int id; + private String name; + private String email; + private String mob_no; +} diff --git a/backend/BaseProject/test4/codeextractor/controller/BuildMasterBuilderController.java b/backend/BaseProject/test4/codeextractor/controller/BuildMasterBuilderController.java new file mode 100644 index 0000000..31e9747 --- /dev/null +++ b/backend/BaseProject/test4/codeextractor/controller/BuildMasterBuilderController.java @@ -0,0 +1,537 @@ +//package com.realnet.codeextractor.controller; +// +//import java.io.BufferedWriter; +//import java.io.File; +//import java.io.FileNotFoundException; +//import java.io.FileWriter; +//import java.io.IOException; +//import java.nio.charset.StandardCharsets; +//import java.util.List; +// +//import org.apache.commons.io.FileUtils; +//import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.beans.factory.annotation.Value; +//import org.springframework.http.HttpStatus; +//import org.springframework.http.MediaType; +//import org.springframework.http.ResponseEntity; +//import org.springframework.web.bind.annotation.GetMapping; +//import org.springframework.web.bind.annotation.RequestMapping; +//import org.springframework.web.bind.annotation.RequestParam; +//import org.springframework.web.bind.annotation.RestController; +// +//import com.realnet.codeextractor.entity.Rn_Bcf_Extractor; +//import com.realnet.codeextractor.entity.Rn_Bcf_Extractor_Params; +//import com.realnet.codeextractor.service.Rn_Bcf_Exception_Rule_Library_Service; +//import com.realnet.codeextractor.service.Rn_Bcf_Extractor_Params_Service; +//import com.realnet.codeextractor.service.Rn_Bcf_Extractor_Service; +//import com.realnet.codeextractor.service.Rn_Bcf_Rule_Library_Service; +//import com.realnet.flf.service.FieldTypeService; +//import com.realnet.fnd.entity.Error; +//import com.realnet.fnd.entity.ErrorPojo; +//import com.realnet.fnd.entity.Success; +//import com.realnet.fnd.entity.SuccessPojo; +//import com.realnet.fnd.service.Rn_ModuleSetup_Service; +//import com.realnet.utils.Constant; +// +//import io.swagger.annotations.Api; +// +//@RestController +//@RequestMapping(value = "/api", produces = MediaType.APPLICATION_JSON_VALUE) +//@Api(tags = { "Build Master Builder" }) +//public class BuildMasterBuilderController { +// +// @Value("${projectPath}") +// private String projectPath; +// +// @Value("${angularProjectPath}") +// private String angularProjectPath; +// +// @Autowired +// private Rn_ModuleSetup_Service rn_module_setup_service; +// +// @Autowired +// private Rn_Bcf_Extractor_Service rn_bcf_extractor_service; +// +// @Autowired +// private Rn_Bcf_Extractor_Params_Service rn_bcf_extractor_params_service; +// +// @Autowired +// private Rn_Bcf_Rule_Library_Service rn_bcf_rule_library_service; +// +// @Autowired +// private Rn_Bcf_Exception_Rule_Library_Service rn_bcf_rule_exception_library_service; +// +// @Autowired +// private FieldTypeService fieldTypeService; +// //private static final Logger logger = Logger.getLogger(BuildMasterBuilderController.class); +// +// @GetMapping("/build_master_builder") +// public ResponseEntity masterControllerBuilder(@RequestParam(value = "id") Integer id) throws IOException, FileNotFoundException { +// StringBuilder variablesDynamicCode = new StringBuilder(); +// StringBuilder stringBuilderDynamicCode = new StringBuilder(); +// StringBuilder moduleCode = new StringBuilder(); +// +// +// // RN_BCF_CODE_EXTRACTOR_T ID +// //int eid = Integer.parseInt(id); +// +// Rn_Bcf_Extractor extractor = rn_bcf_extractor_service.getById(id); +// String technology_stack = extractor.getTech_stack(); +// String object_type = extractor.getObject_type(); +// String sub_object_type = extractor.getSub_object_type(); +// +// // RN_BCF_CODE_EXTRACTOR_PARAMS_T VALUES +// //List params = rn_bcf_extractor_params_service.getByHeaderId(eid); +// List params = extractor.getRn_bcf_extractor_Params(); +// +// // PARAMETERS TABLE VALUE +// int i = 0; +// int j=0; +// for (Rn_Bcf_Extractor_Params param : params) +// { +// boolean is_creation_enabled = param.isIs_creation_enabled(); +// boolean is_extraction_enabled = param.isIs_extraction_enabled(); +// String path = param.getMoved_address_string(); +// File file = new File(path); +// String parentPath = file.getParent(); +// +// String name = file.getName(); +// String convertedFileName = "SE_" + name; +// +// // STATIC CODE DIRECTORY +// String staticFileParentDir = parentPath + File.separator + "static_code"; +// File staticFile = new File(staticFileParentDir + File.separator + convertedFileName); +// String fileToString = FileUtils.readFileToString(staticFile, StandardCharsets.UTF_8); +// +// // ex. controller_file (FROM PARAMS TABLE) +// String file_name_var = param.getFile_name_var(); +// +// // ex. ui_name + "controller" +// String file_name_dynamic_string = param.getFile_name_dynamic_string(); +// +// // ex. String controller_file = ui_name + "controller"; +// variablesDynamicCode.append("String " + file_name_var + " = " + file_name_dynamic_string + ";\r\n"); +// +// System.out.println("file name dynamic str "+file_name_dynamic_string); +// //change file name entity +//// String mainstr1=file_name_dynamic_string; +//// String saleesent1=mainstr1.replace(".java", " "); +//// System.out.println("updated filename"+saleesent1); +//// System.out.println(file_name_dynamic_string.contains(".java")); +//// System.out.println(file_name_dynamic_string.contains(".ts")); +//// System.out.println(file_name_dynamic_string.contains(".scss")); +//// System.out.println(file_name_dynamic_string.contains(".html")); +// +// if(file_name_dynamic_string.contains(".java")) { +// variablesDynamicCode.append("String mainstr"+j+" = " + file_name_var + ";\r\n"+ +// "String "+file_name_var+""+1+"=mainstr"+j+".replace(\".java\", \"\");\r\n"+ +// "" + "\r\n"+"\n" ); +// }else if(file_name_dynamic_string.contains(".ts")) { +// variablesDynamicCode.append("String mainstr"+j+" = " + file_name_var + ";\r\n"+ +// "String "+file_name_var+""+1+"=mainstr"+j+".replace(\".ts\", \"\");\r\n"+ +// "" + "\r\n"+ +// "String "+file_name_var+""+2+"=mainstr"+j+".replace(\".component.ts\", \"\");\r\n"+ +// "" + "\r\n"+"\n" +// ); +// +// }else if(file_name_dynamic_string.contains(".html")) { +// variablesDynamicCode.append("String mainstr"+j+" = " + file_name_var + ";\r\n"+ +// "String "+file_name_var+""+1+"=mainstr"+j+".replace(\".html\", \"\");\r\n"+ +// "" + "\r\n"+"\n" ); +// }else if(file_name_dynamic_string.contains(".scss")) { +// variablesDynamicCode.append("String mainstr"+j+" = " + file_name_var + ";\r\n"+ +// "String "+file_name_var+""+1+"=mainstr"+j+".replace(\".scss\", \"\");\r\n"+ +// "" + "\r\n"+"\n" ); +// }else {System.out.println("not found");} +// +// +// +// // ======= MODULE NAME SHOULD COME FROM THE SESSION ======== +// //String moduleName = "\" + module_name + \"/\""; +// String moduleName = "\" + module_name + \"/"; +// +// String modulePath = param.getTotal_project_path_dynamic_string(); +// //System.out.println("MODULE PATH = " + modulePath); +// if(modulePath.endsWith(".java")) { +// String parent = modulePath.substring(0, modulePath.lastIndexOf("/")); // 1 +// String lvl2Parent = parent.substring(0, parent.lastIndexOf("/")+1); // 2 +// String tail0 = modulePath.substring(parent.lastIndexOf("/") +1); // 3 +// tail0 = tail0.substring(0, tail0.lastIndexOf("/")+1); // remove the .java file name +// modulePath = lvl2Parent + moduleName + tail0; +// } else { +// // add module name in spring project +// modulePath = modulePath.substring(0, modulePath.lastIndexOf("/")+1); +// String data0 = modulePath.substring(0, modulePath.lastIndexOf("/") + 1); +// String tail0 = modulePath.substring(modulePath.lastIndexOf("/") + 1); +// data0 += moduleName + tail0; +// modulePath = data0; +// } +//// System.out.println("MANUPULATED module PATH = " + modulePath); +// +//// String ref_address_string = param.getReference_address_string(); +//// ref_address_string = ref_address_string.substring(0, ref_address_string.lastIndexOf("/")+1); +// +// String total_address_path = param.getTotal_project_path_dynamic_string(); +// total_address_path = total_address_path.substring(0, total_address_path.lastIndexOf("/")+1); +// System.out.println("total path : "+total_address_path +"\n"); +// String module_dest_path = ""; +// String finalDir = ""; +// +// +//// module_dest_path = "angularProjectPath + \"" + modulePath; +//// // CREATE MODULE FOLDER STRUCTURE [DYNAMIC PATH] +//// moduleCode.append("File file" + (++i) + " = new File(" + module_dest_path +"\");\n" +//// + "if(!file" + (i) +".exists()) {\n" +//// + " file" + (i) + ".mkdirs();\n" +//// + "}\n"); +// +// /* +// * MAKE {{test1}} dynamic +// * INPUT : /frontend/src/app/admin/test1/details/rn_header_test1-details.component.html +// * OUTPUT : /frontend/src/app/admin/{{test1}}/details/ +// * +// * */ +// // DYNAMIC FOLDER NAME LOGIC FOR ANGULAR +// // start +//// final String ng_prj_struct = "/frontend/src/app/admin/"; +//// if (ref_address_string.contains(ng_prj_struct)) { +//// int len = ng_prj_struct.length(); +//// String data = ref_address_string.substring(0,len) + "\" + ng_folder_name + \""; +//// int tail = ref_address_string.indexOf("/", len + 1); +//// String temp = ref_address_string.substring(tail); +//// data += temp; +//// ref_address_string = data; +//// } +//// +// // end +// String dest_path = "projectPath + \"" + "/Projects/\" + project_name + \"" + total_address_path; +// System.out.println("dest path : "+dest_path); +// // String finalDir = dirString + "/" + "\" + " + file_name_var; +// finalDir = dest_path + "\" + " + file_name_var; +// System.out.println(finalDir); +// +// +// //module_dest_path = "projectPath + \"" + "/Projects/\" + project_name + " + modulePath; +//// String dest_path = "projectPath + \"" + "/Projects/\" + project_name + \"" + modulePath; +// +// +// // String finalDir = dirString + "/" + "\" + " + file_name_var; +// finalDir = dest_path + "\" + " + file_name_var; +// System.out.println("NIL FINAL DIR = " + finalDir+"\n"); +// +// if(is_creation_enabled) { +// StringBuilder fileCode = new StringBuilder(); +// // EMPTY FILE CODE WILL NOT GO IN THIS LOOP +// if(fileToString.isEmpty()) { +// fileCode.append(" " + file_name_var + "Code.append(\"" + fileToString + "\");\r\n"); +// } else { +// fileCode.append(" " + file_name_var + "Code.append(" + fileToString + ");\r\n"); +// } +// stringBuilderDynamicCode.append(" StringBuilder " + file_name_var + "Code = new StringBuilder();\r\n" +// //+ " " + file_name_var + "Code.append(" + fileToString + ");\r\n" +// + fileCode +// + "\r\n" +// + " File " + file_name_var + "File = new File(" + finalDir + ");\r\n" +// + " System.out.println(\"Directory name = \" + " + file_name_var + "File);\r\n" +// //== CREATE PARENT DIR IF NOT EXIST=== +// + " File " + file_name_var + "FileParentDir = new File(" + file_name_var + "File.getParent());\r\n" +// + " if(!" + file_name_var +"FileParentDir.exists()) {\r\n" +// + " " + file_name_var + "FileParentDir.mkdirs();\r\n" +// + " }\r\n" +// //== +// + " if (!" + file_name_var + "File.exists()) {\r\n" +// + " " + file_name_var + "File.createNewFile();\r\n" +// + " }\r\n" +// + " fw = new FileWriter(" + file_name_var + "File.getAbsoluteFile());\r\n" +// + " bw = new BufferedWriter(fw);\r\n" +// + " bw.write(" + file_name_var + "Code.toString());\r\n" +// + " bw.close();\r\n" +// + "\r\n"); +// +// } +// j++; +// } +// +// +// +// // CHILD MASTER BUILDER NAME DEPENDS ON (TECH_STACK, OBJ_TYPE, SUB_OBJ_TYPE) +// String childMasterBuilderName = technology_stack + "_" + object_type + "_" + sub_object_type + "_Builder"; +// childMasterBuilderName = childMasterBuilderName.replace(" ", "_"); +// childMasterBuilderName = childMasterBuilderName.replaceAll("[-]+", "_"); +// +// StringBuilder childMasterBuilderCode = new StringBuilder(); +// childMasterBuilderCode.append( +// "package com.realnet.builders;\r\n" +// + "\r\n" +// + "import java.io.BufferedReader;\r\n" +// + "import java.io.BufferedWriter;\r\n" +// + "import java.io.File;\r\n" +// + "import java.io.FileNotFoundException;\r\n" +// + "import java.io.FileReader;\r\n" +// + "import java.io.FileWriter;\r\n" +// + "import java.io.IOException;\r\n" +// + "import java.util.List;\r\n" +// + "import java.util.stream.Collectors;\r\n" +// + "\r\n" +// + "import org.modelmapper.ModelMapper;\r\n" +// + "import org.springframework.beans.factory.annotation.Autowired;\r\n" +// + "import org.springframework.beans.factory.annotation.Value;\r\n" +// + "import org.springframework.http.HttpStatus;\r\n" +// + "import org.springframework.http.MediaType;\r\n" +// + "import org.springframework.http.ResponseEntity;\r\n" +// + "import org.springframework.web.bind.annotation.GetMapping;\r\n" +// + "import org.springframework.web.bind.annotation.RequestMapping;\r\n" +// + "import org.springframework.web.bind.annotation.RequestParam;\r\n" +// + "import org.springframework.web.bind.annotation.RestController;\r\n" +// + "\r\n" +// + "import com.realnet.actionbuilder.entity.Rn_cff_ActionBuilder_Header;\r\n" +// + "import com.realnet.actionbuilder.entity.Rn_cff_ActionBuilder_Header;\r\n" +// + "import com.realnet.actionbuilder.service.Rn_Cff_ActionBuilder_Service;\r\n" +// + "import com.realnet.flf.service.FieldTypeService;\r\n" +// + "import com.realnet.fnd.entity.Error;\r\n" +// + "import com.realnet.fnd.entity.ErrorPojo;\r\n" +// + "import com.realnet.fnd.entity.Rn_Lookup_Values;\r\n" +// + "import com.realnet.fnd.entity.Rn_Module_Setup;\r\n" +// + "import com.realnet.fnd.entity.Rn_Project_Setup;\r\n" +// + "import com.realnet.fnd.entity.Success;\r\n" +// + "import com.realnet.fnd.entity.SuccessPojo;\r\n" +// + "import com.realnet.fnd.service.Rn_LookUp_Service;\r\n" +// + "import com.realnet.utils.Constant;\r\n" +// + "import com.realnet.utils.RealNetUtils;\r\n" +// + "import com.realnet.wfb.entity.Rn_Fb_Header;\r\n" +// + "import com.realnet.wfb.entity.Rn_Fb_Line;\r\n" +// + "import com.realnet.wfb.entity.Rn_Fb_Line_DTO;\r\n" +// + "import com.realnet.wfb.service.Rn_WireFrame_Service;\r\n" +// + "\r\n" +// + "import io.swagger.annotations.Api;\r\n" +// + "\r\n" +// + "@RestController\r\n" +// // CONTROLLER NAME SHOULD CHANGE +// // DEPENDS ON TECH_STACK/OBJECT_tYPE/SUB_OBJECT_TYPE +// + "@RequestMapping(value = \"/api\", produces = MediaType.APPLICATION_JSON_VALUE)\r\n" +// + "@Api(tags = { \"Master Builder\" })\r\n" +// + "public class " + childMasterBuilderName + " {\r\n" + "\r\n" + "\r\n" +// + " @Value(\"${angularProjectPath}\")\r\n" +// + " private String angularProjectPath;" +// + " @Value(\"${projectPath}\")\r\n" +// + " private String projectPath;" +// +// // DEPENDENCIES FOR WIREFRAME +// + " @Autowired\r\n" +// + " private Rn_WireFrame_Service wireFrameService;\r\n" + +// "\r\n" + +// " @Autowired\r\n" +// + " private Rn_LookUp_Service lookUpService;\r\n" +// + "\r\n" +// + " @Autowired\r\n" +// + " private Rn_Cff_ActionBuilder_Service actionBuilderService;\r\n" +// + "\r\n" +// + " @Autowired\r\n" +// + " private ModelMapper modelMapper;\r\n" +// + "\r\n" +// + " @Autowired\r\n" +// + " private FieldTypeService fieldTypeService;\r\n" +// +// + " @GetMapping(value = \"/" + childMasterBuilderName + "\")\r\n" +// + " public ResponseEntity build_wireframe(@RequestParam(\"header_id\") Integer id) throws IOException {\r\n" + "\r\n" +// + " System.out.println(\"id ::\"+id);" +// + "\n lookUpService.createTable(id);" +// + " \n // extra button \n List extraButton = wireFrameService.getExtraButton(id);" +// + " \n // HEADER VALUE\r\n" +// + " Rn_Fb_Header rn_fb_header = wireFrameService.getById(id);\r\n" +// + " \r\n" +// + " // LINE VALUES\r\n" +// + " List rn_fb_lines = rn_fb_header.getRn_fb_lines();\r\n" +// + " \r\n" +// + " // MODULE DETAILS\r\n" +// + " Rn_Module_Setup module = rn_fb_header.getModule();\r\n" +// + " \r\n" +// + " // PROJECT DETAILS\r\n" +// + " Rn_Project_Setup project = module.getProject();\r\n" +// + " \r\n" +// // ATTRIBUTE FLEX +// + " // ATTRIBUTE FLEX VALUES\r\n" +// + " List attribute_flex_values = lookUpService.getExtensions();\r\n" +// + " String project_name = project.getProjectName();\r\n" +// + " String module_name = module.getModuleName();" +// +// // header table values +// + " /*\r\n" +// + " * Header Table Values\r\n" +// + " * @GET UI_NAME\r\n" +// + " * @SET controller, model, repository, service name.\r\n" +// + " */\r\n" +// + " String technology_stack = rn_fb_header.getTechStack();\r\n" +// + " String ui_name = RealNetUtils.toFirstUpperCase(rn_fb_header.getUiName());\r\n" +// + " String form_code = rn_fb_header.getFormCode(); // value will come from db\r\n" +// +// + " String controller_name = ui_name.concat(\"_Controller\");\r\n" +// + " String dao_name = ui_name.concat(\"_Dao\");\r\n" +// + " String dao_name_lower = dao_name.toLowerCase();" +// + " String dao_impl_name = ui_name.concat(\"_DaoImpl\");\r\n" +// + " String repository_name = ui_name.concat(\"_Repository\");\r\n" +// + " String service_name = ui_name.concat(\"_Service\");\r\n" +// + " String service_impl_name = ui_name.concat(\"_ServiceImpl\");\r\n" + "\r\n" +// + " String table_name = ui_name.concat(\"_t\"); // For @Column(table=\"table_name\") && Model class name\r\n" +// + "\r\n" +// //+ " String line_table_name = ui_name.concat(\"_line_t\");\r\n" + "\r\n" +// + " /*----First Upper names (back-end)----------*/\r\n" +// + " String controller_name_first_upper = RealNetUtils.toFirstUpperCase(controller_name);\r\n" +// + " String repository_name_first_upper = RealNetUtils.toFirstUpperCase(repository_name);\r\n" +// + " String dao_name_first_upper = RealNetUtils.toFirstUpperCase(dao_name);\r\n" +// + " String dao_impl_name_first_upper = RealNetUtils.toFirstUpperCase(dao_impl_name);\r\n" +// + " String service_name_first_upper = RealNetUtils.toFirstUpperCase(service_name);\r\n" +// + " String service_impl_name_first_upper = RealNetUtils.toFirstUpperCase(service_impl_name);\r\n" +// + " String table_name_first_upper = RealNetUtils.toFirstUpperCase(table_name);\r\n" +// + " String table_name_upper = table_name.toUpperCase(); // For Model class\r\n" + "\r\n" +// //+ " String line_table_name_first_upper = RealNetUtils.toFirstUpperCase(line_table_name);\r\n" +// + " /*-------------lower names (back-end)----------*/\r\n" +// + " String table_name_lower = table_name.toLowerCase();\r\n" +// + " String repository_name_lower = repository_name.toLowerCase();\r\n" +// + " String service_name_lower = service_name.toLowerCase();\r\n" +// + "\r\n" +// +// //DTO APPROACH FOR CALLING A SERVICE +// + " List lineListDto = rn_fb_lines.stream().map(line -> modelMapper.map(line, Rn_Fb_Line_DTO.class))\r\n" +// + " .collect(Collectors.toList());\r\n" +// + " \r\n" +// + " // set table name in the dto class\r\n" +// + " for(Rn_Fb_Line_DTO dto : lineListDto) {\r\n" +// + " dto.setTable_name(table_name_lower);\r\n" +// + " }\r\n" +// +// // ======= NEED TO IMPLEMENT LOGIC FOR DIFFERENT TECHNOLOGY TYPE ==== +// ); // +// +// +// // =========== FRONT-END OBJECT NAMES ============== +// childMasterBuilderCode.append("// ===========FRONT END FILE NAMES DEPENDS ON UI NAME===============\r\n" +// + " String ng_ui_name = RealNetUtils.toFirstUpperCase(ui_name);\r\n" +// + " String ng_model_ts_name = ng_ui_name.concat(\"_t\");\r\n" +// + " String ng_component_ts_name = ng_ui_name.concat(\"Component\");\r\n" +// + " String ng_module_ts_name = ng_ui_name.concat(\"Module\");\r\n" +// + " String ng_service_ts_name = ng_ui_name.concat(\"Service\");\r\n" +// + " String ng_routing_module_ts_name = ng_ui_name.concat(\"RoutingModule\");\r\n" + "\r\n" +// + " String ng_service_ts_name_lower = ui_name.toLowerCase().concat(\"Service\");\r\n" +// + " String ng_model_ts_name_lower = ng_model_ts_name.toLowerCase();\r\n" +// + " // Routing Path names\r\n" +// + " String ng_path_name = ui_name.toLowerCase();\r\n" +// + " // CRUD Components name\r\n" +// + " String ng_all_grid_view_component_name = \"All\" + ng_ui_name.concat(\"Component\");\r\n" +// + " String ng_add_form_component_name = \"Add\" + ng_ui_name.concat(\"Component\");\r\n" +// + " String ng_edit_component_name = \"Edit\" + ng_ui_name.concat(\"Component\");\r\n" +// + " String ng_read_only_component_name = ng_ui_name + \"DetailsComponent\";\r\n" +// + " // Extension Components name\r\n" +// + " String ng_extension_add_component_name = \"AddExt\" + ng_ui_name.concat(\"Component\");\r\n" +// + " // File Folder name\r\n" +// + " String ng_folder_name = ui_name.toLowerCase();\r\n" +// + " String ng_file_name = ui_name.toLowerCase();\r\n" +// + "\r\n"); +// +// String action_builder_code = fieldTypeService.angular_action_builder_code(); +// +// // DYNAMIC VARIABLE FOR FILE-NAME DEPENDS ON UI NAME +// childMasterBuilderCode.append( +// variablesDynamicCode // this is the file name with extension(from params table) +// + "\r\n" +// // MASTER CONTROLLER CODE START +// + " FileWriter fw = null;\r\n" +// + " BufferedWriter bw = null;\r\n" +// + " try { \r\n" +// // ACTION BUILDER CODE +// + action_builder_code +// + // =========== VARIABLE CODE WILL BE APPEND HERE ===============// +// stringBuilderDynamicCode +// + "\r\n"); +// +// // UPDATE MENU +// // String angular_update_sidenav = ""; +// childMasterBuilderCode.append(moduleCode +"\r\n" + +// // 22:30 UPDATE SIDE BAR START +// "/*-----------------------UPDATE ADMIN ROUTING TS FILE --------------------*/\r\n" +// + " // String frontEndDir = angularProjectPath.concat(\"/frontend/\");\n" +// + " File adminRoutingModule = new File(projectPath+\"/Projects/\"+project_name+ \"/webui/src/app/app-routing.module.ts\");\r\n" +// + " File tempRoutingModule = new File(projectPath+\"/Projects/\"+project_name+\"/webui/src/app/temp-routing.module.ts\");\r\n" +// + "\r\n" + +// " BufferedReader reader = new BufferedReader(new FileReader(adminRoutingModule));\r\n" + +// " BufferedWriter writer = new BufferedWriter(new FileWriter(tempRoutingModule));\r\n" + +// " String removeStr = \"]}];@NgModule({imports: [RouterModule.forChild(routes)],exports: [RouterModule]})export class AdminRoutingModule{}\";\r\n" + +// " String currentLine;\r\n" + +// " System.out.println(adminRoutingModule.getName());\r\n" + +// " while ((currentLine = reader.readLine()) != null) {\r\n" + +// " String trimmedLine = currentLine.trim();\r\n" + +// " if (trimmedLine.equals(removeStr)) {\r\n" + +// " currentLine = \"\";\r\n" + +// " }\r\n" + +// " writer.write(currentLine + System.getProperty(\"line.separator\"));\r\n" + +// "\r\n" + +// " }\r\n" + +// " writer.close();\r\n" + +// " reader.close();\r\n" + +// " boolean delete = adminRoutingModule.delete();\r\n" + +// " boolean b22 = tempRoutingModule.renameTo(adminRoutingModule);\r\n" + +// "\r\n" + +// " StringBuilder admin_routing_module_string = new StringBuilder();\r\n" + +// " admin_routing_module_string.append(\" \");\r\n" + +// " String adminRoutingModuleName = projectPath+\"/Projects/\"+project_name+ \"/webui/src/app/app-routing.module.ts\";\r\n" + +// "\r\n" + +// " fw = new FileWriter(adminRoutingModuleName, true);\r\n" + +// " fw.write(admin_routing_module_string.toString());\r\n" + +// " fw.close();\r\n" + +// "\r\n" +// +// ); +// +// // MODULE CREATE CODE +// childMasterBuilderCode.append(" } catch (FileNotFoundException e) {\r\n" +// + " e.printStackTrace();\r\n" +// + " ErrorPojo errorPojo = new ErrorPojo();\r\n" +// + " Error error = new Error();\r\n" +// + " error.setTitle(Constant.FORM_BUILDER_API_TITLE);\r\n" +// + " error.setMessage(Constant.FORM_BUILD_FAILURE);\r\n" +// + " errorPojo.setError(error);\r\n" +// + " return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED);\r\n" +// + " }\r\n" +// + " SuccessPojo successPojo = new SuccessPojo();\r\n" +// + " Success success = new Success();\r\n" +// + " success.setTitle(Constant.FORM_BUILDER_API_TITLE);\r\n" +// + " success.setMessage(Constant.FORM_BUILD_SUCCESS);\r\n" +// + " successPojo.setSuccess(success);\r\n" +// + " return new ResponseEntity(successPojo, HttpStatus.OK);\r\n" +// + "\r\n" +// +"\n}" +// +"}"); +// +// // System.out.println(masterBuilderCode.toString()); +// +// FileWriter fw = null; +// BufferedWriter bw = null; +// try { +// // FILE NAME SHOULD CHANGE DEPENDS ON TECH_STACK/OBJECT_tYPE/SUB_OBJECT_TYPE +// File masterBuilderFile = new File( +// projectPath + "/src/main/java/com/realnet/builders/" + childMasterBuilderName + ".java"); +// if (!masterBuilderFile.exists()) { +// masterBuilderFile.createNewFile(); +// } +// fw = new FileWriter(masterBuilderFile.getAbsoluteFile()); +// bw = new BufferedWriter(fw); +// bw.write(childMasterBuilderCode.toString()); +// bw.close(); +// } catch (FileNotFoundException e) { +// e.printStackTrace(); +// ErrorPojo errorPojo = new ErrorPojo(); +// Error error = new Error(); +// error.setTitle(Constant.MASTER_BUILDER_API_TITLE); +// error.setMessage(Constant.MASTER_BUILDER_FAILURE); +// errorPojo.setError(error); +// return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); +// } +// +// SuccessPojo successPojo = new SuccessPojo(); +// Success success = new Success(); +// success.setTitle(Constant.MASTER_BUILDER_API_TITLE); +// success.setMessage(Constant.MASTER_BUILDER_SUCCESS); +// successPojo.setSuccess(success); +// return new ResponseEntity(successPojo, HttpStatus.CREATED); +// } +//} diff --git a/backend/BaseProject/test4/codeextractor/controller/CodeExtractorController.java b/backend/BaseProject/test4/codeextractor/controller/CodeExtractorController.java new file mode 100644 index 0000000..69f2f4e --- /dev/null +++ b/backend/BaseProject/test4/codeextractor/controller/CodeExtractorController.java @@ -0,0 +1,778 @@ +package com.realnet.codeextractor.controller; + +import java.io.BufferedOutputStream; +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.StandardCopyOption; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.validation.Valid; + +import org.apache.commons.io.FilenameUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; +import org.springframework.data.domain.Sort; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.util.StringUtils; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.servlet.support.ServletUriComponentsBuilder; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.realnet.codeextractor.entity.FileDetails; +import com.realnet.codeextractor.entity.FileListDto; +import com.realnet.codeextractor.entity.Rn_Bcf_Extractor; +import com.realnet.codeextractor.entity.Rn_Bcf_Extractor_Params; +import com.realnet.codeextractor.response.CodeExtractorParamsResponse; +import com.realnet.codeextractor.response.CodeExtractorResponse; +import com.realnet.codeextractor.service.Rn_Bcf_Extractor_Params_Service; +import com.realnet.codeextractor.service.Rn_Bcf_Extractor_Service; +import com.realnet.fnd.entity.Error; +import com.realnet.fnd.entity.ErrorPojo; +import com.realnet.fnd.entity.Success; +import com.realnet.fnd.entity.SuccessPojo; +import com.realnet.fnd.service.FileStorageService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.realnet.utils.Constant; +import com.realnet.utils.RealNetUtils; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import net.lingala.zip4j.ZipFile; +import net.lingala.zip4j.exception.ZipException; + +@Slf4j +@JsonAutoDetect(fieldVisibility = Visibility.ANY) +@RestController +@RequestMapping(value = "/api", produces = MediaType.APPLICATION_JSON_VALUE) +@Api(tags = { "Code Extractor" }) +public class CodeExtractorController { + + @Autowired + private AppUserServiceImpl userService; + + @Autowired + private FileStorageService fileStorageService; + + @Autowired + private Rn_Bcf_Extractor_Service extractorService; + + @Autowired + private Rn_Bcf_Extractor_Params_Service extractorParamsService; + + @Value("${projectPath}") + private String projectPath; + + // GET ALL SORTED AND PAGINATED DATA + @ApiOperation(value = "List of of Bcf Extractor", response = Rn_Bcf_Extractor.class) + @GetMapping("/bcf-extractor") + public CodeExtractorResponse getExtractors( + @RequestParam(value = "page", defaultValue = "0", required = false) Integer page, + @RequestParam(value = "size", defaultValue = "20", required = false) Integer size) { + // sorted data + Pageable paging = PageRequest.of(page, size, Sort.by("createdAt").descending()); + Page result = extractorService.getAll(paging); + + CodeExtractorResponse resp = new CodeExtractorResponse(); + resp.setPageStats(result, true); + resp.setItems(result.getContent()); +// //Map> extractorMap = Collections.singletonMap("extractior", result.getContent()); +// return new ResponseEntity>>(extractorMap, HttpStatus.OK); + return resp; + + } + +// // GET ALL +// @ApiOperation(value = "List of Bcf Extractor") +// @GetMapping("/bcf-extractor") +// public ResponseEntity getExtractors() { +// List result = extractorService.getAll(); +// Map> extractorMap = Collections.singletonMap("extractior", result); +// System.out.println(extractorMap); +// return ResponseEntity.ok().body(result); +// } + + // GET BY ID + @ApiOperation(value = "Get an Bcf Extractor", response = Rn_Bcf_Extractor.class) + @GetMapping("/bcf-extractor/{id}") + public ResponseEntity getExtractorById(@PathVariable(value = "id") int id) { + Rn_Bcf_Extractor bcf_extractor = extractorService.getById(id); + + // Map extractorMap = + // Collections.singletonMap("extractior", bcf_extractor); + // return new ResponseEntity>(extractorMap, + // HttpStatus.OK); + // return ResponseEntity.ok().body(bcf_extractor); + return new ResponseEntity(bcf_extractor, HttpStatus.OK); + + } + + // ========= SAVE AND UNZIP FILE AND MOVE TO A SPECIFIC PATH ======== + @ApiOperation(value = "Add new Bcf Extractor") + @PostMapping(value = "/bcf-extractor") + public ResponseEntity saveExtractor(// @Valid @RequestBody Rn_Bcf_Extractor bcf_extractor, + @RequestParam(value = "bcf_extractor", required = true) String extractorReq, + @RequestParam(value = "file", required = true) MultipartFile file) + throws IOException, JsonParseException, JsonMappingException { + + System.out.println("extractorReq = " + extractorReq); + System.out.println("file = " + file.getOriginalFilename()); + + log.debug("extractorReq => {} ", extractorReq); + log.debug("file => {} ", file.getOriginalFilename()); + ObjectMapper mapper = new ObjectMapper(); + Rn_Bcf_Extractor bcf_extractor = mapper.readValue(extractorReq, Rn_Bcf_Extractor.class); + log.debug("bcf_extractor => {}", bcf_extractor); + AppUser loggedInUser = userService.getLoggedInUser(); + bcf_extractor.setAccountId(loggedInUser.getAccount().getAccount_id()); + bcf_extractor.setCreatedBy(loggedInUser.getUserId()); + + String techStackKey = RealNetUtils.getTechnologyStackKey(bcf_extractor.getTech_stack()); + System.out.println("TECHNOLOGY STACK KEY = " + techStackKey); + bcf_extractor.setTech_stack_key(techStackKey); + + // upload to directory + String uploadPath = projectPath.concat("/src/main/resources/zip-uploads/"); + fileStorageService.uploadFile(file, uploadPath); + + String fileName = file.getOriginalFilename(); + System.out.println( + "UPLOAD PATH = " + uploadPath + "\nFILE NAME = " + fileName + "\nFile Size = " + file.getSize()); + + // SAVE ZIP FILE NAME INTO DATABASE + bcf_extractor.setSample_file_name(fileName); + extractorService.save(bcf_extractor); + + // ZIP TO UNZIP + String zipFilePath = uploadPath + fileName; + String fileNameWithOutExt = FilenameUtils.removeExtension(fileName); + Date d = new Date(); + String destFolderName = fileNameWithOutExt + "_" + d.getTime(); + String destPath = projectPath.concat("/src/main/resources/extracted-files/" + destFolderName); + System.out.println("ZIP FILE PATH = " + zipFilePath + "\nDESTINATION PATH = " + destPath); + try { + ZipFile zipFile = new ZipFile(zipFilePath); + /* + * // Get the list of file headers from the zip file List fileHeaderList = + * zipFile.getFileHeaders(); // Loop through the file headers for (int i = 0; i< + * fileHeaderList.size(); i++) { FileHeader fileHeader = (FileHeader) + * fileHeaderList.get(i); String name = fileHeader.getFileName(); + * if(name.contains(".html") || name.contains(".css") || name.contains(".java") + * || name.contains(".jsp") || name.contains(".ts") ) { + * zipFile.extractFile(fileHeader, destPath); } } + */ + zipFile.extractAll(destPath); + } catch (ZipException e) { + e.printStackTrace(); + } + + int headerId = bcf_extractor.getId(); + System.out.println("Code Extractor Parameter Header Id = " + headerId); + String tech_stack = bcf_extractor.getTech_stack(); + String obj_type = bcf_extractor.getObject_type(); + String sub_obj_type = bcf_extractor.getSub_object_type(); + + // MOVE FILES TO PARENT DIRECTORY & DELETE EMPTY FILES & SAVE PATHS INTO PARAMS + // TABLE + extractorService.saveListOFiles(headerId, tech_stack, obj_type, sub_obj_type, destPath); + + // SAVE MOVED PATHS INTO DB + extractorService.moveFiles(headerId, destPath); + + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.EXTRACTOR_API_TITLE); + success.setMessage(Constant.EXTRACTOR_CREATED_SUCCESSFULLY); + successPojo.setSuccess(success); + log.debug("Response {} ", successPojo); + return new ResponseEntity(successPojo, HttpStatus.CREATED); +// Map response = new HashMap<>(); +// response.put("SUCCESS", Boolean.TRUE); +// return ResponseEntity.status(HttpStatus.CREATED).body(response); + } + + // UPDATE bcf extractor + @ApiOperation(value = "Update an Extension", response = Rn_Bcf_Extractor.class) + @PutMapping("/bcf-extractor/{id}") + public ResponseEntity updateExtractor( + @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken, + @PathVariable(value = "id") int id, @Valid @RequestBody Rn_Bcf_Extractor bcf_extractor) { + AppUser loggedInUser = userService.getLoggedInUser(); + bcf_extractor.setUpdatedBy(loggedInUser.getUserId()); + + Rn_Bcf_Extractor updatedExtractor = extractorService.updateById(id, bcf_extractor); + + if (bcf_extractor.getId() != updatedExtractor.getId()) { + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.EXTRACTOR_API_TITLE); + error.setMessage(Constant.EXTRACTOR_NOT_DELETED); + errorPojo.setError(error); + // return ResponseEntity.status(HttpStatus.NOT_FOUND).body(response); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.EXTRACTOR_API_TITLE); + success.setMessage(Constant.EXTRACTOR_UPDATED_SUCCESSFULLY); + successPojo.setSuccess(success); + return new ResponseEntity(successPojo, HttpStatus.OK); + + // return ResponseEntity.status(HttpStatus.ACCEPTED).body(updatedRn_Ext_Field); + } + + // DELETE bcf extractor + @DeleteMapping("/bcf-extractor/{id}") + public ResponseEntity deleteExtractor(@PathVariable(value = "id") int id) { + boolean deleted = extractorService.deleteById(id); + // Map response = new HashMap<>(); + if (deleted) { + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.EXTRACTOR_API_TITLE); + success.setMessage(Constant.EXTRACTOR_DELETED_SUCCESSFULLY); + successPojo.setSuccess(success); + return new ResponseEntity(successPojo, HttpStatus.OK); + // response.put("deleted", Boolean.TRUE); + // return ResponseEntity.status(HttpStatus.OK).body(response); + } + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.EXTRACTOR_API_TITLE); + error.setMessage(Constant.EXTRACTOR_NOT_DELETED); + errorPojo.setError(error); + // return ResponseEntity.status(HttpStatus.NOT_FOUND).body(response); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + + // =============== BCF CODE EXTRACTOR PARAMS ================ + + // GET ALL SORTED AND PAGINATED DATA BY HEADER ID + @ApiOperation(value = "List of of Bcf Extractor Parameters", response = Rn_Bcf_Extractor.class) + @GetMapping("/bcf-extractor-params") + public CodeExtractorParamsResponse codeExtractorParameters( + @RequestParam(value = "header_id", required = true) Integer headerId, // use param id to get data + @RequestParam(value = "page", defaultValue = "0", required = false) Integer page, + @RequestParam(value = "size", defaultValue = "20", required = false) Integer size) { + // sorted data + // Pageable paging = PageRequest.of(page, size, + // Sort.by("createdAt").descending()); + List result = extractorParamsService.getByHeaderIdOrderByDate(headerId); + // log.debug("extractor params sorted data : {}", result.toString()); + CodeExtractorParamsResponse resp = new CodeExtractorParamsResponse(); + // resp.setPageStats(result, true); + resp.setItems(result); + return resp; +// Map> extractorMap = Collections.singletonMap("extractorParams", result); +// return new ResponseEntity>>(extractorMap, HttpStatus.OK); + } + + // GET BY ID + @ApiOperation(value = "Get an Bcf Extractor Parameter", response = Rn_Bcf_Extractor_Params.class) + @GetMapping("/bcf-extractor-params/{id}") + public ResponseEntity codeExtractorParamsById(@PathVariable(value = "id") int id) { + Rn_Bcf_Extractor_Params bcf_extractor_params = extractorParamsService.getById(id); + + // Map extractorMap = + // Collections.singletonMap("extractorParams",bcf_extractor_params); + // return new ResponseEntity>(extractorMap, + // HttpStatus.OK); + return new ResponseEntity(bcf_extractor_params, HttpStatus.OK); + + } + + @ApiOperation(value = "Add new Extractor Parameter", response = Rn_Bcf_Extractor_Params.class) + @PostMapping(value = "/bcf-extractor-params") // use param id to update data + public ResponseEntity addNewExtractorParam(@RequestParam(value = "header_id", required = true) Integer headerId, + @Valid @RequestBody Rn_Bcf_Extractor_Params bcf_extractor_param) { + Rn_Bcf_Extractor extractor = extractorService.getById(headerId); + bcf_extractor_param.setRn_bcf_extractor(extractor); // set header id + Rn_Bcf_Extractor_Params savedParam = extractorParamsService.save(bcf_extractor_param); + if (savedParam == null) { + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.EXTRACTOR_API_TITLE); + error.setMessage(Constant.EXTRACTOR_NOT_CREATED); + errorPojo.setError(error); + // return ResponseEntity.status(HttpStatus.NOT_FOUND).body(response); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.EXTRACTOR_API_TITLE); + success.setMessage(Constant.EXTRACTOR_CREATED_SUCCESSFULLY); + successPojo.setSuccess(success); + return new ResponseEntity(successPojo, HttpStatus.OK); + } + + // UPDATE bcf extractor param + @ApiOperation(value = "Update an Extension Parameter", response = Rn_Bcf_Extractor_Params.class) + @PutMapping("/bcf-extractor-params/{id}") + public ResponseEntity updatecodeExtractorParam( + @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken, + @RequestParam(value = "header_id", required = false) Integer headerId, @PathVariable(value = "id") int id, + @Valid @RequestBody Rn_Bcf_Extractor_Params bcf_extractor_param) { + AppUser loggedInUser = userService.getLoggedInUser(); + bcf_extractor_param.setUpdatedBy(loggedInUser.getUserId()); + + Rn_Bcf_Extractor_Params updatedExtractorParam = extractorParamsService.updateById(id, bcf_extractor_param); + + if (bcf_extractor_param.getId() != updatedExtractorParam.getId()) { + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.EXTRACTOR_API_TITLE); + error.setMessage(Constant.EXTRACTOR_NOT_UPDATED); + errorPojo.setError(error); + // return ResponseEntity.status(HttpStatus.NOT_FOUND).body(response); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.EXTRACTOR_API_TITLE); + success.setMessage(Constant.EXTRACTOR_UPDATED_SUCCESSFULLY); + successPojo.setSuccess(success); + // return ResponseEntity.status(HttpStatus.ACCEPTED).body(updatedRn_Ext_Field); + return new ResponseEntity(successPojo, HttpStatus.OK); + } + + // ========= TOGGLE BUTTON SERVICE FOR EXTRACTION AND CREATION ENABLE DISABLE + // BUTTON // + + // EXTRACTION STATUS CHANGE + @GetMapping(value = "/bcf-extractor-params/extraction-status-change") + public ResponseEntity extractionStatusChange(@RequestParam(value = "id") int id) throws IOException { + AppUser loggedInUser = userService.getLoggedInUser(); + Rn_Bcf_Extractor_Params param = extractorParamsService.getById(id); + log.debug("Extractor Param : {} ", param); + param.setIs_extraction_enabled(!param.isIs_extraction_enabled()); + param.setUpdatedBy(loggedInUser.getUserId()); + + Rn_Bcf_Extractor_Params updatedParam = extractorParamsService.save(param); + log.debug("UPDATED Extractor Param : {} ", updatedParam); + if (param.getId() != updatedParam.getId()) { + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.EXTRACTOR_API_TITLE); + error.setMessage(Constant.EXTRACTOR_NOT_UPDATED); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.EXTRACTOR_API_TITLE); + success.setMessage(Constant.EXTRACTOR_UPDATED_SUCCESSFULLY); + successPojo.setSuccess(success); + return new ResponseEntity(successPojo, HttpStatus.OK); + } + + // CREATION STATUS CHANGE + @GetMapping(value = "/bcf-extractor-params/creation-status-change") + public ResponseEntity creationStatusChange(@RequestParam(value = "id") int id) throws IOException { + AppUser loggedInUser = userService.getLoggedInUser(); + + Rn_Bcf_Extractor_Params param = extractorParamsService.getById(id); + log.debug("Extractor Param : {} ", param); + param.setIs_creation_enabled(!param.isIs_creation_enabled()); + + param.setUpdatedBy(loggedInUser.getUserId()); + Rn_Bcf_Extractor_Params updatedParam = extractorParamsService.save(param); + log.debug("UPDATED Extractor Param : {} ", updatedParam); + if (param.getId() != updatedParam.getId()) { + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.EXTRACTOR_API_TITLE); + error.setMessage(Constant.EXTRACTOR_NOT_UPDATED); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.EXTRACTOR_API_TITLE); + success.setMessage(Constant.EXTRACTOR_UPDATED_SUCCESSFULLY); + successPojo.setSuccess(success); + return new ResponseEntity(successPojo, HttpStatus.OK); + } + + // ========== FILE CODE EDITOR PART ============// + + /* + * File list(from code extractor params table) for dropDown in file editor + */ + @ApiOperation(value = "Get Extracted File List", response = FileDetails.class) + @GetMapping("/bcf-extractor-file-list/{id}") + public ResponseEntity getFileListBy(@PathVariable(value = "id") int headerId) { + + List params = extractorParamsService.getByHeaderId(headerId); + ArrayList response = new ArrayList<>(); + for (Rn_Bcf_Extractor_Params param : params) { + int id = param.getId(); + String fileName = param.getName_string(); + FileListDto fileList = new FileListDto(); + fileList.setId(id); + fileList.setFileName(fileName); + response.add(fileList); + } + + if (response.isEmpty()) { + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.FILE_LIST_API_TITLE); + error.setMessage(Constant.FILE_LIST_IS_EMPTY); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } else { + return new ResponseEntity>(response, HttpStatus.OK); + } + } + + // =====read files and get file contents =========// + @ApiOperation(value = "Get an Bcf Extractor Parameter", response = FileDetails.class) + @GetMapping("/file-code-read/{id}") + public ResponseEntity readFilesById(@PathVariable(value = "id") int id) { + Rn_Bcf_Extractor_Params params = extractorParamsService.getById(id); + String address_string = params.getAddress_string(); // uploaded path + String moved_address_string = params.getMoved_address_string(); // in a same folder + // String reference_address_string = params.getReference_address_string(); + + String filePath = moved_address_string.replace(projectPath, ""); + filePath = projectPath.concat(filePath); + StringBuilder code = new StringBuilder(); + File file = null; + try { + file = new File(filePath); + String fileName = file.getName(); + // String fileType = FilenameUtils.getExtension(fileName); + log.info("File Name : {}", fileName); + // log.info("File Type : {} ", fileType); + // BufferedReader br = new BufferedReader(new FileReader(file)); + // String fileString = FileUtils.readFileToString(file, StandardCharsets.UTF_8); + + FileReader fr = new FileReader(file); + BufferedReader br = new BufferedReader(fr); + String line; + while ((line = br.readLine()) != null) { + code.append(line + "\n"); + } + fr.close(); + br.close(); + } catch (IOException e) { + log.debug("IO Exception Handled..."); + log.error(e.getMessage()); + e.getMessage(); + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.FILE_OPERATION_API_TITLE); + error.setMessage(Constant.FILE_NOT_FOUND_EXCEPTION); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + + FileDetails fileDetails = new FileDetails(); + fileDetails.setId(id); + fileDetails.setText(code.toString()); + + return new ResponseEntity(fileDetails, HttpStatus.OK); + } + + // ============= code editor (save data into file) ========= + @ApiOperation(value = "Save File Data") + @PostMapping(value = "/file-code-save") + public ResponseEntity codeSaveInFile(@Valid @RequestBody FileDetails fileDetails) { + + int paramsId = fileDetails.getId(); + String code = fileDetails.getText(); + log.debug("updated code : {}", code); + + Rn_Bcf_Extractor_Params params = extractorParamsService.getById(paramsId); + // String address_string = params.getAddress_string(); + String moved_address_string = params.getMoved_address_string(); + // String reference_address_string = params.getReference_address_string(); + + // projectPath + // String filePath = projectPath.concat(reference_address_string); + + String filePath = moved_address_string.replace(projectPath, ""); + filePath = projectPath.concat(filePath); + + File file = null; + try { + file = new File(filePath); + String fileName = file.getName(); + String fileType = FilenameUtils.getExtension(fileName); + log.info("File Name : {}", fileName); + log.info("File Type : {} ", fileType); +// if(fileType.equalsIgnoreCase("java") || fileType.equalsIgnoreCase("ts")|| fileType.equalsIgnoreCase("txt")) { +// code = Jsoup.parse(code).text(); +// } + BufferedWriter bw = new BufferedWriter(new FileWriter(file, false)); // OVER WRITE FILE + bw.write(code); + bw.close(); + } catch (FileNotFoundException e) { + log.debug("File Not Found Exception Handled..."); + log.error(e.getMessage()); + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.FILE_OPERATION_API_TITLE); + error.setMessage(Constant.FILE_NOT_FOUND_EXCEPTION); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } catch (IOException e) { + log.error(e.getMessage()); + log.debug("IOException Handled..."); + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.FILE_OPERATION_API_TITLE); + error.setMessage(Constant.FILE_CODE_SAVE_FAILURE); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.FILE_OPERATION_API_TITLE); + success.setMessage(Constant.FILE_CODE_SAVE_SUCCESSFULLY); + successPojo.setSuccess(success); + return new ResponseEntity(successPojo, HttpStatus.OK); + } + + // ======= STATIC CODE READ ========= + @ApiOperation(value = "Read Static File and Return Code", response = FileDetails.class) + @GetMapping("/static-file-code-read/{id}") + public ResponseEntity readStaticFilesById(@PathVariable(value = "id") int id) { + Rn_Bcf_Extractor_Params param = extractorParamsService.getById(id); + String name_string = param.getName_string(); + + + String moved_address_string = param.getMoved_address_string(); // in a same folder + + + String staticFileName = "SE_".concat(name_string); + String staticPath = moved_address_string.replace(projectPath, ""); + staticPath = staticPath.substring(0, staticPath.lastIndexOf("/")); + staticPath = staticPath.concat("/static_code/"); // static code folder + staticPath = staticPath.concat(staticFileName); // static filde name + + // projectPath + String filePath = projectPath.concat(staticPath); + +// String filePath = staticPath; //by gk + + StringBuilder code = new StringBuilder(); + File file = null; + try { + file = new File(filePath); + String fileName = file.getName(); + // String fileType = FilenameUtils.getExtension(fileName); + log.info("Static File Name : {}", fileName); + // BufferedReader br = new BufferedReader(new FileReader(file)); + // String fileString = FileUtils.readFileToString(file, StandardCharsets.UTF_8); + + FileReader fr = new FileReader(file); + BufferedReader br = new BufferedReader(fr); + String line; + while ((line = br.readLine()) != null) { + code.append(line + "\n"); + } + fr.close(); + br.close(); + } catch (IOException e) { + log.debug("IO Exception Handled..."); + log.error(e.getMessage()); + e.getMessage(); + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.FILE_OPERATION_API_TITLE); + error.setMessage(Constant.FILE_NOT_FOUND_EXCEPTION); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + + String codee = code.substring(0, code.lastIndexOf("\n")); // remove last line break + FileDetails fileDetails = new FileDetails(); + fileDetails.setId(id); + fileDetails.setText(codee); + return new ResponseEntity(fileDetails, HttpStatus.OK); + } + + // ======= STATIC CODE SAVE INTO FILE ========= + @ApiOperation(value = "Save File Data") + @PostMapping(value = "/static-file-code-save") + public ResponseEntity staticCodeSaveInFile(@Valid @RequestBody FileDetails fileDetails) { + + int paramsId = fileDetails.getId(); + String code = fileDetails.getText(); + // log.debug("updated code : {}", code); + + Rn_Bcf_Extractor_Params param = extractorParamsService.getById(paramsId); + // String address_string = param.getAddress_string(); + String name_string = param.getName_string(); + String moved_address_string = param.getMoved_address_string(); // in a same folder + + String staticFileName = "SE_".concat(name_string); + String staticPath = moved_address_string.replace(projectPath, ""); + staticPath = staticPath.substring(0, staticPath.lastIndexOf("/")); + staticPath = staticPath.concat("/static_code/"); // static code folder + staticPath = staticPath.concat(staticFileName); // static file name + + // projectPath + String filePath = projectPath.concat(staticPath); + + File file = null; + try { + file = new File(filePath); + String fileName = file.getName(); + log.info("Static File Name : {}", fileName); + + BufferedWriter bw = new BufferedWriter(new FileWriter(file, false)); // OVER WRITE FILE + bw.write(code); + bw.close(); + } catch (FileNotFoundException e) { + log.debug("File Not Found Exception Handled..."); + e.printStackTrace(); + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.FILE_OPERATION_API_TITLE); + error.setMessage(Constant.FILE_NOT_FOUND_EXCEPTION); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } catch (IOException e) { + e.printStackTrace(); + log.debug("IOException Handled..."); + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.FILE_OPERATION_API_TITLE); + error.setMessage(Constant.FILE_CODE_SAVE_FAILURE); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.FILE_OPERATION_API_TITLE); + success.setMessage(Constant.FILE_CODE_SAVE_SUCCESSFULLY); + successPojo.setSuccess(success); + return new ResponseEntity(successPojo, HttpStatus.OK); + } + + // @PostMapping("/upload") + @PostMapping(value = "/upload-file", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) + public ResponseEntity uploadToLocalFileSystem(@RequestParam("file") MultipartFile file) { + + System.out.println("calling upload controller"); + String fileName = StringUtils.cleanPath(file.getOriginalFilename()); + Path path = Paths.get(projectPath + fileName); + try { + Files.copy(file.getInputStream(), path, StandardCopyOption.REPLACE_EXISTING); + } catch (IOException e) { + e.printStackTrace(); + } + String fileDownloadUri = ServletUriComponentsBuilder.fromCurrentContextPath().path("/files/download/") + .path(fileName).toUriString(); + return ResponseEntity.ok(fileDownloadUri); + } + + @RequestMapping(value = "/redirect", produces = { MediaType.APPLICATION_JSON_VALUE }, method = RequestMethod.POST) + public ResponseEntity registerBatchUser(@RequestParam("file") MultipartFile file) { + if (!file.isEmpty()) { + try { + byte[] bytes = file.getBytes(); + BufferedOutputStream stream = new BufferedOutputStream(new FileOutputStream(new File(projectPath))); + stream.write(bytes); + stream.close(); + + } catch (Exception e) { + Map FeedBackStatus = new HashMap(); + return ResponseEntity.ok(FeedBackStatus); + } + + } + return ResponseEntity.ok(null); + } + + @PostMapping(value = "/uploadFile", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) + public String uploadFile(@RequestParam("file") MultipartFile file) throws IOException { + String fileName = file.getOriginalFilename(); + return fileName; + } + + @RequestMapping(value = "/upload-file-2", method = RequestMethod.POST) + public @ResponseBody ResponseEntity> handleFileUpload( + @RequestParam("file") MultipartFile file) { + String name = file.getName(); + System.out.println(name); + + Map FeedBackStatus = new HashMap(); + FeedBackStatus.put("status", "success"); + + return ResponseEntity.ok(FeedBackStatus); + + } + + /* + * @PostMapping(value = "/uploadFile", consumes = + * MediaType.MULTIPART_FORM_DATA_VALUE) public String + * uploadFile2(@RequestParam("file") MultipartFile file)throws IOException { + * Path tempFile = Files.createTempFile(null, null); + * + * Files.write(tempFile, MultipartFile.getBytes()); File fileToSend = + * tempFile.toFile(); + * + * MultiValueMap parameters = new LinkedMultiValueMap<>(); + * + * parameters.add("file", new FileSystemResource(fileToSend)); + * + * HttpHeaders headers = new HttpHeaders(); headers.set("Content-Type", + * "multipart/form-data"); + * + * HttpEntity httpEntity = new HttpEntity<>(parameters, headers); + * + * try { restTemplate.exchange(apiUrl, HttpMethod.POST, httpEntity, + * MyClazz.class); } finally { fileAEnviar.delete(); } + * + * } + */ + + @PostMapping("/upload-gb") + public ResponseEntity uploadFileGb(@RequestParam("file") MultipartFile file) { + return ResponseEntity.ok("working"); + } + +} diff --git a/backend/BaseProject/test4/codeextractor/controller/DynamicCodeExtractionController.java b/backend/BaseProject/test4/codeextractor/controller/DynamicCodeExtractionController.java new file mode 100644 index 0000000..e5f7dce --- /dev/null +++ b/backend/BaseProject/test4/codeextractor/controller/DynamicCodeExtractionController.java @@ -0,0 +1,352 @@ +package com.realnet.codeextractor.controller; + +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileWriter; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; + +import org.apache.commons.io.FileUtils; +import org.apache.commons.io.FilenameUtils; +import org.hibernate.boot.model.source.spi.CascadeStyleSource; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.servlet.ModelAndView; + +import com.realnet.codeextractor.entity.Rn_Bcf_Exception_Rules; +import com.realnet.codeextractor.entity.Rn_Bcf_Extractor; +import com.realnet.codeextractor.entity.Rn_Bcf_Extractor_Params; +import com.realnet.codeextractor.entity.Rn_Bcf_Rules; +import com.realnet.codeextractor.service.Rn_Bcf_Exception_Rule_Library_Service; +import com.realnet.codeextractor.service.Rn_Bcf_Extractor_Params_Service; +import com.realnet.codeextractor.service.Rn_Bcf_Extractor_Service; +import com.realnet.codeextractor.service.Rn_Bcf_Rule_Library_Service; +import com.realnet.fnd.entity.Error; +import com.realnet.fnd.entity.ErrorPojo; +import com.realnet.fnd.entity.Success; +import com.realnet.fnd.entity.SuccessPojo; +import com.realnet.logging.LogExecutionTime; +import com.realnet.utils.Constant; +import com.realnet.utils.RealNetUtils; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; + +@Slf4j +@RestController +@RequestMapping(value = "/api", produces = MediaType.APPLICATION_JSON_VALUE) +@Api(tags = { "Code Extractor" }) +public class DynamicCodeExtractionController { + @Value("${projectPath}") + private String projectPath; + + @Autowired + private Rn_Bcf_Extractor_Service rn_bcf_extractor_service; + + @Autowired + private Rn_Bcf_Extractor_Params_Service rn_bcf_extractor_params_service; + + @Autowired + private Rn_Bcf_Rule_Library_Service bcfRuleLibraryService; + +// @Autowired +// private RealNetUtils utils; + + @Autowired + Rn_Bcf_Exception_Rule_Library_Service rn_bcf_rule_exception_library_service; + + @LogExecutionTime + @ApiOperation(value = "Dynamic Code Extraction") + @GetMapping(value = "/dynamic_code_extraction") + public ResponseEntity dynamicCodeExtraction(@RequestParam(value = "header_id") Integer headerId) + throws IOException + { + + Rn_Bcf_Extractor extractor = rn_bcf_extractor_service.getById(headerId); + String technology_stack = extractor.getTech_stack(); + String object_type = extractor.getObject_type(); + String sub_object_type = extractor.getSub_object_type(); + + System.out.println("FROM Rn_Bcf_Extractor = " + technology_stack + " || " + object_type + " || " + sub_object_type+"||"+headerId); + + // PARAMS + List params = extractor.getRn_bcf_extractor_Params(); +// +// // FILE NAME VARIABLE NAMES IN BUILDER CODE +// Map map = new HashMap(); +// map.put("controller_name_first_upper", "Nil_final_controller"); +// map.put("table_name_first_upper", "Rn_nil_final"); +// map.put("table_name_lower", "rn_nil_final"); +// map.put("table_name_upper", "RN_NIL_FINAL"); +// map.put("service_name_first_upper", "Nil_final_service"); +// map.put("service_name_lower", "nil_final_service"); +// map.put("service_impl_name_first_upper", "Nil_final_serviceimpl"); +// map.put("repository_name_first_upper", "Rn_header_test1_repository"); +// map.put("repository_name_lower", "rn_header_test1_repository"); +// map.put("ng_add_form_component_name", "AddRn_header_test1Component"); +// map.put("ng_all_grid_view_component_name", "AllRn_header_test1Component"); +// map.put("ng_read_only_component_name", "Rn_header_test1DetailsComponent"); +// map.put("ng_edit_component_name", "EditRn_header_test1Component"); +// map.put("ng_extension_add_component_name", "AddExtRn_header_test1Component"); +// map.put("ng_routing_module_ts_name", "Rn_header_test1RoutingModule"); +// map.put("ng_component_ts_name", "Rn_header_test1Component"); +// map.put("ng_module_ts_name", "Rn_header_test1Module"); +// map.put("ng_service_ts_name", "Rn_header_test1Service"); +// map.put("ng_model_ts_name ", "Rn_header_test1_t"); + + // STATIC FILES ( SE_FILE_NAME.EXT) + ArrayList staticFiles = new ArrayList(); + + + + try { + + // PARAMETERS TABLE VALUE + for (Rn_Bcf_Extractor_Params param : params) + { +// System.out.println("---Exception rule for loop--"); + boolean is_extraction_enabled = param.isIs_extraction_enabled(); + boolean is_creation_enabled = param.isIs_creation_enabled(); + String path = param.getMoved_address_string(); + + + File file = new File(path); + String parentPath = file.getParent(); + + String name = file.getName(); + String ConvertedFileName = "SE_" + name; + + // STATIC FILES DIRECTORY + String staticFileParentDir = parentPath + File.separator + "static_code"; + File staticFile = new File(staticFileParentDir + File.separator + ConvertedFileName); + + // STATIC FILE PATH + String staticFileDir = staticFile.getAbsolutePath().replace("\\", "/"); + // ADD STATIC FILE PATH TO ARRAYLIST + if (is_extraction_enabled && is_creation_enabled) { + // System.out.println("STATIC FILE DIR ADDED TO ARRAYLIST = " + staticFileDir); + staticFiles.add(staticFileDir); + + } + } + + // package part MODULE_NAME ADD + + + for (String staticDir : staticFiles) + { + + File file = new File(staticDir); + Path path = Paths.get(staticDir); + StringBuilder code = new StringBuilder(); + List lines = Files.readAllLines(path, StandardCharsets.UTF_8); + + + for (String line : lines) + { + + if (line.startsWith("\"package")) + { + int i = line.lastIndexOf("."); + String head = line.substring(0, i + 1); + String tail = line.substring(i); + String moduleName = "\" + module_name + \""; + line = head + moduleName + tail; + } + code.append(line + "\n"); + + } + + //System.out.println(code); + BufferedWriter br = new BufferedWriter(new FileWriter(file)); // replaced string + br.write(code.toString()); + br.close(); + + } + + + + int count=0; + for (String staticDir : staticFiles) + { + File file1 = new File(staticDir); + Path path1 = Paths.get(staticDir); + StringBuilder code = new StringBuilder(); + StringBuilder code2 = new StringBuilder(); + List lines = Files.readAllLines(path1, StandardCharsets.UTF_8); + for (String line : lines) + { + if (line.startsWith("\"public class")) + { +// + String file_name_var=params.get(count).getFile_name_var(); + +// System.out.println("file namevar "+file_name_var); + + + line = "\"public class \" + "+file_name_var+""+1+" + \"{\"+"; + } + + + + if (line.startsWith("\"public interface")) + { +// + String file_name_var=params.get(count).getFile_name_var(); + +// System.out.println("file namevar "+file_name_var); + + + line = "\"public interface \" + "+file_name_var+""+1+" + \"{\"+"; + } + + + if (line.startsWith("\" templateUrl")) + { +// " templateUrl: './readonly.component.html'," + "\r\n" + + String file_name_var=params.get(count).getFile_name_var(); + +// System.out.println("file namevar "+file_name_var); + + + line = " \" templateUrl: './\"+"+file_name_var+""+1+"+\".html',\"" + "\r\n \n" +"+" ; + } + + if (line.startsWith("\" styleUrls")) + { +// " styleUrls: ['./readonly.component.scss']" + "\r\n" + + String file_name_var=params.get(count).getFile_name_var(); + +// System.out.println("file namevar "+file_name_var); + + + line = " \" styleUrls: ['./\"+"+file_name_var+""+1+"+\".scss']\"" + "\r\n \n"+"+" ; + } + + if (line.startsWith("\"export class")) + { +// "export class ReadonlyComponent implements OnInit {" + "\r\n" + + String file_name_var=params.get(count).getFile_name_var(); + +// System.out.println("file namevar "+file_name_var); + + + line = "\"export class \"+"+file_name_var+""+2+"+\"Component implements OnInit {\"" + "\r\n"+"+" ; + } + + + + code.append(line + "\n"); + + } + count++; + BufferedWriter br = new BufferedWriter(new FileWriter(file1)); // replaced string + br.write(code.toString()); + br.close(); + } + + + + + + + + + // APPLY ALL RULES PRESENT HERE + List rules = bcfRuleLibraryService.getAll(); + + int rulesOuterCount = 0; + for (Rn_Bcf_Rules rule : rules) + { + rulesOuterCount++; + // System.out.println("RULES FOR COUNT = " + ++rulesOuterCount); + String start = rule.getIdentifier_start_string(); + String end = rule.getIdentifier_end_string(); + String replaceWith = rule.getReplacement_string(); + + String tech_stack = rule.getTech_stack(); + String sub_object_type2 = rule.getSub_object_type(); + String object_type2 = rule.getObject_type(); + replaceWith = replaceWith.concat(""); + + if(technology_stack.equals(tech_stack) && sub_object_type.equals(sub_object_type2) && object_type.equals(object_type2)) + { +// System.out.println("main tech stack"+technology_stack+" new "+tech_stack); +// System.out.println("main subobject "+sub_object_type+" new "+sub_object_type2); +// System.out.println("main object "+object_type+" new "+object_type2); + + + int dirCount = 0; + for (String staticDir : staticFiles) + { + dirCount++; + + File staticFile = new File(staticDir); + String staticFileName = staticFile.getName(); + + // System.out.println("========" + staticFileName + "============="); + String fileString = FileUtils.readFileToString(staticFile, StandardCharsets.UTF_8); + String fileType = FilenameUtils.getExtension(staticFileName); + + // don't check empty file for replacement.. + if (!fileString.isEmpty()) { + + // RULE APPLY + String finalString = RealNetUtils.stringReplace(fileString, start, end, replaceWith, + fileType); + + BufferedWriter bw = new BufferedWriter(new FileWriter(staticFile, false)); // replaced + // string + bw.write(finalString); + bw.close(); + + } + } + } + + +// System.out.println("loop count::"+dirCount); + + } + System.out.println("rules outer countt::"+rulesOuterCount); + } catch (FileNotFoundException e) { + e.printStackTrace(); + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.EXTRACTOR_API_TITLE); + error.setMessage(Constant.DYNAMIC_EXTRACTION_FAILED); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.EXTRACTOR_API_TITLE); + success.setMessage(Constant.DYNAMIC_EXTRACTION_SUCCESS); + successPojo.setSuccess(success); + log.debug("Response {} ", successPojo); + return new ResponseEntity(successPojo, HttpStatus.OK); + + } + +} \ No newline at end of file diff --git a/backend/BaseProject/test4/codeextractor/controller/FileUploadController.java b/backend/BaseProject/test4/codeextractor/controller/FileUploadController.java new file mode 100644 index 0000000..48df5f9 --- /dev/null +++ b/backend/BaseProject/test4/codeextractor/controller/FileUploadController.java @@ -0,0 +1,39 @@ +package com.realnet.codeextractor.controller; + +import org.codehaus.jackson.annotate.JsonIgnoreProperties; +import org.codehaus.jackson.map.annotate.JsonSerialize; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; + +import com.fasterxml.jackson.databind.SerializationFeature; + + + +//@JsonIgnoreProperties(ignoreUnknown=true) +@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"}) +//@JacksonFeatures(serializationDisable = {SerializationFeature.FAIL_ON_EMPTY_BEANS}) +@JsonSerialize +@RestController +public class FileUploadController { + + @PostMapping("/upload-gb") + public ResponseEntity uploadFileGb(@RequestParam("file") MultipartFile file[]){ + + for(MultipartFile files:file) { + System.out.println("File name::"+files.getOriginalFilename()); + + } + return new ResponseEntity(HttpStatus.OK); + + } + + @PostMapping("/upload-string") + public ResponseEntity uploadFileString(){ + return ResponseEntity.ok("working"); + } + +} diff --git a/backend/BaseProject/test4/codeextractor/controller/MasterCodeBuild_gk.java b/backend/BaseProject/test4/codeextractor/controller/MasterCodeBuild_gk.java new file mode 100644 index 0000000..0ee1159 --- /dev/null +++ b/backend/BaseProject/test4/codeextractor/controller/MasterCodeBuild_gk.java @@ -0,0 +1,684 @@ +package com.realnet.codeextractor.controller; + +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.List; + +import org.apache.commons.io.FileUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.codeextractor.entity.Rn_Bcf_Extractor; +import com.realnet.codeextractor.entity.Rn_Bcf_Extractor_Params; +import com.realnet.codeextractor.service.Rn_Bcf_Extractor_Service; +import com.realnet.flf.service.FieldTypeService; +import com.realnet.fnd.entity.Error; +import com.realnet.fnd.entity.ErrorPojo; +import com.realnet.fnd.entity.Success; +import com.realnet.fnd.entity.SuccessPojo; +import com.realnet.utils.Constant; + +import io.swagger.annotations.Api; + +@RestController +@RequestMapping(value = "/api", produces = MediaType.APPLICATION_JSON_VALUE) +@Api(tags = { "Build Master Builder" }) +public class MasterCodeBuild_gk { + @Value("${projectPath}") + private String projectPath; + + @Value("${angularProjectPath}") + private String angularProjectPath; + + @Autowired + private Rn_Bcf_Extractor_Service rn_bcf_extractor_service; + + @Autowired + private FieldTypeService fieldTypeService; + // private static final Logger logger = + // Logger.getLogger(BuildMasterBuilderController.class); + + @GetMapping("/build_master_builder") + public ResponseEntity masterControllerBuilder(@RequestParam(value = "id") Integer id) + throws IOException, FileNotFoundException { + StringBuilder variablesDynamicCode = new StringBuilder(); + StringBuilder stringBuilderDynamicCode = new StringBuilder(); +// StringBuilder stringBuilder = new StringBuilder(); + + // RN_BCF_CODE_EXTRACTOR_T ID + // int eid = Integer.parseInt(id); + + Rn_Bcf_Extractor extractor = rn_bcf_extractor_service.getById(id); + String technology_stack = extractor.getTech_stack(); + String object_type = extractor.getObject_type(); + String sub_object_type = extractor.getSub_object_type(); + + // RN_BCF_CODE_EXTRACTOR_PARAMS_T VALUES + // List params = + // rn_bcf_extractor_params_service.getByHeaderId(eid); + List params = extractor.getRn_bcf_extractor_Params(); + + int j = 0; + for (Rn_Bcf_Extractor_Params param : params) { + boolean is_creation_enabled = param.isIs_creation_enabled(); +// param.isIs_extraction_enabled(); + String path = param.getMoved_address_string(); + File file = new File(path); + String parentPath = file.getParent(); + + String name = file.getName(); + String convertedFileName = "SE_" + name; + + // STATIC CODE DIRECTORY + String staticFileParentDir = parentPath + File.separator + "static_code"; + File staticFile = new File(staticFileParentDir + File.separator + convertedFileName); + + // HERE WE GET FILE INSIDE DATA + String fileToString = FileUtils.readFileToString(staticFile, StandardCharsets.UTF_8); + + // ex. controller_file (FROM PARAMS TABLE) + String file_name_var = param.getFile_name_var() + j; + + // ex. ui_name + "controller" + String file_name_dynamic_string = param.getFile_name_dynamic_string(); + + // ex. String controller_file = ui_name + "controller"; + variablesDynamicCode + .append("String " + file_name_var + " = " + "\"" + file_name_dynamic_string + "\"" + ";\r\n"); + + System.out.println("file name dynamic str " + file_name_dynamic_string); + // change file name entity +// String mainstr1=file_name_dynamic_string; +// String saleesent1=mainstr1.replace(".java", " "); +// System.out.println("updated filename"+saleesent1); +// System.out.println(file_name_dynamic_string.contains(".java")); +// System.out.println(file_name_dynamic_string.contains(".ts")); +// System.out.println(file_name_dynamic_string.contains(".scss")); +// System.out.println(file_name_dynamic_string.contains(".html")); + + // HERE WE CHECK AND APPEND FILE NAME + if (file_name_dynamic_string.contains(".java")) { + variablesDynamicCode + .append("String mainstr" + j + " = " + file_name_var + ";\r\n" + "String " + file_name_var + "" + + 1 + "=mainstr" + j + ".replace(\".java\", \"\");\r\n" + "" + "\r\n" + "\n"); + } else if (file_name_dynamic_string.contains(".ts")) { + variablesDynamicCode.append("String mainstr" + j + " = " + file_name_var + ";\r\n" + "String " + + file_name_var + "" + 1 + "=mainstr" + j + ".replace(\".ts\", \"\");\r\n" + "" + "\r\n" + + "String " + file_name_var + "" + 2 + "=mainstr" + j + ".replace(\".component.ts\", \"\");\r\n" + + "" + "\r\n" + "\n"); + + } else if (file_name_dynamic_string.contains(".html")) { + variablesDynamicCode + .append("String mainstr" + j + " = " + file_name_var + ";\r\n" + "String " + file_name_var + "" + + 1 + "=mainstr" + j + ".replace(\".html\", \"\");\r\n" + "" + "\r\n" + "\n"); + } else if (file_name_dynamic_string.contains(".scss")) { + variablesDynamicCode + .append("String mainstr" + j + " = " + file_name_var + ";\r\n" + "String " + file_name_var + "" + + 1 + "=mainstr" + j + ".replace(\".scss\", \"\");\r\n" + "" + "\r\n" + "\n"); + } else { + System.out.println("not found"); + } + + // ======= MODULE NAME SHOULD COME FROM THE SESSION ======== + // String moduleName = "\" + module_name + \"/\""; + String moduleName = "\" + module_name + \"/"; + + String modulePath = param.getTotal_project_path_dynamic_string(); + // System.out.println("MODULE PATH = " + modulePath); + if (modulePath.endsWith(".java")) { + String parent = modulePath.substring(0, modulePath.lastIndexOf("/")); // 1 + String lvl2Parent = parent.substring(0, parent.lastIndexOf("/") + 1); // 2 + String tail0 = modulePath.substring(parent.lastIndexOf("/") + 1); // 3 + tail0 = tail0.substring(0, tail0.lastIndexOf("/") + 1); // remove the .java file name + modulePath = lvl2Parent + moduleName + tail0; + } else { + // add module name in spring project + modulePath = modulePath.substring(0, modulePath.lastIndexOf("/") + 1); + String data0 = modulePath.substring(0, modulePath.lastIndexOf("/") + 1); + String tail0 = modulePath.substring(modulePath.lastIndexOf("/") + 1); + data0 += moduleName + tail0; + modulePath = data0; + } +// System.out.println("MANUPULATED module PATH = " + modulePath); + +// String ref_address_string = param.getReference_address_string(); +// ref_address_string = ref_address_string.substring(0, ref_address_string.lastIndexOf("/")+1); + + String total_address_path = param.getTotal_project_path_dynamic_string(); + total_address_path = total_address_path.substring(0, total_address_path.lastIndexOf("/") + 1); + System.out.println("total path : " + total_address_path + "\n"); + String finalDir = ""; + +// + // here we set file path + String dest_path = "projectPath + \"" + "/Projects/\" + project_name + \"" + total_address_path; + System.out.println("dest path : " + dest_path); + // String finalDir = dirString + "/" + "\" + " + file_name_var; + finalDir = dest_path + "\" + " + file_name_var; + System.out.println(finalDir); + + // module_dest_path = "projectPath + \"" + "/Projects/\" + project_name + " + + // modulePath; +// String dest_path = "projectPath + \"" + "/Projects/\" + project_name + \"" + modulePath; + + // String finalDir = dirString + "/" + "\" + " + file_name_var; + finalDir = dest_path + "\" + " + file_name_var; + System.out.println("NIL FINAL DIR = " + finalDir + "\n"); + + if (is_creation_enabled) { + StringBuilder fileCode = new StringBuilder(); + + if (file_name_dynamic_string.contains("entity")) { +// String entity = entity(path, "test"); + if (fileToString.isEmpty()) { + fileCode.append(" " + file_name_var + "Code.append(\"" + fileToString + "\");\r\n"); + } else { + fileCode.append(" " + file_name_var + "Code.append(" + fileToString + ");\r\n"); + } + + } else if (file_name_dynamic_string.contains("repository") + || file_name_dynamic_string.contains("repo")) { +// String repo = repo(path, "test"); + if (fileToString.isEmpty()) { + fileCode.append(" " + file_name_var + "Code.append(\"" + fileToString + "\");\r\n"); + } else { + fileCode.append(" " + file_name_var + "Code.append(" + fileToString + ");\r\n"); + } + + } else if (file_name_dynamic_string.contains("service")) { +// String service = service(path, "test"); + if (fileToString.isEmpty()) { + fileCode.append(" " + file_name_var + "Code.append(\"" + fileToString + "\");\r\n"); + } else { + fileCode.append(" " + file_name_var + "Code.append(" + fileToString + ");\r\n"); + } + + } else if (file_name_dynamic_string.contains("controller")) { +// String controller = controller(path, "test"); + if (fileToString.isEmpty()) { + fileCode.append(" " + file_name_var + "Code.append(\"" + fileToString + "\");\r\n"); + } else { + fileCode.append(" " + file_name_var + "Code.append(" + fileToString + ");\r\n"); + } + + } else { +// String other = other(path, "test"); + + if (file_name_dynamic_string.isEmpty()) { + fileCode.append(" " + file_name_var + "Code.append(\"" + fileToString + "\"\r\n"); + } else { + fileCode.append(" " + file_name_var + "Code.append(" + fileToString + "\r\n"); + } + + } + // EMPTY FILE CODE WILL NOT GO IN THIS LOOP + + stringBuilderDynamicCode.append(" StringBuilder " + file_name_var + "Code = new StringBuilder();\r\n" + // + " " + file_name_var + "Code.append(" + fileToString + ");\r\n" + + fileCode + "\r\n" + + + " File " + file_name_var + "File = new File(" + finalDir + ");\r\n" + + " System.out.println(\"Directory name = \" + " + file_name_var + "File);\r\n" + // == CREATE PARENT DIR IF NOT EXIST=== + + " File " + file_name_var + "FileParentDir = new File(" + file_name_var + + "File.getParent());\r\n" + " if(!" + file_name_var + "FileParentDir.exists()) {\r\n" + " " + + file_name_var + "FileParentDir.mkdirs();\r\n" + " }\r\n" + // == + + " if (!" + file_name_var + "File.exists()) {\r\n" + " " + file_name_var + + "File.createNewFile();\r\n" + " }\r\n" + " " + "fw = new FileWriter(" + + file_name_var + "File.getAbsoluteFile());\r\n" + " bw = new BufferedWriter(fw);\r\n" + + " " + " bw.write(" + file_name_var + "Code.toString());\r\n" + " bw.close();\r\n" + + "\r\n"); + + } + j++; + } + + // CHILD MASTER BUILDER NAME DEPENDS ON (TECH_STACK, OBJ_TYPE, SUB_OBJ_TYPE) + String childMasterBuilderName = technology_stack + "_" + object_type + "_" + sub_object_type + "_Builder"; + childMasterBuilderName = childMasterBuilderName.replace(" ", "_"); + childMasterBuilderName = childMasterBuilderName.replaceAll("[-]+", "_"); + + StringBuilder childMasterBuilderCode = new StringBuilder(); +// String action_builder_code = fieldTypeService.angular_action_builder_code(); + + childMasterBuilderCode.append("package com.realnet.builders;\r\n" + "\r\n" + + "import java.io.BufferedWriter;\r\n" + "import java.io.File;\r\n" + "import java.io.FileWriter;\r\n" + + "import java.io.IOException;\r\n" + "import java.util.ArrayList;\r\n" + "import java.util.Date;\r\n" + + "import java.util.List;\r\n" + "import java.util.Optional;\r\n" + "\r\n" + + "import org.modelmapper.ModelMapper;\r\n" + + "import org.springframework.beans.factory.annotation.Autowired;\r\n" + + "import org.springframework.beans.factory.annotation.Value;\r\n" + + "import org.springframework.http.HttpStatus;\r\n" + "import org.springframework.http.MediaType;\r\n" + + "import org.springframework.http.ResponseEntity;\r\n" + + "import org.springframework.web.bind.annotation.GetMapping;\r\n" + + "import org.springframework.web.bind.annotation.PathVariable;\r\n" + + "import org.springframework.web.bind.annotation.RequestMapping;\r\n" + + "import org.springframework.web.bind.annotation.RestController;\r\n" + "\r\n" + + "import com.google.gson.JsonElement;\r\n" + "import com.google.gson.JsonObject;\r\n" + + "import com.google.gson.JsonParser;\r\n" + "import com.google.gson.JsonArray;\r\n" + "\r\n" + + "import com.realnet.actionbuilder.service.Rn_Cff_ActionBuilder_Service;\r\n" + + "import com.realnet.flf.service.FieldTypeService;\r\n" + + "import com.realnet.fnd.service.Rn_LookUp_Service;\r\n" + + "import com.realnet.formdrag.repository.Rn_wf_lines_3Repository;\r\n" + + "import com.realnet.formdrag.entity.Rn_wf_lines_3;\r\n" + "" + + "import com.realnet.wfb.service.Rn_WireFrame_Service;\r\n" + "\r\n" + + "import io.swagger.annotations.Api;" + + + "\r\n" + "@RestController\r\n" + // CONTROLLER NAME SHOULD CHANGE + // DEPENDS ON TECH_STACK/OBJECT_tYPE/SUB_OBJECT_TYPE + + "@RequestMapping(value = \"/api\", produces = MediaType.APPLICATION_JSON_VALUE)\r\n" + + "@Api(tags = { \"Master Builder\" })\r\n" + "public class " + childMasterBuilderName + " {\r\n" + + "\r\n" + "\r\n" + " @Value(\"${angularProjectPath}\")\r\n" + " private String angularProjectPath;" + + " @Value(\"${projectPath}\")\r\n" + " private String projectPath;" + + // DEPENDENCIES FOR WIREFRAME + + " @Autowired\r\n" + " private Rn_WireFrame_Service wireFrameService;\r\n" + "\r\n" + + + " @Autowired\r\n" + " private Rn_LookUp_Service lookUpService;\r\n" + "@Autowired\r\n" + + " private Rn_wf_lines_3Repository repo;\n" + + + "\r\n" + " @Autowired\r\n" + " private Rn_Cff_ActionBuilder_Service actionBuilderService;\r\n" + + "\r\n" + " @Autowired\r\n" + " private ModelMapper modelMapper;\r\n" + "\r\n" + " @Autowired\r\n" + + " private FieldTypeService fieldTypeService;\r\n\n\n" + "@GetMapping(value = \"/" + + childMasterBuilderName + "/{header_id}\")\r\n" + + " public ResponseEntity createbyjson(@PathVariable Integer header_id) throws IOException {\r\n" + + " Optional wireframe = repo.findheader(header_id);\r\n" + "\r\n" + + " List tablename = new ArrayList<>();\r\n" + + " List entityname = new ArrayList<>();\r\n" + "\r\n" + + " JsonParser parser = new JsonParser();\r\n" + + " JsonElement element = parser.parse(wireframe.get().getModel());\r\n" + + " JsonObject jsonObject = element.getAsJsonObject();\r\n" + "\r\n" + + " JsonElement name = jsonObject.get(\"name\");\r\n" + " System.out.println(name);\r\n" + + " tablename.add(name.getAsString());\r\n" + "\r\n" + + " JsonElement desc = jsonObject.get(\"description\");\r\n" + + " System.out.println(desc);\r\n" + "// keys.add(\"desc :\"+desc.getAsString());\r\n" + + "\r\n" + " JsonElement element2 = jsonObject.get(\"attributes\");\r\n" + + " System.out.println(element2);\r\n" + "\r\n" + + " JsonArray jsonArray = element2.getAsJsonArray();\r\n" + + " System.out.println(jsonArray);\r\n" + "\r\n" + " for (JsonElement ar : jsonArray) {\r\n" + + "\r\n" + " JsonObject obj = ar.getAsJsonObject();\r\n" + "\r\n" + + " JsonElement type = obj.get(\"type\");\r\n" + " System.out.println(type);\r\n" + + "// keys.add(\"type :\"+type.getAsString());\r\n" + "\r\n" + + " JsonElement description = obj.get(\"description\");\r\n" + + " System.out.println(description);\r\n" + + "// keys.add(\"description :\"+description.getAsString());\r\n" + "\r\n" + + " JsonElement placeholder = obj.get(\"placeholder\");\r\n" + + "// System.out.println(placeholder);\r\n" + + "// keys.add(\"placeholder :\"+placeholder.getAsString());\r\n" + "\r\n" + + " JsonElement label = obj.get(\"label\");\r\n" + " System.out.println(label);\r\n" + + " entityname.add(label.getAsString());\r\n" + "\r\n" + " }\r\n" + "\r\n" + + " Date d = new Date();\r\n" + " String addString = \"_\";\r\n" + "\r\n" + + " // CALL BACKEND\r\n" +// + " backendservice.buildbackend(tablename, entityname, addString);\r\n" + "\r\n" +// + " // CALL FRONTEND\r\n" +// + " frontendservice.buildFrontend(tablename, entityname, addString);\r\n" +// + "" + +// + "\r\n" + " System.out.println(\"id ::\"+id);" +// + "\n lookUpService.createTable(id);" +// + " \n // extra button \n List extraButton = wireFrameService.getExtraButton(id);" +// + " \n // HEADER VALUE\r\n" + " Rn_Fb_Header rn_fb_header = wireFrameService.getById(id);\r\n" +// + " \r\n" + " // LINE VALUES\r\n" +// + " List rn_fb_lines = rn_fb_header.getRn_fb_lines();\r\n" + " \r\n" +// + " // MODULE DETAILS\r\n" + " Rn_Module_Setup module = rn_fb_header.getModule();\r\n" +// + " \r\n" + " // PROJECT DETAILS\r\n" +// + " Rn_Project_Setup project = module.getProject();\r\n" + " \r\n" +// // ATTRIBUTE FLEX +// + " // ATTRIBUTE FLEX VALUES\r\n" +// + " List attribute_flex_values = lookUpService.getExtensions();\r\n" +// + " String project_name = project.getProjectName();\r\n" + + " String project_name =" + "\"" + "test" + j + "\"" + ";\r\n" + +// + " String module_name = module.getModuleName();\r\n\n" + + "\r\r\rFileWriter fw = null;\r\n" + "BufferedWriter bw = null;\r\n" + variablesDynamicCode); + childMasterBuilderCode.append("" + + // ACTION BUILDER CODE + + + // =========== VARIABLE CODE WILL BE APPEND HERE ===============// + "\n" + stringBuilderDynamicCode.toString() + "\r\n" + + " return new ResponseEntity<>(\"created\", HttpStatus.CREATED);\r\n" + "}\r\n }"); + +// + FileWriter fw = null; + BufferedWriter bw = null; + try { + // FILE NAME SHOULD CHANGE DEPENDS ON TECH_STACK/OBJECT_tYPE/SUB_OBJECT_TYPE + File masterBuilderFile = new File( + projectPath + "/src/main/java/com/realnet/builders/" + childMasterBuilderName + ".java"); + if (!masterBuilderFile.exists()) { + masterBuilderFile.createNewFile(); + } + fw = new FileWriter(masterBuilderFile.getAbsoluteFile()); + bw = new BufferedWriter(fw); + bw.write(childMasterBuilderCode.toString()); + bw.close(); + } catch (FileNotFoundException e) { + e.printStackTrace(); + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.MASTER_BUILDER_API_TITLE); + error.setMessage(Constant.MASTER_BUILDER_FAILURE); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.MASTER_BUILDER_API_TITLE); + success.setMessage(Constant.MASTER_BUILDER_SUCCESS); + successPojo.setSuccess(success); + return new ResponseEntity(successPojo, HttpStatus.CREATED); + } + + public String entity(String path, String classname) throws IOException { + + return UpdateEntity(path, classname); + + } + + public String repo(String path, String classname) throws IOException { + return UpdateRepo(path, classname); + + } + + public String service(String path, String classname) throws IOException { + return UpdateService(path, classname); + + } + + public String controller(String path, String classname) throws IOException { + return UpdateController(path, classname); + + } + + public String other(String path, String classname) throws IOException { + + return UpdateRepo(path, classname); + + } + + public String UpdateEntity(String path, String classname) throws IOException { + +// String path = "C:\\Users\\Aniket\\Documents\\Entity.txt"; +// String classname = "gk"; + String addition = "for (int i = 0; i < entityname.size(); i++) {\r\n" + + " String string = entityname.get(i);\r\n" + + " String lowerCase = string.replaceAll(\" \", \"_\").toLowerCase();\r\n" + + " String add = \"\\n private \" + \"String\" + \" \" + lowerCase + \";\";\r\n" + + " intialize.append(add);\r\n" + + " }"; + /* + * RandomAccessFile writer=new + * RandomAccessFile("C:/Users/lenovo/Documents/demo.txt","rw"); + * + * writer.seek(position); writer.writeBytes(addition); writer.close(); + */ + String line = ""; + StringBuilder intialize = new StringBuilder(); + StringBuilder class_name = new StringBuilder(); + StringBuilder middle = new StringBuilder(); + StringBuilder end = new StringBuilder(); + BufferedReader br = new BufferedReader(new FileReader(path)); + while ((line = br.readLine()) != null) { + String[] data = line.split(","); + for (String d : data) { + if (d.contains("import") || d.contains("@Data") || d.contains("@Entity")) { + intialize.append("\""); + intialize.append(d); + intialize.append("\"+\n"); + } else if (d.contains("public")) { + + class_name.append("\"public class "+classname +" {\"+ \n"); +// intialize.append("\"+\n"); + } else if (d.contains("}")) { + intialize.append("\""); + end.append(d); + intialize.append("\"+\n"); + } + + } + } + br.close(); + + middle.append(addition); + StringBuilder finalstring = new StringBuilder(); + finalstring.append("\"StringBuilder intialize = new StringBuilder();\"+\r\n" + + "\" intialize.append(\"+"); + finalstring.append(intialize.toString()); + finalstring.append(class_name.toString()); + finalstring.append("\t\"@Id\"+\r\n" + + "\" @GeneratedValue(strategy = GenerationType.IDENTITY)\"+\r\n" + + "\" private int id;\");\n"); + finalstring.append(middle.toString()); + + + + return finalstring.toString(); + } + + public String UpdateRepo(String path, String classname) throws IOException { + + String line = ""; + StringBuilder intialize = new StringBuilder(); + StringBuilder class_name = new StringBuilder(); + StringBuilder middle = new StringBuilder(); + StringBuilder end = new StringBuilder(); + BufferedReader br = new BufferedReader(new FileReader(path)); + intialize.append("\""); + + + while ((line = br.readLine()) != null) { + String[] data = line.split(","); + for (String d : data) { + if (d.contains("import") || d.contains("@Repository") ) { + intialize.append("\""+d); + intialize.append("\"+\n"); + } else if (d.contains("public")) { + class_name.append("\""+"public class "+classname +" extends JpaRepository<"+classname + ", Long> " +"{"+"\"+"); + class_name.append("\n"); + } + + } + } + br.close(); + + StringBuilder finalstring = new StringBuilder(); + finalstring.append(" \""+" StringBuilder repo = new StringBuilder();"+"\"+\n" + +" \""+"" + +" "+ "repo.append("); + finalstring.append(intialize.toString()); + finalstring.append(class_name.toString()); + finalstring.append("\"+}\""); + finalstring.append("\");"+"\""); + + return finalstring.toString(); + } + + public String UpdateService(String path, String classname) throws IOException { + + String line = ""; + String apiName ="Api"; + + StringBuilder intialize = new StringBuilder(); + StringBuilder class_name = new StringBuilder(); + StringBuilder middle = new StringBuilder(); + StringBuilder end = new StringBuilder(); + BufferedReader br = new BufferedReader(new FileReader(path)); + + intialize.append("\"import java.util.List;\"+\r\n" + + "\r\n" + "\"import org.springframework.beans.factory.annotation.Autowired;\"+\r\n" + + "\" import org.springframework.stereotype.Service;\"+\n"); + + intialize.append("\n\"@Service\"+\n"); + + intialize.append("\"@RequestMapping(value = " +"\"/"+ apiName+ "\")\"+\n" + + "\"@RestController\"+\r\n"); + + + + class_name.append("\"public class "+ classname +"Service {\"+\r\n" + + + "\" @Autowired\"+\r\n" + + "\" private " + classname+ "Service Service;\"+\n"); + + + middle.append( + "\" @Autowired\r\n" + "private " + classname + "Repository " + "Repository;\"+\n"); + + middle.append("\"public "+ classname +" Savedata("+classname+ " data) {\"+\r\n" + + " \" return Repository.save(data);\"+ \r\n" + " \" }\"+\r\n" + "\r\n" + + " \" \r\n" + "public List<" + classname + "> getdetails() {\"+\r\n" + + " \" return (List<" + classname + ">) Repository.findAll();\"+\r\n" + " }\r\n" + + "\r\n" + "\r\n" + "\"public "+ classname +" getdetailsbyId(Long id) {\"+\r\n" + + "\" return Repository.findById(id).get();\"+\r\n" + "\" }\"+\r\n" + "\r\n" + "\r\n" + + "\" public void delete_by_id(Long id) {\"+\r\n" + + "\" Repository.deleteById(id);\"+\r\n" + "}\"+\r\n" + "\r\n" + "\r\n"); + + middle.append("\"public "+ classname +" update("+ classname +" data,Long id) {\"+\n" + + " \""+ classname +" old = Repository.findById(id).get();\"+\n"); +// middle.append(" for (EntityBuild en : ent) { +// String name = en.getName(); +// +// String string = name.substring(0,1).toUpperCase()+name.substring(1); +// middle.append("old.set"+string+ "(data.get"+string+"());\r\n"); +// } + middle.append("\"final "+ classname +" test = Repository.save(old);\"+\r\n" + + " \" return test;\"+" + + "\"}\"+" + + "\"}\"+"); + + + + + br.close(); + + StringBuilder finalstring = new StringBuilder(); + finalstring.append("\" StringBuilder service = new StringBuilder();\"+\r\n" + + "\" service.append(\"+"); + finalstring.append(intialize.toString()); + finalstring.append(class_name.toString()); + finalstring.append(middle.toString()); + finalstring.append("\");"); + + // +// FileWriter fw = null; +// BufferedWriter bw = null; +// File masterBuilderFile = new File(newpath + "test" + ".java"); +// if (!masterBuilderFile.exists()) { +// masterBuilderFile.createNewFile(); +// } +// fw = new FileWriter(masterBuilderFile.getAbsoluteFile()); +// bw = new BufferedWriter(fw); +// bw.write(finalstring.toString()); +// bw.close(); + + + return finalstring.toString(); + } + + public String UpdateController(String path, String classname) throws IOException { + + String line = ""; + String apiName ="Api"; + + StringBuilder intialize = new StringBuilder(); + StringBuilder class_name = new StringBuilder(); + StringBuilder middle = new StringBuilder(); + StringBuilder end = new StringBuilder(); + BufferedReader br = new BufferedReader(new FileReader(path)); + + + intialize.append("import org.springframework.beans.factory.annotation.Autowired;\"+\r\n" + + "\" import org.springframework.web.bind.annotation.DeleteMapping;\"+\r\n" + + "\" import org.springframework.web.bind.annotation.GetMapping;\"+\r\n" + + "\" import org.springframework.web.bind.annotation.PathVariable;\"+\r\n" + + "\" import org.springframework.web.bind.annotation.PostMapping;\"+\r\n" + + "\" import org.springframework.web.bind.annotation.PutMapping;\"+\r\n" + + "\" import org.springframework.web.bind.annotation.RequestBody;\"+\r\n" + + "\" import org.springframework.web.bind.annotation.RequestParam;\"+\r\n" + + "\" import org.springframework.web.bind.annotation.RestController;\"+\r\n" + + "\" import org.springframework.web.bind.annotation.*;\"+\r\n"); + + intialize.append("\" @RequestMapping(value = " +"\"/"+ apiName+ "\")\"+\n" + + "\" @RestController \"+\r\n "); + class_name.append("\" public class "+ classname +"Controller {\"+\r\n" + + + "\" @Autowired \"+ \r\n" + + "\" private " + classname+ "Service Service; \"+\n"); + + middle.append( "\" @PostMapping("+"\"/" + classname+")\"+\r\n" + + " \r\n" + + " \" public " + classname+ " Savedata(@RequestBody " + classname+ " data) { \"+ \r\n" + + " \" " + classname+ " save = Service.Savedata(data) ;\"+\r\n" + + " \" return save;\"+\r\n" + + " \"+ }\"+\r\n" +// + " \" \r\n \"+" +// + " \" \r\n \"+" + + " \" @GetMapping(\"/" + classname+ "\")\"+\r\n" + + " \" public List<" + classname+ "> getdetails() { \"+ \r\n" + + " \" List<" + classname+ "> get = Service.getdetails(); \"+ \r\n" + + " \" return get;\"+\r\n\" } \"+\n" + + "\" @GetMapping(\"/" + classname+ "/{id}\")\"+\r\n" + + " \" public " + classname+ " getdetailsbyId(@PathVariable Long id ) {\"+\r\n" + + " \" " + classname+ " get = Service.getdetailsbyId(id);\"+\r\n" + + "\" return get;\"+\r\n" + + " \" }\"+\n" + + "\" @DeleteMapping(\"/" + classname+ "/{id}\")\"+\r\n" + + " \" public void delete_by_id(@PathVariable Long id ) {\"+\r\n" + + " \" Service.delete_by_id(id);\"+\r\n" +// + " \" \"+ \r\n" + + " \"\"+ }\n" + + "\" @PutMapping(\"/" + classname+"/{id}\")\"+\r\n" + + "\" public " + classname+ " update(@RequestBody " + classname+ " data,@PathVariable Long id ) {\"+\r\n" + + " \" " + classname+ " update = Service.update(data,id);\"+\r\n" + + "\" return update;\"+\r\n" + + "\" }\"+\n\"}\"+"); + + + + + br.close(); + + StringBuilder finalstring = new StringBuilder(); + finalstring.append("\" StringBuilder controller = new StringBuilder();\"+\r\n" + + "\"controller.append("); + finalstring.append(intialize.toString()); + finalstring.append(class_name.toString()); + finalstring.append(middle.toString()); +// finalstring.append("}"); + finalstring.append("\");"); + + // +// FileWriter fw = null; +// BufferedWriter bw = null; +// File masterBuilderFile = new File(newpath + "test" + ".java"); +// if (!masterBuilderFile.exists()) { +// masterBuilderFile.createNewFile(); +// } +// fw = new FileWriter(masterBuilderFile.getAbsoluteFile()); +// bw = new BufferedWriter(fw); +// bw.write(finalstring.toString()); +// bw.close(); + + + return finalstring.toString(); + + } + +} diff --git a/backend/BaseProject/test4/codeextractor/controller/NamingConvensionController.java b/backend/BaseProject/test4/codeextractor/controller/NamingConvensionController.java new file mode 100644 index 0000000..b0b99be --- /dev/null +++ b/backend/BaseProject/test4/codeextractor/controller/NamingConvensionController.java @@ -0,0 +1,69 @@ +package com.realnet.codeextractor.controller; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.codeextractor.entity.NamingConvension; +import com.realnet.codeextractor.repository.NamingConvension_Repository; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; + +@RestController +@RequestMapping(value = "/api", produces = MediaType.APPLICATION_JSON_VALUE) +@Api(tags = { "Naming Convension" }) +public class NamingConvensionController { + + @Autowired + private NamingConvension_Repository namingConvensionRepository; + +// @Autowired +// private TokenUtil tokenUtil; + + // GET ALL + @ApiOperation(value = "List of Naming", response = NamingConvension.class) + @GetMapping("/naming-convension") + public ResponseEntity getAll() { + List namingConvension = namingConvensionRepository.findAll(); + return ResponseEntity.status(HttpStatus.OK).body(namingConvension); + } + +// // GET BY ID +// @ApiOperation(value = "Get a Form", response = NamingConvension.class) +// @GetMapping("/form_setup/{id}") +// public ResponseEntity getFormsById(@PathVariable(value = "id") int id) { +// NamingConvension NamingConvension = NamingConvension_service.getById(id); +// return ResponseEntity.ok().body(NamingConvension); +// } + +// // SAVE +// @ApiOperation(value = "naming-convension", response = NamingConvension.class) +// @PostMapping("/naming-convension") +// public ResponseEntity create( +// @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken, +// @Valid @RequestBody NamingConvension namingConvension) { +// NamingConvension savedNamingConvension = namingConvensionRepository.save(namingConvension); +// return ResponseEntity.status(HttpStatus.CREATED).body(savedNamingConvension); +// } + +// // UPDATE +// @ApiOperation(value = "Update A Form", response = NamingConvension.class) +// @PutMapping("/form_setup/{id}") +// public ResponseEntity updateNamingConvension( +// @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken, +// @PathVariable(value = "id") Integer id, @Valid @RequestBody List NamingConvensionRequest) { +// +// NamingConvension namingConvension = namingConvensionRepository.findById(id).get(); +// +// +// NamingConvension updatedNamingConvension = namingConvensionRepository.update(id, NamingConvension); +// return ResponseEntity.status(HttpStatus.ACCEPTED).body(updatedNamingConvension); +// } +} diff --git a/backend/BaseProject/test4/codeextractor/controller/RuleLibraryNew_gk.java b/backend/BaseProject/test4/codeextractor/controller/RuleLibraryNew_gk.java new file mode 100644 index 0000000..57eb2e3 --- /dev/null +++ b/backend/BaseProject/test4/codeextractor/controller/RuleLibraryNew_gk.java @@ -0,0 +1,161 @@ +package com.realnet.codeextractor.controller; + +import java.io.File; +import java.io.IOException; +import java.nio.charset.StandardCharsets; + +import org.apache.commons.io.FileUtils; +import org.json.simple.parser.ParseException; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.codeextractor.service.Rule_library_service_gk; +@RestController +@RequestMapping("/codeextractor/rulelib_new") +public class RuleLibraryNew_gk { + + @Autowired + private Rule_library_service_gk rule_service; + + + @GetMapping("/test13") + public ResponseEntity getKeysInJsonUsingMaps(@RequestParam String keyword) throws ParseException, IOException { + + //ENTITY + if (keyword.contains("entity_package")) { + String path ="C:\\Users\\Dell\\Desktop\\26 AUG\\CallingAnotherAPi\\testing/Abc.java"; + String start ="package com"; + String end =";\r\n" + + "\r\n" + + "import javax.persistence.GeneratedValue;"; + String replaceWith ="Test_1"; + + rule_service.rule(path,start,end,replaceWith); + } + if (keyword.contains("ENTITYCLASS")) { + String path ="C:\\Users\\Dell\\Desktop\\26 AUG\\CallingAnotherAPi\\testing/Abc.java"; + String start ="public class"; + String end ="{"; + String replaceWith ="Test"; + + rule_service.rule(path,start,end,replaceWith); + } + + + if (keyword.contains("entity_loop")) { + String path ="C:\\Users\\Dell\\Desktop\\26 AUG\\CallingAnotherAPi\\testing/Abc.java"; + String start ="private int id;"; + String end ="}"; + String replaceWith =" \nfor (int i = 0; i < entityname.size(); i++) {\r\n" + + " String string = entityname.get(i);\r\n" + + " String lowerCase = string.replaceAll(\" \", \"_\").toLowerCase();\r\n" + + " String add = \"\\n private \" + \"String\" + \" \" + lowerCase + \";\";\r\n" + + " entityclass.append(add);\r\n" + + " }"; + + rule_service.rule(path,start,end,replaceWith); + } + + //REPOSITORY + + if (keyword.contains("repo_class")) { + String path ="C:\\Users\\Dell\\Desktop\\Demo Code Extractor\\Abc_1665647440047_back\\Repository/AbcRepository.java"; + String start ="public interface"; + String end ="JpaRepository { "; + String replaceWith ="Test_1"; + + rule_service.rule(path,start,end,replaceWith); + } + + //SERVICE + if (keyword.contains("service_class")) { + String path ="C:\\Users\\Dell\\Desktop\\Demo Code Extractor\\Abc_1665647440047_back\\Services/AbcService.java"; + String start ="public class"; + String end ="{"; + String replaceWith ="Test_1"; + + rule_service.rule(path,start,end,replaceWith); + } + + if (keyword.contains("service_body")) { + + String path ="C:\\Users\\Dell\\Desktop\\Demo Code Extractor\\Abc_1665647440047_back\\Services/AbcService.java"; + + File staticFile = new File(path); + String fileString = FileUtils.readFileToString(staticFile, StandardCharsets.UTF_8); + int length = fileString.length(); + + + String start ="@Autowired"; + String end =""; + String replaceWith ="sericeclass.append(\"\\r\\n\" + \"private \" + table_name + addString + \"Repository \" + \"Repository;\\n\");\r\n" + + "\r\n" + + " sericeclass.append(\"public \" + table_name + addString + \" Savedata(\" + table_name + addString + \" data) {\\r\\n\"\r\n" + + " + \" return Repository.save(data); \\r\\n\" + \" }\\r\\n\" + \"\\r\\n\" + \" \\r\\n\"\r\n" + + " + \"public List<\" + table_name + addString + \"> getdetails() {\\r\\n\" + \" return (List<\"\r\n" + + " + table_name + addString + \">) Repository.findAll();\\r\\n\" + \" }\\r\\n\" + \"\\r\\n\" + \"\\r\\n\"\r\n" + + " + \"public \" + table_name + addString + \" getdetailsbyId(Long id) {\\r\\n\"\r\n" + + " + \" return Repository.findById(id).get();\\r\\n\" + \" }\\r\\n\" + \"\\r\\n\" + \"\\r\\n\"\r\n" + + " + \" public void delete_by_id(Long id) {\\r\\n\" + \" Repository.deleteById(id);\\r\\n\" + \"}\\r\\n\" + \"\\r\\n\"\r\n" + + " + \"\\r\\n\");\r\n" + + "\r\n" + + " sericeclass.append(\"public \" + table_name + addString + \" update(\" + table_name + addString\r\n" + + " + \" data,Long id) {\\n\" + \" \" + table_name + addString + \" old = Repository.findById(id).get();\\n\");\r\n" + + " for (int i = 0; i < entityname.size(); i++) {\r\n" + + " String name1 = entityname.get(i);\r\n" + + " String name3 = name1.replaceAll(\" \", \"_\").toLowerCase();\r\n" + + " String string = name3.substring(0, 1).toUpperCase() + name3.substring(1);\r\n" + + " sericeclass.append(\"old.set\" + string + \"(data.get\" + string + \"());\\r\\n\");\r\n" + + " }\r\n" + + " sericeclass.append(\"final \" + table_name + addString + \" test = Repository.save(old);\\r\\n\"\r\n" + + " + \" return test;\" + \"}}\" + \"\");\r\n" + + ""; + + rule_service.rule(path,start,end,replaceWith); + } + + //CONTROLLER + if (keyword.contains("controller_class")) { + String path ="C:\\Users\\Dell\\Desktop\\Demo Code Extractor\\Abc_1665647440047_back\\Controllers/AbcController.java"; + String start ="public class"; + String end ="{"; + String replaceWith ="Test_1"; + + rule_service.rule(path,start,end,replaceWith); + } + if (keyword.contains("controller_body")) { + String path ="C:\\Users\\Dell\\Desktop\\Demo Code Extractor\\Abc_1665647440047_back\\Controllers/AbcController.java"; + String start ="@Autowired"; + String end =""; + String replaceWith ="controllerclass.append(\"\r\n" + + " + \" private \" + table_name + addString + \"Service Service;\\n\\n\"\r\n" + + "\r\n" + + " + \" @PostMapping(\" + \"\\\"/\" + table_name + \"\\\")\\r\\n\" + \" public \" + table_name + addString\r\n" + + " + \" Savedata(@RequestBody \" + table_name + addString + \" data) {\\r\\n\" + \" \" + table_name\r\n" + + " + addString + \" save = Service.Savedata(data) ;\\r\\n\" + \" return save;\\r\\n\" + \" }\\r\\n\"\r\n" + + " + \" \\r\\n\" + \" \\r\\n\" + \" @GetMapping(\\\"/\" + table_name + \"\\\")\\r\\n\" + \" public List<\"\r\n" + + " + table_name + addString + \"> getdetails() {\\r\\n\" + \" List<\" + table_name + addString\r\n" + + " + \"> get = Service.getdetails(); \\r\\n\" + \" return get;\\r\\n}\\n\" + \"@GetMapping(\\\"/\"\r\n" + + " + table_name + \"/{id}\\\")\\r\\n\" + \" public \" + table_name + addString\r\n" + + " + \" getdetailsbyId(@PathVariable Long id ) {\\r\\n\" + \" \" + table_name + addString\r\n" + + " + \" get = Service.getdetailsbyId(id);\\r\\n\" + \" return get;\\r\\n\" + \" }\\n\" + \"@DeleteMapping(\\\"/\"\r\n" + + " + table_name + \"/{id}\\\")\\r\\n\" + \" public void delete_by_id(@PathVariable Long id ) {\\r\\n\"\r\n" + + " + \" Service.delete_by_id(id);\\r\\n\" + \" \\r\\n\" + \" }\\n\" + \"@PutMapping(\\\"/\" + table_name\r\n" + + " + \"/{id}\\\")\\r\\n\" + \" public \" + table_name + addString + \" update(@RequestBody \" + table_name\r\n" + + " + addString + \" data,@PathVariable Long id ) {\\r\\n\" + \" \" + table_name + addString\r\n" + + " + \" update = Service.update(data,id);\\r\\n\" + \" return update;\\r\\n\" + \" }\\n}\");\r\n" + + ""; + + rule_service.rule(path,start,end,replaceWith); + } + return new ResponseEntity<>("created", HttpStatus.CREATED); + + } + + +} diff --git a/backend/BaseProject/test4/codeextractor/controller/Rule_Library_Controller.java b/backend/BaseProject/test4/codeextractor/controller/Rule_Library_Controller.java new file mode 100644 index 0000000..2c1b987 --- /dev/null +++ b/backend/BaseProject/test4/codeextractor/controller/Rule_Library_Controller.java @@ -0,0 +1,378 @@ +package com.realnet.codeextractor.controller; + +import java.util.List; + +import javax.validation.Valid; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.codeextractor.entity.Rn_Bcf_Exception_Rules; +import com.realnet.codeextractor.entity.Rn_Bcf_Rules; +import com.realnet.codeextractor.entity.RuleCopyDTO; +import com.realnet.codeextractor.response.ExceptionRuleLibraryResponse; +import com.realnet.codeextractor.response.RuleLibraryResponse; +import com.realnet.codeextractor.service.Rn_Bcf_Exception_Rule_Library_Service; +import com.realnet.codeextractor.service.Rn_Bcf_Rule_Library_Service; +import com.realnet.fnd.entity.Error; +import com.realnet.fnd.entity.ErrorPojo; +import com.realnet.fnd.entity.Success; +import com.realnet.fnd.entity.SuccessPojo; +import com.realnet.userDTO.User; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserService; +import com.realnet.utils.Constant; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; + +@Slf4j +@RestController +@RequestMapping(value = "/api", produces = MediaType.APPLICATION_JSON_VALUE) +@Api(tags = { "Rule Library" }) +public class Rule_Library_Controller { + + @Autowired + private AppUserService userService; + + @Autowired + private Rn_Bcf_Rule_Library_Service ruleLibraryService; + + @Autowired + private Rn_Bcf_Exception_Rule_Library_Service exceptionRuleLibraryService; + +// @Autowired +// private TokenUtil tokenUtil; + // ==== RULE LIBRARY AND EXCEPTION RULE LIBRARY REST APIS ==== // + + // COPY RULES + @ApiOperation(value = "Add A New Rule", response = Rn_Bcf_Rules.class) + @PostMapping("/rule-copy") + public ResponseEntity copyRule(@Valid @RequestBody RuleCopyDTO ruleReq) { + AppUser user = userService.getLoggedInUser(); + Long userId = user.getUserId(); + Long accId = user.getAccount().getAccount_id(); + + String from_tech_stack = ruleReq.getFrom_tech_stack(); + String from_object_type = ruleReq.getFrom_object_type(); + String from_sub_object_type = ruleReq.getFrom_sub_object_type(); + + String to_tech_stack = ruleReq.getTo_tech_stack(); + String to_object_type = ruleReq.getTo_object_type(); + String to_sub_object_type = ruleReq.getTo_sub_object_type(); + + // GET ALL RULES + List rules = ruleLibraryService.copyRules2(from_tech_stack, from_object_type, from_sub_object_type); + log.debug("RULE COPPIED {}", rules); + for (Rn_Bcf_Rules rule : rules) { + Rn_Bcf_Rules newRule = new Rn_Bcf_Rules(); + newRule.setCreatedBy(userId); + newRule.setAccountId(accId); + + newRule.setGroup_id(rule.getGroup_id()); + newRule.setFile_code(rule.getFile_code()); + newRule.setRule_name(rule.getRule_name()); + newRule.setRule_type(rule.getRule_type()); + newRule.setTech_stack(to_tech_stack); + newRule.setObject_type(to_object_type); + newRule.setSub_object_type(to_sub_object_type); + newRule.setIdentifier_start_string(rule.getIdentifier_start_string()); + newRule.setIdentifier_end_string(rule.getIdentifier_end_string()); + newRule.setReplacement_string(rule.getReplacement_string()); + + Rn_Bcf_Rules savedRule = ruleLibraryService.save(newRule); + log.debug("SAVED RULE {}", savedRule); + if (savedRule == null) { + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.RULE_LIBRARY_API_TITLE); + error.setMessage(Constant.RULE_NOT_CREATED); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + } + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.RULE_LIBRARY_API_TITLE); + success.setMessage(Constant.RULE_CREATED_SUCCESSFULLY); + successPojo.setSuccess(success); + return new ResponseEntity(successPojo, HttpStatus.CREATED); + } + + // GET ALL + @ApiOperation(value = "List of Rules", response = RuleLibraryResponse.class) + @GetMapping("/rule-library") + public RuleLibraryResponse getAllRules( + @RequestParam(value = "page", defaultValue = "0", required = false) Integer page, + @RequestParam(value = "size", defaultValue = "20", required = false) Integer size) { + RuleLibraryResponse resp = new RuleLibraryResponse(); + Pageable paging = PageRequest.of(page, size); + Page result = ruleLibraryService.getAll(paging); + resp.setPageStats(result, true); + resp.setItems(result.getContent()); + return resp; + } + + // GET BY ID + @ApiOperation(value = "Get a Rule", response = Rn_Bcf_Rules.class) + @GetMapping("/rule-library/{id}") + public ResponseEntity getRuleDetails(@PathVariable(value = "id") int id) { + Rn_Bcf_Rules rule = ruleLibraryService.getById(id); + return ResponseEntity.ok().body(rule); + } + + // SAVE + @ApiOperation(value = "Add A New Rule", response = Rn_Bcf_Rules.class) + @PostMapping("/rule-library") + public ResponseEntity createRule( + @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken, + @Valid @RequestBody Rn_Bcf_Rules bcf_rule) { +// String userId = tokenUtil.getUserId(authToken); +// rn_forms_setup.setCreatedBy(userId); +// rn_forms_setup.setAccountId(userId); + Long userId = userService.getLoggedInUserId(); + bcf_rule.setCreatedBy(userId); + + Rn_Bcf_Rules savedRule = ruleLibraryService.save(bcf_rule); + + if (savedRule == null) { + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.RULE_LIBRARY_API_TITLE); + error.setMessage(Constant.RULE_NOT_CREATED); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.RULE_LIBRARY_API_TITLE); + success.setMessage(Constant.RULE_CREATED_SUCCESSFULLY); + successPojo.setSuccess(success); + return new ResponseEntity(successPojo, HttpStatus.CREATED); + } + + /* for testing purpose */ + // SAVE LIST OF DATA + @ApiOperation(value = "Add AList Of New Rules", response = Rn_Bcf_Rules.class) + @PostMapping("/rule-library/all") + public ResponseEntity createListOfRules(@RequestBody List<@Valid Rn_Bcf_Rules> bcf_rule) { + for (Rn_Bcf_Rules rule : bcf_rule) { + Long userId = userService.getLoggedInUserId(); + rule.setCreatedBy(userId); + + Rn_Bcf_Rules savedRule = ruleLibraryService.save(rule); + if (savedRule == null) { + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.RULE_LIBRARY_API_TITLE); + error.setMessage(Constant.RULE_NOT_CREATED); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + } + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.RULE_LIBRARY_API_TITLE); + success.setMessage(Constant.RULE_CREATED_SUCCESSFULLY); + successPojo.setSuccess(success); + return new ResponseEntity(successPojo, HttpStatus.CREATED); + } + + // UPDATE + @ApiOperation(value = "Update A Form", response = Rn_Bcf_Rules.class) + @PutMapping("/rule-library/{id}") + public ResponseEntity updateRule( + @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken, + @PathVariable(value = "id") Integer id, @Valid @RequestBody Rn_Bcf_Rules rule) { +// String userId = tokenUtil.getUserId(authToken); +// rn_forms_setup.setUpdatedBy(userId); + Long userId = userService.getLoggedInUserId(); + rule.setUpdatedBy(userId); + Rn_Bcf_Rules updatedRule = ruleLibraryService.updateById(id, rule); + + if (id != updatedRule.getId()) { + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.RULE_LIBRARY_API_TITLE); + error.setMessage(Constant.RULE_NOT_UPDATED); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.RULE_LIBRARY_API_TITLE); + success.setMessage(Constant.RULE_UPDATED_SUCCESSFULLY); + successPojo.setSuccess(success); + return new ResponseEntity(successPojo, HttpStatus.OK); + } + + // DELETE + @DeleteMapping("/rule-library/{id}") + public ResponseEntity deleteRule(@PathVariable(value = "id") Integer id) { + boolean deleted = ruleLibraryService.deleteById(id); + if (deleted) { + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.RULE_LIBRARY_API_TITLE); + success.setMessage(Constant.RULE_DELETED_SUCCESSFULLY); + successPojo.setSuccess(success); + return new ResponseEntity(successPojo, HttpStatus.OK); + } else { + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.RULE_LIBRARY_API_TITLE); + error.setMessage(Constant.RULE_NOT_DELETED); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + } + + // =========== EXCEPTION RULE =================== // + // GET ALL + @ApiOperation(value = "List of Exception Rules", response = ExceptionRuleLibraryResponse.class) + @GetMapping("/exception-rule-library") + public ExceptionRuleLibraryResponse getAllExceptionRules( + @RequestParam(value = "page", defaultValue = "0", required = false) Integer page, + @RequestParam(value = "size", defaultValue = "20", required = false) Integer size) { + ExceptionRuleLibraryResponse resp = new ExceptionRuleLibraryResponse(); + Pageable paging = PageRequest.of(page, size); + Page result = exceptionRuleLibraryService.getAll(paging); + resp.setPageStats(result, true); + resp.setItems(result.getContent()); + return resp; + } + + // GET BY ID + @ApiOperation(value = "Get a Exception Rule", response = Rn_Bcf_Exception_Rules.class) + @GetMapping("/exception-rule-library/{id}") + public ResponseEntity getExceptionRuleDetails(@PathVariable(value = "id") int id) { + Rn_Bcf_Exception_Rules rule = exceptionRuleLibraryService.getById(id); + return ResponseEntity.ok().body(rule); + } + + // SAVE + @ApiOperation(value = "Add A New Rule", response = Rn_Bcf_Exception_Rules.class) + @PostMapping("/exception-rule-library") + public ResponseEntity createExceptionRule( + @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken, + @Valid @RequestBody Rn_Bcf_Exception_Rules bcf_rule) { +// String userId = tokenUtil.getUserId(authToken); +// rn_forms_setup.setCreatedBy(userId); +// rn_forms_setup.setAccountId(userId); + Long userId = userService.getLoggedInUserId(); + bcf_rule.setCreatedBy(userId); + + Rn_Bcf_Exception_Rules savedRule = exceptionRuleLibraryService.save(bcf_rule); + + if (savedRule == null) { + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.EXCEPTION_RULE_LIBRARY_API_TITLE); + error.setMessage(Constant.EXCEPTION_RULE_NOT_CREATED); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.EXCEPTION_RULE_LIBRARY_API_TITLE); + success.setMessage(Constant.EXCEPTION_RULE_CREATED_SUCCESSFULLY); + successPojo.setSuccess(success); + return new ResponseEntity(successPojo, HttpStatus.CREATED); + } + + /* for testing purpose */ + // SAVE LIST OF DATA + @ApiOperation(value = "Add A New Rule", response = Rn_Bcf_Exception_Rules.class) + @PostMapping("/exception-rule-library/all") + public ResponseEntity createListOfExceptionRule(@RequestBody List<@Valid Rn_Bcf_Exception_Rules> bcf_rule) { + Long userId = userService.getLoggedInUserId(); + for (Rn_Bcf_Exception_Rules rule : bcf_rule) { + rule.setCreatedBy(userId); + Rn_Bcf_Exception_Rules savedRule = exceptionRuleLibraryService.save(rule); + if (savedRule == null) { + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.EXCEPTION_RULE_LIBRARY_API_TITLE); + error.setMessage(Constant.EXCEPTION_RULE_NOT_CREATED); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + } + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.EXCEPTION_RULE_LIBRARY_API_TITLE); + success.setMessage(Constant.EXCEPTION_RULE_CREATED_SUCCESSFULLY); + successPojo.setSuccess(success); + return new ResponseEntity(successPojo, HttpStatus.CREATED); + } + + // UPDATE + @ApiOperation(value = "Update A Form", response = Rn_Bcf_Exception_Rules.class) + @PutMapping("/exception-rule-library/{id}") + public ResponseEntity updateExcetionRule( + @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken, + @PathVariable(value = "id") Integer id, @Valid @RequestBody Rn_Bcf_Exception_Rules rule) { +// String userId = tokenUtil.getUserId(authToken); +// rn_forms_setup.setUpdatedBy(userId); + Long userId = userService.getLoggedInUserId(); + rule.setUpdatedBy(userId); + Rn_Bcf_Exception_Rules updatedRule = exceptionRuleLibraryService.updateById(id, rule); + + if (id != updatedRule.getId()) { + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.EXCEPTION_RULE_LIBRARY_API_TITLE); + error.setMessage(Constant.EXCEPTION_RULE_NOT_UPDATED); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.EXCEPTION_RULE_LIBRARY_API_TITLE); + success.setMessage(Constant.EXCEPTION_RULE_UPDATED_SUCCESSFULLY); + successPojo.setSuccess(success); + return new ResponseEntity(successPojo, HttpStatus.OK); + } + + // DELETE + @DeleteMapping("/exception-rule-library/{id}") + public ResponseEntity deleteExceptionRule(@PathVariable(value = "id") Integer id) { + boolean deleted = exceptionRuleLibraryService.deleteById(id); + if (deleted) { + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.EXCEPTION_RULE_LIBRARY_API_TITLE); + success.setMessage(Constant.EXCEPTION_RULE_DELETED_SUCCESSFULLY); + successPojo.setSuccess(success); + return new ResponseEntity(successPojo, HttpStatus.OK); + } else { + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.EXCEPTION_RULE_LIBRARY_API_TITLE); + error.setMessage(Constant.EXCEPTION_RULE_NOT_DELETED); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + } + +} diff --git a/backend/BaseProject/test4/codeextractor/controller/Rule_library_keywordController.java b/backend/BaseProject/test4/codeextractor/controller/Rule_library_keywordController.java new file mode 100644 index 0000000..7af6d82 --- /dev/null +++ b/backend/BaseProject/test4/codeextractor/controller/Rule_library_keywordController.java @@ -0,0 +1,53 @@ +package com.realnet.codeextractor.controller; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.realnet.codeextractor.entity.Rule_library_keyword; +import com.realnet.codeextractor.service.Rule_library_keywordService; + + +@RequestMapping(value = "/code_extractor/rule_keyword") +@RestController +public class Rule_library_keywordController { + + @Autowired + private Rule_library_keywordService Service; + + @PostMapping("/Rule_library_keyword") + public Rule_library_keyword Savedata(@RequestBody Rule_library_keyword data) { + Rule_library_keyword save = Service.Savedata(data); + return save; + } + + @GetMapping("/Rule_library_keyword") + public List getdetails() { + List get = Service.getdetails(); + return get; + } + + @GetMapping("/Rule_library_keyword/{id}") + public Rule_library_keyword getdetailsbyId(@PathVariable Integer id) { + Rule_library_keyword get = Service.getdetailsbyId(id); + return get; + } + + @DeleteMapping("/Rule_library_keyword/{id}") + public void delete_by_id(@PathVariable Integer id) { + Service.delete_by_id(id); + + } + + @PutMapping("/Rule_library_keyword/{id}") + public Rule_library_keyword update(@RequestBody Rule_library_keyword data, @PathVariable Integer id) { + Rule_library_keyword update = Service.update(data, id); + return update; + } +} \ No newline at end of file diff --git a/backend/BaseProject/test4/codeextractor/controller/StaticCodeExtractionController.java b/backend/BaseProject/test4/codeextractor/controller/StaticCodeExtractionController.java new file mode 100644 index 0000000..8f614e3 --- /dev/null +++ b/backend/BaseProject/test4/codeextractor/controller/StaticCodeExtractionController.java @@ -0,0 +1,164 @@ +package com.realnet.codeextractor.controller; + +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.List; + +import org.apache.commons.io.FileUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.codeextractor.entity.Rn_Bcf_Extractor; +import com.realnet.codeextractor.entity.Rn_Bcf_Extractor_Params; +import com.realnet.codeextractor.service.Rn_Bcf_Extractor_Params_Service; +import com.realnet.codeextractor.service.Rn_Bcf_Extractor_Service; +import com.realnet.fnd.entity.ErrorPojo; +import com.realnet.fnd.entity.Success; +import com.realnet.fnd.entity.SuccessPojo; +import com.realnet.utils.Constant; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; + + +@Slf4j +@RestController +@RequestMapping(value = "/api", produces = MediaType.APPLICATION_JSON_VALUE) +@Api(tags = { "Code Extractor" }) +public class StaticCodeExtractionController { + @Value("${projectPath}") + private String projectPath; + + @Autowired + private Rn_Bcf_Extractor_Service bcf_extractorService; + + @Autowired + private Rn_Bcf_Extractor_Params_Service bcf_extractor_params_service; + + @ApiOperation(value = "Static Code Extraction") + @GetMapping(value = "/static_code_extraction") + public ResponseEntity staticCodeExtraction(@RequestParam(value = "header_id") Integer headerId) throws IOException { + Rn_Bcf_Extractor bcf_extractor = bcf_extractorService.getById(headerId); + List bcf_extractor_params_t_values = bcf_extractor.getRn_bcf_extractor_Params(); + log.debug("bcf_extractor_params_t_values {}", bcf_extractor_params_t_values); + + List bcf_extractor_params = bcf_extractor_params_service.getByHeaderId(headerId); + log.debug("bcf_extractor_params {}", bcf_extractor_params); + + for (Rn_Bcf_Extractor_Params params : bcf_extractor_params_t_values) { + String path = params.getMoved_address_string(); + boolean is_extraction_enabled = params.isIs_extraction_enabled(); + boolean is_creation_enabled = params.isIs_creation_enabled(); + + if (is_creation_enabled && is_extraction_enabled) { + try { + File file = new File(path); + + // STEP 1. CONVERT THE FILE INTO STRING + String fileContents = FileUtils.readFileToString(file, StandardCharsets.UTF_8); + //if (!fileContents.isEmpty()) { + fileContents = fileContents.replace("\\", "\\\\"); + fileContents = fileContents.replace("\"", (File.separator + "\"")); + + // STEP 2. CREATE A TEMP FILE AND WRITE THE CONVERTED STRING + String parentPath = file.getParent(); + + String name = file.getName(); + String fileName = "temp_" + name; + File tempFile = new File(parentPath + File.separator + fileName); + if (tempFile.createNewFile()) { + System.out.println("------ TEMP FILE CREATED-------\n" + tempFile.getAbsolutePath()); + } + BufferedWriter writer = new BufferedWriter(new FileWriter(tempFile)); + writer.write(fileContents); + writer.close(); + System.out.println("Successfully wrote to the file..."); + + StringBuilder code = new StringBuilder(); + + // STEP 3. READ THE TEMP FILE AND MAKE IT "STRING" + BufferedReader br = new BufferedReader(new FileReader(tempFile)); + String line = br.readLine(); + while (line != null) { + code.append("\"" + line + "\" + \"\\r\\n\" + \r\n"); + line = br.readLine(); + } + br.close(); + + // STEP 4: REMOVING WHITE SPACE + String finalString = code.toString().trim(); + if (!finalString.isEmpty()) { + // STEP 5: REMOVING LAST CHARS(+ "\r\n" +) + finalString = finalString.substring(0, finalString.length() - 10); + // System.out.println(finalString); + } + boolean deleted = tempFile.delete(); + if(deleted) { + log.info(tempFile.getName(), "{} File deleted"); + } + + // MODIFIED NAME + // CONVERT EVERY FILE INTO .JAVA FILE + // String ext = FilenameUtils.getExtension(name); + // String fileNameWithOutExt = FilenameUtils.removeExtension(name); + + String ConvertedFileName = "SE_" + name; + + // STAIC CODE OUTPUT DIRECTORY & PATH + String staticDirString = parentPath + File.separator + "static_code"; + File staticDir = new File(staticDirString); + if (!staticDir.exists()) { + staticDir.mkdir(); + } + + File staticFile = new File(staticDirString + File.separator + ConvertedFileName); + System.out.println("FILES WITH STATIC CODE DIRECTORY = " + staticFile); + + if (!staticFile.exists()) { + staticFile.createNewFile(); + } + BufferedWriter writer2 = new BufferedWriter(new FileWriter(staticFile.getAbsoluteFile())); + writer2.write(finalString); + writer2.close(); + /* + * //===========DELETE MAIN FILES=========== if(deleted) { file.delete(); + * logger.info("Deleted = " + file.getName() + " File"); } + */ + //} + } catch (FileNotFoundException e) { + log.error("File Not Found... " + e); + ErrorPojo errorPojo = new ErrorPojo(); + com.realnet.fnd.entity.Error error = new com.realnet.fnd.entity.Error(); + error.setTitle(Constant.EXTRACTOR_API_TITLE); + error.setMessage(Constant.STATIC_EXTRACTION_FAILED); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + } + } + + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.EXTRACTOR_API_TITLE); + success.setMessage(Constant.STATIC_EXTRACTION_SUCCESS); + successPojo.setSuccess(success); + log.debug("Response {} ", successPojo); + return new ResponseEntity(successPojo, HttpStatus.OK); + + } + +} diff --git a/backend/BaseProject/test4/codeextractor/controller/TechnologyStackController_codeextractor.java b/backend/BaseProject/test4/codeextractor/controller/TechnologyStackController_codeextractor.java new file mode 100644 index 0000000..1b4c9f3 --- /dev/null +++ b/backend/BaseProject/test4/codeextractor/controller/TechnologyStackController_codeextractor.java @@ -0,0 +1,295 @@ +package com.realnet.codeextractor.controller; + +import java.io.File; +import java.io.FileDescriptor; +import java.io.IOException; +import java.util.List; + +import javax.validation.Valid; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; +import org.springframework.data.domain.Sort; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; +import com.realnet.codeextractor.entity.ActiveTechStack_DTO; +import com.realnet.codeextractor.entity.Rn_Bcf_Technology_Stack1; +import com.realnet.codeextractor.repository.Rn_Bcf_TechnologyStack_Repository1; +import com.realnet.codeextractor.response.TechnologyStackResponse; +import com.realnet.codeextractor.service.Rn_Bcf_TechnologyStack_Service; +import com.realnet.fnd.entity.Error; +import com.realnet.fnd.entity.ErrorPojo; +import com.realnet.fnd.entity.Success; +import com.realnet.fnd.entity.SuccessPojo; +import com.realnet.fnd.service.FileStorageService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserService; +import com.realnet.utils.Constant; +import com.realnet.utils.RealNetUtils; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import net.lingala.zip4j.ZipFile; +import net.lingala.zip4j.exception.ZipException; + +@JsonIgnoreProperties(ignoreUnknown = true) +@Slf4j +@RestController +@RequestMapping(value = "/codeextractor/technologystack", produces = MediaType.APPLICATION_JSON_VALUE) +@Api(tags = { "Technology Stack" }) +public class TechnologyStackController_codeextractor { + + @Autowired + private AppUserService userService; + + @Autowired + private FileStorageService fileStorageService; + + @Autowired + private Rn_Bcf_TechnologyStack_Service technologyStackService; + + @Autowired + private Rn_Bcf_TechnologyStack_Repository1 technologyStackRepo; + + @Value("${projectPath}") + private String projectPath; + + // GET ALL SORTED AND PAGINATED DATA + @ApiOperation(value = "List of Technology Stack", response = Rn_Bcf_Technology_Stack1.class) + @GetMapping("/technology-stack") + public TechnologyStackResponse getTechnologyStack( + @RequestParam(value = "page", defaultValue = "0", required = false) Integer page, + @RequestParam(value = "size", defaultValue = "20", required = false) Integer size) { + // sorted data + Pageable paging = PageRequest.of(page, size, Sort.by(Constant.SORT_BY_CREATION_DATE).descending()); + Page result = technologyStackService.getAll(paging); + System.out.println("ganesh bute"+result.getContent()); + TechnologyStackResponse resp = new TechnologyStackResponse(); + resp.setPageStats(result, true); + resp.setItems(result.getContent()); + return resp; + + } + + // GET BY ID + @ApiOperation(value = "Get A Technology Stack", response = Rn_Bcf_Technology_Stack1.class) + @GetMapping("/technology-stack/{id}") + public ResponseEntity getTechnologyStackDetails(@PathVariable(value = "id") int id) { + Rn_Bcf_Technology_Stack1 bcf_tech_stack = technologyStackService.getById(id); + // Map extractorMap = + // Collections.singletonMap("extractior", bcf_extractor); + // return new ResponseEntity>(extractorMap, + // HttpStatus.OK); + // return ResponseEntity.ok().body(bcf_extractor); + return new ResponseEntity(bcf_tech_stack, HttpStatus.OK); + + } + + // ========= SAVE AND UNZIP FILE AND MOVE TO A SPECIFIC PATH ======== + @ApiOperation(value = "Add new Technology Stack") + @PostMapping(value = "/technology-stack") + public ResponseEntity saveTechnologyStack(// @Valid @RequestBody Rn_Bcf_Technology_Stack1 bcf_extractor, + @RequestParam(value = "bcf_technology_stack", required = true) String techStackRequest, + @RequestParam(value = "file", required = true) MultipartFile file) + throws IOException, JsonParseException, JsonMappingException { + + System.out.println("techStackRequest = " + techStackRequest); + System.out.println("file = " + file.getOriginalFilename()); + + log.debug("techStackRequest => {} ", techStackRequest); + log.debug("file => {} ", file.getOriginalFilename()); + ObjectMapper mapper = new ObjectMapper(); + mapper.configOverride(FileDescriptor.class).setIsIgnoredType(true); + //mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, true); + mapper.setVisibility(mapper.getVisibilityChecker() + .withFieldVisibility(JsonAutoDetect.Visibility.ANY)); + mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false); + Rn_Bcf_Technology_Stack1 bcf_tech_stack = mapper.readValue(techStackRequest, Rn_Bcf_Technology_Stack1.class); + + + log.debug("bcf_tech_stack => {}", bcf_tech_stack); + AppUser loggedInUser = userService.getLoggedInUser(); + bcf_tech_stack.setAccountId(loggedInUser.getAccount().getAccount_id()); + bcf_tech_stack.setCreatedBy(loggedInUser.getUserId()); + + String techStackKey = RealNetUtils.getTechnologyStackKey(bcf_tech_stack.getTech_stack()); + bcf_tech_stack.setTech_stack_key(techStackKey); + // upload to directory + String uploadPath = projectPath.concat("/src/main/resources/technology-stack-zip-uploads/"); + fileStorageService.uploadFile(file, uploadPath); + + String fileName = file.getOriginalFilename(); + String folderName = fileName.substring(0, fileName.lastIndexOf(".")); + + System.out.println("UPLOAD PATH = " + uploadPath + "\nFILE NAME = " + fileName + "\nFile Size = " + file.getSize()); + + // SAVE ZIP FILE NAME INTO DATABASE + bcf_tech_stack.setBase_prj_file_name(folderName); + bcf_tech_stack.setActive(false); + System.out.println("before save"); + + Rn_Bcf_Technology_Stack1 savedTechnology = technologyStackService.save(bcf_tech_stack); + System.out.println("after save"); + + if (savedTechnology == null) { + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.TECHNOLOGY_STACK_API_TITLE); + error.setMessage(Constant.TECHNOLOGY_STACK_NOT_CREATED); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + + /* + * ZIP TO UNZIP + */ + // ZIP FILE BASE PATH + String zipFilePath = uploadPath + fileName; + + String tech_stack = savedTechnology.getTech_stack(); + // UNZIP DESTINATION PATH + String destPath = projectPath.concat("/BaseProject/" + tech_stack); + + File path = new File(destPath); + if (!path.exists()) { + path.mkdirs(); + } + + System.out.println("ZIP FILE PATH = " + zipFilePath + "\nDESTINATION PATH = " + destPath); + try { + ZipFile zipFile = new ZipFile(zipFilePath); + zipFile.extractAll(destPath); + } catch (ZipException e) { + e.printStackTrace(); + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.TECHNOLOGY_STACK_API_TITLE); + error.setMessage(Constant.UNZIP_EXCEPTION); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.TECHNOLOGY_STACK_API_TITLE); + success.setMessage(Constant.TECHNOLOGY_STACK_CREATED_SUCCESSFULLY); + successPojo.setSuccess(success); + return new ResponseEntity(successPojo, HttpStatus.CREATED); + } + + // UPDATE + @ApiOperation(value = "Update Technology Stack", response = Rn_Bcf_Technology_Stack1.class) + @PutMapping("/technology-stack/{id}") + public ResponseEntity updateTechnology( + @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken, + @PathVariable(value = "id") int id, @Valid @RequestBody Rn_Bcf_Technology_Stack1 bcf_tech_stack) { + AppUser loggedInUser = userService.getLoggedInUser(); + bcf_tech_stack.setUpdatedBy(loggedInUser.getUserId()); + + Rn_Bcf_Technology_Stack1 updatedTech = technologyStackService.updateById(id, bcf_tech_stack); + + if (bcf_tech_stack.getId() != updatedTech.getId()) { + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.EXTRACTOR_API_TITLE); + error.setMessage(Constant.EXTRACTOR_NOT_DELETED); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.EXTRACTOR_API_TITLE); + success.setMessage(Constant.EXTRACTOR_UPDATED_SUCCESSFULLY); + successPojo.setSuccess(success); + return new ResponseEntity(successPojo, HttpStatus.OK); + } + + // DELETE + @DeleteMapping("/technology-stack/{id}") + public ResponseEntity deleteTechnologyStack(@PathVariable(value = "id") int id) { + boolean deleted = technologyStackService.deleteById(id); + if (deleted) { + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.TECHNOLOGY_STACK_API_TITLE); + success.setMessage(Constant.TECHNOLOGY_STACK_DELETED_SUCCESSFULLY); + successPojo.setSuccess(success); + return new ResponseEntity(successPojo, HttpStatus.OK); + } else { + ErrorPojo errorPojo = new ErrorPojo(); + Error error = new Error(); + error.setTitle(Constant.TECHNOLOGY_STACK_API_TITLE); + error.setMessage(Constant.TECHNOLOGY_STACK_NOT_DELETED); + errorPojo.setError(error); + return new ResponseEntity(errorPojo, HttpStatus.EXPECTATION_FAILED); + } + } + + // ACTIVE + @GetMapping(value = "/tech-stack-active") + public ResponseEntity technologyActive(@RequestParam(value = "id") int id) throws IOException { + //log.info("technologyActive controller start {}", id); + AppUser loggedInUser = userService.getLoggedInUser(); + + Rn_Bcf_Technology_Stack1 tech_stack = technologyStackService.getById(id); + log.debug("TECH STACK : {} ", tech_stack); + if (tech_stack.isActive() == false) { + tech_stack.setActive(true); + } else if (tech_stack.isActive()) { + tech_stack.setActive(false); + } + + //tech_stack.setActive(!tech_stack.isActive()); // LOL + + tech_stack.setUpdatedBy(loggedInUser.getUserId()); + + Rn_Bcf_Technology_Stack1 tech = technologyStackService.save(tech_stack); + log.debug("UPDATED TECH STACK : {} ", tech); + System.out.println("UPDATED TECH STACK : " + tech); + SuccessPojo successPojo = new SuccessPojo(); + Success success = new Success(); + success.setTitle(Constant.TECHNOLOGY_STACK_API_TITLE); + success.setMessage(Constant.TECHNOLOGY_STACK_UPDATED_SUCCESSFULLY); + successPojo.setSuccess(success); + return new ResponseEntity(successPojo, HttpStatus.OK); + } + + // get activate technology stack list (id and name) + @ApiOperation(value = "Get Activate Technology Stack List ", response = ActiveTechStack_DTO.class) + @GetMapping("/active-technology") + @ResponseBody + public List getActiveTechnology() { + //List technologyStack = technologyStackService.getAll(); + List activeTechDTO = technologyStackService.getListOfActivateTechnology(); + return activeTechDTO; + } + + + +} diff --git a/backend/BaseProject/test4/codeextractor/entity/ActiveTechStack_DTO.java b/backend/BaseProject/test4/codeextractor/entity/ActiveTechStack_DTO.java new file mode 100644 index 0000000..81c5725 --- /dev/null +++ b/backend/BaseProject/test4/codeextractor/entity/ActiveTechStack_DTO.java @@ -0,0 +1,23 @@ +package com.realnet.codeextractor.entity; + +import lombok.Data; + +@Data +public class ActiveTechStack_DTO { + private int id; + private String Name; + +// public Integer getId() { +// return id; +// } +// public void setId(Integer id) { +// this.id = id; +// } +// public Integer getName() { +// return Name; +// } +// public void setName(Integer name) { +// Name = name; +// } + +} diff --git a/backend/BaseProject/test4/codeextractor/entity/FileDetails.java b/backend/BaseProject/test4/codeextractor/entity/FileDetails.java new file mode 100644 index 0000000..40c60d8 --- /dev/null +++ b/backend/BaseProject/test4/codeextractor/entity/FileDetails.java @@ -0,0 +1,12 @@ +package com.realnet.codeextractor.entity; + +import java.io.Serializable; + +import lombok.Data; + +@Data +public class FileDetails implements Serializable { + private static final long serialVersionUID = 1L; + private int id; + private String text; +} diff --git a/backend/BaseProject/test4/codeextractor/entity/FileListDto.java b/backend/BaseProject/test4/codeextractor/entity/FileListDto.java new file mode 100644 index 0000000..c8f513a --- /dev/null +++ b/backend/BaseProject/test4/codeextractor/entity/FileListDto.java @@ -0,0 +1,15 @@ +package com.realnet.codeextractor.entity; + +import java.io.Serializable; + +import lombok.Data; + +@Data +public class FileListDto implements Serializable { + /** + * + */ + private static final long serialVersionUID = 1L; + private int id; + private String fileName; +} diff --git a/backend/BaseProject/test4/codeextractor/entity/NamingConvension.java b/backend/BaseProject/test4/codeextractor/entity/NamingConvension.java new file mode 100644 index 0000000..d441a0a --- /dev/null +++ b/backend/BaseProject/test4/codeextractor/entity/NamingConvension.java @@ -0,0 +1,27 @@ +package com.realnet.codeextractor.entity; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; + +import lombok.Data; + +@Data +@Entity +@Table(name = "NAMING_CONVENSION") +public class NamingConvension { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "ID") + private Integer id; + + @Column(name = "VARIABLE_NAME") + private String variableName; + + @Column(name = "OBJECT_NAME_DYNAMIC_STRING") + private String objectNameDynamicString; +} diff --git a/backend/BaseProject/test4/codeextractor/entity/Rn_Bcf_Exception_Rules.java b/backend/BaseProject/test4/codeextractor/entity/Rn_Bcf_Exception_Rules.java new file mode 100644 index 0000000..e1de485 --- /dev/null +++ b/backend/BaseProject/test4/codeextractor/entity/Rn_Bcf_Exception_Rules.java @@ -0,0 +1,132 @@ +package com.realnet.codeextractor.entity; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; + +import com.realnet.fnd.entity.Rn_Who_AccId_Column; + +import lombok.ToString; + +@ToString +@Entity +@Table(name = "RN_BCF_EXCEPTION_RULES") +public class Rn_Bcf_Exception_Rules extends Rn_Who_AccId_Column { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "ID") + private Integer id; + + @Column(name = "TECH_STACK") + private String tech_stack; + + @Column(name = "OBJECT_TYPE") + private String object_type; + + @Column(name = "SUB_OBJECT_TYPE") + private String sub_object_type; + + @Column(name = "OBJECT_NAME_VARIABLE") + private String object_name_variable; + + @Column(name = "OBJECT_NAME_DYNAMIC_STRING") + private String object_name_dynamic_string; + + public Rn_Bcf_Exception_Rules() { + super(); + // TODO Auto-generated constructor stub + } + + public Rn_Bcf_Exception_Rules(Integer id, String tech_stack, String object_type, String sub_object_type, + String object_name_variable, String object_name_dynamic_string) { + super(); + this.id = id; + this.tech_stack = tech_stack; + this.object_type = object_type; + this.sub_object_type = sub_object_type; + this.object_name_variable = object_name_variable; + this.object_name_dynamic_string = object_name_dynamic_string; + } + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getTech_stack() { + return tech_stack; + } + + public void setTech_stack(String tech_stack) { + this.tech_stack = tech_stack; + } + + public String getObject_type() { + return object_type; + } + + public void setObject_type(String object_type) { + this.object_type = object_type; + } + + public String getSub_object_type() { + return sub_object_type; + } + + public void setSub_object_type(String sub_object_type) { + this.sub_object_type = sub_object_type; + } + + public String getObject_name_variable() { + return object_name_variable; + } + + public void setObject_name_variable(String object_name_variable) { + this.object_name_variable = object_name_variable; + } + + public String getObject_name_dynamic_string() { + return object_name_dynamic_string; + } + + public void setObject_name_dynamic_string(String object_name_dynamic_string) { + this.object_name_dynamic_string = object_name_dynamic_string; + } + + + +// // WHO COLUMNS +// @Temporal(TemporalType.TIMESTAMP) +// @Column(name = "CREATED_AT", nullable = false, updatable = false) +// @CreatedDate +// private Date createdAt; +// +// //@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime createdAt; +// +// @Temporal(TemporalType.TIMESTAMP) +// @Column(name = "UPDATED_AT", nullable = false) +// @LastModifiedDate +// private Date updatedAt; +// +// @Column(name = "CREATED_BY", updatable = false) +// private Long createdBy; +// +// @Column(name = "UPDATED_BY") +// private Long updatedBy; +// +// @Column(name = "ACCOUNT_ID") +// private Long accountId; + + +} diff --git a/backend/BaseProject/test4/codeextractor/entity/Rn_Bcf_Extractor.java b/backend/BaseProject/test4/codeextractor/entity/Rn_Bcf_Extractor.java new file mode 100644 index 0000000..7733c7d --- /dev/null +++ b/backend/BaseProject/test4/codeextractor/entity/Rn_Bcf_Extractor.java @@ -0,0 +1,196 @@ +package com.realnet.codeextractor.entity; + +import java.util.List; + +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.OneToMany; +import javax.persistence.Table; + +import com.fasterxml.jackson.annotation.JsonManagedReference; +import com.realnet.fnd.entity.Rn_Who_Columns; + +@Entity +@Table(name = "RN_BCF_EXTRACTOR_T") +public class Rn_Bcf_Extractor extends Rn_Who_Columns { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "ID") + private Integer id; + + @Column(name = "TECH_STACK") + private String tech_stack; + + @Column(name = "TECH_STACK_KEY") + private String tech_stack_key; + + @Column(name = "OBJECT_TYPE") + private String object_type; + + @Column(name = "SUB_OBJECT_TYPE") + private String sub_object_type; + + @Column(name = "FORM_TYPE_NAME") + private String form_type_name; + + @Column(name = "STD_WF_NAME") + private String std_wf_name; + + @Column(name = "ICON_FILE_NAME") + private String icon_file_name; + + @Column(name = "SAMPLE_FILE_NAME") + private String sample_file_name; + + @Column(name = "EXTRACTOR_STAGE") + private String extractor_stage; + + @OneToMany(mappedBy = "rn_bcf_extractor", targetEntity = Rn_Bcf_Extractor_Params.class, cascade = CascadeType.ALL, fetch = FetchType.EAGER) + @JsonManagedReference + private List rn_bcf_extractor_Params; + + // SYSTEM ACCOUNT ID + @Column(name = "ACCOUNT_ID") + private long accountId; + + public Rn_Bcf_Extractor() { + super(); + } + + public Rn_Bcf_Extractor(Integer id, String tech_stack, String tech_stack_key, String object_type, + String sub_object_type, String form_type_name, String std_wf_name, String icon_file_name, + String sample_file_name, String extractor_stage, List rn_bcf_extractor_Params, + long accountId) { + super(); + this.id = id; + this.tech_stack = tech_stack; + this.tech_stack_key = tech_stack_key; + this.object_type = object_type; + this.sub_object_type = sub_object_type; + this.form_type_name = form_type_name; + this.std_wf_name = std_wf_name; + this.icon_file_name = icon_file_name; + this.sample_file_name = sample_file_name; + this.extractor_stage = extractor_stage; + this.rn_bcf_extractor_Params = rn_bcf_extractor_Params; + this.accountId = accountId; + } + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getTech_stack() { + return tech_stack; + } + + public void setTech_stack(String tech_stack) { + this.tech_stack = tech_stack; + } + + public String getTech_stack_key() { + return tech_stack_key; + } + + public void setTech_stack_key(String tech_stack_key) { + this.tech_stack_key = tech_stack_key; + } + + public String getObject_type() { + return object_type; + } + + public void setObject_type(String object_type) { + this.object_type = object_type; + } + + public String getSub_object_type() { + return sub_object_type; + } + + public void setSub_object_type(String sub_object_type) { + this.sub_object_type = sub_object_type; + } + + public String getForm_type_name() { + return form_type_name; + } + + public void setForm_type_name(String form_type_name) { + this.form_type_name = form_type_name; + } + + public String getStd_wf_name() { + return std_wf_name; + } + + public void setStd_wf_name(String std_wf_name) { + this.std_wf_name = std_wf_name; + } + + public String getIcon_file_name() { + return icon_file_name; + } + + public void setIcon_file_name(String icon_file_name) { + this.icon_file_name = icon_file_name; + } + + public String getSample_file_name() { + return sample_file_name; + } + + public void setSample_file_name(String sample_file_name) { + this.sample_file_name = sample_file_name; + } + + public String getExtractor_stage() { + return extractor_stage; + } + + public void setExtractor_stage(String extractor_stage) { + this.extractor_stage = extractor_stage; + } + + public List getRn_bcf_extractor_Params() { + return rn_bcf_extractor_Params; + } + + public void setRn_bcf_extractor_Params(List rn_bcf_extractor_Params) { + this.rn_bcf_extractor_Params = rn_bcf_extractor_Params; + } + + public long getAccountId() { + return accountId; + } + + public void setAccountId(long accountId) { + this.accountId = accountId; + } + + @Override + public String toString() { + return "Rn_Bcf_Extractor [id=" + id + ", tech_stack=" + tech_stack + ", tech_stack_key=" + tech_stack_key + + ", object_type=" + object_type + ", sub_object_type=" + sub_object_type + ", form_type_name=" + + form_type_name + ", std_wf_name=" + std_wf_name + ", icon_file_name=" + icon_file_name + + ", sample_file_name=" + sample_file_name + ", extractor_stage=" + extractor_stage + + ", rn_bcf_extractor_Params=" + rn_bcf_extractor_Params + ", accountId=" + accountId + "]"; + } + + + +} diff --git a/backend/BaseProject/test4/codeextractor/entity/Rn_Bcf_Extractor_DTO.java b/backend/BaseProject/test4/codeextractor/entity/Rn_Bcf_Extractor_DTO.java new file mode 100644 index 0000000..b96e29a --- /dev/null +++ b/backend/BaseProject/test4/codeextractor/entity/Rn_Bcf_Extractor_DTO.java @@ -0,0 +1,39 @@ +package com.realnet.codeextractor.entity; + +import java.io.Serializable; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; + +import lombok.Data; + +@Data +@JsonSerialize +public class Rn_Bcf_Extractor_DTO implements Serializable { + /** + * + */ + private static final long serialVersionUID = 1L; + + private Integer id; + + private String tech_stack; + + private String tech_stack_key; + + private String object_type; + + private String sub_object_type; + + private String form_type_name; + + private String std_wf_name; + + private String icon_file_name; + + private String sample_file_name; + + // private String extractor_stage; + + // private long accountId; + +} diff --git a/backend/BaseProject/test4/codeextractor/entity/Rn_Bcf_Extractor_Params.java b/backend/BaseProject/test4/codeextractor/entity/Rn_Bcf_Extractor_Params.java new file mode 100644 index 0000000..eb4da74 --- /dev/null +++ b/backend/BaseProject/test4/codeextractor/entity/Rn_Bcf_Extractor_Params.java @@ -0,0 +1,270 @@ +package com.realnet.codeextractor.entity; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; + +import com.fasterxml.jackson.annotation.JsonBackReference; +import com.realnet.fnd.entity.Rn_Who_Columns; + +@Entity +@Table(name = "RN_BCF_EXTRACTOR_PARAMS_T") +public class Rn_Bcf_Extractor_Params extends Rn_Who_Columns { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "ID") + private Integer id; + +// @Column(name = "HEADER_ID") +// private int header_id; + + @Column(name = "TECH_STACK") + private String tech_stack; + + @Column(name = "OBJECT_TYPE") + private String object_type; + + @Column(name = "SUB_OBJECT_TYPE") + private String sub_object_type; + + @Column(name = "FILE_CODE") + private String file_code; + + @Column(name = "NAME_STRING") + private String name_string; + + @Column(name = "ADDRESS_STRING") + private String address_string; + + @Column(name = "MOVED_ADDRESS_STRING") + private String moved_address_string; + + @Column(name = "REFERENCE_ADDRESS_STRING") + private String reference_address_string; + + @Column(name = "DESCRIPTION") + private String description; + + @Column(name = "FILE_NAME_VAR") + private String file_name_var; + + @Column(name = "FILE_NAME_DYNAMIC_STRING") + private String file_name_dynamic_string; + + @Column(name = "IS_EXTRACTION_ENABLED") + private boolean is_extraction_enabled; + + @Column(name = "IS_CREATION_ENABLED") + private boolean is_creation_enabled; + + @Column(name = "Total_Project_Path_Dynamic_String") + private String total_project_path_dynamic_string; + + @ManyToOne(fetch = FetchType.LAZY, optional = false) + @JoinColumn(name = "HEADER_ID") + @JsonBackReference + private Rn_Bcf_Extractor rn_bcf_extractor; + +// @JsonIgnore +// private int headerId; +// +// public int getHeaderId() { +// return headerId; +// } +// +// public void setHeaderId(int headerId) { +// this.headerId = headerId; +// } + + // SYSTEM ACCOUNT ID + @Column(name = "ACCOUNT_ID") + private long accountId; + + public Rn_Bcf_Extractor_Params() { + super(); + } + + public Rn_Bcf_Extractor_Params(Integer id, String tech_stack, String object_type, String sub_object_type, + String file_code, String name_string, String address_string, String moved_address_string, + String reference_address_string, String description, String file_name_var, String file_name_dynamic_string, + boolean is_extraction_enabled, boolean is_creation_enabled, Rn_Bcf_Extractor rn_bcf_extractor, + long accountId,String total_project_path_dynamic_string) { + super(); + this.id = id; + this.tech_stack = tech_stack; + this.object_type = object_type; + this.sub_object_type = sub_object_type; + this.file_code = file_code; + this.name_string = name_string; + this.address_string = address_string; + this.moved_address_string = moved_address_string; + this.reference_address_string = reference_address_string; + this.description = description; + this.file_name_var = file_name_var; + this.file_name_dynamic_string = file_name_dynamic_string; + this.is_extraction_enabled = is_extraction_enabled; + this.is_creation_enabled = is_creation_enabled; + this.rn_bcf_extractor = rn_bcf_extractor; + this.accountId = accountId; + this.total_project_path_dynamic_string=total_project_path_dynamic_string; + } + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getTech_stack() { + return tech_stack; + } + + public void setTech_stack(String tech_stack) { + this.tech_stack = tech_stack; + } + + public String getObject_type() { + return object_type; + } + + public void setObject_type(String object_type) { + this.object_type = object_type; + } + + public String getSub_object_type() { + return sub_object_type; + } + + public void setSub_object_type(String sub_object_type) { + this.sub_object_type = sub_object_type; + } + + public String getFile_code() { + return file_code; + } + + public void setFile_code(String file_code) { + this.file_code = file_code; + } + + public String getName_string() { + return name_string; + } + + public void setName_string(String name_string) { + this.name_string = name_string; + } + + public String getAddress_string() { + return address_string; + } + + public void setAddress_string(String address_string) { + this.address_string = address_string; + } + + public String getMoved_address_string() { + return moved_address_string; + } + + public void setMoved_address_string(String moved_address_string) { + this.moved_address_string = moved_address_string; + } + + public String getReference_address_string() { + return reference_address_string; + } + + public void setReference_address_string(String reference_address_string) { + this.reference_address_string = reference_address_string; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getFile_name_var() { + return file_name_var; + } + + public void setFile_name_var(String file_name_var) { + this.file_name_var = file_name_var; + } + + public String getFile_name_dynamic_string() { + return file_name_dynamic_string; + } + + public void setFile_name_dynamic_string(String file_name_dynamic_string) { + this.file_name_dynamic_string = file_name_dynamic_string; + } + + public boolean isIs_extraction_enabled() { + return is_extraction_enabled; + } + + public void setIs_extraction_enabled(boolean is_extraction_enabled) { + this.is_extraction_enabled = is_extraction_enabled; + } + + public boolean isIs_creation_enabled() { + return is_creation_enabled; + } + + public void setIs_creation_enabled(boolean is_creation_enabled) { + this.is_creation_enabled = is_creation_enabled; + } + + public Rn_Bcf_Extractor getRn_bcf_extractor() { + return rn_bcf_extractor; + } + + public void setRn_bcf_extractor(Rn_Bcf_Extractor rn_bcf_extractor) { + this.rn_bcf_extractor = rn_bcf_extractor; + } + + public long getAccountId() { + return accountId; + } + + public void setAccountId(long accountId) { + this.accountId = accountId; + } + + public String getTotal_project_path_dynamic_string() { + return total_project_path_dynamic_string; + } + + public void setTotal_project_path_dynamic_string(String total_project_path_dynamic_string) { + this.total_project_path_dynamic_string = total_project_path_dynamic_string; + } + + @Override + public String toString() { + return "Rn_Bcf_Extractor_Params [id=" + id + ", tech_stack=" + tech_stack + ", object_type=" + object_type + + ", sub_object_type=" + sub_object_type + ", file_code=" + file_code + ", name_string=" + name_string + + ", address_string=" + address_string + ", moved_address_string=" + moved_address_string + + ", reference_address_string=" + reference_address_string + ", description=" + description + + ", file_name_var=" + file_name_var + ", file_name_dynamic_string=" + file_name_dynamic_string + + ", is_extraction_enabled=" + is_extraction_enabled + ", is_creation_enabled=" + is_creation_enabled + + ", accountId=" + accountId + "]"; + } + +} diff --git a/backend/BaseProject/test4/codeextractor/entity/Rn_Bcf_Rules.java b/backend/BaseProject/test4/codeextractor/entity/Rn_Bcf_Rules.java new file mode 100644 index 0000000..51c0ddd --- /dev/null +++ b/backend/BaseProject/test4/codeextractor/entity/Rn_Bcf_Rules.java @@ -0,0 +1,193 @@ +package com.realnet.codeextractor.entity; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; + +import com.realnet.fnd.entity.Rn_Who_AccId_Column; + +import lombok.ToString; + +@ToString +@Entity +@Table(name = "RN_BCF_RULES") +public class Rn_Bcf_Rules extends Rn_Who_AccId_Column { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "ID") + private Integer id; + + @Column(name = "GROUP_ID") + private String group_id; + + @Column(name = "RULE_NAME") + private String rule_name; + + @Column(name = "TECH_STACK") + private String tech_stack; + + @Column(name = "OBJECT_TYPE") + private String object_type; + + @Column(name = "SUB_OBJECT_TYPE") + private String sub_object_type; + + @Column(name = "FILE_CODE") + private String file_code; + + @Column(name = "RULE_TYPE") + private String rule_type; + + // Big text + @Column(name = "IDENTIFIER_START_STRING") + private String identifier_start_string; + + // Big text + @Column(name = "IDENTIFIER_END_STRING") + private String identifier_end_string; + + // Big text + @Column(name = "REPLACEMENT_STRING",length = 8000) + private String replacement_string; + + public Rn_Bcf_Rules() { + super(); + // TODO Auto-generated constructor stub + } + + public Rn_Bcf_Rules(Integer id, String group_id, String rule_name, String tech_stack, String object_type, + String sub_object_type, String file_code, String rule_type, String identifier_start_string, + String identifier_end_string, String replacement_string) { + super(); + this.id = id; + this.group_id = group_id; + this.rule_name = rule_name; + this.tech_stack = tech_stack; + this.object_type = object_type; + this.sub_object_type = sub_object_type; + this.file_code = file_code; + this.rule_type = rule_type; + this.identifier_start_string = identifier_start_string; + this.identifier_end_string = identifier_end_string; + this.replacement_string = replacement_string; + } + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getGroup_id() { + return group_id; + } + + public void setGroup_id(String group_id) { + this.group_id = group_id; + } + + public String getRule_name() { + return rule_name; + } + + public void setRule_name(String rule_name) { + this.rule_name = rule_name; + } + + public String getTech_stack() { + return tech_stack; + } + + public void setTech_stack(String tech_stack) { + this.tech_stack = tech_stack; + } + + public String getObject_type() { + return object_type; + } + + public void setObject_type(String object_type) { + this.object_type = object_type; + } + + public String getSub_object_type() { + return sub_object_type; + } + + public void setSub_object_type(String sub_object_type) { + this.sub_object_type = sub_object_type; + } + + public String getFile_code() { + return file_code; + } + + public void setFile_code(String file_code) { + this.file_code = file_code; + } + + public String getRule_type() { + return rule_type; + } + + public void setRule_type(String rule_type) { + this.rule_type = rule_type; + } + + public String getIdentifier_start_string() { + return identifier_start_string; + } + + public void setIdentifier_start_string(String identifier_start_string) { + this.identifier_start_string = identifier_start_string; + } + + public String getIdentifier_end_string() { + return identifier_end_string; + } + + public void setIdentifier_end_string(String identifier_end_string) { + this.identifier_end_string = identifier_end_string; + } + + public String getReplacement_string() { + return replacement_string; + } + + public void setReplacement_string(String replacement_string) { + this.replacement_string = replacement_string; + } + + +// // WHO COLUMNS +// @Temporal(TemporalType.TIMESTAMP) +// @Column(name = "CREATED_AT", nullable = false, updatable = false) +// @CreatedDate +// private Date createdAt; +// +// @Temporal(TemporalType.TIMESTAMP) +// @Column(name = "UPDATED_AT", nullable = false) +// @LastModifiedDate +// private Date updatedAt; +// +// @Column(name = "CREATED_BY", updatable = false) +// private Long createdBy; +// +// @Column(name = "UPDATED_BY") +// private Long updatedBy; +// +// @Column(name = "ACCOUNT_ID") +// private Long accountId; + + +} diff --git a/backend/BaseProject/test4/codeextractor/entity/Rn_Bcf_Technology_Stack1.java b/backend/BaseProject/test4/codeextractor/entity/Rn_Bcf_Technology_Stack1.java new file mode 100644 index 0000000..5712bd8 --- /dev/null +++ b/backend/BaseProject/test4/codeextractor/entity/Rn_Bcf_Technology_Stack1.java @@ -0,0 +1,106 @@ +package com.realnet.codeextractor.entity; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; + +import com.realnet.fnd.entity.Rn_Who_AccId_Column; + +import lombok.ToString; + +@ToString +@Entity +@Table(name = "RN_BCF_TECHNOLOGY_STACK") +public class Rn_Bcf_Technology_Stack1 extends Rn_Who_AccId_Column { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "ID") + private Integer id; + + @Column(name = "TECH_STACK") + private String tech_stack; + + @Column(name = "TECH_STACK_KEY") + private String tech_stack_key; + + // Big text + @Column(name = "TAGS") + private String tags; + + @Column(name = "BASE_PRJ_FILE_NAME") + private String base_prj_file_name; + + @Column(name = "IS_ACTIVE") + private boolean active; + + public Rn_Bcf_Technology_Stack1() { + super(); + } + + public Rn_Bcf_Technology_Stack1(Integer id, String tech_stack, String tech_stack_key, String tags, + String base_prj_file_name, boolean active) { + super(); + this.id = id; + this.tech_stack = tech_stack; + this.tech_stack_key = tech_stack_key; + this.tags = tags; + this.base_prj_file_name = base_prj_file_name; + this.active = active; + } + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getTech_stack() { + return tech_stack; + } + + public void setTech_stack(String tech_stack) { + this.tech_stack = tech_stack; + } + + public String getTech_stack_key() { + return tech_stack_key; + } + + public void setTech_stack_key(String tech_stack_key) { + this.tech_stack_key = tech_stack_key; + } + + public String getTags() { + return tags; + } + + public void setTags(String tags) { + this.tags = tags; + } + + public String getBase_prj_file_name() { + return base_prj_file_name; + } + + public void setBase_prj_file_name(String base_prj_file_name) { + this.base_prj_file_name = base_prj_file_name; + } + + public boolean isActive() { + return active; + } + + public void setActive(boolean active) { + this.active = active; + } +} diff --git a/backend/BaseProject/test4/codeextractor/entity/RuleCopyDTO.java b/backend/BaseProject/test4/codeextractor/entity/RuleCopyDTO.java new file mode 100644 index 0000000..ad0ba1a --- /dev/null +++ b/backend/BaseProject/test4/codeextractor/entity/RuleCopyDTO.java @@ -0,0 +1,60 @@ +package com.realnet.codeextractor.entity; + +//@Data +public class RuleCopyDTO { + private String from_tech_stack; + private String from_object_type; + private String from_sub_object_type; + private String to_tech_stack; + private String to_object_type; + private String to_sub_object_type; + + public String getFrom_tech_stack() { + return from_tech_stack; + } + + public void setFrom_tech_stack(String from_tech_stack) { + this.from_tech_stack = from_tech_stack; + } + + public String getFrom_object_type() { + return from_object_type; + } + + public void setFrom_object_type(String from_object_type) { + this.from_object_type = from_object_type; + } + + public String getFrom_sub_object_type() { + return from_sub_object_type; + } + + public void setFrom_sub_object_type(String from_sub_object_type) { + this.from_sub_object_type = from_sub_object_type; + } + + public String getTo_tech_stack() { + return to_tech_stack; + } + + public void setTo_tech_stack(String to_tech_stack) { + this.to_tech_stack = to_tech_stack; + } + + public String getTo_object_type() { + return to_object_type; + } + + public void setTo_object_type(String to_object_type) { + this.to_object_type = to_object_type; + } + + public String getTo_sub_object_type() { + return to_sub_object_type; + } + + public void setTo_sub_object_type(String to_sub_object_type) { + this.to_sub_object_type = to_sub_object_type; + } + +} diff --git a/backend/BaseProject/test4/codeextractor/entity/Rule_library_keyword.java b/backend/BaseProject/test4/codeextractor/entity/Rule_library_keyword.java new file mode 100644 index 0000000..9e02b14 --- /dev/null +++ b/backend/BaseProject/test4/codeextractor/entity/Rule_library_keyword.java @@ -0,0 +1,34 @@ +package com.realnet.codeextractor.entity; + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; + +import lombok.Data; + +@Data +@Entity +public class Rule_library_keyword { + + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + + private String tech_stack; + + private String object_type; + + private String sub_object_type; + + private String version; + + private String replcement_string; + private boolean isactive; + + + + + +} diff --git a/backend/BaseProject/test4/codeextractor/repository/NamingConvension_Repository.java b/backend/BaseProject/test4/codeextractor/repository/NamingConvension_Repository.java new file mode 100644 index 0000000..dd118c9 --- /dev/null +++ b/backend/BaseProject/test4/codeextractor/repository/NamingConvension_Repository.java @@ -0,0 +1,14 @@ +package com.realnet.codeextractor.repository; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +import com.realnet.codeextractor.entity.NamingConvension; + +@Repository +public interface NamingConvension_Repository extends JpaRepository { + // for pagination + Page findAll(Pageable p); +} diff --git a/backend/BaseProject/test4/codeextractor/repository/Rn_Bcf_Exception_Rule_Library_Repository.java b/backend/BaseProject/test4/codeextractor/repository/Rn_Bcf_Exception_Rule_Library_Repository.java new file mode 100644 index 0000000..489679a --- /dev/null +++ b/backend/BaseProject/test4/codeextractor/repository/Rn_Bcf_Exception_Rule_Library_Repository.java @@ -0,0 +1,28 @@ +package com.realnet.codeextractor.repository; + +import java.util.List; + +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.data.repository.query.Param; +import org.springframework.stereotype.Repository; + +import com.realnet.codeextractor.entity.Rn_Bcf_Exception_Rules; + +@Repository +public interface Rn_Bcf_Exception_Rule_Library_Repository extends JpaRepository { + // for pagination + Page findAll(Pageable p); + + @Query(value = "SELECT * FROM rn_bcf_exception_rules WHERE TECH_STACK =:tech_stack AND OBJECT_TYPE =:object_type AND SUB_OBJECT_TYPE =:sub_object_type", nativeQuery = true) + List findByType(@Param("tech_stack")String tech_stack, @Param("object_type")String object_type, @Param("sub_object_type")String sub_object_type); + + // testing + //List findByTechStackAndObjectTypeAndSubObjectType(String tech_stack, String object_type, String sub_object_type); + +// @Query(value = "SELECT * FROM RN_BCF_EXTRACTOR_PARAMS_T WHERE HEADER_ID =:hId ORDER BY created_at DESC", nativeQuery = true) +// List findByHeaderIdOrderByDate(@Param("hId") Integer headerId); +} + diff --git a/backend/BaseProject/test4/codeextractor/repository/Rn_Bcf_Extractor_Params_Repository.java b/backend/BaseProject/test4/codeextractor/repository/Rn_Bcf_Extractor_Params_Repository.java new file mode 100644 index 0000000..7f8c659 --- /dev/null +++ b/backend/BaseProject/test4/codeextractor/repository/Rn_Bcf_Extractor_Params_Repository.java @@ -0,0 +1,30 @@ +package com.realnet.codeextractor.repository; + +import java.util.List; + +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.data.repository.query.Param; +import org.springframework.stereotype.Repository; + +import com.realnet.codeextractor.entity.Rn_Bcf_Extractor_Params; + +@Repository +public interface Rn_Bcf_Extractor_Params_Repository extends JpaRepository { + // for pagination + Page findAll(Pageable p); + + // need modification + @Query(value = "SELECT * FROM rn_bcf_extractor_params_t WHERE ACCOUNT_ID =:accId", nativeQuery = true) + List findByAccountId(@Param("accId") Integer id, Pageable pageable); + + @Query(value = "SELECT * FROM rn_bcf_extractor_params_t WHERE HEADER_ID =:hId", nativeQuery = true) + List findByHeaderId(@Param("hId") Integer headerId); + + //@Query(value = "SELECT * FROM RN_BCF_EXTRACTOR_PARAMS_T WHERE HEADER_ID =:hId ORDER BY created_at DESC", nativeQuery = true) + @Query(value = "SELECT * FROM rn_bcf_extractor_params_t WHERE HEADER_ID =:hId ORDER BY created_at DESC", nativeQuery = true) + List findByHeaderIdOrderByDate(@Param("hId") Integer headerId); +} + diff --git a/backend/BaseProject/test4/codeextractor/repository/Rn_Bcf_Extractor_Repository.java b/backend/BaseProject/test4/codeextractor/repository/Rn_Bcf_Extractor_Repository.java new file mode 100644 index 0000000..6deb51e --- /dev/null +++ b/backend/BaseProject/test4/codeextractor/repository/Rn_Bcf_Extractor_Repository.java @@ -0,0 +1,14 @@ +package com.realnet.codeextractor.repository; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +import com.realnet.codeextractor.entity.Rn_Bcf_Extractor; + +@Repository +public interface Rn_Bcf_Extractor_Repository extends JpaRepository { + // for pagination + Page findAll(Pageable p); +} diff --git a/backend/BaseProject/test4/codeextractor/repository/Rn_Bcf_Rule_Library_Repository.java b/backend/BaseProject/test4/codeextractor/repository/Rn_Bcf_Rule_Library_Repository.java new file mode 100644 index 0000000..7236a7c --- /dev/null +++ b/backend/BaseProject/test4/codeextractor/repository/Rn_Bcf_Rule_Library_Repository.java @@ -0,0 +1,38 @@ +package com.realnet.codeextractor.repository; + +import java.util.List; + +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.data.repository.query.Param; +import org.springframework.stereotype.Repository; + +import com.realnet.codeextractor.entity.Rn_Bcf_Rules; + +@Repository +public interface Rn_Bcf_Rule_Library_Repository extends JpaRepository { + // for pagination + Page findAll(Pageable p); + +// @Query(value = "SELECT * FROM RN_BCF_EXTRACTOR_PARAMS_T WHERE HEADER_ID =:hId ORDER BY created_at DESC", nativeQuery = true) +// List findByHeaderIdOrderByDate(@Param("hId") Integer headerId); + +// List getByRuleType(String tech_stack, String object_type, String sub_object_type); +// + @Query(value = "SELECT ID, GROUP_ID, RULE_NAME, ':to_tech_stack', ':to_object_type', ':to_sub_object_type', FILE_CODE, RULE_TYPE, IDENTIFIER_START_STRING, IDENTIFIER_END_STRING, REPLACEMENT_STRING FROM rn_bcf_rules WHERE TECH_STACK =:from_tech_stack AND OBJECT_TYPE =:from_object_type AND SUB_OBJECT_TYPE =:from_sub_object_type", nativeQuery = true) + public List copyRules( + @Param("to_tech_stack") String to_tech_stack, + @Param("to_object_type") String to_object_type, + @Param("to_sub_object_type") String to_sub_object_type, + @Param("from_tech_stack") String from_tech_stack, + @Param("from_object_type") String from_object_type, + @Param("from_sub_object_type") String from_sub_object_type); + + @Query(value = "SELECT * FROM rn_bcf_rules WHERE TECH_STACK =:from_tech_stack AND OBJECT_TYPE =:from_object_type AND SUB_OBJECT_TYPE =:from_sub_object_type", nativeQuery = true) + public List copyRules2(@Param("from_tech_stack") String from_tech_stack, + @Param("from_object_type") String from_object_type, + @Param("from_sub_object_type") String from_sub_object_type); + +} diff --git a/backend/BaseProject/test4/codeextractor/repository/Rn_Bcf_TechnologyStack_Repository1.java b/backend/BaseProject/test4/codeextractor/repository/Rn_Bcf_TechnologyStack_Repository1.java new file mode 100644 index 0000000..fdc94b8 --- /dev/null +++ b/backend/BaseProject/test4/codeextractor/repository/Rn_Bcf_TechnologyStack_Repository1.java @@ -0,0 +1,28 @@ +package com.realnet.codeextractor.repository; + +import java.util.List; + +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 com.realnet.codeextractor.entity.Rn_Bcf_Technology_Stack1; + +@Repository +public interface Rn_Bcf_TechnologyStack_Repository1 extends JpaRepository { + // for pagination + Page findAll(Pageable p); + + @Query(value = "SELECT * FROM rn_bcf_technology_stack WHERE IS_ACTIVE=1", nativeQuery = true) + List activeTechStacks(); + // List findByActive(@Param("status")boolean status); + +// @Procedure("active_technology") +// List activeTechList(); + +// @Query(value = "call active_technology", nativeQuery = true) // call store procedure +// List activeTechList(); + +} diff --git a/backend/BaseProject/test4/codeextractor/repository/Rule_library_keywordRepository.java b/backend/BaseProject/test4/codeextractor/repository/Rule_library_keywordRepository.java new file mode 100644 index 0000000..5e8124b --- /dev/null +++ b/backend/BaseProject/test4/codeextractor/repository/Rule_library_keywordRepository.java @@ -0,0 +1,11 @@ +package com.realnet.codeextractor.repository; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +import com.realnet.codeextractor.entity.Rule_library_keyword; + + +@Repository +public interface Rule_library_keywordRepository extends JpaRepository { +} diff --git a/backend/BaseProject/test4/codeextractor/response/CodeExtractorParamsResponse.java b/backend/BaseProject/test4/codeextractor/response/CodeExtractorParamsResponse.java new file mode 100644 index 0000000..32e6ed9 --- /dev/null +++ b/backend/BaseProject/test4/codeextractor/response/CodeExtractorParamsResponse.java @@ -0,0 +1,18 @@ +package com.realnet.codeextractor.response; + +import java.util.List; + +import com.realnet.codeextractor.entity.Rn_Bcf_Extractor; +import com.realnet.codeextractor.entity.Rn_Bcf_Extractor_Params; +import com.realnet.fnd.response.PageResponse; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper = false) +public class CodeExtractorParamsResponse extends PageResponse { + @ApiModelProperty(required = true, value = "") + private List items; +} diff --git a/backend/BaseProject/test4/codeextractor/response/CodeExtractorResponse.java b/backend/BaseProject/test4/codeextractor/response/CodeExtractorResponse.java new file mode 100644 index 0000000..1dd0ef9 --- /dev/null +++ b/backend/BaseProject/test4/codeextractor/response/CodeExtractorResponse.java @@ -0,0 +1,17 @@ +package com.realnet.codeextractor.response; + +import java.util.List; + +import com.realnet.codeextractor.entity.Rn_Bcf_Extractor; +import com.realnet.fnd.response.PageResponse; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper=false) +public class CodeExtractorResponse extends PageResponse { + @ApiModelProperty(required = true, value = "") + private List items; +} diff --git a/backend/BaseProject/test4/codeextractor/response/ExceptionRuleLibraryResponse.java b/backend/BaseProject/test4/codeextractor/response/ExceptionRuleLibraryResponse.java new file mode 100644 index 0000000..ecc725c --- /dev/null +++ b/backend/BaseProject/test4/codeextractor/response/ExceptionRuleLibraryResponse.java @@ -0,0 +1,17 @@ +package com.realnet.codeextractor.response; + +import java.util.List; + +import com.realnet.codeextractor.entity.Rn_Bcf_Exception_Rules; +import com.realnet.fnd.response.PageResponse; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper=false) +public class ExceptionRuleLibraryResponse extends PageResponse { + @ApiModelProperty(required = true, value = "") + private List items; +} diff --git a/backend/BaseProject/test4/codeextractor/response/RuleLibraryResponse.java b/backend/BaseProject/test4/codeextractor/response/RuleLibraryResponse.java new file mode 100644 index 0000000..2b96f96 --- /dev/null +++ b/backend/BaseProject/test4/codeextractor/response/RuleLibraryResponse.java @@ -0,0 +1,18 @@ +package com.realnet.codeextractor.response; + +import java.util.List; + +import com.realnet.codeextractor.entity.Rn_Bcf_Extractor; +import com.realnet.codeextractor.entity.Rn_Bcf_Rules; +import com.realnet.fnd.response.PageResponse; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper=false) +public class RuleLibraryResponse extends PageResponse { + @ApiModelProperty(required = true, value = "") + private List items; +} diff --git a/backend/BaseProject/test4/codeextractor/response/TechnologyStackResponse.java b/backend/BaseProject/test4/codeextractor/response/TechnologyStackResponse.java new file mode 100644 index 0000000..badb37e --- /dev/null +++ b/backend/BaseProject/test4/codeextractor/response/TechnologyStackResponse.java @@ -0,0 +1,18 @@ +package com.realnet.codeextractor.response; + +import java.util.List; + +import com.realnet.codeextractor.entity.Rn_Bcf_Extractor; +import com.realnet.codeextractor.entity.Rn_Bcf_Technology_Stack1; +import com.realnet.fnd.response.PageResponse; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper=false) +public class TechnologyStackResponse extends PageResponse { + @ApiModelProperty(required = true, value = "") + private List items; +} diff --git a/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_Exception_Rule_Library_Service.java b/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_Exception_Rule_Library_Service.java new file mode 100644 index 0000000..b52b7d9 --- /dev/null +++ b/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_Exception_Rule_Library_Service.java @@ -0,0 +1,20 @@ +package com.realnet.codeextractor.service; + +import java.util.List; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; + +import com.realnet.codeextractor.entity.Rn_Bcf_Exception_Rules; + +public interface Rn_Bcf_Exception_Rule_Library_Service { + List getAll(); + Page getAll(Pageable p); + Rn_Bcf_Exception_Rules getById(int id); + Rn_Bcf_Exception_Rules save(Rn_Bcf_Exception_Rules bcf_rule); + Rn_Bcf_Exception_Rules updateById(int id, Rn_Bcf_Exception_Rules bcf_rule); + boolean deleteById(int id); + + List getByType(String tech_stack, String object_type, String sub_object_type); + +} diff --git a/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_Exception_Rule_Library_ServiceImpl.java b/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_Exception_Rule_Library_ServiceImpl.java new file mode 100644 index 0000000..ee2b886 --- /dev/null +++ b/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_Exception_Rule_Library_ServiceImpl.java @@ -0,0 +1,78 @@ +package com.realnet.codeextractor.service; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.stereotype.Service; + +import com.realnet.codeextractor.entity.Rn_Bcf_Exception_Rules; +import com.realnet.codeextractor.repository.Rn_Bcf_Exception_Rule_Library_Repository; +import com.realnet.exceptions.ResourceNotFoundException; + +import lombok.extern.slf4j.Slf4j; + +@Slf4j +@Service +public class Rn_Bcf_Exception_Rule_Library_ServiceImpl implements Rn_Bcf_Exception_Rule_Library_Service { + + @Autowired + private Rn_Bcf_Exception_Rule_Library_Repository exceptionRuleLibraryRepository; + + @Override + public List getAll() { + return exceptionRuleLibraryRepository.findAll(); + } + + @Override + public Page getAll(Pageable page) { + return exceptionRuleLibraryRepository.findAll(page); + } + + @Override + public Rn_Bcf_Exception_Rules getById(int id) { + Rn_Bcf_Exception_Rules bcf_extractor = exceptionRuleLibraryRepository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Rule Not Found :: " + id)); + return bcf_extractor; + } + + @Override + public Rn_Bcf_Exception_Rules save(Rn_Bcf_Exception_Rules bcf_extractor) { + Rn_Bcf_Exception_Rules savedExtractor = exceptionRuleLibraryRepository.save(bcf_extractor); + return savedExtractor; + } + + @Override + public Rn_Bcf_Exception_Rules updateById(int id, Rn_Bcf_Exception_Rules ruleRequest) { + Rn_Bcf_Exception_Rules old_extractor = exceptionRuleLibraryRepository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Exception Rule not found :: " + id)); + + old_extractor.setTech_stack(ruleRequest.getTech_stack()); + old_extractor.setObject_type(ruleRequest.getObject_type()); + old_extractor.setSub_object_type(ruleRequest.getSub_object_type()); + old_extractor.setObject_name_variable(ruleRequest.getObject_name_variable()); + old_extractor.setObject_name_dynamic_string(ruleRequest.getObject_name_dynamic_string()); + + final Rn_Bcf_Exception_Rules updated_rule = exceptionRuleLibraryRepository.save(old_extractor); + return updated_rule; + } + + @Override + public boolean deleteById(int id) { + if (!exceptionRuleLibraryRepository.existsById(id)) { + throw new ResourceNotFoundException("Rule not exist"); + } + Rn_Bcf_Exception_Rules rule = exceptionRuleLibraryRepository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Rule not found :: " + id)); + exceptionRuleLibraryRepository.delete(rule); + return true; + } + + @Override + public List getByType(String tech_stack, String object_type, String sub_object_type) { + return exceptionRuleLibraryRepository.findByType(tech_stack, object_type, sub_object_type); + } + + +} diff --git a/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_Extractor_Params_Service.java b/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_Extractor_Params_Service.java new file mode 100644 index 0000000..ba2c495 --- /dev/null +++ b/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_Extractor_Params_Service.java @@ -0,0 +1,24 @@ +package com.realnet.codeextractor.service; + +import java.util.List; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; + +import com.realnet.codeextractor.entity.Rn_Bcf_Extractor_Params; + +public interface Rn_Bcf_Extractor_Params_Service { + List getAll(); + Page getAll(Pageable p); + + List getByHeaderId(int headerId); + List getByHeaderIdOrderByDate(int headerId); + + + Rn_Bcf_Extractor_Params getById(int id); + Rn_Bcf_Extractor_Params save(Rn_Bcf_Extractor_Params bcf_extractor_params); + Rn_Bcf_Extractor_Params updateById(int id, Rn_Bcf_Extractor_Params bcf_extractor_params); + + boolean deleteById(int id); + +} diff --git a/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_Extractor_Params_ServiceImpl.java b/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_Extractor_Params_ServiceImpl.java new file mode 100644 index 0000000..c6e898d --- /dev/null +++ b/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_Extractor_Params_ServiceImpl.java @@ -0,0 +1,91 @@ +package com.realnet.codeextractor.service; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.stereotype.Service; + +import com.realnet.codeextractor.entity.Rn_Bcf_Extractor_Params; +import com.realnet.codeextractor.repository.Rn_Bcf_Extractor_Params_Repository; +import com.realnet.exceptions.ResourceNotFoundException; +import com.realnet.users.service1.AppUserService; + +@Service +public class Rn_Bcf_Extractor_Params_ServiceImpl implements Rn_Bcf_Extractor_Params_Service { + + @Autowired + private AppUserService userService; + + @Autowired + private Rn_Bcf_Extractor_Params_Repository rn_bcf_extractor_params_repository; + + @Override + public List getAll() { + return rn_bcf_extractor_params_repository.findAll(); + } + + @Override + public Page getAll(Pageable page) { + return rn_bcf_extractor_params_repository.findAll(page); + } + + @Override + public Rn_Bcf_Extractor_Params getById(int id) { + Rn_Bcf_Extractor_Params bcf_extractor = rn_bcf_extractor_params_repository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Extractor Param Data Not Found :: " + id)); + return bcf_extractor; + } + + @Override + public Rn_Bcf_Extractor_Params save(Rn_Bcf_Extractor_Params bcf_extractor) { + Rn_Bcf_Extractor_Params savedExtractor = rn_bcf_extractor_params_repository.save(bcf_extractor); + return savedExtractor; + } + + @Override + public Rn_Bcf_Extractor_Params updateById(int id, Rn_Bcf_Extractor_Params extractorParamsRequest) { + // User loggedInUser = userService.getLoggedInUser(); + Rn_Bcf_Extractor_Params old_extractor = rn_bcf_extractor_params_repository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Menu not found :: " + id)); + old_extractor.setTech_stack(extractorParamsRequest.getTech_stack()); + old_extractor.setObject_type(extractorParamsRequest.getObject_type()); + old_extractor.setSub_object_type(extractorParamsRequest.getSub_object_type()); + old_extractor.setFile_code(extractorParamsRequest.getFile_code()); + old_extractor.setName_string(extractorParamsRequest.getName_string()); + old_extractor.setAddress_string(extractorParamsRequest.getAddress_string()); + old_extractor.setMoved_address_string(extractorParamsRequest.getMoved_address_string()); + old_extractor.setReference_address_string(extractorParamsRequest.getReference_address_string()); + old_extractor.setDescription(extractorParamsRequest.getDescription()); + old_extractor.setFile_name_var(extractorParamsRequest.getFile_name_var()); + old_extractor.setFile_name_dynamic_string(extractorParamsRequest.getFile_name_dynamic_string()); + old_extractor.setIs_extraction_enabled(extractorParamsRequest.isIs_extraction_enabled()); + old_extractor.setIs_creation_enabled(extractorParamsRequest.isIs_creation_enabled()); + old_extractor.setTotal_project_path_dynamic_string(extractorParamsRequest.getTotal_project_path_dynamic_string()); + final Rn_Bcf_Extractor_Params updated_function = rn_bcf_extractor_params_repository.save(old_extractor); + return updated_function; + } + + @Override + public boolean deleteById(int id) { + if (!rn_bcf_extractor_params_repository.existsById(id)) { + throw new ResourceNotFoundException("Extractor Data not exist"); + } + Rn_Bcf_Extractor_Params bcf_extractor = rn_bcf_extractor_params_repository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Menu not found :: " + id)); + rn_bcf_extractor_params_repository.delete(bcf_extractor); + return true; + } + + @Override + public List getByHeaderId(int headerId) { + return rn_bcf_extractor_params_repository.findByHeaderId(headerId); + } + + @Override + public List getByHeaderIdOrderByDate(int headerId) { + return rn_bcf_extractor_params_repository.findByHeaderIdOrderByDate(headerId); + } + +} diff --git a/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_Extractor_Service.java b/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_Extractor_Service.java new file mode 100644 index 0000000..03d2fb6 --- /dev/null +++ b/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_Extractor_Service.java @@ -0,0 +1,27 @@ +package com.realnet.codeextractor.service; + +import java.io.File; +import java.io.IOException; +import java.util.List; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; + +import com.realnet.codeextractor.entity.Rn_Bcf_Extractor; + +public interface Rn_Bcf_Extractor_Service { + List getAll(); + Page getAll(Pageable p); + Rn_Bcf_Extractor getById(int id); + Rn_Bcf_Extractor save(Rn_Bcf_Extractor bcf_extractor); + Rn_Bcf_Extractor updateById(int id, Rn_Bcf_Extractor bcf_extractor); + boolean deleteById(int id); + + public void saveListOFiles(int headerId, String tech_stack, String obj_type, String sub_obj_type, String destDirectory) + throws IOException; + + public void moveFiles(int id, String toDir) throws IOException; + public void deleteEmptyDirectory(File dir) throws IOException; + + +} diff --git a/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_Extractor_ServiceImpl.java b/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_Extractor_ServiceImpl.java new file mode 100644 index 0000000..3006280 --- /dev/null +++ b/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_Extractor_ServiceImpl.java @@ -0,0 +1,249 @@ +package com.realnet.codeextractor.service; + +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.stereotype.Service; + +import com.realnet.codeextractor.entity.Rn_Bcf_Extractor; +import com.realnet.codeextractor.entity.Rn_Bcf_Extractor_Params; +import com.realnet.codeextractor.repository.Rn_Bcf_Extractor_Repository; +import com.realnet.exceptions.ResourceNotFoundException; +import com.realnet.fnd.service.FileStorageService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserService; +import com.realnet.users.service1.AppUserServiceImpl; + +import lombok.extern.slf4j.Slf4j; + +@Slf4j +@Service +public class Rn_Bcf_Extractor_ServiceImpl implements Rn_Bcf_Extractor_Service { + + @Autowired + private AppUserServiceImpl userService; + + @Autowired + private FileStorageService fileStorageService; + + @Autowired + private Rn_Bcf_Extractor_Repository rn_bcf_extractor_repository; + + @Autowired + private Rn_Bcf_Extractor_Params_Service rn_bcf_extractor_params_service; + + @Override + public List getAll() { + return rn_bcf_extractor_repository.findAll(); + } + + @Override + public Page getAll(Pageable page) { + return rn_bcf_extractor_repository.findAll(page); + } + + @Override + public Rn_Bcf_Extractor getById(int id) { + Rn_Bcf_Extractor bcf_extractor = rn_bcf_extractor_repository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Extractor Table Data Not Found :: " + id)); + return bcf_extractor; + } + + @Override + public Rn_Bcf_Extractor save(Rn_Bcf_Extractor bcf_extractor) { + // User loggedInUser = userService.getLoggedInUser(); + // bcf_extractor.setCreatedBy(loggedInUser.getUserId()); + Rn_Bcf_Extractor savedExtractor = rn_bcf_extractor_repository.save(bcf_extractor); + return savedExtractor; + } + + @Override + public Rn_Bcf_Extractor updateById(int id, Rn_Bcf_Extractor extractorRequest) { + // User loggedInUser = userService.getLoggedInUser(); + + Rn_Bcf_Extractor old_extractor = rn_bcf_extractor_repository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Menu not found :: " + id)); + + old_extractor.setTech_stack(extractorRequest.getTech_stack()); + old_extractor.setTech_stack_key(extractorRequest.getTech_stack_key()); + old_extractor.setObject_type(extractorRequest.getObject_type()); + old_extractor.setSub_object_type(extractorRequest.getSub_object_type()); + old_extractor.setForm_type_name(extractorRequest.getForm_type_name()); + old_extractor.setStd_wf_name(extractorRequest.getStd_wf_name()); + old_extractor.setIcon_file_name(extractorRequest.getIcon_file_name()); + old_extractor.setSample_file_name(extractorRequest.getSample_file_name()); + old_extractor.setExtractor_stage(extractorRequest.getExtractor_stage()); + // line part + old_extractor.setRn_bcf_extractor_Params(extractorRequest.getRn_bcf_extractor_Params()); + // old_extractor.setUpdatedBy(loggedInUser.getUserId()); + final Rn_Bcf_Extractor updated_function = rn_bcf_extractor_repository.save(old_extractor); + return updated_function; + } + + @Override + public boolean deleteById(int id) { + if (!rn_bcf_extractor_repository.existsById(id)) { + throw new ResourceNotFoundException("Extractor Data not exist"); + } + Rn_Bcf_Extractor bcf_extractor = rn_bcf_extractor_repository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Menu not found :: " + id)); + rn_bcf_extractor_repository.delete(bcf_extractor); + return true; + } + + @Override + public void saveListOFiles(int headerId, String tech_stack, String obj_type, String sub_obj_type, + String destDirectory) throws IOException { + File destDir = new File(destDirectory); + + System.out.println("Destination Folder Path = " + destDirectory); + + ArrayList files = new ArrayList(); + + // Get all files from a directory. + File[] fList = destDir.listFiles(); + if (fList != null) { + for (File file : fList) { + if (file.isFile()) { + files.add(file.getAbsolutePath()); + // System.out.println("directory:" + file.getAbsolutePath()); + } else if (file.isDirectory()) { + saveListOFiles(headerId, tech_stack, obj_type, sub_obj_type, file.getAbsolutePath()); + } + } + } + + AppUser user = userService.getLoggedInUser(); + Long userId = user.getUserId(); + + Rn_Bcf_Extractor rn_bcf_extractor = this.getById(headerId); + String sampleFileName = rn_bcf_extractor.getSample_file_name(); + Long accId = rn_bcf_extractor.getAccountId(); + System.out.println("SAMPLE FILE NAME = " + sampleFileName); + // REMOVING .ZIP + sampleFileName = sampleFileName.substring(0, sampleFileName.lastIndexOf(".")); +// System.out.println("AFTER REMOVING .ZIP = " + sampleFileName); + // FOR CONVERTING OBJECT NAMES + // String insertPrefix = "Rn_"; + + //List params = new ArrayList(); + // GET FILE PATHS + for (int i = 0; i < files.size(); i++) { + //List params = new ArrayList(); + String filePath = files.get(i).replace("\\", "/"); + File finalFile = new File(filePath); + String name = finalFile.getName(); + + /* + * ***ADD RN PREFIX LOGIC*** if(!name.contains(insertPrefix)) { name = + * name.substring(0,0).concat(insertPrefix) + name.substring(0); } + */ + + // DESTINATION ADDRESS PATH(FOR OUTPUT FILES) + /* + * ZIP FILE NAME = Angular_project INPUT : + * {PROJECT_PATH}/src/main/resources/extracted-files/ + * Angular_project_1599226114430/rn_header_test1-details.component.html OUTPUT : + * /frontend/src/app/admin/{{DYNAMIC VARIABLE}}/details/ + */ + String ref_address_string = filePath.substring(filePath.lastIndexOf(sampleFileName)); + ref_address_string = ref_address_string.substring(ref_address_string.indexOf("/")); + // System.out.println("REF ADDRESS STRING = " + ref_address_string); + +// // DYNAMIC UI_NAME LOGIC FOR ANGULAR FILE STRUCTURE +// final String ng_prj_struct = "/frontend/src/app/admin/"; +// if (ref_address_string.contains(ng_prj_struct)) { +// int len = ng_prj_struct.length(); +// String data = ref_address_string.substring(0,len) + "ui_name"; +// int tail = ref_address_string.indexOf("/", len + 1); +// String temp = ref_address_string.substring(tail); +// data += temp; +// ref_address_string = data; +// } + + // ========ADD IT INTO PARAMETERS TABLE========= + Rn_Bcf_Extractor_Params rn_bcf_extractor_params = new Rn_Bcf_Extractor_Params(); + // System.out.println("SET HEADER ID = " + headerId); + + // rn_bcf_extractor_params_t.setHeader_id(headerId); + rn_bcf_extractor_params.setTech_stack(tech_stack); + rn_bcf_extractor_params.setObject_type(obj_type); + rn_bcf_extractor_params.setSub_object_type(sub_obj_type); + rn_bcf_extractor_params.setFile_code("200"); + rn_bcf_extractor_params.setName_string(name); + rn_bcf_extractor_params.setAddress_string(filePath); + rn_bcf_extractor_params.setReference_address_string(ref_address_string); // FOR OUTPUT FILE PATH + + String fileType = net.lingala.zip4j.util.FileUtils.getFileExtension(finalFile); + rn_bcf_extractor_params.setDescription(fileType); + // IF IT'S YES, THEN FILE WILL BE PROCESSED FOR STATIC AND DYNAMIC EXTRACTION. + rn_bcf_extractor_params.setIs_extraction_enabled(true); + rn_bcf_extractor_params.setIs_creation_enabled(true); + rn_bcf_extractor_params.setAccountId(accId); + rn_bcf_extractor_params.setCreatedBy(userId); + + // SAVING BASE PROJECT FILE PATH IN PARAMS TABLE + //bcf_extractor_params_service.save(rn_bcf_extractor_params_t); + //rn_bcf_extractor.setRn_bcf_extractor_Params(rn_bcf_extractor_params); +// params.add(rn_bcf_extractor_params); +// rn_bcf_extractor.setRn_bcf_extractor_Params(params); +// this.updateById(headerId, rn_bcf_extractor); // need to test + rn_bcf_extractor_params.setRn_bcf_extractor(rn_bcf_extractor); + rn_bcf_extractor_params_service.save(rn_bcf_extractor_params); + } + + } + + @Override + public void moveFiles(int id, String toDir) throws IOException { + File moveToFile = new File(toDir); + // List params_t = getById(id).getRn_bcf_extractor_Params(); + //Rn_Bcf_Extractor extractor = this.getById(id); + //log.debug("extractor : {} ",extractor); + //List params_t = extractor.getRn_bcf_extractor_Params(); + List params_t = rn_bcf_extractor_params_service.getByHeaderId(id); + //log.debug("extractor : {} ", params_t); + for (Rn_Bcf_Extractor_Params params : params_t) { + String fileDirectory = params.getAddress_string(); + + File file = new File(fileDirectory); + String fileName = file.getName(); + + // MOVE ALL FILES INTO PARENT DIRECTORY + System.out.println("File name = " + fileName + "\n" + "Move to = " + toDir); + file.renameTo(new File(moveToFile, file.getName())); + + String destDir = toDir + "/" + fileName; + + // SAVE MOVED DIRECTORY PATH INTO THE PARAMS TABLE + params.setMoved_address_string(destDir); + rn_bcf_extractor_params_service.save(params); + } + // DELETE EMPTY DIRECTORY + this.deleteEmptyDirectory(moveToFile); + + } + + @Override + public void deleteEmptyDirectory(File dir) throws IOException { + if (dir.isDirectory()) { + File[] fList = dir.listFiles(); + if (fList != null) { + for (File file : fList) { + if (!file.isFile()) { + System.out.println("Removing empty directory : " + file.getName()); + file.delete(); + deleteEmptyDirectory(file); + } + } + dir.delete(); + } + } + } + +} diff --git a/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_Rule_Library_Service.java b/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_Rule_Library_Service.java new file mode 100644 index 0000000..bef1318 --- /dev/null +++ b/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_Rule_Library_Service.java @@ -0,0 +1,31 @@ +package com.realnet.codeextractor.service; + +import java.util.List; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; + +import com.realnet.codeextractor.entity.Rn_Bcf_Rules; + +public interface Rn_Bcf_Rule_Library_Service { + List getAll(); + + Page getAll(Pageable p); + + Rn_Bcf_Rules getById(int id); + + Rn_Bcf_Rules save(Rn_Bcf_Rules bcf_rule); + + Rn_Bcf_Rules updateById(int id, Rn_Bcf_Rules bcf_rule); + + boolean deleteById(int id); + + List copyRules(String to_tech_stack, String to_object_type, String to_sub_object_type, + String from_tech_stack, String from_object_type, String from_sub_object_type); + + List copyRules2(String from_tech_stack, String from_object_type, String from_sub_object_type); + + // String stringReplace(String str, String start, String end, String + // replaceWith, String file_type); + +} diff --git a/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_Rule_Library_ServiceImpl.java b/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_Rule_Library_ServiceImpl.java new file mode 100644 index 0000000..60b5f74 --- /dev/null +++ b/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_Rule_Library_ServiceImpl.java @@ -0,0 +1,131 @@ +package com.realnet.codeextractor.service; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.stereotype.Service; + +import com.realnet.codeextractor.entity.Rn_Bcf_Rules; +import com.realnet.codeextractor.repository.Rn_Bcf_Rule_Library_Repository; +import com.realnet.exceptions.ResourceNotFoundException; + +import lombok.extern.slf4j.Slf4j; + +@Slf4j +@Service +public class Rn_Bcf_Rule_Library_ServiceImpl implements Rn_Bcf_Rule_Library_Service { + + @Autowired + private Rn_Bcf_Rule_Library_Repository ruleLibraryRepository; + + @Override + public List getAll() { + return ruleLibraryRepository.findAll(); + } + + @Override + public Page getAll(Pageable page) { + return ruleLibraryRepository.findAll(page); + } + + @Override + public Rn_Bcf_Rules getById(int id) { + Rn_Bcf_Rules bcf_extractor = ruleLibraryRepository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Rule Not Found :: " + id)); + return bcf_extractor; + } + + @Override + public Rn_Bcf_Rules save(Rn_Bcf_Rules bcf_extractor) { + Rn_Bcf_Rules savedExtractor = ruleLibraryRepository.save(bcf_extractor); + return savedExtractor; + } + + @Override + public Rn_Bcf_Rules updateById(int id, Rn_Bcf_Rules ruleRequest) { + Rn_Bcf_Rules old_extractor = ruleLibraryRepository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Rule not found :: " + id)); + + old_extractor.setGroup_id(ruleRequest.getGroup_id()); + old_extractor.setRule_name(ruleRequest.getRule_name()); + old_extractor.setTech_stack(ruleRequest.getTech_stack()); + old_extractor.setObject_type(ruleRequest.getObject_type()); + old_extractor.setSub_object_type(ruleRequest.getSub_object_type()); + old_extractor.setFile_code(ruleRequest.getFile_code()); + old_extractor.setRule_type(ruleRequest.getRule_type()); + old_extractor.setIdentifier_start_string(ruleRequest.getIdentifier_start_string()); + old_extractor.setIdentifier_end_string(ruleRequest.getIdentifier_end_string()); + old_extractor.setReplacement_string(ruleRequest.getReplacement_string()); + + final Rn_Bcf_Rules updated_rule = ruleLibraryRepository.save(old_extractor); + return updated_rule; + } + + @Override + public boolean deleteById(int id) { + if (!ruleLibraryRepository.existsById(id)) { + throw new ResourceNotFoundException("Rule not exist"); + } + Rn_Bcf_Rules rule = ruleLibraryRepository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Rule not found :: " + id)); + ruleLibraryRepository.delete(rule); + return true; + } + +// @Override +// public String stringReplace(String str, String start, String end, String replaceWith, String file_type) { +// int i = str.indexOf(start); +// while (i != -1) { +// int j = str.indexOf(end, i + 1); +// if (j != -1) { +// /* @Include starting and ending string +// * String data = str.substring(0, i + start.length()) + "\n" + replaceWith + "\n"; +// * String temp = str.substring(j); +// * +// * @Not Include starting and ending string +// * String data = str.substring(0, i) + "\n" + replaceWith + "\n"; +// * String temp = str.substring(j + end.length()); +// * */ +// String data = str.substring(0, i) + "\n" + replaceWith + "\n"; +// String temp = str.substring(j + end.length()); +// data += temp; +// str = data; +// i = str.indexOf(start, i + replaceWith.length() + end.length() + 1); +// } else { +// break; +// } +// } +// +//// if (replaced) { +//// String newStart = ""; +//// String newEnd = ""; +//// if(file_type.equals("html") || file_type.equals("jsp")) { +//// newStart = ""; +//// newEnd = ""; +//// str = str.replace(start, newStart); +//// str = str.replace(end, newEnd); +//// } +//// if(file_type.equals("java") || file_type.equals("ts") || file_type.equals("js")) { +//// newStart = "/* bcf-fieldloop-startshere-processed */"; +//// newEnd = "/* bcf-fieldloop-endshere-processed */"; +//// str = str.replace(start, newStart); +//// str = str.replace(end, newEnd); +//// } +//// } +// return str; +// } + + public List copyRules(String to_tech_stack, String to_object_type, String to_sub_object_type,String from_tech_stack,String from_object_type, String from_sub_object_type){ + List rules = ruleLibraryRepository.copyRules(to_tech_stack, to_object_type, to_sub_object_type, from_tech_stack, from_object_type, from_sub_object_type); + log.debug("Nil Copied Rules: {}", rules); + return ruleLibraryRepository.copyRules(to_tech_stack, to_object_type, to_sub_object_type, from_tech_stack, from_object_type, from_sub_object_type); + } + + @Override + public List copyRules2(String from_tech_stack, String from_object_type, String from_sub_object_type) { + return ruleLibraryRepository.copyRules2(from_tech_stack, from_object_type, from_sub_object_type); + } + +} diff --git a/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_TechnologyStack_Service.java b/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_TechnologyStack_Service.java new file mode 100644 index 0000000..880efd1 --- /dev/null +++ b/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_TechnologyStack_Service.java @@ -0,0 +1,21 @@ +package com.realnet.codeextractor.service; + +import java.util.List; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; + +import com.realnet.codeextractor.entity.ActiveTechStack_DTO; +import com.realnet.codeextractor.entity.Rn_Bcf_Technology_Stack1; + +public interface Rn_Bcf_TechnologyStack_Service { + List getAll(); + Page getAll(Pageable p); + Rn_Bcf_Technology_Stack1 getById(int id); + Rn_Bcf_Technology_Stack1 save(Rn_Bcf_Technology_Stack1 bcf_tech_stack); + Rn_Bcf_Technology_Stack1 updateById(int id, Rn_Bcf_Technology_Stack1 bcf_tech_stack); + boolean deleteById(int id); + + List getListOfActivateTechnology(); + +} diff --git a/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_TechnologyStack_ServiceImpl1.java b/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_TechnologyStack_ServiceImpl1.java new file mode 100644 index 0000000..9e77a84 --- /dev/null +++ b/backend/BaseProject/test4/codeextractor/service/Rn_Bcf_TechnologyStack_ServiceImpl1.java @@ -0,0 +1,101 @@ +package com.realnet.codeextractor.service; + +import java.util.ArrayList; +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.stereotype.Service; + +import com.realnet.codeextractor.entity.ActiveTechStack_DTO; +import com.realnet.codeextractor.entity.Rn_Bcf_Technology_Stack1; +import com.realnet.codeextractor.repository.Rn_Bcf_TechnologyStack_Repository1; +import com.realnet.exceptions.ResourceNotFoundException; +import com.realnet.utils.Constant; + +import lombok.extern.slf4j.Slf4j; + +@Slf4j +@Service +public class Rn_Bcf_TechnologyStack_ServiceImpl1 implements Rn_Bcf_TechnologyStack_Service { + + @Autowired + private Rn_Bcf_TechnologyStack_Repository1 technologStackRepository; + + @Override + public List getAll() { + return technologStackRepository.findAll(); + } + + @Override + public Page getAll(Pageable page) { + return technologStackRepository.findAll(page); + } + + @Override + public Rn_Bcf_Technology_Stack1 getById(int id) { + Rn_Bcf_Technology_Stack1 bcf_extractor = technologStackRepository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException(Constant.NOT_FOUND_EXCEPTION + id)); + return bcf_extractor; + } + + @Override + public Rn_Bcf_Technology_Stack1 save(Rn_Bcf_Technology_Stack1 bcf_extractor) { + Rn_Bcf_Technology_Stack1 savedTechnology = technologStackRepository.save(bcf_extractor); + return savedTechnology; + } + + @Override + public Rn_Bcf_Technology_Stack1 updateById(int id, Rn_Bcf_Technology_Stack1 technologyRequest) { + Rn_Bcf_Technology_Stack1 old_extractor = technologStackRepository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException(Constant.NOT_FOUND_EXCEPTION + id)); + + old_extractor.setTech_stack(technologyRequest.getTech_stack()); + old_extractor.setTech_stack_key(technologyRequest.getTech_stack_key()); + old_extractor.setBase_prj_file_name(technologyRequest.getBase_prj_file_name()); + old_extractor.setTags(technologyRequest.getTags()); + old_extractor.setActive(technologyRequest.isActive()); + + final Rn_Bcf_Technology_Stack1 updated_technology = technologStackRepository.save(old_extractor); + return updated_technology; + } + + @Override + public boolean deleteById(int id) { + if (!technologStackRepository.existsById(id)) { + throw new ResourceNotFoundException(Constant.NOT_EXIST_EXCEPTION); + } + Rn_Bcf_Technology_Stack1 bcf_extractor = technologStackRepository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException(Constant.NOT_FOUND_EXCEPTION + id)); + technologStackRepository.delete(bcf_extractor); + return true; + } + + @Override + public List getListOfActivateTechnology() { +// List activeTechList = technologStackRepository.activeTechList(); +// log.debug("ACTIVE TECHNOLOGY LIST : {} ", activeTechList); + + List activeTech = technologStackRepository.activeTechStacks(); + log.debug("ACTIVE TECHNOLOGY : {} ", activeTech); + +// activeTech.forEach(data -> { +// ActiveTechStack_DTO dto = new ActiveTechStack_DTO(); +// dto.setId(data.getId()); +// dto.setName(data.getBase_prj_file_name()); +// }); + + List activeTechDTO = new ArrayList(); + for (Rn_Bcf_Technology_Stack1 tech : activeTech) { + ActiveTechStack_DTO dto = new ActiveTechStack_DTO(); + dto.setId(tech.getId()); + dto.setName(tech.getBase_prj_file_name()); + activeTechDTO.add(dto); + } + log.debug("activeTechDTO : {} ", activeTechDTO); + System.out.println("ServiceImpl : activeTechDTO " + activeTechDTO); + return activeTechDTO; + } + +} diff --git a/backend/BaseProject/test4/codeextractor/service/Rule_library_keywordService.java b/backend/BaseProject/test4/codeextractor/service/Rule_library_keywordService.java new file mode 100644 index 0000000..3c479cd --- /dev/null +++ b/backend/BaseProject/test4/codeextractor/service/Rule_library_keywordService.java @@ -0,0 +1,44 @@ +package com.realnet.codeextractor.service; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import com.realnet.codeextractor.entity.Rule_library_keyword; +import com.realnet.codeextractor.repository.Rule_library_keywordRepository; + + +@Service +public class Rule_library_keywordService { + + @Autowired + private Rule_library_keywordRepository Repository; + + public Rule_library_keyword Savedata(Rule_library_keyword data) { + return Repository.save(data); + } + + public List getdetails() { + return (List) Repository.findAll(); + } + + public Rule_library_keyword getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + public void delete_by_id(Integer id) { + Repository.deleteById(id); + } + + public Rule_library_keyword update(Rule_library_keyword data, Integer id) { + Rule_library_keyword old = Repository.findById(id).get(); + old.setTech_stack(data.getTech_stack()); + old.setObject_type(data.getObject_type()); + old.setSub_object_type(data.getSub_object_type()); + old.setVersion(data.getVersion()); + old.setReplcement_string(data.getReplcement_string()); + final Rule_library_keyword test = Repository.save(old); + return test; + } +} \ No newline at end of file diff --git a/backend/BaseProject/test4/codeextractor/service/Rule_library_service_gk.java b/backend/BaseProject/test4/codeextractor/service/Rule_library_service_gk.java new file mode 100644 index 0000000..7c5d5f9 --- /dev/null +++ b/backend/BaseProject/test4/codeextractor/service/Rule_library_service_gk.java @@ -0,0 +1,105 @@ +package com.realnet.codeextractor.service; + +import java.io.File; +import java.io.IOException; +import java.nio.charset.StandardCharsets; + +import org.apache.commons.io.FileUtils; +import org.apache.commons.io.FilenameUtils; +import org.json.simple.parser.ParseException; +import org.springframework.stereotype.Service; +import org.springframework.web.bind.annotation.GetMapping; + +@Service +public class Rule_library_service_gk { + + public String rule(String path, String start, String end, String replaceWith) throws ParseException, IOException { + + StringBuilder frontend = new StringBuilder(); + + File staticFile = new File(path); + String staticFileName = staticFile.getName(); + + // System.out.println("========" + staticFileName + "============="); + + String fileString = FileUtils.readFileToString(staticFile, StandardCharsets.UTF_8); + String fileType = FilenameUtils.getExtension(staticFileName); + + // don't check empty file for replacement.. + if (!fileString.isEmpty()) { + + // RULE APPLY + if (end.isEmpty()) { + String f_string = stringReplacewithout_endstring(fileString, start, replaceWith, fileType); + System.out.println(f_string.toString()); + }else { + String finalString = stringReplace(fileString, start, end, replaceWith, fileType); + System.out.println(finalString.toString()); + + } + +// BufferedWriter bw = new BufferedWriter(new FileWriter(staticFile, false)); // replaced +// // string +// bw.write(finalString); +// bw.close(); + + } + + return frontend.toString(); + } + + //WHEN END STRING IS PRESENT + public static String stringReplace(String str, String start, String end, String replaceWith, String file_type) { + int i = str.indexOf(start); + while (i != -1) { + int j = str.indexOf(end, i + 1); + if (j != -1) { + /* + * @Include starting and ending string String data = str.substring(0, i + + * start.length()) + "\n" + replaceWith + "\n"; String temp = str.substring(j); + * + * @Not Include starting and ending string String data = str.substring(0, i) + + * "\n" + replaceWith + "\n"; String temp = str.substring(j + end.length()); + */ +// String data = str.substring(0, i+start.length()) +" "+ replaceWith ; +// String temp = str.substring(j-end.length() + end.length()); + + String data = str.substring(0, i) + start + " " + replaceWith + " " + end; + String temp = str.substring(j + end.length()); + data += temp; + str = data; + i = str.indexOf(start, i + replaceWith.length() + end.length() + 1); + } else { + break; + } + } + + return str; + } + + //WHEN END STRING IS NOT PERSENT + public static String stringReplacewithout_endstring(String str, String start, String replaceWith, String file_type) { + int i = str.indexOf(start); + while (i != -1) { + + /* + * @Include starting and ending string String data = str.substring(0, i + + * start.length()) + "\n" + replaceWith + "\n"; String temp = str.substring(j); + * + * @Not Include starting and ending string String data = str.substring(0, i) + + * "\n" + replaceWith + "\n"; String temp = str.substring(j + end.length()); + */ +// String data = str.substring(0, i+start.length()) +" "+ replaceWith ; +// String temp = str.substring(j-end.length() + end.length()); + + String data = str.substring(0, i) + start + " " + replaceWith ; + str = data; + i = str.indexOf(start, i + replaceWith.length() ); + + } + + return str; + } + + +} diff --git a/backend/BaseProject/test5/Connector/Controller/ConnectorController.java b/backend/BaseProject/test5/Connector/Controller/ConnectorController.java new file mode 100644 index 0000000..9f04c2b --- /dev/null +++ b/backend/BaseProject/test5/Connector/Controller/ConnectorController.java @@ -0,0 +1,79 @@ +package com.realnet.Connector.Controller; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.Connector.Entity.Connector; +import com.realnet.Connector.Repository.Connectorrepository; +import com.realnet.users.entity.Sys_Accounts; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; + +@RestController +@RequestMapping("/connector") +public class ConnectorController { + + @Autowired + private Connectorrepository connectorrepository; + @Autowired + private AppUserServiceImpl userService; + + + //ADD DATA + @PostMapping("/Connectorjson") + public ResponseEntity save(@RequestBody Connector connector) { + AppUser loggedInUser = userService.getLoggedInUser(); + Long account_id = loggedInUser.getAccount().getAccount_id(); + connector.setAccountId(account_id); + Connector save = connectorrepository.save(connector); + return new ResponseEntity<>(save, HttpStatus.OK); + + } + + //UPDATE BY ID + @PutMapping("/Connectorjson/{id}") + public ResponseEntity update(@PathVariable Long id, @RequestBody Connector connector) { + Connector con = connectorrepository.findById(id).orElseThrow(null); + con.setName(connector.getName()); + con.setConnector_json(connector.getConnector_json()); + + Connector save = connectorrepository.save(con); + return new ResponseEntity<>(save, HttpStatus.OK); + + } + + //GET ALL + @GetMapping("/Connectorjson") + public ResponseEntity getall() { + List save = connectorrepository.findAll(); + return new ResponseEntity<>(save, HttpStatus.OK); + + } + + //GET BY ID + @GetMapping("/Connectorjson/{id}") + public ResponseEntity getbyid(@PathVariable Long id) { + Connector con = connectorrepository.findById(id).orElseThrow(null); + return new ResponseEntity<>(con, HttpStatus.OK); + + } + + //DELETE BY ID + @DeleteMapping("/Connectorjson/{id}") + public void delete(@PathVariable Long id){ + Connector con = connectorrepository.findById(id).orElseThrow(null); + connectorrepository.delete(con); + + } +} diff --git a/backend/BaseProject/test5/Connector/Controller/MappingController.java b/backend/BaseProject/test5/Connector/Controller/MappingController.java new file mode 100644 index 0000000..0cb895d --- /dev/null +++ b/backend/BaseProject/test5/Connector/Controller/MappingController.java @@ -0,0 +1,104 @@ +package com.realnet.Connector.Controller; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; +import com.realnet.Connector.Entity.Connector; +import com.realnet.Connector.Entity.Mapping; +import com.realnet.Connector.Repository.Connectorrepository; + +@RestController +@RequestMapping("/token/connector/mapping") +public class MappingController { + + @Autowired + private Connectorrepository connectorrepository; + + @PostMapping("/mapping") + public Object connector(@RequestBody Mapping mapping) { + List list = new ArrayList<>(); + +// Map param = new HashMap(); + String str = mapping.getMappingString(); + JsonParser parser = new JsonParser(); + JsonElement element = parser.parse(str); + JsonObject obj = element.getAsJsonObject(); + + // get key from get api + Set> entries = obj.entrySet(); + for (Map.Entry entry : entries) { + + String key = entry.getKey(); + String string = key.toString(); + list.add(string); + } + return list; + + } + + @PostMapping("/mapping1") + public Object connector1(@RequestBody Mapping mapping) { + List list = new ArrayList<>(); + +// Map param = new HashMap(); + String str = mapping.getMappingString(); + JsonParser parser = new JsonParser(); + JsonElement element = parser.parse(str); + JsonObject obj = element.getAsJsonObject(); + + // get values from get api + Set> entries = obj.entrySet(); + for (Map.Entry entry : entries) { + + String string2 = entry.getValue().getAsString(); + list.add(string2); + } + return list; + + } + + @PostMapping("/mapping2") + public Object getvalue(@RequestBody Mapping mapping) { + List list = new ArrayList<>(); + +// Map param = new HashMap(); + String str = mapping.getMappingString(); + JsonParser parser = new JsonParser(); + JsonElement element = parser.parse(str); + JsonObject obj = element.getAsJsonObject(); + + // get values from get api + Set> entries = obj.entrySet(); + for (Map.Entry entry : entries) { + + String string2 = entry.getValue().getAsString(); + list.add(string2); + } + return list; + + } + + // get api for call connector by name for job(by gk) + @GetMapping("/connectorname/{name}") + public ResponseEntity getconnector(@PathVariable String name) { + Connector save = connectorrepository.findconnectorbyname(name); + return new ResponseEntity<>(save, HttpStatus.OK); + + } + +} diff --git a/backend/BaseProject/test5/Connector/Entity/Connector.java b/backend/BaseProject/test5/Connector/Entity/Connector.java new file mode 100644 index 0000000..8de5289 --- /dev/null +++ b/backend/BaseProject/test5/Connector/Entity/Connector.java @@ -0,0 +1,33 @@ +package com.realnet.Connector.Entity; + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Lob; +import javax.persistence.Column; + +import com.realnet.Dashboard1.Entity.dashbord_Who_collumn; + +import lombok.Data; + +@Entity +@Data +public class Connector extends dashbord_Who_collumn { + + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private String name; + @Column(length = 15000) + private String get_str; + @Lob + private String connector_json; + +} diff --git a/backend/BaseProject/test5/Connector/Entity/Mapping.java b/backend/BaseProject/test5/Connector/Entity/Mapping.java new file mode 100644 index 0000000..0e23d56 --- /dev/null +++ b/backend/BaseProject/test5/Connector/Entity/Mapping.java @@ -0,0 +1,9 @@ +package com.realnet.Connector.Entity; + +import lombok.Data; + +@Data +public class Mapping { + + private String mappingString; +} diff --git a/backend/BaseProject/test5/Connector/Repository/Connectorrepository.java b/backend/BaseProject/test5/Connector/Repository/Connectorrepository.java new file mode 100644 index 0000000..1d83c69 --- /dev/null +++ b/backend/BaseProject/test5/Connector/Repository/Connectorrepository.java @@ -0,0 +1,15 @@ +package com.realnet.Connector.Repository; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.stereotype.Repository; + +import com.realnet.Connector.Entity.Connector; +@Repository +public interface Connectorrepository extends JpaRepository{ + + + @Query(value = "select * from connector where name=?1", nativeQuery = true) + Connector findconnectorbyname(String name); + +} diff --git a/backend/Resources/Files/BRD Lead Research (1)_1702204592889.xlsx b/backend/Resources/Files/BRD Lead Research (1)_1702204592889.xlsx new file mode 100644 index 0000000..b2c78a8 Binary files /dev/null and b/backend/Resources/Files/BRD Lead Research (1)_1702204592889.xlsx differ diff --git a/backend/Resources/Files/BRD Lead Research.xlsx_1702061306652 b/backend/Resources/Files/BRD Lead Research.xlsx_1702061306652 new file mode 100644 index 0000000..0776c73 Binary files /dev/null and b/backend/Resources/Files/BRD Lead Research.xlsx_1702061306652 differ diff --git a/backend/Resources/Files/BRD Lead Research.xlsx_1702061322914 b/backend/Resources/Files/BRD Lead Research.xlsx_1702061322914 new file mode 100644 index 0000000..0776c73 Binary files /dev/null and b/backend/Resources/Files/BRD Lead Research.xlsx_1702061322914 differ diff --git a/backend/Resources/Files/BRD Lead Research_1702064198316.xlsx b/backend/Resources/Files/BRD Lead Research_1702064198316.xlsx new file mode 100644 index 0000000..0776c73 Binary files /dev/null and b/backend/Resources/Files/BRD Lead Research_1702064198316.xlsx differ diff --git a/backend/Resources/Files/BRD Lead Research_1702099911160.xlsx b/backend/Resources/Files/BRD Lead Research_1702099911160.xlsx new file mode 100644 index 0000000..0776c73 Binary files /dev/null and b/backend/Resources/Files/BRD Lead Research_1702099911160.xlsx differ diff --git a/backend/Resources/Files/BRD Lead Research_1702100584709.xlsx b/backend/Resources/Files/BRD Lead Research_1702100584709.xlsx new file mode 100644 index 0000000..0776c73 Binary files /dev/null and b/backend/Resources/Files/BRD Lead Research_1702100584709.xlsx differ diff --git a/backend/Resources/Files/BRD Lead Research_1702106670593.xlsx b/backend/Resources/Files/BRD Lead Research_1702106670593.xlsx new file mode 100644 index 0000000..0776c73 Binary files /dev/null and b/backend/Resources/Files/BRD Lead Research_1702106670593.xlsx differ diff --git a/backend/Resources/Files/Company_1702203812932.xlsx b/backend/Resources/Files/Company_1702203812932.xlsx new file mode 100644 index 0000000..2f36963 Binary files /dev/null and b/backend/Resources/Files/Company_1702203812932.xlsx differ diff --git a/backend/Resources/Files/Gaurav Kumar (2)_1702099252056.docx b/backend/Resources/Files/Gaurav Kumar (2)_1702099252056.docx new file mode 100644 index 0000000..a9dd678 Binary files /dev/null and b/backend/Resources/Files/Gaurav Kumar (2)_1702099252056.docx differ diff --git a/backend/Resources/Files/Gaurav Kumar_1702204586756.pdf b/backend/Resources/Files/Gaurav Kumar_1702204586756.pdf new file mode 100644 index 0000000..717442a Binary files /dev/null and b/backend/Resources/Files/Gaurav Kumar_1702204586756.pdf differ diff --git a/backend/Resources/Files/HSI_220x100.jpg_1702053167198 b/backend/Resources/Files/HSI_220x100.jpg_1702053167198 new file mode 100644 index 0000000..e74ac98 Binary files /dev/null and b/backend/Resources/Files/HSI_220x100.jpg_1702053167198 differ diff --git a/backend/Resources/Files/HSI_220x100.jpg_1702053169266 b/backend/Resources/Files/HSI_220x100.jpg_1702053169266 new file mode 100644 index 0000000..e74ac98 Binary files /dev/null and b/backend/Resources/Files/HSI_220x100.jpg_1702053169266 differ diff --git a/backend/Resources/Files/Lead Research Sample Report_1702062431957.pdf b/backend/Resources/Files/Lead Research Sample Report_1702062431957.pdf new file mode 100644 index 0000000..a1299c7 Binary files /dev/null and b/backend/Resources/Files/Lead Research Sample Report_1702062431957.pdf differ diff --git a/backend/Resources/Files/Lead Research Sample Report_1702064196341.pdf b/backend/Resources/Files/Lead Research Sample Report_1702064196341.pdf new file mode 100644 index 0000000..a1299c7 Binary files /dev/null and b/backend/Resources/Files/Lead Research Sample Report_1702064196341.pdf differ diff --git a/backend/Resources/Files/Lead Research Sample Report_1702065610144.pdf b/backend/Resources/Files/Lead Research Sample Report_1702065610144.pdf new file mode 100644 index 0000000..a1299c7 Binary files /dev/null and b/backend/Resources/Files/Lead Research Sample Report_1702065610144.pdf differ diff --git a/backend/Resources/Files/Lead Research Sample Report_1702099246272.pdf b/backend/Resources/Files/Lead Research Sample Report_1702099246272.pdf new file mode 100644 index 0000000..a1299c7 Binary files /dev/null and b/backend/Resources/Files/Lead Research Sample Report_1702099246272.pdf differ diff --git a/backend/Resources/Files/Lead Research Sample Report_1702099909415.pdf b/backend/Resources/Files/Lead Research Sample Report_1702099909415.pdf new file mode 100644 index 0000000..a1299c7 Binary files /dev/null and b/backend/Resources/Files/Lead Research Sample Report_1702099909415.pdf differ diff --git a/backend/Resources/Files/Lead Research Sample Report_1702106507641.pdf b/backend/Resources/Files/Lead Research Sample Report_1702106507641.pdf new file mode 100644 index 0000000..a1299c7 Binary files /dev/null and b/backend/Resources/Files/Lead Research Sample Report_1702106507641.pdf differ diff --git a/backend/Resources/Files/Sample Attendance App.docx_1702061299332 b/backend/Resources/Files/Sample Attendance App.docx_1702061299332 new file mode 100644 index 0000000..3bd5dce Binary files /dev/null and b/backend/Resources/Files/Sample Attendance App.docx_1702061299332 differ diff --git a/backend/Resources/Files/Sample Attendance App.docx_1702061303418 b/backend/Resources/Files/Sample Attendance App.docx_1702061303418 new file mode 100644 index 0000000..3bd5dce Binary files /dev/null and b/backend/Resources/Files/Sample Attendance App.docx_1702061303418 differ diff --git a/backend/Resources/Files/Sample Attendance App.docx_1702061319760 b/backend/Resources/Files/Sample Attendance App.docx_1702061319760 new file mode 100644 index 0000000..3bd5dce Binary files /dev/null and b/backend/Resources/Files/Sample Attendance App.docx_1702061319760 differ diff --git a/backend/Resources/Files/Sample Attendance App_1702103968567.docx b/backend/Resources/Files/Sample Attendance App_1702103968567.docx new file mode 100644 index 0000000..3bd5dce Binary files /dev/null and b/backend/Resources/Files/Sample Attendance App_1702103968567.docx differ diff --git a/backend/Resources/Files/Sample Attendance App_1702103972049.docx b/backend/Resources/Files/Sample Attendance App_1702103972049.docx new file mode 100644 index 0000000..3bd5dce Binary files /dev/null and b/backend/Resources/Files/Sample Attendance App_1702103972049.docx differ diff --git a/backend/Resources/Files/Sample Attendance App_1702106509297.docx b/backend/Resources/Files/Sample Attendance App_1702106509297.docx new file mode 100644 index 0000000..3bd5dce Binary files /dev/null and b/backend/Resources/Files/Sample Attendance App_1702106509297.docx differ diff --git a/backend/Resources/Files/Sample Attendance App_1702106672547.docx b/backend/Resources/Files/Sample Attendance App_1702106672547.docx new file mode 100644 index 0000000..3bd5dce Binary files /dev/null and b/backend/Resources/Files/Sample Attendance App_1702106672547.docx differ diff --git a/backend/Resources/Files/WhatsApp Image 2023-08-05 at 9.18.54 AM.jpeg_1702061316216 b/backend/Resources/Files/WhatsApp Image 2023-08-05 at 9.18.54 AM.jpeg_1702061316216 new file mode 100644 index 0000000..6618380 Binary files /dev/null and b/backend/Resources/Files/WhatsApp Image 2023-08-05 at 9.18.54 AM.jpeg_1702061316216 differ diff --git a/backend/Resources/Files/WhatsApp Image 2023-08-05 at 9.18.54 AM.jpeg_1702061329316 b/backend/Resources/Files/WhatsApp Image 2023-08-05 at 9.18.54 AM.jpeg_1702061329316 new file mode 100644 index 0000000..6618380 Binary files /dev/null and b/backend/Resources/Files/WhatsApp Image 2023-08-05 at 9.18.54 AM.jpeg_1702061329316 differ diff --git a/backend/Resources/Files/cldnsure_1702111863905.png b/backend/Resources/Files/cldnsure_1702111863905.png new file mode 100644 index 0000000..890f7bd Binary files /dev/null and b/backend/Resources/Files/cldnsure_1702111863905.png differ diff --git a/backend/Resources/Files/image (7).png_1702053045347 b/backend/Resources/Files/image (7).png_1702053045347 new file mode 100644 index 0000000..8d8252d Binary files /dev/null and b/backend/Resources/Files/image (7).png_1702053045347 differ diff --git a/backend/Resources/Files/image (7).png_1702053046798 b/backend/Resources/Files/image (7).png_1702053046798 new file mode 100644 index 0000000..8d8252d Binary files /dev/null and b/backend/Resources/Files/image (7).png_1702053046798 differ diff --git a/backend/Resources/Files/image (7).png_1702053157144 b/backend/Resources/Files/image (7).png_1702053157144 new file mode 100644 index 0000000..8d8252d Binary files /dev/null and b/backend/Resources/Files/image (7).png_1702053157144 differ diff --git a/backend/Resources/Files/image (7).png_1702053158727 b/backend/Resources/Files/image (7).png_1702053158727 new file mode 100644 index 0000000..8d8252d Binary files /dev/null and b/backend/Resources/Files/image (7).png_1702053158727 differ diff --git a/backend/Resources/Files/image (7).png_1702053160254 b/backend/Resources/Files/image (7).png_1702053160254 new file mode 100644 index 0000000..8d8252d Binary files /dev/null and b/backend/Resources/Files/image (7).png_1702053160254 differ diff --git a/backend/Resources/Files/image (7).png_1702053164353 b/backend/Resources/Files/image (7).png_1702053164353 new file mode 100644 index 0000000..8d8252d Binary files /dev/null and b/backend/Resources/Files/image (7).png_1702053164353 differ diff --git a/backend/Resources/Files/image (7).png_1702054747220 b/backend/Resources/Files/image (7).png_1702054747220 new file mode 100644 index 0000000..8d8252d Binary files /dev/null and b/backend/Resources/Files/image (7).png_1702054747220 differ diff --git a/backend/Resources/Files/image (7)_1702062428052.png b/backend/Resources/Files/image (7)_1702062428052.png new file mode 100644 index 0000000..8d8252d Binary files /dev/null and b/backend/Resources/Files/image (7)_1702062428052.png differ diff --git a/backend/Resources/Files/image (7)_1702111862466.png b/backend/Resources/Files/image (7)_1702111862466.png new file mode 100644 index 0000000..8d8252d Binary files /dev/null and b/backend/Resources/Files/image (7)_1702111862466.png differ diff --git a/backend/Resources/Files/image.png_1702026483662 b/backend/Resources/Files/image.png_1702026483662 new file mode 100644 index 0000000..345120d Binary files /dev/null and b/backend/Resources/Files/image.png_1702026483662 differ diff --git a/backend/Resources/Files/image.png_1702052987565 b/backend/Resources/Files/image.png_1702052987565 new file mode 100644 index 0000000..345120d Binary files /dev/null and b/backend/Resources/Files/image.png_1702052987565 differ diff --git a/backend/Resources/Files/image.png_1702052989394 b/backend/Resources/Files/image.png_1702052989394 new file mode 100644 index 0000000..345120d Binary files /dev/null and b/backend/Resources/Files/image.png_1702052989394 differ diff --git a/backend/Resources/Files/image.png_1702053989661 b/backend/Resources/Files/image.png_1702053989661 new file mode 100644 index 0000000..345120d Binary files /dev/null and b/backend/Resources/Files/image.png_1702053989661 differ diff --git a/backend/Resources/Files/image_1702203806261.png b/backend/Resources/Files/image_1702203806261.png new file mode 100644 index 0000000..345120d Binary files /dev/null and b/backend/Resources/Files/image_1702203806261.png differ diff --git a/backend/Resources/Files/image_1702204580473.png b/backend/Resources/Files/image_1702204580473.png new file mode 100644 index 0000000..345120d Binary files /dev/null and b/backend/Resources/Files/image_1702204580473.png differ diff --git a/backend/Resources/Files/logo_1702203804424.png b/backend/Resources/Files/logo_1702203804424.png new file mode 100644 index 0000000..dd996b9 Binary files /dev/null and b/backend/Resources/Files/logo_1702203804424.png differ diff --git a/backend/Resources/Files/paytm1.png_1702053992704 b/backend/Resources/Files/paytm1.png_1702053992704 new file mode 100644 index 0000000..729484c Binary files /dev/null and b/backend/Resources/Files/paytm1.png_1702053992704 differ diff --git a/backend/Resources/Files/paytm1.png_1702054745710 b/backend/Resources/Files/paytm1.png_1702054745710 new file mode 100644 index 0000000..729484c Binary files /dev/null and b/backend/Resources/Files/paytm1.png_1702054745710 differ diff --git a/backend/Resources/Files/paytm1.png_1702057782909 b/backend/Resources/Files/paytm1.png_1702057782909 new file mode 100644 index 0000000..729484c Binary files /dev/null and b/backend/Resources/Files/paytm1.png_1702057782909 differ diff --git a/backend/Resources/Files/paytm1.png_1702057784287 b/backend/Resources/Files/paytm1.png_1702057784287 new file mode 100644 index 0000000..729484c Binary files /dev/null and b/backend/Resources/Files/paytm1.png_1702057784287 differ diff --git a/backend/Resources/Files/paytm1_1702103970155.png b/backend/Resources/Files/paytm1_1702103970155.png new file mode 100644 index 0000000..729484c Binary files /dev/null and b/backend/Resources/Files/paytm1_1702103970155.png differ diff --git a/backend/Resources/Files/paytm1_1702111860859.png b/backend/Resources/Files/paytm1_1702111860859.png new file mode 100644 index 0000000..729484c Binary files /dev/null and b/backend/Resources/Files/paytm1_1702111860859.png differ diff --git a/backend/Resources/Files/paytm1_1703226744275.png b/backend/Resources/Files/paytm1_1703226744275.png new file mode 100644 index 0000000..729484c Binary files /dev/null and b/backend/Resources/Files/paytm1_1703226744275.png differ diff --git a/backend/Resources/Files/razorpay.png_1702027659349 b/backend/Resources/Files/razorpay.png_1702027659349 new file mode 100644 index 0000000..465275c Binary files /dev/null and b/backend/Resources/Files/razorpay.png_1702027659349 differ diff --git a/backend/Resources/Files/razorpay.png_1702053042156 b/backend/Resources/Files/razorpay.png_1702053042156 new file mode 100644 index 0000000..465275c Binary files /dev/null and b/backend/Resources/Files/razorpay.png_1702053042156 differ diff --git a/backend/Resources/Files/razorpay.png_1702053043732 b/backend/Resources/Files/razorpay.png_1702053043732 new file mode 100644 index 0000000..465275c Binary files /dev/null and b/backend/Resources/Files/razorpay.png_1702053043732 differ diff --git a/backend/Resources/Files/razorpay.png_1702053809714 b/backend/Resources/Files/razorpay.png_1702053809714 new file mode 100644 index 0000000..465275c Binary files /dev/null and b/backend/Resources/Files/razorpay.png_1702053809714 differ diff --git a/backend/Resources/Files/razorpay.png_1702053812252 b/backend/Resources/Files/razorpay.png_1702053812252 new file mode 100644 index 0000000..465275c Binary files /dev/null and b/backend/Resources/Files/razorpay.png_1702053812252 differ diff --git a/backend/Resources/Files/razorpay.png_1702053991139 b/backend/Resources/Files/razorpay.png_1702053991139 new file mode 100644 index 0000000..465275c Binary files /dev/null and b/backend/Resources/Files/razorpay.png_1702053991139 differ diff --git a/backend/Resources/Files/razorpay.png_1702054744200 b/backend/Resources/Files/razorpay.png_1702054744200 new file mode 100644 index 0000000..465275c Binary files /dev/null and b/backend/Resources/Files/razorpay.png_1702054744200 differ diff --git a/backend/Resources/Files/sample2-v1.0.2_1702100581391.zip b/backend/Resources/Files/sample2-v1.0.2_1702100581391.zip new file mode 100644 index 0000000..1586595 Binary files /dev/null and b/backend/Resources/Files/sample2-v1.0.2_1702100581391.zip differ diff --git a/backend/cns-portal/.DS_Store b/backend/cns-portal/.DS_Store new file mode 100644 index 0000000..c045264 Binary files /dev/null and b/backend/cns-portal/.DS_Store differ diff --git a/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676871419664/Abc.java b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676871419664/Abc.java new file mode 100644 index 0000000..5c33750 --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676871419664/Abc.java @@ -0,0 +1,18 @@ +package com.realnet.Abc_1665647440047_back.Entity; + import lombok.*; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + @Entity + @Data + public class Abc{ + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private String name; + private int name_id; + + } \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676871419664/AbcController.java b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676871419664/AbcController.java new file mode 100644 index 0000000..4b90753 --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676871419664/AbcController.java @@ -0,0 +1,42 @@ +package com.realnet.Abc_1665647440047_back.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import com.realnet.Abc_1665647440047_back.Entity.Abc; +import com.realnet.Abc_1665647440047_back.Services.AbcService ; +@RequestMapping(value = "/_1665647440047_back") +@RestController +public class AbcController { + + @Autowired + private AbcService Service; + + @PostMapping("/Abc") + + public Abc Savedata(@RequestBody Abc data) { + Abc save = Service.Savedata(data) ; + return save; + } + + + @GetMapping("/Abc") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Abc/{id}") + public Abc getdetailsbyId(@PathVariable Long id ) { + Abc get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Abc/{id}") + public void delete_by_id(@PathVariable Long id ) { + Service.delete_by_id(id); + + } +@PutMapping("/Abc/{id}") + public Abc update(@RequestBody Abc data,@PathVariable Long id ) { + Abc update = Service.update(data,id); + return update; + } +} \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676871419664/AbcRepository.java b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676871419664/AbcRepository.java new file mode 100644 index 0000000..2576449 --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676871419664/AbcRepository.java @@ -0,0 +1,13 @@ +package com.realnet.Abc_1665647440047_back.Repository; + + +import org.springframework.data.jpa.repository.JpaRepository; + +import org.springframework.stereotype.Repository; + + +import com.realnet.Abc_1665647440047_back.Entity.Abc; + +@Repository +public interface AbcRepository extends JpaRepository { +} \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676871419664/AbcService.java b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676871419664/AbcService.java new file mode 100644 index 0000000..a26061b --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676871419664/AbcService.java @@ -0,0 +1,37 @@ +package com.realnet.Abc_1665647440047_back.Services; +import com.realnet.Abc_1665647440047_back.Repository.AbcRepository; +import com.realnet.Abc_1665647440047_back.Entity.Abc;import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.stereotype.Service; + +@Service + public class AbcService { +@Autowired +private AbcRepository Repository; +public Abc Savedata(Abc data) { + return Repository.save(data); + } + + +public List getdetails() { + return (List) Repository.findAll(); + } + + +public Abc getdetailsbyId(Long id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Long id) { + Repository.deleteById(id); +} + + +public Abc update(Abc data,Long id) { + Abc old = Repository.findById(id).get(); +old.setName(data.getName()); +old.setName_id(data.getName_id()); +final Abc test = Repository.save(old); + return test;}} \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676871419664/static_code/SE_Abc.java b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676871419664/static_code/SE_Abc.java new file mode 100644 index 0000000..792402e --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676871419664/static_code/SE_Abc.java @@ -0,0 +1,18 @@ +"package com.realnet.+""+.Entity;" + "\r\n" + +" import lombok.*;" + "\r\n" + +" import javax.persistence.*;" + "\r\n" + +" import java.time.LocalDateTime;" + "\r\n" + +" import java.util.*;" + "\r\n" + +"" + "\r\n" + +" @Entity " + "\r\n" + +" @Data" + "\r\n" + +" public class Abc{ " + "\r\n" + +"" + "\r\n" + +" @Id" + "\r\n" + +" @GeneratedValue(strategy = GenerationType.IDENTITY)" + "\r\n" + +" private Long id;" + "\r\n" + +"" + "\r\n" + +" private String name;" + "\r\n" + +" private int name_id;" + "\r\n" + +"" + "\r\n" + +" }" \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676871419664/static_code/SE_AbcController.java b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676871419664/static_code/SE_AbcController.java new file mode 100644 index 0000000..ec46b16 --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676871419664/static_code/SE_AbcController.java @@ -0,0 +1,42 @@ +"package com.realnet.+""+.Controllers;" + "\r\n" + +"import java.util.List;" + "\r\n" + +"import org.springframework.beans.factory.annotation.Autowired;" + "\r\n" + +" import org.springframework.web.bind.annotation.*;" + "\r\n" + +"import com.realnet.+""+.Entity.Abc;" + "\r\n" + +"import com.realnet.+""+.Services.AbcService ;" + "\r\n" + +"@RequestMapping(value = \"/_1665647440047_back\")" + "\r\n" + +"@RestController" + "\r\n" + +"public class AbcController {" + "\r\n" + +" " + "\r\n" + +" @Autowired" + "\r\n" + +" private AbcService Service;" + "\r\n" + +"" + "\r\n" + +" @PostMapping(\"/Abc\")" + "\r\n" + +" " + "\r\n" + +" public Abc Savedata(@RequestBody Abc data) {" + "\r\n" + +" Abc save = Service.Savedata(data) ;" + "\r\n" + +" return save;" + "\r\n" + +" }" + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" @GetMapping(\"/Abc\")" + "\r\n" + +" public List getdetails() {" + "\r\n" + +" List get = Service.getdetails(); " + "\r\n" + +" return get;" + "\r\n" + +"}" + "\r\n" + +"@GetMapping(\"/Abc/{id}\")" + "\r\n" + +" public Abc getdetailsbyId(@PathVariable Long id ) {" + "\r\n" + +" Abc get = Service.getdetailsbyId(id);" + "\r\n" + +" return get;" + "\r\n" + +" }" + "\r\n" + +"@DeleteMapping(\"/Abc/{id}\")" + "\r\n" + +" public void delete_by_id(@PathVariable Long id ) {" + "\r\n" + +" Service.delete_by_id(id);" + "\r\n" + +" " + "\r\n" + +" }" + "\r\n" + +"@PutMapping(\"/Abc/{id}\")" + "\r\n" + +" public Abc update(@RequestBody Abc data,@PathVariable Long id ) {" + "\r\n" + +" Abc update = Service.update(data,id);" + "\r\n" + +" return update;" + "\r\n" + +" }" + "\r\n" + +"}" \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676871419664/static_code/SE_AbcRepository.java b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676871419664/static_code/SE_AbcRepository.java new file mode 100644 index 0000000..d4650e5 --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676871419664/static_code/SE_AbcRepository.java @@ -0,0 +1,13 @@ +"package com.realnet.+""+.Repository;" + "\r\n" + +"" + "\r\n" + +"" + "\r\n" + +"import org.springframework.data.jpa.repository.JpaRepository;" + "\r\n" + +"" + "\r\n" + +"import org.springframework.stereotype.Repository;" + "\r\n" + +" " + "\r\n" + +"" + "\r\n" + +"import com.realnet.+""+.Entity.Abc;" + "\r\n" + +"" + "\r\n" + +"@Repository" + "\r\n" + +"public interface AbcRepository extends JpaRepository { " + "\r\n" + +"}" \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676871419664/static_code/SE_AbcService.java b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676871419664/static_code/SE_AbcService.java new file mode 100644 index 0000000..a435283 --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676871419664/static_code/SE_AbcService.java @@ -0,0 +1,37 @@ +"package com.realnet.+""+.Services;" + "\r\n" + +"import com.realnet.+""+.Repository.AbcRepository;" + "\r\n" + +"import com.realnet.+""+.Entity.Abc;import java.util.List;" + "\r\n" + +"" + "\r\n" + +"import org.springframework.beans.factory.annotation.Autowired;" + "\r\n" + +" import org.springframework.stereotype.Service;" + "\r\n" + +"" + "\r\n" + +"@Service" + "\r\n" + +" public class AbcService {" + "\r\n" + +"@Autowired" + "\r\n" + +"private AbcRepository Repository;" + "\r\n" + +"public Abc Savedata(Abc data) {" + "\r\n" + +" return Repository.save(data); " + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" " + "\r\n" + +"public List getdetails() {" + "\r\n" + +" return (List) Repository.findAll();" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +"" + "\r\n" + +"public Abc getdetailsbyId(Long id) {" + "\r\n" + +" return Repository.findById(id).get();" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +"" + "\r\n" + +" public void delete_by_id(Long id) {" + "\r\n" + +" Repository.deleteById(id);" + "\r\n" + +"}" + "\r\n" + +"" + "\r\n" + +"" + "\r\n" + +"public Abc update(Abc data,Long id) {" + "\r\n" + +" Abc old = Repository.findById(id).get();" + "\r\n" + +"old.setName(data.getName());" + "\r\n" + +"old.setName_id(data.getName_id());" + "\r\n" + +"final Abc test = Repository.save(old);" + "\r\n" + +" return test;}}" \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872068705/Abc.java b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872068705/Abc.java new file mode 100644 index 0000000..5c33750 --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872068705/Abc.java @@ -0,0 +1,18 @@ +package com.realnet.Abc_1665647440047_back.Entity; + import lombok.*; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + @Entity + @Data + public class Abc{ + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private String name; + private int name_id; + + } \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872068705/AbcController.java b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872068705/AbcController.java new file mode 100644 index 0000000..4b90753 --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872068705/AbcController.java @@ -0,0 +1,42 @@ +package com.realnet.Abc_1665647440047_back.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import com.realnet.Abc_1665647440047_back.Entity.Abc; +import com.realnet.Abc_1665647440047_back.Services.AbcService ; +@RequestMapping(value = "/_1665647440047_back") +@RestController +public class AbcController { + + @Autowired + private AbcService Service; + + @PostMapping("/Abc") + + public Abc Savedata(@RequestBody Abc data) { + Abc save = Service.Savedata(data) ; + return save; + } + + + @GetMapping("/Abc") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Abc/{id}") + public Abc getdetailsbyId(@PathVariable Long id ) { + Abc get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Abc/{id}") + public void delete_by_id(@PathVariable Long id ) { + Service.delete_by_id(id); + + } +@PutMapping("/Abc/{id}") + public Abc update(@RequestBody Abc data,@PathVariable Long id ) { + Abc update = Service.update(data,id); + return update; + } +} \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872068705/AbcRepository.java b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872068705/AbcRepository.java new file mode 100644 index 0000000..2576449 --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872068705/AbcRepository.java @@ -0,0 +1,13 @@ +package com.realnet.Abc_1665647440047_back.Repository; + + +import org.springframework.data.jpa.repository.JpaRepository; + +import org.springframework.stereotype.Repository; + + +import com.realnet.Abc_1665647440047_back.Entity.Abc; + +@Repository +public interface AbcRepository extends JpaRepository { +} \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872068705/AbcService.java b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872068705/AbcService.java new file mode 100644 index 0000000..a26061b --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872068705/AbcService.java @@ -0,0 +1,37 @@ +package com.realnet.Abc_1665647440047_back.Services; +import com.realnet.Abc_1665647440047_back.Repository.AbcRepository; +import com.realnet.Abc_1665647440047_back.Entity.Abc;import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.stereotype.Service; + +@Service + public class AbcService { +@Autowired +private AbcRepository Repository; +public Abc Savedata(Abc data) { + return Repository.save(data); + } + + +public List getdetails() { + return (List) Repository.findAll(); + } + + +public Abc getdetailsbyId(Long id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Long id) { + Repository.deleteById(id); +} + + +public Abc update(Abc data,Long id) { + Abc old = Repository.findById(id).get(); +old.setName(data.getName()); +old.setName_id(data.getName_id()); +final Abc test = Repository.save(old); + return test;}} \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872068705/static_code/SE_Abc.java b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872068705/static_code/SE_Abc.java new file mode 100644 index 0000000..ed67b94 --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872068705/static_code/SE_Abc.java @@ -0,0 +1,18 @@ +"package com.realnet.+repo_name+.Entity;" + "\r\n" + +" import lombok.*;" + "\r\n" + +" import javax.persistence.*;" + "\r\n" + +" import java.time.LocalDateTime;" + "\r\n" + +" import java.util.*;" + "\r\n" + +"" + "\r\n" + +" @Entity " + "\r\n" + +" @Data" + "\r\n" + +" public class Abc{ " + "\r\n" + +"" + "\r\n" + +" @Id" + "\r\n" + +" @GeneratedValue(strategy = GenerationType.IDENTITY)" + "\r\n" + +" private Long id;" + "\r\n" + +"" + "\r\n" + +" private String name;" + "\r\n" + +" private int name_id;" + "\r\n" + +"" + "\r\n" + +" }" \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872068705/static_code/SE_AbcController.java b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872068705/static_code/SE_AbcController.java new file mode 100644 index 0000000..5222d4c --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872068705/static_code/SE_AbcController.java @@ -0,0 +1,42 @@ +"package com.realnet.+repo_name+.Controllers;" + "\r\n" + +"import java.util.List;" + "\r\n" + +"import org.springframework.beans.factory.annotation.Autowired;" + "\r\n" + +" import org.springframework.web.bind.annotation.*;" + "\r\n" + +"import com.realnet.+repo_name+.Entity.Abc;" + "\r\n" + +"import com.realnet.+repo_name+.Services.AbcService ;" + "\r\n" + +"@RequestMapping(value = \"/_1665647440047_back\")" + "\r\n" + +"@RestController" + "\r\n" + +"public class AbcController {" + "\r\n" + +" " + "\r\n" + +" @Autowired" + "\r\n" + +" private AbcService Service;" + "\r\n" + +"" + "\r\n" + +" @PostMapping(\"/Abc\")" + "\r\n" + +" " + "\r\n" + +" public Abc Savedata(@RequestBody Abc data) {" + "\r\n" + +" Abc save = Service.Savedata(data) ;" + "\r\n" + +" return save;" + "\r\n" + +" }" + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" @GetMapping(\"/Abc\")" + "\r\n" + +" public List getdetails() {" + "\r\n" + +" List get = Service.getdetails(); " + "\r\n" + +" return get;" + "\r\n" + +"}" + "\r\n" + +"@GetMapping(\"/Abc/{id}\")" + "\r\n" + +" public Abc getdetailsbyId(@PathVariable Long id ) {" + "\r\n" + +" Abc get = Service.getdetailsbyId(id);" + "\r\n" + +" return get;" + "\r\n" + +" }" + "\r\n" + +"@DeleteMapping(\"/Abc/{id}\")" + "\r\n" + +" public void delete_by_id(@PathVariable Long id ) {" + "\r\n" + +" Service.delete_by_id(id);" + "\r\n" + +" " + "\r\n" + +" }" + "\r\n" + +"@PutMapping(\"/Abc/{id}\")" + "\r\n" + +" public Abc update(@RequestBody Abc data,@PathVariable Long id ) {" + "\r\n" + +" Abc update = Service.update(data,id);" + "\r\n" + +" return update;" + "\r\n" + +" }" + "\r\n" + +"}" \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872068705/static_code/SE_AbcRepository.java b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872068705/static_code/SE_AbcRepository.java new file mode 100644 index 0000000..1b6bd38 --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872068705/static_code/SE_AbcRepository.java @@ -0,0 +1,13 @@ +"package com.realnet.+repo_name+.Repository;" + "\r\n" + +"" + "\r\n" + +"" + "\r\n" + +"import org.springframework.data.jpa.repository.JpaRepository;" + "\r\n" + +"" + "\r\n" + +"import org.springframework.stereotype.Repository;" + "\r\n" + +" " + "\r\n" + +"" + "\r\n" + +"import com.realnet.+repo_name+.Entity.Abc;" + "\r\n" + +"" + "\r\n" + +"@Repository" + "\r\n" + +"public interface AbcRepository extends JpaRepository { " + "\r\n" + +"}" \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872068705/static_code/SE_AbcService.java b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872068705/static_code/SE_AbcService.java new file mode 100644 index 0000000..678771a --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872068705/static_code/SE_AbcService.java @@ -0,0 +1,37 @@ +"package com.realnet.+repo_name+.Services;" + "\r\n" + +"import com.realnet.+repo_name+.Repository.AbcRepository;" + "\r\n" + +"import com.realnet.+repo_name+.Entity.Abc;import java.util.List;" + "\r\n" + +"" + "\r\n" + +"import org.springframework.beans.factory.annotation.Autowired;" + "\r\n" + +" import org.springframework.stereotype.Service;" + "\r\n" + +"" + "\r\n" + +"@Service" + "\r\n" + +" public class AbcService {" + "\r\n" + +"@Autowired" + "\r\n" + +"private AbcRepository Repository;" + "\r\n" + +"public Abc Savedata(Abc data) {" + "\r\n" + +" return Repository.save(data); " + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" " + "\r\n" + +"public List getdetails() {" + "\r\n" + +" return (List) Repository.findAll();" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +"" + "\r\n" + +"public Abc getdetailsbyId(Long id) {" + "\r\n" + +" return Repository.findById(id).get();" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +"" + "\r\n" + +" public void delete_by_id(Long id) {" + "\r\n" + +" Repository.deleteById(id);" + "\r\n" + +"}" + "\r\n" + +"" + "\r\n" + +"" + "\r\n" + +"public Abc update(Abc data,Long id) {" + "\r\n" + +" Abc old = Repository.findById(id).get();" + "\r\n" + +"old.setName(data.getName());" + "\r\n" + +"old.setName_id(data.getName_id());" + "\r\n" + +"final Abc test = Repository.save(old);" + "\r\n" + +" return test;}}" \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872241077/Abc.java b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872241077/Abc.java new file mode 100644 index 0000000..5c33750 --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872241077/Abc.java @@ -0,0 +1,18 @@ +package com.realnet.Abc_1665647440047_back.Entity; + import lombok.*; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + @Entity + @Data + public class Abc{ + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private String name; + private int name_id; + + } \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872241077/AbcController.java b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872241077/AbcController.java new file mode 100644 index 0000000..4b90753 --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872241077/AbcController.java @@ -0,0 +1,42 @@ +package com.realnet.Abc_1665647440047_back.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import com.realnet.Abc_1665647440047_back.Entity.Abc; +import com.realnet.Abc_1665647440047_back.Services.AbcService ; +@RequestMapping(value = "/_1665647440047_back") +@RestController +public class AbcController { + + @Autowired + private AbcService Service; + + @PostMapping("/Abc") + + public Abc Savedata(@RequestBody Abc data) { + Abc save = Service.Savedata(data) ; + return save; + } + + + @GetMapping("/Abc") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Abc/{id}") + public Abc getdetailsbyId(@PathVariable Long id ) { + Abc get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Abc/{id}") + public void delete_by_id(@PathVariable Long id ) { + Service.delete_by_id(id); + + } +@PutMapping("/Abc/{id}") + public Abc update(@RequestBody Abc data,@PathVariable Long id ) { + Abc update = Service.update(data,id); + return update; + } +} \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872241077/AbcRepository.java b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872241077/AbcRepository.java new file mode 100644 index 0000000..2576449 --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872241077/AbcRepository.java @@ -0,0 +1,13 @@ +package com.realnet.Abc_1665647440047_back.Repository; + + +import org.springframework.data.jpa.repository.JpaRepository; + +import org.springframework.stereotype.Repository; + + +import com.realnet.Abc_1665647440047_back.Entity.Abc; + +@Repository +public interface AbcRepository extends JpaRepository { +} \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872241077/AbcService.java b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872241077/AbcService.java new file mode 100644 index 0000000..a26061b --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872241077/AbcService.java @@ -0,0 +1,37 @@ +package com.realnet.Abc_1665647440047_back.Services; +import com.realnet.Abc_1665647440047_back.Repository.AbcRepository; +import com.realnet.Abc_1665647440047_back.Entity.Abc;import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.stereotype.Service; + +@Service + public class AbcService { +@Autowired +private AbcRepository Repository; +public Abc Savedata(Abc data) { + return Repository.save(data); + } + + +public List getdetails() { + return (List) Repository.findAll(); + } + + +public Abc getdetailsbyId(Long id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Long id) { + Repository.deleteById(id); +} + + +public Abc update(Abc data,Long id) { + Abc old = Repository.findById(id).get(); +old.setName(data.getName()); +old.setName_id(data.getName_id()); +final Abc test = Repository.save(old); + return test;}} \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872241077/static_code/SE_Abc.java b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872241077/static_code/SE_Abc.java new file mode 100644 index 0000000..c2de4a5 --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872241077/static_code/SE_Abc.java @@ -0,0 +1,26 @@ +"package com.realnet."+repo_name+".Entity;" + "\r\n" + +" import lombok.*;" + "\r\n" + +" import javax.persistence.*;" + "\r\n" + +" import java.time.LocalDateTime;" + "\r\n" + +" import java.util.*;" + "\r\n" + +"" + "\r\n" + +" @Entity " + "\r\n" + +" @Data" + "\r\n" + +" public class "+table_name+"{ " + "\r\n" + +"" + "\r\n" + +" "+ for (Entry e : entrySet) { + + String string = e.getKey().toLowerCase(); + String datatype = e.getValue().toString(); + String lowerCase = string.replaceAll(" ", "_").toLowerCase(); + String add = "n private " + datatype + " " + lowerCase + ";"; + "+table_name+"1Code.append(add); + } + "+table_name+"1Code.append("n}nr"); +"" + "\r\n" + +" @GeneratedValue(strategy = GenerationType.IDENTITY)" + "\r\n" + +" private Long id;" + "\r\n" + +"" + "\r\n" + +" private String name;" + "\r\n" + +" private int name_id;" + "\r\n" + +"" + "\r\n" + +" }" \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872241077/static_code/SE_AbcController.java b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872241077/static_code/SE_AbcController.java new file mode 100644 index 0000000..aa91466 --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872241077/static_code/SE_AbcController.java @@ -0,0 +1,42 @@ +"package com.realnet."+repo_name+".Controllers;" + "\r\n" + +"import java.util.List;" + "\r\n" + +"import org.springframework.beans.factory.annotation.Autowired;" + "\r\n" + +" import org.springframework.web.bind.annotation.*;" + "\r\n" + +"import com.realnet."+repo_name+".Entity."+table_name+";" + "\r\n" + +"import com.realnet."+repo_name+".Services."+table_name+"Service ;" + "\r\n" + +"@RequestMapping(value = \"/_1665647440047_back\")" + "\r\n" + +"@RestController" + "\r\n" + +"public class "+table_name+"Controller {" + "\r\n" + +" " + "\r\n" + +" @Autowired" + "\r\n" + +" private "+table_name+"Service Service;" + "\r\n" + +"" + "\r\n" + +" @PostMapping(\"/"+table_name+"\")" + "\r\n" + +" " + "\r\n" + +" public "+table_name+" Savedata(@RequestBody "+table_name+" data) {" + "\r\n" + +" "+table_name+" save = Service.Savedata(data) ;" + "\r\n" + +" return save;" + "\r\n" + +" }" + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" @GetMapping(\"/"+table_name+"\")" + "\r\n" + +" public List<"+table_name+"> getdetails() {" + "\r\n" + +" List<"+table_name+"> get = Service.getdetails(); " + "\r\n" + +" return get;" + "\r\n" + +"}" + "\r\n" + +"@GetMapping(\"/"+table_name+"/{id}\")" + "\r\n" + +" public "+table_name+" getdetailsbyId(@PathVariable Long id ) {" + "\r\n" + +" "+table_name+" get = Service.getdetailsbyId(id);" + "\r\n" + +" return get;" + "\r\n" + +" }" + "\r\n" + +"@DeleteMapping(\"/"+table_name+"/{id}\")" + "\r\n" + +" public void delete_by_id(@PathVariable Long id ) {" + "\r\n" + +" Service.delete_by_id(id);" + "\r\n" + +" " + "\r\n" + +" }" + "\r\n" + +"@PutMapping(\"/"+table_name+"/{id}\")" + "\r\n" + +" public "+table_name+" update(@RequestBody "+table_name+" data,@PathVariable Long id ) {" + "\r\n" + +" "+table_name+" update = Service.update(data,id);" + "\r\n" + +" return update;" + "\r\n" + +" }" + "\r\n" + +"}" \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872241077/static_code/SE_AbcRepository.java b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872241077/static_code/SE_AbcRepository.java new file mode 100644 index 0000000..cd27a5d --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872241077/static_code/SE_AbcRepository.java @@ -0,0 +1,13 @@ +"package com.realnet."+repo_name+".Repository;" + "\r\n" + +"" + "\r\n" + +"" + "\r\n" + +"import org.springframework.data.jpa.repository.JpaRepository;" + "\r\n" + +"" + "\r\n" + +"import org.springframework.stereotype.Repository;" + "\r\n" + +" " + "\r\n" + +"" + "\r\n" + +"import com.realnet."+repo_name+".Entity."+table_name+";" + "\r\n" + +"" + "\r\n" + +"@Repository" + "\r\n" + +"public interface "+table_name+"Repository extends JpaRepository<"+table_name+", Long> { " + "\r\n" + +"}" \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872241077/static_code/SE_AbcService.java b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872241077/static_code/SE_AbcService.java new file mode 100644 index 0000000..8a7344c --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676872241077/static_code/SE_AbcService.java @@ -0,0 +1,37 @@ +"package com.realnet."+repo_name+".Services;" + "\r\n" + +"import com.realnet."+repo_name+".Repository."+table_name+"Repository;" + "\r\n" + +"import com.realnet."+repo_name+".Entity."+table_name+";import java.util.List;" + "\r\n" + +"" + "\r\n" + +"import org.springframework.beans.factory.annotation.Autowired;" + "\r\n" + +" import org.springframework.stereotype.Service;" + "\r\n" + +"" + "\r\n" + +"@Service" + "\r\n" + +" public class "+table_name+"Service {" + "\r\n" + +"@Autowired" + "\r\n" + +"private "+table_name+"Repository Repository;" + "\r\n" + +"public "+table_name+" Savedata("+table_name+" data) {" + "\r\n" + +" return Repository.save(data); " + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" " + "\r\n" + +"public List<"+table_name+"> getdetails() {" + "\r\n" + +" return (List<"+table_name+">) Repository.findAll();" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +"" + "\r\n" + +"public "+table_name+" getdetailsbyId(Long id) {" + "\r\n" + +" return Repository.findById(id).get();" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +"" + "\r\n" + +" public void delete_by_id(Long id) {" + "\r\n" + +" Repository.deleteById(id);" + "\r\n" + +"}" + "\r\n" + +"" + "\r\n" + +"" + "\r\n" + +"public "+table_name+" update("+table_name+" data,Long id) {" + "\r\n" + +" "+table_name+" old = Repository.findById(id).get();" + "\r\n" + +"old.setName(data.getName());" + "\r\n" + +"old.setName_id(data.getName_id());" + "\r\n" + +"final "+table_name+" test = Repository.save(old);" + "\r\n" + +" return test;}}" \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676957500816/Abc.java b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676957500816/Abc.java new file mode 100644 index 0000000..5c33750 --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676957500816/Abc.java @@ -0,0 +1,18 @@ +package com.realnet.Abc_1665647440047_back.Entity; + import lombok.*; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + @Entity + @Data + public class Abc{ + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private String name; + private int name_id; + + } \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676957500816/AbcController.java b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676957500816/AbcController.java new file mode 100644 index 0000000..4b90753 --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676957500816/AbcController.java @@ -0,0 +1,42 @@ +package com.realnet.Abc_1665647440047_back.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import com.realnet.Abc_1665647440047_back.Entity.Abc; +import com.realnet.Abc_1665647440047_back.Services.AbcService ; +@RequestMapping(value = "/_1665647440047_back") +@RestController +public class AbcController { + + @Autowired + private AbcService Service; + + @PostMapping("/Abc") + + public Abc Savedata(@RequestBody Abc data) { + Abc save = Service.Savedata(data) ; + return save; + } + + + @GetMapping("/Abc") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Abc/{id}") + public Abc getdetailsbyId(@PathVariable Long id ) { + Abc get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Abc/{id}") + public void delete_by_id(@PathVariable Long id ) { + Service.delete_by_id(id); + + } +@PutMapping("/Abc/{id}") + public Abc update(@RequestBody Abc data,@PathVariable Long id ) { + Abc update = Service.update(data,id); + return update; + } +} \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676957500816/AbcRepository.java b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676957500816/AbcRepository.java new file mode 100644 index 0000000..2576449 --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676957500816/AbcRepository.java @@ -0,0 +1,13 @@ +package com.realnet.Abc_1665647440047_back.Repository; + + +import org.springframework.data.jpa.repository.JpaRepository; + +import org.springframework.stereotype.Repository; + + +import com.realnet.Abc_1665647440047_back.Entity.Abc; + +@Repository +public interface AbcRepository extends JpaRepository { +} \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676957500816/AbcService.java b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676957500816/AbcService.java new file mode 100644 index 0000000..a26061b --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676957500816/AbcService.java @@ -0,0 +1,37 @@ +package com.realnet.Abc_1665647440047_back.Services; +import com.realnet.Abc_1665647440047_back.Repository.AbcRepository; +import com.realnet.Abc_1665647440047_back.Entity.Abc;import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.stereotype.Service; + +@Service + public class AbcService { +@Autowired +private AbcRepository Repository; +public Abc Savedata(Abc data) { + return Repository.save(data); + } + + +public List getdetails() { + return (List) Repository.findAll(); + } + + +public Abc getdetailsbyId(Long id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Long id) { + Repository.deleteById(id); +} + + +public Abc update(Abc data,Long id) { + Abc old = Repository.findById(id).get(); +old.setName(data.getName()); +old.setName_id(data.getName_id()); +final Abc test = Repository.save(old); + return test;}} \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676957500816/static_code/SE_Abc.java b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676957500816/static_code/SE_Abc.java new file mode 100644 index 0000000..143506f --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676957500816/static_code/SE_Abc.java @@ -0,0 +1,18 @@ +"package com.realnet.Abc_1665647440047_back.Entity;" + "\r\n" + +" import lombok.*;" + "\r\n" + +" import javax.persistence.*;" + "\r\n" + +" import java.time.LocalDateTime;" + "\r\n" + +" import java.util.*;" + "\r\n" + +"" + "\r\n" + +" @Entity " + "\r\n" + +" @Data" + "\r\n" + +" public class Abc{ " + "\r\n" + +"" + "\r\n" + +" @Id" + "\r\n" + +" @GeneratedValue(strategy = GenerationType.IDENTITY)" + "\r\n" + +" private Long id;" + "\r\n" + +"" + "\r\n" + +" private String name;" + "\r\n" + +" private int name_id;" + "\r\n" + +"" + "\r\n" + +" }" \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676957500816/static_code/SE_AbcController.java b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676957500816/static_code/SE_AbcController.java new file mode 100644 index 0000000..8e9a704 --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676957500816/static_code/SE_AbcController.java @@ -0,0 +1,42 @@ +"package com.realnet.Abc_1665647440047_back.Controllers;" + "\r\n" + +"import java.util.List;" + "\r\n" + +"import org.springframework.beans.factory.annotation.Autowired;" + "\r\n" + +" import org.springframework.web.bind.annotation.*;" + "\r\n" + +"import com.realnet.Abc_1665647440047_back.Entity.Abc;" + "\r\n" + +"import com.realnet.Abc_1665647440047_back.Services.AbcService ;" + "\r\n" + +"@RequestMapping(value = \"/_1665647440047_back\")" + "\r\n" + +"@RestController" + "\r\n" + +"public class AbcController {" + "\r\n" + +" " + "\r\n" + +" @Autowired" + "\r\n" + +" private AbcService Service;" + "\r\n" + +"" + "\r\n" + +" @PostMapping(\"/Abc\")" + "\r\n" + +" " + "\r\n" + +" public Abc Savedata(@RequestBody Abc data) {" + "\r\n" + +" Abc save = Service.Savedata(data) ;" + "\r\n" + +" return save;" + "\r\n" + +" }" + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" @GetMapping(\"/Abc\")" + "\r\n" + +" public List getdetails() {" + "\r\n" + +" List get = Service.getdetails(); " + "\r\n" + +" return get;" + "\r\n" + +"}" + "\r\n" + +"@GetMapping(\"/Abc/{id}\")" + "\r\n" + +" public Abc getdetailsbyId(@PathVariable Long id ) {" + "\r\n" + +" Abc get = Service.getdetailsbyId(id);" + "\r\n" + +" return get;" + "\r\n" + +" }" + "\r\n" + +"@DeleteMapping(\"/Abc/{id}\")" + "\r\n" + +" public void delete_by_id(@PathVariable Long id ) {" + "\r\n" + +" Service.delete_by_id(id);" + "\r\n" + +" " + "\r\n" + +" }" + "\r\n" + +"@PutMapping(\"/Abc/{id}\")" + "\r\n" + +" public Abc update(@RequestBody Abc data,@PathVariable Long id ) {" + "\r\n" + +" Abc update = Service.update(data,id);" + "\r\n" + +" return update;" + "\r\n" + +" }" + "\r\n" + +"}" \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676957500816/static_code/SE_AbcRepository.java b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676957500816/static_code/SE_AbcRepository.java new file mode 100644 index 0000000..c974278 --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676957500816/static_code/SE_AbcRepository.java @@ -0,0 +1,13 @@ +"package com.realnet.Abc_1665647440047_back.Repository;" + "\r\n" + +"" + "\r\n" + +"" + "\r\n" + +"import org.springframework.data.jpa.repository.JpaRepository;" + "\r\n" + +"" + "\r\n" + +"import org.springframework.stereotype.Repository;" + "\r\n" + +" " + "\r\n" + +"" + "\r\n" + +"import com.realnet.Abc_1665647440047_back.Entity.Abc;" + "\r\n" + +"" + "\r\n" + +"@Repository" + "\r\n" + +"public interface AbcRepository extends JpaRepository { " + "\r\n" + +"}" \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676957500816/static_code/SE_AbcService.java b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676957500816/static_code/SE_AbcService.java new file mode 100644 index 0000000..db4d587 --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/Abc_1665647440047_back_1676957500816/static_code/SE_AbcService.java @@ -0,0 +1,37 @@ +"package com.realnet.Abc_1665647440047_back.Services;" + "\r\n" + +"import com.realnet.Abc_1665647440047_back.Repository.AbcRepository;" + "\r\n" + +"import com.realnet.Abc_1665647440047_back.Entity.Abc;import java.util.List;" + "\r\n" + +"" + "\r\n" + +"import org.springframework.beans.factory.annotation.Autowired;" + "\r\n" + +" import org.springframework.stereotype.Service;" + "\r\n" + +"" + "\r\n" + +"@Service" + "\r\n" + +" public class AbcService {" + "\r\n" + +"@Autowired" + "\r\n" + +"private AbcRepository Repository;" + "\r\n" + +"public Abc Savedata(Abc data) {" + "\r\n" + +" return Repository.save(data); " + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" " + "\r\n" + +"public List getdetails() {" + "\r\n" + +" return (List) Repository.findAll();" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +"" + "\r\n" + +"public Abc getdetailsbyId(Long id) {" + "\r\n" + +" return Repository.findById(id).get();" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +"" + "\r\n" + +" public void delete_by_id(Long id) {" + "\r\n" + +" Repository.deleteById(id);" + "\r\n" + +"}" + "\r\n" + +"" + "\r\n" + +"" + "\r\n" + +"public Abc update(Abc data,Long id) {" + "\r\n" + +" Abc old = Repository.findById(id).get();" + "\r\n" + +"old.setName(data.getName());" + "\r\n" + +"old.setName_id(data.getName_id());" + "\r\n" + +"final Abc test = Repository.save(old);" + "\r\n" + +" return test;}}" \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/bugTracker (2)_1676960539798/BugTracker.java b/backend/cns-portal/code-extractor/extracted-files/bugTracker (2)_1676960539798/BugTracker.java new file mode 100644 index 0000000..28adc88 --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/bugTracker (2)_1676960539798/BugTracker.java @@ -0,0 +1,45 @@ +package com.realnet.bugTracker.Entity; + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Lob; +import javax.persistence.Table; + +import com.realnet.incident.entity.WhooColomns; + +import lombok.Data; + +@Entity +@Data + +public class BugTracker extends WhooColomns { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private String type; + private String key_no; + private String summary; + private String assignee; + private String reporter; + + private String select_project; + private String title; + private String select_status; + private String select_priority; + private String steps; + private String description; + + + private String fileName; + + private String fileType; + + @Lob + private byte[] data; + + +} diff --git a/backend/cns-portal/code-extractor/extracted-files/bugTracker (2)_1676960539798/BugTrackerController.java b/backend/cns-portal/code-extractor/extracted-files/bugTracker (2)_1676960539798/BugTrackerController.java new file mode 100644 index 0000000..01cf186 --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/bugTracker (2)_1676960539798/BugTrackerController.java @@ -0,0 +1,111 @@ +package com.realnet.bugTracker.Controller; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.realnet.activity.service.ActivityService; +import com.realnet.bugTracker.Entity.BugTracker; +import com.realnet.bugTracker.Service.BugTrackerService; +import com.realnet.fileupload.helper.Fileuploadhelper; +import com.realnet.incident.entity.IncidentEntity; + +@RestController +@RequestMapping("/sureserve/bugtracker") +public class BugTrackerController { + + @Autowired + private BugTrackerService bugTrackerService; + + @Autowired + private Fileuploadhelper fileuploadhelper; + + @PostMapping("/bugtracker") + public ResponseEntity createIssue(@RequestParam String data, @RequestParam MultipartFile file) + throws JsonMappingException, JsonProcessingException { + + // Deserialize the "data" parameter to a BugTracker object using Jackson's + // ObjectMapper + BugTracker bugTracker = new ObjectMapper().readValue(data, BugTracker.class); + + // Check if a file was uploaded + if (!file.isEmpty()) { + System.out.println(file.getOriginalFilename()); + + // Use a file upload helper method to upload the file and return a boolean + // indicating success or failure + boolean isUploaded = fileuploadhelper.uploadFile(file); + + if (isUploaded) { + System.out.println("File uploaded successfully"); + bugTracker.setFileName(file.getOriginalFilename()); + } + } else { + bugTracker.setFileName("No file"); + } + + // Pass the updated BugTracker object to the bugTrackerService's createIssue + // method to create a new BugTracker object + BugTracker createdTracker = bugTrackerService.createIssue(bugTracker); + + return ResponseEntity.ok("addded successfully"); + } + + @GetMapping("/bugtracker/{id}") + public ResponseEntity getIssueById(@PathVariable Long id) { + BugTracker tracker = bugTrackerService.getIssueById(id); + return ResponseEntity.ok(tracker); + } + + @GetMapping("/bugtracker") + public ResponseEntity> getAllIssues() { + List allIssues = bugTrackerService.getAllIssues(); + return ResponseEntity.ok(allIssues); + } + + @PutMapping("/bugtracker/{id}") + public ResponseEntity updateIssue(@RequestParam String data, @PathVariable Long id, + @RequestParam MultipartFile file) throws Exception { + + BugTracker bugTracker = new ObjectMapper().readValue(data, BugTracker.class); + + if (!file.isEmpty()) { + System.out.println(file.getOriginalFilename()); + boolean f = fileuploadhelper.uploadFile(file); + + if (f) { + System.out.println("file uploaded successfully"); + bugTracker.setFileName(file.getOriginalFilename()); + } + } else { + bugTracker.setFileName("No file"); + } + + // Update the bug tracker with the new incident entity + bugTrackerService.updateIssue(id, bugTracker); + + return ResponseEntity.ok("Update successfully"); + } + + @DeleteMapping("/bugtracker/{id}") + public ResponseEntity deleteIssue(@PathVariable Long id) { + bugTrackerService.deleteIssue(id); + String message = "Issue with ID " + id + " has been deleted"; + return ResponseEntity.ok(message); + } +} diff --git a/backend/cns-portal/code-extractor/extracted-files/bugTracker (2)_1676960539798/BugTrackerRepository.java b/backend/cns-portal/code-extractor/extracted-files/bugTracker (2)_1676960539798/BugTrackerRepository.java new file mode 100644 index 0000000..fee4ac9 --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/bugTracker (2)_1676960539798/BugTrackerRepository.java @@ -0,0 +1,11 @@ +package com.realnet.bugTracker.Repository; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +import com.realnet.bugTracker.Entity.BugTracker; + +@Repository +public interface BugTrackerRepository extends JpaRepository { + +} diff --git a/backend/cns-portal/code-extractor/extracted-files/bugTracker (2)_1676960539798/BugTrackerService.java b/backend/cns-portal/code-extractor/extracted-files/bugTracker (2)_1676960539798/BugTrackerService.java new file mode 100644 index 0000000..6fd68ba --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/bugTracker (2)_1676960539798/BugTrackerService.java @@ -0,0 +1,59 @@ +package com.realnet.bugTracker.Service; + +import java.util.List; + +import javax.persistence.EntityNotFoundException; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import com.realnet.bugTracker.Entity.BugTracker; +import com.realnet.bugTracker.Repository.BugTrackerRepository; + +@Service +public class BugTrackerService { + + @Autowired + private BugTrackerRepository bugTrackerRepository; + + public BugTracker createIssue(BugTracker tracker) { + return bugTrackerRepository.save(tracker); + } + + public BugTracker getIssueById(Long id) { + return bugTrackerRepository.findById(id).orElseThrow(() -> new EntityNotFoundException("Issue not found")); + } + + public List getAllIssues() { + return bugTrackerRepository.findAll(); + } + + public BugTracker updateIssue(Long id, BugTracker tracker) { + BugTracker existingIssue = getIssueById(id); + existingIssue.setType(tracker.getType()); + existingIssue.setKey_no(tracker.getKey_no()); + existingIssue.setSummary(tracker.getSummary()); + existingIssue.setAssignee(tracker.getAssignee()); + existingIssue.setReporter(tracker.getReporter()); + existingIssue.setSelect_project(tracker.getSelect_project()); + existingIssue.setTitle(tracker.getTitle()); + existingIssue.setSelect_status(tracker.getSelect_status()); + existingIssue.setSelect_priority(tracker.getSelect_priority()); + existingIssue.setSteps(tracker.getSteps()); + existingIssue.setDescription(tracker.getDescription()); + existingIssue.setFileName(tracker.getFileName()); + existingIssue.setFileType(tracker.getFileType()); + existingIssue.setData(tracker.getData()); + + return bugTrackerRepository.save(existingIssue); + } + + + + + + public void deleteIssue(Long id) { + bugTrackerRepository.deleteById(id); + } + +} diff --git a/backend/cns-portal/code-extractor/extracted-files/bugTracker (2)_1676960539798/static_code/SE_BugTracker.java b/backend/cns-portal/code-extractor/extracted-files/bugTracker (2)_1676960539798/static_code/SE_BugTracker.java new file mode 100644 index 0000000..ac9c517 --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/bugTracker (2)_1676960539798/static_code/SE_BugTracker.java @@ -0,0 +1,45 @@ +"package com.realnet.bugTracker.Entity;" + "\r\n" + +"" + "\r\n" + +"import javax.persistence.Entity;" + "\r\n" + +"import javax.persistence.GeneratedValue;" + "\r\n" + +"import javax.persistence.GenerationType;" + "\r\n" + +"import javax.persistence.Id;" + "\r\n" + +"import javax.persistence.Lob;" + "\r\n" + +"import javax.persistence.Table;" + "\r\n" + +"" + "\r\n" + +"import com.realnet.incident.entity.WhooColomns;" + "\r\n" + +"" + "\r\n" + +"import lombok.Data;" + "\r\n" + +"" + "\r\n" + +"@Entity" + "\r\n" + +"@Data" + "\r\n" + +"" + "\r\n" + +"public class BugTracker extends WhooColomns {" + "\r\n" + +" " + "\r\n" + +" @Id" + "\r\n" + +" @GeneratedValue(strategy = GenerationType.IDENTITY)" + "\r\n" + +" private Long id;" + "\r\n" + +"" + "\r\n" + +" private String type;" + "\r\n" + +" private String key_no;" + "\r\n" + +" private String summary;" + "\r\n" + +" private String assignee;" + "\r\n" + +" private String reporter;" + "\r\n" + +" " + "\r\n" + +" private String select_project;" + "\r\n" + +" private String title;" + "\r\n" + +" private String select_status;" + "\r\n" + +" private String select_priority;" + "\r\n" + +" private String steps;" + "\r\n" + +" private String description;" + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" private String fileName;" + "\r\n" + +" " + "\r\n" + +" private String fileType;" + "\r\n" + +" " + "\r\n" + +" @Lob" + "\r\n" + +" private byte[] data;" + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +"}" \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/bugTracker (2)_1676960539798/static_code/SE_BugTrackerController.java b/backend/cns-portal/code-extractor/extracted-files/bugTracker (2)_1676960539798/static_code/SE_BugTrackerController.java new file mode 100644 index 0000000..ea815e5 --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/bugTracker (2)_1676960539798/static_code/SE_BugTrackerController.java @@ -0,0 +1,111 @@ +"package com.realnet.bugTracker.Controller;" + "\r\n" + +"" + "\r\n" + +"import java.util.List;" + "\r\n" + +"" + "\r\n" + +"import org.springframework.beans.factory.annotation.Autowired;" + "\r\n" + +"import org.springframework.http.HttpStatus;" + "\r\n" + +"import org.springframework.http.ResponseEntity;" + "\r\n" + +"import org.springframework.web.bind.annotation.DeleteMapping;" + "\r\n" + +"import org.springframework.web.bind.annotation.GetMapping;" + "\r\n" + +"import org.springframework.web.bind.annotation.PathVariable;" + "\r\n" + +"import org.springframework.web.bind.annotation.PostMapping;" + "\r\n" + +"import org.springframework.web.bind.annotation.PutMapping;" + "\r\n" + +"import org.springframework.web.bind.annotation.RequestBody;" + "\r\n" + +"import org.springframework.web.bind.annotation.RequestMapping;" + "\r\n" + +"import org.springframework.web.bind.annotation.RequestParam;" + "\r\n" + +"import org.springframework.web.bind.annotation.RestController;" + "\r\n" + +"import org.springframework.web.multipart.MultipartFile;" + "\r\n" + +"" + "\r\n" + +"import com.fasterxml.jackson.core.JsonProcessingException;" + "\r\n" + +"import com.fasterxml.jackson.databind.JsonMappingException;" + "\r\n" + +"import com.fasterxml.jackson.databind.ObjectMapper;" + "\r\n" + +"import com.realnet.activity.service.ActivityService;" + "\r\n" + +"import com.realnet.bugTracker.Entity.BugTracker;" + "\r\n" + +"import com.realnet.bugTracker.Service.BugTrackerService;" + "\r\n" + +"import com.realnet.fileupload.helper.Fileuploadhelper;" + "\r\n" + +"import com.realnet.incident.entity.IncidentEntity;" + "\r\n" + +"" + "\r\n" + +"@RestController" + "\r\n" + +"@RequestMapping(\"/sureserve/bugtracker\")" + "\r\n" + +"public class BugTrackerController {" + "\r\n" + +"" + "\r\n" + +" @Autowired" + "\r\n" + +" private BugTrackerService bugTrackerService;" + "\r\n" + +"" + "\r\n" + +" @Autowired" + "\r\n" + +" private Fileuploadhelper fileuploadhelper;" + "\r\n" + +"" + "\r\n" + +" @PostMapping(\"/bugtracker\")" + "\r\n" + +" public ResponseEntity createIssue(@RequestParam String data, @RequestParam MultipartFile file)" + "\r\n" + +" throws JsonMappingException, JsonProcessingException {" + "\r\n" + +"" + "\r\n" + +" // Deserialize the \"data\" parameter to a BugTracker object using Jackson's" + "\r\n" + +" // ObjectMapper" + "\r\n" + +" BugTracker bugTracker = new ObjectMapper().readValue(data, BugTracker.class);" + "\r\n" + +"" + "\r\n" + +" // Check if a file was uploaded" + "\r\n" + +" if (!file.isEmpty()) {" + "\r\n" + +" System.out.println(file.getOriginalFilename());" + "\r\n" + +"" + "\r\n" + +" // Use a file upload helper method to upload the file and return a boolean" + "\r\n" + +" // indicating success or failure" + "\r\n" + +" boolean isUploaded = fileuploadhelper.uploadFile(file);" + "\r\n" + +"" + "\r\n" + +" if (isUploaded) {" + "\r\n" + +" System.out.println(\"File uploaded successfully\");" + "\r\n" + +" bugTracker.setFileName(file.getOriginalFilename());" + "\r\n" + +" }" + "\r\n" + +" } else {" + "\r\n" + +" bugTracker.setFileName(\"No file\");" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" // Pass the updated BugTracker object to the bugTrackerService's createIssue" + "\r\n" + +" // method to create a new BugTracker object" + "\r\n" + +" BugTracker createdTracker = bugTrackerService.createIssue(bugTracker);" + "\r\n" + +"" + "\r\n" + +" return ResponseEntity.ok(\"addded successfully\");" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" @GetMapping(\"/bugtracker/{id}\")" + "\r\n" + +" public ResponseEntity getIssueById(@PathVariable Long id) {" + "\r\n" + +" BugTracker tracker = bugTrackerService.getIssueById(id);" + "\r\n" + +" return ResponseEntity.ok(tracker);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" @GetMapping(\"/bugtracker\")" + "\r\n" + +" public ResponseEntity> getAllIssues() {" + "\r\n" + +" List allIssues = bugTrackerService.getAllIssues();" + "\r\n" + +" return ResponseEntity.ok(allIssues);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" @PutMapping(\"/bugtracker/{id}\")" + "\r\n" + +" public ResponseEntity updateIssue(@RequestParam String data, @PathVariable Long id," + "\r\n" + +" @RequestParam MultipartFile file) throws Exception {" + "\r\n" + +"" + "\r\n" + +" BugTracker bugTracker = new ObjectMapper().readValue(data, BugTracker.class);" + "\r\n" + +"" + "\r\n" + +" if (!file.isEmpty()) {" + "\r\n" + +" System.out.println(file.getOriginalFilename());" + "\r\n" + +" boolean f = fileuploadhelper.uploadFile(file);" + "\r\n" + +"" + "\r\n" + +" if (f) {" + "\r\n" + +" System.out.println(\"file uploaded successfully\");" + "\r\n" + +" bugTracker.setFileName(file.getOriginalFilename());" + "\r\n" + +" }" + "\r\n" + +" } else {" + "\r\n" + +" bugTracker.setFileName(\"No file\");" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" // Update the bug tracker with the new incident entity" + "\r\n" + +" bugTrackerService.updateIssue(id, bugTracker);" + "\r\n" + +"" + "\r\n" + +" return ResponseEntity.ok(\"Update successfully\");" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" @DeleteMapping(\"/bugtracker/{id}\")" + "\r\n" + +" public ResponseEntity deleteIssue(@PathVariable Long id) {" + "\r\n" + +" bugTrackerService.deleteIssue(id);" + "\r\n" + +" String message = \"Issue with ID \" + id + \" has been deleted\";" + "\r\n" + +" return ResponseEntity.ok(message);" + "\r\n" + +" }" + "\r\n" + +"}" \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/bugTracker (2)_1676960539798/static_code/SE_BugTrackerRepository.java b/backend/cns-portal/code-extractor/extracted-files/bugTracker (2)_1676960539798/static_code/SE_BugTrackerRepository.java new file mode 100644 index 0000000..99fb5d1 --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/bugTracker (2)_1676960539798/static_code/SE_BugTrackerRepository.java @@ -0,0 +1,11 @@ +"package com.realnet.bugTracker.Repository;" + "\r\n" + +"" + "\r\n" + +"import org.springframework.data.jpa.repository.JpaRepository;" + "\r\n" + +"import org.springframework.stereotype.Repository;" + "\r\n" + +"" + "\r\n" + +"import com.realnet.bugTracker.Entity.BugTracker;" + "\r\n" + +"" + "\r\n" + +"@Repository" + "\r\n" + +"public interface BugTrackerRepository extends JpaRepository {" + "\r\n" + +" " + "\r\n" + +"}" \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/bugTracker (2)_1676960539798/static_code/SE_BugTrackerService.java b/backend/cns-portal/code-extractor/extracted-files/bugTracker (2)_1676960539798/static_code/SE_BugTrackerService.java new file mode 100644 index 0000000..748ca44 --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/bugTracker (2)_1676960539798/static_code/SE_BugTrackerService.java @@ -0,0 +1,59 @@ +"package com.realnet.bugTracker.Service;" + "\r\n" + +"" + "\r\n" + +"import java.util.List;" + "\r\n" + +"" + "\r\n" + +"import javax.persistence.EntityNotFoundException;" + "\r\n" + +"" + "\r\n" + +"import org.springframework.beans.factory.annotation.Autowired;" + "\r\n" + +"import org.springframework.stereotype.Service;" + "\r\n" + +"" + "\r\n" + +"import com.realnet.bugTracker.Entity.BugTracker;" + "\r\n" + +"import com.realnet.bugTracker.Repository.BugTrackerRepository;" + "\r\n" + +"" + "\r\n" + +"@Service" + "\r\n" + +"public class BugTrackerService {" + "\r\n" + +" " + "\r\n" + +" @Autowired" + "\r\n" + +" private BugTrackerRepository bugTrackerRepository;" + "\r\n" + +"" + "\r\n" + +" public BugTracker createIssue(BugTracker tracker) {" + "\r\n" + +" return bugTrackerRepository.save(tracker);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" public BugTracker getIssueById(Long id) {" + "\r\n" + +" return bugTrackerRepository.findById(id).orElseThrow(() -> new EntityNotFoundException(\"Issue not found\"));" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" public List getAllIssues() {" + "\r\n" + +" return bugTrackerRepository.findAll();" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" public BugTracker updateIssue(Long id, BugTracker tracker) {" + "\r\n" + +" BugTracker existingIssue = getIssueById(id);" + "\r\n" + +" existingIssue.setType(tracker.getType());" + "\r\n" + +" existingIssue.setKey_no(tracker.getKey_no());" + "\r\n" + +" existingIssue.setSummary(tracker.getSummary());" + "\r\n" + +" existingIssue.setAssignee(tracker.getAssignee());" + "\r\n" + +" existingIssue.setReporter(tracker.getReporter());" + "\r\n" + +" existingIssue.setSelect_project(tracker.getSelect_project());" + "\r\n" + +" existingIssue.setTitle(tracker.getTitle());" + "\r\n" + +" existingIssue.setSelect_status(tracker.getSelect_status());" + "\r\n" + +" existingIssue.setSelect_priority(tracker.getSelect_priority());" + "\r\n" + +" existingIssue.setSteps(tracker.getSteps());" + "\r\n" + +" existingIssue.setDescription(tracker.getDescription());" + "\r\n" + +" existingIssue.setFileName(tracker.getFileName());" + "\r\n" + +" existingIssue.setFileType(tracker.getFileType());" + "\r\n" + +" existingIssue.setData(tracker.getData());" + "\r\n" + +"" + "\r\n" + +" return bugTrackerRepository.save(existingIssue);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +"" + "\r\n" + +" public void deleteIssue(Long id) {" + "\r\n" + +" bugTrackerRepository.deleteById(id);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +"}" \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/entityevents_1677744672333/Entity_eventsController.java b/backend/cns-portal/code-extractor/extracted-files/entityevents_1677744672333/Entity_eventsController.java new file mode 100644 index 0000000..69fb3d6 --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/entityevents_1677744672333/Entity_eventsController.java @@ -0,0 +1,103 @@ +package com.realnet.entityevents.Controller; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; + +import com.realnet.entityevents.Entity.Entity_events_t; +import com.realnet.entityevents.Service.Entity_eventsService; + + +@RestController +@RequestMapping("/entityevents") +public class Entity_eventsController { + + @Autowired + private Entity_eventsService entity_eventsService; + + // Get all entity events + @GetMapping("/entityevents") + public ResponseEntity> getAllEntityEvents() { + List entityEvents = entity_eventsService.getAllEntityEvents(); + return new ResponseEntity>(entityEvents, HttpStatus.OK); + } + + // Get entity event by ID + @GetMapping("/entityevents/{id}") + public ResponseEntity getEntityEventById(@PathVariable Long id) { + Entity_events_t entityEvent = entity_eventsService.getEntityEventById(id); + if (entityEvent != null) { + return new ResponseEntity(entityEvent, HttpStatus.OK); + } else { + return new ResponseEntity(HttpStatus.NOT_FOUND); + } + } + + // Create entity event + @PostMapping("/entityevents") + public ResponseEntity createEntityEvent(@RequestBody Entity_events_t entityEvent) { + Entity_events_t createdEntityEvent = entity_eventsService.createEntityEvent(entityEvent); + return new ResponseEntity(createdEntityEvent, HttpStatus.CREATED); + } + + // Update entity event + @PutMapping("/entityevents/{id}") + public ResponseEntity updateEntityEvent(@PathVariable Long id, @RequestBody Entity_events_t entityEvent) { + Entity_events_t updatedEntityEvent = entity_eventsService.updateEntityEvent(id, entityEvent); + if (updatedEntityEvent != null) { + return new ResponseEntity(updatedEntityEvent, HttpStatus.OK); + } else { + return new ResponseEntity(HttpStatus.NOT_FOUND); + } + } + + + // Delete entity event + @DeleteMapping("/entityevents/{id}") + public ResponseEntity deleteEntityEvent(@PathVariable Long id) { + entity_eventsService.deleteEntityEvent(id); + String message = "ID " + id + " has been deleted"; + return ResponseEntity.ok(message); + } + + + + +// @GetMapping("/entityevents/name-type") +// public ResponseEntity getEntityEventByName(@RequestParam("entity_name") String entity_name, @RequestParam("event_type") String event_type) { +// boolean exists = entity_eventsService.existsByEntityNameAndEventType(entity_name, event_type); +// return new ResponseEntity(exists, HttpStatus.OK); +// +// } + + + + + + + + + + + + + + + + + + + + + + + + + + + + +} \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/entityevents_1677744672333/Entity_eventsRepository.java b/backend/cns-portal/code-extractor/extracted-files/entityevents_1677744672333/Entity_eventsRepository.java new file mode 100644 index 0000000..bd572d5 --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/entityevents_1677744672333/Entity_eventsRepository.java @@ -0,0 +1,23 @@ +package com.realnet.entityevents.Repository; + +import java.util.List; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Repository; + +import com.realnet.entityevents.Entity.Entity_events_t; + +@Repository +public interface Entity_eventsRepository extends JpaRepository { + + @Query(value = "SELECT * FROM realnet_CNSBE.entity_events_t WHERE entity_name = :entityName", nativeQuery = true) + List findByEntityName(@Param("entityName") String entityName); + + + + + +} + diff --git a/backend/cns-portal/code-extractor/extracted-files/entityevents_1677744672333/Entity_eventsService.java b/backend/cns-portal/code-extractor/extracted-files/entityevents_1677744672333/Entity_eventsService.java new file mode 100644 index 0000000..ed11971 --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/entityevents_1677744672333/Entity_eventsService.java @@ -0,0 +1,83 @@ +package com.realnet.entityevents.Service; + + +import java.util.HashSet; +import java.util.List; + +import java.util.Set; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import com.realnet.entityevents.Entity.Entity_events_t; +import com.realnet.entityevents.Repository.Entity_eventsRepository; + + +@Service +public class Entity_eventsService { + + @Autowired + private Entity_eventsRepository entity_eventsRepository; + + public List getAllEntityEvents() { + return entity_eventsRepository.findAll(); + } + + public Entity_events_t getEntityEventById(Long id) { + return entity_eventsRepository.findById(id).orElse(null); + } + + public Entity_events_t createEntityEvent(Entity_events_t entityEvent) { + return entity_eventsRepository.save(entityEvent); + } + + public Entity_events_t updateEntityEvent(Long id, Entity_events_t entityEvent) { + Entity_events_t existingEntityEvent = entity_eventsRepository.findById(id).orElse(null); + if (existingEntityEvent != null) { + existingEntityEvent.setEntity_name(entityEvent.getEntity_name()); + existingEntityEvent.setEvent_type(entityEvent.getEvent_type()); + existingEntityEvent.set_active(entityEvent.is_active()); + return entity_eventsRepository.save(existingEntityEvent); + } + return null; + } + + + public void deleteEntityEvent(Long id) { + entity_eventsRepository.deleteById(id); + } + + + + + public boolean isEntityAllowed(String entity_name) { + + System.out.println("isEntityAllowed called " + entity_name); + + if (entity_name == null || entity_name.isEmpty()) { + return true; // Allow unspecified entities + } + + List entityEventsList = entity_eventsRepository.findByEntityName(entity_name); + if (entityEventsList == null || entityEventsList.isEmpty()) { + return false; // Disallow entities not found in entity events + } + + return true; + } + + + + + + + + + + +// public boolean existsByEntityNameAndEventType(String entity_name, String event_type) { +// return entity_eventsRepository.existsByEntityNameAndEventType(entity_name, event_type); +// } + + +} \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/entityevents_1677744672333/Entity_events_t.java b/backend/cns-portal/code-extractor/extracted-files/entityevents_1677744672333/Entity_events_t.java new file mode 100644 index 0000000..9992c4f --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/entityevents_1677744672333/Entity_events_t.java @@ -0,0 +1,25 @@ +package com.realnet.entityevents.Entity; + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; + +import lombok.Data; + +import com.realnet.fnd.entity.Rn_Who_AccId_Column; + +@Entity +@Data +public class Entity_events_t extends Rn_Who_AccId_Column{ + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private String entity_name; + + private String event_type; + + private boolean is_active = true; +} diff --git a/backend/cns-portal/code-extractor/extracted-files/entityevents_1677744672333/static_code/SE_Entity_eventsController.java b/backend/cns-portal/code-extractor/extracted-files/entityevents_1677744672333/static_code/SE_Entity_eventsController.java new file mode 100644 index 0000000..eff6753 --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/entityevents_1677744672333/static_code/SE_Entity_eventsController.java @@ -0,0 +1,103 @@ +"package com.realnet.entityevents.Controller;" + "\r\n" + +"" + "\r\n" + +"import java.util.List;" + "\r\n" + +"" + "\r\n" + +"import org.springframework.beans.factory.annotation.Autowired;" + "\r\n" + +"import org.springframework.http.HttpStatus;" + "\r\n" + +"import org.springframework.http.ResponseEntity;" + "\r\n" + +"import org.springframework.web.bind.annotation.*;" + "\r\n" + +"" + "\r\n" + +"import com.realnet.entityevents.Entity.Entity_events_t;" + "\r\n" + +"import com.realnet.entityevents.Service.Entity_eventsService;" + "\r\n" + +"" + "\r\n" + +"" + "\r\n" + +"@RestController" + "\r\n" + +"@RequestMapping(\"/entityevents\")" + "\r\n" + +"public class Entity_eventsController {" + "\r\n" + +"" + "\r\n" + +" @Autowired" + "\r\n" + +" private Entity_eventsService entity_eventsService;" + "\r\n" + +"" + "\r\n" + +" // Get all entity events" + "\r\n" + +" @GetMapping(\"/entityevents\")" + "\r\n" + +" public ResponseEntity> getAllEntityEvents() {" + "\r\n" + +" List entityEvents = entity_eventsService.getAllEntityEvents();" + "\r\n" + +" return new ResponseEntity>(entityEvents, HttpStatus.OK);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" // Get entity event by ID" + "\r\n" + +" @GetMapping(\"/entityevents/{id}\")" + "\r\n" + +" public ResponseEntity getEntityEventById(@PathVariable Long id) {" + "\r\n" + +" Entity_events_t entityEvent = entity_eventsService.getEntityEventById(id);" + "\r\n" + +" if (entityEvent != null) {" + "\r\n" + +" return new ResponseEntity(entityEvent, HttpStatus.OK);" + "\r\n" + +" } else {" + "\r\n" + +" return new ResponseEntity(HttpStatus.NOT_FOUND);" + "\r\n" + +" }" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" // Create entity event" + "\r\n" + +" @PostMapping(\"/entityevents\")" + "\r\n" + +" public ResponseEntity createEntityEvent(@RequestBody Entity_events_t entityEvent) {" + "\r\n" + +" Entity_events_t createdEntityEvent = entity_eventsService.createEntityEvent(entityEvent);" + "\r\n" + +" return new ResponseEntity(createdEntityEvent, HttpStatus.CREATED);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" // Update entity event" + "\r\n" + +" @PutMapping(\"/entityevents/{id}\")" + "\r\n" + +" public ResponseEntity updateEntityEvent(@PathVariable Long id, @RequestBody Entity_events_t entityEvent) {" + "\r\n" + +" Entity_events_t updatedEntityEvent = entity_eventsService.updateEntityEvent(id, entityEvent);" + "\r\n" + +" if (updatedEntityEvent != null) {" + "\r\n" + +" return new ResponseEntity(updatedEntityEvent, HttpStatus.OK);" + "\r\n" + +" } else {" + "\r\n" + +" return new ResponseEntity(HttpStatus.NOT_FOUND);" + "\r\n" + +" }" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" " + "\r\n" + +" // Delete entity event" + "\r\n" + +" @DeleteMapping(\"/entityevents/{id}\")" + "\r\n" + +" public ResponseEntity deleteEntityEvent(@PathVariable Long id) {" + "\r\n" + +" entity_eventsService.deleteEntityEvent(id);" + "\r\n" + +" String message = \"ID \" + id + \" has been deleted\";" + "\r\n" + +" return ResponseEntity.ok(message);" + "\r\n" + +" }" + "\r\n" + +" " + "\r\n" + +"" + "\r\n" + +" " + "\r\n" + +"" + "\r\n" + +"// @GetMapping(\"/entityevents/name-type\")" + "\r\n" + +"// public ResponseEntity getEntityEventByName(@RequestParam(\"entity_name\") String entity_name, @RequestParam(\"event_type\") String event_type) {" + "\r\n" + +"// boolean exists = entity_eventsService.existsByEntityNameAndEventType(entity_name, event_type);" + "\r\n" + +"// return new ResponseEntity(exists, HttpStatus.OK);" + "\r\n" + +"//" + "\r\n" + +"// }" + "\r\n" + +" " + "\r\n" + +"" + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +"" + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +"}" \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/entityevents_1677744672333/static_code/SE_Entity_eventsRepository.java b/backend/cns-portal/code-extractor/extracted-files/entityevents_1677744672333/static_code/SE_Entity_eventsRepository.java new file mode 100644 index 0000000..ada4dee --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/entityevents_1677744672333/static_code/SE_Entity_eventsRepository.java @@ -0,0 +1,23 @@ +"package com.realnet.entityevents.Repository;" + "\r\n" + +"" + "\r\n" + +"import java.util.List;" + "\r\n" + +"" + "\r\n" + +"import org.springframework.data.jpa.repository.JpaRepository;" + "\r\n" + +"import org.springframework.data.jpa.repository.Query;" + "\r\n" + +"import org.springframework.data.repository.query.Param;" + "\r\n" + +"import org.springframework.stereotype.Repository;" + "\r\n" + +"" + "\r\n" + +"import com.realnet.entityevents.Entity.Entity_events_t;" + "\r\n" + +"" + "\r\n" + +"@Repository" + "\r\n" + +"public interface Entity_eventsRepository extends JpaRepository {" + "\r\n" + +"" + "\r\n" + +" @Query(value = \"SELECT * FROM realnet_CNSBE.entity_events_t WHERE entity_name = :entityName\", nativeQuery = true)" + "\r\n" + +" List findByEntityName(@Param(\"entityName\") String entityName);" + "\r\n" + +"" + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +"" + "\r\n" + +" " + "\r\n" + +"}" + "\r\n" + +"" \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/entityevents_1677744672333/static_code/SE_Entity_eventsService.java b/backend/cns-portal/code-extractor/extracted-files/entityevents_1677744672333/static_code/SE_Entity_eventsService.java new file mode 100644 index 0000000..569c6c6 --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/entityevents_1677744672333/static_code/SE_Entity_eventsService.java @@ -0,0 +1,79 @@ +"package com.realnet.entityevents.Service;" + "\r\n" + +"" + "\r\n" + +"" + "\r\n" + +"import java.util.HashSet;" + "\r\n" + +"import java.util.List;" + "\r\n" + +"" + "\r\n" + +"import java.util.Set;" + "\r\n" + +"" + "\r\n" + +"import org.springframework.beans.factory.annotation.Autowired;" + "\r\n" + +"import org.springframework.stereotype.Service;" + "\r\n" + +"" + "\r\n" + +"import com.realnet.entityevents.Entity.Entity_events_t;" + "\r\n" + +"import com.realnet.entityevents.Repository.Entity_eventsRepository;" + "\r\n" + +"" + "\r\n" + +"" + "\r\n" + +"@Service" + "\r\n" + +"public class Entity_eventsService {" + "\r\n" + +"" + "\r\n" + +" @Autowired" + "\r\n" + +" private Entity_eventsRepository entity_eventsRepository;" + "\r\n" + +"" + "\r\n" + +" public List getAllEntityEvents() {" + "\r\n" + +" return entity_eventsRepository.findAll();" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" public Entity_events_t getEntityEventById(Long id) {" + "\r\n" + +" return entity_eventsRepository.findById(id).orElse(null);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" public Entity_events_t createEntityEvent(Entity_events_t entityEvent) {" + "\r\n" + +" return entity_eventsRepository.save(entityEvent);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" public Entity_events_t updateEntityEvent(Long id, Entity_events_t entityEvent) {" + "\r\n" + +" Entity_events_t existingEntityEvent = entity_eventsRepository.findById(id).orElse(null);" + "\r\n" + +" if (existingEntityEvent != null) {" + "\r\n" + +" existingEntityEvent.setEntity_name(entityEvent.getEntity_name());" + "\r\n" + +" existingEntityEvent.setEvent_type(entityEvent.getEvent_type());" + "\r\n" + +" existingEntityEvent.set_active(entityEvent.is_active());" + "\r\n" + +" return entity_eventsRepository.save(existingEntityEvent);" + "\r\n" + +" }" + "\r\n" + +" return null;" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" " + "\r\n" + +" public void deleteEntityEvent(Long id) {" + "\r\n" + +" entity_eventsRepository.deleteById(id);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" " + "\r\n" + +"" + "\r\n" + +" " + "\r\n" + +" public boolean isEntityAllowed(String entity_name) {" + "\r\n" + +"" + "\r\n" + +" System.out.println(\"isEntityAllowed called \" + entity_name);" + "\r\n" + +"" + "\r\n" + +" if (entity_name == null || entity_name.isEmpty()) {" + "\r\n" + +" return true; // Allow unspecified entities" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" List entityEventsList = entity_eventsRepository.findByEntityName(entity_name);" + "\r\n" + +" if (entityEventsList == null || entityEventsList.isEmpty()) {" + "\r\n" + +" return false; // Disallow entities not found in entity events" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" return true;" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +serviceloop1 +"}" \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/entityevents_1677744672333/static_code/SE_Entity_events_t.java b/backend/cns-portal/code-extractor/extracted-files/entityevents_1677744672333/static_code/SE_Entity_events_t.java new file mode 100644 index 0000000..929a766 --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/entityevents_1677744672333/static_code/SE_Entity_events_t.java @@ -0,0 +1,25 @@ +"package com.realnet.entityevents.Entity;" + "\r\n" + +"" + "\r\n" + +"import javax.persistence.Entity;" + "\r\n" + +"import javax.persistence.GeneratedValue;" + "\r\n" + +"import javax.persistence.GenerationType;" + "\r\n" + +"import javax.persistence.Id;" + "\r\n" + +"" + "\r\n" + +"import lombok.Data;" + "\r\n" + +"" + "\r\n" + +"import com.realnet.fnd.entity.Rn_Who_AccId_Column;" + "\r\n" + +"" + "\r\n" + +"@Entity" + "\r\n" + +"@Data" + "\r\n" + +"public class Entity_events_t extends Rn_Who_AccId_Column{" + "\r\n" + +"" + "\r\n" + +" @Id" + "\r\n" + +" @GeneratedValue(strategy = GenerationType.IDENTITY)" + "\r\n" + +" private Long id;" + "\r\n" + +"" + "\r\n" + +" private String entity_name;" + "\r\n" + +"" + "\r\n" + +" private String event_type;" + "\r\n" + +"" + "\r\n" + +" private boolean is_active = true;" + "\r\n" + +"}" \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/Controller.java b/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/Controller.java new file mode 100644 index 0000000..28b0b47 --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/Controller.java @@ -0,0 +1,1071 @@ +//package com.realnet.excel.controller; +package com.realnet.template.controller; + +import java.io.BufferedReader; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.StandardCopyOption; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +import org.apache.poi.ss.usermodel.Cell; +import org.apache.poi.ss.usermodel.DataFormatter; +import org.apache.poi.ss.usermodel.Row; +import org.apache.poi.ss.usermodel.Sheet; +import org.apache.poi.ss.usermodel.Workbook; +import org.apache.poi.ss.usermodel.WorkbookFactory; +import org.apache.poi.xssf.usermodel.XSSFWorkbook; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.io.InputStreamResource; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.util.StringUtils; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; + +import com.realnet.Sr_Contact_type.Entity.Sr_Contact_type_t; +import com.realnet.Sr_Contact_type.Repository.Sr_Contact_type_Repository; +import com.realnet.Sr_State.Entity.Sr_State_t; +import com.realnet.Sr_State.Repository.Sr_State_Repository; +import com.realnet.Sr_category2.Entity.Sr_category2_t; +import com.realnet.Sr_category2.Repository.Sr_category2_Repository; +import com.realnet.Sr_customer.Entity.Sr_customer_t; +import com.realnet.Sr_customer.Repository.Sr_customer_Repository; +import com.realnet.Sr_handler.Entity.Sr_handler_t; +import com.realnet.Sr_handler.Repository.Sr_handler_Repository; +import com.realnet.Sr_impact2.Entity.Sr_impact2_t; +import com.realnet.Sr_impact2.Repository.Sr_impact2_Repository; +import com.realnet.Sr_priority2.Entity.Sr_priority2_t; +import com.realnet.Sr_priority2.Repository.Sr_priority2_Repository; +import com.realnet.Sr_urgency.Entity.Sr_urgency_t; +import com.realnet.Sr_urgency.Repository.Sr_urgency_Repository; +import com.realnet.template.repository.TemplatedataRepo; +import com.realnet.template.service.FileUploadService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; + +@RestController +@RequestMapping("api/template") +public class Controller { + @Autowired + private TemplatedataRepo temprepo; + + @Autowired + private Sr_priority2_Repository priorityrepo; + + @Autowired + private Sr_impact2_Repository impactrepo; + + @Autowired + private Sr_urgency_Repository urgencyrepo; + + @Autowired + private Sr_State_Repository staterepo; + + @Autowired + private Sr_Contact_type_Repository contactrepo; + + @Autowired + private Sr_customer_Repository customerepo; + + @Autowired + private Sr_category2_Repository categoryrepo; + + @Autowired + private Sr_handler_Repository handlerepo; + @Autowired + FileUploadService fileupload; + @Autowired + private AppUserServiceImpl userService; + + @GetMapping("/demo/download/{file_type}") + + public ResponseEntity demoTemplate(@PathVariable String file_type) throws IOException { + + if (file_type.equalsIgnoreCase("priority")) { + + String filename = "Sr_priority2_t" + ".xlsx"; + String[] header = { "Priority Name", "Description", "Is Active", "Effective Start Date", + "Effective End date" }; + ByteArrayInputStream in = demoTemplate(header, file_type); + InputStreamResource file = new InputStreamResource(in); + return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + filename) + .contentType(MediaType.parseMediaType("application/vnd.ms-excel")).body(file); + + } else if (file_type.equalsIgnoreCase("impact")) { + + String filename = "Sr_impact2_t" + ".xlsx"; + String[] header = { "Impact Name", "Description", "Is Active", "Effective Start Date", + "Effective End date" }; + ByteArrayInputStream in = demoTemplate(header, file_type); + InputStreamResource file = new InputStreamResource(in); + return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + filename) + .contentType(MediaType.parseMediaType("application/vnd.ms-excel")).body(file); + + } else if (file_type.equalsIgnoreCase("urgency")) { + + String filename = "Sr_urgency_t" + ".xlsx"; + String[] header = { "Urgency Name", "Description", "Is Active", "Effective Start Date", + "Effective End date" }; + ByteArrayInputStream in = demoTemplate(header, file_type); + InputStreamResource file = new InputStreamResource(in); + return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + filename) + .contentType(MediaType.parseMediaType("application/vnd.ms-excel")).body(file); + + } else if (file_type.equalsIgnoreCase("category")) { + + String filename = "Sr_category2_t" + ".xlsx"; + String[] header = { "Category Name", "Customer Id", "Is Active", "Effective Start Date", + "Effective End date" }; + ByteArrayInputStream in = demoTemplate(header, file_type); + InputStreamResource file = new InputStreamResource(in); + return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + filename) + .contentType(MediaType.parseMediaType("application/vnd.ms-excel")).body(file); + + } else if (file_type.equalsIgnoreCase("state")) { + + String filename = "Sr_State_t" + ".xlsx"; + String[] header = { "State Name", "Description", "Is Active", "Effective Start Date", + "Effective End date" }; + ByteArrayInputStream in = demoTemplate(header, file_type); + InputStreamResource file = new InputStreamResource(in); + return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + filename) + .contentType(MediaType.parseMediaType("application/vnd.ms-excel")).body(file); + + } else if (file_type.equalsIgnoreCase("contact_type")) { + + String filename = "Sr_Contact_type_t" + ".xlsx"; + String[] header = { "Contact Type Name", "Description", "Is Active", "Effective Start Date", + "Effective End date" }; + ByteArrayInputStream in = demoTemplate(header, file_type); + InputStreamResource file = new InputStreamResource(in); + return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + filename) + .contentType(MediaType.parseMediaType("application/vnd.ms-excel")).body(file); + + } else if (file_type.equalsIgnoreCase("customer")) { + + String filename = "Sr_customer_t" + ".xlsx"; + String[] header = { "Customer Name", "Description", "Is Active", "Effective Start Date", + "Effective End date" }; + ByteArrayInputStream in = demoTemplate(header, file_type); + InputStreamResource file = new InputStreamResource(in); + return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + filename) + .contentType(MediaType.parseMediaType("application/vnd.ms-excel")).body(file); + + } else if (file_type.equalsIgnoreCase("handler")) { + + String filename = "Sr_handler_t" + ".xlsx"; + String[] header = { "User Id", "Role Id", "Is Active", "Effective Start Date", "Effective End date" }; + ByteArrayInputStream in = demoTemplate(header, file_type); + InputStreamResource file = new InputStreamResource(in); + return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + filename) + .contentType(MediaType.parseMediaType("application/vnd.ms-excel")).body(file); + + } + + return new ResponseEntity("Not Found", HttpStatus.BAD_REQUEST); + + } + + public static ByteArrayInputStream demoTemplate(String[] HEADERs, String file_type) throws IOException { + String SHEET = file_type; + Workbook workbook = new XSSFWorkbook(); + ByteArrayOutputStream out = new ByteArrayOutputStream(); + Sheet sheet = workbook.createSheet(SHEET); + Row headerRow = sheet.createRow(0); + for (int col = 0; col < HEADERs.length; col++) { + Cell cell = headerRow.createCell(col); + cell.setCellValue(HEADERs[col]); + } + workbook.write(out); + return new ByteArrayInputStream(out.toByteArray()); + + } + + @PostMapping("/save/{filetype}") + public ResponseEntity uploadFile(@RequestParam MultipartFile file, @PathVariable String filetype) + throws IOException, ParseException { + BufferedReader br; + InputStream is = file.getInputStream(); + br = new BufferedReader(new InputStreamReader(is)); + String file_name = file.getOriginalFilename(); + AppUser loggedInUser = userService.getLoggedInUser(); + + if (filetype.equalsIgnoreCase("priority")) { + + if (file_name.contains("Sr_priority2_t")) { + + String[] header = { "Priority Name", "Description", "Is Active", "Effective Start Date", + "Effective End date" }; + ArrayList prioritylist = new ArrayList(); + + Workbook workbook = WorkbookFactory.create(is); + +// Create a DataFormatter to format and get each cell's value as String + DataFormatter dataFormatter = new DataFormatter(); + + Sheet sheet = workbook.getSheetAt(0); + + // Getting number of columns in the Sheet + int cols = sheet.getRow(0).getLastCellNum(); + + fileupload.uploadFile(file, loggedInUser.getUserId(), filetype); + + for (Row row : sheet) { + + if (row.getRowNum() == 0) { + for (int i = 0; i < cols; i++) { + String value = dataFormatter.formatCellValue(row.getCell(i)); + + if (!header[i].equalsIgnoreCase(value)) { + + return new ResponseEntity<>( + "priority file Should have \"" + header + " \"in the header in excel file", + HttpStatus.BAD_REQUEST); + } + } + + } + + if (row.getRowNum() != 0) { + Date date = row.getCell(3).getDateCellValue(); + Date date2 = row.getCell(4).getDateCellValue(); + + Sr_priority2_t priority = new Sr_priority2_t(); + priority.setPriority_name(dataFormatter.formatCellValue(row.getCell(0))); + priority.setDescription(dataFormatter.formatCellValue(row.getCell(1))); + priority.setActive(Boolean.valueOf(dataFormatter.formatCellValue(row.getCell(2)))); + + priority.setEffective_start_date(date); + priority.setEffective_end_date(date2); + + prioritylist.add(priority); + } + + } + priorityrepo.saveAll(prioritylist); + workbook.close(); + +// + + return new ResponseEntity<>("File Uploaded", HttpStatus.ACCEPTED); + } + return new ResponseEntity<>("File name should contain Sr_priority2_t", HttpStatus.BAD_REQUEST); + + } + + else if (filetype.contains("impact")) { + + if (file_name.contains("Sr_impact2_t")) { + + String[] header = { "Impact Name", "Description", "Is Active", "Effective Start Date", + "Effective End date" }; + + ArrayList impactlist = new ArrayList(); + + Workbook workbook = WorkbookFactory.create(is); + +// Create a DataFormatter to format and get each cell's value as String + DataFormatter dataFormatter = new DataFormatter(); + + Sheet sheet = workbook.getSheetAt(0); + + // Getting number of columns in the Sheet + int cols = sheet.getRow(0).getLastCellNum(); + + fileupload.uploadFile(file, loggedInUser.getUserId(), filetype); + + for (Row row : sheet) { + + if (row.getRowNum() == 0) { + for (int i = 0; i < cols; i++) { + String value = dataFormatter.formatCellValue(row.getCell(i)); + + if (!header[i].equalsIgnoreCase(value)) { + + return new ResponseEntity<>("priority file header is not in correct format ", + HttpStatus.BAD_REQUEST); + } + } + + } + + if (row.getRowNum() != 0) { + + Date date = row.getCell(3).getDateCellValue(); + Date date2 = row.getCell(4).getDateCellValue(); + + Sr_impact2_t impact = new Sr_impact2_t(); + impact.setImpact_name(dataFormatter.formatCellValue(row.getCell(0))); + impact.setDescription(dataFormatter.formatCellValue(row.getCell(1))); + impact.setIsActive(Boolean.valueOf(dataFormatter.formatCellValue(row.getCell(2)))); + + impact.setEffective_start_date(date); + impact.setEffective_end_date(date2); + + impactlist.add(impact); + } + + } + impactrepo.saveAll(impactlist); + System.out.println(impactlist); + + workbook.close(); + + return new ResponseEntity<>("File Uploaded", HttpStatus.ACCEPTED); + } + return new ResponseEntity<>("File name should contain Sr_impact2_t", HttpStatus.BAD_REQUEST); + + } + + else if (filetype.contains("urgency")) { + + if (file_name.contains("Sr_urgency_t")) { + + String[] header = { "Urgency Name", "Description", "Is Active", "Effective Start Date", + "Effective End date" }; + List li = new ArrayList(); + li.add("Impact Name"); + li.add("Description"); + li.add("Is Active"); + li.add("Effective Start Date"); + li.add("Effective End date"); + + ArrayList impactlist = new ArrayList(); + + Workbook workbook = WorkbookFactory.create(is); + +// Create a DataFormatter to format and get each cell's value as String + DataFormatter dataFormatter = new DataFormatter(); + + Sheet sheet = workbook.getSheetAt(0); + + // Getting number of columns in the Sheet + int cols = sheet.getRow(0).getLastCellNum(); + + fileupload.uploadFile(file, loggedInUser.getUserId(), filetype); + + for (Row row : sheet) { + + if (row.getRowNum() == 0) { + for (int i = 0; i < cols; i++) { + String value = dataFormatter.formatCellValue(row.getCell(i)); + + if (!header[i].equalsIgnoreCase(value)) { + + return new ResponseEntity<>( + "priority file Should have \"" + li + " \"in the header in excel file", + HttpStatus.BAD_REQUEST); + } + } + + } + + if (row.getRowNum() != 0) { + Date date = row.getCell(3).getDateCellValue(); + Date date2 = row.getCell(4).getDateCellValue(); + + Sr_urgency_t urgency = new Sr_urgency_t(); + urgency.setUrgency_name(dataFormatter.formatCellValue(row.getCell(0))); + urgency.setDescription(dataFormatter.formatCellValue(row.getCell(1))); + urgency.setIsActive(Boolean.valueOf(dataFormatter.formatCellValue(row.getCell(2)))); + + urgency.setEffective_start_date(date); + urgency.setEffective_end_date(date2); + + impactlist.add(urgency); + } + + } + urgencyrepo.saveAll(impactlist); + System.out.println(impactlist); + + workbook.close(); + + return new ResponseEntity<>("File Uploaded", HttpStatus.ACCEPTED); + } + return new ResponseEntity<>("File name should contain sr_incident_t", HttpStatus.BAD_REQUEST); + + } else if (filetype.equalsIgnoreCase("category")) { + + String[] header = { "Category Name", "Customer Id", "Is Active", "Effective Start Date", + "Effective End date" }; + +// if (file_name.contains("Sr_impact2_t")) { +// +// ArrayList impactlist = new ArrayList(); +// +// Workbook workbook = WorkbookFactory.create(is); +// +//// Create a DataFormatter to format and get each cell's value as String +// DataFormatter dataFormatter = new DataFormatter(); +// +// Sheet sheet = workbook.getSheetAt(0); +// +// // Getting number of columns in the Sheet +// int cols = sheet.getRow(0).getLastCellNum(); +// +// fileupload.uploadFile(file, loggedInUser.getUserId(), filetype); +// +// for (Row row : sheet) { +// +// if (row.getRowNum() == 0) { +// for (int i = 0; i < cols; i++) { +// String value = dataFormatter.formatCellValue(row.getCell(i)); +// +// if (!header[i].equalsIgnoreCase(value)) { +// +// return new ResponseEntity<>("priority file header is not in correct format ", +// HttpStatus.BAD_REQUEST); +// } +// } +// +// } +// +// if (row.getRowNum() != 0) { +// String value = dataFormatter.formatCellValue(row.getCell(4)); +// String value2 = dataFormatter.formatCellValue(row.getCell(5)); +// Date date = new SimpleDateFormat("dd-MM-yyyy").parse(value); +// Date date2 = new SimpleDateFormat("dd-MM-yyyy").parse(value2); +// +// Sr_impact2_t impact = new Sr_impact2_t(); +// impact.setImpact_name(file_name); +// impact.setDescription(dataFormatter.formatCellValue(row.getCell(2))); +// impact.setIsActive(Boolean.valueOf(dataFormatter.formatCellValue(row.getCell(3)))); +// +//// priority.setEffective_start_date(date); +//// priority.setEffective_end_date(date2); +// +// impactlist.add(impact); +// } +// +// } +// impactrepo.saveAll(impactlist); +// System.out.println(impactlist); +// +// workbook.close(); +// +// } + + } else if (filetype.equalsIgnoreCase("state")) { + + String[] header = { "State Name", "Description", "Is Active", "Effective Start Date", + "Effective End date" }; + + if (file_name.contains("Sr_State_t")) { + + ArrayList statelist = new ArrayList(); + + Workbook workbook = WorkbookFactory.create(is); + +// Create a DataFormatter to format and get each cell's value as String + DataFormatter dataFormatter = new DataFormatter(); + + Sheet sheet = workbook.getSheetAt(0); + + // Getting number of columns in the Sheet + int cols = sheet.getRow(0).getLastCellNum(); + + fileupload.uploadFile(file, loggedInUser.getUserId(), filetype); + + for (Row row : sheet) { + + if (row.getRowNum() == 0) { + for (int i = 0; i < cols; i++) { + String value = dataFormatter.formatCellValue(row.getCell(i)); + + if (!header[i].equalsIgnoreCase(value)) { + + return new ResponseEntity<>("priority file header is not in correct format ", + HttpStatus.BAD_REQUEST); + } + } + + } + + if (row.getRowNum() != 0) { + String value = dataFormatter.formatCellValue(row.getCell(3)); + String value2 = dataFormatter.formatCellValue(row.getCell(4)); + + Sr_State_t state = new Sr_State_t(); + state.setState_name(dataFormatter.formatCellValue(row.getCell(0))); + state.setDescription(dataFormatter.formatCellValue(row.getCell(1))); + state.setIsActive(Boolean.valueOf(dataFormatter.formatCellValue(row.getCell(2)))); + + state.setEffective_end_date(value2); + state.setEffective_start_date(value); + + statelist.add(state); + } + + } + staterepo.saveAll(statelist); + + workbook.close(); + + } + + } else if (filetype.equalsIgnoreCase("contact_type")) { + + String[] header = { "Contact Type Name", "Description", "Is Active", "Effective Start Date", + "Effective End date" }; + + if (file_name.contains("Sr_Contact_type_t")) { + + ArrayList statelist = new ArrayList(); + + Workbook workbook = WorkbookFactory.create(is); + +// Create a DataFormatter to format and get each cell's value as String + DataFormatter dataFormatter = new DataFormatter(); + + Sheet sheet = workbook.getSheetAt(0); + + // Getting number of columns in the Sheet + int cols = sheet.getRow(0).getLastCellNum(); + + fileupload.uploadFile(file, loggedInUser.getUserId(), filetype); + + for (Row row : sheet) { + + if (row.getRowNum() == 0) { + for (int i = 0; i < cols; i++) { + String value = dataFormatter.formatCellValue(row.getCell(i)); + + if (!header[i].equalsIgnoreCase(value)) { + + return new ResponseEntity<>("priority file header is not in correct format ", + HttpStatus.BAD_REQUEST); + } + } + + } + + if (row.getRowNum() != 0) { + Date date = row.getCell(3).getDateCellValue(); + Date date2 = row.getCell(4).getDateCellValue(); + + Sr_Contact_type_t contact = new Sr_Contact_type_t(); + contact.setCon_type_name(dataFormatter.formatCellValue(row.getCell(0))); + contact.setDescription(dataFormatter.formatCellValue(row.getCell(1))); + contact.setIsActive(Boolean.valueOf(dataFormatter.formatCellValue(row.getCell(2)))); + + contact.setEffective_start_date(date); + contact.setEffective_end_date(date2); + + statelist.add(contact); + } + + } + contactrepo.saveAll(statelist); + + workbook.close(); + + } + + } else if (filetype.equalsIgnoreCase("customer")) { + + String[] header = { "Customer Name", "Description", "Is Active", "Effective Start Date", + "Effective End date" }; + + if (file_name.contains("Sr_customer_t")) { + + ArrayList customerlist = new ArrayList(); + + Workbook workbook = WorkbookFactory.create(is); + +// Create a DataFormatter to format and get each cell's value as String + DataFormatter dataFormatter = new DataFormatter(); + + Sheet sheet = workbook.getSheetAt(0); + + // Getting number of columns in the Sheet + int cols = sheet.getRow(0).getLastCellNum(); + + fileupload.uploadFile(file, loggedInUser.getUserId(), filetype); + + for (Row row : sheet) { + + if (row.getRowNum() == 0) { + for (int i = 0; i < cols; i++) { + String value = dataFormatter.formatCellValue(row.getCell(i)); + + if (!header[i].equalsIgnoreCase(value)) { + + return new ResponseEntity<>("priority file header is not in correct format ", + HttpStatus.BAD_REQUEST); + } + } + + } + + if (row.getRowNum() != 0) { + Date date = row.getCell(3).getDateCellValue(); + Date date2 = row.getCell(4).getDateCellValue(); + + Sr_customer_t customer = new Sr_customer_t(); + customer.setCustomer_name(dataFormatter.formatCellValue(row.getCell(0))); + customer.setDescription(dataFormatter.formatCellValue(row.getCell(1))); + customer.setIsActive(Boolean.valueOf(dataFormatter.formatCellValue(row.getCell(2)))); + + customer.setEffective_start_date(date); + customer.setEffective_end_date(date2); + + customerlist.add(customer); + } + + } + customerepo.saveAll(customerlist); + + workbook.close(); + + } + + } else if (filetype.equalsIgnoreCase("handler")) { + + String[] header = { "User Id", "Role Id", "Is Active", "Effective Start Date", "Effective End date" }; + +// if (file_name.contains("Sr_State_t")) { +// +// ArrayList statelist = new ArrayList(); +// +// Workbook workbook = WorkbookFactory.create(is); +// +//// Create a DataFormatter to format and get each cell's value as String +// DataFormatter dataFormatter = new DataFormatter(); +// +// Sheet sheet = workbook.getSheetAt(0); +// +// // Getting number of columns in the Sheet +// int cols = sheet.getRow(0).getLastCellNum(); +// +// fileupload.uploadFile(file, loggedInUser.getUserId(), filetype); +// +// for (Row row : sheet) { +// +// if (row.getRowNum() == 0) { +// for (int i = 0; i < cols; i++) { +// String value = dataFormatter.formatCellValue(row.getCell(i)); +// +// if (!header[i].equalsIgnoreCase(value)) { +// +// return new ResponseEntity<>("priority file header is not in correct format ", +// HttpStatus.BAD_REQUEST); +// } +// } +// +// } +// +// if (row.getRowNum() != 0) { +// Date date = row.getCell(3).getDateCellValue(); +// Date date2 = row.getCell(4).getDateCellValue(); +// +// Sr_State_t state = new Sr_State_t(); +// state.setState_name(dataFormatter.formatCellValue(row.getCell(1))); +// state.setDescription(dataFormatter.formatCellValue(row.getCell(2))); +// state.setIsActive(Boolean.valueOf(dataFormatter.formatCellValue(row.getCell(3)))); +// +//// priority.setEffective_start_date(date); +//// priority.setEffective_end_date(date2); +// +// statelist.add(state); +// } +// +// } +// staterepo.saveAll(statelist); +// +// workbook.close(); +// +// } + + } + + return new ResponseEntity<>("Something Went Wrong please try again....!!!!! ", HttpStatus.BAD_REQUEST); + + } + +// Download template data in excel Files + + @GetMapping("/download/{file_type}") + + public ResponseEntity getFile(@PathVariable String file_type) throws IOException { + + if (file_type.equalsIgnoreCase("priority")) { + + String filename = "Sr_priority2_t" + ".xlsx"; + String[] header = { "Priority Name", "Description", "Is Active", "Effective Start Date", + "Effective End date" }; + List findAll = priorityrepo.findAll(); + ByteArrayInputStream in = templateByte(findAll, header); + InputStreamResource file = new InputStreamResource(in); + return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + filename) + .contentType(MediaType.parseMediaType("application/vnd.ms-excel")).body(file); + + } else if (file_type.equalsIgnoreCase("impact")) { + + String filename = "Sr_impact2_t" + ".xlsx"; + String[] header = { "Impact Name", "Description", "Is Active", "Effective Start Date", + "Effective End date" }; + List findAll = impactrepo.findAll(); + ByteArrayInputStream in = templateByte3(findAll, header); + InputStreamResource file = new InputStreamResource(in); + return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + filename) + .contentType(MediaType.parseMediaType("application/vnd.ms-excel")).body(file); + + } else if (file_type.equalsIgnoreCase("urgency")) { + + String filename = "Sr_urgency_t" + ".xlsx"; + String[] header = { "Urgency Name", "Description", "Is Active", "Effective Start Date", + "Effective End date" }; + List findAll = urgencyrepo.findAll(); + ByteArrayInputStream in = templateByte2(findAll, header); + InputStreamResource file = new InputStreamResource(in); + return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + filename) + .contentType(MediaType.parseMediaType("application/vnd.ms-excel")).body(file); + + } else if (file_type.equalsIgnoreCase("category")) { + + String filename = "Sr_category2_t" + ".xlsx"; + String[] header = { "Category Name", "Customer Id", "Is Active", "Effective Start Date", + "Effective End date" }; + List findAll = categoryrepo.findAll(); + ByteArrayInputStream in = templateByte4(findAll, header); + InputStreamResource file = new InputStreamResource(in); + return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + filename) + .contentType(MediaType.parseMediaType("application/vnd.ms-excel")).body(file); + + } else if (file_type.equalsIgnoreCase("state")) { + + String filename = "Sr_State_t" + ".xlsx"; + String[] header = { "State Name", "Description", "Is Active", "Effective Start Date", + "Effective End date" }; + List findAll = staterepo.findAll(); + ByteArrayInputStream in = templateByte6(findAll, header); + InputStreamResource file = new InputStreamResource(in); + return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + filename) + .contentType(MediaType.parseMediaType("application/vnd.ms-excel")).body(file); + + } else if (file_type.equalsIgnoreCase("contact_type")) { + + String filename = "Sr_Contact_type_t" + ".xlsx"; + String[] header = { "Contact Type Name", "Description", "Is Active", "Effective Start Date", + "Effective End date" }; + List findAll = contactrepo.findAll(); + ByteArrayInputStream in = templateByte5(findAll, header); + InputStreamResource file = new InputStreamResource(in); + return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + filename) + .contentType(MediaType.parseMediaType("application/vnd.ms-excel")).body(file); + + } else if (file_type.equalsIgnoreCase("customer")) { + + String filename = "Sr_customer_t" + ".xlsx"; + String[] header = { "Customer Name", "Description", "Is Active", "Effective Start Date", + "Effective End date" }; + List findAll = customerepo.findAll(); + ByteArrayInputStream in = templateByte7(findAll, header); + InputStreamResource file = new InputStreamResource(in); + return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + filename) + .contentType(MediaType.parseMediaType("application/vnd.ms-excel")).body(file); + + } else if (file_type.equalsIgnoreCase("handler")) { + + String filename = "Sr_handler_t" + ".xlsx"; + String[] header = { "User Id", "Role Id", "Is Active", "Effective Start Date", "Effective End date" }; + List findAll = handlerepo.findAll(); + ByteArrayInputStream in = templateByte8(findAll, header); + InputStreamResource file = new InputStreamResource(in); + return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + filename) + .contentType(MediaType.parseMediaType("application/vnd.ms-excel")).body(file); + + } + + return new ResponseEntity("Not Found", HttpStatus.BAD_REQUEST); + + } + + public static ByteArrayInputStream templateByte(List list, String[] hEADERs) { + + String SHEET = "priority"; + + try (Workbook workbook = new XSSFWorkbook(); ByteArrayOutputStream out = new ByteArrayOutputStream();) { + Sheet sheet = workbook.createSheet(SHEET); + + // Header + Row headerRow = sheet.createRow(0); + + for (int col = 0; col < hEADERs.length; col++) { + Cell cell = headerRow.createCell(col); + cell.setCellValue(hEADERs[col]); + } + + int rowIdx = 1; + for (Sr_priority2_t p : list) { + Row row = sheet.createRow(rowIdx++); + + row.createCell(0).setCellValue(p.getPriority_name()); + row.createCell(1).setCellValue(p.getDescription()); + row.createCell(2).setCellValue(p.isActive()); + row.createCell(3).setCellValue(String.valueOf(p.getEffective_start_date())); + row.createCell(4).setCellValue(String.valueOf(p.getEffective_end_date())); + } + workbook.write(out); + return new ByteArrayInputStream(out.toByteArray()); + } catch (IOException e) { + throw new RuntimeException("fail to import data to Excel file: " + e.getMessage()); + } + + } + + public static ByteArrayInputStream templateByte2(List list, String[] hEADERs) { + + String SHEET = "URGENCY"; + + try (Workbook workbook = new XSSFWorkbook(); ByteArrayOutputStream out = new ByteArrayOutputStream();) { + Sheet sheet = workbook.createSheet(SHEET); + + // Header + Row headerRow = sheet.createRow(0); + + for (int col = 0; col < hEADERs.length; col++) { + Cell cell = headerRow.createCell(col); + cell.setCellValue(hEADERs[col]); + } + + int rowIdx = 1; + for (Sr_urgency_t p : list) { + Row row = sheet.createRow(rowIdx++); + + row.createCell(0).setCellValue(p.getUrgency_name()); + row.createCell(1).setCellValue(p.getDescription()); + row.createCell(2).setCellValue(p.isIsActive()); + row.createCell(3).setCellValue(String.valueOf(p.getEffective_start_date())); + row.createCell(4).setCellValue(String.valueOf(p.getEffective_end_date())); + } + workbook.write(out); + return new ByteArrayInputStream(out.toByteArray()); + } catch (IOException e) { + throw new RuntimeException("fail to import data to Excel file: " + e.getMessage()); + } + + } + + public static ByteArrayInputStream templateByte3(List list, String[] hEADERs) { + + String SHEET = "Impact"; + + try (Workbook workbook = new XSSFWorkbook(); ByteArrayOutputStream out = new ByteArrayOutputStream();) { + Sheet sheet = workbook.createSheet(SHEET); + + // Header + Row headerRow = sheet.createRow(0); + + for (int col = 0; col < hEADERs.length; col++) { + Cell cell = headerRow.createCell(col); + cell.setCellValue(hEADERs[col]); + } + + int rowIdx = 1; + for (Sr_impact2_t p : list) { + Row row = sheet.createRow(rowIdx++); + + row.createCell(0).setCellValue(p.getImpact_name()); + row.createCell(1).setCellValue(p.getDescription()); + row.createCell(2).setCellValue(p.isIsActive()); + row.createCell(3).setCellValue(String.valueOf(p.getEffective_start_date())); + row.createCell(4).setCellValue(String.valueOf(p.getEffective_end_date())); + } + workbook.write(out); + return new ByteArrayInputStream(out.toByteArray()); + } catch (IOException e) { + throw new RuntimeException("fail to import data to Excel file: " + e.getMessage()); + } + + } + + public static ByteArrayInputStream templateByte4(List list, String[] hEADERs) { + + String SHEET = "Impact"; + + try (Workbook workbook = new XSSFWorkbook(); ByteArrayOutputStream out = new ByteArrayOutputStream();) { + Sheet sheet = workbook.createSheet(SHEET); + + // Header + Row headerRow = sheet.createRow(0); + + for (int col = 0; col < hEADERs.length; col++) { + Cell cell = headerRow.createCell(col); + cell.setCellValue(hEADERs[col]); + } + + int rowIdx = 1; + for (Sr_category2_t p : list) { + Row row = sheet.createRow(rowIdx++); + + row.createCell(0).setCellValue(p.getCustomer_id()); + row.createCell(1).setCellValue(p.getDescription()); + row.createCell(2).setCellValue(p.isActive()); + row.createCell(3).setCellValue(String.valueOf(p.getEffective_start_date())); + row.createCell(4).setCellValue(String.valueOf(p.getEffective_end_date())); + } + workbook.write(out); + return new ByteArrayInputStream(out.toByteArray()); + } catch (IOException e) { + throw new RuntimeException("fail to import data to Excel file: " + e.getMessage()); + } + + } + + public static ByteArrayInputStream templateByte5(List list, String[] hEADERs) { + + String SHEET = "Impact"; + + try (Workbook workbook = new XSSFWorkbook(); ByteArrayOutputStream out = new ByteArrayOutputStream();) { + Sheet sheet = workbook.createSheet(SHEET); + + // Header + Row headerRow = sheet.createRow(0); + + for (int col = 0; col < hEADERs.length; col++) { + Cell cell = headerRow.createCell(col); + cell.setCellValue(hEADERs[col]); + } + + int rowIdx = 1; + for (Sr_Contact_type_t p : list) { + Row row = sheet.createRow(rowIdx++); + + row.createCell(0).setCellValue(p.getCon_type_name()); + row.createCell(1).setCellValue(p.getDescription()); + row.createCell(2).setCellValue(p.isIsActive()); + row.createCell(3).setCellValue(String.valueOf(p.getEffective_start_date())); + row.createCell(4).setCellValue(String.valueOf(p.getEffective_end_date())); + } + workbook.write(out); + return new ByteArrayInputStream(out.toByteArray()); + } catch (IOException e) { + throw new RuntimeException("fail to import data to Excel file: " + e.getMessage()); + } + + } + + public static ByteArrayInputStream templateByte6(List list, String[] hEADERs) { + + String SHEET = "Impact"; + + try (Workbook workbook = new XSSFWorkbook(); ByteArrayOutputStream out = new ByteArrayOutputStream();) { + Sheet sheet = workbook.createSheet(SHEET); + + // Header + Row headerRow = sheet.createRow(0); + + for (int col = 0; col < hEADERs.length; col++) { + Cell cell = headerRow.createCell(col); + cell.setCellValue(hEADERs[col]); + } + + int rowIdx = 1; + for (Sr_State_t p : list) { + Row row = sheet.createRow(rowIdx++); + row.createCell(0).setCellValue(p.getState_name()); + row.createCell(1).setCellValue(p.getDescription()); + row.createCell(2).setCellValue(p.isIsActive()); + row.createCell(3).setCellValue(String.valueOf(p.getEffective_start_date())); + row.createCell(4).setCellValue(String.valueOf(p.getEffective_end_date())); + } + workbook.write(out); + return new ByteArrayInputStream(out.toByteArray()); + } catch (IOException e) { + throw new RuntimeException("fail to import data to Excel file: " + e.getMessage()); + } + + } + + public static ByteArrayInputStream templateByte7(List list, String[] hEADERs) { + + String SHEET = "Impact"; + + try (Workbook workbook = new XSSFWorkbook(); ByteArrayOutputStream out = new ByteArrayOutputStream();) { + Sheet sheet = workbook.createSheet(SHEET); + + // Header + Row headerRow = sheet.createRow(0); + + for (int col = 0; col < hEADERs.length; col++) { + Cell cell = headerRow.createCell(col); + cell.setCellValue(hEADERs[col]); + } + + int rowIdx = 1; + for (Sr_customer_t p : list) { + Row row = sheet.createRow(rowIdx++); + + row.createCell(0).setCellValue(p.getCustomer_name()); + row.createCell(1).setCellValue(p.getDescription()); + row.createCell(2).setCellValue(p.isIsActive()); + row.createCell(3).setCellValue(String.valueOf(p.getEffective_start_date())); + row.createCell(4).setCellValue(String.valueOf(p.getEffective_end_date())); + } + workbook.write(out); + return new ByteArrayInputStream(out.toByteArray()); + } catch (IOException e) { + throw new RuntimeException("fail to import data to Excel file: " + e.getMessage()); + } + + } + + public static ByteArrayInputStream templateByte8(List list, String[] hEADERs) { + + String SHEET = "Impact"; + + try (Workbook workbook = new XSSFWorkbook(); ByteArrayOutputStream out = new ByteArrayOutputStream();) { + Sheet sheet = workbook.createSheet(SHEET); + + // Header + Row headerRow = sheet.createRow(0); + + for (int col = 0; col < hEADERs.length; col++) { + Cell cell = headerRow.createCell(col); + cell.setCellValue(hEADERs[col]); + } + + int rowIdx = 1; + for (Sr_handler_t p : list) { + Row row = sheet.createRow(rowIdx++); + + row.createCell(0).setCellValue(p.getRole()); + row.createCell(1).setCellValue(p.getUser_name()); + row.createCell(2).setCellValue(p.isIsActive()); + row.createCell(3).setCellValue(String.valueOf(p.getEffective_start_date())); + row.createCell(4).setCellValue(String.valueOf(p.getEffective_end_date())); + } + workbook.write(out); + return new ByteArrayInputStream(out.toByteArray()); + } catch (IOException e) { + throw new RuntimeException("fail to import data to Excel file: " + e.getMessage()); + } + + } + + @GetMapping("/getalltemplate") + public ResponseEntity getALlTemplate() { + return new ResponseEntity<>(temprepo.findAll(), HttpStatus.ACCEPTED); + } + +} diff --git a/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/DatabaseQueryController.java b/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/DatabaseQueryController.java new file mode 100644 index 0000000..7a56d31 --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/DatabaseQueryController.java @@ -0,0 +1,75 @@ +package com.realnet.template.controller; + +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.template.repository.DynamicTempRepo; +import com.realnet.template.service.DatabaseQueryService; + +@RestController +@RequestMapping("/sureserve/template/databasequery") +public class DatabaseQueryController { + + @Autowired + private DatabaseQueryService rn_table_service; + @Autowired + private DynamicTempRepo tempRepo; + + @Value("${spring.datasource.username}") + private String userName; + + @Value("${spring.datasource.password}") + private String password; + + @Value("${spring.datasource.url}") + private String url; + +// get all databse list available + @GetMapping("/Table_list") + @ResponseBody + public List getdatabase() { + List list = tempRepo.getdatabaseList(); + return list; + } + + // get all table list available + @GetMapping("/Table_list_all") + @ResponseBody + public List gettableList() + +// @PathVariable String table_schema) + { +// List list = tempRepo.getListOftables(table_schema); + List list = rn_table_service.getListOftable("sureserve"); + return list; + } + + // get all column list available + @GetMapping("/Table_list/{table_schema}/{TABLE_NAME}") + @ResponseBody + public List getallcolumnlist(@PathVariable String table_schema, @PathVariable String TABLE_NAME) { + List list = rn_table_service.getColumnAliasList1(table_schema, TABLE_NAME); + return list; + } + + // create database + @GetMapping("/createdatabase/{table_schema}") + @ResponseBody + public List createdatabase(@PathVariable String table_schema) { + List list = rn_table_service.createdatabase(table_schema); + return list; + } + +} \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/DatabaseQueryService.java b/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/DatabaseQueryService.java new file mode 100644 index 0000000..f7e284e --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/DatabaseQueryService.java @@ -0,0 +1,89 @@ +package com.realnet.template.service; + +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; +import org.springframework.web.bind.annotation.PathVariable; + +@Service +public class DatabaseQueryService { + + @Value("${spring.datasource.username}") + private String userName; + + @Value("${spring.datasource.password}") + private String password; + + @Value("${spring.datasource.url}") + private String url; + + // get all column + + public List getColumnAliasList1(String table_schema, String tABLE_NAME) { + String query = "SELECT column_name FROM information_schema.columns WHERE TABLE_SCHEMA='" + table_schema + + "' and table_name = '" + tABLE_NAME + "' "; + List list = new ArrayList(); + try (Connection con = DriverManager.getConnection(url, userName, password); + + Statement stmt = con.createStatement()) { + ResultSet rs = stmt.executeQuery(query); + while (rs.next()) { + String coffeeName = rs.getString("column_name"); + list.add(coffeeName); + } + } catch (SQLException e) { + e.printStackTrace(); + } + return list; + } + + // get all table list from databse + + public List getListOftable(String table_schema) { + String query = "SELECT table_name FROM information_schema.tables WHERE table_schema='" + table_schema + "' "; + + List list = new ArrayList(); + try (Connection con = DriverManager.getConnection(url, userName, password); + + Statement stmt = con.createStatement()) { + ResultSet rs = stmt.executeQuery(query); + while (rs.next()) { + String coffeeName = rs.getString("table_name"); + list.add(coffeeName); + } + } catch (SQLException e) { + e.printStackTrace(); + } + return list; + } + + public List createdatabase(String table_schema){ + String query = "CREATE SCHEMA " + table_schema + ";"; + + List list = new ArrayList(); + try (Connection con = DriverManager.getConnection(url, userName, password); // conn.str + + Statement stmt = con.createStatement()) { + int rs = stmt.executeUpdate(query); + + list.add(rs); + + } catch (SQLException e) { + e.printStackTrace(); + } finally { + } + return list; + + } + + + +} diff --git a/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/DynamicTempRepo.java b/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/DynamicTempRepo.java new file mode 100644 index 0000000..6abf71f --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/DynamicTempRepo.java @@ -0,0 +1,24 @@ +package com.realnet.template.repository; + +import java.util.List; + +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Repository; + +import com.realnet.template.entity.Dynamic_template; + +@Repository +public interface DynamicTempRepo extends JpaRepository{ + + + @Query(value= "select schema_name from information_schema.schemata",nativeQuery = true) + List getdatabaseList(); + + @Query(value= "SELECT table_name FROM information_schema.tables WHERE table_schema =?1",nativeQuery = true) + List getListOftables(String table_schema); + + @Query(value= "SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE `TABLE_SCHEMA`=:'TABLE_SCHEMA' AND `TABLE_NAME`='TABLE_NAME';",nativeQuery = true) + List getallcolumnlist(@Param("TABLE_SCHEMA") Object table_schema, @Param("TABLE_NAME") Object tABLE_NAME); +} diff --git a/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/DynamicTemplateController.java b/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/DynamicTemplateController.java new file mode 100644 index 0000000..fc4c2cf --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/DynamicTemplateController.java @@ -0,0 +1,250 @@ +package com.realnet.template.controller; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.apache.poi.ss.usermodel.DataFormatter; +import org.apache.poi.ss.usermodel.Row; +import org.apache.poi.ss.usermodel.Sheet; +import org.apache.poi.ss.usermodel.Workbook; +import org.apache.poi.ss.usermodel.WorkbookFactory; +import org.json.simple.JSONObject; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; +import com.realnet.Notification.Notification.Entity.NotEntity; +import com.realnet.fileupload.helper.Fileuploadhelper; +import com.realnet.incident.entity.IncidentEntity; +import com.realnet.template.entity.Dynamic_template; +import com.realnet.template.repository.DynamicTempRepo; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; + +@RestController +@RequestMapping("/sureserve/template/dynamic") +public class DynamicTemplateController { + + @Autowired + private DynamicTempRepo tempRepo; + + @Autowired + private AppUserServiceImpl userService; + + @Autowired + private Fileuploadhelper fileuploadhelper; + + @GetMapping("/templatetojson") + public ResponseEntity saveTemplateInJson(@RequestParam MultipartFile file) throws IOException { + + BufferedReader br; + InputStream is = file.getInputStream(); + br = new BufferedReader(new InputStreamReader(is)); + + Workbook workbook = WorkbookFactory.create(is); + +// Create a DataFormatter to format and get each cell's value as String + DataFormatter dataFormatter = new DataFormatter(); + + Sheet sheet = workbook.getSheetAt(0); + + // Getting number of columns in the Sheet + int cols = sheet.getRow(0).getLastCellNum(); + int firstRowNum = sheet.getFirstRowNum(); + + List keys = new ArrayList(); + List jsonList = new ArrayList(); + + for (Row row : sheet) { + JSONObject object = new JSONObject(); + if (row.getRowNum() == 0) { + for (int i = 0; i < cols; i++) { + String value = dataFormatter.formatCellValue(row.getCell(i)); + keys.add(value); + } + + } + + if (row.getRowNum() != 0) { + + for (int i = 0; i < cols; i++) { + String key = keys.get(i); + String value = dataFormatter.formatCellValue(row.getCell(i)); + + object.put(key, value); + + jsonList.add(object); + } + + } + + } + + workbook.close(); + + return new ResponseEntity<>(jsonList, HttpStatus.BAD_REQUEST); + } + + @GetMapping("/jsonkeychange") + + public ResponseEntity changeKeysOfJson(@RequestParam String newjson, @RequestParam String body) + throws IOException { + + JsonParser parser = new JsonParser(); + JsonElement element = parser.parse(newjson); + JsonElement element2 = parser.parse(body); + JsonObject object2 = element.getAsJsonObject(); + JsonArray array = element2.getAsJsonArray(); + Iterator iterator = array.iterator(); + + List jsonList = new ArrayList(); + + Set keySet = object2.keySet(); + Iterator it = keySet.iterator(); + +// String key = it.next(); + while (iterator.hasNext()) { + + Map map = new HashMap(); + Object next = iterator.next(); + JsonElement parse = parser.parse(next.toString()); + JsonObject jsonObject = parse.getAsJsonObject(); + for (String k : keySet) { + String next2 = object2.get(k).getAsString(); + String value2 = jsonObject.get(k).getAsString(); + map.put(next2, value2); + } + + jsonList.add(map); + + } + + return new ResponseEntity<>(jsonList, HttpStatus.BAD_REQUEST); + } + + // create data with file upload + @PostMapping("/dynamic_temp") + public ResponseEntity addIssues(@RequestParam String data, @RequestParam MultipartFile file) + throws JsonMappingException, JsonProcessingException { + + AppUser user = userService.getLoggedInUser(); + String userId = user.getUsername(); + Dynamic_template dynamic_template; + + dynamic_template = new ObjectMapper().readValue(data, Dynamic_template.class); + + if (!file.isEmpty()) { +// for (MultipartFile e : attachmentFile) { + System.out.println(file.getOriginalFilename()); + + boolean f = fileuploadhelper.uploadFile(file); + + if (f) { + System.out.println("file uploaded successfully"); + dynamic_template.setFile_name(file.getOriginalFilename()); + + } + + } else { + dynamic_template.setFile_name("No file"); + + } + + dynamic_template.setUser_id(userId); + + Dynamic_template save = tempRepo.save(dynamic_template); + + if (save.getId() == 0) { + return new ResponseEntity("template Not Added", HttpStatus.BAD_REQUEST); + } else { + + return new ResponseEntity<>(save, HttpStatus.ACCEPTED); + } + } + + // get all + @GetMapping("/dynamic_temp") + public ResponseEntity getAll() { + + return new ResponseEntity<>(tempRepo.findAll(), HttpStatus.ACCEPTED); + + } + + // get by id + @GetMapping("/dynamic_temp/{id}") + public ResponseEntity getIssueById(@PathVariable Long id) { + + return new ResponseEntity<>(tempRepo.findById(id).get(), HttpStatus.ACCEPTED); + + } + + // delete by id + @DeleteMapping("/dynamic_temp/{id}") + public ResponseEntity deleteIssue(@PathVariable Long id) { + tempRepo.deleteById(id); + return new ResponseEntity("Success", HttpStatus.ACCEPTED); + + } + + // update by id + @PutMapping("/dynamic_temp/{id}") + public ResponseEntity updateIssue(@RequestParam String data, @PathVariable Long id, + @RequestParam MultipartFile file) throws Exception { + + Dynamic_template dynamic_template; + dynamic_template = new ObjectMapper().readValue(data, Dynamic_template.class); + + Dynamic_template template = tempRepo.findById(id).get(); + + if (!file.isEmpty()) { + System.out.println(file.getOriginalFilename()); + + boolean f = fileuploadhelper.uploadFile(file); + + if (f) { + System.out.println("file uploaded successfully"); + template.setFile_name(file.getOriginalFilename()); + + } + + } else { + template.setFile_name("No file"); + + } + + template.setEntity_name(dynamic_template.getEntity_name()); + template.setUser_id(dynamic_template.getUser_id()); + + Dynamic_template save = tempRepo.save(template); + return new ResponseEntity<>(save, HttpStatus.ACCEPTED); + + } + +} diff --git a/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/Dynamic_template.java b/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/Dynamic_template.java new file mode 100644 index 0000000..dfa08de --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/Dynamic_template.java @@ -0,0 +1,25 @@ +package com.realnet.template.entity; + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@Entity +@AllArgsConstructor +@NoArgsConstructor +public class Dynamic_template { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private String user_id; + private String file_name; + private String entity_name; +} diff --git a/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/ExcelDataService.java b/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/ExcelDataService.java new file mode 100644 index 0000000..4154748 --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/ExcelDataService.java @@ -0,0 +1,96 @@ +//package com.realnet.excel.service; +// +//import java.io.IOException; +//import java.util.ArrayList; +//import java.util.List; +// +//import org.apache.poi.EncryptedDocumentException; +//import org.apache.poi.ss.usermodel.Cell; +//import org.apache.poi.ss.usermodel.DataFormatter; +//import org.apache.poi.ss.usermodel.Row; +//import org.apache.poi.ss.usermodel.Sheet; +//import org.apache.poi.ss.usermodel.Workbook; +//import org.apache.poi.ss.usermodel.WorkbookFactory; +//import org.springframework.stereotype.Service; +// +//import com.realnet.excel.entity.ExcelFileUpload; +// +//@Service +//public class ExcelDataService { +// +// Workbook workbook; +// +// public List getExcelDataAsList() { +// +// List list = new ArrayList(); +// +// // Create a DataFormatter to format and get each cell's value as String +// DataFormatter dataFormatter = new DataFormatter(); +// +// // Create the Workbook +//// try { +//// workbook = WorkbookFactory.create(); +//// } catch (EncryptedDocumentException | IOException e) { +//// e.printStackTrace(); +//// } +// +// // Retrieving the number of sheets in the Workbook +// System.out.println("-------Workbook has '" + workbook.getNumberOfSheets() + "' Sheets-----"); +// +// // Getting the Sheet at index zero +// Sheet sheet = workbook.getSheetAt(0); +// +// // Getting number of columns in the Sheet +// int noOfColumns = sheet.getRow(0).getLastCellNum(); +// System.out.println("-------Sheet has '"+noOfColumns+"' columns------"); +// +// // Using for-each loop to iterate over the rows and columns +// for (Row row : sheet) { +// for (Cell cell : row) { +// String cellValue = dataFormatter.formatCellValue(cell); +// list.add(cellValue); +// } +// } +// +// // filling excel data and creating list as List +// List invList = createList(list, noOfColumns); +// +// // Closing the workbook +// try { +// workbook.close(); +// } catch (IOException e) { +// // TODO Auto-generated catch block +// e.printStackTrace(); +// } +// +// return invList; +// } +// +// private List createList(List excelData, int noOfColumns) { +// +// ArrayList invList = new ArrayList(); +// +// int i = noOfColumns; +// do { +// ExcelFileUpload inv = new ExcelFileUpload(); +// +//// inv.setName(excelData.get(i)); +//// inv.setAmount(Double.valueOf(excelData.get(i + 1))); +//// inv.setNumber(excelData.get(i + 2)); +//// inv.setReceivedDate(excelData.get(i + 3)); +// +// invList.add(inv); +// i = i + (noOfColumns); +// +// } while (i < excelData.size()); +// return invList; +// } +// +//// public int saveExcelData(List invoices) { +//// invoices = repo.saveAll(invoices); +//// return invoices.size(); +//// } +// + + +//} diff --git a/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/FileUploadService.java b/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/FileUploadService.java new file mode 100644 index 0000000..f9500fa --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/FileUploadService.java @@ -0,0 +1,79 @@ +package com.realnet.template.service; + +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.StandardCopyOption; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; +import org.springframework.util.StringUtils; +import org.springframework.web.multipart.MultipartFile; + +import com.realnet.template.entity.TemplateFileUpload; +import com.realnet.template.repository.TemplatedataRepo; + +@Service +public class FileUploadService { + + + @Autowired + private TemplatedataRepo repo; + + + + public String uploadFile(MultipartFile file,Long user_id,String file_type) { + try { + +// String + String file_name= file.getOriginalFilename(); + String substring = file_name.substring(0,file_name.lastIndexOf(".")); + + String str = substring+System.currentTimeMillis(); + String location =System.getProperty("user.dir")+"/src/main/resources"; + + + String file_name2= file.getOriginalFilename(); + + + File staticdir2 = new File(location+"/incomingfile"); + if(!staticdir2.exists()) { + staticdir2.mkdir(); + } + Path copyLocation2 = Paths + .get(staticdir2 + File.separator + StringUtils.cleanPath(file_name2)); + + Files.copy(file.getInputStream(), copyLocation2, StandardCopyOption.REPLACE_EXISTING); + + + File staticdir = new File(location+"/processingfile"); + if(!staticdir.exists()) { + staticdir.mkdir(); + } + Path copyLocation = Paths + .get(staticdir + File.separator + StringUtils.cleanPath(str+".xlsx")); + + Files.copy(file.getInputStream(), copyLocation, StandardCopyOption.REPLACE_EXISTING); + + + TemplateFileUpload exceldata= new TemplateFileUpload(); + exceldata.setFile_location(location); + + exceldata.setFile_name(file.getOriginalFilename()); + exceldata.setFile_changed_name(str); + exceldata.setFile_type(file_type); + exceldata.setUser_id(user_id); + repo.save(exceldata); + + System.out.println("-----------------------saving data----------------"); + return location; + } catch (Exception e) { + e.printStackTrace(); + throw new RuntimeException("Could not store file " + file.getOriginalFilename() + + ". Please try again!"); + } + + } +} diff --git a/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/TemplateFileUpload.java b/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/TemplateFileUpload.java new file mode 100644 index 0000000..60bc508 --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/TemplateFileUpload.java @@ -0,0 +1,27 @@ +package com.realnet.template.entity; + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@Entity +@AllArgsConstructor +@NoArgsConstructor +public class TemplateFileUpload { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + private Long user_id; + private String file_name; + private String file_changed_name; + private String file_location; + private String file_type; + private Integer status; +} diff --git a/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/TemplatedataRepo.java b/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/TemplatedataRepo.java new file mode 100644 index 0000000..190abf6 --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/TemplatedataRepo.java @@ -0,0 +1,9 @@ +package com.realnet.template.repository; + +import org.springframework.data.jpa.repository.JpaRepository; + +import com.realnet.template.entity.TemplateFileUpload; + +public interface TemplatedataRepo extends JpaRepository{ + +} diff --git a/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_Controller.java b/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_Controller.java new file mode 100644 index 0000000..b84de13 --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_Controller.java @@ -0,0 +1,1071 @@ +"//package com.realnet.excel.controller;" + "\r\n" + +"package com.realnet.template.controller;" + "\r\n" + +"" + "\r\n" + +"import java.io.BufferedReader;" + "\r\n" + +"import java.io.ByteArrayInputStream;" + "\r\n" + +"import java.io.ByteArrayOutputStream;" + "\r\n" + +"import java.io.File;" + "\r\n" + +"import java.io.IOException;" + "\r\n" + +"import java.io.InputStream;" + "\r\n" + +"import java.io.InputStreamReader;" + "\r\n" + +"import java.nio.file.Files;" + "\r\n" + +"import java.nio.file.Path;" + "\r\n" + +"import java.nio.file.Paths;" + "\r\n" + +"import java.nio.file.StandardCopyOption;" + "\r\n" + +"import java.text.ParseException;" + "\r\n" + +"import java.text.SimpleDateFormat;" + "\r\n" + +"import java.util.ArrayList;" + "\r\n" + +"import java.util.Date;" + "\r\n" + +"import java.util.List;" + "\r\n" + +"" + "\r\n" + +"import org.apache.poi.ss.usermodel.Cell;" + "\r\n" + +"import org.apache.poi.ss.usermodel.DataFormatter;" + "\r\n" + +"import org.apache.poi.ss.usermodel.Row;" + "\r\n" + +"import org.apache.poi.ss.usermodel.Sheet;" + "\r\n" + +"import org.apache.poi.ss.usermodel.Workbook;" + "\r\n" + +"import org.apache.poi.ss.usermodel.WorkbookFactory;" + "\r\n" + +"import org.apache.poi.xssf.usermodel.XSSFWorkbook;" + "\r\n" + +"import org.springframework.beans.factory.annotation.Autowired;" + "\r\n" + +"import org.springframework.core.io.InputStreamResource;" + "\r\n" + +"import org.springframework.http.HttpHeaders;" + "\r\n" + +"import org.springframework.http.HttpStatus;" + "\r\n" + +"import org.springframework.http.MediaType;" + "\r\n" + +"import org.springframework.http.ResponseEntity;" + "\r\n" + +"import org.springframework.util.StringUtils;" + "\r\n" + +"import org.springframework.web.bind.annotation.GetMapping;" + "\r\n" + +"import org.springframework.web.bind.annotation.PathVariable;" + "\r\n" + +"import org.springframework.web.bind.annotation.PostMapping;" + "\r\n" + +"import org.springframework.web.bind.annotation.RequestMapping;" + "\r\n" + +"import org.springframework.web.bind.annotation.RequestParam;" + "\r\n" + +"import org.springframework.web.bind.annotation.RestController;" + "\r\n" + +"import org.springframework.web.multipart.MultipartFile;" + "\r\n" + +"" + "\r\n" + +"import com.realnet.Sr_Contact_type.Entity.Sr_Contact_type_t;" + "\r\n" + +"import com.realnet.Sr_Contact_type.Repository.Sr_Contact_type_Repository;" + "\r\n" + +"import com.realnet.Sr_State.Entity.Sr_State_t;" + "\r\n" + +"import com.realnet.Sr_State.Repository.Sr_State_Repository;" + "\r\n" + +"import com.realnet.Sr_category2.Entity.Sr_category2_t;" + "\r\n" + +"import com.realnet.Sr_category2.Repository.Sr_category2_Repository;" + "\r\n" + +"import com.realnet.Sr_customer.Entity.Sr_customer_t;" + "\r\n" + +"import com.realnet.Sr_customer.Repository.Sr_customer_Repository;" + "\r\n" + +"import com.realnet.Sr_handler.Entity.Sr_handler_t;" + "\r\n" + +"import com.realnet.Sr_handler.Repository.Sr_handler_Repository;" + "\r\n" + +"import com.realnet.Sr_impact2.Entity.Sr_impact2_t;" + "\r\n" + +"import com.realnet.Sr_impact2.Repository.Sr_impact2_Repository;" + "\r\n" + +"import com.realnet.Sr_priority2.Entity.Sr_priority2_t;" + "\r\n" + +"import com.realnet.Sr_priority2.Repository.Sr_priority2_Repository;" + "\r\n" + +"import com.realnet.Sr_urgency.Entity.Sr_urgency_t;" + "\r\n" + +"import com.realnet.Sr_urgency.Repository.Sr_urgency_Repository;" + "\r\n" + +"import com.realnet.template.repository.TemplatedataRepo;" + "\r\n" + +"import com.realnet.template.service.FileUploadService;" + "\r\n" + +"import com.realnet.users.entity1.AppUser;" + "\r\n" + +"import com.realnet.users.service1.AppUserServiceImpl;" + "\r\n" + +"" + "\r\n" + +"@RestController" + "\r\n" + +"@RequestMapping(\"api/template\")" + "\r\n" + +"public class Controller {" + "\r\n" + +" @Autowired" + "\r\n" + +" private TemplatedataRepo temprepo;" + "\r\n" + +"" + "\r\n" + +" @Autowired" + "\r\n" + +" private Sr_priority2_Repository priorityrepo;" + "\r\n" + +"" + "\r\n" + +" @Autowired" + "\r\n" + +" private Sr_impact2_Repository impactrepo;" + "\r\n" + +"" + "\r\n" + +" @Autowired" + "\r\n" + +" private Sr_urgency_Repository urgencyrepo;" + "\r\n" + +"" + "\r\n" + +" @Autowired" + "\r\n" + +" private Sr_State_Repository staterepo;" + "\r\n" + +"" + "\r\n" + +" @Autowired" + "\r\n" + +" private Sr_Contact_type_Repository contactrepo;" + "\r\n" + +"" + "\r\n" + +" @Autowired" + "\r\n" + +" private Sr_customer_Repository customerepo;" + "\r\n" + +"" + "\r\n" + +" @Autowired" + "\r\n" + +" private Sr_category2_Repository categoryrepo;" + "\r\n" + +"" + "\r\n" + +" @Autowired" + "\r\n" + +" private Sr_handler_Repository handlerepo;" + "\r\n" + +" @Autowired" + "\r\n" + +" FileUploadService fileupload;" + "\r\n" + +" @Autowired" + "\r\n" + +" private AppUserServiceImpl userService;" + "\r\n" + +"" + "\r\n" + +" @GetMapping(\"/demo/download/{file_type}\")" + "\r\n" + +"" + "\r\n" + +" public ResponseEntity demoTemplate(@PathVariable String file_type) throws IOException {" + "\r\n" + +"" + "\r\n" + +" if (file_type.equalsIgnoreCase(\"priority\")) {" + "\r\n" + +"" + "\r\n" + +" String filename = \"Sr_priority2_t\" + \".xlsx\";" + "\r\n" + +" String[] header = { \"Priority Name\", \"Description\", \"Is Active\", \"Effective Start Date\"," + "\r\n" + +" \"Effective End date\" };" + "\r\n" + +" ByteArrayInputStream in = demoTemplate(header, file_type);" + "\r\n" + +" InputStreamResource file = new InputStreamResource(in);" + "\r\n" + +" return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, \"attachment; filename=\" + filename)" + "\r\n" + +" .contentType(MediaType.parseMediaType(\"application/vnd.ms-excel\")).body(file);" + "\r\n" + +"" + "\r\n" + +" } else if (file_type.equalsIgnoreCase(\"impact\")) {" + "\r\n" + +"" + "\r\n" + +" String filename = \"Sr_impact2_t\" + \".xlsx\";" + "\r\n" + +" String[] header = { \"Impact Name\", \"Description\", \"Is Active\", \"Effective Start Date\"," + "\r\n" + +" \"Effective End date\" };" + "\r\n" + +" ByteArrayInputStream in = demoTemplate(header, file_type);" + "\r\n" + +" InputStreamResource file = new InputStreamResource(in);" + "\r\n" + +" return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, \"attachment; filename=\" + filename)" + "\r\n" + +" .contentType(MediaType.parseMediaType(\"application/vnd.ms-excel\")).body(file);" + "\r\n" + +"" + "\r\n" + +" } else if (file_type.equalsIgnoreCase(\"urgency\")) {" + "\r\n" + +"" + "\r\n" + +" String filename = \"Sr_urgency_t\" + \".xlsx\";" + "\r\n" + +" String[] header = { \"Urgency Name\", \"Description\", \"Is Active\", \"Effective Start Date\"," + "\r\n" + +" \"Effective End date\" };" + "\r\n" + +" ByteArrayInputStream in = demoTemplate(header, file_type);" + "\r\n" + +" InputStreamResource file = new InputStreamResource(in);" + "\r\n" + +" return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, \"attachment; filename=\" + filename)" + "\r\n" + +" .contentType(MediaType.parseMediaType(\"application/vnd.ms-excel\")).body(file);" + "\r\n" + +"" + "\r\n" + +" } else if (file_type.equalsIgnoreCase(\"category\")) {" + "\r\n" + +"" + "\r\n" + +" String filename = \"Sr_category2_t\" + \".xlsx\";" + "\r\n" + +" String[] header = { \"Category Name\", \"Customer Id\", \"Is Active\", \"Effective Start Date\"," + "\r\n" + +" \"Effective End date\" };" + "\r\n" + +" ByteArrayInputStream in = demoTemplate(header, file_type);" + "\r\n" + +" InputStreamResource file = new InputStreamResource(in);" + "\r\n" + +" return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, \"attachment; filename=\" + filename)" + "\r\n" + +" .contentType(MediaType.parseMediaType(\"application/vnd.ms-excel\")).body(file);" + "\r\n" + +"" + "\r\n" + +" } else if (file_type.equalsIgnoreCase(\"state\")) {" + "\r\n" + +"" + "\r\n" + +" String filename = \"Sr_State_t\" + \".xlsx\";" + "\r\n" + +" String[] header = { \"State Name\", \"Description\", \"Is Active\", \"Effective Start Date\"," + "\r\n" + +" \"Effective End date\" };" + "\r\n" + +" ByteArrayInputStream in = demoTemplate(header, file_type);" + "\r\n" + +" InputStreamResource file = new InputStreamResource(in);" + "\r\n" + +" return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, \"attachment; filename=\" + filename)" + "\r\n" + +" .contentType(MediaType.parseMediaType(\"application/vnd.ms-excel\")).body(file);" + "\r\n" + +"" + "\r\n" + +" } else if (file_type.equalsIgnoreCase(\"contact_type\")) {" + "\r\n" + +"" + "\r\n" + +" String filename = \"Sr_Contact_type_t\" + \".xlsx\";" + "\r\n" + +" String[] header = { \"Contact Type Name\", \"Description\", \"Is Active\", \"Effective Start Date\"," + "\r\n" + +" \"Effective End date\" };" + "\r\n" + +" ByteArrayInputStream in = demoTemplate(header, file_type);" + "\r\n" + +" InputStreamResource file = new InputStreamResource(in);" + "\r\n" + +" return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, \"attachment; filename=\" + filename)" + "\r\n" + +" .contentType(MediaType.parseMediaType(\"application/vnd.ms-excel\")).body(file);" + "\r\n" + +"" + "\r\n" + +" } else if (file_type.equalsIgnoreCase(\"customer\")) {" + "\r\n" + +"" + "\r\n" + +" String filename = \"Sr_customer_t\" + \".xlsx\";" + "\r\n" + +" String[] header = { \"Customer Name\", \"Description\", \"Is Active\", \"Effective Start Date\"," + "\r\n" + +" \"Effective End date\" };" + "\r\n" + +" ByteArrayInputStream in = demoTemplate(header, file_type);" + "\r\n" + +" InputStreamResource file = new InputStreamResource(in);" + "\r\n" + +" return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, \"attachment; filename=\" + filename)" + "\r\n" + +" .contentType(MediaType.parseMediaType(\"application/vnd.ms-excel\")).body(file);" + "\r\n" + +"" + "\r\n" + +" } else if (file_type.equalsIgnoreCase(\"handler\")) {" + "\r\n" + +"" + "\r\n" + +" String filename = \"Sr_handler_t\" + \".xlsx\";" + "\r\n" + +" String[] header = { \"User Id\", \"Role Id\", \"Is Active\", \"Effective Start Date\", \"Effective End date\" };" + "\r\n" + +" ByteArrayInputStream in = demoTemplate(header, file_type);" + "\r\n" + +" InputStreamResource file = new InputStreamResource(in);" + "\r\n" + +" return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, \"attachment; filename=\" + filename)" + "\r\n" + +" .contentType(MediaType.parseMediaType(\"application/vnd.ms-excel\")).body(file);" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" return new ResponseEntity(\"Not Found\", HttpStatus.BAD_REQUEST);" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" public static ByteArrayInputStream demoTemplate(String[] HEADERs, String file_type) throws IOException {" + "\r\n" + +" String SHEET = file_type;" + "\r\n" + +" Workbook workbook = new XSSFWorkbook();" + "\r\n" + +" ByteArrayOutputStream out = new ByteArrayOutputStream();" + "\r\n" + +" Sheet sheet = workbook.createSheet(SHEET);" + "\r\n" + +" Row headerRow = sheet.createRow(0);" + "\r\n" + +" for (int col = 0; col < HEADERs.length; col++) {" + "\r\n" + +" Cell cell = headerRow.createCell(col);" + "\r\n" + +" cell.setCellValue(HEADERs[col]);" + "\r\n" + +" }" + "\r\n" + +" workbook.write(out);" + "\r\n" + +" return new ByteArrayInputStream(out.toByteArray());" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" @PostMapping(\"/save/{filetype}\")" + "\r\n" + +" public ResponseEntity uploadFile(@RequestParam MultipartFile file, @PathVariable String filetype)" + "\r\n" + +" throws IOException, ParseException {" + "\r\n" + +" BufferedReader br;" + "\r\n" + +" InputStream is = file.getInputStream();" + "\r\n" + +" br = new BufferedReader(new InputStreamReader(is));" + "\r\n" + +" String file_name = file.getOriginalFilename();" + "\r\n" + +" AppUser loggedInUser = userService.getLoggedInUser();" + "\r\n" + +"" + "\r\n" + +" if (filetype.equalsIgnoreCase(\"priority\")) {" + "\r\n" + +"" + "\r\n" + +" if (file_name.contains(\"Sr_priority2_t\")) {" + "\r\n" + +"" + "\r\n" + +" String[] header = { \"Priority Name\", \"Description\", \"Is Active\", \"Effective Start Date\"," + "\r\n" + +" \"Effective End date\" };" + "\r\n" + +" ArrayList prioritylist = new ArrayList();" + "\r\n" + +"" + "\r\n" + +" Workbook workbook = WorkbookFactory.create(is);" + "\r\n" + +"" + "\r\n" + +"// Create a DataFormatter to format and get each cell's value as String" + "\r\n" + +" DataFormatter dataFormatter = new DataFormatter();" + "\r\n" + +"" + "\r\n" + +" Sheet sheet = workbook.getSheetAt(0);" + "\r\n" + +"" + "\r\n" + +" // Getting number of columns in the Sheet" + "\r\n" + +" int cols = sheet.getRow(0).getLastCellNum();" + "\r\n" + +"" + "\r\n" + +" fileupload.uploadFile(file, loggedInUser.getUserId(), filetype);" + "\r\n" + +"" + "\r\n" + +" for (Row row : sheet) {" + "\r\n" + +"" + "\r\n" + +" if (row.getRowNum() == 0) {" + "\r\n" + +" for (int i = 0; i < cols; i++) {" + "\r\n" + +" String value = dataFormatter.formatCellValue(row.getCell(i));" + "\r\n" + +"" + "\r\n" + +" if (!header[i].equalsIgnoreCase(value)) {" + "\r\n" + +"" + "\r\n" + +" return new ResponseEntity<>(" + "\r\n" + +" \"priority file Should have \\\"\" + header + \" \\\"in the header in excel file\"," + "\r\n" + +" HttpStatus.BAD_REQUEST);" + "\r\n" + +" }" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" if (row.getRowNum() != 0) {" + "\r\n" + +" Date date = row.getCell(3).getDateCellValue();" + "\r\n" + +" Date date2 = row.getCell(4).getDateCellValue();" + "\r\n" + +"" + "\r\n" + +" Sr_priority2_t priority = new Sr_priority2_t();" + "\r\n" + +" priority.setPriority_name(dataFormatter.formatCellValue(row.getCell(0)));" + "\r\n" + +" priority.setDescription(dataFormatter.formatCellValue(row.getCell(1)));" + "\r\n" + +" priority.setActive(Boolean.valueOf(dataFormatter.formatCellValue(row.getCell(2))));" + "\r\n" + +"" + "\r\n" + +" priority.setEffective_start_date(date);" + "\r\n" + +" priority.setEffective_end_date(date2);" + "\r\n" + +"" + "\r\n" + +" prioritylist.add(priority);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +" priorityrepo.saveAll(prioritylist);" + "\r\n" + +" workbook.close();" + "\r\n" + +"" + "\r\n" + +"// " + "\r\n" + +"" + "\r\n" + +" return new ResponseEntity<>(\"File Uploaded\", HttpStatus.ACCEPTED);" + "\r\n" + +" }" + "\r\n" + +" return new ResponseEntity<>(\"File name should contain Sr_priority2_t\", HttpStatus.BAD_REQUEST);" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" else if (filetype.contains(\"impact\")) {" + "\r\n" + +"" + "\r\n" + +" if (file_name.contains(\"Sr_impact2_t\")) {" + "\r\n" + +"" + "\r\n" + +" String[] header = { \"Impact Name\", \"Description\", \"Is Active\", \"Effective Start Date\"," + "\r\n" + +" \"Effective End date\" };" + "\r\n" + +"" + "\r\n" + +" ArrayList impactlist = new ArrayList();" + "\r\n" + +"" + "\r\n" + +" Workbook workbook = WorkbookFactory.create(is);" + "\r\n" + +"" + "\r\n" + +"// Create a DataFormatter to format and get each cell's value as String" + "\r\n" + +" DataFormatter dataFormatter = new DataFormatter();" + "\r\n" + +"" + "\r\n" + +" Sheet sheet = workbook.getSheetAt(0);" + "\r\n" + +"" + "\r\n" + +" // Getting number of columns in the Sheet" + "\r\n" + +" int cols = sheet.getRow(0).getLastCellNum();" + "\r\n" + +"" + "\r\n" + +" fileupload.uploadFile(file, loggedInUser.getUserId(), filetype);" + "\r\n" + +"" + "\r\n" + +" for (Row row : sheet) {" + "\r\n" + +"" + "\r\n" + +" if (row.getRowNum() == 0) {" + "\r\n" + +" for (int i = 0; i < cols; i++) {" + "\r\n" + +" String value = dataFormatter.formatCellValue(row.getCell(i));" + "\r\n" + +"" + "\r\n" + +" if (!header[i].equalsIgnoreCase(value)) {" + "\r\n" + +"" + "\r\n" + +" return new ResponseEntity<>(\"priority file header is not in correct format \"," + "\r\n" + +" HttpStatus.BAD_REQUEST);" + "\r\n" + +" }" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" if (row.getRowNum() != 0) {" + "\r\n" + +"" + "\r\n" + +" Date date = row.getCell(3).getDateCellValue();" + "\r\n" + +" Date date2 = row.getCell(4).getDateCellValue();" + "\r\n" + +"" + "\r\n" + +" Sr_impact2_t impact = new Sr_impact2_t();" + "\r\n" + +" impact.setImpact_name(dataFormatter.formatCellValue(row.getCell(0)));" + "\r\n" + +" impact.setDescription(dataFormatter.formatCellValue(row.getCell(1)));" + "\r\n" + +" impact.setIsActive(Boolean.valueOf(dataFormatter.formatCellValue(row.getCell(2))));" + "\r\n" + +"" + "\r\n" + +" impact.setEffective_start_date(date);" + "\r\n" + +" impact.setEffective_end_date(date2);" + "\r\n" + +"" + "\r\n" + +" impactlist.add(impact);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +" impactrepo.saveAll(impactlist);" + "\r\n" + +" System.out.println(impactlist);" + "\r\n" + +"" + "\r\n" + +" workbook.close();" + "\r\n" + +"" + "\r\n" + +" return new ResponseEntity<>(\"File Uploaded\", HttpStatus.ACCEPTED);" + "\r\n" + +" }" + "\r\n" + +" return new ResponseEntity<>(\"File name should contain Sr_impact2_t\", HttpStatus.BAD_REQUEST);" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" else if (filetype.contains(\"urgency\")) {" + "\r\n" + +"" + "\r\n" + +" if (file_name.contains(\"Sr_urgency_t\")) {" + "\r\n" + +"" + "\r\n" + +" String[] header = { \"Urgency Name\", \"Description\", \"Is Active\", \"Effective Start Date\"," + "\r\n" + +" \"Effective End date\" };" + "\r\n" + +" List li = new ArrayList();" + "\r\n" + +" li.add(\"Impact Name\");" + "\r\n" + +" li.add(\"Description\");" + "\r\n" + +" li.add(\"Is Active\");" + "\r\n" + +" li.add(\"Effective Start Date\");" + "\r\n" + +" li.add(\"Effective End date\");" + "\r\n" + +"" + "\r\n" + +" ArrayList impactlist = new ArrayList();" + "\r\n" + +"" + "\r\n" + +" Workbook workbook = WorkbookFactory.create(is);" + "\r\n" + +"" + "\r\n" + +"// Create a DataFormatter to format and get each cell's value as String" + "\r\n" + +" DataFormatter dataFormatter = new DataFormatter();" + "\r\n" + +"" + "\r\n" + +" Sheet sheet = workbook.getSheetAt(0);" + "\r\n" + +"" + "\r\n" + +" // Getting number of columns in the Sheet" + "\r\n" + +" int cols = sheet.getRow(0).getLastCellNum();" + "\r\n" + +"" + "\r\n" + +" fileupload.uploadFile(file, loggedInUser.getUserId(), filetype);" + "\r\n" + +"" + "\r\n" + +" for (Row row : sheet) {" + "\r\n" + +"" + "\r\n" + +" if (row.getRowNum() == 0) {" + "\r\n" + +" for (int i = 0; i < cols; i++) {" + "\r\n" + +" String value = dataFormatter.formatCellValue(row.getCell(i));" + "\r\n" + +"" + "\r\n" + +" if (!header[i].equalsIgnoreCase(value)) {" + "\r\n" + +"" + "\r\n" + +" return new ResponseEntity<>(" + "\r\n" + +" \"priority file Should have \\\"\" + li + \" \\\"in the header in excel file\"," + "\r\n" + +" HttpStatus.BAD_REQUEST);" + "\r\n" + +" }" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" if (row.getRowNum() != 0) {" + "\r\n" + +" Date date = row.getCell(3).getDateCellValue();" + "\r\n" + +" Date date2 = row.getCell(4).getDateCellValue();" + "\r\n" + +"" + "\r\n" + +" Sr_urgency_t urgency = new Sr_urgency_t();" + "\r\n" + +" urgency.setUrgency_name(dataFormatter.formatCellValue(row.getCell(0)));" + "\r\n" + +" urgency.setDescription(dataFormatter.formatCellValue(row.getCell(1)));" + "\r\n" + +" urgency.setIsActive(Boolean.valueOf(dataFormatter.formatCellValue(row.getCell(2))));" + "\r\n" + +"" + "\r\n" + +" urgency.setEffective_start_date(date);" + "\r\n" + +" urgency.setEffective_end_date(date2);" + "\r\n" + +"" + "\r\n" + +" impactlist.add(urgency);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +" urgencyrepo.saveAll(impactlist);" + "\r\n" + +" System.out.println(impactlist);" + "\r\n" + +"" + "\r\n" + +" workbook.close();" + "\r\n" + +"" + "\r\n" + +" return new ResponseEntity<>(\"File Uploaded\", HttpStatus.ACCEPTED);" + "\r\n" + +" }" + "\r\n" + +" return new ResponseEntity<>(\"File name should contain sr_incident_t\", HttpStatus.BAD_REQUEST);" + "\r\n" + +"" + "\r\n" + +" } else if (filetype.equalsIgnoreCase(\"category\")) {" + "\r\n" + +"" + "\r\n" + +" String[] header = { \"Category Name\", \"Customer Id\", \"Is Active\", \"Effective Start Date\"," + "\r\n" + +" \"Effective End date\" };" + "\r\n" + +"" + "\r\n" + +"// if (file_name.contains(\"Sr_impact2_t\")) {" + "\r\n" + +"//" + "\r\n" + +"// ArrayList impactlist = new ArrayList();" + "\r\n" + +"//" + "\r\n" + +"// Workbook workbook = WorkbookFactory.create(is);" + "\r\n" + +"//" + "\r\n" + +"//// Create a DataFormatter to format and get each cell's value as String" + "\r\n" + +"// DataFormatter dataFormatter = new DataFormatter();" + "\r\n" + +"//" + "\r\n" + +"// Sheet sheet = workbook.getSheetAt(0);" + "\r\n" + +"//" + "\r\n" + +"// // Getting number of columns in the Sheet" + "\r\n" + +"// int cols = sheet.getRow(0).getLastCellNum();" + "\r\n" + +"//" + "\r\n" + +"// fileupload.uploadFile(file, loggedInUser.getUserId(), filetype);" + "\r\n" + +"//" + "\r\n" + +"// for (Row row : sheet) {" + "\r\n" + +"//" + "\r\n" + +"// if (row.getRowNum() == 0) {" + "\r\n" + +"// for (int i = 0; i < cols; i++) {" + "\r\n" + +"// String value = dataFormatter.formatCellValue(row.getCell(i));" + "\r\n" + +"//" + "\r\n" + +"// if (!header[i].equalsIgnoreCase(value)) {" + "\r\n" + +"//" + "\r\n" + +"// return new ResponseEntity<>(\"priority file header is not in correct format \"," + "\r\n" + +"// HttpStatus.BAD_REQUEST);" + "\r\n" + +"// }" + "\r\n" + +"// }" + "\r\n" + +"//" + "\r\n" + +"// }" + "\r\n" + +"//" + "\r\n" + +"// if (row.getRowNum() != 0) {" + "\r\n" + +"// String value = dataFormatter.formatCellValue(row.getCell(4));" + "\r\n" + +"// String value2 = dataFormatter.formatCellValue(row.getCell(5));" + "\r\n" + +"// Date date = new SimpleDateFormat(\"dd-MM-yyyy\").parse(value);" + "\r\n" + +"// Date date2 = new SimpleDateFormat(\"dd-MM-yyyy\").parse(value2);" + "\r\n" + +"//" + "\r\n" + +"// Sr_impact2_t impact = new Sr_impact2_t();" + "\r\n" + +"// impact.setImpact_name(file_name);" + "\r\n" + +"// impact.setDescription(dataFormatter.formatCellValue(row.getCell(2)));" + "\r\n" + +"// impact.setIsActive(Boolean.valueOf(dataFormatter.formatCellValue(row.getCell(3))));" + "\r\n" + +"//" + "\r\n" + +"//// priority.setEffective_start_date(date);" + "\r\n" + +"//// priority.setEffective_end_date(date2);" + "\r\n" + +"//" + "\r\n" + +"// impactlist.add(impact);" + "\r\n" + +"// }" + "\r\n" + +"//" + "\r\n" + +"// }" + "\r\n" + +"// impactrepo.saveAll(impactlist);" + "\r\n" + +"// System.out.println(impactlist);" + "\r\n" + +"//" + "\r\n" + +"// workbook.close();" + "\r\n" + +"//" + "\r\n" + +"// }" + "\r\n" + +"" + "\r\n" + +" } else if (filetype.equalsIgnoreCase(\"state\")) {" + "\r\n" + +"" + "\r\n" + +" String[] header = { \"State Name\", \"Description\", \"Is Active\", \"Effective Start Date\"," + "\r\n" + +" \"Effective End date\" };" + "\r\n" + +"" + "\r\n" + +" if (file_name.contains(\"Sr_State_t\")) {" + "\r\n" + +"" + "\r\n" + +" ArrayList statelist = new ArrayList();" + "\r\n" + +"" + "\r\n" + +" Workbook workbook = WorkbookFactory.create(is);" + "\r\n" + +"" + "\r\n" + +"// Create a DataFormatter to format and get each cell's value as String" + "\r\n" + +" DataFormatter dataFormatter = new DataFormatter();" + "\r\n" + +"" + "\r\n" + +" Sheet sheet = workbook.getSheetAt(0);" + "\r\n" + +"" + "\r\n" + +" // Getting number of columns in the Sheet" + "\r\n" + +" int cols = sheet.getRow(0).getLastCellNum();" + "\r\n" + +"" + "\r\n" + +" fileupload.uploadFile(file, loggedInUser.getUserId(), filetype);" + "\r\n" + +"" + "\r\n" + +" for (Row row : sheet) {" + "\r\n" + +"" + "\r\n" + +" if (row.getRowNum() == 0) {" + "\r\n" + +" for (int i = 0; i < cols; i++) {" + "\r\n" + +" String value = dataFormatter.formatCellValue(row.getCell(i));" + "\r\n" + +"" + "\r\n" + +" if (!header[i].equalsIgnoreCase(value)) {" + "\r\n" + +"" + "\r\n" + +" return new ResponseEntity<>(\"priority file header is not in correct format \"," + "\r\n" + +" HttpStatus.BAD_REQUEST);" + "\r\n" + +" }" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" if (row.getRowNum() != 0) {" + "\r\n" + +" String value = dataFormatter.formatCellValue(row.getCell(3));" + "\r\n" + +" String value2 = dataFormatter.formatCellValue(row.getCell(4));" + "\r\n" + +"" + "\r\n" + +" Sr_State_t state = new Sr_State_t();" + "\r\n" + +" state.setState_name(dataFormatter.formatCellValue(row.getCell(0)));" + "\r\n" + +" state.setDescription(dataFormatter.formatCellValue(row.getCell(1)));" + "\r\n" + +" state.setIsActive(Boolean.valueOf(dataFormatter.formatCellValue(row.getCell(2))));" + "\r\n" + +"" + "\r\n" + +" state.setEffective_end_date(value2);" + "\r\n" + +" state.setEffective_start_date(value);" + "\r\n" + +"" + "\r\n" + +" statelist.add(state);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +" staterepo.saveAll(statelist);" + "\r\n" + +"" + "\r\n" + +" workbook.close();" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" } else if (filetype.equalsIgnoreCase(\"contact_type\")) {" + "\r\n" + +"" + "\r\n" + +" String[] header = { \"Contact Type Name\", \"Description\", \"Is Active\", \"Effective Start Date\"," + "\r\n" + +" \"Effective End date\" };" + "\r\n" + +"" + "\r\n" + +" if (file_name.contains(\"Sr_Contact_type_t\")) {" + "\r\n" + +"" + "\r\n" + +" ArrayList statelist = new ArrayList();" + "\r\n" + +"" + "\r\n" + +" Workbook workbook = WorkbookFactory.create(is);" + "\r\n" + +"" + "\r\n" + +"// Create a DataFormatter to format and get each cell's value as String" + "\r\n" + +" DataFormatter dataFormatter = new DataFormatter();" + "\r\n" + +"" + "\r\n" + +" Sheet sheet = workbook.getSheetAt(0);" + "\r\n" + +"" + "\r\n" + +" // Getting number of columns in the Sheet" + "\r\n" + +" int cols = sheet.getRow(0).getLastCellNum();" + "\r\n" + +"" + "\r\n" + +" fileupload.uploadFile(file, loggedInUser.getUserId(), filetype);" + "\r\n" + +"" + "\r\n" + +" for (Row row : sheet) {" + "\r\n" + +"" + "\r\n" + +" if (row.getRowNum() == 0) {" + "\r\n" + +" for (int i = 0; i < cols; i++) {" + "\r\n" + +" String value = dataFormatter.formatCellValue(row.getCell(i));" + "\r\n" + +"" + "\r\n" + +" if (!header[i].equalsIgnoreCase(value)) {" + "\r\n" + +"" + "\r\n" + +" return new ResponseEntity<>(\"priority file header is not in correct format \"," + "\r\n" + +" HttpStatus.BAD_REQUEST);" + "\r\n" + +" }" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" if (row.getRowNum() != 0) {" + "\r\n" + +" Date date = row.getCell(3).getDateCellValue();" + "\r\n" + +" Date date2 = row.getCell(4).getDateCellValue();" + "\r\n" + +"" + "\r\n" + +" Sr_Contact_type_t contact = new Sr_Contact_type_t();" + "\r\n" + +" contact.setCon_type_name(dataFormatter.formatCellValue(row.getCell(0)));" + "\r\n" + +" contact.setDescription(dataFormatter.formatCellValue(row.getCell(1)));" + "\r\n" + +" contact.setIsActive(Boolean.valueOf(dataFormatter.formatCellValue(row.getCell(2))));" + "\r\n" + +"" + "\r\n" + +" contact.setEffective_start_date(date);" + "\r\n" + +" contact.setEffective_end_date(date2);" + "\r\n" + +"" + "\r\n" + +" statelist.add(contact);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +" contactrepo.saveAll(statelist);" + "\r\n" + +"" + "\r\n" + +" workbook.close();" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" } else if (filetype.equalsIgnoreCase(\"customer\")) {" + "\r\n" + +"" + "\r\n" + +" String[] header = { \"Customer Name\", \"Description\", \"Is Active\", \"Effective Start Date\"," + "\r\n" + +" \"Effective End date\" };" + "\r\n" + +"" + "\r\n" + +" if (file_name.contains(\"Sr_customer_t\")) {" + "\r\n" + +"" + "\r\n" + +" ArrayList customerlist = new ArrayList();" + "\r\n" + +"" + "\r\n" + +" Workbook workbook = WorkbookFactory.create(is);" + "\r\n" + +"" + "\r\n" + +"// Create a DataFormatter to format and get each cell's value as String" + "\r\n" + +" DataFormatter dataFormatter = new DataFormatter();" + "\r\n" + +"" + "\r\n" + +" Sheet sheet = workbook.getSheetAt(0);" + "\r\n" + +"" + "\r\n" + +" // Getting number of columns in the Sheet" + "\r\n" + +" int cols = sheet.getRow(0).getLastCellNum();" + "\r\n" + +"" + "\r\n" + +" fileupload.uploadFile(file, loggedInUser.getUserId(), filetype);" + "\r\n" + +"" + "\r\n" + +" for (Row row : sheet) {" + "\r\n" + +"" + "\r\n" + +" if (row.getRowNum() == 0) {" + "\r\n" + +" for (int i = 0; i < cols; i++) {" + "\r\n" + +" String value = dataFormatter.formatCellValue(row.getCell(i));" + "\r\n" + +"" + "\r\n" + +" if (!header[i].equalsIgnoreCase(value)) {" + "\r\n" + +"" + "\r\n" + +" return new ResponseEntity<>(\"priority file header is not in correct format \"," + "\r\n" + +" HttpStatus.BAD_REQUEST);" + "\r\n" + +" }" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" if (row.getRowNum() != 0) {" + "\r\n" + +" Date date = row.getCell(3).getDateCellValue();" + "\r\n" + +" Date date2 = row.getCell(4).getDateCellValue();" + "\r\n" + +"" + "\r\n" + +" Sr_customer_t customer = new Sr_customer_t();" + "\r\n" + +" customer.setCustomer_name(dataFormatter.formatCellValue(row.getCell(0)));" + "\r\n" + +" customer.setDescription(dataFormatter.formatCellValue(row.getCell(1)));" + "\r\n" + +" customer.setIsActive(Boolean.valueOf(dataFormatter.formatCellValue(row.getCell(2))));" + "\r\n" + +"" + "\r\n" + +" customer.setEffective_start_date(date);" + "\r\n" + +" customer.setEffective_end_date(date2);" + "\r\n" + +"" + "\r\n" + +" customerlist.add(customer);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +" customerepo.saveAll(customerlist);" + "\r\n" + +"" + "\r\n" + +" workbook.close();" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" } else if (filetype.equalsIgnoreCase(\"handler\")) {" + "\r\n" + +"" + "\r\n" + +" String[] header = { \"User Id\", \"Role Id\", \"Is Active\", \"Effective Start Date\", \"Effective End date\" };" + "\r\n" + +"" + "\r\n" + +"// if (file_name.contains(\"Sr_State_t\")) {" + "\r\n" + +"//" + "\r\n" + +"// ArrayList statelist = new ArrayList();" + "\r\n" + +"//" + "\r\n" + +"// Workbook workbook = WorkbookFactory.create(is);" + "\r\n" + +"//" + "\r\n" + +"//// Create a DataFormatter to format and get each cell's value as String" + "\r\n" + +"// DataFormatter dataFormatter = new DataFormatter();" + "\r\n" + +"//" + "\r\n" + +"// Sheet sheet = workbook.getSheetAt(0);" + "\r\n" + +"//" + "\r\n" + +"// // Getting number of columns in the Sheet" + "\r\n" + +"// int cols = sheet.getRow(0).getLastCellNum();" + "\r\n" + +"//" + "\r\n" + +"// fileupload.uploadFile(file, loggedInUser.getUserId(), filetype);" + "\r\n" + +"//" + "\r\n" + +"// for (Row row : sheet) {" + "\r\n" + +"//" + "\r\n" + +"// if (row.getRowNum() == 0) {" + "\r\n" + +"// for (int i = 0; i < cols; i++) {" + "\r\n" + +"// String value = dataFormatter.formatCellValue(row.getCell(i));" + "\r\n" + +"//" + "\r\n" + +"// if (!header[i].equalsIgnoreCase(value)) {" + "\r\n" + +"//" + "\r\n" + +"// return new ResponseEntity<>(\"priority file header is not in correct format \"," + "\r\n" + +"// HttpStatus.BAD_REQUEST);" + "\r\n" + +"// }" + "\r\n" + +"// }" + "\r\n" + +"//" + "\r\n" + +"// }" + "\r\n" + +"//" + "\r\n" + +"// if (row.getRowNum() != 0) {" + "\r\n" + +"// Date date = row.getCell(3).getDateCellValue();" + "\r\n" + +"// Date date2 = row.getCell(4).getDateCellValue();" + "\r\n" + +"//" + "\r\n" + +"// Sr_State_t state = new Sr_State_t();" + "\r\n" + +"// state.setState_name(dataFormatter.formatCellValue(row.getCell(1)));" + "\r\n" + +"// state.setDescription(dataFormatter.formatCellValue(row.getCell(2)));" + "\r\n" + +"// state.setIsActive(Boolean.valueOf(dataFormatter.formatCellValue(row.getCell(3))));" + "\r\n" + +"//" + "\r\n" + +"//// priority.setEffective_start_date(date);" + "\r\n" + +"//// priority.setEffective_end_date(date2);" + "\r\n" + +"//" + "\r\n" + +"// statelist.add(state);" + "\r\n" + +"// }" + "\r\n" + +"//" + "\r\n" + +"// }" + "\r\n" + +"// staterepo.saveAll(statelist);" + "\r\n" + +"//" + "\r\n" + +"// workbook.close();" + "\r\n" + +"//" + "\r\n" + +"// }" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" return new ResponseEntity<>(\"Something Went Wrong please try again....!!!!! \", HttpStatus.BAD_REQUEST);" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +"// Download template data in excel Files" + "\r\n" + +"" + "\r\n" + +" @GetMapping(\"/download/{file_type}\")" + "\r\n" + +"" + "\r\n" + +" public ResponseEntity getFile(@PathVariable String file_type) throws IOException {" + "\r\n" + +"" + "\r\n" + +" if (file_type.equalsIgnoreCase(\"priority\")) {" + "\r\n" + +"" + "\r\n" + +" String filename = \"Sr_priority2_t\" + \".xlsx\";" + "\r\n" + +" String[] header = { \"Priority Name\", \"Description\", \"Is Active\", \"Effective Start Date\"," + "\r\n" + +" \"Effective End date\" };" + "\r\n" + +" List findAll = priorityrepo.findAll();" + "\r\n" + +" ByteArrayInputStream in = templateByte(findAll, header);" + "\r\n" + +" InputStreamResource file = new InputStreamResource(in);" + "\r\n" + +" return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, \"attachment; filename=\" + filename)" + "\r\n" + +" .contentType(MediaType.parseMediaType(\"application/vnd.ms-excel\")).body(file);" + "\r\n" + +"" + "\r\n" + +" } else if (file_type.equalsIgnoreCase(\"impact\")) {" + "\r\n" + +"" + "\r\n" + +" String filename = \"Sr_impact2_t\" + \".xlsx\";" + "\r\n" + +" String[] header = { \"Impact Name\", \"Description\", \"Is Active\", \"Effective Start Date\"," + "\r\n" + +" \"Effective End date\" };" + "\r\n" + +" List findAll = impactrepo.findAll();" + "\r\n" + +" ByteArrayInputStream in = templateByte3(findAll, header);" + "\r\n" + +" InputStreamResource file = new InputStreamResource(in);" + "\r\n" + +" return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, \"attachment; filename=\" + filename)" + "\r\n" + +" .contentType(MediaType.parseMediaType(\"application/vnd.ms-excel\")).body(file);" + "\r\n" + +"" + "\r\n" + +" } else if (file_type.equalsIgnoreCase(\"urgency\")) {" + "\r\n" + +"" + "\r\n" + +" String filename = \"Sr_urgency_t\" + \".xlsx\";" + "\r\n" + +" String[] header = { \"Urgency Name\", \"Description\", \"Is Active\", \"Effective Start Date\"," + "\r\n" + +" \"Effective End date\" };" + "\r\n" + +" List findAll = urgencyrepo.findAll();" + "\r\n" + +" ByteArrayInputStream in = templateByte2(findAll, header);" + "\r\n" + +" InputStreamResource file = new InputStreamResource(in);" + "\r\n" + +" return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, \"attachment; filename=\" + filename)" + "\r\n" + +" .contentType(MediaType.parseMediaType(\"application/vnd.ms-excel\")).body(file);" + "\r\n" + +"" + "\r\n" + +" } else if (file_type.equalsIgnoreCase(\"category\")) {" + "\r\n" + +"" + "\r\n" + +" String filename = \"Sr_category2_t\" + \".xlsx\";" + "\r\n" + +" String[] header = { \"Category Name\", \"Customer Id\", \"Is Active\", \"Effective Start Date\"," + "\r\n" + +" \"Effective End date\" };" + "\r\n" + +" List findAll = categoryrepo.findAll();" + "\r\n" + +" ByteArrayInputStream in = templateByte4(findAll, header);" + "\r\n" + +" InputStreamResource file = new InputStreamResource(in);" + "\r\n" + +" return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, \"attachment; filename=\" + filename)" + "\r\n" + +" .contentType(MediaType.parseMediaType(\"application/vnd.ms-excel\")).body(file);" + "\r\n" + +"" + "\r\n" + +" } else if (file_type.equalsIgnoreCase(\"state\")) {" + "\r\n" + +"" + "\r\n" + +" String filename = \"Sr_State_t\" + \".xlsx\";" + "\r\n" + +" String[] header = { \"State Name\", \"Description\", \"Is Active\", \"Effective Start Date\"," + "\r\n" + +" \"Effective End date\" };" + "\r\n" + +" List findAll = staterepo.findAll();" + "\r\n" + +" ByteArrayInputStream in = templateByte6(findAll, header);" + "\r\n" + +" InputStreamResource file = new InputStreamResource(in);" + "\r\n" + +" return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, \"attachment; filename=\" + filename)" + "\r\n" + +" .contentType(MediaType.parseMediaType(\"application/vnd.ms-excel\")).body(file);" + "\r\n" + +"" + "\r\n" + +" } else if (file_type.equalsIgnoreCase(\"contact_type\")) {" + "\r\n" + +"" + "\r\n" + +" String filename = \"Sr_Contact_type_t\" + \".xlsx\";" + "\r\n" + +" String[] header = { \"Contact Type Name\", \"Description\", \"Is Active\", \"Effective Start Date\"," + "\r\n" + +" \"Effective End date\" };" + "\r\n" + +" List findAll = contactrepo.findAll();" + "\r\n" + +" ByteArrayInputStream in = templateByte5(findAll, header);" + "\r\n" + +" InputStreamResource file = new InputStreamResource(in);" + "\r\n" + +" return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, \"attachment; filename=\" + filename)" + "\r\n" + +" .contentType(MediaType.parseMediaType(\"application/vnd.ms-excel\")).body(file);" + "\r\n" + +"" + "\r\n" + +" } else if (file_type.equalsIgnoreCase(\"customer\")) {" + "\r\n" + +"" + "\r\n" + +" String filename = \"Sr_customer_t\" + \".xlsx\";" + "\r\n" + +" String[] header = { \"Customer Name\", \"Description\", \"Is Active\", \"Effective Start Date\"," + "\r\n" + +" \"Effective End date\" };" + "\r\n" + +" List findAll = customerepo.findAll();" + "\r\n" + +" ByteArrayInputStream in = templateByte7(findAll, header);" + "\r\n" + +" InputStreamResource file = new InputStreamResource(in);" + "\r\n" + +" return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, \"attachment; filename=\" + filename)" + "\r\n" + +" .contentType(MediaType.parseMediaType(\"application/vnd.ms-excel\")).body(file);" + "\r\n" + +"" + "\r\n" + +" } else if (file_type.equalsIgnoreCase(\"handler\")) {" + "\r\n" + +"" + "\r\n" + +" String filename = \"Sr_handler_t\" + \".xlsx\";" + "\r\n" + +" String[] header = { \"User Id\", \"Role Id\", \"Is Active\", \"Effective Start Date\", \"Effective End date\" };" + "\r\n" + +" List findAll = handlerepo.findAll();" + "\r\n" + +" ByteArrayInputStream in = templateByte8(findAll, header);" + "\r\n" + +" InputStreamResource file = new InputStreamResource(in);" + "\r\n" + +" return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION, \"attachment; filename=\" + filename)" + "\r\n" + +" .contentType(MediaType.parseMediaType(\"application/vnd.ms-excel\")).body(file);" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" return new ResponseEntity(\"Not Found\", HttpStatus.BAD_REQUEST);" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" public static ByteArrayInputStream templateByte(List list, String[] hEADERs) {" + "\r\n" + +"" + "\r\n" + +" String SHEET = \"priority\";" + "\r\n" + +"" + "\r\n" + +" try (Workbook workbook = new XSSFWorkbook(); ByteArrayOutputStream out = new ByteArrayOutputStream();) {" + "\r\n" + +" Sheet sheet = workbook.createSheet(SHEET);" + "\r\n" + +"" + "\r\n" + +" // Header" + "\r\n" + +" Row headerRow = sheet.createRow(0);" + "\r\n" + +"" + "\r\n" + +" for (int col = 0; col < hEADERs.length; col++) {" + "\r\n" + +" Cell cell = headerRow.createCell(col);" + "\r\n" + +" cell.setCellValue(hEADERs[col]);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" int rowIdx = 1;" + "\r\n" + +" for (Sr_priority2_t p : list) {" + "\r\n" + +" Row row = sheet.createRow(rowIdx++);" + "\r\n" + +"" + "\r\n" + +" row.createCell(0).setCellValue(p.getPriority_name());" + "\r\n" + +" row.createCell(1).setCellValue(p.getDescription());" + "\r\n" + +" row.createCell(2).setCellValue(p.isActive());" + "\r\n" + +" row.createCell(3).setCellValue(String.valueOf(p.getEffective_start_date()));" + "\r\n" + +" row.createCell(4).setCellValue(String.valueOf(p.getEffective_end_date()));" + "\r\n" + +" }" + "\r\n" + +" workbook.write(out);" + "\r\n" + +" return new ByteArrayInputStream(out.toByteArray());" + "\r\n" + +" } catch (IOException e) {" + "\r\n" + +" throw new RuntimeException(\"fail to import data to Excel file: \" + e.getMessage());" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" public static ByteArrayInputStream templateByte2(List list, String[] hEADERs) {" + "\r\n" + +"" + "\r\n" + +" String SHEET = \"URGENCY\";" + "\r\n" + +"" + "\r\n" + +" try (Workbook workbook = new XSSFWorkbook(); ByteArrayOutputStream out = new ByteArrayOutputStream();) {" + "\r\n" + +" Sheet sheet = workbook.createSheet(SHEET);" + "\r\n" + +"" + "\r\n" + +" // Header" + "\r\n" + +" Row headerRow = sheet.createRow(0);" + "\r\n" + +"" + "\r\n" + +" for (int col = 0; col < hEADERs.length; col++) {" + "\r\n" + +" Cell cell = headerRow.createCell(col);" + "\r\n" + +" cell.setCellValue(hEADERs[col]);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" int rowIdx = 1;" + "\r\n" + +" for (Sr_urgency_t p : list) {" + "\r\n" + +" Row row = sheet.createRow(rowIdx++);" + "\r\n" + +"" + "\r\n" + +" row.createCell(0).setCellValue(p.getUrgency_name());" + "\r\n" + +" row.createCell(1).setCellValue(p.getDescription());" + "\r\n" + +" row.createCell(2).setCellValue(p.isIsActive());" + "\r\n" + +" row.createCell(3).setCellValue(String.valueOf(p.getEffective_start_date()));" + "\r\n" + +" row.createCell(4).setCellValue(String.valueOf(p.getEffective_end_date()));" + "\r\n" + +" }" + "\r\n" + +" workbook.write(out);" + "\r\n" + +" return new ByteArrayInputStream(out.toByteArray());" + "\r\n" + +" } catch (IOException e) {" + "\r\n" + +" throw new RuntimeException(\"fail to import data to Excel file: \" + e.getMessage());" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" public static ByteArrayInputStream templateByte3(List list, String[] hEADERs) {" + "\r\n" + +"" + "\r\n" + +" String SHEET = \"Impact\";" + "\r\n" + +"" + "\r\n" + +" try (Workbook workbook = new XSSFWorkbook(); ByteArrayOutputStream out = new ByteArrayOutputStream();) {" + "\r\n" + +" Sheet sheet = workbook.createSheet(SHEET);" + "\r\n" + +"" + "\r\n" + +" // Header" + "\r\n" + +" Row headerRow = sheet.createRow(0);" + "\r\n" + +"" + "\r\n" + +" for (int col = 0; col < hEADERs.length; col++) {" + "\r\n" + +" Cell cell = headerRow.createCell(col);" + "\r\n" + +" cell.setCellValue(hEADERs[col]);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" int rowIdx = 1;" + "\r\n" + +" for (Sr_impact2_t p : list) {" + "\r\n" + +" Row row = sheet.createRow(rowIdx++);" + "\r\n" + +"" + "\r\n" + +" row.createCell(0).setCellValue(p.getImpact_name());" + "\r\n" + +" row.createCell(1).setCellValue(p.getDescription());" + "\r\n" + +" row.createCell(2).setCellValue(p.isIsActive());" + "\r\n" + +" row.createCell(3).setCellValue(String.valueOf(p.getEffective_start_date()));" + "\r\n" + +" row.createCell(4).setCellValue(String.valueOf(p.getEffective_end_date()));" + "\r\n" + +" }" + "\r\n" + +" workbook.write(out);" + "\r\n" + +" return new ByteArrayInputStream(out.toByteArray());" + "\r\n" + +" } catch (IOException e) {" + "\r\n" + +" throw new RuntimeException(\"fail to import data to Excel file: \" + e.getMessage());" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" public static ByteArrayInputStream templateByte4(List list, String[] hEADERs) {" + "\r\n" + +"" + "\r\n" + +" String SHEET = \"Impact\";" + "\r\n" + +"" + "\r\n" + +" try (Workbook workbook = new XSSFWorkbook(); ByteArrayOutputStream out = new ByteArrayOutputStream();) {" + "\r\n" + +" Sheet sheet = workbook.createSheet(SHEET);" + "\r\n" + +"" + "\r\n" + +" // Header" + "\r\n" + +" Row headerRow = sheet.createRow(0);" + "\r\n" + +"" + "\r\n" + +" for (int col = 0; col < hEADERs.length; col++) {" + "\r\n" + +" Cell cell = headerRow.createCell(col);" + "\r\n" + +" cell.setCellValue(hEADERs[col]);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" int rowIdx = 1;" + "\r\n" + +" for (Sr_category2_t p : list) {" + "\r\n" + +" Row row = sheet.createRow(rowIdx++);" + "\r\n" + +"" + "\r\n" + +" row.createCell(0).setCellValue(p.getCustomer_id());" + "\r\n" + +" row.createCell(1).setCellValue(p.getDescription());" + "\r\n" + +" row.createCell(2).setCellValue(p.isActive());" + "\r\n" + +" row.createCell(3).setCellValue(String.valueOf(p.getEffective_start_date()));" + "\r\n" + +" row.createCell(4).setCellValue(String.valueOf(p.getEffective_end_date()));" + "\r\n" + +" }" + "\r\n" + +" workbook.write(out);" + "\r\n" + +" return new ByteArrayInputStream(out.toByteArray());" + "\r\n" + +" } catch (IOException e) {" + "\r\n" + +" throw new RuntimeException(\"fail to import data to Excel file: \" + e.getMessage());" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" public static ByteArrayInputStream templateByte5(List list, String[] hEADERs) {" + "\r\n" + +"" + "\r\n" + +" String SHEET = \"Impact\";" + "\r\n" + +"" + "\r\n" + +" try (Workbook workbook = new XSSFWorkbook(); ByteArrayOutputStream out = new ByteArrayOutputStream();) {" + "\r\n" + +" Sheet sheet = workbook.createSheet(SHEET);" + "\r\n" + +"" + "\r\n" + +" // Header" + "\r\n" + +" Row headerRow = sheet.createRow(0);" + "\r\n" + +"" + "\r\n" + +" for (int col = 0; col < hEADERs.length; col++) {" + "\r\n" + +" Cell cell = headerRow.createCell(col);" + "\r\n" + +" cell.setCellValue(hEADERs[col]);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" int rowIdx = 1;" + "\r\n" + +" for (Sr_Contact_type_t p : list) {" + "\r\n" + +" Row row = sheet.createRow(rowIdx++);" + "\r\n" + +"" + "\r\n" + +" row.createCell(0).setCellValue(p.getCon_type_name());" + "\r\n" + +" row.createCell(1).setCellValue(p.getDescription());" + "\r\n" + +" row.createCell(2).setCellValue(p.isIsActive());" + "\r\n" + +" row.createCell(3).setCellValue(String.valueOf(p.getEffective_start_date()));" + "\r\n" + +" row.createCell(4).setCellValue(String.valueOf(p.getEffective_end_date()));" + "\r\n" + +" }" + "\r\n" + +" workbook.write(out);" + "\r\n" + +" return new ByteArrayInputStream(out.toByteArray());" + "\r\n" + +" } catch (IOException e) {" + "\r\n" + +" throw new RuntimeException(\"fail to import data to Excel file: \" + e.getMessage());" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" public static ByteArrayInputStream templateByte6(List list, String[] hEADERs) {" + "\r\n" + +"" + "\r\n" + +" String SHEET = \"Impact\";" + "\r\n" + +"" + "\r\n" + +" try (Workbook workbook = new XSSFWorkbook(); ByteArrayOutputStream out = new ByteArrayOutputStream();) {" + "\r\n" + +" Sheet sheet = workbook.createSheet(SHEET);" + "\r\n" + +"" + "\r\n" + +" // Header" + "\r\n" + +" Row headerRow = sheet.createRow(0);" + "\r\n" + +"" + "\r\n" + +" for (int col = 0; col < hEADERs.length; col++) {" + "\r\n" + +" Cell cell = headerRow.createCell(col);" + "\r\n" + +" cell.setCellValue(hEADERs[col]);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" int rowIdx = 1;" + "\r\n" + +" for (Sr_State_t p : list) {" + "\r\n" + +" Row row = sheet.createRow(rowIdx++);" + "\r\n" + +" row.createCell(0).setCellValue(p.getState_name());" + "\r\n" + +" row.createCell(1).setCellValue(p.getDescription());" + "\r\n" + +" row.createCell(2).setCellValue(p.isIsActive());" + "\r\n" + +" row.createCell(3).setCellValue(String.valueOf(p.getEffective_start_date()));" + "\r\n" + +" row.createCell(4).setCellValue(String.valueOf(p.getEffective_end_date()));" + "\r\n" + +" }" + "\r\n" + +" workbook.write(out);" + "\r\n" + +" return new ByteArrayInputStream(out.toByteArray());" + "\r\n" + +" } catch (IOException e) {" + "\r\n" + +" throw new RuntimeException(\"fail to import data to Excel file: \" + e.getMessage());" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" public static ByteArrayInputStream templateByte7(List list, String[] hEADERs) {" + "\r\n" + +"" + "\r\n" + +" String SHEET = \"Impact\";" + "\r\n" + +"" + "\r\n" + +" try (Workbook workbook = new XSSFWorkbook(); ByteArrayOutputStream out = new ByteArrayOutputStream();) {" + "\r\n" + +" Sheet sheet = workbook.createSheet(SHEET);" + "\r\n" + +"" + "\r\n" + +" // Header" + "\r\n" + +" Row headerRow = sheet.createRow(0);" + "\r\n" + +"" + "\r\n" + +" for (int col = 0; col < hEADERs.length; col++) {" + "\r\n" + +" Cell cell = headerRow.createCell(col);" + "\r\n" + +" cell.setCellValue(hEADERs[col]);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" int rowIdx = 1;" + "\r\n" + +" for (Sr_customer_t p : list) {" + "\r\n" + +" Row row = sheet.createRow(rowIdx++);" + "\r\n" + +"" + "\r\n" + +" row.createCell(0).setCellValue(p.getCustomer_name());" + "\r\n" + +" row.createCell(1).setCellValue(p.getDescription());" + "\r\n" + +" row.createCell(2).setCellValue(p.isIsActive());" + "\r\n" + +" row.createCell(3).setCellValue(String.valueOf(p.getEffective_start_date()));" + "\r\n" + +" row.createCell(4).setCellValue(String.valueOf(p.getEffective_end_date()));" + "\r\n" + +" }" + "\r\n" + +" workbook.write(out);" + "\r\n" + +" return new ByteArrayInputStream(out.toByteArray());" + "\r\n" + +" } catch (IOException e) {" + "\r\n" + +" throw new RuntimeException(\"fail to import data to Excel file: \" + e.getMessage());" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" public static ByteArrayInputStream templateByte8(List list, String[] hEADERs) {" + "\r\n" + +"" + "\r\n" + +" String SHEET = \"Impact\";" + "\r\n" + +"" + "\r\n" + +" try (Workbook workbook = new XSSFWorkbook(); ByteArrayOutputStream out = new ByteArrayOutputStream();) {" + "\r\n" + +" Sheet sheet = workbook.createSheet(SHEET);" + "\r\n" + +"" + "\r\n" + +" // Header" + "\r\n" + +" Row headerRow = sheet.createRow(0);" + "\r\n" + +"" + "\r\n" + +" for (int col = 0; col < hEADERs.length; col++) {" + "\r\n" + +" Cell cell = headerRow.createCell(col);" + "\r\n" + +" cell.setCellValue(hEADERs[col]);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" int rowIdx = 1;" + "\r\n" + +" for (Sr_handler_t p : list) {" + "\r\n" + +" Row row = sheet.createRow(rowIdx++);" + "\r\n" + +"" + "\r\n" + +" row.createCell(0).setCellValue(p.getRole());" + "\r\n" + +" row.createCell(1).setCellValue(p.getUser_name());" + "\r\n" + +" row.createCell(2).setCellValue(p.isIsActive());" + "\r\n" + +" row.createCell(3).setCellValue(String.valueOf(p.getEffective_start_date()));" + "\r\n" + +" row.createCell(4).setCellValue(String.valueOf(p.getEffective_end_date()));" + "\r\n" + +" }" + "\r\n" + +" workbook.write(out);" + "\r\n" + +" return new ByteArrayInputStream(out.toByteArray());" + "\r\n" + +" } catch (IOException e) {" + "\r\n" + +" throw new RuntimeException(\"fail to import data to Excel file: \" + e.getMessage());" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" @GetMapping(\"/getalltemplate\")" + "\r\n" + +" public ResponseEntity getALlTemplate() {" + "\r\n" + +" return new ResponseEntity<>(temprepo.findAll(), HttpStatus.ACCEPTED);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +"}" \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_DatabaseQueryController.java b/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_DatabaseQueryController.java new file mode 100644 index 0000000..8f72c2d --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_DatabaseQueryController.java @@ -0,0 +1,75 @@ +"package com.realnet.template.controller;" + "\r\n" + +"" + "\r\n" + +"import java.sql.Connection;" + "\r\n" + +"import java.sql.DriverManager;" + "\r\n" + +"import java.sql.SQLException;" + "\r\n" + +"import java.sql.Statement;" + "\r\n" + +"import java.util.ArrayList;" + "\r\n" + +"import java.util.List;" + "\r\n" + +"" + "\r\n" + +"import org.springframework.beans.factory.annotation.Autowired;" + "\r\n" + +"import org.springframework.beans.factory.annotation.Value;" + "\r\n" + +"import org.springframework.web.bind.annotation.GetMapping;" + "\r\n" + +"import org.springframework.web.bind.annotation.PathVariable;" + "\r\n" + +"import org.springframework.web.bind.annotation.RequestMapping;" + "\r\n" + +"import org.springframework.web.bind.annotation.ResponseBody;" + "\r\n" + +"import org.springframework.web.bind.annotation.RestController;" + "\r\n" + +"" + "\r\n" + +"import com.realnet.template.repository.DynamicTempRepo;" + "\r\n" + +"import com.realnet.template.service.DatabaseQueryService;" + "\r\n" + +"" + "\r\n" + +"@RestController" + "\r\n" + +"@RequestMapping(\"/sureserve/template/databasequery\")" + "\r\n" + +"public class DatabaseQueryController {" + "\r\n" + +"" + "\r\n" + +" @Autowired" + "\r\n" + +" private DatabaseQueryService rn_table_service;" + "\r\n" + +" @Autowired" + "\r\n" + +" private DynamicTempRepo tempRepo;" + "\r\n" + +"" + "\r\n" + +" @Value(\"${spring.datasource.username}\")" + "\r\n" + +" private String userName;" + "\r\n" + +"" + "\r\n" + +" @Value(\"${spring.datasource.password}\")" + "\r\n" + +" private String password;" + "\r\n" + +"" + "\r\n" + +" @Value(\"${spring.datasource.url}\")" + "\r\n" + +" private String url;" + "\r\n" + +"" + "\r\n" + +"// get all databse list available" + "\r\n" + +" @GetMapping(\"/Table_list\")" + "\r\n" + +" @ResponseBody" + "\r\n" + +" public List getdatabase() {" + "\r\n" + +" List list = tempRepo.getdatabaseList();" + "\r\n" + +" return list;" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" // get all table list available" + "\r\n" + +" @GetMapping(\"/Table_list_all\")" + "\r\n" + +" @ResponseBody" + "\r\n" + +" public List gettableList()" + "\r\n" + +"" + "\r\n" + +"// @PathVariable String table_schema) " + "\r\n" + +" {" + "\r\n" + +"// List list = tempRepo.getListOftables(table_schema);" + "\r\n" + +" List list = rn_table_service.getListOftable(\"sureserve\");" + "\r\n" + +" return list;" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" // get all column list available" + "\r\n" + +" @GetMapping(\"/Table_list/{table_schema}/{TABLE_NAME}\")" + "\r\n" + +" @ResponseBody" + "\r\n" + +" public List getallcolumnlist(@PathVariable String table_schema, @PathVariable String TABLE_NAME) {" + "\r\n" + +" List list = rn_table_service.getColumnAliasList1(table_schema, TABLE_NAME);" + "\r\n" + +" return list;" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" // create database" + "\r\n" + +" @GetMapping(\"/createdatabase/{table_schema}\")" + "\r\n" + +" @ResponseBody" + "\r\n" + +" public List createdatabase(@PathVariable String table_schema) {" + "\r\n" + +" List list = rn_table_service.createdatabase(table_schema);" + "\r\n" + +" return list;" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +"}" \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_DatabaseQueryService.java b/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_DatabaseQueryService.java new file mode 100644 index 0000000..88dd907 --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_DatabaseQueryService.java @@ -0,0 +1,89 @@ +"package com.realnet.template.service;" + "\r\n" + +"" + "\r\n" + +"import java.sql.Connection;" + "\r\n" + +"import java.sql.DriverManager;" + "\r\n" + +"import java.sql.ResultSet;" + "\r\n" + +"import java.sql.SQLException;" + "\r\n" + +"import java.sql.Statement;" + "\r\n" + +"import java.util.ArrayList;" + "\r\n" + +"import java.util.List;" + "\r\n" + +"" + "\r\n" + +"import org.springframework.beans.factory.annotation.Autowired;" + "\r\n" + +"import org.springframework.beans.factory.annotation.Value;" + "\r\n" + +"import org.springframework.stereotype.Service;" + "\r\n" + +"import org.springframework.web.bind.annotation.PathVariable;" + "\r\n" + +"" + "\r\n" + +"@Service" + "\r\n" + +"public class DatabaseQueryService {" + "\r\n" + +"" + "\r\n" + +" @Value(\"${spring.datasource.username}\")" + "\r\n" + +" private String userName;" + "\r\n" + +"" + "\r\n" + +" @Value(\"${spring.datasource.password}\")" + "\r\n" + +" private String password;" + "\r\n" + +"" + "\r\n" + +" @Value(\"${spring.datasource.url}\")" + "\r\n" + +" private String url;" + "\r\n" + +"" + "\r\n" + +" // get all column" + "\r\n" + +"" + "\r\n" + +" public List getColumnAliasList1(String table_schema, String tABLE_NAME) {" + "\r\n" + +" String query = \"SELECT column_name FROM information_schema.columns WHERE TABLE_SCHEMA='\" + table_schema" + "\r\n" + +" + \"' and table_name = '\" + tABLE_NAME + \"' \";" + "\r\n" + +" List list = new ArrayList();" + "\r\n" + +" try (Connection con = DriverManager.getConnection(url, userName, password);" + "\r\n" + +"" + "\r\n" + +" Statement stmt = con.createStatement()) {" + "\r\n" + +" ResultSet rs = stmt.executeQuery(query);" + "\r\n" + +" while (rs.next()) {" + "\r\n" + +" String coffeeName = rs.getString(\"column_name\");" + "\r\n" + +" list.add(coffeeName);" + "\r\n" + +" }" + "\r\n" + +" } catch (SQLException e) {" + "\r\n" + +" e.printStackTrace();" + "\r\n" + +" }" + "\r\n" + +" return list;" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" // get all table list from databse" + "\r\n" + +"" + "\r\n" + +" public List getListOftable(String table_schema) {" + "\r\n" + +" String query = \"SELECT table_name FROM information_schema.tables WHERE table_schema='\" + table_schema + \"' \";" + "\r\n" + +"" + "\r\n" + +" List list = new ArrayList();" + "\r\n" + +" try (Connection con = DriverManager.getConnection(url, userName, password);" + "\r\n" + +"" + "\r\n" + +" Statement stmt = con.createStatement()) {" + "\r\n" + +" ResultSet rs = stmt.executeQuery(query);" + "\r\n" + +" while (rs.next()) {" + "\r\n" + +" String coffeeName = rs.getString(\"table_name\");" + "\r\n" + +" list.add(coffeeName);" + "\r\n" + +" }" + "\r\n" + +" } catch (SQLException e) {" + "\r\n" + +" e.printStackTrace();" + "\r\n" + +" }" + "\r\n" + +" return list;" + "\r\n" + +" }" + "\r\n" + +" " + "\r\n" + +" public List createdatabase(String table_schema){" + "\r\n" + +" String query = \"CREATE SCHEMA \" + table_schema + \";\";" + "\r\n" + +"" + "\r\n" + +" List list = new ArrayList();" + "\r\n" + +" try (Connection con = DriverManager.getConnection(url, userName, password); // conn.str" + "\r\n" + +"" + "\r\n" + +" Statement stmt = con.createStatement()) {" + "\r\n" + +" int rs = stmt.executeUpdate(query);" + "\r\n" + +"" + "\r\n" + +" list.add(rs);" + "\r\n" + +"" + "\r\n" + +" } catch (SQLException e) {" + "\r\n" + +" e.printStackTrace();" + "\r\n" + +" } finally {" + "\r\n" + +" }" + "\r\n" + +" return list;" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +" " + "\r\n" + +"" + "\r\n" + +"" + "\r\n" + +"}" \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_DynamicTempRepo.java b/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_DynamicTempRepo.java new file mode 100644 index 0000000..14faf1d --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_DynamicTempRepo.java @@ -0,0 +1,24 @@ +"package com.realnet.template.repository;" + "\r\n" + +"" + "\r\n" + +"import java.util.List;" + "\r\n" + +"" + "\r\n" + +"import org.springframework.data.jpa.repository.JpaRepository;" + "\r\n" + +"import org.springframework.data.jpa.repository.Query;" + "\r\n" + +"import org.springframework.data.repository.query.Param;" + "\r\n" + +"import org.springframework.stereotype.Repository;" + "\r\n" + +"" + "\r\n" + +"import com.realnet.template.entity.Dynamic_template;" + "\r\n" + +"" + "\r\n" + +"@Repository" + "\r\n" + +"public interface DynamicTempRepo extends JpaRepository{" + "\r\n" + +"" + "\r\n" + +" " + "\r\n" + +" @Query(value= \"select schema_name from information_schema.schemata\",nativeQuery = true)" + "\r\n" + +" List getdatabaseList();" + "\r\n" + +"" + "\r\n" + +" @Query(value= \"SELECT table_name FROM information_schema.tables WHERE table_schema =?1\",nativeQuery = true)" + "\r\n" + +" List getListOftables(String table_schema);" + "\r\n" + +"" + "\r\n" + +" @Query(value= \"SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE `TABLE_SCHEMA`=:'TABLE_SCHEMA' AND `TABLE_NAME`='TABLE_NAME';\",nativeQuery = true)" + "\r\n" + +" List getallcolumnlist(@Param(\"TABLE_SCHEMA\") Object table_schema, @Param(\"TABLE_NAME\") Object tABLE_NAME);" + "\r\n" + +"}" \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_DynamicTemplateController.java b/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_DynamicTemplateController.java new file mode 100644 index 0000000..06db400 --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_DynamicTemplateController.java @@ -0,0 +1,250 @@ +"package com.realnet.template.controller;" + "\r\n" + +"" + "\r\n" + +"import java.io.BufferedReader;" + "\r\n" + +"import java.io.IOException;" + "\r\n" + +"import java.io.InputStream;" + "\r\n" + +"import java.io.InputStreamReader;" + "\r\n" + +"import java.text.DateFormat;" + "\r\n" + +"import java.text.SimpleDateFormat;" + "\r\n" + +"import java.util.ArrayList;" + "\r\n" + +"import java.util.Calendar;" + "\r\n" + +"import java.util.HashMap;" + "\r\n" + +"import java.util.Iterator;" + "\r\n" + +"import java.util.List;" + "\r\n" + +"import java.util.Map;" + "\r\n" + +"import java.util.Set;" + "\r\n" + +"" + "\r\n" + +"import org.apache.poi.ss.usermodel.DataFormatter;" + "\r\n" + +"import org.apache.poi.ss.usermodel.Row;" + "\r\n" + +"import org.apache.poi.ss.usermodel.Sheet;" + "\r\n" + +"import org.apache.poi.ss.usermodel.Workbook;" + "\r\n" + +"import org.apache.poi.ss.usermodel.WorkbookFactory;" + "\r\n" + +"import org.json.simple.JSONObject;" + "\r\n" + +"import org.springframework.beans.factory.annotation.Autowired;" + "\r\n" + +"import org.springframework.http.HttpStatus;" + "\r\n" + +"import org.springframework.http.ResponseEntity;" + "\r\n" + +"import org.springframework.web.bind.annotation.DeleteMapping;" + "\r\n" + +"import org.springframework.web.bind.annotation.GetMapping;" + "\r\n" + +"import org.springframework.web.bind.annotation.PathVariable;" + "\r\n" + +"import org.springframework.web.bind.annotation.PostMapping;" + "\r\n" + +"import org.springframework.web.bind.annotation.PutMapping;" + "\r\n" + +"import org.springframework.web.bind.annotation.RequestMapping;" + "\r\n" + +"import org.springframework.web.bind.annotation.RequestParam;" + "\r\n" + +"import org.springframework.web.bind.annotation.RestController;" + "\r\n" + +"import org.springframework.web.multipart.MultipartFile;" + "\r\n" + +"" + "\r\n" + +"import com.fasterxml.jackson.core.JsonProcessingException;" + "\r\n" + +"import com.fasterxml.jackson.databind.JsonMappingException;" + "\r\n" + +"import com.fasterxml.jackson.databind.ObjectMapper;" + "\r\n" + +"import com.google.gson.JsonArray;" + "\r\n" + +"import com.google.gson.JsonElement;" + "\r\n" + +"import com.google.gson.JsonObject;" + "\r\n" + +"import com.google.gson.JsonParser;" + "\r\n" + +"import com.realnet.Notification.Notification.Entity.NotEntity;" + "\r\n" + +"import com.realnet.fileupload.helper.Fileuploadhelper;" + "\r\n" + +"import com.realnet.incident.entity.IncidentEntity;" + "\r\n" + +"import com.realnet.template.entity.Dynamic_template;" + "\r\n" + +"import com.realnet.template.repository.DynamicTempRepo;" + "\r\n" + +"import com.realnet.users.entity1.AppUser;" + "\r\n" + +"import com.realnet.users.service1.AppUserServiceImpl;" + "\r\n" + +"" + "\r\n" + +"@RestController" + "\r\n" + +"@RequestMapping(\"/sureserve/template/dynamic\")" + "\r\n" + +"public class DynamicTemplateController {" + "\r\n" + +"" + "\r\n" + +" @Autowired" + "\r\n" + +" private DynamicTempRepo tempRepo;" + "\r\n" + +"" + "\r\n" + +" @Autowired" + "\r\n" + +" private AppUserServiceImpl userService;" + "\r\n" + +"" + "\r\n" + +" @Autowired" + "\r\n" + +" private Fileuploadhelper fileuploadhelper;" + "\r\n" + +"" + "\r\n" + +" @GetMapping(\"/templatetojson\")" + "\r\n" + +" public ResponseEntity saveTemplateInJson(@RequestParam MultipartFile file) throws IOException {" + "\r\n" + +"" + "\r\n" + +" BufferedReader br;" + "\r\n" + +" InputStream is = file.getInputStream();" + "\r\n" + +" br = new BufferedReader(new InputStreamReader(is));" + "\r\n" + +"" + "\r\n" + +" Workbook workbook = WorkbookFactory.create(is);" + "\r\n" + +"" + "\r\n" + +"// Create a DataFormatter to format and get each cell's value as String" + "\r\n" + +" DataFormatter dataFormatter = new DataFormatter();" + "\r\n" + +"" + "\r\n" + +" Sheet sheet = workbook.getSheetAt(0);" + "\r\n" + +"" + "\r\n" + +" // Getting number of columns in the Sheet" + "\r\n" + +" int cols = sheet.getRow(0).getLastCellNum();" + "\r\n" + +" int firstRowNum = sheet.getFirstRowNum();" + "\r\n" + +"" + "\r\n" + +" List keys = new ArrayList();" + "\r\n" + +" List jsonList = new ArrayList();" + "\r\n" + +"" + "\r\n" + +" for (Row row : sheet) {" + "\r\n" + +" JSONObject object = new JSONObject();" + "\r\n" + +" if (row.getRowNum() == 0) {" + "\r\n" + +" for (int i = 0; i < cols; i++) {" + "\r\n" + +" String value = dataFormatter.formatCellValue(row.getCell(i));" + "\r\n" + +" keys.add(value);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" if (row.getRowNum() != 0) {" + "\r\n" + +"" + "\r\n" + +" for (int i = 0; i < cols; i++) {" + "\r\n" + +" String key = keys.get(i);" + "\r\n" + +" String value = dataFormatter.formatCellValue(row.getCell(i));" + "\r\n" + +"" + "\r\n" + +" object.put(key, value);" + "\r\n" + +"" + "\r\n" + +" jsonList.add(object);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" workbook.close();" + "\r\n" + +"" + "\r\n" + +" return new ResponseEntity<>(jsonList, HttpStatus.BAD_REQUEST);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" @GetMapping(\"/jsonkeychange\")" + "\r\n" + +"" + "\r\n" + +" public ResponseEntity changeKeysOfJson(@RequestParam String newjson, @RequestParam String body)" + "\r\n" + +" throws IOException {" + "\r\n" + +"" + "\r\n" + +" JsonParser parser = new JsonParser();" + "\r\n" + +" JsonElement element = parser.parse(newjson);" + "\r\n" + +" JsonElement element2 = parser.parse(body);" + "\r\n" + +" JsonObject object2 = element.getAsJsonObject();" + "\r\n" + +" JsonArray array = element2.getAsJsonArray();" + "\r\n" + +" Iterator iterator = array.iterator();" + "\r\n" + +"" + "\r\n" + +" List jsonList = new ArrayList();" + "\r\n" + +"" + "\r\n" + +" Set keySet = object2.keySet();" + "\r\n" + +" Iterator it = keySet.iterator();" + "\r\n" + +"" + "\r\n" + +"// String key = it.next();" + "\r\n" + +" while (iterator.hasNext()) {" + "\r\n" + +"" + "\r\n" + +" Map map = new HashMap();" + "\r\n" + +" Object next = iterator.next();" + "\r\n" + +" JsonElement parse = parser.parse(next.toString());" + "\r\n" + +" JsonObject jsonObject = parse.getAsJsonObject();" + "\r\n" + +" for (String k : keySet) {" + "\r\n" + +" String next2 = object2.get(k).getAsString();" + "\r\n" + +" String value2 = jsonObject.get(k).getAsString();" + "\r\n" + +" map.put(next2, value2);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" jsonList.add(map);" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" return new ResponseEntity<>(jsonList, HttpStatus.BAD_REQUEST);" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" // create data with file upload" + "\r\n" + +" @PostMapping(\"/dynamic_temp\")" + "\r\n" + +" public ResponseEntity addIssues(@RequestParam String data, @RequestParam MultipartFile file)" + "\r\n" + +" throws JsonMappingException, JsonProcessingException {" + "\r\n" + +"" + "\r\n" + +" AppUser user = userService.getLoggedInUser();" + "\r\n" + +" String userId = user.getUsername();" + "\r\n" + +" Dynamic_template dynamic_template;" + "\r\n" + +"" + "\r\n" + +" dynamic_template = new ObjectMapper().readValue(data, Dynamic_template.class);" + "\r\n" + +"" + "\r\n" + +" if (!file.isEmpty()) {" + "\r\n" + +"// for (MultipartFile e : attachmentFile) {" + "\r\n" + +" System.out.println(file.getOriginalFilename());" + "\r\n" + +"" + "\r\n" + +" boolean f = fileuploadhelper.uploadFile(file);" + "\r\n" + +"" + "\r\n" + +" if (f) {" + "\r\n" + +" System.out.println(\"file uploaded successfully\");" + "\r\n" + +" dynamic_template.setFile_name(file.getOriginalFilename());" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" } else {" + "\r\n" + +" dynamic_template.setFile_name(\"No file\");" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" dynamic_template.setUser_id(userId);" + "\r\n" + +"" + "\r\n" + +" Dynamic_template save = tempRepo.save(dynamic_template);" + "\r\n" + +"" + "\r\n" + +" if (save.getId() == 0) {" + "\r\n" + +" return new ResponseEntity(\"template Not Added\", HttpStatus.BAD_REQUEST);" + "\r\n" + +" } else {" + "\r\n" + +"" + "\r\n" + +" return new ResponseEntity<>(save, HttpStatus.ACCEPTED);" + "\r\n" + +" }" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" // get all" + "\r\n" + +" @GetMapping(\"/dynamic_temp\")" + "\r\n" + +" public ResponseEntity getAll() {" + "\r\n" + +"" + "\r\n" + +" return new ResponseEntity<>(tempRepo.findAll(), HttpStatus.ACCEPTED);" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" // get by id" + "\r\n" + +" @GetMapping(\"/dynamic_temp/{id}\")" + "\r\n" + +" public ResponseEntity getIssueById(@PathVariable Long id) {" + "\r\n" + +"" + "\r\n" + +" return new ResponseEntity<>(tempRepo.findById(id).get(), HttpStatus.ACCEPTED);" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" // delete by id" + "\r\n" + +" @DeleteMapping(\"/dynamic_temp/{id}\")" + "\r\n" + +" public ResponseEntity deleteIssue(@PathVariable Long id) {" + "\r\n" + +" tempRepo.deleteById(id);" + "\r\n" + +" return new ResponseEntity(\"Success\", HttpStatus.ACCEPTED);" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" // update by id" + "\r\n" + +" @PutMapping(\"/dynamic_temp/{id}\")" + "\r\n" + +" public ResponseEntity updateIssue(@RequestParam String data, @PathVariable Long id," + "\r\n" + +" @RequestParam MultipartFile file) throws Exception {" + "\r\n" + +"" + "\r\n" + +" Dynamic_template dynamic_template;" + "\r\n" + +" dynamic_template = new ObjectMapper().readValue(data, Dynamic_template.class);" + "\r\n" + +"" + "\r\n" + +" Dynamic_template template = tempRepo.findById(id).get();" + "\r\n" + +"" + "\r\n" + +" if (!file.isEmpty()) {" + "\r\n" + +" System.out.println(file.getOriginalFilename());" + "\r\n" + +"" + "\r\n" + +" boolean f = fileuploadhelper.uploadFile(file);" + "\r\n" + +"" + "\r\n" + +" if (f) {" + "\r\n" + +" System.out.println(\"file uploaded successfully\");" + "\r\n" + +" template.setFile_name(file.getOriginalFilename());" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" } else {" + "\r\n" + +" template.setFile_name(\"No file\");" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +" template.setEntity_name(dynamic_template.getEntity_name());" + "\r\n" + +" template.setUser_id(dynamic_template.getUser_id());" + "\r\n" + +"" + "\r\n" + +" Dynamic_template save = tempRepo.save(template);" + "\r\n" + +" return new ResponseEntity<>(save, HttpStatus.ACCEPTED);" + "\r\n" + +"" + "\r\n" + +" }" + "\r\n" + +"" + "\r\n" + +"}" \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_Dynamic_template.java b/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_Dynamic_template.java new file mode 100644 index 0000000..63e3b6d --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_Dynamic_template.java @@ -0,0 +1,25 @@ +"package com.realnet.template.entity;" + "\r\n" + +"" + "\r\n" + +"import javax.persistence.Entity;" + "\r\n" + +"import javax.persistence.GeneratedValue;" + "\r\n" + +"import javax.persistence.GenerationType;" + "\r\n" + +"import javax.persistence.Id;" + "\r\n" + +"" + "\r\n" + +"import lombok.AllArgsConstructor;" + "\r\n" + +"import lombok.Data;" + "\r\n" + +"import lombok.NoArgsConstructor;" + "\r\n" + +"" + "\r\n" + +"@Data" + "\r\n" + +"@Entity" + "\r\n" + +"@AllArgsConstructor" + "\r\n" + +"@NoArgsConstructor" + "\r\n" + +"public class Dynamic_template {" + "\r\n" + +"" + "\r\n" + +" @Id" + "\r\n" + +" @GeneratedValue(strategy = GenerationType.IDENTITY)" + "\r\n" + +" private Long id;" + "\r\n" + +" " + "\r\n" + +" private String user_id;" + "\r\n" + +" private String file_name;" + "\r\n" + +" private String entity_name;" + "\r\n" + +"}" \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_ExcelDataService.java b/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_ExcelDataService.java new file mode 100644 index 0000000..afe4984 --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_ExcelDataService.java @@ -0,0 +1,96 @@ +"//package com.realnet.excel.service;" + "\r\n" + +"//" + "\r\n" + +"//import java.io.IOException;" + "\r\n" + +"//import java.util.ArrayList;" + "\r\n" + +"//import java.util.List;" + "\r\n" + +"//" + "\r\n" + +"//import org.apache.poi.EncryptedDocumentException;" + "\r\n" + +"//import org.apache.poi.ss.usermodel.Cell;" + "\r\n" + +"//import org.apache.poi.ss.usermodel.DataFormatter;" + "\r\n" + +"//import org.apache.poi.ss.usermodel.Row;" + "\r\n" + +"//import org.apache.poi.ss.usermodel.Sheet;" + "\r\n" + +"//import org.apache.poi.ss.usermodel.Workbook;" + "\r\n" + +"//import org.apache.poi.ss.usermodel.WorkbookFactory;" + "\r\n" + +"//import org.springframework.stereotype.Service;" + "\r\n" + +"//" + "\r\n" + +"//import com.realnet.excel.entity.ExcelFileUpload;" + "\r\n" + +"//" + "\r\n" + +"//@Service" + "\r\n" + +"//public class ExcelDataService {" + "\r\n" + +"// " + "\r\n" + +"// Workbook workbook;" + "\r\n" + +"//" + "\r\n" + +"// public List getExcelDataAsList() {" + "\r\n" + +"//" + "\r\n" + +"// List list = new ArrayList();" + "\r\n" + +"//" + "\r\n" + +"// // Create a DataFormatter to format and get each cell's value as String" + "\r\n" + +"// DataFormatter dataFormatter = new DataFormatter();" + "\r\n" + +"//" + "\r\n" + +"// // Create the Workbook" + "\r\n" + +"//// try {" + "\r\n" + +"//// workbook = WorkbookFactory.create();" + "\r\n" + +"//// } catch (EncryptedDocumentException | IOException e) {" + "\r\n" + +"//// e.printStackTrace();" + "\r\n" + +"//// }" + "\r\n" + +"//" + "\r\n" + +"// // Retrieving the number of sheets in the Workbook" + "\r\n" + +"// System.out.println(\"-------Workbook has '\" + workbook.getNumberOfSheets() + \"' Sheets-----\");" + "\r\n" + +"//" + "\r\n" + +"// // Getting the Sheet at index zero" + "\r\n" + +"// Sheet sheet = workbook.getSheetAt(0);" + "\r\n" + +"//" + "\r\n" + +"// // Getting number of columns in the Sheet" + "\r\n" + +"// int noOfColumns = sheet.getRow(0).getLastCellNum();" + "\r\n" + +"// System.out.println(\"-------Sheet has '\"+noOfColumns+\"' columns------\");" + "\r\n" + +"//" + "\r\n" + +"// // Using for-each loop to iterate over the rows and columns" + "\r\n" + +"// for (Row row : sheet) {" + "\r\n" + +"// for (Cell cell : row) {" + "\r\n" + +"// String cellValue = dataFormatter.formatCellValue(cell);" + "\r\n" + +"// list.add(cellValue);" + "\r\n" + +"// }" + "\r\n" + +"// }" + "\r\n" + +"//" + "\r\n" + +"// // filling excel data and creating list as List" + "\r\n" + +"// List invList = createList(list, noOfColumns);" + "\r\n" + +"//" + "\r\n" + +"// // Closing the workbook" + "\r\n" + +"// try {" + "\r\n" + +"// workbook.close();" + "\r\n" + +"// } catch (IOException e) {" + "\r\n" + +"// // TODO Auto-generated catch block" + "\r\n" + +"// e.printStackTrace();" + "\r\n" + +"// }" + "\r\n" + +"//" + "\r\n" + +"// return invList;" + "\r\n" + +"// }" + "\r\n" + +"//" + "\r\n" + +"// private List createList(List excelData, int noOfColumns) {" + "\r\n" + +"//" + "\r\n" + +"// ArrayList invList = new ArrayList();" + "\r\n" + +"//" + "\r\n" + +"// int i = noOfColumns;" + "\r\n" + +"// do {" + "\r\n" + +"// ExcelFileUpload inv = new ExcelFileUpload();" + "\r\n" + +"//" + "\r\n" + +"//// inv.setName(excelData.get(i));" + "\r\n" + +"//// inv.setAmount(Double.valueOf(excelData.get(i + 1)));" + "\r\n" + +"//// inv.setNumber(excelData.get(i + 2));" + "\r\n" + +"//// inv.setReceivedDate(excelData.get(i + 3));" + "\r\n" + +"//" + "\r\n" + +"// invList.add(inv);" + "\r\n" + +"// i = i + (noOfColumns);" + "\r\n" + +"//" + "\r\n" + +"// } while (i < excelData.size());" + "\r\n" + +"// return invList;" + "\r\n" + +"// }" + "\r\n" + +"//" + "\r\n" + +"//// public int saveExcelData(List invoices) {" + "\r\n" + +"//// invoices = repo.saveAll(invoices);" + "\r\n" + +"//// return invoices.size();" + "\r\n" + +"//// }" + "\r\n" + +"// " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +"//}" \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_FileUploadService.java b/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_FileUploadService.java new file mode 100644 index 0000000..844b1d9 --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_FileUploadService.java @@ -0,0 +1,79 @@ +"package com.realnet.template.service;" + "\r\n" + +"" + "\r\n" + +"import java.io.File;" + "\r\n" + +"import java.nio.file.Files;" + "\r\n" + +"import java.nio.file.Path;" + "\r\n" + +"import java.nio.file.Paths;" + "\r\n" + +"import java.nio.file.StandardCopyOption;" + "\r\n" + +"" + "\r\n" + +"import org.springframework.beans.factory.annotation.Autowired;" + "\r\n" + +"import org.springframework.beans.factory.annotation.Value;" + "\r\n" + +"import org.springframework.stereotype.Service;" + "\r\n" + +"import org.springframework.util.StringUtils;" + "\r\n" + +"import org.springframework.web.multipart.MultipartFile;" + "\r\n" + +"" + "\r\n" + +"import com.realnet.template.entity.TemplateFileUpload;" + "\r\n" + +"import com.realnet.template.repository.TemplatedataRepo;" + "\r\n" + +"" + "\r\n" + +"@Service" + "\r\n" + +"public class FileUploadService {" + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" @Autowired" + "\r\n" + +" private TemplatedataRepo repo;" + "\r\n" + +" " + "\r\n" + +"" + "\r\n" + +" " + "\r\n" + +" public String uploadFile(MultipartFile file,Long user_id,String file_type) {" + "\r\n" + +" try {" + "\r\n" + +" " + "\r\n" + +"// String " + "\r\n" + +" String file_name= file.getOriginalFilename();" + "\r\n" + +" String substring = file_name.substring(0,file_name.lastIndexOf(\".\"));" + "\r\n" + +" " + "\r\n" + +" String str = substring+System.currentTimeMillis();" + "\r\n" + +" String location =System.getProperty(\"user.dir\")+\"/src/main/resources\";" + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" String file_name2= file.getOriginalFilename();" + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" File staticdir2 = new File(location+\"/incomingfile\");" + "\r\n" + +" if(!staticdir2.exists()) {" + "\r\n" + +" staticdir2.mkdir();" + "\r\n" + +" }" + "\r\n" + +" Path copyLocation2 = Paths" + "\r\n" + +" .get(staticdir2 + File.separator + StringUtils.cleanPath(file_name2));" + "\r\n" + +" " + "\r\n" + +" Files.copy(file.getInputStream(), copyLocation2, StandardCopyOption.REPLACE_EXISTING); " + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" File staticdir = new File(location+\"/processingfile\");" + "\r\n" + +" if(!staticdir.exists()) {" + "\r\n" + +" staticdir.mkdir();" + "\r\n" + +" }" + "\r\n" + +" Path copyLocation = Paths" + "\r\n" + +" .get(staticdir + File.separator + StringUtils.cleanPath(str+\".xlsx\"));" + "\r\n" + +" " + "\r\n" + +" Files.copy(file.getInputStream(), copyLocation, StandardCopyOption.REPLACE_EXISTING);" + "\r\n" + +" " + "\r\n" + +" " + "\r\n" + +" TemplateFileUpload exceldata= new TemplateFileUpload();" + "\r\n" + +" exceldata.setFile_location(location);" + "\r\n" + +" " + "\r\n" + +" exceldata.setFile_name(file.getOriginalFilename());" + "\r\n" + +" exceldata.setFile_changed_name(str);" + "\r\n" + +" exceldata.setFile_type(file_type);" + "\r\n" + +" exceldata.setUser_id(user_id);" + "\r\n" + +" repo.save(exceldata);" + "\r\n" + +" " + "\r\n" + +" System.out.println(\"-----------------------saving data----------------\");" + "\r\n" + +" return location;" + "\r\n" + +" } catch (Exception e) {" + "\r\n" + +" e.printStackTrace();" + "\r\n" + +" throw new RuntimeException(\"Could not store file \" + file.getOriginalFilename()" + "\r\n" + +" + \". Please try again!\");" + "\r\n" + +" }" + "\r\n" + +" " + "\r\n" + +" }" + "\r\n" + +"}" \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_TemplateFileUpload.java b/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_TemplateFileUpload.java new file mode 100644 index 0000000..fd00751 --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_TemplateFileUpload.java @@ -0,0 +1,27 @@ +"package com.realnet.template.entity;" + "\r\n" + +"" + "\r\n" + +"import javax.persistence.Entity;" + "\r\n" + +"import javax.persistence.GeneratedValue;" + "\r\n" + +"import javax.persistence.GenerationType;" + "\r\n" + +"import javax.persistence.Id;" + "\r\n" + +"" + "\r\n" + +"import lombok.AllArgsConstructor;" + "\r\n" + +"import lombok.Data;" + "\r\n" + +"import lombok.NoArgsConstructor;" + "\r\n" + +"" + "\r\n" + +"@Data" + "\r\n" + +"@Entity" + "\r\n" + +"@AllArgsConstructor" + "\r\n" + +"@NoArgsConstructor" + "\r\n" + +"public class TemplateFileUpload {" + "\r\n" + +" @Id" + "\r\n" + +" @GeneratedValue(strategy = GenerationType.IDENTITY)" + "\r\n" + +" private Long id;" + "\r\n" + +" " + "\r\n" + +" private Long user_id;" + "\r\n" + +" private String file_name;" + "\r\n" + +" private String file_changed_name;" + "\r\n" + +" private String file_location;" + "\r\n" + +" private String file_type;" + "\r\n" + +" private Integer status;" + "\r\n" + +"}" \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_TemplatedataRepo.java b/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_TemplatedataRepo.java new file mode 100644 index 0000000..48525fa --- /dev/null +++ b/backend/cns-portal/code-extractor/extracted-files/template (1)_1676960834933/static_code/SE_TemplatedataRepo.java @@ -0,0 +1,9 @@ +"package com.realnet.template.repository;" + "\r\n" + +"" + "\r\n" + +"import org.springframework.data.jpa.repository.JpaRepository;" + "\r\n" + +"" + "\r\n" + +"import com.realnet.template.entity.TemplateFileUpload;" + "\r\n" + +"" + "\r\n" + +"public interface TemplatedataRepo extends JpaRepository{" + "\r\n" + +"" + "\r\n" + +"}" \ No newline at end of file diff --git a/backend/cns-portal/code-extractor/zip-uploads/Abc_1665647440047_back.zip b/backend/cns-portal/code-extractor/zip-uploads/Abc_1665647440047_back.zip new file mode 100644 index 0000000..e35579f Binary files /dev/null and b/backend/cns-portal/code-extractor/zip-uploads/Abc_1665647440047_back.zip differ diff --git a/backend/cns-portal/code-extractor/zip-uploads/bugTracker (2).zip b/backend/cns-portal/code-extractor/zip-uploads/bugTracker (2).zip new file mode 100644 index 0000000..af928fe Binary files /dev/null and b/backend/cns-portal/code-extractor/zip-uploads/bugTracker (2).zip differ diff --git a/backend/cns-portal/code-extractor/zip-uploads/entityevents.zip b/backend/cns-portal/code-extractor/zip-uploads/entityevents.zip new file mode 100644 index 0000000..c59e943 Binary files /dev/null and b/backend/cns-portal/code-extractor/zip-uploads/entityevents.zip differ diff --git a/backend/cns-portal/code-extractor/zip-uploads/model.zip b/backend/cns-portal/code-extractor/zip-uploads/model.zip new file mode 100644 index 0000000..ee66204 Binary files /dev/null and b/backend/cns-portal/code-extractor/zip-uploads/model.zip differ diff --git a/backend/cns-portal/code-extractor/zip-uploads/template (1).zip b/backend/cns-portal/code-extractor/zip-uploads/template (1).zip new file mode 100644 index 0000000..36d50e7 Binary files /dev/null and b/backend/cns-portal/code-extractor/zip-uploads/template (1).zip differ diff --git a/backend/hs_err_pid6816.log b/backend/hs_err_pid6816.log new file mode 100644 index 0000000..4aa7edd --- /dev/null +++ b/backend/hs_err_pid6816.log @@ -0,0 +1,857 @@ +# +# There is insufficient memory for the Java Runtime Environment to continue. +# Native memory allocation (mmap) failed to map 258998272 bytes for G1 virtual space +# Possible reasons: +# The system is out of physical RAM or swap space +# The process is running with CompressedOops enabled, and the Java Heap may be blocking the growth of the native heap +# Possible solutions: +# Reduce memory load on the system +# Increase physical memory or swap space +# Check if swap backing store is full +# Decrease Java heap size (-Xmx/-Xms) +# Decrease number of Java threads +# Decrease Java thread stack sizes (-Xss) +# Set larger code cache with -XX:ReservedCodeCacheSize= +# JVM is running with Unscaled Compressed Oops mode in which the Java heap is +# placed in the first 4GB address space. The Java Heap base address is the +# maximum limit for the native heap growth. Please use -XX:HeapBaseMinAddress +# to set the Java Heap base and to place the Java Heap above 4GB virtual address. +# This output file may be truncated or incomplete. +# +# Out of Memory Error (./open/src/hotspot/os/windows/os_windows.cpp:3321), pid=6816, tid=7380 +# +# JRE version: OpenJDK Runtime Environment (15.0.2+7) (build 15.0.2+7-27) +# Java VM: OpenJDK 64-Bit Server VM (15.0.2+7-27, mixed mode, tiered, compressed oops, g1 gc, windows-amd64) +# No core dump will be written. Minidumps are not enabled by default on client versions of Windows +# + +--------------- S U M M A R Y ------------ + +Command Line: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=52447 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost -Dspring.jmx.enabled=true -Dspring.application.admin.enabled=true -XX:TieredStopAtLevel=1 -Dspring.boot.project.name=backend -Dfile.encoding=UTF-8 -XX:+ShowCodeDetailsInExceptionMessages com.realnet.RealNetApp --spring.output.ansi.enabled=always + +Host: Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz, 8 cores, 7G, Windows 10 , 64 bit Build 19041 (10.0.19041.1889) +Time: Sat Oct 1 12:47:37 2022 India Standard Time elapsed time: 7190.426722 seconds (0d 1h 59m 50s) + +--------------- T H R E A D --------------- + +Current thread (0x0000022579a517b0): VMThread "VM Thread" [stack: 0x0000005178000000,0x0000005178100000] [id=7380] + +Stack: [0x0000005178000000,0x0000005178100000] +[error occurred during error reporting (printing stack bounds), id 0xc0000005, EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00000225000010ad] + +Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) +V [jvm.dll+0x62ae9a] +V [jvm.dll+0x7817a9] +V [jvm.dll+0x782f03] +V [jvm.dll+0x7834c5] +V [jvm.dll+0x78347b] +V [jvm.dll+0x62a2b9] +V [jvm.dll+0x62aa88] +C [ntdll.dll+0xa235f] +C [ntdll.dll+0x514a4] +C [ntdll.dll+0xa0e8e] +C 0x00000225000010ad + +VM_Operation (0x000000517a7fe270): G1CollectForAllocation, mode: safepoint, requested by thread 0x000002250f7af090 + + +--------------- P R O C E S S --------------- + +Threads class SMR info: +_java_thread_list=0x0000022511157d10, length=35, elements={ +0x0000022579a59180, 0x000002257a295010, 0x000002257a282db0, 0x000002257a283770, +0x000002257a2c27b0, 0x000002257a2c59e0, 0x000002257a2b1240, 0x00000225799ec0f0, +0x000002257a525cf0, 0x000002257ae597c0, 0x000002257ae64180, 0x000002257ae61b20, +0x000002257aed5cb0, 0x000002257d9eeff0, 0x000002257d9efe60, 0x000002257d9ece40, +0x000002257d9ed310, 0x000002257d9ee180, 0x000002257d9ed7e0, 0x000002250f7af090, +0x000002250f7b1710, 0x000002250f7afa30, 0x000002250f7b0d70, 0x000002250f7aff00, +0x000002250f7b1be0, 0x000002250f7b03d0, 0x000002250f7ad3b0, 0x000002250f7ac070, +0x000002250f7b20b0, 0x000002250f7b2580, 0x000002250f7ac540, 0x000002250f7b1240, +0x000002250f7b2f20, 0x000002250f7b08a0, 0x00000225798d3150 +} + +Java Threads: ( => current thread ) + 0x0000022579a59180 JavaThread "Reference Handler" daemon [_thread_blocked, id=13212, stack(0x0000005178100000,0x0000005178200000)] + 0x000002257a295010 JavaThread "Finalizer" daemon [_thread_blocked, id=2780, stack(0x0000005178200000,0x0000005178300000)] + 0x000002257a282db0 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=2844, stack(0x0000005178300000,0x0000005178400000)] + 0x000002257a283770 JavaThread "Attach Listener" daemon [_thread_blocked, id=5488, stack(0x0000005178400000,0x0000005178500000)] + 0x000002257a2c27b0 JavaThread "Service Thread" daemon [_thread_blocked, id=4264, stack(0x0000005178500000,0x0000005178600000)] + 0x000002257a2c59e0 JavaThread "C1 CompilerThread0" daemon [_thread_blocked, id=15236, stack(0x0000005178600000,0x0000005178700000)] + 0x000002257a2b1240 JavaThread "Sweeper thread" daemon [_thread_blocked, id=17268, stack(0x0000005178700000,0x0000005178800000)] + 0x00000225799ec0f0 JavaThread "Common-Cleaner" daemon [_thread_blocked, id=4196, stack(0x0000005178800000,0x0000005178900000)] + 0x000002257a525cf0 JavaThread "Notification Thread" daemon [_thread_blocked, id=12716, stack(0x0000005178900000,0x0000005178a00000)] + 0x000002257ae597c0 JavaThread "RMI TCP Accept-0" daemon [_thread_in_native, id=5236, stack(0x0000005178a00000,0x0000005178b00000)] + 0x000002257ae64180 JavaThread "RMI TCP Accept-52447" daemon [_thread_in_native, id=14720, stack(0x0000005178b00000,0x0000005178c00000)] + 0x000002257ae61b20 JavaThread "RMI TCP Accept-0" daemon [_thread_in_native, id=9868, stack(0x0000005178c00000,0x0000005178d00000)] + 0x000002257aed5cb0 JavaThread "RMI Scheduler(0)" daemon [_thread_blocked, id=10268, stack(0x0000005178f00000,0x0000005179000000)] + 0x000002257d9eeff0 JavaThread "mysql-cj-abandoned-connection-cleanup" daemon [_thread_blocked, id=4324, stack(0x0000005179900000,0x0000005179a00000)] + 0x000002257d9efe60 JavaThread "HikariPool-1 housekeeper" daemon [_thread_blocked, id=14616, stack(0x000000517a300000,0x000000517a400000)] + 0x000002257d9ece40 JavaThread "Catalina-utility-1" [_thread_blocked, id=16064, stack(0x000000517a400000,0x000000517a500000)] + 0x000002257d9ed310 JavaThread "Catalina-utility-2" [_thread_blocked, id=5460, stack(0x000000517a500000,0x000000517a600000)] + 0x000002257d9ee180 JavaThread "container-0" [_thread_blocked, id=9248, stack(0x000000517a600000,0x000000517a700000)] + 0x000002257d9ed7e0 JavaThread "Live Reload Server" daemon [_thread_in_native, id=1116, stack(0x000000517a800000,0x000000517a900000)] + 0x000002250f7af090 JavaThread "File Watcher" daemon [_thread_blocked, id=16340, stack(0x000000517a700000,0x000000517a800000)] + 0x000002250f7b1710 JavaThread "http-nio-9191-BlockPoller" daemon [_thread_blocked, id=16692, stack(0x000000517a900000,0x000000517aa00000)] + 0x000002250f7afa30 JavaThread "http-nio-9191-exec-1" daemon [_thread_blocked, id=5556, stack(0x000000517aa00000,0x000000517ab00000)] + 0x000002250f7b0d70 JavaThread "http-nio-9191-exec-2" daemon [_thread_blocked, id=14708, stack(0x000000517ab00000,0x000000517ac00000)] + 0x000002250f7aff00 JavaThread "http-nio-9191-exec-3" daemon [_thread_blocked, id=13008, stack(0x000000517ac00000,0x000000517ad00000)] + 0x000002250f7b1be0 JavaThread "http-nio-9191-exec-4" daemon [_thread_blocked, id=13096, stack(0x000000517ad00000,0x000000517ae00000)] + 0x000002250f7b03d0 JavaThread "http-nio-9191-exec-5" daemon [_thread_blocked, id=14108, stack(0x000000517ae00000,0x000000517af00000)] + 0x000002250f7ad3b0 JavaThread "http-nio-9191-exec-6" daemon [_thread_blocked, id=8704, stack(0x000000517af00000,0x000000517b000000)] + 0x000002250f7ac070 JavaThread "http-nio-9191-exec-7" daemon [_thread_blocked, id=4628, stack(0x000000517b000000,0x000000517b100000)] + 0x000002250f7b20b0 JavaThread "http-nio-9191-exec-8" daemon [_thread_blocked, id=5404, stack(0x000000517b100000,0x000000517b200000)] + 0x000002250f7b2580 JavaThread "http-nio-9191-exec-9" daemon [_thread_blocked, id=10000, stack(0x000000517b200000,0x000000517b300000)] + 0x000002250f7ac540 JavaThread "http-nio-9191-exec-10" daemon [_thread_blocked, id=4308, stack(0x000000517b300000,0x000000517b400000)] + 0x000002250f7b1240 JavaThread "http-nio-9191-ClientPoller" daemon [_thread_blocked, id=13388, stack(0x000000517b400000,0x000000517b500000)] + 0x000002250f7b2f20 JavaThread "http-nio-9191-Acceptor" daemon [_thread_in_native, id=13888, stack(0x000000517b500000,0x000000517b600000)] + 0x000002250f7b08a0 JavaThread "DestroyJavaVM" [_thread_blocked, id=6624, stack(0x0000005177a00000,0x0000005177b00000)] + 0x00000225798d3150 JavaThread "HikariPool-1 connection closer" daemon [_thread_blocked, id=4052, stack(0x0000005178e00000,0x0000005178f00000)] + +Other Threads: +=>0x0000022579a517b0 VMThread "VM Thread" [stack: 0x0000005178000000,0x0000005178100000] [id=7380] + 0x000002256e840090 WatcherThread [stack: 0x0000005178d00000,0x0000005178e00000] [id=3596] + 0x000002256e87e610 GCTaskThread "GC Thread#0" [stack: 0x0000005177b00000,0x0000005177c00000] [id=14008] + 0x000002257af52e90 GCTaskThread "GC Thread#1" [stack: 0x0000005179200000,0x0000005179300000] [id=9240] + 0x000002257af554d0 GCTaskThread "GC Thread#2" [stack: 0x0000005179300000,0x0000005179400000] [id=5240] + 0x000002257af51b70 GCTaskThread "GC Thread#3" [stack: 0x0000005179a00000,0x0000005179b00000] [id=1644] + 0x000002257af531c0 GCTaskThread "GC Thread#4" [stack: 0x0000005179b00000,0x0000005179c00000] [id=16524] + 0x000002257af551a0 GCTaskThread "GC Thread#5" [stack: 0x0000005179c00000,0x0000005179d00000] [id=3664] + 0x000002257af51ea0 GCTaskThread "GC Thread#6" [stack: 0x0000005179d00000,0x0000005179e00000] [id=16160] + 0x000002257af534f0 GCTaskThread "GC Thread#7" [stack: 0x0000005179e00000,0x0000005179f00000] [id=14136] + 0x000002256e88fa80 ConcurrentGCThread "G1 Main Marker" [stack: 0x0000005177c00000,0x0000005177d00000] [id=2952] + 0x000002256e8906f0 ConcurrentGCThread "G1 Conc#0" [stack: 0x0000005177d00000,0x0000005177e00000] [id=6148] + 0x000002257af54b40 ConcurrentGCThread "G1 Conc#1" [stack: 0x0000005179f00000,0x000000517a000000] [id=8824] + 0x000002256e8f8c60 ConcurrentGCThread "G1 Refine#0" [stack: 0x0000005177e00000,0x0000005177f00000] [id=2460] + 0x000002257b6ef9f0 ConcurrentGCThread "G1 Refine#1" [stack: 0x0000005179400000,0x0000005179500000] [id=2916] + 0x000002257b6efd50 ConcurrentGCThread "G1 Refine#2" [stack: 0x0000005179500000,0x0000005179600000] [id=15184] + 0x000002257b6f00b0 ConcurrentGCThread "G1 Refine#3" [stack: 0x0000005179600000,0x0000005179700000] [id=10480] + 0x000002250f535480 ConcurrentGCThread "G1 Refine#4" [stack: 0x0000005177700000,0x0000005177800000] [id=8708] + 0x000002250f536200 ConcurrentGCThread "G1 Refine#5" [stack: 0x0000005177800000,0x0000005177900000] [id=2300] + 0x000002250f534dc0 ConcurrentGCThread "G1 Refine#6" [stack: 0x0000005177900000,0x0000005177a00000] [id=7800] + 0x000002256e8f98e0 ConcurrentGCThread "G1 Young RemSet Sampling" [stack: 0x0000005177f00000,0x0000005178000000] [id=6548] + +Threads with active compile tasks: + +VM state: at safepoint (normal execution) + +VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event]) +[0x000002256e83a3b0] Threads_lock - owner thread: 0x0000022579a517b0 +[0x000002256e839ab0] Heap_lock - owner thread: 0x000002250f7af090 + +Heap address: 0x0000000083000000, size: 2000 MB, Compressed Oops mode: 32-bit +CDS disabled. +Compressed class space mapped at: 0x0000000100000000-0x0000000140000000, size: 1073741824 +Narrow klass base: 0x0000000000000000, Narrow klass shift: 3, Narrow klass range: 0x140000000 + +GC Precious Log: + CPUs: 8 total, 8 available + Memory: 7995M + Large Page Support: Disabled + NUMA Support: Disabled + Compressed Oops: Enabled (32-bit) + Heap Region Size: 1M + Heap Min Capacity: 8M + Heap Initial Capacity: 126M + Heap Max Capacity: 2000M + Pre-touch: Disabled + Parallel Workers: 8 + Concurrent Workers: 2 + Concurrent Refinement Workers: 8 + Periodic GC: Disabled + +Heap: + garbage-first heap total 505856K, used 109623K [0x0000000083000000, 0x0000000100000000) + region size 1024K, 1 young (1024K), 1 survivors (1024K) + Metaspace used 104640K, capacity 106186K, committed 106416K, reserved 1142784K + class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K + +Heap Regions: E=young(eden), S=young(survivor), O=old, HS=humongous(starts), HC=humongous(continues), CS=collection set, F=free, OA=open archive, CA=closed archive, TAMS=top-at-mark-start (previous, next) +| 0|0x0000000083000000, 0x0000000083100000, 0x0000000083100000|100%|HS| |TAMS 0x0000000083100000, 0x0000000083000000| Complete +| 1|0x0000000083100000, 0x0000000083200000, 0x0000000083200000|100%| O| |TAMS 0x0000000083200000, 0x0000000083100000| Untracked +| 2|0x0000000083200000, 0x0000000083300000, 0x0000000083300000|100%| O| |TAMS 0x0000000083300000, 0x0000000083200000| Untracked +| 3|0x0000000083300000, 0x0000000083400000, 0x0000000083400000|100%| O| |TAMS 0x0000000083400000, 0x0000000083300000| Untracked +| 4|0x0000000083400000, 0x0000000083500000, 0x0000000083500000|100%| O| |TAMS 0x0000000083500000, 0x0000000083400000| Untracked +| 5|0x0000000083500000, 0x0000000083600000, 0x0000000083600000|100%| O| |TAMS 0x0000000083600000, 0x0000000083500000| Untracked +| 6|0x0000000083600000, 0x0000000083700000, 0x0000000083700000|100%| O| |TAMS 0x0000000083700000, 0x0000000083600000| Untracked +| 7|0x0000000083700000, 0x0000000083800000, 0x0000000083800000|100%| O| |TAMS 0x0000000083800000, 0x0000000083700000| Untracked +| 8|0x0000000083800000, 0x0000000083900000, 0x0000000083900000|100%| O| |TAMS 0x0000000083900000, 0x0000000083800000| Untracked +| 9|0x0000000083900000, 0x00000000839ffff8, 0x0000000083a00000| 99%| O| |TAMS 0x0000000083900000, 0x0000000083900000| Untracked +| 10|0x0000000083a00000, 0x0000000083b00000, 0x0000000083b00000|100%| O| |TAMS 0x0000000083b00000, 0x0000000083a00000| Untracked +| 11|0x0000000083b00000, 0x0000000083c00000, 0x0000000083c00000|100%| O| |TAMS 0x0000000083c00000, 0x0000000083b00000| Untracked +| 12|0x0000000083c00000, 0x0000000083d00000, 0x0000000083d00000|100%| O| |TAMS 0x0000000083d00000, 0x0000000083c00000| Untracked +| 13|0x0000000083d00000, 0x0000000083e00000, 0x0000000083e00000|100%| O| |TAMS 0x0000000083e00000, 0x0000000083d00000| Untracked +| 14|0x0000000083e00000, 0x0000000083f00000, 0x0000000083f00000|100%| O| |TAMS 0x0000000083f00000, 0x0000000083e00000| Untracked +| 15|0x0000000083f00000, 0x0000000084000000, 0x0000000084000000|100%| O| |TAMS 0x0000000083f00000, 0x0000000083f00000| Untracked +| 16|0x0000000084000000, 0x0000000084100000, 0x0000000084100000|100%| O| |TAMS 0x0000000084000000, 0x0000000084000000| Untracked +| 17|0x0000000084100000, 0x0000000084200000, 0x0000000084200000|100%| O| |TAMS 0x0000000084100000, 0x0000000084100000| Untracked +| 18|0x0000000084200000, 0x0000000084201800, 0x0000000084300000| 0%| O| |TAMS 0x0000000084200000, 0x0000000084200000| Untracked +| 19|0x0000000084300000, 0x0000000084300000, 0x0000000084400000| 0%| F| |TAMS 0x0000000084300000, 0x0000000084300000| Untracked +| 20|0x0000000084400000, 0x0000000084400000, 0x0000000084500000| 0%| F| |TAMS 0x0000000084400000, 0x0000000084400000| Untracked +| 21|0x0000000084500000, 0x0000000084500000, 0x0000000084600000| 0%| F| |TAMS 0x0000000084500000, 0x0000000084500000| Untracked +| 22|0x0000000084600000, 0x0000000084700000, 0x0000000084700000|100%| O| |TAMS 0x0000000084700000, 0x0000000084600000| Untracked +| 23|0x0000000084700000, 0x0000000084800000, 0x0000000084800000|100%| O| |TAMS 0x0000000084800000, 0x0000000084700000| Untracked +| 24|0x0000000084800000, 0x0000000084800000, 0x0000000084900000| 0%| F| |TAMS 0x0000000084800000, 0x0000000084800000| Untracked +| 25|0x0000000084900000, 0x0000000084900000, 0x0000000084a00000| 0%| F| |TAMS 0x0000000084900000, 0x0000000084900000| Untracked +| 26|0x0000000084a00000, 0x0000000084b00000, 0x0000000084b00000|100%| O| |TAMS 0x0000000084b00000, 0x0000000084a00000| Untracked +| 27|0x0000000084b00000, 0x0000000084b00000, 0x0000000084c00000| 0%| F| |TAMS 0x0000000084b00000, 0x0000000084b00000| Untracked +| 28|0x0000000084c00000, 0x0000000084d00000, 0x0000000084d00000|100%| O| |TAMS 0x0000000084d00000, 0x0000000084c00000| Untracked +| 29|0x0000000084d00000, 0x0000000084d00000, 0x0000000084e00000| 0%| F| |TAMS 0x0000000084d00000, 0x0000000084d00000| Untracked +| 30|0x0000000084e00000, 0x0000000084f00000, 0x0000000084f00000|100%| O| |TAMS 0x0000000084f00000, 0x0000000084e00000| Untracked +| 31|0x0000000084f00000, 0x0000000084f00000, 0x0000000085000000| 0%| F| |TAMS 0x0000000084f00000, 0x0000000084f00000| Untracked +| 32|0x0000000085000000, 0x0000000085100000, 0x0000000085100000|100%| O| |TAMS 0x0000000085100000, 0x0000000085000000| Untracked +| 33|0x0000000085100000, 0x0000000085200000, 0x0000000085200000|100%| O| |TAMS 0x0000000085200000, 0x0000000085100000| Untracked +| 34|0x0000000085200000, 0x0000000085300000, 0x0000000085300000|100%| O| |TAMS 0x0000000085300000, 0x0000000085200000| Untracked +| 35|0x0000000085300000, 0x0000000085400000, 0x0000000085400000|100%| O| |TAMS 0x0000000085400000, 0x0000000085300000| Untracked +| 36|0x0000000085400000, 0x0000000085500000, 0x0000000085500000|100%| O| |TAMS 0x0000000085500000, 0x0000000085400000| Untracked +| 37|0x0000000085500000, 0x0000000085600000, 0x0000000085600000|100%| O| |TAMS 0x0000000085600000, 0x0000000085500000| Untracked +| 38|0x0000000085600000, 0x0000000085700000, 0x0000000085700000|100%| O| |TAMS 0x0000000085700000, 0x0000000085600000| Untracked +| 39|0x0000000085700000, 0x0000000085800000, 0x0000000085800000|100%| O| |TAMS 0x0000000085800000, 0x0000000085700000| Untracked +| 40|0x0000000085800000, 0x0000000085900000, 0x0000000085900000|100%| O| |TAMS 0x0000000085900000, 0x0000000085800000| Untracked +| 41|0x0000000085900000, 0x0000000085a00000, 0x0000000085a00000|100%| O| |TAMS 0x0000000085a00000, 0x0000000085900000| Untracked +| 42|0x0000000085a00000, 0x0000000085b00000, 0x0000000085b00000|100%| O| |TAMS 0x0000000085b00000, 0x0000000085a00000| Untracked +| 43|0x0000000085b00000, 0x0000000085c00000, 0x0000000085c00000|100%| O| |TAMS 0x0000000085c00000, 0x0000000085b00000| Untracked +| 44|0x0000000085c00000, 0x0000000085d00000, 0x0000000085d00000|100%| O| |TAMS 0x0000000085d00000, 0x0000000085c00000| Untracked +| 45|0x0000000085d00000, 0x0000000085d00000, 0x0000000085e00000| 0%| F| |TAMS 0x0000000085d00000, 0x0000000085d00000| Untracked +| 46|0x0000000085e00000, 0x0000000085e00000, 0x0000000085f00000| 0%| F| |TAMS 0x0000000085e00000, 0x0000000085e00000| Untracked +| 47|0x0000000085f00000, 0x0000000086000000, 0x0000000086000000|100%| O| |TAMS 0x0000000086000000, 0x0000000085f00000| Untracked +| 48|0x0000000086000000, 0x0000000086100000, 0x0000000086100000|100%| O| |TAMS 0x0000000086100000, 0x0000000086000000| Untracked +| 49|0x0000000086100000, 0x0000000086200000, 0x0000000086200000|100%| O| |TAMS 0x0000000086200000, 0x0000000086100000| Untracked +| 50|0x0000000086200000, 0x0000000086300000, 0x0000000086300000|100%| O| |TAMS 0x0000000086300000, 0x0000000086200000| Untracked +| 51|0x0000000086300000, 0x0000000086400000, 0x0000000086400000|100%| O| |TAMS 0x0000000086400000, 0x0000000086300000| Untracked +| 52|0x0000000086400000, 0x0000000086500000, 0x0000000086500000|100%| O| |TAMS 0x0000000086500000, 0x0000000086400000| Untracked +| 53|0x0000000086500000, 0x0000000086600000, 0x0000000086600000|100%| O| |TAMS 0x0000000086600000, 0x0000000086500000| Untracked +| 54|0x0000000086600000, 0x0000000086700000, 0x0000000086700000|100%| O| |TAMS 0x0000000086700000, 0x0000000086600000| Untracked +| 55|0x0000000086700000, 0x0000000086800000, 0x0000000086800000|100%| O| |TAMS 0x0000000086800000, 0x0000000086700000| Untracked +| 56|0x0000000086800000, 0x0000000086900000, 0x0000000086900000|100%| O| |TAMS 0x0000000086900000, 0x0000000086800000| Untracked +| 57|0x0000000086900000, 0x0000000086a00000, 0x0000000086a00000|100%| O| |TAMS 0x0000000086a00000, 0x0000000086900000| Untracked +| 58|0x0000000086a00000, 0x0000000086a00000, 0x0000000086b00000| 0%| F| |TAMS 0x0000000086a00000, 0x0000000086a00000| Untracked +| 59|0x0000000086b00000, 0x0000000086c00000, 0x0000000086c00000|100%| O| |TAMS 0x0000000086c00000, 0x0000000086b00000| Untracked +| 60|0x0000000086c00000, 0x0000000086d00000, 0x0000000086d00000|100%| O| |TAMS 0x0000000086d00000, 0x0000000086c00000| Untracked +| 61|0x0000000086d00000, 0x0000000086e00000, 0x0000000086e00000|100%| O| |TAMS 0x0000000086e00000, 0x0000000086d00000| Untracked +| 62|0x0000000086e00000, 0x0000000086f00000, 0x0000000086f00000|100%| O| |TAMS 0x0000000086f00000, 0x0000000086e00000| Untracked +| 63|0x0000000086f00000, 0x0000000086f00000, 0x0000000087000000| 0%| F| |TAMS 0x0000000086f00000, 0x0000000086f00000| Untracked +| 64|0x0000000087000000, 0x0000000087100000, 0x0000000087100000|100%| O| |TAMS 0x0000000087100000, 0x0000000087000000| Untracked +| 65|0x0000000087100000, 0x0000000087200000, 0x0000000087200000|100%| O| |TAMS 0x0000000087200000, 0x0000000087100000| Untracked +| 66|0x0000000087200000, 0x0000000087200000, 0x0000000087300000| 0%| F| |TAMS 0x0000000087200000, 0x0000000087200000| Untracked +| 67|0x0000000087300000, 0x0000000087300000, 0x0000000087400000| 0%| F| |TAMS 0x0000000087300000, 0x0000000087300000| Untracked +| 68|0x0000000087400000, 0x0000000087500000, 0x0000000087500000|100%| O| |TAMS 0x0000000087500000, 0x0000000087400000| Untracked +| 69|0x0000000087500000, 0x0000000087600000, 0x0000000087600000|100%| O| |TAMS 0x0000000087600000, 0x0000000087500000| Untracked +| 70|0x0000000087600000, 0x0000000087600000, 0x0000000087700000| 0%| F| |TAMS 0x0000000087600000, 0x0000000087600000| Untracked +| 71|0x0000000087700000, 0x0000000087800000, 0x0000000087800000|100%| O| |TAMS 0x0000000087800000, 0x0000000087700000| Untracked +| 72|0x0000000087800000, 0x0000000087900000, 0x0000000087900000|100%| O| |TAMS 0x0000000087900000, 0x0000000087800000| Untracked +| 73|0x0000000087900000, 0x0000000087a00000, 0x0000000087a00000|100%| O| |TAMS 0x0000000087a00000, 0x0000000087900000| Untracked +| 74|0x0000000087a00000, 0x0000000087b00000, 0x0000000087b00000|100%| O| |TAMS 0x0000000087b00000, 0x0000000087a00000| Untracked +| 75|0x0000000087b00000, 0x0000000087c00000, 0x0000000087c00000|100%| O| |TAMS 0x0000000087c00000, 0x0000000087b00000| Untracked +| 76|0x0000000087c00000, 0x0000000087d00000, 0x0000000087d00000|100%| O| |TAMS 0x0000000087d00000, 0x0000000087c00000| Untracked +| 77|0x0000000087d00000, 0x0000000087e00000, 0x0000000087e00000|100%| O| |TAMS 0x0000000087e00000, 0x0000000087d00000| Untracked +| 78|0x0000000087e00000, 0x0000000087e00000, 0x0000000087f00000| 0%| F| |TAMS 0x0000000087e00000, 0x0000000087e00000| Untracked +| 79|0x0000000087f00000, 0x0000000088000000, 0x0000000088000000|100%| O| |TAMS 0x0000000088000000, 0x0000000087f00000| Untracked +| 80|0x0000000088000000, 0x0000000088100000, 0x0000000088100000|100%| O| |TAMS 0x0000000088100000, 0x0000000088000000| Untracked +| 81|0x0000000088100000, 0x0000000088200000, 0x0000000088200000|100%| O| |TAMS 0x0000000088200000, 0x0000000088100000| Untracked +| 82|0x0000000088200000, 0x0000000088300000, 0x0000000088300000|100%| O| |TAMS 0x0000000088300000, 0x0000000088200000| Untracked +| 83|0x0000000088300000, 0x0000000088400000, 0x0000000088400000|100%| O| |TAMS 0x0000000088400000, 0x0000000088300000| Untracked +| 84|0x0000000088400000, 0x0000000088400000, 0x0000000088500000| 0%| F| |TAMS 0x0000000088400000, 0x0000000088400000| Untracked +| 85|0x0000000088500000, 0x0000000088600000, 0x0000000088600000|100%| O| |TAMS 0x0000000088600000, 0x0000000088500000| Untracked +| 86|0x0000000088600000, 0x0000000088700000, 0x0000000088700000|100%| O| |TAMS 0x0000000088700000, 0x0000000088600000| Untracked +| 87|0x0000000088700000, 0x0000000088700000, 0x0000000088800000| 0%| F| |TAMS 0x0000000088700000, 0x0000000088700000| Untracked +| 88|0x0000000088800000, 0x0000000088900000, 0x0000000088900000|100%| O| |TAMS 0x0000000088900000, 0x0000000088800000| Untracked +| 89|0x0000000088900000, 0x0000000088a00000, 0x0000000088a00000|100%| O| |TAMS 0x0000000088a00000, 0x0000000088900000| Untracked +| 90|0x0000000088a00000, 0x0000000088b00000, 0x0000000088b00000|100%| O| |TAMS 0x0000000088b00000, 0x0000000088a00000| Untracked +| 91|0x0000000088b00000, 0x0000000088c00000, 0x0000000088c00000|100%| O| |TAMS 0x0000000088c00000, 0x0000000088b00000| Untracked +| 92|0x0000000088c00000, 0x0000000088d00000, 0x0000000088d00000|100%| O| |TAMS 0x0000000088d00000, 0x0000000088c00000| Untracked +| 93|0x0000000088d00000, 0x0000000088e00000, 0x0000000088e00000|100%| O| |TAMS 0x0000000088e00000, 0x0000000088d00000| Untracked +| 94|0x0000000088e00000, 0x0000000088f00000, 0x0000000088f00000|100%| O| |TAMS 0x0000000088f00000, 0x0000000088e00000| Untracked +| 95|0x0000000088f00000, 0x0000000089000000, 0x0000000089000000|100%| O| |TAMS 0x0000000089000000, 0x0000000088f00000| Untracked +| 96|0x0000000089000000, 0x0000000089100000, 0x0000000089100000|100%| O| |TAMS 0x0000000089100000, 0x0000000089000000| Untracked +| 97|0x0000000089100000, 0x0000000089200000, 0x0000000089200000|100%| O| |TAMS 0x0000000089200000, 0x0000000089100000| Untracked +| 98|0x0000000089200000, 0x0000000089300000, 0x0000000089300000|100%| O| |TAMS 0x0000000089300000, 0x0000000089200000| Untracked +| 99|0x0000000089300000, 0x0000000089400000, 0x0000000089400000|100%| O| |TAMS 0x0000000089400000, 0x0000000089300000| Untracked +| 100|0x0000000089400000, 0x0000000089500000, 0x0000000089500000|100%| O| |TAMS 0x0000000089500000, 0x0000000089400000| Untracked +| 101|0x0000000089500000, 0x0000000089600000, 0x0000000089600000|100%| O| |TAMS 0x0000000089600000, 0x0000000089500000| Untracked +| 102|0x0000000089600000, 0x0000000089700000, 0x0000000089700000|100%| O| |TAMS 0x0000000089700000, 0x0000000089600000| Untracked +| 103|0x0000000089700000, 0x0000000089800000, 0x0000000089800000|100%| O| |TAMS 0x0000000089800000, 0x0000000089700000| Untracked +| 104|0x0000000089800000, 0x0000000089900000, 0x0000000089900000|100%| O| |TAMS 0x0000000089900000, 0x0000000089800000| Untracked +| 105|0x0000000089900000, 0x0000000089a00000, 0x0000000089a00000|100%| O| |TAMS 0x0000000089a00000, 0x0000000089900000| Untracked +| 106|0x0000000089a00000, 0x0000000089a00000, 0x0000000089b00000| 0%| F| |TAMS 0x0000000089a00000, 0x0000000089a00000| Untracked +| 107|0x0000000089b00000, 0x0000000089b00000, 0x0000000089c00000| 0%| F| |TAMS 0x0000000089b00000, 0x0000000089b00000| Untracked +| 108|0x0000000089c00000, 0x0000000089d00000, 0x0000000089d00000|100%| O| |TAMS 0x0000000089d00000, 0x0000000089c00000| Untracked +| 109|0x0000000089d00000, 0x0000000089e00000, 0x0000000089e00000|100%| O| |TAMS 0x0000000089e00000, 0x0000000089d00000| Untracked +| 110|0x0000000089e00000, 0x0000000089f00000, 0x0000000089f00000|100%| O| |TAMS 0x0000000089f00000, 0x0000000089e00000| Untracked +| 111|0x0000000089f00000, 0x000000008a000000, 0x000000008a000000|100%| O| |TAMS 0x000000008a000000, 0x0000000089f00000| Untracked +| 112|0x000000008a000000, 0x000000008a100000, 0x000000008a100000|100%| O| |TAMS 0x000000008a0d5800, 0x000000008a000000| Untracked +| 113|0x000000008a100000, 0x000000008a200000, 0x000000008a200000|100%| O| |TAMS 0x000000008a100000, 0x000000008a100000| Untracked +| 114|0x000000008a200000, 0x000000008a300000, 0x000000008a300000|100%| O| |TAMS 0x000000008a200000, 0x000000008a200000| Untracked +| 115|0x000000008a300000, 0x000000008a400000, 0x000000008a400000|100%| O| |TAMS 0x000000008a300000, 0x000000008a300000| Untracked +| 116|0x000000008a400000, 0x000000008a500000, 0x000000008a500000|100%| O| |TAMS 0x000000008a400000, 0x000000008a400000| Untracked +| 117|0x000000008a500000, 0x000000008a600000, 0x000000008a600000|100%| O| |TAMS 0x000000008a500000, 0x000000008a500000| Untracked +| 118|0x000000008a600000, 0x000000008a700000, 0x000000008a700000|100%| O| |TAMS 0x000000008a600000, 0x000000008a600000| Untracked +| 119|0x000000008a700000, 0x000000008a800000, 0x000000008a800000|100%| O| |TAMS 0x000000008a700000, 0x000000008a700000| Untracked +| 120|0x000000008a800000, 0x000000008a900000, 0x000000008a900000|100%| O| |TAMS 0x000000008a800000, 0x000000008a800000| Untracked +| 121|0x000000008a900000, 0x000000008aa00000, 0x000000008aa00000|100%| O| |TAMS 0x000000008a900000, 0x000000008a900000| Untracked +| 122|0x000000008aa00000, 0x000000008ab00000, 0x000000008ab00000|100%| O| |TAMS 0x000000008aa00000, 0x000000008aa00000| Untracked +| 123|0x000000008ab00000, 0x000000008ac00000, 0x000000008ac00000|100%| O| |TAMS 0x000000008ab00000, 0x000000008ab00000| Untracked +| 124|0x000000008ac00000, 0x000000008ad00000, 0x000000008ad00000|100%| O| |TAMS 0x000000008ac00000, 0x000000008ac00000| Untracked +| 125|0x000000008ad00000, 0x000000008ae00000, 0x000000008ae00000|100%| O| |TAMS 0x000000008ad00000, 0x000000008ad00000| Untracked +| 126|0x000000008ae00000, 0x000000008af00000, 0x000000008af00000|100%| O| |TAMS 0x000000008ae00000, 0x000000008ae00000| Untracked +| 127|0x000000008af00000, 0x000000008b000000, 0x000000008b000000|100%| O| |TAMS 0x000000008af00000, 0x000000008af00000| Untracked +| 128|0x000000008b000000, 0x000000008b000000, 0x000000008b100000| 0%| F| |TAMS 0x000000008b000000, 0x000000008b000000| Untracked +| 129|0x000000008b100000, 0x000000008b100000, 0x000000008b200000| 0%| F| |TAMS 0x000000008b100000, 0x000000008b100000| Untracked +| 130|0x000000008b200000, 0x000000008b200000, 0x000000008b300000| 0%| F| |TAMS 0x000000008b200000, 0x000000008b200000| Untracked +| 131|0x000000008b300000, 0x000000008b300000, 0x000000008b400000| 0%| F| |TAMS 0x000000008b300000, 0x000000008b300000| Untracked +| 132|0x000000008b400000, 0x000000008b400000, 0x000000008b500000| 0%| F| |TAMS 0x000000008b400000, 0x000000008b400000| Untracked +| 133|0x000000008b500000, 0x000000008b500000, 0x000000008b600000| 0%| F| |TAMS 0x000000008b500000, 0x000000008b500000| Untracked +| 134|0x000000008b600000, 0x000000008b600000, 0x000000008b700000| 0%| F| |TAMS 0x000000008b600000, 0x000000008b600000| Untracked +| 135|0x000000008b700000, 0x000000008b700000, 0x000000008b800000| 0%| F| |TAMS 0x000000008b700000, 0x000000008b700000| Untracked +| 136|0x000000008b800000, 0x000000008b800000, 0x000000008b900000| 0%| F| |TAMS 0x000000008b800000, 0x000000008b800000| Untracked +| 137|0x000000008b900000, 0x000000008b900000, 0x000000008ba00000| 0%| F| |TAMS 0x000000008b900000, 0x000000008b900000| Untracked +| 138|0x000000008ba00000, 0x000000008ba00000, 0x000000008bb00000| 0%| F| |TAMS 0x000000008ba00000, 0x000000008ba00000| Untracked +| 139|0x000000008bb00000, 0x000000008bb00000, 0x000000008bc00000| 0%| F| |TAMS 0x000000008bb00000, 0x000000008bb00000| Untracked +| 140|0x000000008bc00000, 0x000000008bc00000, 0x000000008bd00000| 0%| F| |TAMS 0x000000008bc00000, 0x000000008bc00000| Untracked +| 141|0x000000008bd00000, 0x000000008bd00000, 0x000000008be00000| 0%| F| |TAMS 0x000000008bd00000, 0x000000008bd00000| Untracked +| 142|0x000000008be00000, 0x000000008be00000, 0x000000008bf00000| 0%| F| |TAMS 0x000000008be00000, 0x000000008be00000| Untracked +| 143|0x000000008bf00000, 0x000000008bf00000, 0x000000008c000000| 0%| F| |TAMS 0x000000008bf00000, 0x000000008bf00000| Untracked +| 144|0x000000008c000000, 0x000000008c000000, 0x000000008c100000| 0%| F| |TAMS 0x000000008c000000, 0x000000008c000000| Untracked +| 145|0x000000008c100000, 0x000000008c100000, 0x000000008c200000| 0%| F| |TAMS 0x000000008c100000, 0x000000008c100000| Untracked +| 146|0x000000008c200000, 0x000000008c200000, 0x000000008c300000| 0%| F| |TAMS 0x000000008c200000, 0x000000008c200000| Untracked +| 147|0x000000008c300000, 0x000000008c300000, 0x000000008c400000| 0%| F| |TAMS 0x000000008c300000, 0x000000008c300000| Untracked +| 148|0x000000008c400000, 0x000000008c400000, 0x000000008c500000| 0%| F| |TAMS 0x000000008c400000, 0x000000008c400000| Untracked +| 149|0x000000008c500000, 0x000000008c500000, 0x000000008c600000| 0%| F| |TAMS 0x000000008c500000, 0x000000008c500000| Untracked +| 150|0x000000008c600000, 0x000000008c600000, 0x000000008c700000| 0%| F| |TAMS 0x000000008c600000, 0x000000008c600000| Untracked +| 151|0x000000008c700000, 0x000000008c700000, 0x000000008c800000| 0%| F| |TAMS 0x000000008c700000, 0x000000008c700000| Untracked +| 152|0x000000008c800000, 0x000000008c800000, 0x000000008c900000| 0%| F| |TAMS 0x000000008c800000, 0x000000008c800000| Untracked +| 153|0x000000008c900000, 0x000000008c900000, 0x000000008ca00000| 0%| F| |TAMS 0x000000008c900000, 0x000000008c900000| Untracked +| 154|0x000000008ca00000, 0x000000008ca00000, 0x000000008cb00000| 0%| F| |TAMS 0x000000008ca00000, 0x000000008ca00000| Untracked +| 155|0x000000008cb00000, 0x000000008cb00000, 0x000000008cc00000| 0%| F| |TAMS 0x000000008cb00000, 0x000000008cb00000| Untracked +| 156|0x000000008cc00000, 0x000000008cc00000, 0x000000008cd00000| 0%| F| |TAMS 0x000000008cc00000, 0x000000008cc00000| Untracked +| 157|0x000000008cd00000, 0x000000008cd00000, 0x000000008ce00000| 0%| F| |TAMS 0x000000008cd00000, 0x000000008cd00000| Untracked +| 158|0x000000008ce00000, 0x000000008ce00000, 0x000000008cf00000| 0%| F| |TAMS 0x000000008ce00000, 0x000000008ce00000| Untracked +| 159|0x000000008cf00000, 0x000000008cf00000, 0x000000008d000000| 0%| F| |TAMS 0x000000008cf00000, 0x000000008cf00000| Untracked +| 160|0x000000008d000000, 0x000000008d000000, 0x000000008d100000| 0%| F| |TAMS 0x000000008d000000, 0x000000008d000000| Untracked +| 161|0x000000008d100000, 0x000000008d100000, 0x000000008d200000| 0%| F| |TAMS 0x000000008d100000, 0x000000008d100000| Untracked +| 162|0x000000008d200000, 0x000000008d200000, 0x000000008d300000| 0%| F| |TAMS 0x000000008d200000, 0x000000008d200000| Untracked +| 163|0x000000008d300000, 0x000000008d300000, 0x000000008d400000| 0%| F| |TAMS 0x000000008d300000, 0x000000008d300000| Untracked +| 164|0x000000008d400000, 0x000000008d400000, 0x000000008d500000| 0%| F| |TAMS 0x000000008d400000, 0x000000008d400000| Untracked +| 165|0x000000008d500000, 0x000000008d500000, 0x000000008d600000| 0%| F| |TAMS 0x000000008d500000, 0x000000008d500000| Untracked +| 166|0x000000008d600000, 0x000000008d600000, 0x000000008d700000| 0%| F| |TAMS 0x000000008d600000, 0x000000008d600000| Untracked +| 167|0x000000008d700000, 0x000000008d700000, 0x000000008d800000| 0%| F| |TAMS 0x000000008d700000, 0x000000008d700000| Untracked +| 168|0x000000008d800000, 0x000000008d800000, 0x000000008d900000| 0%| F| |TAMS 0x000000008d800000, 0x000000008d800000| Untracked +| 169|0x000000008d900000, 0x000000008d900000, 0x000000008da00000| 0%| F| |TAMS 0x000000008d900000, 0x000000008d900000| Untracked +| 170|0x000000008da00000, 0x000000008da00000, 0x000000008db00000| 0%| F| |TAMS 0x000000008da00000, 0x000000008da00000| Untracked +| 171|0x000000008db00000, 0x000000008db00000, 0x000000008dc00000| 0%| F| |TAMS 0x000000008db00000, 0x000000008db00000| Untracked +| 172|0x000000008dc00000, 0x000000008dc00000, 0x000000008dd00000| 0%| F| |TAMS 0x000000008dc00000, 0x000000008dc00000| Untracked +| 173|0x000000008dd00000, 0x000000008dd00000, 0x000000008de00000| 0%| F| |TAMS 0x000000008dd00000, 0x000000008dd00000| Untracked +| 174|0x000000008de00000, 0x000000008de00000, 0x000000008df00000| 0%| F| |TAMS 0x000000008de00000, 0x000000008de00000| Untracked +| 175|0x000000008df00000, 0x000000008df00000, 0x000000008e000000| 0%| F| |TAMS 0x000000008df00000, 0x000000008df00000| Untracked +| 176|0x000000008e000000, 0x000000008e000000, 0x000000008e100000| 0%| F| |TAMS 0x000000008e000000, 0x000000008e000000| Untracked +| 177|0x000000008e100000, 0x000000008e100000, 0x000000008e200000| 0%| F| |TAMS 0x000000008e100000, 0x000000008e100000| Untracked +| 178|0x000000008e200000, 0x000000008e200000, 0x000000008e300000| 0%| F| |TAMS 0x000000008e200000, 0x000000008e200000| Untracked +| 179|0x000000008e300000, 0x000000008e300000, 0x000000008e400000| 0%| F| |TAMS 0x000000008e300000, 0x000000008e300000| Untracked +| 180|0x000000008e400000, 0x000000008e400000, 0x000000008e500000| 0%| F| |TAMS 0x000000008e400000, 0x000000008e400000| Untracked +| 181|0x000000008e500000, 0x000000008e500000, 0x000000008e600000| 0%| F| |TAMS 0x000000008e500000, 0x000000008e500000| Untracked +| 182|0x000000008e600000, 0x000000008e600000, 0x000000008e700000| 0%| F| |TAMS 0x000000008e600000, 0x000000008e600000| Untracked +| 183|0x000000008e700000, 0x000000008e700000, 0x000000008e800000| 0%| F| |TAMS 0x000000008e700000, 0x000000008e700000| Untracked +| 184|0x000000008e800000, 0x000000008e800000, 0x000000008e900000| 0%| F| |TAMS 0x000000008e800000, 0x000000008e800000| Untracked +| 185|0x000000008e900000, 0x000000008e900000, 0x000000008ea00000| 0%| F| |TAMS 0x000000008e900000, 0x000000008e900000| Untracked +| 186|0x000000008ea00000, 0x000000008ea00000, 0x000000008eb00000| 0%| F| |TAMS 0x000000008ea00000, 0x000000008ea00000| Untracked +| 187|0x000000008eb00000, 0x000000008eb00000, 0x000000008ec00000| 0%| F| |TAMS 0x000000008eb00000, 0x000000008eb00000| Untracked +| 188|0x000000008ec00000, 0x000000008ec00000, 0x000000008ed00000| 0%| F| |TAMS 0x000000008ec00000, 0x000000008ec00000| Untracked +| 189|0x000000008ed00000, 0x000000008ed00000, 0x000000008ee00000| 0%| F| |TAMS 0x000000008ed00000, 0x000000008ed00000| Untracked +| 190|0x000000008ee00000, 0x000000008ee00000, 0x000000008ef00000| 0%| F| |TAMS 0x000000008ee00000, 0x000000008ee00000| Untracked +| 191|0x000000008ef00000, 0x000000008ef00000, 0x000000008f000000| 0%| F| |TAMS 0x000000008ef00000, 0x000000008ef00000| Untracked +| 192|0x000000008f000000, 0x000000008f000000, 0x000000008f100000| 0%| F| |TAMS 0x000000008f000000, 0x000000008f000000| Untracked +| 193|0x000000008f100000, 0x000000008f100000, 0x000000008f200000| 0%| F| |TAMS 0x000000008f100000, 0x000000008f100000| Untracked +| 194|0x000000008f200000, 0x000000008f200000, 0x000000008f300000| 0%| F| |TAMS 0x000000008f200000, 0x000000008f200000| Untracked +| 195|0x000000008f300000, 0x000000008f300000, 0x000000008f400000| 0%| F| |TAMS 0x000000008f300000, 0x000000008f300000| Untracked +| 196|0x000000008f400000, 0x000000008f400000, 0x000000008f500000| 0%| F| |TAMS 0x000000008f400000, 0x000000008f400000| Untracked +| 197|0x000000008f500000, 0x000000008f500000, 0x000000008f600000| 0%| F| |TAMS 0x000000008f500000, 0x000000008f500000| Untracked +| 198|0x000000008f600000, 0x000000008f600000, 0x000000008f700000| 0%| F| |TAMS 0x000000008f600000, 0x000000008f600000| Untracked +| 199|0x000000008f700000, 0x000000008f700000, 0x000000008f800000| 0%| F| |TAMS 0x000000008f700000, 0x000000008f700000| Untracked +| 200|0x000000008f800000, 0x000000008f800000, 0x000000008f900000| 0%| F| |TAMS 0x000000008f800000, 0x000000008f800000| Untracked +| 201|0x000000008f900000, 0x000000008f900000, 0x000000008fa00000| 0%| F| |TAMS 0x000000008f900000, 0x000000008f900000| Untracked +| 202|0x000000008fa00000, 0x000000008fa00000, 0x000000008fb00000| 0%| F| |TAMS 0x000000008fa00000, 0x000000008fa00000| Untracked +| 203|0x000000008fb00000, 0x000000008fb00000, 0x000000008fc00000| 0%| F| |TAMS 0x000000008fb00000, 0x000000008fb00000| Untracked +| 204|0x000000008fc00000, 0x000000008fc00000, 0x000000008fd00000| 0%| F| |TAMS 0x000000008fc00000, 0x000000008fc00000| Untracked +| 205|0x000000008fd00000, 0x000000008fd00000, 0x000000008fe00000| 0%| F| |TAMS 0x000000008fd00000, 0x000000008fd00000| Untracked +| 206|0x000000008fe00000, 0x000000008fe00000, 0x000000008ff00000| 0%| F| |TAMS 0x000000008fe00000, 0x000000008fe00000| Untracked +| 207|0x000000008ff00000, 0x000000008ff00000, 0x0000000090000000| 0%| F| |TAMS 0x000000008ff00000, 0x000000008ff00000| Untracked +| 208|0x0000000090000000, 0x0000000090000000, 0x0000000090100000| 0%| F| |TAMS 0x0000000090000000, 0x0000000090000000| Untracked +| 209|0x0000000090100000, 0x0000000090100000, 0x0000000090200000| 0%| F| |TAMS 0x0000000090100000, 0x0000000090100000| Untracked +| 210|0x0000000090200000, 0x0000000090200000, 0x0000000090300000| 0%| F| |TAMS 0x0000000090200000, 0x0000000090200000| Untracked +| 211|0x0000000090300000, 0x0000000090300000, 0x0000000090400000| 0%| F| |TAMS 0x0000000090300000, 0x0000000090300000| Untracked +| 212|0x0000000090400000, 0x0000000090400000, 0x0000000090500000| 0%| F| |TAMS 0x0000000090400000, 0x0000000090400000| Untracked +| 213|0x0000000090500000, 0x0000000090500000, 0x0000000090600000| 0%| F| |TAMS 0x0000000090500000, 0x0000000090500000| Untracked +| 214|0x0000000090600000, 0x0000000090600000, 0x0000000090700000| 0%| F| |TAMS 0x0000000090600000, 0x0000000090600000| Untracked +| 215|0x0000000090700000, 0x0000000090700000, 0x0000000090800000| 0%| F| |TAMS 0x0000000090700000, 0x0000000090700000| Untracked +| 216|0x0000000090800000, 0x0000000090800000, 0x0000000090900000| 0%| F| |TAMS 0x0000000090800000, 0x0000000090800000| Untracked +| 217|0x0000000090900000, 0x0000000090900000, 0x0000000090a00000| 0%| F| |TAMS 0x0000000090900000, 0x0000000090900000| Untracked +| 218|0x0000000090a00000, 0x0000000090a00000, 0x0000000090b00000| 0%| F| |TAMS 0x0000000090a00000, 0x0000000090a00000| Untracked +| 219|0x0000000090b00000, 0x0000000090b00000, 0x0000000090c00000| 0%| F| |TAMS 0x0000000090b00000, 0x0000000090b00000| Untracked +| 220|0x0000000090c00000, 0x0000000090c00000, 0x0000000090d00000| 0%| F| |TAMS 0x0000000090c00000, 0x0000000090c00000| Untracked +| 221|0x0000000090d00000, 0x0000000090d00000, 0x0000000090e00000| 0%| F| |TAMS 0x0000000090d00000, 0x0000000090d00000| Untracked +| 222|0x0000000090e00000, 0x0000000090e00000, 0x0000000090f00000| 0%| F| |TAMS 0x0000000090e00000, 0x0000000090e00000| Untracked +| 223|0x0000000090f00000, 0x0000000090f00000, 0x0000000091000000| 0%| F| |TAMS 0x0000000090f00000, 0x0000000090f00000| Untracked +| 224|0x0000000091000000, 0x0000000091000000, 0x0000000091100000| 0%| F| |TAMS 0x0000000091000000, 0x0000000091000000| Untracked +| 225|0x0000000091100000, 0x0000000091100000, 0x0000000091200000| 0%| F| |TAMS 0x0000000091100000, 0x0000000091100000| Untracked +| 226|0x0000000091200000, 0x0000000091200000, 0x0000000091300000| 0%| F| |TAMS 0x0000000091200000, 0x0000000091200000| Untracked +| 227|0x0000000091300000, 0x0000000091300000, 0x0000000091400000| 0%| F| |TAMS 0x0000000091300000, 0x0000000091300000| Untracked +| 228|0x0000000091400000, 0x0000000091400000, 0x0000000091500000| 0%| F| |TAMS 0x0000000091400000, 0x0000000091400000| Untracked +| 229|0x0000000091500000, 0x0000000091500000, 0x0000000091600000| 0%| F| |TAMS 0x0000000091500000, 0x0000000091500000| Untracked +| 230|0x0000000091600000, 0x0000000091600000, 0x0000000091700000| 0%| F| |TAMS 0x0000000091600000, 0x0000000091600000| Untracked +| 231|0x0000000091700000, 0x0000000091700000, 0x0000000091800000| 0%| F| |TAMS 0x0000000091700000, 0x0000000091700000| Untracked +| 232|0x0000000091800000, 0x0000000091800000, 0x0000000091900000| 0%| F| |TAMS 0x0000000091800000, 0x0000000091800000| Untracked +| 233|0x0000000091900000, 0x0000000091900000, 0x0000000091a00000| 0%| F| |TAMS 0x0000000091900000, 0x0000000091900000| Untracked +| 234|0x0000000091a00000, 0x0000000091a00000, 0x0000000091b00000| 0%| F| |TAMS 0x0000000091a00000, 0x0000000091a00000| Untracked +| 235|0x0000000091b00000, 0x0000000091b0c6f0, 0x0000000091c00000| 4%| S|CS|TAMS 0x0000000091b00000, 0x0000000091b00000| Complete +| 236|0x0000000091c00000, 0x0000000091c00000, 0x0000000091d00000| 0%| F| |TAMS 0x0000000091c00000, 0x0000000091c00000| Untracked +| 237|0x0000000091d00000, 0x0000000091d00000, 0x0000000091e00000| 0%| F| |TAMS 0x0000000091d00000, 0x0000000091d00000| Untracked +| 238|0x0000000091e00000, 0x0000000091e00000, 0x0000000091f00000| 0%| F| |TAMS 0x0000000091e00000, 0x0000000091e00000| Untracked +| 239|0x0000000091f00000, 0x0000000091f00000, 0x0000000092000000| 0%| F| |TAMS 0x0000000091f00000, 0x0000000091f00000| Untracked +| 240|0x0000000092000000, 0x0000000092000000, 0x0000000092100000| 0%| F| |TAMS 0x0000000092000000, 0x0000000092000000| Untracked +| 241|0x0000000092100000, 0x0000000092100000, 0x0000000092200000| 0%| F| |TAMS 0x0000000092100000, 0x0000000092100000| Untracked +| 242|0x0000000092200000, 0x0000000092200000, 0x0000000092300000| 0%| F| |TAMS 0x0000000092200000, 0x0000000092200000| Untracked +| 243|0x0000000092300000, 0x0000000092300000, 0x0000000092400000| 0%| F| |TAMS 0x0000000092300000, 0x0000000092300000| Untracked +| 244|0x0000000092400000, 0x0000000092400000, 0x0000000092500000| 0%| F| |TAMS 0x0000000092400000, 0x0000000092400000| Untracked +| 245|0x0000000092500000, 0x0000000092500000, 0x0000000092600000| 0%| F| |TAMS 0x0000000092500000, 0x0000000092500000| Untracked +| 246|0x0000000092600000, 0x0000000092600000, 0x0000000092700000| 0%| F| |TAMS 0x0000000092600000, 0x0000000092600000| Untracked + +Card table byte_map: [0x0000022572960000,0x0000022572d50000] _byte_map_base: 0x0000022572548000 + +Marking Bits (Prev, Next): (CMBitMap*) 0x000002256e87eec0, (CMBitMap*) 0x000002256e87ee80 + Prev Bits: [0x0000022575080000, 0x0000022576fc0000) + Next Bits: [0x0000022573140000, 0x0000022575080000) + +Polling page: 0x000002256e000000 + +Metaspace: + +Usage: + Non-class: 90.02 MB capacity, 89.02 MB ( 99%) used, 826.88 KB ( <1%) free+waste, 193.69 KB ( <1%) overhead. + Class: 13.68 MB capacity, 13.16 MB ( 96%) used, 446.24 KB ( 3%) free+waste, 79.12 KB ( <1%) overhead. + Both: 103.70 MB capacity, 102.19 MB ( 99%) used, 1.24 MB ( 1%) free+waste, 272.81 KB ( <1%) overhead. + +Virtual space: + Non-class space: 92.00 MB reserved, 90.17 MB ( 98%) committed + Class space: 1.00 GB reserved, 13.75 MB ( 1%) committed + Both: 1.09 GB reserved, 103.92 MB ( 9%) committed + +Chunk freelists: + Non-Class: 26.00 KB + Class: 12.00 KB + Both: 38.00 KB + +MaxMetaspaceSize: 17179869184.00 GB +CompressedClassSpaceSize: 1.00 GB + +CodeHeap 'non-profiled nmethods': size=238336Kb used=29635Kb max_used=29635Kb free=208700Kb + bounds [0x0000022500740000, 0x0000022502440000, 0x000002250f000000] +CodeHeap 'non-nmethods': size=7424Kb used=1403Kb max_used=1403Kb free=6020Kb + bounds [0x0000022500000000, 0x0000022500270000, 0x0000022500740000] + total_blobs=18391 nmethods=17678 adapters=639 + compilation: enabled + stopped_count=0, restarted_count=0 + full_count=0 + +Compilation events (20 events): +Event: 5890.706 Thread 0x000002257a2c59e0 18301 ! 1 sun.rmi.transport.Transport::serviceCall (349 bytes) +Event: 5891.217 Thread 0x000002257a2c59e0 nmethod 18301 0x0000022502426710 code [0x0000022502426ce0, 0x0000022502428b28] +Event: 5950.695 Thread 0x000002257a2c59e0 18309 1 sun.rmi.server.UnicastServerRef::unmarshalCustomCallData (31 bytes) +Event: 5950.702 Thread 0x000002257a2c59e0 nmethod 18309 0x000002250242ae10 code [0x000002250242afe0, 0x000002250242b288] +Event: 5950.702 Thread 0x000002257a2c59e0 18310 1 sun.rmi.transport.ConnectionInputStream::registerRefs (71 bytes) +Event: 5950.716 Thread 0x000002257a2c59e0 nmethod 18310 0x000002250242b410 code [0x000002250242b620, 0x000002250242b938] +Event: 5950.716 Thread 0x000002257a2c59e0 18311 ! 1 sun.rmi.transport.ConnectionInputStream::done (145 bytes) +Event: 5950.737 Thread 0x000002257a2c59e0 nmethod 18311 0x000002250242bb10 code [0x000002250242bde0, 0x000002250242d028] +Event: 6010.700 Thread 0x000002257a2c59e0 18312 1 java.net.InetSocketAddress::getAddress (8 bytes) +Event: 6010.700 Thread 0x000002257a2c59e0 nmethod 18312 0x000002250242db10 code [0x000002250242dca0, 0x000002250242dd58] +Event: 6265.740 Thread 0x000002257a2c59e0 18313 s! 1 java.net.Socket::close (47 bytes) +Event: 6265.740 Thread 0x000002257a2c59e0 nmethod 18313 0x000002250242de10 code [0x000002250242dfc0, 0x000002250242e2f8] +Event: 6360.856 Thread 0x000002257a2c59e0 18314 1 java.util.Collections::reverse (125 bytes) +Event: 6360.862 Thread 0x000002257a2c59e0 nmethod 18314 0x000002250242e490 code [0x000002250242e6c0, 0x000002250242ea48] +Event: 6490.769 Thread 0x000002257a2c59e0 18315 1 java.net.ServerSocket::isBound (5 bytes) +Event: 6490.769 Thread 0x000002257a2c59e0 nmethod 18315 0x000002250242ec90 code [0x000002250242ee20, 0x000002250242eed8] +Event: 6747.010 Thread 0x000002257a2c59e0 18316 1 java.util.concurrent.SynchronousQueue$TransferStack::awaitFulfill (169 bytes) +Event: 6747.383 Thread 0x000002257a2c59e0 nmethod 18316 0x000002250242ef90 code [0x000002250242f220, 0x000002250242ff98] +Event: 6793.452 Thread 0x000002257a2c59e0 18317 s 1 com.zaxxer.hikari.pool.HikariPool::fillPool (78 bytes) +Event: 6793.697 Thread 0x000002257a2c59e0 nmethod 18317 0x0000022502430590 code [0x0000022502430760, 0x0000022502430a28] + +GC Heap History (20 events): +Event: 6175.390 GC heap after +{Heap after GC invocations=162 (full 0): + garbage-first heap total 252928K, used 109784K [0x0000000083000000, 0x0000000100000000) + region size 1024K, 1 young (1024K), 1 survivors (1024K) + Metaspace used 104639K, capacity 106186K, committed 106416K, reserved 1142784K + class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K +} +Event: 6315.685 GC heap before +{Heap before GC invocations=162 (full 0): + garbage-first heap total 252928K, used 225496K [0x0000000083000000, 0x0000000100000000) + region size 1024K, 114 young (116736K), 1 survivors (1024K) + Metaspace used 104639K, capacity 106186K, committed 106416K, reserved 1142784K + class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K +} +Event: 6315.691 GC heap after +{Heap after GC invocations=163 (full 0): + garbage-first heap total 252928K, used 109802K [0x0000000083000000, 0x0000000100000000) + region size 1024K, 1 young (1024K), 1 survivors (1024K) + Metaspace used 104639K, capacity 106186K, committed 106416K, reserved 1142784K + class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K +} +Event: 6452.947 GC heap before +{Heap before GC invocations=163 (full 0): + garbage-first heap total 252928K, used 225514K [0x0000000083000000, 0x0000000100000000) + region size 1024K, 114 young (116736K), 1 survivors (1024K) + Metaspace used 104639K, capacity 106186K, committed 106416K, reserved 1142784K + class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K +} +Event: 6452.951 GC heap after +{Heap after GC invocations=164 (full 0): + garbage-first heap total 252928K, used 109747K [0x0000000083000000, 0x0000000100000000) + region size 1024K, 1 young (1024K), 1 survivors (1024K) + Metaspace used 104639K, capacity 106186K, committed 106416K, reserved 1142784K + class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K +} +Event: 6584.252 GC heap before +{Heap before GC invocations=164 (full 0): + garbage-first heap total 252928K, used 225459K [0x0000000083000000, 0x0000000100000000) + region size 1024K, 114 young (116736K), 1 survivors (1024K) + Metaspace used 104639K, capacity 106186K, committed 106416K, reserved 1142784K + class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K +} +Event: 6584.353 GC heap after +{Heap after GC invocations=165 (full 0): + garbage-first heap total 252928K, used 109779K [0x0000000083000000, 0x0000000100000000) + region size 1024K, 1 young (1024K), 1 survivors (1024K) + Metaspace used 104639K, capacity 106186K, committed 106416K, reserved 1142784K + class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K +} +Event: 6724.122 GC heap before +{Heap before GC invocations=165 (full 0): + garbage-first heap total 252928K, used 225491K [0x0000000083000000, 0x0000000100000000) + region size 1024K, 114 young (116736K), 1 survivors (1024K) + Metaspace used 104639K, capacity 106186K, committed 106416K, reserved 1142784K + class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K +} +Event: 6724.302 GC heap after +{Heap after GC invocations=166 (full 0): + garbage-first heap total 252928K, used 109770K [0x0000000083000000, 0x0000000100000000) + region size 1024K, 1 young (1024K), 1 survivors (1024K) + Metaspace used 104639K, capacity 106186K, committed 106416K, reserved 1142784K + class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K +} +Event: 6893.026 GC heap before +{Heap before GC invocations=166 (full 0): + garbage-first heap total 252928K, used 225482K [0x0000000083000000, 0x0000000100000000) + region size 1024K, 114 young (116736K), 1 survivors (1024K) + Metaspace used 104639K, capacity 106186K, committed 106416K, reserved 1142784K + class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K +} +Event: 6919.432 GC heap after +{Heap after GC invocations=167 (full 0): + garbage-first heap total 252928K, used 109731K [0x0000000083000000, 0x0000000100000000) + region size 1024K, 1 young (1024K), 1 survivors (1024K) + Metaspace used 104639K, capacity 106186K, committed 106416K, reserved 1142784K + class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K +} +Event: 6984.248 GC heap before +{Heap before GC invocations=167 (full 0): + garbage-first heap total 252928K, used 120995K [0x0000000083000000, 0x0000000100000000) + region size 1024K, 12 young (12288K), 1 survivors (1024K) + Metaspace used 104639K, capacity 106186K, committed 106416K, reserved 1142784K + class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K +} +Event: 7027.223 GC heap after +{Heap after GC invocations=168 (full 0): + garbage-first heap total 252928K, used 109826K [0x0000000083000000, 0x0000000100000000) + region size 1024K, 1 young (1024K), 1 survivors (1024K) + Metaspace used 104639K, capacity 106186K, committed 106416K, reserved 1142784K + class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K +} +Event: 7084.006 GC heap before +{Heap before GC invocations=168 (full 0): + garbage-first heap total 252928K, used 121090K [0x0000000083000000, 0x0000000100000000) + region size 1024K, 12 young (12288K), 1 survivors (1024K) + Metaspace used 104640K, capacity 106186K, committed 106416K, reserved 1142784K + class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K +} +Event: 7087.733 GC heap after +{Heap after GC invocations=169 (full 0): + garbage-first heap total 252928K, used 109663K [0x0000000083000000, 0x0000000100000000) + region size 1024K, 1 young (1024K), 1 survivors (1024K) + Metaspace used 104640K, capacity 106186K, committed 106416K, reserved 1142784K + class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K +} +Event: 7100.806 GC heap before +{Heap before GC invocations=169 (full 0): + garbage-first heap total 252928K, used 120927K [0x0000000083000000, 0x0000000100000000) + region size 1024K, 12 young (12288K), 1 survivors (1024K) + Metaspace used 104640K, capacity 106186K, committed 106416K, reserved 1142784K + class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K +} +Event: 7101.906 GC heap after +{Heap after GC invocations=170 (full 0): + garbage-first heap total 252928K, used 109704K [0x0000000083000000, 0x0000000100000000) + region size 1024K, 1 young (1024K), 1 survivors (1024K) + Metaspace used 104640K, capacity 106186K, committed 106416K, reserved 1142784K + class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K +} +Event: 7117.151 GC heap before +{Heap before GC invocations=170 (full 0): + garbage-first heap total 252928K, used 120968K [0x0000000083000000, 0x0000000100000000) + region size 1024K, 12 young (12288K), 1 survivors (1024K) + Metaspace used 104640K, capacity 106186K, committed 106416K, reserved 1142784K + class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K +} +Event: 7120.742 GC heap after +{Heap after GC invocations=171 (full 0): + garbage-first heap total 252928K, used 109844K [0x0000000083000000, 0x0000000100000000) + region size 1024K, 1 young (1024K), 1 survivors (1024K) + Metaspace used 104640K, capacity 106186K, committed 106416K, reserved 1142784K + class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K +} +Event: 7174.869 GC heap before +{Heap before GC invocations=171 (full 0): + garbage-first heap total 252928K, used 121108K [0x0000000083000000, 0x0000000100000000) + region size 1024K, 12 young (12288K), 1 survivors (1024K) + Metaspace used 104640K, capacity 106186K, committed 106416K, reserved 1142784K + class space used 13478K, capacity 14004K, committed 14080K, reserved 1048576K +} + +Deoptimization events (18 events): +Event: 34.247 Thread 0x000002257b705830 DEOPT PACKING pc=0x0000022500a1433c sp=0x00000051798fccf0 +Event: 34.247 Thread 0x000002257b705830 DEOPT UNPACKING pc=0x000002250004e23f sp=0x00000051798fc248 mode 0 +Event: 41.141 Thread 0x000002257b705830 DEOPT PACKING pc=0x00000225011fa5dc sp=0x00000051798f5ec0 +Event: 41.141 Thread 0x000002257b705830 DEOPT UNPACKING pc=0x000002250004e23f sp=0x00000051798f5360 mode 0 +Event: 46.535 Thread 0x000002257b705830 DEOPT PACKING pc=0x0000022500a2d6d2 sp=0x00000051798f7600 +Event: 46.535 Thread 0x000002257b705830 DEOPT UNPACKING pc=0x000002250004e23f sp=0x00000051798f6b08 mode 3 +Event: 46.535 Thread 0x000002257b705830 DEOPT PACKING pc=0x0000022500a29b25 sp=0x00000051798f75c0 +Event: 46.535 Thread 0x000002257b705830 DEOPT UNPACKING pc=0x000002250004e23f sp=0x00000051798f6b08 mode 3 +Event: 53.173 Thread 0x000002257b705830 DEOPT PACKING pc=0x000002250188e47c sp=0x00000051798fbbd0 +Event: 53.173 Thread 0x000002257b705830 DEOPT UNPACKING pc=0x000002250004e23f sp=0x00000051798fb128 mode 0 +Event: 53.173 Thread 0x000002257b705830 DEOPT PACKING pc=0x000002250188e47c sp=0x00000051798fd390 +Event: 53.173 Thread 0x000002257b705830 DEOPT UNPACKING pc=0x000002250004e23f sp=0x00000051798fc8e8 mode 0 +Event: 53.710 Thread 0x000002257b705830 DEOPT PACKING pc=0x0000022500cf2fa4 sp=0x00000051798fe0a0 +Event: 53.710 Thread 0x000002257b705830 DEOPT UNPACKING pc=0x000002250004e23f sp=0x00000051798fd720 mode 0 +Event: 55.827 Thread 0x000002257b705830 DEOPT PACKING pc=0x00000225008b00cc sp=0x00000051798fbeb0 +Event: 55.827 Thread 0x000002257b705830 DEOPT UNPACKING pc=0x000002250004e23f sp=0x00000051798fb3d8 mode 0 +Event: 534.201 Thread 0x000002250f7ac070 DEOPT PACKING pc=0x0000022501c44398 sp=0x000000517b0fe110 +Event: 534.205 Thread 0x000002250f7ac070 DEOPT UNPACKING pc=0x000002250004e23f sp=0x000000517b0fd6b0 mode 3 + +Classes unloaded (14 events): +Event: 49.060 Thread 0x0000022579a517b0 Unloading class 0x0000000100a8dc40 'jdk/internal/reflect/GeneratedSerializationConstructorAccessor38' +Event: 49.060 Thread 0x0000022579a517b0 Unloading class 0x0000000100a8e040 'jdk/internal/reflect/GeneratedSerializationConstructorAccessor37' +Event: 49.060 Thread 0x0000022579a517b0 Unloading class 0x0000000100a8ec40 'jdk/internal/reflect/GeneratedSerializationConstructorAccessor36' +Event: 49.060 Thread 0x0000022579a517b0 Unloading class 0x0000000100a88440 'jdk/internal/reflect/GeneratedSerializationConstructorAccessor35' +Event: 50.471 Thread 0x0000022579a517b0 Unloading class 0x0000000100a8a040 'jdk/internal/reflect/GeneratedSerializationConstructorAccessor39' +Event: 51.854 Thread 0x0000022579a517b0 Unloading class 0x0000000100b16c40 'jdk/internal/reflect/GeneratedSerializationConstructorAccessor41' +Event: 51.854 Thread 0x0000022579a517b0 Unloading class 0x0000000100b16840 'jdk/internal/reflect/GeneratedSerializationConstructorAccessor40' +Event: 57.958 Thread 0x0000022579a517b0 Unloading class 0x0000000100b13440 'jdk/internal/reflect/GeneratedSerializationConstructorAccessor48' +Event: 57.958 Thread 0x0000022579a517b0 Unloading class 0x0000000100b13040 'jdk/internal/reflect/GeneratedSerializationConstructorAccessor47' +Event: 57.958 Thread 0x0000022579a517b0 Unloading class 0x0000000100b13c40 'jdk/internal/reflect/GeneratedSerializationConstructorAccessor46' +Event: 57.958 Thread 0x0000022579a517b0 Unloading class 0x0000000100b16c40 'jdk/internal/reflect/GeneratedSerializationConstructorAccessor45' +Event: 57.958 Thread 0x0000022579a517b0 Unloading class 0x0000000100b14840 'jdk/internal/reflect/GeneratedSerializationConstructorAccessor44' +Event: 57.958 Thread 0x0000022579a517b0 Unloading class 0x0000000100b15040 'jdk/internal/reflect/GeneratedSerializationConstructorAccessor43' +Event: 57.958 Thread 0x0000022579a517b0 Unloading class 0x0000000100b15840 'jdk/internal/reflect/GeneratedSerializationConstructorAccessor42' + +Classes redefined (0 events): +No events + +Internal exceptions (20 events): +Event: 59.740 Thread 0x000002257b705830 Exception (0x00000000907e7e00) +thrown [./open/src/hotspot/share/prims/jni.cpp, line 599] +Event: 59.792 Thread 0x000002257b705830 Exception (0x00000000903c29d8) +thrown [./open/src/hotspot/share/prims/jni.cpp, line 599] +Event: 59.793 Thread 0x000002257b705830 Exception (0x00000000903f4b48) +thrown [./open/src/hotspot/share/prims/jni.cpp, line 599] +Event: 59.921 Thread 0x000002257b705830 Exception (0x000000008fb7cc10) +thrown [./open/src/hotspot/share/prims/jni.cpp, line 599] +Event: 59.922 Thread 0x000002257b705830 Exception (0x000000008fbaefc8) +thrown [./open/src/hotspot/share/prims/jni.cpp, line 599] +Event: 59.946 Thread 0x000002257b705830 Exception (0x000000008faafc28) +thrown [./open/src/hotspot/share/prims/jni.cpp, line 599] +Event: 59.946 Thread 0x000002257b705830 Exception (0x000000008fae1dd8) +thrown [./open/src/hotspot/share/prims/jni.cpp, line 599] +Event: 60.015 Thread 0x000002257b705830 Exception (0x000000008f6728c8) +thrown [./open/src/hotspot/share/prims/jni.cpp, line 599] +Event: 60.016 Thread 0x000002257b705830 Exception (0x000000008f6a4c48) +thrown [./open/src/hotspot/share/prims/jni.cpp, line 599] +Event: 60.169 Thread 0x000002257b705830 Exception (0x000000008ea5b1e0) +thrown [./open/src/hotspot/share/prims/jni.cpp, line 599] +Event: 60.170 Thread 0x000002257b705830 Exception (0x000000008ea8d560) +thrown [./open/src/hotspot/share/prims/jni.cpp, line 599] +Event: 72.831 Thread 0x000002250f7aff00 Exception (0x0000000091460a98) +thrown [./open/src/hotspot/share/interpreter/linkResolver.cpp, line 782] +Event: 1811.543 Thread 0x0000022511086690 Exception (0x000000008f781fa0) +thrown [./open/src/hotspot/share/prims/jni.cpp, line 578] +Event: 1963.220 Thread 0x000002250f7ac070 Exception (0x0000000091f6b860) +thrown [./open/src/hotspot/share/interpreter/linkResolver.cpp, line 782] +Event: 1963.220 Thread 0x000002250f7b1be0 Exception (0x0000000091f6d478) +thrown [./open/src/hotspot/share/interpreter/linkResolver.cpp, line 782] +Event: 1985.373 Thread 0x000002250f7ad3b0 Exception (0x000000008cefe048) +thrown [./open/src/hotspot/share/classfile/systemDictionary.cpp, line 295] +Event: 1985.382 Thread 0x000002250f7ad3b0 Exception (0x000000008cd8d1a0) +thrown [./open/src/hotspot/share/classfile/systemDictionary.cpp, line 295] +Event: 3580.488 Thread 0x000002257c546460 Exception (0x000000008edaf398) +thrown [./open/src/hotspot/share/prims/jni.cpp, line 578] +Event: 5368.631 Thread 0x000002257a461050 Exception (0x000000008ed82a20) +thrown [./open/src/hotspot/share/prims/jni.cpp, line 578] +Event: 5399.027 Thread 0x000002257a4646d0 Exception (0x000000008c1018d0) +thrown [./open/src/hotspot/share/prims/jni.cpp, line 599] + +Events (20 events): +Event: 6724.058 Executing VM operation: G1CollectForAllocation +Event: 6724.310 Executing VM operation: G1CollectForAllocation done +Event: 6888.343 Thread 0x000002250f7aca10 Thread exited: 0x000002250f7aca10 +Event: 6892.528 Executing VM operation: G1CollectForAllocation +Event: 6919.698 Executing VM operation: G1CollectForAllocation done +Event: 6919.738 Executing VM operation: HandshakeAllThreads +Event: 6920.191 Executing VM operation: HandshakeAllThreads done +Event: 6973.947 Executing VM operation: G1CollectForAllocation +Event: 7028.276 Executing VM operation: G1CollectForAllocation done +Event: 7028.310 Executing VM operation: HandshakeAllThreads +Event: 7030.417 Executing VM operation: HandshakeAllThreads done +Event: 7035.662 Thread 0x000002257aed8660 Thread exited: 0x000002257aed8660 +Event: 7083.953 Executing VM operation: G1CollectForAllocation +Event: 7087.733 Executing VM operation: G1CollectForAllocation done +Event: 7100.593 Executing VM operation: G1CollectForAllocation +Event: 7101.953 Executing VM operation: G1CollectForAllocation done +Event: 7115.017 Executing VM operation: G1CollectForAllocation +Event: 7120.743 Executing VM operation: G1CollectForAllocation done +Event: 7134.573 Executing VM operation: G1CollectForAllocation +Event: 7172.257 Thread 0x00000225798d3150 Thread added: 0x00000225798d3150 + + +Dynamic libraries: +0x00007ff67fa40000 - 0x00007ff67fa4d000 C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin\javaw.exe +0x00007ffd21630000 - 0x00007ffd21828000 C:\Windows\SYSTEM32\ntdll.dll +0x00007ffd20cf0000 - 0x00007ffd20dad000 C:\Windows\System32\KERNEL32.DLL +0x00007ffd1ef80000 - 0x00007ffd1f24e000 C:\Windows\System32\KERNELBASE.dll +0x00007ffd1f250000 - 0x00007ffd1f350000 C:\Windows\System32\ucrtbase.dll +0x00007ffd17600000 - 0x00007ffd17619000 C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin\VCRUNTIME140.dll +0x00007ffcfb0e0000 - 0x00007ffcfb0f8000 C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin\jli.dll +0x00007ffd207f0000 - 0x00007ffd20990000 C:\Windows\System32\USER32.dll +0x00007ffd1f3f0000 - 0x00007ffd1f412000 C:\Windows\System32\win32u.dll +0x00007ffcff210000 - 0x00007ffcff4aa000 C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.1110_none_60b5254171f9507e\COMCTL32.dll +0x00007ffd20080000 - 0x00007ffd200aa000 C:\Windows\System32\GDI32.dll +0x00007ffd21270000 - 0x00007ffd2130e000 C:\Windows\System32\msvcrt.dll +0x00007ffd1f420000 - 0x00007ffd1f52b000 C:\Windows\System32\gdi32full.dll +0x00007ffd1f350000 - 0x00007ffd1f3ed000 C:\Windows\System32\msvcp_win.dll +0x00007ffd20050000 - 0x00007ffd20080000 C:\Windows\System32\IMM32.DLL +0x00007ffd175f0000 - 0x00007ffd175fc000 C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin\vcruntime140_1.dll +0x00007ffd01db0000 - 0x00007ffd01e41000 C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin\msvcp140.dll +0x00007ffc94a10000 - 0x00007ffc9556e000 C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin\server\jvm.dll +0x00007ffd21540000 - 0x00007ffd215ee000 C:\Windows\System32\ADVAPI32.dll +0x00007ffd20c50000 - 0x00007ffd20cec000 C:\Windows\System32\sechost.dll +0x00007ffd213f0000 - 0x00007ffd21515000 C:\Windows\System32\RPCRT4.dll +0x00007ffd200b0000 - 0x00007ffd200b8000 C:\Windows\System32\PSAPI.DLL +0x00007ffcfe4f0000 - 0x00007ffcfe517000 C:\Windows\SYSTEM32\WINMM.dll +0x00007ffd18d50000 - 0x00007ffd18d5a000 C:\Windows\SYSTEM32\VERSION.dll +0x00007ffcfeea0000 - 0x00007ffcfeea9000 C:\Windows\SYSTEM32\WSOCK32.dll +0x00007ffd21370000 - 0x00007ffd213db000 C:\Windows\System32\WS2_32.dll +0x00007ffd1d550000 - 0x00007ffd1d562000 C:\Windows\SYSTEM32\kernel.appcore.dll +0x00007ffd19760000 - 0x00007ffd1976a000 C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin\jimage.dll +0x00007ffd1cac0000 - 0x00007ffd1cca4000 C:\Windows\SYSTEM32\DBGHELP.DLL +0x00007ffd02ee0000 - 0x00007ffd02f0c000 C:\Windows\SYSTEM32\dbgcore.DLL +0x00007ffd1eec0000 - 0x00007ffd1ef42000 C:\Windows\System32\bcryptPrimitives.dll +0x00007ffcf86a0000 - 0x00007ffcf86c5000 C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin\java.dll +0x00007ffcf8680000 - 0x00007ffcf8698000 C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin\zip.dll +0x00007ffd1f770000 - 0x00007ffd1feb3000 C:\Windows\System32\SHELL32.dll +0x00007ffd1cda0000 - 0x00007ffd1d535000 C:\Windows\SYSTEM32\windows.storage.dll +0x00007ffd20f10000 - 0x00007ffd21264000 C:\Windows\System32\combase.dll +0x00007ffd1e750000 - 0x00007ffd1e780000 C:\Windows\SYSTEM32\Wldp.dll +0x00007ffd20b40000 - 0x00007ffd20bed000 C:\Windows\System32\SHCORE.dll +0x00007ffd201e0000 - 0x00007ffd20235000 C:\Windows\System32\shlwapi.dll +0x00007ffd1ec90000 - 0x00007ffd1ecaf000 C:\Windows\SYSTEM32\profapi.dll +0x00007ffcf8660000 - 0x00007ffcf8679000 C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin\net.dll +0x00007ffd16de0000 - 0x00007ffd16eea000 C:\Windows\SYSTEM32\WINHTTP.dll +0x00007ffd1e4b0000 - 0x00007ffd1e51a000 C:\Windows\system32\mswsock.dll +0x00007ffcd7b20000 - 0x00007ffcd7b32000 C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin\nio.dll +0x00007ffcdbaa0000 - 0x00007ffcdbaa9000 C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin\management.dll +0x00007ffcd79d0000 - 0x00007ffcd79db000 C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin\management_ext.dll +0x00007ffcfedd0000 - 0x00007ffcfede7000 C:\Windows\system32\napinsp.dll +0x00007ffcfedb0000 - 0x00007ffcfedcb000 C:\Windows\system32\pnrpnsp.dll +0x00007ffd19410000 - 0x00007ffd19425000 C:\Windows\system32\wshbth.dll +0x00007ffd18010000 - 0x00007ffd1802d000 C:\Windows\system32\NLAapi.dll +0x00007ffd1e170000 - 0x00007ffd1e1ab000 C:\Windows\SYSTEM32\IPHLPAPI.DLL +0x00007ffd1e1b0000 - 0x00007ffd1e27a000 C:\Windows\SYSTEM32\DNSAPI.dll +0x00007ffd213e0000 - 0x00007ffd213e8000 C:\Windows\System32\NSI.dll +0x00007ffcfed90000 - 0x00007ffcfeda2000 C:\Windows\System32\winrnr.dll +0x00007ffd01720000 - 0x00007ffd0172a000 C:\Windows\System32\rasadhlp.dll +0x00007ffd06860000 - 0x00007ffd068e0000 C:\Windows\System32\fwpuclnt.dll +0x00007ffd1ef50000 - 0x00007ffd1ef77000 C:\Windows\System32\bcrypt.dll +0x00007ffd1e690000 - 0x00007ffd1e6a8000 C:\Windows\SYSTEM32\CRYPTSP.dll +0x00007ffd1dde0000 - 0x00007ffd1de14000 C:\Windows\system32\rsaenh.dll +0x00007ffd1ec10000 - 0x00007ffd1ec3e000 C:\Windows\SYSTEM32\USERENV.dll +0x00007ffd1e650000 - 0x00007ffd1e65c000 C:\Windows\SYSTEM32\CRYPTBASE.dll +0x00007ffd17450000 - 0x00007ffd17467000 C:\Windows\SYSTEM32\dhcpcsvc6.DLL +0x00007ffd17bf0000 - 0x00007ffd17c0d000 C:\Windows\SYSTEM32\dhcpcsvc.DLL +0x00007ffd15e50000 - 0x00007ffd15e60000 C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin\verify.dll +0x00007ffcfb0d0000 - 0x00007ffcfb0dd000 C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin\sunmscapi.dll +0x00007ffd1f530000 - 0x00007ffd1f686000 C:\Windows\System32\CRYPT32.dll +0x00007ffd1e820000 - 0x00007ffd1e847000 C:\Windows\SYSTEM32\ncrypt.dll +0x00007ffd1e7e0000 - 0x00007ffd1e81b000 C:\Windows\SYSTEM32\NTASN1.dll + +dbghelp: loaded successfully - version: 4.0.5 - missing functions: none +symbol engine: initialized successfully - sym options: 0x614 - pdb path: .;C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin;C:\Windows\SYSTEM32;C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.1110_none_60b5254171f9507e;C:\Users\hp\Downloads\sts-4.10.0.RELEASE\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955\jre\bin\server + +VM Arguments: +jvm_args: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=52447 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost -Dspring.jmx.enabled=true -Dspring.application.admin.enabled=true -XX:TieredStopAtLevel=1 -Dspring.boot.project.name=backend -Dfile.encoding=UTF-8 -XX:+ShowCodeDetailsInExceptionMessages +java_command: com.realnet.RealNetApp --spring.output.ansi.enabled=always +java_class_path (initial): G:\foldername\backend\target\classes;C:\Users\hp\.m2\repository\org\springframework\boot\spring-boot-starter-mail\2.2.5.RELEASE\spring-boot-starter-mail-2.2.5.RELEASE.jar;C:\Users\hp\.m2\repository\org\springframework\boot\spring-boot-starter\2.2.5.RELEASE\spring-boot-starter-2.2.5.RELEASE.jar;C:\Users\hp\.m2\repository\org\springframework\boot\spring-boot-starter-logging\2.2.5.RELEASE\spring-boot-starter-logging-2.2.5.RELEASE.jar;C:\Users\hp\.m2\repository\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;C:\Users\hp\.m2\repository\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;C:\Users\hp\.m2\repository\org\apache\logging\log4j\log4j-to-slf4j\2.12.1\log4j-to-slf4j-2.12.1.jar;C:\Users\hp\.m2\repository\org\apache\logging\log4j\log4j-api\2.12.1\log4j-api-2.12.1.jar;C:\Users\hp\.m2\repository\org\slf4j\jul-to-slf4j\1.7.30\jul-to-slf4j-1.7.30.jar;C:\Users\hp\.m2\repository\org\yaml\snakeyaml\1.25\snakeyaml-1.25.jar;C:\Users\hp\.m2\repository\org\springframework\spring-context-support\5.2.4.RELEASE\spring-context-support-5.2.4.RELEASE.jar;C:\Users\hp\.m2\repository\org\springframework\spring-context\5.2.4.RELEASE\spring-context-5.2.4.RELEASE.jar;C:\Users\hp\.m2\repository\com\sun\mail\jakarta.mail\1.6.4\jakarta.mail-1.6.4.jar;C:\Users\hp\.m2\repository\com\sun\activation\jakarta.activation\1.2.2\jakarta.activation-1.2.2.jar;C:\Users\hp\.m2\repository\org\springframework\boot\spring-boot-starter-web\2.2.5.RELEASE\spring-boot-starter-web-2.2.5.RELEASE.jar;C:\Users\hp\.m2\repository\org\springframework\boot\spring-boot-starter-json\2.2.5.RELEASE\spring-boot-starter-json-2.2.5.RELEASE.jar;C:\Users\hp\.m2\repository\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.10.2\jackson-datatype-jdk8-2.10.2.jar;C:\Users\hp\.m2\repository\com\fasterxml\jackson\module\jackson-module-parameter-names\2.10.2\jackson-module-parameter-names-2.10.2.jar;C:\Users\hp\.m2\repository\org\springframework\spring-web\5.2.4.RELEASE\spring-web- +Launcher Type: SUN_STANDARD + +[Global flags] + intx CICompilerCount = 4 {product} {ergonomic} + uint ConcGCThreads = 2 {product} {ergonomic} + uint G1ConcRefinementThreads = 8 {product} {ergonomic} + size_t G1HeapRegionSize = 1048576 {product} {ergonomic} + uintx GCDrainStackTargetSize = 64 {product} {ergonomic} + size_t InitialHeapSize = 132120576 {product} {ergonomic} + bool ManagementServer = true {product} {command line} + size_t MarkStackSize = 4194304 {product} {ergonomic} + size_t MaxHeapSize = 2097152000 {product} {ergonomic} + size_t MaxNewSize = 1258291200 {product} {ergonomic} + size_t MinHeapDeltaBytes = 1048576 {product} {ergonomic} + size_t MinHeapSize = 8388608 {product} {ergonomic} + uintx NonNMethodCodeHeapSize = 7549744 {pd product} {ergonomic} + uintx NonProfiledCodeHeapSize = 244108496 {pd product} {ergonomic} + uintx ProfiledCodeHeapSize = 0 {pd product} {ergonomic} + uintx ReservedCodeCacheSize = 251658240 {pd product} {ergonomic} + bool SegmentedCodeCache = true {product} {ergonomic} + bool ShowCodeDetailsInExceptionMessages = true {manageable} {command line} + size_t SoftMaxHeapSize = 2097152000 {manageable} {ergonomic} + intx TieredStopAtLevel = 1 {product} {command line} + bool UseCompressedClassPointers = true {lp64_product} {ergonomic} + bool UseCompressedOops = true {lp64_product} {ergonomic} + bool UseG1GC = true {product} {ergonomic} + bool UseLargePagesIndividualAllocation = false {pd product} {ergonomic} + +Logging: +Log output configuration: + #0: stdout all=warning uptime,level,tags + #1: stderr all=off uptime,level,tags + +Environment Variables: +JAVA_HOME=F:\Java +PATH=C:/Users/hp/Downloads/sts-4.10.0.RELEASE//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955/jre/bin/server;C:/Users/hp/Downloads/sts-4.10.0.RELEASE//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_15.0.2.v20210201-0955/jre/bin;C:\Program Files\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Program Files\dotnet\;C:\ProgramData\chocolatey\bin;C:\Users\hp\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Program Files\nodejs\;C:\Program Files\MySQL\MySQL Shell 8.0\bin\;C:\Python39\Scripts\;C:\Python39\;C:\Users\hp\AppData\Local\Programs\Python\Python39\Scripts\;C:\Users\hp\AppData\Local\Programs\Python\Python39\;C:\Users\hp\AppData\Local\Microsoft\WindowsApps;C:\Users\hp\.dotnet\tools;C:\Users\hp\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Users\hp\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\hp\AppData\Local\GitHubDesktop\bin;F:\Java\bin;F:\Java\bin;C:\Program Files\MongoDB\Server\4.4\bin;C:\Users\hp\AppData\Roaming\npm;C:\Users\hp\Downloads\sts-4.10.0.RELEASE; +USERNAME=hp +OS=Windows_NT +PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 142 Stepping 12, GenuineIntel + + + +--------------- S Y S T E M --------------- + +OS: + Windows 10 , 64 bit Build 19041 (10.0.19041.1889) +OS uptime: 0 days 3:07 hours +HyperV virtualization detected + +CPU: total 8 (initial active 8) (4 cores per cpu, 2 threads per core) family 6 model 142 stepping 12 microcode 0xde, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, vzeroupper, avx, avx2, aes, clmul, erms, 3dnowpref, lzcnt, ht, tsc, tscinvbit, bmi1, bmi2, adx, fma, clflush, clflushopt + +Memory: 4k page, system-wide physical 7995M (594M free) +TotalPageFile size 28028M (AvailPageFile size 1M) +current process WorkingSet (physical memory assigned to process): 35M, peak: 467M +current process commit charge ("private bytes"): 521M, peak: 768M + +vm_info: OpenJDK 64-Bit Server VM (15.0.2+7-27) for windows-amd64 JRE (15.0.2+7-27), built on Dec 7 2020 20:02:38 by "mach5one" with unknown MS VC++:1925 + +END. diff --git a/backend/logs/ExceptionLogs/Error.log b/backend/logs/ExceptionLogs/Error.log new file mode 100644 index 0000000..d2bb0c7 --- /dev/null +++ b/backend/logs/ExceptionLogs/Error.log @@ -0,0 +1,53 @@ +2023-04-07T15:38:10.368+0530 ERROR Login Failed No value present +2023-04-14T12:20:09.761+0530 ERROR Login Failed No value present +2023-04-14T12:40:11.030+0530 ERROR Login Failed No value present +2023-04-14T12:43:04.245+0530 ERROR Login Failed No value present +2023-04-14T12:43:18.179+0530 ERROR Login Failed No value present +2023-04-14T12:47:15.982+0530 ERROR Login Failed No value present +2023-04-14T12:47:47.907+0530 ERROR Login Failed No value present +2023-04-14T12:49:20.899+0530 ERROR Login Failed No value present +2023-04-14T12:49:39.712+0530 ERROR Login Failed No value present +2023-04-14T12:49:54.172+0530 ERROR Login Failed No value present +2023-04-14T12:49:56.507+0530 ERROR Login Failed No value present +2023-04-14T12:49:59.471+0530 ERROR Login Failed No value present +2023-04-14T13:06:48.375+0530 ERROR Login Failed No value present +2023-04-14T14:17:17.959+0530 ERROR Login Failed No value present +2023-04-14T14:19:17.702+0530 ERROR Login Failed No value present +2023-04-14T14:24:27.427+0530 ERROR Login Failed No value present +2023-04-14T14:24:34.106+0530 ERROR Login Failed No value present +2023-04-14T14:24:59.329+0530 ERROR Login Failed No value present +2023-04-14T15:45:42.775+0530 ERROR Login Failed No value present +2023-04-14T18:27:38.701+0530 ERROR Login Failed Bad credentials +2023-09-29T12:37:11.138+0530 ERROR Login Failed Bad credentials +2023-09-29T23:54:39.748+0530 ERROR Login Failed Bad credentials +2023-10-21T16:34:16.901+0530 ERROR Authentication Failed. Username or Password not valid. +2023-10-21T16:34:16.905+0530 ERROR Authentication Failed. Username or Password not valid. +2023-10-21T16:34:17.029+0530 ERROR Authentication Failed. Username or Password not valid. +2023-10-21T16:34:17.029+0530 ERROR Authentication Failed. Username or Password not valid. +2023-10-21T16:34:17.029+0530 ERROR Authentication Failed. Username or Password not valid. +2023-10-21T16:34:17.046+0530 ERROR Authentication Failed. Username or Password not valid. +2023-10-21T16:34:46.579+0530 ERROR Authentication Failed. Username or Password not valid. +2023-11-03T10:51:17.798+0530 ERROR Login Failed Bad credentials +2023-11-03T12:48:05.904+0530 ERROR Login Failed Error creating bean with name 'inMemoryDatabaseShutdownExecutor': Singleton bean creation not allowed while singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!) +2023-11-20T19:33:52.278+0530 ERROR Login Failed Bad credentials +2023-11-29T12:24:44.472+0530 ERROR Login Failed Bad credentials +2023-11-30T10:02:24.935+0530 ERROR Login Failed Bad credentials +2023-12-02T17:12:48.378+0530 ERROR Login Failed Bad credentials +2023-12-02T17:19:07.149+0530 ERROR Login Failed Bad credentials +2023-12-04T19:36:38.738+0530 ERROR Login Failed No value present +2023-12-04T19:36:48.189+0530 ERROR Login Failed No value present +2023-12-04T23:47:26.784+0530 ERROR Login Failed Bad credentials +2023-12-04T23:53:25.084+0530 ERROR Login Failed Bad credentials +2023-12-20T22:55:47.256+0530 ERROR Login Failed Unable to acquire JDBC Connection; nested exception is org.hibernate.exception.JDBCConnectionException: Unable to acquire JDBC Connection +2023-12-20T22:55:47.257+0530 ERROR Login Failed Unable to acquire JDBC Connection; nested exception is org.hibernate.exception.JDBCConnectionException: Unable to acquire JDBC Connection +2023-12-29T17:03:49.832+0530 ERROR Authentication Failed. Username or Password not valid. +2023-12-29T17:03:49.833+0530 ERROR Authentication Failed. Username or Password not valid. +2023-12-29T23:27:43.701+0530 ERROR Authentication Failed. Username or Password not valid. +2024-01-19T14:10:50.291+0530 ERROR Login Failed No value present +2024-01-19T14:11:08.115+0530 ERROR Login Failed No value present +2024-01-19T14:11:37.702+0530 ERROR Login Failed No value present +2024-01-19T14:13:45.451+0530 ERROR Login Failed No value present +2024-01-19T14:13:54.728+0530 ERROR Login Failed No value present +2024-01-19T14:14:02.474+0530 ERROR Login Failed No value present +2024-01-19T14:14:03.357+0530 ERROR Login Failed No value present +2026-10-22T16:02:27.789+0530 ERROR Login Failed Cannot invoke "com.realnet.users.entity.Role.getName()" because "role" is null diff --git a/backend/logs/SYSADMIN1673073474.log b/backend/logs/SYSADMIN1673073474.log new file mode 100644 index 0000000..e69de29 diff --git a/backend/logs/sysadmin1686312560.log b/backend/logs/sysadmin1686312560.log new file mode 100644 index 0000000..e69de29 diff --git a/backend/pom.xml b/backend/pom.xml new file mode 100644 index 0000000..942e1a1 --- /dev/null +++ b/backend/pom.xml @@ -0,0 +1,556 @@ + + 4.0.0 + com.realnet + app + jar + 1.0.0 + REAL IT SOLUTIONS + + 2.7.0 + UTF-8 + UTF-8 + 1.8 + + + org.springframework.boot + spring-boot-starter-parent + 2.2.5.RELEASE + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + + org.springframework.boot + spring-boot-starter-mail + + + org.springframework.boot + spring-boot-starter-web + + + + org.springframework.boot + spring-boot-starter-aop + + + org.springframework.boot + spring-boot-starter-tomcat + provided + + + org.springframework.boot + spring-boot-starter-actuator + + + + io.springfox + springfox-swagger2 + 2.9.2 + + + io.swagger + swagger-annotations + + + io.swagger + swagger-models + + + + + org.apache.commons + commons-lang3 + 3.12.0 + + + com.googlecode.json-simple + json-simple + 1.1.1 + + + com.google.code.gson + gson + 2.8.5 + + + io.swagger + swagger-annotations + 1.5.22 + + + io.swagger + swagger-models + 1.5.22 + + + io.springfox + springfox-swagger-ui + 2.9.2 + + + + org.apache.pdfbox + pdfbox + 2.0.29 + + + + + + + + + + + + + org.springframework.boot + spring-boot-starter-security + + + + org.springframework.boot + spring-boot-starter-validation + + + org.apache.poi + poi-ooxml + 4.1.2 + + + + org.apache.poi + poi-ooxml + 3.8-beta4 + + + org.apache.poi + poi-scratchpad + 3.9 + + + + + + org.apache.poi + poi + 4.1.2 + + + org.apache.poi + poi-ooxml + 4.1.2 + + + + + + org.springframework.boot + spring-boot-starter-jdbc + + + org.postgresql + postgresql + runtime + + + org.xerial + sqlite-jdbc + 3.25.2 + + + com.microsoft.sqlserver + mssql-jdbc + runtime + + + + org.springframework.boot + spring-boot-starter-websocket + + + org.springframework + spring-messaging + + + + org.springframework.boot + spring-boot-starter-cache + + + com.github.ben-manes.caffeine + caffeine + + + + com.h2database + h2 + runtime + + + org.slf4j + slf4j-api + + + + + org.springframework.security.oauth.boot + spring-security-oauth2-autoconfigure + 2.3.3.RELEASE + + + + org.springframework.security + spring-security-oauth2-client + + + org.springframework.social + spring-social-google + 1.0.0.RELEASE + + + org.springframework.social + spring-social-linkedin + 1.0.2.RELEASE + + + + + io.jsonwebtoken + jjwt + 0.9.0 + + + com.google.guava + guava + 23.5-jre + + + joda-time + joda-time + 2.9.9 + + + + + + + + com.fasterxml.jackson.core + jackson-core + 2.12.1 + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + org.modelmapper + modelmapper + 2.3.0 + + + org.codehaus.jackson + jackson-mapper-asl + 1.9.13 + + + commons-io + commons-io + 2.7 + + + + net.lingala.zip4j + zip4j + 2.6.1 + + + org.json + json + 20171018 + + + org.projectlombok + lombok + 1.18.20 + provided + + + javax.xml.bind + jaxb-api + 2.3.0 + + + org.springframework.boot + spring-boot-devtools + + + + org.apache.httpcomponents + httpclient + 4.5.13 + + + + + org.apache.clerezza.ext + org.json.simple + 0.4 + + + commons-codec + commons-codec + 1.10 + + + org.springframework.boot + spring-boot-starter-webflux + + + + + org.apache.poi + poi + 4.1.2 + + + + org.apache.poi + ooxml-schemas + 1.4 + + + + org.json + json + 20201115 + + + com.jcraft + jsch + 0.1.55 + + + org.json + json + 20201115 + + + + org.json + json + 20201115 + + + + com.twilio.sdk + twilio + 8.18.0 + + + + org.xhtmlrenderer + flying-saucer-pdf + 9.1.22 + + + + + com.lowagie + itext + 2.1.7 + + + + + + org.seleniumhq.selenium + selenium-java + 3.141.59 + + + + + com.itextpdf + itextpdf + 5.5.13.2 + + + + + org.postgresql + postgresql + 42.2.24 + + + + + org.mariadb.jdbc + mariadb-java-client + 3.1.2 + + + + + com.ibm.db2 + jcc + 11.5.5.0 + + + + + org.mongodb + mongo-java-driver + 3.12.12 + + + + + redis.clients + jedis + 3.7.0 + + + + + + + + + + org.firebirdsql.jdbc + jaybird + 4.0.0.java11 + + + + + + + com.orientechnologies + orientdb-core + 3.2.19 + + + + + com.orientechnologies + orientdb-jdbc + 3.2.19 + + + + + software.amazon.awssdk + dynamodb + 2.17.102 + + + + + com.couchbase.client + java-client + 3.1.5 + + + io.projectreactor + reactor-core + 3.4.13 + + + + + org.neo4j + neo4j-jdbc-bolt + 5.0.0 + + + + + com.paytm.pg + paytm-checksum + 1.2.1 + + + + com.razorpay + razorpay-java + 1.4.4 + + + + + org.springframework + spring-test + + + + + org.apache.pdfbox + pdfbox + 2.0.28 + + + + + org.apache.xmlgraphics + fop + 2.6 + + + + org.apache.commons + commons-csv + 1.4 + + + + + com.googlecode.json-simple + json-simple + 1.1.1 + + + + com.opencsv + opencsv + 5.5 + + + + + org.springframework.boot + spring-boot-starter-data-mongodb + + + + org.mongodb + mongodb-driver-sync + 4.11.1 + + + + + diff --git a/backend/src/.DS_Store b/backend/src/.DS_Store new file mode 100644 index 0000000..d22ff50 Binary files /dev/null and b/backend/src/.DS_Store differ diff --git a/backend/src/main/.DS_Store b/backend/src/main/.DS_Store new file mode 100644 index 0000000..798be8e Binary files /dev/null and b/backend/src/main/.DS_Store differ diff --git a/backend/src/main/java/.DS_Store b/backend/src/main/java/.DS_Store new file mode 100644 index 0000000..0e78b9e Binary files /dev/null and b/backend/src/main/java/.DS_Store differ diff --git a/backend/src/main/java/com/.DS_Store b/backend/src/main/java/com/.DS_Store new file mode 100644 index 0000000..b31bd9b Binary files /dev/null and b/backend/src/main/java/com/.DS_Store differ diff --git a/backend/src/main/java/com/realnet/.DS_Store b/backend/src/main/java/com/realnet/.DS_Store new file mode 100644 index 0000000..c78b5be Binary files /dev/null and b/backend/src/main/java/com/realnet/.DS_Store differ diff --git a/backend/src/main/java/com/realnet/RealNetApp.java b/backend/src/main/java/com/realnet/RealNetApp.java new file mode 100644 index 0000000..59ae198 --- /dev/null +++ b/backend/src/main/java/com/realnet/RealNetApp.java @@ -0,0 +1,35 @@ +package com.realnet; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.builder.SpringApplicationBuilder; +import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; +import org.springframework.cache.annotation.EnableCaching; + +import org.springframework.transaction.annotation.EnableTransactionManagement; + +import springfox.documentation.swagger2.annotations.EnableSwagger2; + +@SpringBootApplication +//@EnableSwagger2 +//@EnableTransactionManagement +//@EnableJpaAuditing +//@EnableCaching +public class RealNetApp extends SpringBootServletInitializer{ + @Override + protected SpringApplicationBuilder configure(SpringApplicationBuilder builder){ + return builder.sources(RealNetApp.class); + } +// + public static void main(String[] args) { + SpringApplication.run(RealNetApp.class, args); + } +} + +/* +SpringBoot Notes + +@Bean :tells Spring 'here is an instance of this class, please keep hold of it and give it back to me when I ask'. +@Autowired :says 'please give me an instance of this class, for example, one that I created with an @Bean annotation earlier'. + +*/ diff --git a/backend/src/main/java/com/realnet/WhoCollumn/Extension.java b/backend/src/main/java/com/realnet/WhoCollumn/Extension.java new file mode 100644 index 0000000..9f96ef3 --- /dev/null +++ b/backend/src/main/java/com/realnet/WhoCollumn/Extension.java @@ -0,0 +1,29 @@ +package com.realnet.WhoCollumn; + +import lombok.*; + +@Data + +public class Extension extends Who_column { + /** + * + */ + private static final long serialVersionUID = 1L; + + private String extn1; + private String extn2; + private String extn3; + private String extn4; + private String extn5; + private String extn6; + private String extn7; + private String extn8; + private String extn9; + private String extn10; + private String extn11; + private String extn12; + private String extn13; + private String extn14; + private String extn15; + +} \ No newline at end of file diff --git a/backend/src/main/java/com/realnet/WhoCollumn/Who_column.java b/backend/src/main/java/com/realnet/WhoCollumn/Who_column.java new file mode 100644 index 0000000..ccfe671 --- /dev/null +++ b/backend/src/main/java/com/realnet/WhoCollumn/Who_column.java @@ -0,0 +1,29 @@ +package com.realnet.WhoCollumn; +import lombok.Data; +import org.springframework.data.annotation.*; +import org.springframework.data.mongodb.core.mapping.Field; + +import java.util.Date; + +@Data +public class Who_column { + + @Field("created_at") + @CreatedDate + private Date createdAt; + + @Field("created_by") + @CreatedBy + private Long createdBy; + + @Field("updated_by") + @LastModifiedBy + private Long updatedBy; + + @Field("updated_at") + @LastModifiedDate + private Date updatedAt; + + @Field("account_id") + private Long accountId; +} diff --git a/backend/src/main/java/com/realnet/config/AppConfig.java b/backend/src/main/java/com/realnet/config/AppConfig.java new file mode 100644 index 0000000..cad8884 --- /dev/null +++ b/backend/src/main/java/com/realnet/config/AppConfig.java @@ -0,0 +1,39 @@ +package com.realnet.config; + +import org.modelmapper.ModelMapper; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; +import com.realnet.logging.NoLogging; + +@Configuration +public class AppConfig { +// @Bean +// public HibernateJpaSessionFactoryBean sessionFactory() { +// return new HibernateJpaSessionFactoryBean(); +// } + + @NoLogging + @Bean + public ModelMapper modelMapper() { + return new ModelMapper(); + } + + @Bean + public MappingJackson2HttpMessageConverter mappingJackson2HttpMessageConverter() { + ObjectMapper mapper = new ObjectMapper(); + mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false); + MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter(mapper); + return converter; + } + + @Bean + public ObjectMapper objectMapper() { + return new ObjectMapper().disable(SerializationFeature.FAIL_ON_EMPTY_BEANS); + } + + +} diff --git a/backend/src/main/java/com/realnet/config/CorsFilter.java b/backend/src/main/java/com/realnet/config/CorsFilter.java new file mode 100644 index 0000000..cfe64bc --- /dev/null +++ b/backend/src/main/java/com/realnet/config/CorsFilter.java @@ -0,0 +1,58 @@ +package com.realnet.config; + +import java.io.IOException; + +import javax.servlet.FilterChain; +import javax.servlet.FilterConfig; +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.context.annotation.Configuration; + +import com.realnet.logging.NoLogging; + + +public class CorsFilter implements javax.servlet.Filter { + @NoLogging + @Override + public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { + HttpServletResponse res = (HttpServletResponse) response; + HttpServletRequest req = (HttpServletRequest) request; + + res.setHeader("Access-Control-Allow-Origin", "*"); + res.setHeader("Access-Control-Allow-Credentials", "true"); + res.setHeader("Access-Control-Allow-Methods", "GET, POST, DELETE, PUT, OPTIONS"); + res.setHeader("Access-Control-Max-Age", "3600"); + res.setHeader("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept, Accept-Encoding, Accept-Language, Host, Referer, Connection, User-Agent, authorization, sw-useragent, sw-version"); + //res.setHeader("Access-Control-Allow-Headers", "Access-Control-Allow-Headers, Origin, Accept, X-Requested-With, Content-Type, Access-Control-Request-Method, Access-Control-Request-Headers"); + // Just REPLY OK if request method is OPTIONS for CORS (pre-flight) + if ( req.getMethod().equals("OPTIONS") ) { + res.setStatus(HttpServletResponse.SC_OK); + return; + } + chain.doFilter(request, response); + } + +// public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException { +// System.out.println("Filtering on..........................................................."); +// HttpServletResponse response = (HttpServletResponse) res; +// response.setHeader("Access-Control-Allow-Origin", "*"); +// response.setHeader("Access-Control-Allow-Credentials", "true"); +// response.setHeader("Access-Control-Allow-Methods", "POST, GET, PUT, OPTIONS, DELETE"); +// response.setHeader("Access-Control-Max-Age", "3600"); +// response.setHeader("Access-Control-Allow-Headers", "X-Requested-With, Content-Type, Authorization, Origin, Accept, Access-Control-Request-Method, Access-Control-Request-Headers"); +// +// chain.doFilter(req, res); +//} + + @NoLogging + @Override + public void destroy() {} + + @NoLogging + @Override + public void init(FilterConfig filterConfig) throws ServletException {} +} diff --git a/backend/src/main/java/com/realnet/config/EmailService.java b/backend/src/main/java/com/realnet/config/EmailService.java new file mode 100644 index 0000000..f7a2a68 --- /dev/null +++ b/backend/src/main/java/com/realnet/config/EmailService.java @@ -0,0 +1,80 @@ +package com.realnet.config; + +import java.io.IOException; + +import javax.mail.MessagingException; +import javax.mail.internet.MimeMessage; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.mail.MailException; +import org.springframework.mail.SimpleMailMessage; +import org.springframework.mail.javamail.JavaMailSender; +import org.springframework.mail.javamail.MimeMessageHelper; +import org.springframework.stereotype.Service; + +import lombok.extern.slf4j.Slf4j; + +@Slf4j +@Service +public class EmailService { + @Autowired + private JavaMailSender mailSender; + + public void sendSimpleMessage(String from, String to, String subject, String text) throws MailException { + SimpleMailMessage message = new SimpleMailMessage(); + log.debug("email to sent.."); + // message.setFrom(from); + message.setTo(to); + message.setSubject(subject); + message.setText(text); + mailSender.send(message); + log.debug("email sent successfully"); + } + + public void sendEmailWithAttachment(String to, String subject, String text) throws MessagingException, IOException { + + MimeMessage msg = mailSender.createMimeMessage(); + + // true = multipart message + MimeMessageHelper helper = new MimeMessageHelper(msg, true); + log.debug("email to sent.."); + helper.setTo(to); + + helper.setSubject(subject); + + // default = text/plain + // helper.setText("Check attachment for image!"); + + // true = text/html + // helper.setText("

Check attachment for image!

", true); + + helper.setText(text, true); + + // hard coded a file path + // FileSystemResource file = new FileSystemResource(new + // File("path/android.png")); + // helper.addAttachment("my_photo.png", new ClassPathResource("android.png")); + mailSender.send(msg); + log.debug("email sent successfully"); + } + + public void constructEmail(String em, String subject, String url) { + SimpleMailMessage email = new SimpleMailMessage(); + email.setSubject(subject); + email.setText(url); + email.setTo(em); + mailSender.send(email); + + } + + // FOR ADD USER VIA ADMIN + public void adduserviaadmin(String em, String subject, String url) { + SimpleMailMessage email = new SimpleMailMessage(); + email.setSubject(subject); + email.setText(url); + email.setTo(em); + mailSender.send(email); + + } + +} diff --git a/backend/src/main/java/com/realnet/config/HttpLoggingFilter.java b/backend/src/main/java/com/realnet/config/HttpLoggingFilter.java new file mode 100644 index 0000000..0db3a18 --- /dev/null +++ b/backend/src/main/java/com/realnet/config/HttpLoggingFilter.java @@ -0,0 +1,521 @@ +//package com.realnet.config; +// +//import java.io.BufferedReader; +//import java.io.ByteArrayInputStream; +//import java.io.ByteArrayOutputStream; +//import java.io.File; +//import java.io.FileWriter; +//import java.io.IOException; +//import java.io.InputStream; +//import java.io.InputStreamReader; +//import java.io.OutputStream; +//import java.io.PrintWriter; +//import java.nio.file.FileSystems; +//import java.nio.file.Path; +//import java.nio.file.Paths; +//import java.text.DateFormat; +//import java.text.SimpleDateFormat; +//import java.util.Collection; +//import java.util.Date; +//import java.util.Enumeration; +//import java.util.HashMap; +//import java.util.Locale; +//import java.util.Map; +// +//import javax.servlet.Filter; +//import javax.servlet.FilterChain; +//import javax.servlet.FilterConfig; +//import javax.servlet.ReadListener; +//import javax.servlet.ServletException; +//import javax.servlet.ServletInputStream; +//import javax.servlet.ServletOutputStream; +//import javax.servlet.ServletRequest; +//import javax.servlet.ServletResponse; +//import javax.servlet.WriteListener; +//import javax.servlet.http.Cookie; +//import javax.servlet.http.HttpServletRequest; +//import javax.servlet.http.HttpServletRequestWrapper; +//import javax.servlet.http.HttpServletResponse; +//import javax.servlet.http.HttpSession; +// +//import org.apache.commons.io.output.TeeOutputStream; +//import org.slf4j.Logger; +//import org.slf4j.LoggerFactory; +//import org.springframework.beans.factory.ObjectFactory; +//import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.stereotype.Component; +//import org.springframework.web.context.request.RequestContextHolder; +//import org.springframework.web.context.request.ServletRequestAttributes; +// +//import com.realnet.logging1.service.LoggingService; +//import com.realnet.users.entity1.AppUser; +//import com.realnet.users.service1.AppUserServiceImpl; +// +// +// +//@Component +//public class HttpLoggingFilter implements Filter{ +// public static StringBuilder logInfo; +// public static boolean logged=false; +// private final Logger LOGGER = LoggerFactory.getLogger(getClass()); +// public static String sessionLogging = "no"; +// @Autowired +// ObjectFactory httpSessionFactory; +// private AppUserServiceImpl appUserServiceImpl; +// private LoggingService loggingService; +// +// public HttpLoggingFilter(ObjectFactory httpSessionFactory, AppUserServiceImpl appUserServiceImpl, +// LoggingService loggingService) { +// super(); +// this.httpSessionFactory = httpSessionFactory; +// this.appUserServiceImpl = appUserServiceImpl; +// this.loggingService=loggingService; +// } +// +// @Override +// public void init(FilterConfig filterConfig) throws ServletException { +// } +// +// @Override +// public void doFilter(ServletRequest request, ServletResponse response, +// FilterChain chain) throws IOException, ServletException { +// try { +// HttpServletRequest httpServletRequest = (HttpServletRequest) request; +// HttpServletResponse httpServletResponse = (HttpServletResponse) response; +// +// Map requestMap = this.getParameters(httpServletRequest); +// BufferedRequestWrapper bufferedRequest = new BufferedRequestWrapper( +// httpServletRequest); +// BufferedResponseWrapper bufferedResponse = new BufferedResponseWrapper( +// httpServletResponse); +// Date d = new Date(); +// DateFormat simple =new SimpleDateFormat("dd MMM yyyy HH:mm:ss"); +// String timeStamp = simple.format(d); +// String servletPath = httpServletRequest.getServletPath(); +// final StringBuilder logMessage = new StringBuilder( +// "["+timeStamp+"]") +// .append("REST Request - ").append("[HTTP METHOD:") +// .append(httpServletRequest.getMethod()) +// .append("] [PATH INFO:") +// .append(servletPath) +// .append("] [REQUEST PARAMETERS:").append(requestMap) +// .append("] [REQUEST BODY:") +// .append(bufferedRequest.getRequestBody()) +// .append("] [REMOTE ADDRESS:") +// .append(httpServletRequest.getRemoteAddr()).append("]"); +// +// logInfo=logMessage; +// +// chain.doFilter(bufferedRequest, bufferedResponse); +// +// if(!servletPath.startsWith("/token/") || !servletPath.startsWith("/api/")) +// { +// if(httpSessionFactory.getObject().getAttribute("generate_log")==null) { +// Long id = appUserServiceImpl.getLoggedInUser().getUserId(); +// if(loggingService.getOne(id)!=null) { +// httpSessionFactory.getObject().setAttribute("generate_log",loggingService.getOne(id).getGenerateLog()); +// httpSessionFactory.getObject().setAttribute("generate_log",loggingService.getOne(id).getLogLevel()); +// httpSessionFactory.getObject().setAttribute("generate_log",loggingService.getOne(id).getLogFileName()); +// }else { +// httpSessionFactory.getObject().setAttribute("generate_log","N"); +// } +// +// } +// if(!httpSessionFactory.getObject().getAttribute("generate_log").equals("N")) { +// try { +// logMessage.append(" [RESPONSE:").append(bufferedResponse.getContent()).append("]"); +// } catch (Exception ex) { +// System.out.println(ex); +// } +// System.out.println(httpSessionFactory.getObject().getAttribute("LogginLevel")); +// if (httpSessionFactory.getObject().getAttribute("LogginLevel").equals("info")) { +// AppUser u = appUserServiceImpl.getLoggedInUser(); +// if (u != null) { +// Path root = FileSystems.getDefault().getPath("").toAbsolutePath(); +// Path filePath = Paths.get(root.toString(),"logs",httpSessionFactory.getObject().getAttribute("LogFileName").toString()); +// File f=filePath.toFile(); +// // File f = new File("/home/jboss/EAP-7.1.0/logs/sysadmin2_5463783.log"); +// FileWriter fw = new FileWriter(f,true); +// logInfo = logMessage; +// fw.write(logInfo.toString() + "\n"); +// fw.close(); +// +// } +// } else if (httpSessionFactory.getObject().getAttribute("LogginLevel").equals("debug") && logged==false) { +// AppUser u = appUserServiceImpl.getLoggedInUser(); +// if (u != null) { +// Path root = FileSystems.getDefault().getPath("").toAbsolutePath(); +// Path filePath = Paths.get(root.toString(),"logs",httpSessionFactory.getObject().getAttribute("LogFileName").toString()); +// File f=filePath.toFile(); +// // File f = new File("/home/jboss/EAP-7.1.0/logs/sysadmin2_5463783.log"); +// FileWriter fw = new FileWriter(f,true); +// logInfo = logMessage; +// fw.write(logInfo.toString() + "\n"); +// fw.close(); +// } +// +// } else { +// +// } +// } +// } +// +// } catch (Exception a) { +// throw a; +// } +// +// } +// +// +// +// private Map getParameters(HttpServletRequest request) { +// Map typesafeRequestMap = new HashMap(); +// Enumeration requestParamNames = request.getParameterNames(); +// while (requestParamNames.hasMoreElements()) { +// String requestParamName = (String) requestParamNames.nextElement(); +// String requestParamValue; +// if (requestParamName.equalsIgnoreCase("password")) { +// requestParamValue = "****"; +// } else { +// requestParamValue = request.getParameter(requestParamName); +// } +// typesafeRequestMap.put(requestParamName, requestParamValue); +// } +// return typesafeRequestMap; +// } +// +// @Override +// public void destroy() { +// } +// +// private static final class BufferedRequestWrapper extends +// HttpServletRequestWrapper { +// +// private ByteArrayInputStream bais = null; +// private ByteArrayOutputStream baos = null; +// private BufferedServletInputStream bsis = null; +// private byte[] buffer = null; +// +// public BufferedRequestWrapper(HttpServletRequest req) +// throws IOException { +// super(req); +// // Read InputStream and store its content in a buffer. +// InputStream is = req.getInputStream(); +// this.baos = new ByteArrayOutputStream(); +// byte buf[] = new byte[1024]; +// int read; +// while ((read = is.read(buf)) > 0) { +// this.baos.write(buf, 0, read); +// } +// this.buffer = this.baos.toByteArray(); +// is.close(); +// } +// +// @Override +// public ServletInputStream getInputStream() { +// this.bais = new ByteArrayInputStream(this.buffer); +// this.bsis = new BufferedServletInputStream(this.bais); +// return this.bsis; +// } +// +// String getRequestBody() throws IOException { +// BufferedReader reader = new BufferedReader(new InputStreamReader( +// this.getInputStream())); +// String line = null; +// StringBuilder inputBuffer = new StringBuilder(); +// do { +// line = reader.readLine(); +// if (null != line) { +// inputBuffer.append(line.trim()); +// } +// } while (line != null); +// reader.close(); +// return inputBuffer.toString().trim(); +// } +// +// } +// +// private static final class BufferedServletInputStream extends +// ServletInputStream { +// +// private ByteArrayInputStream bais; +// +// public BufferedServletInputStream(ByteArrayInputStream bais) { +// this.bais = bais; +// } +// +// @Override +// public int available() { +// return this.bais.available(); +// } +// +// @Override +// public int read() { +// return this.bais.read(); +// } +// +// @Override +// public int read(byte[] buf, int off, int len) { +// return this.bais.read(buf, off, len); +// } +// +// @Override +// public boolean isFinished() { +// return false; +// } +// +// @Override +// public boolean isReady() { +// return true; +// } +// +// @Override +// public void setReadListener(ReadListener readListener) { +// +// } +// } +// +// public class TeeServletOutputStream extends ServletOutputStream { +// +// private final TeeOutputStream targetStream; +// +// public TeeServletOutputStream(OutputStream one, OutputStream two) { +// targetStream = new TeeOutputStream(one, two); +// } +// +// @Override +// public void write(int arg0) throws IOException { +// this.targetStream.write(arg0); +// } +// +// public void flush() throws IOException { +// super.flush(); +// this.targetStream.flush(); +// } +// +// public void close() throws IOException { +// super.close(); +// this.targetStream.close(); +// } +// +// @Override +// public boolean isReady() { +// return false; +// } +// +// @Override +// public void setWriteListener(WriteListener writeListener) { +// +// } +// } +// +// +// +//public class BufferedResponseWrapper implements HttpServletResponse { +// +// HttpServletResponse original; +// TeeServletOutputStream tee; +// ByteArrayOutputStream bos; +// +// public BufferedResponseWrapper(HttpServletResponse response) { +// original = response; +// } +// +// public String getContent() { +// return bos.toString(); +// } +// +// public PrintWriter getWriter() throws IOException { +// return original.getWriter(); +// } +// +// public ServletOutputStream getOutputStream() throws IOException { +// if (tee == null) { +// bos = new ByteArrayOutputStream(); +// tee = new TeeServletOutputStream(original.getOutputStream(), +// bos); +// } +// return tee; +// +// } +// +// @Override +// public String getCharacterEncoding() { +// return original.getCharacterEncoding(); +// } +// +// @Override +// public String getContentType() { +// return original.getContentType(); +// } +// +// @Override +// public void setCharacterEncoding(String charset) { +// original.setCharacterEncoding(charset); +// } +// +// @Override +// public void setContentLength(int len) { +// original.setContentLength(len); +// } +// +// @Override +// public void setContentLengthLong(long l) { +// original.setContentLengthLong(l); +// } +// +// @Override +// public void setContentType(String type) { +// original.setContentType(type); +// } +// +// @Override +// public void setBufferSize(int size) { +// original.setBufferSize(size); +// } +// +// @Override +// public int getBufferSize() { +// return original.getBufferSize(); +// } +// +// @Override +// public void flushBuffer() throws IOException { +// tee.flush(); +// } +// +// @Override +// public void resetBuffer() { +// original.resetBuffer(); +// } +// +// @Override +// public boolean isCommitted() { +// return original.isCommitted(); +// } +// +// @Override +// public void reset() { +// original.reset(); +// } +// +// @Override +// public void setLocale(Locale loc) { +// original.setLocale(loc); +// } +// +// @Override +// public Locale getLocale() { +// return original.getLocale(); +// } +// +// @Override +// public void addCookie(Cookie cookie) { +// original.addCookie(cookie); +// } +// +// @Override +// public boolean containsHeader(String name) { +// return original.containsHeader(name); +// } +// +// @Override +// public String encodeURL(String url) { +// return original.encodeURL(url); +// } +// +// @Override +// public String encodeRedirectURL(String url) { +// return original.encodeRedirectURL(url); +// } +// +// @SuppressWarnings("deprecation") +// @Override +// public String encodeUrl(String url) { +// return original.encodeUrl(url); +// } +// +// @SuppressWarnings("deprecation") +// @Override +// public String encodeRedirectUrl(String url) { +// return original.encodeRedirectUrl(url); +// } +// +// @Override +// public void sendError(int sc, String msg) throws IOException { +// original.sendError(sc, msg); +// } +// +// @Override +// public void sendError(int sc) throws IOException { +// original.sendError(sc); +// } +// +// @Override +// public void sendRedirect(String location) throws IOException { +// original.sendRedirect(location); +// } +// +// @Override +// public void setDateHeader(String name, long date) { +// original.setDateHeader(name, date); +// } +// +// @Override +// public void addDateHeader(String name, long date) { +// original.addDateHeader(name, date); +// } +// +// @Override +// public void setHeader(String name, String value) { +// original.setHeader(name, value); +// } +// +// @Override +// public void addHeader(String name, String value) { +// original.addHeader(name, value); +// } +// +// @Override +// public void setIntHeader(String name, int value) { +// original.setIntHeader(name, value); +// } +// +// @Override +// public void addIntHeader(String name, int value) { +// original.addIntHeader(name, value); +// } +// +// @Override +// public void setStatus(int sc) { +// original.setStatus(sc); +// } +// +// @SuppressWarnings("deprecation") +// @Override +// public void setStatus(int sc, String sm) { +// original.setStatus(sc, sm); +// } +// +// @Override +// public String getHeader(String arg0) { +// return original.getHeader(arg0); +// } +// +// @Override +// public Collection getHeaderNames() { +// return original.getHeaderNames(); +// } +// +// @Override +// public Collection getHeaders(String arg0) { +// return original.getHeaders(arg0); +// } +// +// @Override +// public int getStatus() { +// return original.getStatus(); +// } +// +// } +//} \ No newline at end of file diff --git a/backend/src/main/java/com/realnet/config/JWTConstant.java b/backend/src/main/java/com/realnet/config/JWTConstant.java new file mode 100644 index 0000000..2994c47 --- /dev/null +++ b/backend/src/main/java/com/realnet/config/JWTConstant.java @@ -0,0 +1,22 @@ +package com.realnet.config; + +public class JWTConstant { + + // private static final long VALIDITY_TIME_MS = 10 * 24 * 60 * 60 * 1000;// 10 + // days Validity + public static final long VALIDITY_TIME_MS = 2 * 60 * 60 * 1000; // 2 hours validity + + public static final long ACCESS_TOKEN_VALIDITY_SECONDS = 30 * 24 * 60 * 60; + public static final String SECRET_KEY = "realnet"; + public static final String TOKEN_PREFIX = "Bearer "; + public static final String HEADER_STRING = "Authorization"; + public static final String AUTHORITIES_KEY = "scopes"; + + + public static final String JWT_ILLEGAL_ARGUMENT_MESSAGE = "An error occured during getting username from token"; + public static final String JWT_EXPIRED_MESSAGE = "The token is expired and not valid anymore"; + public static final String JWT_SIGNATURE_MESSAGE = "Authentication Failed. Username or Password not valid."; + public static final String UNAUTHORIZED_MESSAGE = "You are not authorized to view the resource"; + public static final String FORBIDDEN_MESSAGE = "You don't have the right to access to this resource"; + public static final String INVALID_DATA_MESSAGE = "One or many parameters in the request's body are invalid"; +} diff --git a/backend/src/main/java/com/realnet/config/JwtAuthenticationEntryPoint.java b/backend/src/main/java/com/realnet/config/JwtAuthenticationEntryPoint.java new file mode 100644 index 0000000..12b4ddb --- /dev/null +++ b/backend/src/main/java/com/realnet/config/JwtAuthenticationEntryPoint.java @@ -0,0 +1,37 @@ +package com.realnet.config; + +import java.io.IOException; +import java.io.Serializable; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.security.core.AuthenticationException; +import org.springframework.security.web.AuthenticationEntryPoint; +import org.springframework.stereotype.Component; + +import com.realnet.logging.NoLogging; +import com.realnet.logging.SecurityNoLogging; + +@Component +public class JwtAuthenticationEntryPoint implements AuthenticationEntryPoint, Serializable { + + /** + * + */ + private static final long serialVersionUID = 1L; + + /* + * This is invoked when user tries to access a secured REST resource without supplying any credentials + * We should just send a 401 Unauthorized response because there is no 'login page' to redirect to + * Here you can place any message you want + * */ + @NoLogging + @Override + public void commence(HttpServletRequest request, HttpServletResponse response, + AuthenticationException authException) throws IOException { + + //response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "Unauthorized"); + response.sendError(HttpServletResponse.SC_UNAUTHORIZED, authException.getMessage()); + } +} \ No newline at end of file diff --git a/backend/src/main/java/com/realnet/config/JwtAuthenticationFilter.java b/backend/src/main/java/com/realnet/config/JwtAuthenticationFilter.java new file mode 100644 index 0000000..80e1f03 --- /dev/null +++ b/backend/src/main/java/com/realnet/config/JwtAuthenticationFilter.java @@ -0,0 +1,107 @@ +package com.realnet.config; + +import java.io.IOException; + +import javax.servlet.FilterChain; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpMethod; +import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; +import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.security.core.userdetails.UserDetails; +import org.springframework.security.core.userdetails.UserDetailsService; +import org.springframework.security.web.authentication.WebAuthenticationDetailsSource; +import org.springframework.web.filter.OncePerRequestFilter; + +import com.realnet.logging.NoLogging; + +import io.jsonwebtoken.ExpiredJwtException; +import io.jsonwebtoken.SignatureException; + +public class JwtAuthenticationFilter extends OncePerRequestFilter { + + private static final Logger logger = LoggerFactory.getLogger(JwtAuthenticationFilter.class); + + @Autowired + private UserDetailsService userDetailsService; + + @Autowired + private TokenProvider jwtTokenUtil; + + +////////// + + protected void configure(HttpSecurity http) throws Exception + { + http + .csrf().disable() + .authorizeRequests() + .antMatchers(HttpMethod.OPTIONS,"/path/to/allow").permitAll()//allow CORS option calls + .antMatchers("/resources/**").permitAll() + .anyRequest().authenticated() + .and() + .formLogin() + .and() + .httpBasic(); + } + + + ////////////// + + + + + + @NoLogging + @Override + protected void doFilterInternal(HttpServletRequest req, HttpServletResponse res, FilterChain chain) + throws IOException, ServletException { + String header = req.getHeader(JWTConstant.HEADER_STRING); + //System.out.println("HEADER => {}" + header); + String username = null; + String email = null; + String authToken = null; + if (header != null && header.startsWith(JWTConstant.TOKEN_PREFIX)) { + authToken = header.replace(JWTConstant.TOKEN_PREFIX, ""); + try { + username = jwtTokenUtil.getUsernameFromToken(authToken); + //logger.info("getting username from token : {}" + username); + email = jwtTokenUtil.getEmailFromToken(authToken); + //logger.info("getting email from token : {}" + email); + //System.out.println("email => {}" + email); + + } catch (IllegalArgumentException e) { + logger.error("an error occured during getting username from token", e); + } catch (ExpiredJwtException e) { + logger.warn("the token is expired and not valid anymore", e); + } catch (SignatureException e) { + logger.error("Authentication Failed. Username or Password not valid."); + } + } else { + logger.warn("couldn't find bearer string, will ignore the header"); + } + //if (username != null && SecurityContextHolder.getContext().getAuthentication() == null) { + if (email != null && SecurityContextHolder.getContext().getAuthentication() == null) { + + UserDetails userDetails = userDetailsService.loadUserByUsername(email); + + if (jwtTokenUtil.validateToken(authToken, userDetails)) { + UsernamePasswordAuthenticationToken authentication = jwtTokenUtil.getAuthentication(authToken, + SecurityContextHolder.getContext().getAuthentication(), userDetails); + // UsernamePasswordAuthenticationToken authentication = new + // UsernamePasswordAuthenticationToken(userDetails, null, Arrays.asList(new + // SimpleGrantedAuthority("ROLE_ADMIN"))); + authentication.setDetails(new WebAuthenticationDetailsSource().buildDetails(req)); + logger.debug("authenticated user " + email + ", setting security context"); + SecurityContextHolder.getContext().setAuthentication(authentication); + } + } + chain.doFilter(req, res); + } +} \ No newline at end of file diff --git a/backend/src/main/java/com/realnet/config/MessageSourceConfig.java b/backend/src/main/java/com/realnet/config/MessageSourceConfig.java new file mode 100644 index 0000000..ced005e --- /dev/null +++ b/backend/src/main/java/com/realnet/config/MessageSourceConfig.java @@ -0,0 +1,32 @@ +package com.realnet.config; + +import org.springframework.context.MessageSource; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.support.ReloadableResourceBundleMessageSource; +import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean; + +import com.realnet.logging.NoLogging; + +@Configuration +public class MessageSourceConfig { + + @NoLogging + @Bean + public MessageSource messageSource() { + ReloadableResourceBundleMessageSource messageSource + = new ReloadableResourceBundleMessageSource(); + + messageSource.setBasename("classpath:messages"); + messageSource.setDefaultEncoding("UTF-8"); + return messageSource; + } + @NoLogging + @Bean + public LocalValidatorFactoryBean getValidator() { + LocalValidatorFactoryBean bean = new LocalValidatorFactoryBean(); + bean.setValidationMessageSource(messageSource()); + return bean; + } + +} diff --git a/backend/src/main/java/com/realnet/config/SecurityConfig.java b/backend/src/main/java/com/realnet/config/SecurityConfig.java new file mode 100644 index 0000000..6898648 --- /dev/null +++ b/backend/src/main/java/com/realnet/config/SecurityConfig.java @@ -0,0 +1,279 @@ +package com.realnet.config; + +import java.util.Arrays; +import java.util.Collections; +import java.util.concurrent.TimeUnit; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.info.ProjectInfoProperties.Build; +import org.springframework.boot.web.servlet.FilterRegistrationBean; +import org.springframework.cache.CacheManager; +import org.springframework.cache.caffeine.CaffeineCacheManager; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.http.HttpMethod; +import org.springframework.security.authentication.AuthenticationManager; +import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; +import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; +import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.config.annotation.web.builders.WebSecurity; +import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; +import org.springframework.security.config.http.SessionCreationPolicy; +import org.springframework.security.core.userdetails.UserDetailsService; +import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; +import org.springframework.security.web.access.channel.ChannelProcessingFilter; +import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; +import org.springframework.web.cors.CorsConfiguration; +import org.springframework.web.cors.CorsConfigurationSource; +import org.springframework.web.cors.UrlBasedCorsConfigurationSource; + +import com.github.benmanes.caffeine.cache.Caffeine; +import com.realnet.logging.NoLogging; + + +/* + * @EnableGlobalMethodSecurity annotation is what enables the @PreAuthorize annotation. + * */ +@Configuration +@EnableWebSecurity +@EnableGlobalMethodSecurity(prePostEnabled = true) + +public class SecurityConfig extends WebSecurityConfigurerAdapter { +// +// @Value("${oauth.resource:http://sercverUsingOAuth2}") +// private String baseUrl; +// +// @Value("${oauth.authorize:http://sercverUsingOAuth2/rest/oauth/token}") +// private String authorizeUrl; +// +// @Value("${oauth.token:http://sercverUsingOAuth2/rest/oauth/token}") +// private String tokenUrl; + + + @Autowired + private UserDetailsService userDetailsService; + + @Autowired + private JwtAuthenticationEntryPoint unauthorizedHandler; + + + ///// + + public void configure12(WebSecurity web) throws Exception { + web.ignoring().antMatchers(HttpMethod.OPTIONS, "/**"); + } + + +// protected void configure(AuthenticationManagerBuilder auth) throws Exception { +// auth.authenticationProvider(userAuthenticationProvider); +// } +//// +// +// +// protected void configure(HttpSecurity http) throws Exception { +// http +// .cors() // <-- This let it use "corsConfigurationSource" bean. +// .and() +// .authorizeRequests() +// .anyRequest().authenticated() +// .and() +// +// } + + @Bean + protected CorsConfigurationSource corsConfigurationSource() { + final CorsConfiguration configuration = new CorsConfiguration(); + + configuration.setAllowedOrigins(Collections.singletonList("http://localhost:3000")); + configuration.setAllowedMethods(Arrays.asList("HEAD", "GET", "POST", "PUT", "DELETE", "PATCH")); + + // NOTE: setAllowCredentials(true) is important, + // otherwise, the value of the 'Access-Control-Allow-Origin' header in the response + // must not be the wildcard '*' when the request's credentials mode is 'include'. + configuration.setAllowCredentials(true); + + // NOTE: setAllowedHeaders is important! + // Without it, OPTIONS preflight request will fail with 403 Invalid CORS request + configuration.setAllowedHeaders(Arrays.asList( + "Authorization", + "Accept", + "Cache-Control", + "Content-Type", + "Origin", + "ajax", // <-- This is needed for jQuery's ajax request. + "x-csrf-token", + "x-requested-with" + )); + + final UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); + source.registerCorsConfiguration("/**", configuration); + return source; + } + + + protected void configure123(HttpSecurity http) throws Exception + { + http + .csrf().disable() + .authorizeRequests() + .antMatchers("/resources/**").permitAll() + .anyRequest().authenticated() + .and() + .formLogin() + .and() + .httpBasic() + .and() + .oauth2Login() + .and() + .cors(); + + } + + ////// + + + + + @NoLogging + @Override + @Bean + public AuthenticationManager authenticationManagerBean() throws Exception { + return super.authenticationManagerBean(); + } + + @NoLogging + @Autowired + public void globalUserDetails(AuthenticationManagerBuilder auth) throws Exception { + auth.userDetailsService(userDetailsService).passwordEncoder(encoder()); + } + + @NoLogging + @Bean + public JwtAuthenticationFilter authenticationTokenFilterBean() throws Exception { + return new JwtAuthenticationFilter(); + } + + @NoLogging + @Override + public void configure(WebSecurity web) throws Exception { + // Filters will not get executed for the resources + web.ignoring().antMatchers("/", "/resources/**", "/static/**", "/public/**", "/webui/**", "/h2-console/**", + "/configuration/**", "/swagger-ui/**", "/swagger-resources/**", "/webjars/**", "/api-docs", + "/api-docs/**", "/v2/api-docs/**", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/**/*.png", + "/**/*.jpg", "/**/*.gif", "/**/*.svg", "/**/*.ico", "/**/*.ttf", "/**/*.woff", "/**/*.otf"); + } + + // If Security is not working check application.properties if it is set to + // ignore +// @Override +// protected void configure(HttpSecurity http) throws Exception { +// http.exceptionHandling().and().anonymous().and() +// // Disable Cross site references +// .csrf().disable() +// // Add CORS Filter +// .addFilterBefore(new CorsFilter(), ChannelProcessingFilter.class) +// // Custom Token based authentication based on the header previously given to the +// // client +// .addFilterBefore(new VerifyTokenFilter(tokenUtil), UsernamePasswordAuthenticationFilter.class) +// // custom JSON based authentication by POST of +// // {"username":"","password":""} which sets the token header +// // upon authentication +// .addFilterBefore(new GenerateTokenForUserFilter("/session", authenticationManager(), tokenUtil), +// UsernamePasswordAuthenticationFilter.class) +// .authorizeRequests() +// //.antMatchers("/api/instructors/**").hasRole("ADMIN") +// //.antMatchers("/api/customers/**").hasRole(role) +// .anyRequest().authenticated(); +// } + + @NoLogging + @Override + protected void configure(HttpSecurity http) throws Exception { + http.csrf().disable() + // Add CORS Filter //http.cors().and().csrf().disable(). + .addFilterBefore(new CorsFilter(), ChannelProcessingFilter.class).authorizeRequests() + .antMatchers("/token/**").permitAll() + .antMatchers("/log2/**").permitAll() + .antMatchers("/api/**").permitAll() +// .antMatchers("/SqlworkbenchSqlcont/**").hasRole("ADMIN") + .anyRequest().authenticated() + .and().exceptionHandling() + .authenticationEntryPoint(unauthorizedHandler).and().sessionManagement() + .sessionCreationPolicy(SessionCreationPolicy.IF_REQUIRED); + http.addFilterBefore(authenticationTokenFilterBean(), UsernamePasswordAuthenticationFilter.class); + + + } + + /* + * http.csrf().disable().exceptionHandling().authenticationEntryPoint( + * unauthorizedHandler).and() + * .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS). + * and().authorizeRequests() .antMatchers("/token/**", + * "/signup").permitAll().antMatchers(HttpMethod.OPTIONS, "/**").permitAll() + * .anyRequest().authenticated(); + * + * http.addFilterBefore(authenticationTokenFilterBean(), + * UsernamePasswordAuthenticationFilter.class); + */ + + /* + * If You want to store encoded password in your databases and authenticate user + * based on encoded password then uncomment the below method and provde an + * encoder + */ + @NoLogging + @Bean + public BCryptPasswordEncoder encoder() { + return new BCryptPasswordEncoder(); + } + +// @Bean +// public CommonsMultipartResolver getCommonsMultipartResolver() { +// CommonsMultipartResolver multipartResolver = new CommonsMultipartResolver(); +// multipartResolver.setMaxUploadSize(104857600); // 20MB(20971520 Byte) // 100 mb(104,857,600 Byte) +// multipartResolver.setMaxInMemorySize(1048576); // 1MB +// return multipartResolver; +// } + +// @Bean +// public FilterRegistrationBean foo(final HttpLoggingFilter filter) { +// final FilterRegistrationBean bean = new FilterRegistrationBean<>(); +// bean.setFilter(filter); +// // bean.addUrlPatterns(""); +// return bean; +// } + + @Bean + public Caffeine caffeineConfig() { + return Caffeine.newBuilder().expireAfterWrite(60, TimeUnit.MINUTES); + } + @Bean + public CacheManager cacheManager(Caffeine caffeine) { + CaffeineCacheManager caffeineCacheManager = new CaffeineCacheManager(); + caffeineCacheManager.setCaffeine(caffeine); + return caffeineCacheManager; + } +// @Bean +// public OAuth2RestOperations oauth2RestTemplate() { +// AccessTokenRequest atr = new DefaultAccessTokenRequest(); +// return new OAuth2RestTemplate(resource(), +// new DefaultOAuth2ClientContext(atr)); +// } +// +// @Bean +// protected OAuth2ProtectedResourceDetails resource() { +// AuthorizationCodeResourceDetails resource = new AuthorizationCodeResourceDetails(); +// resource.setAccessTokenUri("https://oauth2.googleapis.com/token"); +// resource.setUserAuthorizationUri(authorizeUrl); +// resource.setClientId("508783521234-160if49q1ih8mbmkdc1g7km1c5a6hc95.apps.googleusercontent.com"); +// resource.setClientSecret("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"); +// resource.setGrantType("authorization_code"); +// List l = new ArrayList(); +// l.add("https://www.googleapis.com/auth/gmail.modify"); +// resource.setScope(l); +// return resource; +// } + +} diff --git a/backend/src/main/java/com/realnet/config/SequenceGeneratorService.java b/backend/src/main/java/com/realnet/config/SequenceGeneratorService.java new file mode 100644 index 0000000..c53d046 --- /dev/null +++ b/backend/src/main/java/com/realnet/config/SequenceGeneratorService.java @@ -0,0 +1,15 @@ +package com.realnet.config; + +import org.springframework.stereotype.Service; + +@Service +public class SequenceGeneratorService { + + + public void sequence() { + + } + + + +} diff --git a/backend/src/main/java/com/realnet/config/SwaggerConfig.java b/backend/src/main/java/com/realnet/config/SwaggerConfig.java new file mode 100644 index 0000000..6ca6c0c --- /dev/null +++ b/backend/src/main/java/com/realnet/config/SwaggerConfig.java @@ -0,0 +1,132 @@ +package com.realnet.config; + +import static com.google.common.collect.Lists.newArrayList; + +import java.util.Arrays; +import java.util.List; + +import org.joda.time.LocalDate; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.RequestMethod; + +import com.fasterxml.classmate.TypeResolver; +import com.realnet.logging.NoLogging; + +import springfox.documentation.builders.ApiInfoBuilder; +import springfox.documentation.builders.PathSelectors; +import springfox.documentation.builders.RequestHandlerSelectors; +import springfox.documentation.builders.ResponseMessageBuilder; +import springfox.documentation.service.ApiInfo; +import springfox.documentation.service.ApiKey; +import springfox.documentation.service.AuthorizationScope; +import springfox.documentation.service.SecurityReference; +import springfox.documentation.spi.DocumentationType; +import springfox.documentation.spi.service.contexts.SecurityContext; +import springfox.documentation.spring.web.plugins.Docket; +import springfox.documentation.swagger2.annotations.EnableSwagger2; + +@Configuration +@EnableSwagger2 +public class SwaggerConfig { + + @Autowired + private TypeResolver typeResolver; + + public static final String AUTHORIZATION_HEADER = "Authorization"; + public static final String DEFAULT_INCLUDE_PATTERN = "/api/.*"; + + @NoLogging + private ApiKey apiKey() { + // return new ApiKey("Authorization", "", "header"); // <<< === Create a Header + //return new ApiKey("JWT", "Authorization", "header"); + // (We are createing header named "Authorization" here) + return new ApiKey("JWT", AUTHORIZATION_HEADER, "header"); + + } + + // This path will be called when swagger is loaded first time to get a token + /* + * @Bean public UiConfiguration uiConfig() { return new + * UiConfiguration("session"); } + */ + + @NoLogging + private SecurityContext securityContext() { + return SecurityContext.builder().securityReferences(defaultAuth()).build(); + } + + @NoLogging + private List defaultAuth() { + AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything"); + AuthorizationScope[] authorizationScopes = new AuthorizationScope[1]; + authorizationScopes[0] = authorizationScope; + return Arrays.asList(new SecurityReference("JWT", authorizationScopes)); + } + +// ApiInfo apiInfo() { +// return new ApiInfoBuilder() +// .title("API Reference") +// .version("1.0.0") +// .build(); +// } + + @NoLogging + ApiInfo realItApiInfo() { + return new ApiInfoBuilder() + .title("RealIt APIs") + .version("1.0.0") + .build(); + } + +// @Bean +// public Docket customImplementation() { +// return new Docket(DocumentationType.SWAGGER_2) +// .groupName("public") +// .apiInfo(apiInfo()) +// .securityContexts(Arrays.asList(securityContext())) +// .securitySchemes(newArrayList(apiKey())) +// .select() +// .paths(PathSelectors.any()) +// // .apis(RequestHandlerSelectors.any()) // If you want to list all the apis +// // including springboots own +// .apis(RequestHandlerSelectors.basePackage("com.app.api")) +// .build() +// .pathMapping("/") +// .useDefaultResponseMessages(false) +// .directModelSubstitute(LocalDate.class, String.class) +// .genericModelSubstitutes(ResponseEntity.class); +// } + + @NoLogging + @Bean + public Docket realItCustomeImplementation() { + return new Docket(DocumentationType.SWAGGER_2) + .groupName("realit") + .apiInfo(realItApiInfo()) + .securityContexts(Arrays.asList(securityContext())) + .securitySchemes(newArrayList(apiKey())) + .select() + .paths(PathSelectors.any()) + .apis(RequestHandlerSelectors.basePackage("com.realnet")).build().pathMapping("/") + .useDefaultResponseMessages(false) + .globalResponseMessage(RequestMethod.GET, newArrayList( + new ResponseMessageBuilder() + .code(500) + .message("Internal Server Error").build(), + //.responseModel(new ModelRef("Error")).build(), + new ResponseMessageBuilder() + .code(403) + .message("Forbidden!").build(), + new ResponseMessageBuilder() + .code(400) + .message("Bad Request").build() + //.responseModel(new ModelRef("Error")).build() + )) + .directModelSubstitute(LocalDate.class, String.class) + .genericModelSubstitutes(ResponseEntity.class); + } + +} diff --git a/backend/src/main/java/com/realnet/config/TokenProvider.java b/backend/src/main/java/com/realnet/config/TokenProvider.java new file mode 100644 index 0000000..fd3a47f --- /dev/null +++ b/backend/src/main/java/com/realnet/config/TokenProvider.java @@ -0,0 +1,135 @@ +package com.realnet.config; + +import java.io.Serializable; +import java.util.Arrays; +import java.util.Collection; +import java.util.Date; +import java.util.List; +import java.util.function.Function; +import java.util.stream.Collectors; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.GrantedAuthority; +import org.springframework.security.core.authority.SimpleGrantedAuthority; +import org.springframework.security.core.userdetails.UserDetails; +import org.springframework.stereotype.Component; + +import com.realnet.logging.NoLogging; + +import io.jsonwebtoken.Claims; +import io.jsonwebtoken.Jws; +import io.jsonwebtoken.JwtParser; +import io.jsonwebtoken.Jwts; +import io.jsonwebtoken.SignatureAlgorithm; + +@Component +public class TokenProvider implements Serializable { +// private static final Logger logger = LoggerFactory.getLogger(TokenProvider.class); + + /** + * + */ + private static final long serialVersionUID = 1L; + + // get subject (sub) from token + @NoLogging + public String getUsernameFromToken(String token) { + return getClaimFromToken(token, Claims::getSubject); + } + + @NoLogging + public String getEmailFromToken(String token) { + String email = null; + try { + Claims claims = getAllClaimsFromToken(token); + email = claims.getSubject(); + } catch (Exception e) { + email = null; + } + // logger.info("email = {} ", email); + return email; + } + + @NoLogging + public List getRolesFromToken(String token) { + List roles = null; + try { + Claims claims = getAllClaimsFromToken(token); + roles = Arrays.asList((String) claims.get(JWTConstant.AUTHORITIES_KEY)); + // logger.info("roles = {} ", roles); + } catch (Exception e) { + roles = null; + } + return roles; + } + + // get expiration (exp) from token + public Date getExpirationDateFromToken(String token) { + return getClaimFromToken(token, Claims::getExpiration); + } + + @NoLogging + public T getClaimFromToken(String token, Function claimsResolver) { + final Claims claims = getAllClaimsFromToken(token); + return claimsResolver.apply(claims); + } + + @NoLogging + private Claims getAllClaimsFromToken(String token) { + return Jwts.parser().setSigningKey(JWTConstant.SECRET_KEY).parseClaimsJws(token).getBody(); + } + + @NoLogging + private Boolean isTokenExpired(String token) { + final Date expiration = getExpirationDateFromToken(token); + return expiration.before(new Date()); + } + + @NoLogging + public String generateToken(Authentication authentication) { + final String authorities = authentication.getAuthorities().stream().map(GrantedAuthority::getAuthority) + .collect(Collectors.joining(",")); + // logger.info("authorities = {} ", authorities); + final List AuthorityList = authentication.getAuthorities().stream().map(GrantedAuthority::getAuthority) + .collect(Collectors.toList()); + //logger.info("authentication.getName() = {} ", authentication.getName()); + //logger.info("Authority List = {}", AuthorityList); + return Jwts.builder().setSubject(authentication.getName()) // USER NAME OR EMAIL + .claim(JWTConstant.AUTHORITIES_KEY, authorities) // ROLES + .signWith(SignatureAlgorithm.HS256, JWTConstant.SECRET_KEY).setIssuedAt(new Date(System.currentTimeMillis())) + .setExpiration(new Date(System.currentTimeMillis() + JWTConstant.ACCESS_TOKEN_VALIDITY_SECONDS * 1000)).compact(); + } + + @NoLogging + public Boolean validateToken(String token, UserDetails userDetails) { + // CustomUserDetails user = (CustomUserDetails) userDetails; + // System.out.println("validateToken -> jwtUser : " + user); + // return (username.equals(user.getUsername()) && !isTokenExpired(token)); + + // final String username = getUsernameFromToken(token); + final String email = getEmailFromToken(token); + return (email.equals(userDetails.getUsername()) && !isTokenExpired(token)); + + } + + @NoLogging + UsernamePasswordAuthenticationToken getAuthentication(final String token, final Authentication existingAuth, + final UserDetails userDetails) { + + final JwtParser jwtParser = Jwts.parser().setSigningKey(JWTConstant.SECRET_KEY); + + final Jws claimsJws = jwtParser.parseClaimsJws(token); + + final Claims claims = claimsJws.getBody(); + + final Collection authorities = Arrays + .stream(claims.get(JWTConstant.AUTHORITIES_KEY).toString().split(",")).map(SimpleGrantedAuthority::new) + .collect(Collectors.toList()); + + return new UsernamePasswordAuthenticationToken(userDetails, "", authorities); + } + +} diff --git a/backend/src/main/java/com/realnet/exceptions/InvalidUserDataException.java b/backend/src/main/java/com/realnet/exceptions/InvalidUserDataException.java new file mode 100644 index 0000000..6080b83 --- /dev/null +++ b/backend/src/main/java/com/realnet/exceptions/InvalidUserDataException.java @@ -0,0 +1,12 @@ +package com.realnet.exceptions; + +public class InvalidUserDataException extends RuntimeException { + /** + * + */ + private static final long serialVersionUID = 1L; + + public InvalidUserDataException(String message) { + super(message); + } +} diff --git a/backend/src/main/java/com/realnet/exceptions/ResourceNotFoundException.java b/backend/src/main/java/com/realnet/exceptions/ResourceNotFoundException.java new file mode 100644 index 0000000..df4ba2d --- /dev/null +++ b/backend/src/main/java/com/realnet/exceptions/ResourceNotFoundException.java @@ -0,0 +1,14 @@ +package com.realnet.exceptions; + +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.ResponseStatus; + +@ResponseStatus(value = HttpStatus.NOT_FOUND) +public class ResourceNotFoundException extends RuntimeException { + private static final long serialVersionUID = 1L; + + public ResourceNotFoundException(String msg) { + super(msg); + } + +} \ No newline at end of file diff --git a/backend/src/main/java/com/realnet/exceptions/StorageException.java b/backend/src/main/java/com/realnet/exceptions/StorageException.java new file mode 100644 index 0000000..7326c1b --- /dev/null +++ b/backend/src/main/java/com/realnet/exceptions/StorageException.java @@ -0,0 +1,18 @@ +package com.realnet.exceptions; + +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.annotation.ResponseStatus; + +@ResponseStatus(value = HttpStatus.NOT_FOUND) +public class StorageException extends RuntimeException { + private static final long serialVersionUID = 1L; + + public StorageException(String message) { + super(message); + } + + public StorageException(String message, Throwable cause) { + super(message, cause); + } + +} diff --git a/backend/src/main/java/com/realnet/fnd/controller/MainController.java b/backend/src/main/java/com/realnet/fnd/controller/MainController.java new file mode 100644 index 0000000..c8c4e6a --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/controller/MainController.java @@ -0,0 +1,19 @@ +package com.realnet.fnd.controller; + +import org.springframework.stereotype.*; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.*; +import lombok.extern.slf4j.Slf4j; + +@Slf4j +@ApiIgnore +@Controller // Dont use RestController as this method is mapping to a static file not a JSON +public class MainController { + + @RequestMapping(value={"/"}) + public String index() { + return "index.html"; + } + +} diff --git a/backend/src/main/java/com/realnet/fnd/controller/Rn_DynamicTransactionController.java b/backend/src/main/java/com/realnet/fnd/controller/Rn_DynamicTransactionController.java new file mode 100644 index 0000000..c52cf38 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/controller/Rn_DynamicTransactionController.java @@ -0,0 +1,119 @@ +package com.realnet.fnd.controller; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.validation.Valid; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.exceptions.ResourceNotFoundException; +import com.realnet.fnd.entity.Rn_Dynamic_Transaction; +import com.realnet.fnd.response.Rn_DynamicTransactionResponse; +import com.realnet.fnd.service.Rn_DynamicTransactionService; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; + +@RestController +@RequestMapping(value = "/api", produces = MediaType.APPLICATION_JSON_VALUE) +@Api(tags = { "Rn_Dynamic_Transaction" }) +public class Rn_DynamicTransactionController { + + @Autowired + private Rn_DynamicTransactionService rn_dynamicTransactionService; + +// @Autowired +// private TokenUtil tokenUtil; + + // GET ALL + @ApiOperation(value = "List of Dynamic Transaction", response = Rn_DynamicTransactionResponse.class) + @GetMapping("/dynamic_transaction/all") + public Rn_DynamicTransactionResponse getDynamicTx( + @RequestParam(value = "page", defaultValue = "0", required = false) int page, + @RequestParam(value = "size", defaultValue = "20", required = false) int size) { + + Rn_DynamicTransactionResponse resp = new Rn_DynamicTransactionResponse(); + Pageable paging = PageRequest.of(page, size); + Page result = rn_dynamicTransactionService.getAll(paging); + resp.setPageStats(result, true); + resp.setItems(result.getContent()); + return resp; + } + + // GET BY FROM ID (GRID) + @ApiOperation(value = "Get A Dynamic Transaction") + @GetMapping("/dynamic_transaction") + public ResponseEntity> getDynamicTxByFormId( + @RequestParam(value = "form_id") int form_id) { + List rn_dynamic_transaction = rn_dynamicTransactionService.getByFormId(form_id); + return ResponseEntity.ok().body(rn_dynamic_transaction); + } + + // SAVE + @ApiOperation(value = "Add A New Dynamic Transaction", response = Rn_DynamicTransactionResponse.class) + @PostMapping("/dynamic_transaction") + public ResponseEntity createDynamicTx( + @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken, + @Valid @RequestBody Rn_Dynamic_Transaction rn_dynamic_transaction) { +// String userId = tokenUtil.getUserId(authToken); +// rn_dynamic_transaction.setCreatedBy(userId); +// rn_dynamic_transaction.setAccountId(userId); + Rn_Dynamic_Transaction savedRn_Dynamic_Transaction = rn_dynamicTransactionService.save(rn_dynamic_transaction); + if (savedRn_Dynamic_Transaction == null) { + throw new ResourceNotFoundException("Dynamic Transaction Is Not Saved"); + } + return ResponseEntity.status(HttpStatus.CREATED).body(savedRn_Dynamic_Transaction); + } + + // GET BY ID + @ApiOperation(value = "Get a Single Form", response = Rn_Dynamic_Transaction.class) + @GetMapping("/dynamic_transaction/{id}") + public ResponseEntity getById(@PathVariable(value = "id") int id, + @RequestParam(value = "form_id") int form_id) { + Rn_Dynamic_Transaction dynamicTransaction = rn_dynamicTransactionService.getByIdAndFormId(id, form_id); + return ResponseEntity.ok().body(dynamicTransaction); + } + + // UPDATE + @ApiOperation(value = "Update A Dynamic Transaction", response = Rn_Dynamic_Transaction.class) + @PutMapping("/dynamic_transaction/{id}") + public ResponseEntity updateDynamicTx( + @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken, + @PathVariable(value = "id") int id, @RequestParam(value = "form_id") int form_id, + @Valid @RequestBody Rn_Dynamic_Transaction rn_dynamic_transaction) { +// String userId = tokenUtil.getUserId(authToken); +// rn_dynamic_transaction.setUpdatedBy(userId); + Rn_Dynamic_Transaction updatedDynamicTransaction = rn_dynamicTransactionService.updateByFormId(id, form_id, + rn_dynamic_transaction); + return ResponseEntity.status(HttpStatus.ACCEPTED).body(updatedDynamicTransaction); + } + + // DELETE + @DeleteMapping("/dynamic_transaction/{id}") + public ResponseEntity> deleteDynamicTx(@PathVariable(value = "id") int id) { + boolean deleted = rn_dynamicTransactionService.deleteById(id); + Map response = new HashMap<>(); + response.put("deleted", Boolean.TRUE); + // response.put("deleted", deleted); + return ResponseEntity.status(HttpStatus.OK).body(response); + } +} diff --git a/backend/src/main/java/com/realnet/fnd/controller/Rn_ExtensionController.java b/backend/src/main/java/com/realnet/fnd/controller/Rn_ExtensionController.java new file mode 100644 index 0000000..5f22186 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/controller/Rn_ExtensionController.java @@ -0,0 +1,155 @@ +//package com.realnet.fnd.controller; +// +//import java.util.ArrayList; +//import java.util.HashMap; +//import java.util.List; +//import java.util.Map; +// +//import javax.validation.Valid; +// +//import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.beans.factory.annotation.Value; +//import org.springframework.http.HttpHeaders; +//import org.springframework.http.HttpStatus; +//import org.springframework.http.MediaType; +//import org.springframework.http.ResponseEntity; +//import org.springframework.web.bind.annotation.DeleteMapping; +//import org.springframework.web.bind.annotation.GetMapping; +//import org.springframework.web.bind.annotation.PathVariable; +//import org.springframework.web.bind.annotation.PostMapping; +//import org.springframework.web.bind.annotation.PutMapping; +//import org.springframework.web.bind.annotation.RequestBody; +//import org.springframework.web.bind.annotation.RequestHeader; +//import org.springframework.web.bind.annotation.RequestMapping; +//import org.springframework.web.bind.annotation.RequestParam; +//import org.springframework.web.bind.annotation.RestController; +// +//import com.realnet.FromExtensionJson.Entity.FromExtensionJson_t; +//import com.realnet.FromExtensionJson.Services.FromExtensionJson_Service; +//import com.realnet.exceptions.ResourceNotFoundException; +//import com.realnet.fnd.entity.Rn_Ext_Fields; +//import com.realnet.fnd.service.ExtFieldService; +//import com.realnet.users.entity1.AppUser; +//import com.realnet.users.service1.AppUserServiceImpl; +// +//import io.swagger.annotations.Api; +//import io.swagger.annotations.ApiOperation; +// +//@RestController +//@RequestMapping(value = "/api", produces = MediaType.APPLICATION_JSON_VALUE) +//@Api(tags = { "Extension Fields" }) +//public class Rn_ExtensionController { +// +// @Value("${angularProjectPath}") +// private String angularProjectPath; +// +// @Autowired +// private ExtFieldService extFieldService; +// +// +// @Autowired +// private FromExtensionJson_Service formeExtensionJson_Service; +// +// @Autowired(required = false) +// // private UserService userService; +// private AppUserServiceImpl userService; +// +//// @Autowired +//// private TokenUtil tokenUtil; +// +// // GET ALL +// @ApiOperation(value = "List of Extensions") +// @GetMapping("/extension") +// public ResponseEntity> getExtensions() { +// List result = extFieldService.getAll(); +// return ResponseEntity.ok().body(result); +// } +// +// // GET BY ID +// @ApiOperation(value = "Get an Extension") +// @GetMapping("/extension/{id}") +// public ResponseEntity getExtensionById(@PathVariable(value = "id") int id) { +// Rn_Ext_Fields rn_ext_fields = extFieldService.getById(id); +// return ResponseEntity.ok().body(rn_ext_fields); +// } +// +// // SAVE +// @ApiOperation(value = "Add new Extension", response = Rn_Ext_Fields.class) +// @PostMapping("/extension") +// public ResponseEntity saveExtension( +// @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken, +// @Valid @RequestBody Rn_Ext_Fields rn_ext_fields) { +// // String userId = tokenUtil.getUserId(authToken); +// AppUser loggedInUser = userService.getLoggedInUser(); +// // rn_ext_fields.setCreated_by(loggedInUser.getUserId()); +// rn_ext_fields.setAccount_id(loggedInUser.getAccount().getAccount_id()); +// Rn_Ext_Fields savedRn_Ext_Fields = extFieldService.save(rn_ext_fields); +// if (savedRn_Ext_Fields == null) { +// throw new ResourceNotFoundException("Rn_Ext_Field is not saved"); +// } +// return ResponseEntity.status(HttpStatus.CREATED).body(savedRn_Ext_Fields); +// } +// +// // UPDATE +// @ApiOperation(value = "Update an Extension", response = Rn_Ext_Fields.class) +// @PutMapping("/extension/{id}") +// public ResponseEntity updateRn_Ext_Field( +// @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken, +// @PathVariable(value = "id") int id, @Valid @RequestBody Rn_Ext_Fields rn_ext_fields) { +//// String userId = tokenUtil.getUserId(authToken); +//// // teacher.setAccountId(userId); +//// rn_ext_fields.setUpdatedBy(userId); +// Rn_Ext_Fields updatedRn_Ext_Field = extFieldService.updateById(id, rn_ext_fields); +// return ResponseEntity.status(HttpStatus.ACCEPTED).body(updatedRn_Ext_Field); +// } +// +// // DELETE +// @DeleteMapping("/extension/{id}") +// public ResponseEntity> deleteRn_Ext_Field(@PathVariable(value = "id") int id) { +// boolean deleted = extFieldService.deleteById(id); +// Map response = new HashMap<>(); +// if (deleted) { +// response.put("deleted", Boolean.TRUE); +// return ResponseEntity.status(HttpStatus.OK).body(response); +// } +// return ResponseEntity.status(HttpStatus.NOT_FOUND).body(response); +// } +// +//// @GetMapping("/lookup_values") +//// public ResponseEntity> getLookUps() { +//// List result = extFieldService.getLookupValues(); +//// System.out.println(result); +//// return ResponseEntity.ok().body(result); +//// } +//// +//// @GetMapping("/datatypes") +//// public ResponseEntity> getDataTypes() { +//// List result = extFieldService.getDataTypeValues(); +//// System.out.println(result); +//// return ResponseEntity.ok().body(result); +//// } +// +// @GetMapping("/extension_build/{formId}") +// public ResponseEntity buildExtension(@RequestParam(value = "account_id", required = false) String account_id, +// @RequestParam(value = "form_code", required = false) String form_code, @PathVariable Integer formId) { +// +// ArrayList list = new ArrayList<>(); +// +// System.out.println("Acc Id" + account_id + " Form Code = " + form_code); +// String formCode = extFieldService.buildExtensionByFormCode(account_id, form_code,formId); +// list.add(formCode); +// Map res = new HashMap(); +// res.put("build", true); +// FromExtensionJson_t json_t = new FromExtensionJson_t(); +// json_t.setAccount_id(account_id); +// json_t.setForm_code(form_code); +// +// json_t.setJsonObject(formCode); +// +// formeExtensionJson_Service.Savedata(json_t); +// +// +// return ResponseEntity.ok().body(list); +// } +// +//} diff --git a/backend/src/main/java/com/realnet/fnd/controller/Rn_Forms_Setup_Controller.java b/backend/src/main/java/com/realnet/fnd/controller/Rn_Forms_Setup_Controller.java new file mode 100644 index 0000000..4c7e642 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/controller/Rn_Forms_Setup_Controller.java @@ -0,0 +1,114 @@ +package com.realnet.fnd.controller; + +import java.util.HashMap; +import java.util.Map; + +import javax.validation.Valid; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.fnd.entity.Rn_Forms_Setup; +import com.realnet.fnd.response.Rn_Forms_SetupResponse; +import com.realnet.fnd.service.Rn_Forms_Setup_Service; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; + +@RestController +@RequestMapping(value = "/api", produces = MediaType.APPLICATION_JSON_VALUE) +@Api(tags = { "Rn_Forms_Setup" }) +public class Rn_Forms_Setup_Controller { + + @Autowired + private Rn_Forms_Setup_Service rn_forms_setup_service; + +// @Autowired +// private TokenUtil tokenUtil; + + // GET ALL + @ApiOperation(value = "List of Forms", response = Rn_Forms_SetupResponse.class) + @GetMapping("/form_setup") + public Rn_Forms_SetupResponse getForms( + @RequestParam(value = "page", defaultValue = "0", required = false) Integer page, + @RequestParam(value = "size", defaultValue = "20", required = false) Integer size) { + Rn_Forms_SetupResponse resp = new Rn_Forms_SetupResponse(); + Pageable paging = PageRequest.of(page, size); + Page result = rn_forms_setup_service.getAll(paging); + resp.setPageStats(result, true); + resp.setItems(result.getContent()); + return resp; + } + + // GET BY ID + @ApiOperation(value = "Get a Form", response = Rn_Forms_Setup.class) + @GetMapping("/form_setup/{id}") + public ResponseEntity getFormsById(@PathVariable(value = "id") int id) { + Rn_Forms_Setup rn_forms_setup = rn_forms_setup_service.getById(id); + return ResponseEntity.ok().body(rn_forms_setup); + } + + // SAVE + @ApiOperation(value = "Add A New Form", response = Rn_Forms_Setup.class) + @PostMapping("/form_setup") + public ResponseEntity createRn_Forms_Setup( + @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken, + @Valid @RequestBody Rn_Forms_Setup rn_forms_setup) { +// String userId = tokenUtil.getUserId(authToken); +// rn_forms_setup.setCreatedBy(userId); +// rn_forms_setup.setAccountId(userId); + Rn_Forms_Setup savedRn_Forms_Setup = rn_forms_setup_service.save(rn_forms_setup); + return ResponseEntity.status(HttpStatus.CREATED).body(savedRn_Forms_Setup); + } + + // UPDATE + @ApiOperation(value = "Update A Form", response = Rn_Forms_Setup.class) + @PutMapping("/form_setup/{id}") + public ResponseEntity updateRn_Forms_Setup( + @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken, + @PathVariable(value = "id") Integer id, @Valid @RequestBody Rn_Forms_Setup rn_forms_setup) { +// String userId = tokenUtil.getUserId(authToken); +// rn_forms_setup.setUpdatedBy(userId); + Rn_Forms_Setup updatedRn_Forms_Setup = rn_forms_setup_service.updateById(id, rn_forms_setup); + return ResponseEntity.status(HttpStatus.ACCEPTED).body(updatedRn_Forms_Setup); + } + + // DELETE + @DeleteMapping("/form_setup/{id}") + public ResponseEntity> deleteRn_Forms_Setup(@PathVariable(value = "id") Integer id) { + boolean deleted = rn_forms_setup_service.deleteById(id); + Map response = new HashMap<>(); + response.put("deleted", Boolean.TRUE); + // response.put("deleted", deleted); + return ResponseEntity.status(HttpStatus.OK).body(response); + } + + // BUILD DYNAMIC FORM + @GetMapping("/dynamic_form_build") + public ResponseEntity> buildDynamicForm(@RequestParam(value = "form_id", defaultValue = "0") int form_id) { + System.out.println("Dynamic form build form start"); + rn_forms_setup_service.buildDynamicForm(form_id); + Map response = new HashMap<>(); + response.put("deleted", Boolean.TRUE); + return ResponseEntity.status(HttpStatus.OK).body(response); + + } + + +} diff --git a/backend/src/main/java/com/realnet/fnd/controller/Rn_Function_Register_Controller.java b/backend/src/main/java/com/realnet/fnd/controller/Rn_Function_Register_Controller.java new file mode 100644 index 0000000..cc33c32 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/controller/Rn_Function_Register_Controller.java @@ -0,0 +1,105 @@ +package com.realnet.fnd.controller; + +import java.util.HashMap; +import java.util.Map; + +import javax.validation.Valid; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.fnd.entity.Rn_Function_Register; +import com.realnet.fnd.response.Rn_Function_Register_Response; +import com.realnet.fnd.service.Rn_Function_Register_Service; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; + +@RestController +@RequestMapping(value = "/api", produces = MediaType.APPLICATION_JSON_VALUE) +@Api(tags = { "Function Register" }) +public class Rn_Function_Register_Controller { + + @Autowired + private Rn_Function_Register_Service rn_menu_register_service; + +// @Autowired +// private TokenUtil tokenUtil; + + // GET ALL + @ApiOperation(value = "List of Functions", response = Rn_Function_Register_Response.class) + @GetMapping("/function-register") + public Rn_Function_Register_Response getFunctions( + @RequestParam(value = "page", defaultValue = "0", required = false) Integer page, + @RequestParam(value = "size", defaultValue = "20", required = false) Integer size) { + + // SORTED DATA + //Pageable paging = PageRequest.of(page, size, Sort.by("createdAt").descending()); + + Pageable paging = PageRequest.of(page, size); + Page result = rn_menu_register_service.getAll(paging); + Rn_Function_Register_Response resp = new Rn_Function_Register_Response(); + resp.setPageStats(result, true); + resp.setItems(result.getContent()); + return resp; + } + + // GET BY ID + @ApiOperation(value = "Get a Function", response = Rn_Function_Register.class) + @GetMapping("/function-register/{id}") + public ResponseEntity getFunctionById(@PathVariable(value = "id") Integer id) { + Rn_Function_Register rn_function_register = rn_menu_register_service.getById(id); + return ResponseEntity.ok().body(rn_function_register); + } + + // SAVE + @ApiOperation(value = "Add A New Function", response = Rn_Function_Register.class) + @PostMapping("/function-register") + public ResponseEntity createFunction( + @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken, + @Valid @RequestBody Rn_Function_Register rn_function_register) { +// String userId = tokenUtil.getUserId(authToken); +// rn_function_register.setCreatedBy(userId); +// rn_function_register.setAccountId(userId); + Rn_Function_Register savedFunction = rn_menu_register_service.save(rn_function_register); + return ResponseEntity.status(HttpStatus.CREATED).body(savedFunction); + } + + // UPDATE + @ApiOperation(value = "Update A Function", response = Rn_Function_Register.class) + @PutMapping("/function-register/{id}") + public ResponseEntity updateFunction( + @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken, + @PathVariable(value = "id") Integer id, @Valid @RequestBody Rn_Function_Register rn_function_register) { +// String userId = tokenUtil.getUserId(authToken); +// rn_function_register.setUpdatedBy(userId); + Rn_Function_Register updatedFunction = rn_menu_register_service.updateById(id, rn_function_register); + return ResponseEntity.status(HttpStatus.ACCEPTED).body(updatedFunction); + } + + // DELETE + @DeleteMapping("/function-register/{id}") + public ResponseEntity> deleteFunction(@PathVariable(value = "id") Integer id) { + boolean deleted = rn_menu_register_service.deleteById(id); + Map response = new HashMap<>(); + response.put("deleted", Boolean.TRUE); + // response.put("deleted", deleted); + return ResponseEntity.status(HttpStatus.OK).body(response); + } +} diff --git a/backend/src/main/java/com/realnet/fnd/controller/Rn_Main_Menu_Controller.java b/backend/src/main/java/com/realnet/fnd/controller/Rn_Main_Menu_Controller.java new file mode 100644 index 0000000..a753ba4 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/controller/Rn_Main_Menu_Controller.java @@ -0,0 +1,121 @@ +package com.realnet.fnd.controller; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.validation.Valid; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.fnd.entity.Rn_Main_Menu; +import com.realnet.fnd.response.Rn_Main_Menu_Response; +import com.realnet.fnd.service.Rn_Main_Menu_Service; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; + +@RestController +@RequestMapping(value = "/api", produces = MediaType.APPLICATION_JSON_VALUE) +@Api(tags = { "RealNet Menu" }) +public class Rn_Main_Menu_Controller { + + @Autowired + private Rn_Main_Menu_Service rn_main_menu_service; + +// @Autowired +// private TokenUtil tokenUtil; + + // GET ALL + @ApiOperation(value = "List of Menu", response = Rn_Main_Menu_Response.class) + @GetMapping("/realnet-menu") + public Rn_Main_Menu_Response getMenus( + @RequestParam(value = "page", defaultValue = "0", required = false) Integer page, + @RequestParam(value = "size", defaultValue = "20", required = false) Integer size) { + + // SORTED DATA : PageRequest.of(page, size,Sort.by("createdAt").descending()); + // UN-SORTED DATA : PageRequest.of(page, size); + + Pageable paging = PageRequest.of(page, size); + Page result = rn_main_menu_service.getAll(paging); + Rn_Main_Menu_Response resp = new Rn_Main_Menu_Response(); + resp.setPageStats(result, true); + resp.setItems(result.getContent()); + return resp; + } + + // GET BY ID + @ApiOperation(value = "Get a Menu", response = Rn_Main_Menu.class) + @GetMapping("/realnet-menu/{id}") + public ResponseEntity getMenuById(@PathVariable(value = "id") Integer id) { + Rn_Main_Menu rn_menu_register = rn_main_menu_service.getById(id); + return ResponseEntity.ok().body(rn_menu_register); + } + + // getByAccountId + // *** NEED MODIFICATION *** + // GET BY ACCOUNT_ID + @ApiOperation(value = "Get Menu By Accout Id", response = Rn_Main_Menu.class) + @GetMapping("/realnet-menu/user-menu") + public ResponseEntity> getMenuByAccountId( + @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken) { +// String accountId = tokenUtil.getUserId(authToken); +// System.out.println("get Menu List by Account Id --> " + accountId); + //List rn_menu_register = rn_main_menu_service.getByAccountId(accountId); + List rn_menu_register = rn_main_menu_service.getAll(); + return ResponseEntity.ok().body(rn_menu_register); + } + + // SAVE + @ApiOperation(value = "Add A New Menu", response = Rn_Main_Menu.class) + @PostMapping("/realnet-menu") + public ResponseEntity createMenu( + @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken, + @Valid @RequestBody Rn_Main_Menu rn_main_menu) { +// String userId = tokenUtil.getUserId(authToken); +// rn_main_menu.setCreatedBy(userId); +// rn_main_menu.setAccountId(userId); + Rn_Main_Menu savedMenu = rn_main_menu_service.save(rn_main_menu); + return ResponseEntity.status(HttpStatus.CREATED).body(savedMenu); + } + + // UPDATE + @ApiOperation(value = "Update A Menu", response = Rn_Main_Menu.class) + @PutMapping("/realnet-menu/{id}") + public ResponseEntity updateMenu( + @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken, + @PathVariable(value = "id") Integer id, @Valid @RequestBody Rn_Main_Menu rn_main_menu) { +// String userId = tokenUtil.getUserId(authToken); +// rn_main_menu.setUpdatedBy(userId); + Rn_Main_Menu updatedMenu = rn_main_menu_service.updateById(id, rn_main_menu); + return ResponseEntity.status(HttpStatus.ACCEPTED).body(updatedMenu); + } + + // DELETE + @DeleteMapping("/realnet-menu/{id}") + public ResponseEntity> deleteMenu(@PathVariable(value = "id") Integer id) { + boolean deleted = rn_main_menu_service.deleteById(id); + Map response = new HashMap<>(); + response.put("deleted", Boolean.TRUE); + // response.put("deleted", deleted); + return ResponseEntity.status(HttpStatus.OK).body(response); + } + +} diff --git a/backend/src/main/java/com/realnet/fnd/controller/Rn_Menu_Group_Controller.java b/backend/src/main/java/com/realnet/fnd/controller/Rn_Menu_Group_Controller.java new file mode 100644 index 0000000..0c43dda --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/controller/Rn_Menu_Group_Controller.java @@ -0,0 +1,203 @@ +package com.realnet.fnd.controller; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.validation.Valid; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; +import org.springframework.data.domain.Sort; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.CrossOrigin; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.config.TokenProvider; +import com.realnet.fnd.entity.Rn_Function_Register; +import com.realnet.fnd.entity.Rn_Main_Menu; +import com.realnet.fnd.entity.Rn_Menu_Group_Header; +import com.realnet.fnd.entity.Rn_Menu_Group_Line; +import com.realnet.fnd.entity.Rn_Menu_Register; +import com.realnet.fnd.entity.Rn_Sub_Menu; +import com.realnet.fnd.response.Rn_Forms_SetupResponse; +import com.realnet.fnd.response.Rn_Menu_Group_Response; +import com.realnet.fnd.service.Rn_Function_Register_Service; +import com.realnet.fnd.service.Rn_Menu_Group_Service; +import com.realnet.fnd.service.Rn_Menu_Register_Service; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserService; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; + +@RestController +@RequestMapping(value = "/api", produces = MediaType.APPLICATION_JSON_VALUE) +@Api(tags = { "Rn_Menu_Group" }) +@CrossOrigin("*") +public class Rn_Menu_Group_Controller { + + @Autowired + private Rn_Menu_Group_Service rn_menu_group_service; + + @Autowired + private Rn_Menu_Register_Service rn_menu_register_service; + + @Autowired + private Rn_Function_Register_Service rn_function_register_service; + + @Autowired + private TokenProvider tokenProvider; + + @Autowired(required=false) + private AppUserService userService; + + // GET ALL + @ApiOperation(value = "List of Menu Group", response = Rn_Forms_SetupResponse.class) + @GetMapping("/menu-group") + public Rn_Menu_Group_Response getMenuGroups( + @RequestParam(value = "page", defaultValue = "0", required = false) Integer page, + @RequestParam(value = "size", defaultValue = "20", required = false) Integer size) { + // sorted data + Pageable paging = PageRequest.of(page, size, Sort.by("createdAt").descending()); + Page result = rn_menu_group_service.getAll(paging); + + Rn_Menu_Group_Response resp = new Rn_Menu_Group_Response(); + resp.setPageStats(result, true); + resp.setItems(result.getContent()); + return resp; + } + + // GET BY ID + @ApiOperation(value = "Get a Menu Group", response = Rn_Menu_Group_Header.class) + @GetMapping("/menu-group/{id}") + public ResponseEntity getMenuGroupById(@PathVariable(value = "id") Long id) { + Rn_Menu_Group_Header rn_menu_group = rn_menu_group_service.getById(id); + return ResponseEntity.ok().body(rn_menu_group); + } + + // SAVE + @ApiOperation(value = "Save A New Menu Group", response = Rn_Menu_Group_Header.class) + @PostMapping("/menu-group") + public ResponseEntity createMenuGroup( + @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken, + @Valid @RequestBody Rn_Menu_Group_Header rn_menu_group_header) { +// String userId = tokenUtil.getUserId(authToken); +// rn_menu_group_header.setCreatedBy(userId); +// rn_menu_group_header.setAccountId(userId); + Rn_Menu_Group_Header savedMenu_group = rn_menu_group_service.save(rn_menu_group_header); + return ResponseEntity.status(HttpStatus.CREATED).body(savedMenu_group); + } + + // UPDATE + @ApiOperation(value = "Update A Menu Group", response = Rn_Menu_Group_Header.class) + @PutMapping("/menu-group/{id}") + public ResponseEntity updateMenuGroup( + @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken, + @PathVariable(value = "id") Long id, @Valid @RequestBody Rn_Menu_Group_Header rn_menu_group_header) { +// String userId = tokenUtil.getUserId(authToken); +// rn_menu_group_header.setUpdatedBy(userId); + Rn_Menu_Group_Header updatedMenu_Group = rn_menu_group_service.updateById(id, rn_menu_group_header); + return ResponseEntity.status(HttpStatus.ACCEPTED).body(updatedMenu_Group); + } + + // DELETE + @DeleteMapping("/menu-group/{id}") + public ResponseEntity> deleteMenuGroup(@PathVariable(value = "id") Long id) { + boolean deleted = rn_menu_group_service.deleteById(id); + Map response = new HashMap<>(); + response.put("deleted", Boolean.TRUE); + // response.put("deleted", deleted); + return ResponseEntity.status(HttpStatus.OK).body(response); + } + + // ---- working code ---- + @ApiOperation(value = "Menus For Individual Group", response = Rn_Forms_SetupResponse.class) + @GetMapping("/load-menus") + public ResponseEntity getMenus( + @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken) { + //String userId = tokenProvider.getEmailFromToken(authToken); + AppUser user = userService.getLoggedInUser(); + System.out.println("getMenus controller " + user); + Long menu_group_id = user.getUsrGrp().getUsrGrp(); + System.out.println("getMenus() MENU GROUP ID = " + menu_group_id); + + // from user table, get menu_group_id + //int menu_group_id = 1; + + // rn_menu_group_service.loadmenuGroupByUser(menu_group_id); + // or + + // Rn_Main_Menu rn_main_menu = new Rn_Main_Menu(); + // Rn_Sub_Menu rn_sub_menu = new Rn_Sub_Menu(); + + List mainMenuList = new ArrayList(); + // List subMenuList = new ArrayList(); + + Rn_Menu_Group_Header menu_group_header = rn_menu_group_service.getById(menu_group_id); + List menu_group_lines = menu_group_header.getMenu_group_lines(); + + // menu_group loop start + for (Rn_Menu_Group_Line menu_group_line : menu_group_lines) { + // menu id will be diff + int menu_id = menu_group_line.getMenu_id(); + + // HEADER + Rn_Menu_Register rn_menu_register = rn_menu_register_service.getById(menu_id); + String main_menu_name = rn_menu_register.getMain_menu_name(); + String main_menu_action_name = rn_menu_register.getMain_menu_action_name(); + String main_menu_icon = rn_menu_register.getMain_menu_icon(); + // boolean main_menu_flag = rn_menu_register.getEnable_flag(); + + Rn_Main_Menu rn_main_menu = new Rn_Main_Menu(); + rn_main_menu.setMenu_name(main_menu_name); + rn_main_menu.setMenu_action_link(main_menu_action_name); + rn_main_menu.setMenu_icon(main_menu_icon); + + // LINE + // List subMenuList = new ArrayList(); + System.out.println("Before Fun Register"); + List functions = rn_function_register_service.getByMenuId(menu_id); + System.out.println("After Fun Register"); + if (!functions.isEmpty()) { + List subMenuList = new ArrayList(); + for (Rn_Function_Register function : functions) { + String function_name = function.getFunction_name(); + String function_action_name = function.getFunction_action_name(); + String function_icon = function.getFunction_icon(); + // LocalDate function_end_date = function.getEnd_date(); + // String function_flag = function.getEnable_flag(); + + Rn_Sub_Menu rn_sub_menu = new Rn_Sub_Menu(); + rn_sub_menu.setSub_menu_name(function_name); + rn_sub_menu.setSub_menu_action_link(function_action_name); + rn_sub_menu.setSub_menu_icon(function_icon); + + subMenuList.add(rn_sub_menu); + } // func loop end + rn_main_menu.setSub_menus(subMenuList); + } + // rn_main_menu.setSub_menus(sub_menus); + mainMenuList.add(rn_main_menu); + } // menu_group loop end + + + return ResponseEntity.ok().body(mainMenuList); + } + +} diff --git a/backend/src/main/java/com/realnet/fnd/controller/Rn_Menu_Group_Line_Controller.java b/backend/src/main/java/com/realnet/fnd/controller/Rn_Menu_Group_Line_Controller.java new file mode 100644 index 0000000..059de2f --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/controller/Rn_Menu_Group_Line_Controller.java @@ -0,0 +1,57 @@ +package com.realnet.fnd.controller; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.CrossOrigin; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.fnd.entity.Rn_Menu_Group_Header; +import com.realnet.fnd.entity.Rn_Menu_Group_Line; +import com.realnet.fnd.service.RnGroupMenuLineServiec; + +import io.swagger.annotations.Api; + +@RestController +@RequestMapping(value = "/lines_m", produces = MediaType.APPLICATION_JSON_VALUE) +@Api(tags = { "Rn_Menu_Group" }) +@CrossOrigin("*") +public class Rn_Menu_Group_Line_Controller { + + @Autowired + private RnGroupMenuLineServiec rnGroupMenuLineServiec; + + @PostMapping("/create") + public ResponseEntity add(@RequestBody Rn_Menu_Group_Line rn_Menu_Group_Line){ + Rn_Menu_Group_Line addToDb = this.rnGroupMenuLineServiec.addToDb(rn_Menu_Group_Line); + return ResponseEntity.ok(addToDb); + } + + @GetMapping("/get-one/{id}") + public ResponseEntity getone(@PathVariable("id") int id){ + Rn_Menu_Group_Line getoneById = this.rnGroupMenuLineServiec.getoneById(id); + return ResponseEntity.ok(getoneById); + } + + @GetMapping("/get-all") + public List getAll(){ + List all = this.rnGroupMenuLineServiec.getAll(); + return all; + } + + @PutMapping("/update") + public ResponseEntity update(@RequestBody Rn_Menu_Group_Line rn_Menu_Group_Line){ + Rn_Menu_Group_Line addToDb = this.rnGroupMenuLineServiec.updateToDb(rn_Menu_Group_Line); + return ResponseEntity.ok(addToDb); + } + + +} diff --git a/backend/src/main/java/com/realnet/fnd/controller/Rn_Menu_Register_Controller.java b/backend/src/main/java/com/realnet/fnd/controller/Rn_Menu_Register_Controller.java new file mode 100644 index 0000000..119dc5e --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/controller/Rn_Menu_Register_Controller.java @@ -0,0 +1,125 @@ +package com.realnet.fnd.controller; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.validation.Valid; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.CrossOrigin; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.fnd.entity.Rn_Menu_Register; +import com.realnet.fnd.response.Rn_Menu_Register_Response; +import com.realnet.fnd.service.Rn_Menu_Register_Service; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; + +@RestController +@RequestMapping(value = "/api", produces = MediaType.APPLICATION_JSON_VALUE) +@Api(tags = { "Menu Register" }) +@CrossOrigin("*") +public class Rn_Menu_Register_Controller { + + @Autowired + private Rn_Menu_Register_Service rn_menu_register_service; + +// @Autowired +// private TokenUtil tokenUtil; + + // GET ALL + @ApiOperation(value = "List of Menu", response = Rn_Menu_Register_Response.class) + @GetMapping("/menu-register") + public Rn_Menu_Register_Response getRegisteredMenu( + @RequestParam(value = "page", defaultValue = "0", required = false) Integer page, + @RequestParam(value = "size", defaultValue = "20", required = false) Integer size) { + + // SORTED DATA + // Pageable paging = PageRequest.of(page, size, + // Sort.by("createdAt").descending()); + + Pageable paging = PageRequest.of(page, size); + Page result = rn_menu_register_service.getAll(paging); + Rn_Menu_Register_Response resp = new Rn_Menu_Register_Response(); + resp.setPageStats(result, true); + resp.setItems(result.getContent()); + return resp; + } + + // GET BY ID + @ApiOperation(value = "Get a Menu", response = Rn_Menu_Register.class) + @GetMapping("/menu-register/{id}") + public ResponseEntity getRegisteredMenuById(@PathVariable(value = "id") Integer id) { + Rn_Menu_Register rn_menu_register = rn_menu_register_service.getById(id); + return ResponseEntity.ok().body(rn_menu_register); + } + + // getByAccountId + // *** NEED MODIFICATION *** + // GET BY ACCOUNT_ID + @ApiOperation(value = "Get Menu By Accout Id", response = Rn_Menu_Register.class) + @GetMapping("/menu-register/user-menu") + public ResponseEntity> getRegisteredMenuByAccountId( + @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken) { +// String accountId = tokenUtil.getUserId(authToken); +// System.out.println("get Menu List by Account Id --> " + accountId); + // ** NEED TO MODIFY ** +// List rn_menu_register = rn_menu_register_service.getByAccountId(accountId); + List rn_menu_register = rn_menu_register_service.getAll(); + return ResponseEntity.ok().body(rn_menu_register); + } + + // SAVE + @ApiOperation(value = "Add A New Menu", response = Rn_Menu_Register.class) + @PostMapping("/menu-register") + public ResponseEntity SaveMenuRegister( + @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken, + @Valid @RequestBody Rn_Menu_Register rn_menu_register) { +// String userId = tokenUtil.getUserId(authToken); +// rn_menu_register.setCreatedBy(userId); +// rn_menu_register.setAccountId(userId); + Rn_Menu_Register savedRn_Forms_Setup = rn_menu_register_service.save(rn_menu_register); + return ResponseEntity.status(HttpStatus.CREATED).body(savedRn_Forms_Setup); + } + + // UPDATE + @ApiOperation(value = "Update A Menu", response = Rn_Menu_Register.class) + @PutMapping("/menu-register/{id}") + public ResponseEntity updateMenu( + @RequestHeader(value = HttpHeaders.AUTHORIZATION, required = false) String authToken, + @PathVariable(value = "id") Integer id, @Valid @RequestBody Rn_Menu_Register rn_menu_register) { + // String userId = tokenUtil.getUserId(authToken); + // rn_menu_register.setUpdatedBy(userId); + Rn_Menu_Register updatedMenu = rn_menu_register_service.updateById(id, rn_menu_register); + return ResponseEntity.status(HttpStatus.ACCEPTED).body(updatedMenu); + } + + // DELETE + @DeleteMapping("/menu-register/{id}") + public ResponseEntity> deleteRn_Forms_Setup(@PathVariable(value = "id") Integer id) { + boolean deleted = rn_menu_register_service.deleteById(id); + Map response = new HashMap<>(); + response.put("deleted", Boolean.TRUE); + // response.put("deleted", deleted); + return ResponseEntity.status(HttpStatus.OK).body(response); + } + +} diff --git a/backend/src/main/java/com/realnet/fnd/controller1/LoadMenuController.java b/backend/src/main/java/com/realnet/fnd/controller1/LoadMenuController.java new file mode 100644 index 0000000..1d0a6c6 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/controller1/LoadMenuController.java @@ -0,0 +1,355 @@ +package com.realnet.fnd.controller1; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Optional; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.realnet.fnd.entity1.GrpMenuAccess; +import com.realnet.fnd.entity1.MenuDet; +import com.realnet.fnd.repository1.GrpMenuAccessRepository; +import com.realnet.fnd.repository1.MenuDetRepository; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.entity1.AppUserRole; +import com.realnet.users.repository1.AppUserRepository; +import com.realnet.users.repository1.AppUserRoleRepository; +import com.realnet.users.service1.AppUserServiceImpl; + +@RequestMapping(value = "/fndMenu", produces = MediaType.APPLICATION_JSON_VALUE) +@RestController +public class LoadMenuController { + + @Autowired + private AppUserRoleRepository appUserRoleRepository; + @Autowired + private MenuDetRepository menuDetRepository; + @Autowired + private GrpMenuAccessRepository grpMenuAccessRepository; + @Autowired + private AppUserServiceImpl userService; + + @Autowired + private AppUserRepository appUserRepository; + + private static final Logger LOGGER = LoggerFactory.getLogger(LoadMenuController.class); + +// GROUP MENU ACCESS MENU LOAD BY USER + @GetMapping("/menuloadbyuser") + public ResponseEntity setmenuforuser() { + AppUser loggedInUser = userService.getLoggedInUser(); + Long usrGrp = loggedInUser.getUsrGrp().getUsrGrp(); + + List root = grpMenuAccessRepository.findAllRootsByMenuId(usrGrp); // menu id =0 + for (int i = 0; i < root.size(); i++) { + + // find menu item id by menu id =0 + List menu = grpMenuAccessRepository.findById(root.get(i).getUsrGrp().getUsrGrp(), + root.get(i).getMenuItemId().getMenuItemId()); // menuItem id will be unique + for (GrpMenuAccess g : menu) { + + // all submenu by menuid = menu itemid with status + List allSubmenu = grpMenuAccessRepository + .findAllSubmenuByMenuIdWithStatus(g.getMenuItemId().getMenuItemId(), g.getUsrGrp().getUsrGrp()); // find + + g.setSubMenus(allSubmenu); + } + + } + return new ResponseEntity<>(root, HttpStatus.OK); + } + +//// GET LIST OF TABLE +// @GetMapping("/loadcolumn/{TABLE_NAME}") +// public List getcolumnname(@PathVariable Object TABLE_NAME) { +// List colun = menuDetRepository.findcolumnbytablename(TABLE_NAME); +// +// return colun; +// +// } + +// GET LIST OF USRGRP + @GetMapping("/listofusrgrp") + public ResponseEntity listofusrgrp() { + AppUser loggedInUser = userService.getLoggedInUser(); + Long usrGrp = loggedInUser.getUsrGrp().getUsrGrp(); + + List root = grpMenuAccessRepository.findAllRootsByMenuId(usrGrp); + return new ResponseEntity<>(root, HttpStatus.OK); + + } + +// GET LIST OF USRGRP + @GetMapping("/getuser/{user_id}") + public ResponseEntity getuser(@PathVariable Long user_id) { + + AppUser root = appUserRepository.findById(user_id); + return new ResponseEntity<>(root, HttpStatus.OK); + + } + +// SINK GRPMENU ACCESS TO SEC MENU DET SUBMENU BY PASSING GMENUID + @PutMapping("/sink/{gmenuid}") + public ResponseEntity adds( + @PathVariable Long gmenuid, + @RequestBody GrpMenuAccess gr) { + + List list = new ArrayList<>(); + MenuDet formenu = menuDetRepository.findById(gmenuid); + + List all = grpMenuAccessRepository.findByGrpAndMenuid1(formenu.getMenuItemId()); + + for (GrpMenuAccess a : all) { + + a.setMenuItemId(formenu); + a.setItemSeq(formenu.getItemSeq()); + a.setMenuItemDesc(formenu.getMenuItemDesc()); + a.setModuleName(formenu.getModuleName()); + a.setStatus(formenu.getStatus()); + a.setMain_menu_action_name(formenu.getMain_menu_action_name()); + a.setMain_menu_icon_name(formenu.getMain_menu_icon_name()); + a.setMenuId(formenu.getMenuId()); + GrpMenuAccess save = grpMenuAccessRepository.save(a); + list.add(save); + } + + List submenu = menuDetRepository.findAllSubmenuByMenuId(gmenuid); + for (int i = 0; i < submenu.size(); i++) { + MenuDet m = menuDetRepository.findById(submenu.get(i).getMenuItemId()); + List li = grpMenuAccessRepository.findlist(m.getMenuItemId()); + + if (li.isEmpty()) { + List grp = grpMenuAccessRepository.findAllById(gmenuid); + + for (GrpMenuAccess a : grp) { + AppUserRole app = appUserRoleRepository.findById(a.getUsrGrp().getUsrGrp()); + gr.setUsrGrp(app); + gr.setMenuItemId(m); + + gr.setItemSeq(m.getItemSeq()); + gr.setMenuItemDesc(m.getMenuItemDesc()); + gr.setModuleName(m.getModuleName()); + gr.setStatus(m.getStatus()); + gr.setMain_menu_action_name(m.getMain_menu_action_name()); + gr.setMain_menu_icon_name(m.getMain_menu_icon_name()); + gr.setMenuId(m.getMenuId()); + + gr.setMCreate("true"); + gr.setMDelete("true"); + gr.setMEdit("true"); + gr.setMQuery("true"); + gr.setMVisible("true"); + gr.setIsdisable("true"); + gr.setMexport("true"); + + gr.setCreatedAt(new Date()); + gr.setUpdatedAt(new Date()); + + GrpMenuAccess save2 = grpMenuAccessRepository.save(gr); + list.add(save2); + } + + } + + else { + for (GrpMenuAccess g : li) { + + g.setMenuItemId(m); + + g.setItemSeq(m.getItemSeq()); + g.setMenuItemDesc(m.getMenuItemDesc()); + g.setModuleName(m.getModuleName()); + g.setStatus(m.getStatus()); + g.setMain_menu_action_name(m.getMain_menu_action_name()); + g.setMain_menu_icon_name(m.getMain_menu_icon_name()); + g.setMenuId(m.getMenuId()); + + GrpMenuAccess save1 = grpMenuAccessRepository.save(g); + list.add(save1); + } + } + } + + return new ResponseEntity<>(list, HttpStatus.CREATED); + + } + +// COMPLETED +// SINK GRPMENU ACCESS FROM MENU DET BY PASSING MENU ITEM ID OF MENU BY LOGIN USER + @PutMapping("/sink1/{gmenuid}") + public ResponseEntity sink(@PathVariable Long gmenuid, @RequestBody GrpMenuAccess gr) { + + AppUser loggedInUser = userService.getLoggedInUser(); + Long usrGrp = loggedInUser.getUsrGrp().getUsrGrp(); + + List list = new ArrayList<>(); + MenuDet formenu = menuDetRepository.findById(gmenuid); + + GrpMenuAccess a = grpMenuAccessRepository.findAllRootsByMenuIdAndGrp(gmenuid, usrGrp); + if (a != null) { + + a.setMenuItemId(formenu); + a.setItemSeq(formenu.getItemSeq()); + a.setMenuItemDesc(formenu.getMenuItemDesc()); + a.setModuleName(formenu.getModuleName()); + a.setStatus(formenu.getStatus()); + a.setMain_menu_action_name(formenu.getMain_menu_action_name()); + a.setMain_menu_icon_name(formenu.getMain_menu_icon_name()); + a.setMenuId(formenu.getMenuId()); + GrpMenuAccess save = grpMenuAccessRepository.save(a); + list.add(save); + + List submenu = menuDetRepository.findAllSubmenuByMenuId(gmenuid); + for (int i = 0; i < submenu.size(); i++) { + MenuDet m = menuDetRepository.findById(submenu.get(i).getMenuItemId()); +// List listofsubmenu = grpMenuAccessRepository.findAllSubmenuByMenuitemidAndUsrGrp(gmenuid,usrGrp); +// for (int j = 0; j < listofsubmenu.size(); j++) { + GrpMenuAccess g = grpMenuAccessRepository.findById2(m.getMenuItemId(), usrGrp); + if (g != null) { + + g.setMenuItemId(m); + + g.setItemSeq(m.getItemSeq()); + g.setMenuItemDesc(m.getMenuItemDesc()); + g.setModuleName(m.getModuleName()); + g.setStatus(m.getStatus()); + g.setMain_menu_action_name(m.getMain_menu_action_name()); + g.setMain_menu_icon_name(m.getMain_menu_icon_name()); + g.setMenuId(m.getMenuId()); + + GrpMenuAccess save1 = grpMenuAccessRepository.save(g); + list.add(save1); + } else { + + AppUserRole app = appUserRoleRepository.findById(usrGrp); + gr.setUsrGrp(app); + gr.setMenuItemId(m); + + gr.setItemSeq(m.getItemSeq()); + gr.setMenuItemDesc(m.getMenuItemDesc()); + gr.setModuleName(m.getModuleName()); + gr.setStatus(m.getStatus()); + gr.setMain_menu_action_name(m.getMain_menu_action_name()); + gr.setMain_menu_icon_name(m.getMain_menu_icon_name()); + gr.setMenuId(m.getMenuId()); + + gr.setMCreate("true"); + gr.setMDelete("true"); + gr.setMEdit("true"); + gr.setMQuery("true"); + gr.setMVisible("true"); + gr.setIsdisable("true"); + gr.setMexport("true"); + + gr.setCreatedAt(new Date()); + gr.setUpdatedAt(new Date()); + + GrpMenuAccess save2 = grpMenuAccessRepository.save(gr); + list.add(save2); + + } + + } + +// } + } else { + return new ResponseEntity<>(HttpStatus.BAD_REQUEST); + + } + + return new ResponseEntity<>(list, HttpStatus.CREATED); + } + +// DELETE MENU AND SUBMENU INCLUDING GRPMENU ACCESS by menuItemId + @DeleteMapping("/DelMenuWithSub/{menu_item_id}") + public void delete(@PathVariable Long menu_item_id) { + + // delete submenu + List submenu = menuDetRepository.findAllSubmenuByMenuId(menu_item_id); + for (int i = 0; i < submenu.size(); i++) { + MenuDet m = menuDetRepository.findById(submenu.get(i).getMenuItemId()); + List li = grpMenuAccessRepository.findlist(m.getMenuItemId()); + + for(GrpMenuAccess g:li) { + grpMenuAccessRepository.delete(g); + } + menuDetRepository.delete(m); + } + + //delete menu + MenuDet formenu = menuDetRepository.findById(menu_item_id); + + List all = grpMenuAccessRepository.findByGrpAndMenuid1(formenu.getMenuItemId()); + + for (GrpMenuAccess a : all) { + grpMenuAccessRepository.delete(a); + } + + menuDetRepository.delete(formenu); + + } + +////LOAD MENU DET' MENU AND SUBMENU BY USER ID +//@GetMapping("/loadmenu/{use_by}") +//public List getmenubyuserid(@PathVariable Long use_by) { +// List root = menuDetRepository.findAllrootsbyuseby(use_by); +// +// for(MenuDet m:root) { +// +// List allSubmenu = menuDetRepository.findAllSubmenuByMenuId(m.getMenuItemId()); +// MenuDet menu = menuDetRepository.findById(m.getMenuItemId()).orElse(null); +// menu.setSubMenus(allSubmenu); +// } +// +// return root; +//} + +////GROUP MENU ACCESS MENU LOAD BY USER +//@GetMapping("/menuloadbyuser") +//public ResponseEntity setmenuforuser(){ +// AppUser loggedInUser = userService.getLoggedInUser(); +// Long usrGrp = loggedInUser.getUsrGrp().getUsrGrp(); +// +// List root = grpMenuAccessRepository.findAllRootsbyusrGrp(usrGrp); +// for(int i =0; i allSubmenu = grpMenuAccessRepository.findAllSubmenu(root.get(i).getParent()); +// menu.setSubMenus(allSubmenu); +// } +// return new ResponseEntity<>(root, HttpStatus.OK); +//} + //DELETE MENU AND SUBMENU IN GRP MENU ACCESS BY MENU ITEM ID + @DeleteMapping("/DelMenu_WithSub1/{menu_item_id}/{usrGrp}") + public void deletemenuandsubmenu(@PathVariable Long menu_item_id,@PathVariable Long usrGrp) { +// AppUser loggedInUser = userService.getLoggedInUser(); +// Long usrGrp = loggedInUser.getUsrGrp().getUsrGrp(); + + // delete submenu + List li = grpMenuAccessRepository.findAllSubmenuByMenuId(menu_item_id,usrGrp); + for(GrpMenuAccess g:li) { + grpMenuAccessRepository.delete(g); + } + + //delete menu + GrpMenuAccess all = grpMenuAccessRepository.findSingle(usrGrp,menu_item_id); + grpMenuAccessRepository.delete(all); + + } +} diff --git a/backend/src/main/java/com/realnet/fnd/controller1/MenuController.java b/backend/src/main/java/com/realnet/fnd/controller1/MenuController.java new file mode 100644 index 0000000..b536e08 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/controller1/MenuController.java @@ -0,0 +1,403 @@ +package com.realnet.fnd.controller1; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Objects; +import java.util.Optional; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.CrossOrigin; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.exceptions.ResourceNotFoundException; +import com.realnet.fnd.entity1.GrpMenuAccess; +import com.realnet.fnd.entity1.MenuDet; +import com.realnet.fnd.entity1.MixMenuNew; +import com.realnet.fnd.repository1.GrpMenuAccessRepository; +import com.realnet.fnd.repository1.MenuDetRepository; +import com.realnet.fnd.service1.GrpMenuAccessServiceImpl; +import com.realnet.fnd.service1.MenuDetServiceImpl; +import com.realnet.users.entity1.AppUserRole; +import com.realnet.users.repository1.AppUserRepository; +import com.realnet.users.repository1.AppUserRoleRepository; +import com.realnet.users.service1.AppUserServiceImpl; + +import io.swagger.annotations.Api; + +@RestController +@RequestMapping(value = "/api1", produces = MediaType.APPLICATION_JSON_VALUE) +@Api(tags = { "Rn_Menu_Group" }) +@CrossOrigin("*") + +public class MenuController { + @Autowired + private AppUserServiceImpl userService; + + @Autowired + private AppUserRoleRepository appUserRoleRepository; + + @Autowired + private AppUserRepository appUserRepository; + + private MenuDetServiceImpl menuDetServiceImpl; + private GrpMenuAccessServiceImpl grpMenuAccessServiceImpl; + private AppUserServiceImpl appUserServiceImpl; + private MenuDetRepository menuDetRepository; + private GrpMenuAccessRepository grpMenuAccessRepository; + + @Autowired + public MenuController(MenuDetServiceImpl menuDetServiceImpl, GrpMenuAccessServiceImpl grpMenuAccessServiceImpl, + AppUserServiceImpl appUserServiceImpl, MenuDetRepository menuDetRepository, + GrpMenuAccessRepository grpMenuAccessRepository) { + super(); + this.menuDetServiceImpl = menuDetServiceImpl; + this.grpMenuAccessServiceImpl = grpMenuAccessServiceImpl; + this.appUserServiceImpl = appUserServiceImpl; + this.menuDetRepository = menuDetRepository; + this.grpMenuAccessRepository = grpMenuAccessRepository; + } + + @GetMapping("/allmenus") + public ResponseEntity getallmenu() { + List menu = menuDetRepository.getallmenu(); + return new ResponseEntity<>(menu, HttpStatus.OK); + } + +//// // ADD DATA FOR SEC MENU DETAIL + @PostMapping("/Sec_menuDet") + public ResponseEntity adddata(@RequestBody MenuDet menuDet) { + MenuDet save = menuDetRepository.save(menuDet); + return new ResponseEntity<>(save, HttpStatus.CREATED); + } + +// GET BY MENU ITEM ID + @GetMapping("/Sec_menuDet/{menu_item_id}") + public ResponseEntity getdata(@PathVariable Long menu_item_id) { + MenuDet save = menuDetRepository.findById(menu_item_id) + ; + return new ResponseEntity<>(save, HttpStatus.CREATED); + } + +// GET MENU AND SUBMENU of MENU DET + @GetMapping("/submenu1") + public List submenu() { + List root = menuDetRepository.findAllRootsByMenuId(); + + for (MenuDet m : root) { + + List allSubmenu = menuDetRepository.findAllSubmenuByMenuId(m.getMenuItemId()); + MenuDet menu = menuDetRepository.findById(m.getMenuItemId()); + menu.setSubMenus(allSubmenu); + } + + return root; + } + +// Get Only SubMenu OF MENU DET + @GetMapping("/submenu1/{menu_item_id}") + public ResponseEntity getonlysubmenu(@PathVariable Long menu_item_id) { + List submenu = menuDetRepository.findAllSubmenuByMenuId(menu_item_id); + + return new ResponseEntity<>(submenu, HttpStatus.OK); + + } + +// GET MENU AND SUBMENU of GROUP MENU ACCESS + @GetMapping("/grpmenuandsubmenu") + public List GRPMENUACCESS() { + List root = grpMenuAccessRepository.findAllRoots(); + + for (int i = 0; i < root.size(); i++) { + + // find menu item id by menu id =0 + List menu = grpMenuAccessRepository.findById(root.get(i).getUsrGrp().getUsrGrp(), + root.get(i).getMenuItemId().getMenuItemId()); // menuItem id will be unique + for (GrpMenuAccess g : menu) { + + List allSubmenu = grpMenuAccessRepository + .findAllSubmenuByMenuId(g.getMenuItemId().getMenuItemId(), g.getUsrGrp().getUsrGrp()); // find + // all + // submenu + // by + // menuid + // = + // menu + // itemid + g.setSubMenus(allSubmenu); + } + + } + + return root; + } + +// Get Only SubMenu of GROUP MENU ACCESS + @GetMapping("/grpmenuandsubmenu/{menu_item_id}") + public ResponseEntity grpmenuaccess(@PathVariable Long menu_item_id) { + List submenu = grpMenuAccessRepository.findAllSubmenu(menu_item_id); + + return new ResponseEntity<>(submenu, HttpStatus.OK); + + } + +// update by menu_item_id + @PutMapping("/submenu1/{menu_item_id}") + public ResponseEntity updatedata(@RequestBody MenuDet d, @PathVariable Long menu_item_id) { + MenuDet menu = menuDetRepository.findById(menu_item_id); + + menu.setItemSeq(d.getItemSeq()); + menu.setMain_menu_action_name(d.getMain_menu_action_name()); + menu.setMain_menu_icon_name(d.getMain_menu_icon_name()); + menu.setMenuId(d.getMenuId()); + menu.setMenuItemDesc(d.getMenuItemDesc()); + menu.setModuleName(d.getModuleName()); + menu.setStatus(d.getStatus()); + + MenuDet save = menuDetRepository.save(menu); + return new ResponseEntity<>(save, HttpStatus.CREATED); + } + +// delete DATA SEC MENU DET WITH GRPMENUACCESS by menuItemId + @DeleteMapping("/menu/{menu_item_id}") + public void delete(@PathVariable Long menu_item_id) { + + + List findlist = grpMenuAccessRepository.findlist(menu_item_id); + for(GrpMenuAccess g:findlist) { + grpMenuAccessRepository.delete(g); + } + + MenuDet menu = menuDetRepository.findById(menu_item_id); + menuDetRepository.delete(menu); + } + +// GET GROUP MENU ACCESS BY USR_GROUP with WITH SUBMENU + + @GetMapping("/grpmenuaccess/{usr_grp}") + public ResponseEntity GETGROUPMENU(@PathVariable Long usr_grp) { + + List list = new ArrayList<>(); + GrpMenuAccess grp = grpMenuAccessRepository.findByUsrGrp(usr_grp); + +// List sub = menuDetRepository.findAllSubmenuByMenuId(grp.getMenuItemId().getMenuItemId()); + List sub = menuDetRepository.findAllSubmenuforusrgrp(grp.getMenuItemId().getMenuItemId()); + + list.add(grp); + list.add(sub); + return new ResponseEntity<>(list, HttpStatus.OK); + + } + +// get all + @GetMapping("/getAllData") + public ResponseEntity> getAllGroupMenuAccess() { + List listgrp = grpMenuAccessRepository.findAll(); + return new ResponseEntity<>(listgrp, HttpStatus.OK); + } + +// get by USRGRP WITHOUT SUBMENU + +// @GetMapping("/getById/{userId}") +// public ResponseEntity getGrpMenuByUserId(@PathVariable Long userId){ +// GrpMenuAccess grpMenuAccess=grpMenuAccessRepository.findByUsrGrp(userId); +// if(grpMenuAccess==null)throw new ResourceNotFoundException("no resource found"); +// return new ResponseEntity<>(grpMenuAccess,HttpStatus.OK); +// } + +// update by usr grp id + @PutMapping("/updatemenuaccess/{userId}") + public ResponseEntity updateMenuAccess(@PathVariable Long userId, @RequestBody GrpMenuAccess grpMenuAccess) { + GrpMenuAccess g1 = grpMenuAccessRepository.findByUsrGrp(userId); + if (g1 == null) { + throw new ResourceNotFoundException("no resource found"); + } + g1.setMCreate(grpMenuAccess.getMCreate()); + g1.setMDelete(grpMenuAccess.getMDelete()); + g1.setMEdit(grpMenuAccess.getMEdit()); + g1.setMQuery(grpMenuAccess.getMQuery()); + g1.setMVisible(grpMenuAccess.getMVisible()); + g1.setMexport(grpMenuAccess.getMexport()); + + GrpMenuAccess grpMenuAccess2 = grpMenuAccessRepository.save(g1); + return new ResponseEntity<>(grpMenuAccess2, HttpStatus.OK); + } + +// delete by usrgrp + @DeleteMapping("/deleteMenuAcces/{userId}") + public void deleteMenuAccess(@PathVariable Long userId) { + GrpMenuAccess grpMenuAccess = grpMenuAccessRepository.findByUsrGrp(userId); + if (Objects.isNull(grpMenuAccess)) + throw new ResourceNotFoundException("no resource found"); + grpMenuAccessRepository.delete(grpMenuAccess); + } + +// ADD MULTIPLE DATA FOR GROUP MENU ACCESS + @PostMapping("/group") + public ResponseEntity addgroupmenuaccess(@RequestBody List grp) { + + for (GrpMenuAccess g : grp) { + MenuDet menu1 = menuDetRepository.findById(g.getGmenuid()); + AppUserRole a = appUserRoleRepository.findById(g.getGrpid()); + + g.setUsrGrp(a); + g.setMenuItemId(menu1); + } + List save = grpMenuAccessRepository.saveAll(grp); + return new ResponseEntity<>(save, HttpStatus.CREATED); + } + +// ADD DATA FOR group menu access + @PostMapping("/singlegroup") + public ResponseEntity addsinglegroup(@RequestBody GrpMenuAccess grp) { + + MenuDet menu1 = menuDetRepository.findById(grp.getGmenuid()); + AppUserRole a = appUserRoleRepository.findById(grp.getGrpid()); + + grp.setUsrGrp(a); + grp.setMenuItemId(menu1); + + GrpMenuAccess save = grpMenuAccessRepository.save(grp); + return new ResponseEntity<>(save, HttpStatus.CREATED); + } + +// NEWWWW post MENU AND SUBMENU IN GROUPMENUACCESS + + @PostMapping("/addgrpwithsubmenu") + public ResponseEntity adds(@RequestBody GrpMenuAccess g) { + + List list = new ArrayList<>(); + + Optional a = grpMenuAccessRepository.findbygrpandmenuid(g.getGmenuid(), g.getGrpid()); + if (!a.isPresent()) { + MenuDet me = menuDetRepository.findById(g.getGmenuid()); + g.setMenuItemId(me); + g.setItemSeq(me.getItemSeq()); + g.setMenuItemDesc(me.getMenuItemDesc()); + g.setMenuItemDesc(me.getMenuItemDesc()); + g.setModuleName(me.getModuleName()); + g.setStatus(me.getStatus()); + g.setMain_menu_action_name(me.getMain_menu_action_name()); + g.setMain_menu_icon_name(me.getMain_menu_icon_name()); + g.setMenuId(me.getMenuId()); + + AppUserRole app1 = appUserRoleRepository.findById(g.getGrpid()); + g.setUsrGrp(app1); + g.setMCreate("true"); + g.setMDelete("true"); + g.setMEdit("true"); + g.setMQuery("true"); + g.setMVisible("true"); + g.setIsdisable("true"); + g.setMexport("true"); + + g.setCreatedAt(new Date()); + g.setUpdatedAt(new Date()); + + GrpMenuAccess save1 = grpMenuAccessRepository.save(g); + list.add(save1); + + List submenu = menuDetRepository.findAllSubmenuByMenuId(g.getGmenuid()); + + for (int i = 0; i < submenu.size(); i++) { + MenuDet m = menuDetRepository.findById(submenu.get(i).getMenuItemId()); + g.setMenuItemId(m); + g.setItemSeq(m.getItemSeq()); + g.setMenuItemDesc(m.getMenuItemDesc()); + g.setModuleName(m.getModuleName()); + g.setStatus(m.getStatus()); + g.setMain_menu_action_name(m.getMain_menu_action_name()); + g.setMain_menu_icon_name(m.getMain_menu_icon_name()); + g.setMenuId(m.getMenuId()); + + AppUserRole app = appUserRoleRepository.findById(g.getGrpid()); + g.setUsrGrp(app); + g.setMCreate("true"); + g.setMDelete("true"); + g.setMEdit("true"); + g.setMQuery("true"); + g.setMVisible("true"); + g.setIsdisable("true"); + g.setMexport("true"); + + + g.setCreatedAt(new Date()); + g.setUpdatedAt(new Date()); + + GrpMenuAccess save = grpMenuAccessRepository.save(g); + list.add(save); + } + + return new ResponseEntity<>(list, HttpStatus.CREATED); + + } else { + return new ResponseEntity<>("already added menu", HttpStatus.BAD_REQUEST); + } + + } + +// GET ALL GRPACCESS BY USRGRP + @GetMapping("getusracces1/{usr_grp}") + public ResponseEntity getallbyusrgrp(@PathVariable Long usr_grp) { + List list = grpMenuAccessRepository.findAllByUsrGrp(usr_grp); + return new ResponseEntity<>(list, HttpStatus.OK); + + } + +// UPDATE GRP MENU ACCESS BY MENU ITEMID + @PutMapping("/update/{menu_item_id}/{usr_grp}") + public ResponseEntity updateMenuGRPAccess(@PathVariable Long menu_item_id, @PathVariable Long usr_grp, + @RequestBody GrpMenuAccess grpMenuAccess) { + GrpMenuAccess g1 = grpMenuAccessRepository.findByUsrgrpAndMenuitemid(menu_item_id, usr_grp); + if (g1 == null) { + throw new ResourceNotFoundException("no resource found"); + } + g1.setMCreate(grpMenuAccess.getMCreate()); + g1.setMDelete(grpMenuAccess.getMDelete()); + g1.setMEdit(grpMenuAccess.getMEdit()); + g1.setMQuery(grpMenuAccess.getMQuery()); + g1.setMVisible(grpMenuAccess.getMVisible()); + g1.setIsdisable(grpMenuAccess.getIsdisable()); + g1.setItemSeq(grpMenuAccess.getItemSeq()); + g1.setMain_menu_action_name(grpMenuAccess.getMain_menu_action_name()); + g1.setMain_menu_icon_name(grpMenuAccess.getMain_menu_action_name()); + g1.setMenuId(grpMenuAccess.getMenuId()); + g1.setMenuItemDesc(grpMenuAccess.getMenuItemDesc()); + g1.setModuleName(grpMenuAccess.getModuleName()); + g1.setStatus(grpMenuAccess.getStatus()); + g1.setMexport(grpMenuAccess.getMexport()); + + GrpMenuAccess grpMenuAccess2 = grpMenuAccessRepository.save(g1); + return new ResponseEntity<>(grpMenuAccess2, HttpStatus.OK); + } + +// DELETE GRPMENU ACCESS BY MENUITEMID AND USRGRP + @DeleteMapping("/deleteGrpMenuAcces/{menu_item_id}/{usr_grp}") + public void deleteGrpMenuAccess(@PathVariable Long menu_item_id, @PathVariable Long usr_grp) { + GrpMenuAccess grpMenuAccess = grpMenuAccessRepository.findByUsrgrpAndMenuitemid(menu_item_id, usr_grp); + if (Objects.isNull(grpMenuAccess)) + throw new ResourceNotFoundException("no resource found"); + grpMenuAccessRepository.delete(grpMenuAccess); + } + +// GET GRPMENU ACCESS BY MENUITEM ID BUT NOT WORKING WITH SUBMENU + @GetMapping("/getsec/{menu_item_id}") + public ResponseEntity getgrpmenuaccess(@PathVariable Long menu_item_id) { + GrpMenuAccess get = grpMenuAccessRepository.findById1(menu_item_id); + + return new ResponseEntity<>(get, HttpStatus.CREATED); + } + + + +} diff --git a/backend/src/main/java/com/realnet/fnd/entity/DropDownDTO.java b/backend/src/main/java/com/realnet/fnd/entity/DropDownDTO.java new file mode 100644 index 0000000..bb3f136 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/entity/DropDownDTO.java @@ -0,0 +1,35 @@ +package com.realnet.fnd.entity; + +public class DropDownDTO { + private int id; + private String name; + + public DropDownDTO() { + super(); + // TODO Auto-generated constructor stub + } + + public DropDownDTO(int id, String name) { + super(); + this.id = id; + this.name = name; + } + + public int getId() { + return id; + } + public void setId(int id) { + this.id = id; + } + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + + @Override + public String toString() { + return "DropDownDTO [id=" + id + ", name=" + name + "]"; + } +} diff --git a/backend/src/main/java/com/realnet/fnd/entity/Error.java b/backend/src/main/java/com/realnet/fnd/entity/Error.java new file mode 100644 index 0000000..dcf2fc4 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/entity/Error.java @@ -0,0 +1,41 @@ +package com.realnet.fnd.entity; + +import java.io.Serializable; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + +@JsonIgnoreProperties({ "hibernateLazyInitializer", "handler" }) +public class Error implements Serializable { + + private static final long serialVersionUID = 1L; + + private String message; + + private String title; + + public String getMessage () + { + return message; + } + + public void setMessage (String message) + { + this.message = message; + } + + public String getTitle () + { + return title; + } + + public void setTitle (String title) + { + this.title = title; + } + + @Override + public String toString() + { + return "ClassPojo [message = "+message+", title = "+title+"]"; + } +} \ No newline at end of file diff --git a/backend/src/main/java/com/realnet/fnd/entity/ErrorPojo.java b/backend/src/main/java/com/realnet/fnd/entity/ErrorPojo.java new file mode 100644 index 0000000..c99f3ec --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/entity/ErrorPojo.java @@ -0,0 +1,38 @@ +package com.realnet.fnd.entity; + +import java.io.Serializable; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + +@JsonIgnoreProperties({ "hibernateLazyInitializer", "handler" }) +public class ErrorPojo implements Serializable { + + private static final long serialVersionUID = 1L; + + private Error error; + + public ErrorPojo() { + + } + + public ErrorPojo(Error error) { + this.error = error; + } + + public Error getError () + { + return error; + } + + public void setError (Error error) + { + this.error = error; + } + + @Override + public String toString() + { + return "ClassPojo [error = "+error+"]"; + } +} + diff --git a/backend/src/main/java/com/realnet/fnd/entity/ModuleCopyDTO.java b/backend/src/main/java/com/realnet/fnd/entity/ModuleCopyDTO.java new file mode 100644 index 0000000..3b60623 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/entity/ModuleCopyDTO.java @@ -0,0 +1,12 @@ +package com.realnet.fnd.entity; + +import lombok.Data; + +@Data +public class ModuleCopyDTO { + private int from_projectId; + private int from_moduleId; + private String to_moduleName; + + +} diff --git a/backend/src/main/java/com/realnet/fnd/entity/Modulemini.java b/backend/src/main/java/com/realnet/fnd/entity/Modulemini.java new file mode 100644 index 0000000..888ff33 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/entity/Modulemini.java @@ -0,0 +1,8 @@ +package com.realnet.fnd.entity; + +public interface Modulemini { + + String getid(); + String getmodule_name(); + +} diff --git a/backend/src/main/java/com/realnet/fnd/entity/ProjectMini.java b/backend/src/main/java/com/realnet/fnd/entity/ProjectMini.java new file mode 100644 index 0000000..f063c68 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/entity/ProjectMini.java @@ -0,0 +1,7 @@ +package com.realnet.fnd.entity; + +public interface ProjectMini { + String getid(); + String getproject_name(); + +} diff --git a/backend/src/main/java/com/realnet/fnd/entity/Rn_AuditEntity.java b/backend/src/main/java/com/realnet/fnd/entity/Rn_AuditEntity.java new file mode 100644 index 0000000..513fefa --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/entity/Rn_AuditEntity.java @@ -0,0 +1,77 @@ +package com.realnet.fnd.entity; + +import java.io.Serializable; +import java.util.Date; + + +import org.springframework.data.annotation.CreatedDate; +import org.springframework.data.annotation.LastModifiedDate; + + +//@MappedSuperclass +//@EntityListeners(AuditingEntityListener.class) +public abstract class Rn_AuditEntity extends Rn_ExtensionEntity implements Serializable { + + private static final long serialVersionUID = 1L; + +// @Temporal(TemporalType.TIMESTAMP) +// @Column(name = "CREATED_AT", nullable = false, updatable = false) + @CreatedDate + private Date createdAt; + + //@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime createdAt; + +// @Temporal(TemporalType.TIMESTAMP) +// @Column(name = "UPDATED_AT", nullable = false) + @LastModifiedDate + private Date updatedAt; + +// @Column(name = "CREATED_BY", updatable = false) + private String createdBy; + +// @Column(name = "UPDATED_BY") + private String updatedBy; + +// @Column(name = "ACCOUNT_ID") + private String accountId; + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public String getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(String createdBy) { + this.createdBy = createdBy; + } + + public String getUpdatedBy() { + return updatedBy; + } + + public void setUpdatedBy(String updatedBy) { + this.updatedBy = updatedBy; + } + + public String getAccountId() { + return accountId; + } + + public void setAccountId(String accountId) { + this.accountId = accountId; + } +} diff --git a/backend/src/main/java/com/realnet/fnd/entity/Rn_Dynamic_Transaction.java b/backend/src/main/java/com/realnet/fnd/entity/Rn_Dynamic_Transaction.java new file mode 100644 index 0000000..e7ea591 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/entity/Rn_Dynamic_Transaction.java @@ -0,0 +1,434 @@ +package com.realnet.fnd.entity; + + +import org.springframework.data.annotation.Id; +import org.springframework.data.mongodb.core.mapping.Document; + +//@Entity +@Document +//@Table(name = "RN_DYNAMIC_TRANSACTION") +public class Rn_Dynamic_Transaction extends Rn_Who_Columns { + /** + * + */ + private static final long serialVersionUID = 1L; + + + @Id + private String mongoid; +// @GeneratedValue(strategy = GenerationType.IDENTITY) +// @Column(name = "ID") + private int id; + +// @Column(name = "FORM_ID") + private int form_id; + +// @Column(name = "FORM_VERSION") + private int form_version; + +// @Column(name = "COMP1") + private String comp1; + +// @Column(name = "COMP2") + private String comp2; + +// @Column(name = "COMP3") + private String comp3; + +// @Column(name = "COMP4") + private String comp4; + +// @Column(name = "COMP5") + private String comp5; + +// @Column(name = "COMP6") + private String comp6; + +// @Column(name = "COMP7") + private String comp7; + +// @Column(name = "COMP8") + private String comp8; + +// @Column(name = "COMP9") + private String comp9; + +// @Column(name = "COMP10") + private String comp10; + +// @Column(name = "COMP11") + private String comp11; + +// @Column(name = "COMP12") + private String comp12; +// +// @Column(name = "COMP13") + private String comp13; + +// @Column(name = "COMP14") + private String comp14; + +// @Column(name = "COMP15") + private String comp15; + +// @Column(name = "COMP16") + private String comp16; + +// @Column(name = "COMP17") + private String comp17; + +// @Column(name = "COMP18") + private String comp18; + +// @Column(name = "COMP19") + private String comp19; + +// @Column(name = "COMP20") + private String comp20; + +// @Column(name = "COMP21") + private String comp21; + +// @Column(name = "COMP22") + private String comp22; + +// @Column(name = "COMP23") + private String comp23; + +// @Column(name = "COMP24") + private String comp24; + +// @Column(name = "COMP25") + private String comp25; + + // FOR LONG-TEXT FIELDS +// @Lob +// @Column(name = "COMP_L26", length = 100000) + private String comp_l26; + +// @Lob +// @Column(name = "COMP_L27", length = 100000) + private String comp_l27; + +// @Lob +// @Column(name = "COMP_L28", length = 100000) + private String comp_l28; + +// @Lob +// @Column(name = "COMP_L29", length = 100000) + private String comp_l29; + +// @Lob +// @Column(name = "COMP_L30", length = 100000) + private String comp_l30; + + public Rn_Dynamic_Transaction() { + super(); + } + + public Rn_Dynamic_Transaction(int id, int form_id, int form_version, String comp1, String comp2, String comp3, + String comp4, String comp5, String comp6, String comp7, String comp8, String comp9, String comp10, + String comp11, String comp12, String comp13, String comp14, String comp15, String comp16, String comp17, + String comp18, String comp19, String comp20, String comp21, String comp22, String comp23, String comp24, + String comp25, String comp_l26, String comp_l27, String comp_l28, String comp_l29, String comp_l30) { + super(); + this.id = id; + this.form_id = form_id; + this.form_version = form_version; + this.comp1 = comp1; + this.comp2 = comp2; + this.comp3 = comp3; + this.comp4 = comp4; + this.comp5 = comp5; + this.comp6 = comp6; + this.comp7 = comp7; + this.comp8 = comp8; + this.comp9 = comp9; + this.comp10 = comp10; + this.comp11 = comp11; + this.comp12 = comp12; + this.comp13 = comp13; + this.comp14 = comp14; + this.comp15 = comp15; + this.comp16 = comp16; + this.comp17 = comp17; + this.comp18 = comp18; + this.comp19 = comp19; + this.comp20 = comp20; + this.comp21 = comp21; + this.comp22 = comp22; + this.comp23 = comp23; + this.comp24 = comp24; + this.comp25 = comp25; + this.comp_l26 = comp_l26; + this.comp_l27 = comp_l27; + this.comp_l28 = comp_l28; + this.comp_l29 = comp_l29; + this.comp_l30 = comp_l30; + } + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public int getForm_id() { + return form_id; + } + + public void setForm_id(int form_id) { + this.form_id = form_id; + } + + public int getForm_version() { + return form_version; + } + + public void setForm_version(int form_version) { + this.form_version = form_version; + } + + public String getComp1() { + return comp1; + } + + public void setComp1(String comp1) { + this.comp1 = comp1; + } + + public String getComp2() { + return comp2; + } + + public void setComp2(String comp2) { + this.comp2 = comp2; + } + + public String getComp3() { + return comp3; + } + + public void setComp3(String comp3) { + this.comp3 = comp3; + } + + public String getComp4() { + return comp4; + } + + public void setComp4(String comp4) { + this.comp4 = comp4; + } + + public String getComp5() { + return comp5; + } + + public void setComp5(String comp5) { + this.comp5 = comp5; + } + + public String getComp6() { + return comp6; + } + + public void setComp6(String comp6) { + this.comp6 = comp6; + } + + public String getComp7() { + return comp7; + } + + public void setComp7(String comp7) { + this.comp7 = comp7; + } + + public String getComp8() { + return comp8; + } + + public void setComp8(String comp8) { + this.comp8 = comp8; + } + + public String getComp9() { + return comp9; + } + + public void setComp9(String comp9) { + this.comp9 = comp9; + } + + public String getComp10() { + return comp10; + } + + public void setComp10(String comp10) { + this.comp10 = comp10; + } + + public String getComp11() { + return comp11; + } + + public void setComp11(String comp11) { + this.comp11 = comp11; + } + + public String getComp12() { + return comp12; + } + + public void setComp12(String comp12) { + this.comp12 = comp12; + } + + public String getComp13() { + return comp13; + } + + public void setComp13(String comp13) { + this.comp13 = comp13; + } + + public String getComp14() { + return comp14; + } + + public void setComp14(String comp14) { + this.comp14 = comp14; + } + + public String getComp15() { + return comp15; + } + + public void setComp15(String comp15) { + this.comp15 = comp15; + } + + public String getComp16() { + return comp16; + } + + public void setComp16(String comp16) { + this.comp16 = comp16; + } + + public String getComp17() { + return comp17; + } + + public void setComp17(String comp17) { + this.comp17 = comp17; + } + + public String getComp18() { + return comp18; + } + + public void setComp18(String comp18) { + this.comp18 = comp18; + } + + public String getComp19() { + return comp19; + } + + public void setComp19(String comp19) { + this.comp19 = comp19; + } + + public String getComp20() { + return comp20; + } + + public void setComp20(String comp20) { + this.comp20 = comp20; + } + + public String getComp21() { + return comp21; + } + + public void setComp21(String comp21) { + this.comp21 = comp21; + } + + public String getComp22() { + return comp22; + } + + public void setComp22(String comp22) { + this.comp22 = comp22; + } + + public String getComp23() { + return comp23; + } + + public void setComp23(String comp23) { + this.comp23 = comp23; + } + + public String getComp24() { + return comp24; + } + + public void setComp24(String comp24) { + this.comp24 = comp24; + } + + public String getComp25() { + return comp25; + } + + public void setComp25(String comp25) { + this.comp25 = comp25; + } + + public String getComp_l26() { + return comp_l26; + } + + public void setComp_l26(String comp_l26) { + this.comp_l26 = comp_l26; + } + + public String getComp_l27() { + return comp_l27; + } + + public void setComp_l27(String comp_l27) { + this.comp_l27 = comp_l27; + } + + public String getComp_l28() { + return comp_l28; + } + + public void setComp_l28(String comp_l28) { + this.comp_l28 = comp_l28; + } + + public String getComp_l29() { + return comp_l29; + } + + public void setComp_l29(String comp_l29) { + this.comp_l29 = comp_l29; + } + + public String getComp_l30() { + return comp_l30; + } + + public void setComp_l30(String comp_l30) { + this.comp_l30 = comp_l30; + } + +} \ No newline at end of file diff --git a/backend/src/main/java/com/realnet/fnd/entity/Rn_Ext_Fields.java b/backend/src/main/java/com/realnet/fnd/entity/Rn_Ext_Fields.java new file mode 100644 index 0000000..89b838c --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/entity/Rn_Ext_Fields.java @@ -0,0 +1,157 @@ +package com.realnet.fnd.entity; + + + +import org.springframework.data.annotation.Id; + +import lombok.Data; + +@Data +//@Entity +//@Table(name = "RN_EXT_FIELD_T") +public class Rn_Ext_Fields extends Rn_Who_Columns { + /** + * + */ + private static final long serialVersionUID = 1L; + + + @Id + private String mongoid; +// @Id +// @GeneratedValue(strategy = GenerationType.IDENTITY) +// @Column(name = "ID") + private int id; + +// @Column(name = "TYPE") + private String type; + +// @Column(name = "FIELD_NAME") + private String field_name; + +// @Column(name = "MAPPING") + private String mapping; + +// @Column(name = "DATA_TYPE") + private String data_type; + +// @Column(name = "FORM_CODE") + private String form_code; + +// @Column(name = "IS_ACTIVE") + private boolean isActive; +// +// @Column(name = "ACCOUNT_ID") + private long account_id; + + + + + + + + +// @Column(name = "SP_NAME_FOR_AUTOCOMPLETE") +// private String sp_name_for_autocomplete; +// +// @Column(name = "SP_FOR_AUTOCOMPLETE") +// private String sp_for_autocomplete; +// +// @Column(name = "EXT_AUTO_ID") +// private String ext_auto_id; +// +// @Column(name = "EXT_DEPENDENT_ID") +// private String ext_dependent_id; +// +// @Column(name = "EXT_DD_ID") +// private String ext_dd_id; +// +// @Column(name = "SP_NAME") +// private String sp_name; +// +// @Column(name = "DROP_VALUE") +// private String drop_value; +// +// @Column(name = "DROPDOWN") +// private String dropdown; +// +// @Column(name = "MANDATORY") +// private String mandatory; +// +// @Column(name = "HIDDEN") +// private String hidden; +// +// @Column(name = "READONLY") +// private String readonly; +// +// @Column(name = "DEPENDENT") +// private String dependent; +// @Column(name = "SEQ_NAME") +// private String seq_name; +// +// @Column(name = "DEPENDENT_SP") +// private String dependent_sp; +// +// @Column(name = "DEPENDENT_SP_PARAM") +// private String dependent_sp_param; +// +// @Column(name = "VALIDATION_1") +// private String validation_1; +// +// @Column(name = "VAL_TYPE") +// private String val_type; +// +// @Column(name = "VAL_SP") +// private String val_sp; +// +// @Column(name = "VAL_SP_PARAM") +// private String val_sp_param; +// +// @Column(name = "SEQUENCE") +// private String sequence; +// +// @Column(name = "SEQ_SP") +// private String seq_sp; +// +// @Column(name = "SEQ_SP_PARAM") +// private String seq_sp_param; +// +// @Column(name = "DEFAULT_1") +// private String default_1; +// +// @Column(name = "DEFAULT_TYPE") +// private String default_type; +// +// @Column(name = "DEFAULT_VALUE") +// private String default_value; +// +// @Column(name = "DEFAULT_SP") +// private String default_sp; +// +// @Column(name = "DEFAULT_SP_PARAM") +// private String default_sp_param; +// +// @Column(name = "CALCULATED_FIELD") +// private String calculated_field; +// +// @Column(name = "CAL_SP") +// private String cal_sp; +// +// @Column(name = "CAL_SP_PARAM") +// private String cal_sp_param; +// +// @Column(name = "ADD_TO_GRID") +// private String add_to_grid; +// +// @Column(name = "DEPENDENT_ON") +// private String dependent_on; +// @Column(name = "RADIO") +// private String radio; +// @Column(name = "RADIO_OPTION") +// private String radio_option; + + + + + +} diff --git a/backend/src/main/java/com/realnet/fnd/entity/Rn_ExtensionEntity.java b/backend/src/main/java/com/realnet/fnd/entity/Rn_ExtensionEntity.java new file mode 100644 index 0000000..065e6b9 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/entity/Rn_ExtensionEntity.java @@ -0,0 +1,183 @@ +package com.realnet.fnd.entity; + +//import javax.persistence.Column; +//import javax.persistence.MappedSuperclass; + +//@MappedSuperclass +public class Rn_ExtensionEntity extends Rn_FlexEntity { +// @Column(name = "EXTN1") + private String extn1; +// @Column(name = "EXTN2") + private String extn2; +// @Column(name = "EXTN3") + private String extn3; +// @Column(name = "EXTN4") + private String extn4; +// @Column(name = "EXTN5") + private String extn5; +// @Column(name = "EXTN6") + private String extn6; +// @Column(name = "EXTN7") + private String extn7; +// @Column(name = "EXTN8") + private String extn8; +// @Column(name = "EXTN9") + private String extn9; +// @Column(name = "EXTN10") + private String extn10; +// @Column(name = "EXTN11") + private String extn11; +// @Column(name = "EXTN12") + private String extn12; +// @Column(name = "EXTN13") + private String extn13; +// @Column(name = "EXTN14") + private String extn14; +// @Column(name = "EXTN15") + private String extn15; + + public Rn_ExtensionEntity() { + super(); + } + + public Rn_ExtensionEntity(String extn1, String extn2, String extn3, String extn4, String extn5, String extn6, + String extn7, String extn8, String extn9, String extn10, String extn11, String extn12, String extn13, + String extn14, String extn15) { + super(); + this.extn1 = extn1; + this.extn2 = extn2; + this.extn3 = extn3; + this.extn4 = extn4; + this.extn5 = extn5; + this.extn6 = extn6; + this.extn7 = extn7; + this.extn8 = extn8; + this.extn9 = extn9; + this.extn10 = extn10; + this.extn11 = extn11; + this.extn12 = extn12; + this.extn13 = extn13; + this.extn14 = extn14; + this.extn15 = extn15; + } + + public String getExtn1() { + return extn1; + } + + public void setExtn1(String extn1) { + this.extn1 = extn1; + } + + public String getExtn2() { + return extn2; + } + + public void setExtn2(String extn2) { + this.extn2 = extn2; + } + + public String getExtn3() { + return extn3; + } + + public void setExtn3(String extn3) { + this.extn3 = extn3; + } + + public String getExtn4() { + return extn4; + } + + public void setExtn4(String extn4) { + this.extn4 = extn4; + } + + public String getExtn5() { + return extn5; + } + + public void setExtn5(String extn5) { + this.extn5 = extn5; + } + + public String getExtn6() { + return extn6; + } + + public void setExtn6(String extn6) { + this.extn6 = extn6; + } + + public String getExtn7() { + return extn7; + } + + public void setExtn7(String extn7) { + this.extn7 = extn7; + } + + public String getExtn8() { + return extn8; + } + + public void setExtn8(String extn8) { + this.extn8 = extn8; + } + + public String getExtn9() { + return extn9; + } + + public void setExtn9(String extn9) { + this.extn9 = extn9; + } + + public String getExtn10() { + return extn10; + } + + public void setExtn10(String extn10) { + this.extn10 = extn10; + } + + public String getExtn11() { + return extn11; + } + + public void setExtn11(String extn11) { + this.extn11 = extn11; + } + + public String getExtn12() { + return extn12; + } + + public void setExtn12(String extn12) { + this.extn12 = extn12; + } + + public String getExtn13() { + return extn13; + } + + public void setExtn13(String extn13) { + this.extn13 = extn13; + } + + public String getExtn14() { + return extn14; + } + + public void setExtn14(String extn14) { + this.extn14 = extn14; + } + + public String getExtn15() { + return extn15; + } + + public void setExtn15(String extn15) { + this.extn15 = extn15; + } +} diff --git a/backend/src/main/java/com/realnet/fnd/entity/Rn_FlexEntity.java b/backend/src/main/java/com/realnet/fnd/entity/Rn_FlexEntity.java new file mode 100644 index 0000000..d0ff1a7 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/entity/Rn_FlexEntity.java @@ -0,0 +1,72 @@ +package com.realnet.fnd.entity; + +//import javax.persistence.Column; +//import javax.persistence.MappedSuperclass; + +//@MappedSuperclass +public class Rn_FlexEntity { +// @Column(name = "FLEX1") + private String flex1; +// @Column(name = "FLEX2") + private String flex2; +// @Column(name = "FLEX3") + private String flex3; +// @Column(name = "FLEX4") + private String flex4; +// @Column(name = "FLEX5") + private String flex5; + + public Rn_FlexEntity() { + super(); + } + + public Rn_FlexEntity(String flex1, String flex2, String flex3, String flex4, String flex5) { + super(); + this.flex1 = flex1; + this.flex2 = flex2; + this.flex3 = flex3; + this.flex4 = flex4; + this.flex5 = flex5; + } + + public String getFlex1() { + return flex1; + } + + public void setFlex1(String flex1) { + this.flex1 = flex1; + } + + public String getFlex2() { + return flex2; + } + + public void setFlex2(String flex2) { + this.flex2 = flex2; + } + + public String getFlex3() { + return flex3; + } + + public void setFlex3(String flex3) { + this.flex3 = flex3; + } + + public String getFlex4() { + return flex4; + } + + public void setFlex4(String flex4) { + this.flex4 = flex4; + } + + public String getFlex5() { + return flex5; + } + + public void setFlex5(String flex5) { + this.flex5 = flex5; + } + +} diff --git a/backend/src/main/java/com/realnet/fnd/entity/Rn_Forms_Component_Setup.java b/backend/src/main/java/com/realnet/fnd/entity/Rn_Forms_Component_Setup.java new file mode 100644 index 0000000..bbfc649 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/entity/Rn_Forms_Component_Setup.java @@ -0,0 +1,124 @@ +package com.realnet.fnd.entity; + + + +import org.springframework.data.annotation.Id; +import org.springframework.data.mongodb.core.mapping.Document; + +import com.fasterxml.jackson.annotation.JsonBackReference; + +//@Data +//@EqualsAndHashCode(callSuper = false) +//@Entity +//@Table(name = "RN_FORMS_COMPONENT_SETUP_T") +@Document +public class Rn_Forms_Component_Setup extends Rn_Who_Columns { + private static final long serialVersionUID = 1L; +// @Id +// @GeneratedValue(strategy = GenerationType.IDENTITY) +// @Column(name = "COMPONENT_ID") + + @Id + private String mongoid; + + private int component_id; + +// @Column(name = "LABEL") + private String label; + +// @Column(name = "TYPE") + private String type; + +// @Column(name = "MAPPING") + private String mapping; + +// @Column(name = "MANDATORY") + private String mandatory; + +// @Column(name = "READONLY") + private String readonly; + +// @Column(name = "DROP_VALUES") + private String drop_values; + +// @Column(name = "SP") + private String sp; + +// @ManyToOne(fetch = FetchType.LAZY, optional = false) +// @JoinColumn(name = "form_id", nullable = false) +// @JsonBackReference + private Rn_Forms_Setup rn_forms_setup; + + public int getComponent_id() { + return component_id; + } + + public void setComponent_id(int component_id) { + this.component_id = component_id; + } + + public String getLabel() { + return label; + } + + public void setLabel(String label) { + this.label = label; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getMapping() { + return mapping; + } + + public void setMapping(String mapping) { + this.mapping = mapping; + } + + public String getMandatory() { + return mandatory; + } + + public void setMandatory(String mandatory) { + this.mandatory = mandatory; + } + + public String getReadonly() { + return readonly; + } + + public void setReadonly(String readonly) { + this.readonly = readonly; + } + + public String getDrop_values() { + return drop_values; + } + + public void setDrop_values(String drop_values) { + this.drop_values = drop_values; + } + + public String getSp() { + return sp; + } + + public void setSp(String sp) { + this.sp = sp; + } + + public Rn_Forms_Setup getRn_forms_setup() { + return rn_forms_setup; + } + + public void setRn_forms_setup(Rn_Forms_Setup rn_forms_setup) { + this.rn_forms_setup = rn_forms_setup; + } + +} \ No newline at end of file diff --git a/backend/src/main/java/com/realnet/fnd/entity/Rn_Forms_Setup.java b/backend/src/main/java/com/realnet/fnd/entity/Rn_Forms_Setup.java new file mode 100644 index 0000000..6b39146 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/entity/Rn_Forms_Setup.java @@ -0,0 +1,100 @@ +package com.realnet.fnd.entity; + +import java.util.List; + +import org.springframework.data.annotation.Id; +import org.springframework.data.mongodb.core.mapping.Document; + +import com.fasterxml.jackson.annotation.JsonManagedReference; + +//@Data +//@EqualsAndHashCode(callSuper = false) +//@Entity +//@Table(name = "RN_FORMS_SETUP_T") +@Document +public class Rn_Forms_Setup extends Rn_Who_Columns { + private static final long serialVersionUID = 1L; + + @Id + private String mongoid; +// @Id +// @GeneratedValue(strategy = GenerationType.IDENTITY) +// @Column(name = "FORM_ID") + private int form_id; + +// @Column(name = "FORM_NAME") + private String form_name; + +// @Column(name = "FORM_DESC") + private String form_desc; + +// @Column(name = "RELATED_TO") + private String related_to; + +// @Column(name = "PAGE_EVENT") + private String page_event; + +// @Column(name = "BUTTON_CAPTION") + private String button_caption; + +// @OneToMany(mappedBy = "rn_forms_setup", cascade = CascadeType.ALL) +// @JsonManagedReference + private List components; + + public int getForm_id() { + return form_id; + } + + public void setForm_id(int form_id) { + this.form_id = form_id; + } + + public String getForm_name() { + return form_name; + } + + public void setForm_name(String form_name) { + this.form_name = form_name; + } + + public String getForm_desc() { + return form_desc; + } + + public void setForm_desc(String form_desc) { + this.form_desc = form_desc; + } + + public String getRelated_to() { + return related_to; + } + + public void setRelated_to(String related_to) { + this.related_to = related_to; + } + + public String getPage_event() { + return page_event; + } + + public void setPage_event(String page_event) { + this.page_event = page_event; + } + + public String getButton_caption() { + return button_caption; + } + + public void setButton_caption(String button_caption) { + this.button_caption = button_caption; + } + + public List getComponents() { + return components; + } + + public void setComponents(List components) { + this.components = components; + } + +} \ No newline at end of file diff --git a/backend/src/main/java/com/realnet/fnd/entity/Rn_Function_Register.java b/backend/src/main/java/com/realnet/fnd/entity/Rn_Function_Register.java new file mode 100644 index 0000000..0d427e1 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/entity/Rn_Function_Register.java @@ -0,0 +1,111 @@ +package com.realnet.fnd.entity; + +import java.time.LocalDate; + +import org.springframework.data.annotation.Id; +import org.springframework.data.mongodb.core.mapping.Document; + +import com.fasterxml.jackson.annotation.JsonFormat; + +//@Entity +//@Table(name = "RN_FUNC_REGISTER") +@Document +public class Rn_Function_Register extends Rn_Who_Columns { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + private String mongoid; + +// @Id +// @GeneratedValue(strategy = GenerationType.IDENTITY) +// @Column(name = "ID") + private int id; + +// @Column(name = "MENU_ID") + private int menu_id; + +// @Column(name = "FUNCTION_NAME") + private String function_name; + +// @Column(name = "FUNCTION_ACTION_NAME") + private String function_action_name; + +// @Column(name = "FUNCTION_ICON") + private String function_icon; + +// @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "MM/dd/yyyy") +// @Column(name = "END_DATE") + private LocalDate end_date; + +// @Column(name = "ENABLE_FLAG") + private String enable_flag; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public int getMenu_id() { + return menu_id; + } + + public void setMenu_id(int menu_id) { + this.menu_id = menu_id; + } + + public String getFunction_name() { + return function_name; + } + + public void setFunction_name(String function_name) { + this.function_name = function_name; + } + + public String getFunction_action_name() { + return function_action_name; + } + + public void setFunction_action_name(String function_action_name) { + this.function_action_name = function_action_name; + } + + public String getFunction_icon() { + return function_icon; + } + + public void setFunction_icon(String function_icon) { + this.function_icon = function_icon; + } + + public LocalDate getEnd_date() { + return end_date; + } + + public void setEnd_date(LocalDate end_date) { + this.end_date = end_date; + } + + public String getEnable_flag() { + return enable_flag; + } + + public void setEnable_flag(String enable_flag) { + this.enable_flag = enable_flag; + } + +// @Column(name = "MENU_NAME") +// private String menu_name; +// public String getMenu_name() { +// return menu_name; +// } +// public void setMenu_name(String menu_name) { +// this.menu_name = menu_name; +// } + +} diff --git a/backend/src/main/java/com/realnet/fnd/entity/Rn_Instance_Type.java b/backend/src/main/java/com/realnet/fnd/entity/Rn_Instance_Type.java new file mode 100644 index 0000000..952b2c5 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/entity/Rn_Instance_Type.java @@ -0,0 +1,39 @@ +package com.realnet.fnd.entity; + +import org.springframework.data.annotation.Id; +import org.springframework.data.mongodb.core.mapping.Document; + +//@Entity +//@Table(name = "RN_INSTANCE_TYPE_T") + +@Document +public class Rn_Instance_Type { +// @Id +// @GeneratedValue(strategy = GenerationType.IDENTITY) +// @Column(name = "ID") + + @Id + private String mongoid; + + private Integer id; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + +// @Column(name = "INSTANCE_TYPE") + private String instanceType; + + public String getInstanceType() { + return instanceType; + } + + public void setInstanceType(String instanceType) { + this.instanceType = instanceType; + } + +} \ No newline at end of file diff --git a/backend/src/main/java/com/realnet/fnd/entity/Rn_Lookup_Values.java b/backend/src/main/java/com/realnet/fnd/entity/Rn_Lookup_Values.java new file mode 100644 index 0000000..7f4355f --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/entity/Rn_Lookup_Values.java @@ -0,0 +1,203 @@ +package com.realnet.fnd.entity; + +import java.util.Date; + +import org.springframework.data.annotation.Id; +import org.springframework.data.mongodb.core.mapping.Document; + + +//@Entity +//@Table(name = "RN_LOOKUP_VALUES_T") + +@Document + +public class Rn_Lookup_Values extends Rn_Who_Columns { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + private String mongoid; + +// @Id +// @GeneratedValue(strategy = GenerationType.IDENTITY) +// @Column(name = "ID") + private Integer id; + +// @Column(name = "LOOKUP_CODE") + private String lookupCode; + +// @Column(name = "MEANING") + private String meaning; + +// @Column(name = "DESCRIPTION") + private String description; + +// @Column(name = "LOOKUP_TYPE") + private String lookupType; + +// @Column(name = "ACTIVE_START_DATE") + private Date active_start_date; + +// @Column(name = "ACTIVE_END_DATE") + private Date active_end_date; + +// @Column(name = "DROP_VALUE") + private String dropValue; + +// @Column(name = "ENABLED_FLAG") + private boolean enabled_flag; + + // +// @Column(name = "PATIENT_COUNTRY") +// private String patientCountry; +// +// +// +// @Column(name = "STATE_NAME") +// private String stateName; +// +// @Column(name = "CITY_NAME") +// private String cityName; +// +// @Column(name = "ZIP_CODE") +// private String zipCode; +// +// @Column(name = "COUNTRY_ID") +// private int country_id; + + public Rn_Lookup_Values() { + super(); + } + + + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getLookupCode() { + return lookupCode; + } + + public void setLookupCode(String lookupCode) { + this.lookupCode = lookupCode; + } + + public String getMeaning() { + return meaning; + } + + public void setMeaning(String meaning) { + this.meaning = meaning; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getLookupType() { + return lookupType; + } + + public void setLookupType(String lookupType) { + this.lookupType = lookupType; + } + + + + public String getDropValue() { + return dropValue; + } + + public void setDropValue(String dropValue) { + this.dropValue = dropValue; + } + + public Date getActive_start_date() { + return active_start_date; + } + + public void setActive_start_date(Date active_start_date) { + this.active_start_date = active_start_date; + } + + public Date getActive_end_date() { + return active_end_date; + } + + public void setActive_end_date(Date active_end_date) { + this.active_end_date = active_end_date; + } + + public boolean isEnabled_flag() { + return enabled_flag; + } + + public void setEnabled_flag(boolean enabled_flag) { + this.enabled_flag = enabled_flag; + } + +// @Column(name = "CREATED_BY") +// private int created_by; +// +// @DateTimeFormat(pattern = "dd/mm/yyyy") +// @Column(name = "CREATION_DATE") +// private Date creation_date = new java.sql.Date(new java.util.Date().getTime()); +// +// @Column(name = "LAST_UPDATED_BY") +// private int last_updated_by; +// +// @DateTimeFormat(pattern = "dd/mm/yyyy") +// @Column(name = "LAST_UPDATE_DATE") +// private Date last_update_date = new java.sql.Date(new java.util.Date().getTime()); + +// public String getPatientCountry() { +// return patientCountry; +// } +// +// public void setPatientCountry(String patientCountry) { +// this.patientCountry = patientCountry; +// } +// public String getStateName() { +// return stateName; +// } +// +// public void setStateName(String stateName) { +// this.stateName = stateName; +// } +// +// public String getCityName() { +// return cityName; +// } +// +// public void setCityName(String cityName) { +// this.cityName = cityName; +// } +// +// public String getZipCode() { +// return zipCode; +// } +// +// public void setZipCode(String zipCode) { +// this.zipCode = zipCode; +// } +// +// public int getCountry_id() { +// return country_id; +// } +// +// public void setCountry_id(int country_id) { +// this.country_id = country_id; +// } + +} diff --git a/backend/src/main/java/com/realnet/fnd/entity/Rn_Main_Menu.java b/backend/src/main/java/com/realnet/fnd/entity/Rn_Main_Menu.java new file mode 100644 index 0000000..501ce61 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/entity/Rn_Main_Menu.java @@ -0,0 +1,106 @@ +package com.realnet.fnd.entity; + +import java.util.List; + +import org.springframework.data.annotation.Id; +import org.springframework.data.mongodb.core.mapping.Document; + +import com.fasterxml.jackson.annotation.JsonManagedReference; + +//@Entity +//@Table(name = "RN_MAIN_MENU") +@Document +public class Rn_Main_Menu extends Rn_Who_Columns { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + private String mongoid; + +// @Id +// @GeneratedValue(strategy = GenerationType.IDENTITY) +// @Column(name = "ID") + private Integer id; + +// @Column(name = "MENU_NAME") + private String menu_name; + +// @Column(name = "MENU_ACTION_LINK") + private String menu_action_link; + +// @Column(name = "MENU_ICON") + private String menu_icon; + +// @Column(name = "MENU_TYPE") + private String menu_type; + +// @OneToMany(mappedBy = "rn_main_menu", cascade = CascadeType.ALL) +// @JsonManagedReference + private List sub_menus; + + public Rn_Main_Menu() { + super(); + } + + public Rn_Main_Menu(Integer id, String menu_name, String menu_action_link, String menu_icon, String menu_type, + List sub_menus) { + super(); + this.id = id; + this.menu_name = menu_name; + this.menu_action_link = menu_action_link; + this.menu_icon = menu_icon; + this.menu_type = menu_type; + this.sub_menus = sub_menus; + } + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getMenu_name() { + return menu_name; + } + + public void setMenu_name(String menu_name) { + this.menu_name = menu_name; + } + + public String getMenu_action_link() { + return menu_action_link; + } + + public void setMenu_action_link(String menu_action_link) { + this.menu_action_link = menu_action_link; + } + + public String getMenu_icon() { + return menu_icon; + } + + public void setMenu_icon(String menu_icon) { + this.menu_icon = menu_icon; + } + + public String getMenu_type() { + return menu_type; + } + + public void setMenu_type(String menu_type) { + this.menu_type = menu_type; + } + + public List getSub_menus() { + return sub_menus; + } + + public void setSub_menus(List sub_menus) { + this.sub_menus = sub_menus; + } + +} diff --git a/backend/src/main/java/com/realnet/fnd/entity/Rn_Menu_Group_Header.java b/backend/src/main/java/com/realnet/fnd/entity/Rn_Menu_Group_Header.java new file mode 100644 index 0000000..0e87c98 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/entity/Rn_Menu_Group_Header.java @@ -0,0 +1,262 @@ +package com.realnet.fnd.entity; + +import java.time.LocalDate; +import java.util.List; + +import org.springframework.data.annotation.Id; +import org.springframework.data.mongodb.core.mapping.Document; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonManagedReference; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer; + +import lombok.Data; +import lombok.Getter; +import lombok.Setter; + +//@Entity +//@Table(name = "RN_MENU_GROUP_HEADER") + +@Document +public class Rn_Menu_Group_Header extends Rn_Who_Columns { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + private String mongoid; +// @Id +// @GeneratedValue(strategy = GenerationType.IDENTITY) +// @Column(name = "ID") + private Long id; + +// @Column(name = "MENU_NAME") + private String menu_name; + +// @Column(name = "DESCRIPTION") + private String description; + +// @Column(name = "ACTIVE") + private boolean active; + +// @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "MM/dd/yyyy") +// @JsonSerialize(using = LocalDateSerializer.class) +// @Column(name = "START_DATE") + private LocalDate start_date; + +// @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "MM/dd/yyyy") +// @JsonSerialize(using = LocalDateSerializer.class) +// @Column(name = "END_DATE") + private LocalDate end_date; + + private String start_date_1; + private String end_date_1; + + // header +// @OneToMany(mappedBy = "menu_group_header", cascade = CascadeType.ALL) +// @JsonManagedReference + private List menu_group_lines; + + + public Rn_Menu_Group_Header() { + super(); + } + + + public Long getId() { + return id; + } + + + public void setId(Long id) { + this.id = id; + } + + + public String getMenu_name() { + return menu_name; + } + + + public void setMenu_name(String menu_name) { + this.menu_name = menu_name; + } + + + public String getDescription() { + return description; + } + + + public void setDescription(String description) { + this.description = description; + } + + + public boolean isActive() { + return active; + } + + + public void setActive(boolean active) { + this.active = active; + } + + + public LocalDate getStart_date() { + return start_date; + } + + + public void setStart_date(LocalDate start_date) { + this.start_date = start_date; + } + + + public LocalDate getEnd_date() { + return end_date; + } + + + public void setEnd_date(LocalDate end_date) { + this.end_date = end_date; + } + + + public String getStart_date_1() { + return start_date_1; + } + + + public void setStart_date_1(String start_date_1) { + this.start_date_1 = start_date_1; + } + + + public String getEnd_date_1() { + return end_date_1; + } + + + public void setEnd_date_1(String end_date_1) { + this.end_date_1 = end_date_1; + } + + + public List getMenu_group_lines() { + return menu_group_lines; + } + + + public void setMenu_group_lines(List menu_group_lines) { + this.menu_group_lines = menu_group_lines; + } + + + public static long getSerialversionuid() { + return serialVersionUID; + } + + + public Rn_Menu_Group_Header(Long id, String menu_name, String description, boolean active, LocalDate start_date, + LocalDate end_date, String start_date_1, String end_date_1, List menu_group_lines) { + super(); + this.id = id; + this.menu_name = menu_name; + this.description = description; + this.active = active; + this.start_date = start_date; + this.end_date = end_date; + this.start_date_1 = start_date_1; + this.end_date_1 = end_date_1; + this.menu_group_lines = menu_group_lines; + } + +// public Rn_Menu_Group_Header(int id, String menu_name, String description, boolean active, LocalDate start_date, +// LocalDate end_date, List menu_group_lines) { +// super(); +// this.id = id; +// this.menu_name = menu_name; +// this.description = description; +// this.active = active; +// this.start_date = start_date; +// this.end_date = end_date; +// this.menu_group_lines = menu_group_lines; +// } +// +// public int getId() { +// return id; +// } +// +// public void setId(int id) { +// this.id = id; +// } +// +// public String getMenu_name() { +// return menu_name; +// } +// +// public void setMenu_name(String menu_name) { +// this.menu_name = menu_name; +// } +// +// public String getDescription() { +// return description; +// } +// +// public void setDescription(String description) { +// this.description = description; +// } +// +// public boolean getActive() { +// return active; +// } +// +// public void setActive(boolean active) { +// this.active = active; +// } +// +// public LocalDate getStart_date() { +// return start_date; +// } +// +// public void setStart_date(LocalDate start_date) { +// this.start_date = start_date; +// } +// +// public LocalDate getEnd_date() { +// return end_date; +// } +// +// public void setEnd_date(LocalDate end_date) { +// this.end_date = end_date; +// } +// +// public List getMenu_group_lines() { +// return menu_group_lines; +// } +// +// public void setMenu_group_lines(List menu_group_lines) { +// this.menu_group_lines = menu_group_lines; +// } +// +// public String getStart_date_1() { +// return start_date_1; +// } +// +// public void setStart_date_1(String start_date_1) { +// this.start_date_1 = start_date_1; +// } +// +// public String getEnd_date_1() { +// return end_date_1; +// } +// +// public void setEnd_date_1(String end_date_1) { +// this.end_date_1 = end_date_1; +// } +// +// +} diff --git a/backend/src/main/java/com/realnet/fnd/entity/Rn_Menu_Group_Line.java b/backend/src/main/java/com/realnet/fnd/entity/Rn_Menu_Group_Line.java new file mode 100644 index 0000000..f6bdbcd --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/entity/Rn_Menu_Group_Line.java @@ -0,0 +1,143 @@ +package com.realnet.fnd.entity; + +import org.springframework.data.annotation.Id; +import org.springframework.data.mongodb.core.mapping.Document; + +//import javax.persistence.Column; +//import javax.persistence.Entity; +//import javax.persistence.FetchType; +//import javax.persistence.GeneratedValue; +//import javax.persistence.GenerationType; +//import javax.persistence.Id; +//import javax.persistence.JoinColumn; +//import javax.persistence.ManyToOne; +//import javax.persistence.Table; + +import com.fasterxml.jackson.annotation.JsonBackReference; + +//@Entity +//@Table(name = "RN_MENU_GROUP_LINE") +// @Table(name = "rn_menu_group_line_1") +@Document +public class Rn_Menu_Group_Line extends Rn_Who_Columns { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + private String mongoid; +// @Id +// @GeneratedValue(strategy = GenerationType.IDENTITY) +// @Column(name = "ID") + private int id; + +// @Column(name = "MENU_ID") + private int menu_id; + + private String menu_name; + + + +// @Column(name = "NAME") + private String name; + +// @Column(name = "ACTIVE") + private boolean active; + + +// @Column(name = "SEQ") + private int seq; + +// @Column(name = "TYPE") + private String type; + + // line +// @ManyToOne(fetch = FetchType.LAZY, optional = false) +// @JoinColumn(name = "menu_group_header_id", nullable = false) +// @JsonBackReference + private Rn_Menu_Group_Header menu_group_header; + + public Rn_Menu_Group_Line() { + super(); + } + + public Rn_Menu_Group_Line(int id, String name, boolean active, int menu_id, + int seq, String type, Rn_Menu_Group_Header menu_group_header) { + super(); + this.id = id; + this.name = name; + this.active = active; + this.menu_id = menu_id; + this.seq = seq; + this.type = type; + this.menu_group_header = menu_group_header; + } + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public boolean getActive() { + return active; + } + + public void setActive(boolean active) { + this.active = active; + } + + + public int getMenu_id() { + return menu_id; + } + + public void setMenu_id(int menu_id) { + this.menu_id = menu_id; + } + + public int getSeq() { + return seq; + } + + public void setSeq(int seq) { + this.seq = seq; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Rn_Menu_Group_Header getMenu_group_header() { + return menu_group_header; + } + + public void setMenu_group_header(Rn_Menu_Group_Header menu_group_header) { + this.menu_group_header = menu_group_header; + } + + public String getMenu_name() { + return menu_name; + } + + public void setMenu_name(String menu_name) { + this.menu_name = menu_name; + } + + +} diff --git a/backend/src/main/java/com/realnet/fnd/entity/Rn_Menu_Register.java b/backend/src/main/java/com/realnet/fnd/entity/Rn_Menu_Register.java new file mode 100644 index 0000000..36a935c --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/entity/Rn_Menu_Register.java @@ -0,0 +1,113 @@ +package com.realnet.fnd.entity; + +import java.time.LocalDate; +import java.util.Date; + +import org.springframework.data.annotation.Id; + +//import javax.persistence.Column; +//import javax.persistence.Entity; +//import javax.persistence.GeneratedValue; +//import javax.persistence.GenerationType; +//import javax.persistence.Id; +//import javax.persistence.Table; +//import javax.persistence.Temporal; +//import javax.persistence.TemporalType; + +import com.fasterxml.jackson.annotation.JsonFormat; + +//@Entity +//@Table(name = "RN_MENU_REGISTER") +public class Rn_Menu_Register extends Rn_Who_Columns { + + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + private String mongoid; +// @Id +// @GeneratedValue(strategy = GenerationType.IDENTITY) +// @Column(name = "ID") + private int id; + +// @Column(name = "MAIN_MENU_NAME") + private String main_menu_name; + +// @Column(name = "MAIN_MENU_ACTION_NAME") + private String main_menu_action_name; + +// @Column(name = "MAIN_MENU_ICON") + private String main_menu_icon; + +// @Column(name = "ENABLE_FLAG") + private boolean enable_flag; + + // @DateTimeFormat(pattern = "dd/mm/yyyy") +// @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "MM/dd/yyyy") +// @Column(name = "END_DATE") + private LocalDate end_date; + + private String end_date_1; + + public Rn_Menu_Register() {} + + public boolean getEnable_flag() { + return enable_flag; + } + + public void setEnable_flag(boolean enable_flag) { + this.enable_flag = enable_flag; + } + + public LocalDate getEnd_date() { + return end_date; + } + + public void setEnd_date(LocalDate end_date) { + this.end_date = end_date; + } + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getMain_menu_name() { + return main_menu_name; + } + + public void setMain_menu_name(String main_menu_name) { + this.main_menu_name = main_menu_name; + } + + public String getMain_menu_action_name() { + return main_menu_action_name; + } + + public void setMain_menu_action_name(String main_menu_action_name) { + this.main_menu_action_name = main_menu_action_name; + } + + public String getMain_menu_icon() { + return main_menu_icon; + } + + public void setMain_menu_icon(String main_menu_icon) { + this.main_menu_icon = main_menu_icon; + } + + public String getEnd_date_1() { + return end_date_1; + } + + public void setEnd_date_1(String end_date_1) { + this.end_date_1 = end_date_1; + } + + +} diff --git a/backend/src/main/java/com/realnet/fnd/entity/Rn_Sub_Menu.java b/backend/src/main/java/com/realnet/fnd/entity/Rn_Sub_Menu.java new file mode 100644 index 0000000..79353e6 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/entity/Rn_Sub_Menu.java @@ -0,0 +1,107 @@ +package com.realnet.fnd.entity; + +import org.springframework.data.annotation.Id; +import org.springframework.data.mongodb.core.mapping.Document; + +//import javax.persistence.Column; +//import javax.persistence.Entity; +//import javax.persistence.FetchType; +//import javax.persistence.GeneratedValue; +//import javax.persistence.GenerationType; +//import javax.persistence.Id; +//import javax.persistence.JoinColumn; +//import javax.persistence.ManyToOne; +//import javax.persistence.Table; + +import com.fasterxml.jackson.annotation.JsonBackReference; + +import lombok.Data; + +//@Entity +//@Table(name = "RN_SUB_MENU") +@Document +@Data +public class Rn_Sub_Menu extends Rn_Who_Columns { + /** + * + */ + private static final long serialVersionUID = 1L; + @Id + private String mongoid; +// @Id +// @GeneratedValue(strategy = GenerationType.IDENTITY) +// @Column(name = "ID") + private Integer id; + +// @Column(name = "SUB_MENU_NAME") + private String sub_menu_name; + +// @Column(name = "SUB_MENU_ICON") + private String sub_menu_icon; + +// @Column(name = "SUB_MENU_ACTION_LINK") + private String sub_menu_action_link; + +// @ManyToOne(fetch = FetchType.LAZY, optional = false) +// @JoinColumn(name = "MAIN_MENU_ID") +// @JsonBackReference + private Rn_Main_Menu rn_main_menu; + + public Rn_Sub_Menu() { + super(); + } + + + + public Rn_Sub_Menu(Integer id, String sub_menu_name, String sub_menu_icon, String sub_menu_action_link, + Rn_Main_Menu rn_main_menu) { + super(); + this.id = id; + this.sub_menu_name = sub_menu_name; + this.sub_menu_icon = sub_menu_icon; + this.sub_menu_action_link = sub_menu_action_link; + this.rn_main_menu = rn_main_menu; + } + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getSub_menu_name() { + return sub_menu_name; + } + + public void setSub_menu_name(String sub_menu_name) { + this.sub_menu_name = sub_menu_name; + } + + public String getSub_menu_icon() { + return sub_menu_icon; + } + + public void setSub_menu_icon(String sub_menu_icon) { + this.sub_menu_icon = sub_menu_icon; + } + + public String getSub_menu_action_link() { + return sub_menu_action_link; + } + + public void setSub_menu_action_link(String sub_menu_action_link) { + this.sub_menu_action_link = sub_menu_action_link; + } + + public Rn_Main_Menu getRn_main_menu() { + return rn_main_menu; + } + + public void setRn_main_menu(Rn_Main_Menu rn_main_menu) { + this.rn_main_menu = rn_main_menu; + } + + +} diff --git a/backend/src/main/java/com/realnet/fnd/entity/Rn_Who_AccId_Column.java b/backend/src/main/java/com/realnet/fnd/entity/Rn_Who_AccId_Column.java new file mode 100644 index 0000000..f182e07 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/entity/Rn_Who_AccId_Column.java @@ -0,0 +1,81 @@ +package com.realnet.fnd.entity; + +import java.io.Serializable; +import java.util.Date; + +//import javax.persistence.Column; +//import javax.persistence.EntityListeners; +//import javax.persistence.MappedSuperclass; +//import javax.persistence.Temporal; +//import javax.persistence.TemporalType; + +import org.springframework.data.annotation.CreatedDate; +import org.springframework.data.annotation.LastModifiedDate; +//import org.springframework.data.jpa.domain.support.AuditingEntityListener; + +//@MappedSuperclass +//@EntityListeners(AuditingEntityListener.class) +public class Rn_Who_AccId_Column implements Serializable { + private static final long serialVersionUID = 1L; + +// @Temporal(TemporalType.TIMESTAMP) +// @Column(name = "CREATED_AT", nullable = false, updatable = false) +// @CreatedDate + private Date createdAt; + + // @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime createdAt; + +// @Temporal(TemporalType.TIMESTAMP) +// @Column(name = "UPDATED_AT", nullable = false) +// @LastModifiedDate + private Date updatedAt; + +// @Column(name = "CREATED_BY", updatable = false) + private Long createdBy; + +// @Column(name = "UPDATED_BY") + private Long updatedBy; + +// @Column(name = "ACCOUNT_ID") + private Long accountId; + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Long getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(Long createdBy) { + this.createdBy = createdBy; + } + + public Long getUpdatedBy() { + return updatedBy; + } + + public void setUpdatedBy(Long updatedBy) { + this.updatedBy = updatedBy; + } + + public Long getAccountId() { + return accountId; + } + + public void setAccountId(Long accountId) { + this.accountId = accountId; + } +} diff --git a/backend/src/main/java/com/realnet/fnd/entity/Rn_Who_Columns.java b/backend/src/main/java/com/realnet/fnd/entity/Rn_Who_Columns.java new file mode 100644 index 0000000..0b9e237 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/entity/Rn_Who_Columns.java @@ -0,0 +1,65 @@ +package com.realnet.fnd.entity; + +import java.io.Serializable; +import java.util.Date; + +//import javax.persistence.Column; +//import javax.persistence.EntityListeners; +//import javax.persistence.MappedSuperclass; +//import javax.persistence.Temporal; +//import javax.persistence.TemporalType; + +import org.springframework.data.annotation.CreatedDate; +import org.springframework.data.annotation.LastModifiedDate; +//import org.springframework.data.jpa.domain.support.AuditingEntityListener; + +//@MappedSuperclass +//@EntityListeners(AuditingEntityListener.class) +public class Rn_Who_Columns implements Serializable { + private static final long serialVersionUID = 1L; + +// @Temporal(TemporalType.TIMESTAMP) +// @Column(name = "CREATED_AT", nullable = false, updatable = false) +// @CreatedDate + private Date createdAt; +// @Temporal(TemporalType.TIMESTAMP) +// @Column(name = "UPDATED_AT", nullable = false) +// @LastModifiedDate + private Date updatedAt; +// @Column(name = "CREATED_BY", updatable = false) + private Long createdBy; +// @Column(name = "UPDATED_BY") + private Long updatedBy; + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Long getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(Long createdBy) { + this.createdBy = createdBy; + } + + public Long getUpdatedBy() { + return updatedBy; + } + + public void setUpdatedBy(Long updatedBy) { + this.updatedBy = updatedBy; + } +} diff --git a/backend/src/main/java/com/realnet/fnd/entity/SingleSerise.java b/backend/src/main/java/com/realnet/fnd/entity/SingleSerise.java new file mode 100644 index 0000000..10ade6b --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/entity/SingleSerise.java @@ -0,0 +1,16 @@ +package com.realnet.fnd.entity; + +import java.math.BigDecimal; + +import lombok.Data; + +@Data +public class SingleSerise { + private String name; + private BigDecimal value; + + public SingleSerise( String name, BigDecimal value){ + this.name = name; + this.value = value; + } +} diff --git a/backend/src/main/java/com/realnet/fnd/entity/Success.java b/backend/src/main/java/com/realnet/fnd/entity/Success.java new file mode 100644 index 0000000..4061bc0 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/entity/Success.java @@ -0,0 +1,41 @@ +package com.realnet.fnd.entity; + +import java.io.Serializable; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + +@JsonIgnoreProperties({ "hibernateLazyInitializer", "handler" }) +public class Success implements Serializable { + + private static final long serialVersionUID = 1L; + + private String message; + + private String title; + + public String getMessage () + { + return message; + } + + public void setMessage (String message) + { + this.message = message; + } + + public String getTitle () + { + return title; + } + + public void setTitle (String title) + { + this.title = title; + } + + @Override + public String toString() + { + return "ClassPojo [message = "+message+", title = "+title+"]"; + } +} \ No newline at end of file diff --git a/backend/src/main/java/com/realnet/fnd/entity/SuccessPojo.java b/backend/src/main/java/com/realnet/fnd/entity/SuccessPojo.java new file mode 100644 index 0000000..df220bb --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/entity/SuccessPojo.java @@ -0,0 +1,36 @@ +package com.realnet.fnd.entity; + +import java.io.Serializable; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + +@JsonIgnoreProperties({ "hibernateLazyInitializer", "handler" }) +public class SuccessPojo implements Serializable { + + private static final long serialVersionUID = 1L; + + private Success success; + + public SuccessPojo() { + + } + + public SuccessPojo(Success success) { + this.success = success; + } + + + public Success getSuccess() { + return success; + } + + public void setSuccess(Success success) { + this.success = success; + } + + @Override + public String toString() + { + return "ClassPojo [success = "+success+"]"; + } +} \ No newline at end of file diff --git a/backend/src/main/java/com/realnet/fnd/entity/Version.java b/backend/src/main/java/com/realnet/fnd/entity/Version.java new file mode 100644 index 0000000..95cb5c0 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/entity/Version.java @@ -0,0 +1,32 @@ +package com.realnet.fnd.entity; + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.session.entity.VersionModel; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiResponse; +import io.swagger.annotations.ApiResponses; + +@RestController +@RequestMapping(value = "/version", produces = { "application/json" }) +@Api(tags = {"Common"}) +public class Version { + @ApiOperation(value = "Gets the version of the REST API", notes = "", response = VersionModel.class) + @ApiResponses(value = { @ApiResponse(code = 200, message = "Returns the version info for the REST API.", response = VersionModel.class) }) + @RequestMapping( method = RequestMethod.GET) + public VersionModel getVersion() { + //Authentication ath = SecurityContextHolder.getContext().getAuthentication(); + //TokenUser usr = (TokenUser)ath.getDetails(); + //String customerId = usr.getUser().getCustomerId() + VersionModel r = new VersionModel(); + r.setVersion("1.0.0"); + r.setMajor(1); + r.setMinor(0); + r.setPatch(0); + return r; + } +} diff --git a/backend/src/main/java/com/realnet/fnd/entity/WireFrameCopyDTO.java b/backend/src/main/java/com/realnet/fnd/entity/WireFrameCopyDTO.java new file mode 100644 index 0000000..36b5d34 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/entity/WireFrameCopyDTO.java @@ -0,0 +1,18 @@ +package com.realnet.fnd.entity; + +import lombok.Data; + +@Data +public class WireFrameCopyDTO { + private int from_projectId; + private int from_moduleId; + private int from_WireFrameId; + private String to_uiName; + + public WireFrameCopyDTO() { + super(); + } + + + +} diff --git a/backend/src/main/java/com/realnet/fnd/entity/projectCopyDTO.java b/backend/src/main/java/com/realnet/fnd/entity/projectCopyDTO.java new file mode 100644 index 0000000..a04cae9 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/entity/projectCopyDTO.java @@ -0,0 +1,12 @@ +package com.realnet.fnd.entity; + +import lombok.Data; + +@Data +public class projectCopyDTO { + private int from_projectId; + private String to_projectName; + private String to_tech_stack; + + +} diff --git a/backend/src/main/java/com/realnet/fnd/entity1/ExtensionModel.java b/backend/src/main/java/com/realnet/fnd/entity1/ExtensionModel.java new file mode 100644 index 0000000..0fa764e --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/entity1/ExtensionModel.java @@ -0,0 +1,47 @@ +package com.realnet.fnd.entity1; + + + +import lombok.Data; + +@Data +public class ExtensionModel { + + + + private String ext1; + private String ext2; + private String ext3; + private String ext4; + private String ext5; + private String ext6; + private String ext7; + private String ext8; + private String ext9; + private String ext10; + +// @Column(length = 4000) + private String bigext1; + +// @Column(length = 4000) + private String bigext2; + +// @Column(length = 4000) + private String bigext3; + +// @Column(length = 4000) + private String bigext4; + +// @Column(length = 4000) + private String bigext5; + + private String flex1; + private String flex2; + + private String flex3; + private String flex4; + private String flex5; + + + +} diff --git a/backend/src/main/java/com/realnet/fnd/entity1/GrpMenuAccess.java b/backend/src/main/java/com/realnet/fnd/entity1/GrpMenuAccess.java new file mode 100644 index 0000000..2350b44 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/entity1/GrpMenuAccess.java @@ -0,0 +1,93 @@ +package com.realnet.fnd.entity1; + + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +// +//import javax.persistence.CascadeType; +//import javax.persistence.Column; +//import javax.persistence.Entity; +//import javax.persistence.Id; +//import javax.persistence.IdClass; +//import javax.persistence.JoinColumn; +//import javax.persistence.ManyToOne; +//import javax.persistence.OneToMany; +//import javax.persistence.Table; +//import javax.persistence.Transient; + +import org.springframework.data.mongodb.core.mapping.Document; + +import com.realnet.users.entity1.AppUserRole; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; + +//@Entity +//@Table(name="SEC_GRP_MENU_ACCESS") +//@IdClass(GrpMenuAccesscompositeKey.class) +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@ToString +@Document +public class GrpMenuAccess { +// @Id +// @ManyToOne +// @JoinColumn(name = "usr_grp") + private AppUserRole usrGrp; +// @Id +// @ManyToOne +// @JoinColumn(name = "menu_item_id") + private MenuDet menuItemId; + private String mCreate; + private String mEdit; + private String mQuery; + private String mDelete; + private String mexport; + + + private Long menuId; + private String mVisible; + private String createby; + private Date createdAt; + private String updateby; + private Date updatedAt; + + private String isdisable; + + +// @Column(name = "itemSeq") + private Long itemSeq; + +// @Column(name = "MenuItemDesc") + private String menuItemDesc; + private String status; + + +// @Column(name = "moduleName") + private String moduleName; + + + +// @Column(name = "MainMenuActionName") + private String main_menu_action_name; + +// @Column(name = "MainMenuIconName") + private String main_menu_icon_name; + +// @Transient + private List subMenus=new ArrayList(); + + +// @Transient + private Long grpid; +// @Transient + private Long gmenuid; + + +} diff --git a/backend/src/main/java/com/realnet/fnd/entity1/GrpMenuAccesscompositeKey.java b/backend/src/main/java/com/realnet/fnd/entity1/GrpMenuAccesscompositeKey.java new file mode 100644 index 0000000..5fedd4e --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/entity1/GrpMenuAccesscompositeKey.java @@ -0,0 +1,25 @@ +package com.realnet.fnd.entity1; + +import java.io.Serializable; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +@Data +@Getter +@Setter +@EqualsAndHashCode +@AllArgsConstructor +@NoArgsConstructor +public class GrpMenuAccesscompositeKey implements Serializable{ + /** + * + */ + private static final long serialVersionUID = 1L; + private Long menuItemId; + private Long usrGrp; +} diff --git a/backend/src/main/java/com/realnet/fnd/entity1/MIXMENUN.java b/backend/src/main/java/com/realnet/fnd/entity1/MIXMENUN.java new file mode 100644 index 0000000..2334163 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/entity1/MIXMENUN.java @@ -0,0 +1,33 @@ +package com.realnet.fnd.entity1; + +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.List; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; + +@Data +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@ToString +public class MIXMENUN { + private long menuItemId; + private String menuItemDesc; + private long menuId; + + private String mainMenuActionName; + private String mainMenuIconName; + private String mCreate; + private String mEdit; + private String mQuery; + private String mDelete; + private String mVisible; + private List subMenus; +} diff --git a/backend/src/main/java/com/realnet/fnd/entity1/MenuDet.java b/backend/src/main/java/com/realnet/fnd/entity1/MenuDet.java new file mode 100644 index 0000000..7c08512 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/entity1/MenuDet.java @@ -0,0 +1,86 @@ +package com.realnet.fnd.entity1; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +//import javax.persistence.Column; +//import javax.persistence.Entity; +//import javax.persistence.FetchType; +//import javax.persistence.GeneratedValue; +//import javax.persistence.GenerationType; +//import javax.persistence.Id; +//import javax.persistence.JoinColumn; +//import javax.persistence.ManyToOne; +//import javax.persistence.Table; +//import javax.persistence.Temporal; +//import javax.persistence.TemporalType; +//import javax.persistence.Transient; + +import org.springframework.data.annotation.CreatedDate; +import org.springframework.data.annotation.Id; +import org.springframework.data.annotation.LastModifiedDate; +import org.springframework.data.mongodb.core.mapping.Document; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; + +//@Entity +//@Table(name = "SEC_MENU_DET") +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@ToString +@Document +public class MenuDet extends menudet_who{ + + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + private String mongoid; + +// @Id +// @GeneratedValue(strategy = GenerationType.AUTO) + private Long menuItemId; + +// @Column(name = "itemSeq") + private Long itemSeq; + +// @Column(name = "MenuItemDesc") + private String menuItemDesc; + private String status; + + private Long menuId; + +// @Column(name = "moduleName") + private String moduleName; + + + + + +// @Column(name = "MainMenuActionName") + private String main_menu_action_name; + +// @Column(name = "MainMenuIconName") + private String main_menu_icon_name; + +// @Transient + private List subMenus=new ArrayList();; + + + + + + +} diff --git a/backend/src/main/java/com/realnet/fnd/entity1/MixMenu.java b/backend/src/main/java/com/realnet/fnd/entity1/MixMenu.java new file mode 100644 index 0000000..72a0ee9 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/entity1/MixMenu.java @@ -0,0 +1,37 @@ +package com.realnet.fnd.entity1; + +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.List; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; + +@Data +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@ToString +public class MixMenu { +// private BigDecimal menuItemId; + private BigInteger menuItemId; + + private String menuItemDesc; +// private BigDecimal menuId; + private BigInteger menuId; + + + private String mainMenuActionName; + private String mainMenuIconName; + private String mCreate; + private String mEdit; + private String mQuery; + private String mDelete; + private String mVisible; + private List subMenus; +} diff --git a/backend/src/main/java/com/realnet/fnd/entity1/MixMenuNew.java b/backend/src/main/java/com/realnet/fnd/entity1/MixMenuNew.java new file mode 100644 index 0000000..72fcedd --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/entity1/MixMenuNew.java @@ -0,0 +1,17 @@ +package com.realnet.fnd.entity1; + +import java.math.BigDecimal; + +public interface MixMenuNew { + + BigDecimal getmenu_item_id(); + String getmenu_item_desc(); + BigDecimal getmenu_id(); + String getm_create(); + String getmain_menu_action_name(); + String getmain_menu_icon_name(); + String getm_edit(); + String getm_query(); + String getm_delete(); + String getm_visible(); +} diff --git a/backend/src/main/java/com/realnet/fnd/entity1/menudet_who.java b/backend/src/main/java/com/realnet/fnd/entity1/menudet_who.java new file mode 100644 index 0000000..28e0e99 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/entity1/menudet_who.java @@ -0,0 +1,46 @@ +package com.realnet.fnd.entity1; + +import java.io.Serializable; +import java.util.Date; +//import javax.persistence.Column; +//import javax.persistence.EntityListeners; +//import javax.persistence.MappedSuperclass; +//import javax.persistence.Temporal; +//import javax.persistence.TemporalType; +import org.springframework.data.annotation.CreatedDate; +import org.springframework.data.annotation.LastModifiedDate; +//import org.springframework.data.jpa.domain.support.AuditingEntityListener; + +import lombok.Data; + +@Data +//@MappedSuperclass +//@EntityListeners(AuditingEntityListener.class) +public class menudet_who implements Serializable{ + + private static final long serialVersionUID = 1L; + +// @Temporal(TemporalType.TIMESTAMP) +// @Column(name = "CREATED_AT", nullable = false, updatable = false) +// @CreatedDate + private Date createdAt; + + // @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime createdAt; + + +// @Column(name = "CREATED_BY", updatable = false) +// private Long createdBy; + +// @Column(name = "UPDATED_BY") +// private Long updatedBy; + +// @Temporal(TemporalType.TIMESTAMP) +// @Column(name = "UPDATED_AT", nullable = false) +// @LastModifiedDate + private Date updatedAt; + +// @Column(name = "ACCOUNT_ID") +// private Long accountId; + + +} diff --git a/backend/src/main/java/com/realnet/fnd/repository/ExtFieldRepository.java b/backend/src/main/java/com/realnet/fnd/repository/ExtFieldRepository.java new file mode 100644 index 0000000..d4d7cef --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/repository/ExtFieldRepository.java @@ -0,0 +1,28 @@ +package com.realnet.fnd.repository; + +import java.util.List; +import java.util.Optional; + +// +//import org.springframework.data.jpa.repository.JpaRepository; +//import org.springframework.data.jpa.repository.Query; +import org.springframework.data.mongodb.repository.MongoRepository; +import org.springframework.data.mongodb.repository.Query; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Repository; + +import com.realnet.fnd.entity.Rn_Ext_Fields; + +@Repository +public interface ExtFieldRepository extends MongoRepository { + +// @Query(value= "SELECT * FROM rn_ext_field_t WHERE ACCOUNT_ID=:acc_id AND FORM_CODE=:f_code" , nativeQuery = true) + + @Query("{'account_id': ?0, 'form_code': ?1}") + List getExtensionFieldByFormCode(@Param("acc_id")String accountId, @Param("f_code") String form_code); + + @Query("{'id': ?0}") + Optional findById(int id); + +// boolean existsById(int id); +} diff --git a/backend/src/main/java/com/realnet/fnd/repository/LookUpRepository.java b/backend/src/main/java/com/realnet/fnd/repository/LookUpRepository.java new file mode 100644 index 0000000..45ff162 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/repository/LookUpRepository.java @@ -0,0 +1,22 @@ +package com.realnet.fnd.repository; + +import java.util.List; + + +import org.springframework.data.mongodb.repository.MongoRepository; +import org.springframework.data.mongodb.repository.Query; +import org.springframework.stereotype.Repository; + +import com.realnet.fnd.entity.Rn_Lookup_Values; + +@Repository +public interface LookUpRepository extends MongoRepository { + +// @Query(value = "SELECT LOOKUP_CODE FROM RN_LOOKUP_VALUES_T WHERE LOOKUP_TYPE ='Form_ext'" , nativeQuery = true) + @Query("{'LOOKUP_TYPE': Form_ext}") + List getLookupValues(); + +// @Query(value = "SELECT LOOKUP_CODE FROM RN_LOOKUP_VALUES_T WHERE LOOKUP_TYPE ='DataType'" , nativeQuery = true) + @Query("{'LOOKUP_TYPE': LOOKUP_TYPE}") + List getDataTypeValues(); +} diff --git a/backend/src/main/java/com/realnet/fnd/repository/RnGroupLineRepository.java b/backend/src/main/java/com/realnet/fnd/repository/RnGroupLineRepository.java new file mode 100644 index 0000000..dbc3cf9 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/repository/RnGroupLineRepository.java @@ -0,0 +1,19 @@ +package com.realnet.fnd.repository; + +import java.util.List; +import java.util.Optional; + +import org.springframework.data.mongodb.repository.MongoRepository; +import org.springframework.data.mongodb.repository.Query; + +import com.realnet.fnd.entity.Rn_Menu_Group_Header; +import com.realnet.fnd.entity.Rn_Menu_Group_Line; + +public interface RnGroupLineRepository extends MongoRepository { + + @Query("{'id': ?0}") + Optional findById(int id); + +// public List findByHeader(Rn_Menu_Group_Header menu_group_header); + +} diff --git a/backend/src/main/java/com/realnet/fnd/repository/Rn_DynamicTransactionRepository.java b/backend/src/main/java/com/realnet/fnd/repository/Rn_DynamicTransactionRepository.java new file mode 100644 index 0000000..81eab39 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/repository/Rn_DynamicTransactionRepository.java @@ -0,0 +1,38 @@ +package com.realnet.fnd.repository; + +import java.util.List; +import java.util.Optional; + +import org.springframework.data.mongodb.repository.MongoRepository; +import org.springframework.data.mongodb.repository.Query; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Repository; + +import com.realnet.fnd.entity.Rn_Dynamic_Transaction; + +@Repository +public interface Rn_DynamicTransactionRepository extends MongoRepository { + + // JPQL + // @Query("SELECT e from RN_DYNAMIC_TRANSACTION e where e.FORM_ID =:form_id") + // @Query("SELECT e from RN_DYNAMIC_TRANSACTION e where e.FORM_ID =:form_id AND e.ID =:id") + + // NATIVE + // @Query(value = "SELECT * FROM RN_DYNAMIC_TRANSACTION WHERE FORM_ID =:form_id", nativeQuery = true) + // @Query(value = "SELECT * FROM RN_DYNAMIC_TRANSACTION WHERE ID =:id ANDFORM_ID =:form_id" , nativeQuery = true) + +// @Query(value = "SELECT * FROM rn_dynamic_transaction WHERE FORM_ID =:form_id", nativeQuery = true) + @Query("{'form_id': ?0}") + List findByFormId(@Param("form_id") int form_id); + +// @Query(value = "SELECT * FROM rn_dynamic_transaction WHERE ID =:id AND FORM_ID =:form_id", nativeQuery = true) + @Query("{'id': ?0, 'form_id': ?1}") + Optional findByIdAndFormId(@Param("id") int id, @Param("form_id") int form_id); + +// @Query("{'id': ?0}") +// boolean existsById(int id); + + @Query("{'id': ?0}") + Optional findById(int id); + +} diff --git a/backend/src/main/java/com/realnet/fnd/repository/Rn_Forms_Setup_Repository.java b/backend/src/main/java/com/realnet/fnd/repository/Rn_Forms_Setup_Repository.java new file mode 100644 index 0000000..291bbc3 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/repository/Rn_Forms_Setup_Repository.java @@ -0,0 +1,29 @@ +package com.realnet.fnd.repository; + +import java.util.List; +import java.util.Optional; + +import org.springframework.data.mongodb.repository.MongoRepository; +import org.springframework.data.mongodb.repository.Query; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Repository; + +import com.realnet.fnd.entity.Rn_Forms_Setup; + +@Repository +public interface Rn_Forms_Setup_Repository extends MongoRepository { + + // JPQL: @Query("SELECT e from RN_FORMS_SETUP_T e where e.FORM_ID =:form_id") + // NATIVE : @Query(value = "SELECT * FROM RN_FORMS_SETUP_T WHERE FORM_ID=:form_id" , nativeQuery = true) + +// @Query(value = "SELECT * FROM RN_FORMS_SETUP_T WHERE FORM_ID=:form_id", nativeQuery = true) + @Query("{'form_id': ?0}") + List findByFormId(@Param("form_id") int form_id); + + @Query("{'id': ?0}") + Optional findById(int id); + + // @Query(value = "SELECT * FROM RN_DYNAMIC_TRANSACTION WHERE FORM_ID=:form_id", + // nativeQuery = true) + // Optional findByFormId(@Param("form_id") int form_id); +} diff --git a/backend/src/main/java/com/realnet/fnd/repository/Rn_Function_Register_Repository.java b/backend/src/main/java/com/realnet/fnd/repository/Rn_Function_Register_Repository.java new file mode 100644 index 0000000..85d8d91 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/repository/Rn_Function_Register_Repository.java @@ -0,0 +1,28 @@ +package com.realnet.fnd.repository; + +import java.util.List; +import java.util.Optional; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; + +import org.springframework.data.mongodb.repository.MongoRepository; +import org.springframework.data.mongodb.repository.Query; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Repository; + +import com.realnet.fnd.entity.Rn_Function_Register; + +@Repository +public interface Rn_Function_Register_Repository extends MongoRepository { + // for pagination + Page findAll(Pageable p); + +// @Query(value = "SELECT * FROM RN_FUNC_REGISTER WHERE MENU_ID =:menu_id" , nativeQuery = true) + @Query("{'menu_id': ?0}") + List findByMenuId(@Param("menu_id") int menu_id); + + @Query("{'id': ?0}") + Optional findById(int id); + +} diff --git a/backend/src/main/java/com/realnet/fnd/repository/Rn_InstanceTypeRepository.java b/backend/src/main/java/com/realnet/fnd/repository/Rn_InstanceTypeRepository.java new file mode 100644 index 0000000..8241c17 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/repository/Rn_InstanceTypeRepository.java @@ -0,0 +1,12 @@ +package com.realnet.fnd.repository; + + +import org.springframework.data.mongodb.repository.MongoRepository; +import org.springframework.stereotype.Repository; + +import com.realnet.fnd.entity.Rn_Instance_Type; + +@Repository +public interface Rn_InstanceTypeRepository extends MongoRepository { + +} diff --git a/backend/src/main/java/com/realnet/fnd/repository/Rn_LookUpRepository.java b/backend/src/main/java/com/realnet/fnd/repository/Rn_LookUpRepository.java new file mode 100644 index 0000000..5a823bb --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/repository/Rn_LookUpRepository.java @@ -0,0 +1,33 @@ +package com.realnet.fnd.repository; + +import java.io.IOException; +import java.util.List; + +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.data.mongodb.repository.MongoRepository; +import org.springframework.data.mongodb.repository.Query; +import org.springframework.stereotype.Repository; + +import com.realnet.fnd.entity.Rn_Lookup_Values; + +@Repository +public interface Rn_LookUpRepository extends MongoRepository { + // for pagination + Page findAll(Pageable p); + +// @Query(value = "SELECT LOOKUP_CODE FROM RN_LOOKUP_VALUES_T WHERE LOOKUP_TYPE ='Form_ext'" , nativeQuery = true) + @Query("{'LOOKUP_TYPE': Form_ext}") + List findLookupValues(); + +// @Query(value = "SELECT LOOKUP_CODE FROM RN_LOOKUP_VALUES_T WHERE LOOKUP_TYPE ='DataType'" , nativeQuery = true) + @Query("{'LOOKUP_TYPE': DataType}") + List findDataTypeValues(); + +// @Query(value = "SELECT * FROM RN_LOOKUP_VALUES_T WHERE LOOKUP_TYPE ='Form_ext'" , nativeQuery = true) + @Query("{'LOOKUP_TYPE': Form_ext}") + List findExtensions(); + +} diff --git a/backend/src/main/java/com/realnet/fnd/repository/Rn_Main_Menu_Repository.java b/backend/src/main/java/com/realnet/fnd/repository/Rn_Main_Menu_Repository.java new file mode 100644 index 0000000..f825318 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/repository/Rn_Main_Menu_Repository.java @@ -0,0 +1,28 @@ +package com.realnet.fnd.repository; + +import java.util.List; +import java.util.Optional; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.mongodb.repository.MongoRepository; +import org.springframework.data.mongodb.repository.Query; +//import org.springframework.data.jpa.repository.JpaRepository; +//import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Repository; + +import com.realnet.fnd.entity.Rn_Main_Menu; + +@Repository +public interface Rn_Main_Menu_Repository extends MongoRepository { + // for pagination + Page findAll(Pageable p); + +// @Query(value = "SELECT * FROM RN_MAIN_MENU WHERE ACCOUNT_ID =:acc_id" , nativeQuery = true) + @Query("{'acc_id': ?0}") + List findByAccountId(@Param("acc_id") String account_id); // accountId + + @Query("{'id': ?0}") + Optional findById(int id); +} diff --git a/backend/src/main/java/com/realnet/fnd/repository/Rn_Menu_Group_Repository.java b/backend/src/main/java/com/realnet/fnd/repository/Rn_Menu_Group_Repository.java new file mode 100644 index 0000000..fb647bd --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/repository/Rn_Menu_Group_Repository.java @@ -0,0 +1,22 @@ +package com.realnet.fnd.repository; + +import java.util.Optional; + +import org.springframework.data.mongodb.repository.MongoRepository; +import org.springframework.stereotype.Repository; + +import com.realnet.fnd.entity.Rn_Menu_Group_Header; + +@Repository +public interface Rn_Menu_Group_Repository extends MongoRepository { + + Optional findById(Long id); + + // JPQL: @Query("SELECT e from RN_FORMS_SETUP_T e where e.FORM_ID =:form_id") + // NATIVE : @Query(value = "SELECT * FROM RN_FORMS_SETUP_T WHERE FORM_ID=:form_id" , nativeQuery = true) + +// @Query(value = "SELECT * FROM RN_FORMS_SETUP_T WHERE FORM_ID=:form_id", nativeQuery = true) +// List findByFormId(@Param("form_id") int form_id); + + +} diff --git a/backend/src/main/java/com/realnet/fnd/repository/Rn_Menu_Register_Repository.java b/backend/src/main/java/com/realnet/fnd/repository/Rn_Menu_Register_Repository.java new file mode 100644 index 0000000..658f440 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/repository/Rn_Menu_Register_Repository.java @@ -0,0 +1,27 @@ +package com.realnet.fnd.repository; + +import java.util.List; +import java.util.Optional; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; + +import org.springframework.data.mongodb.repository.MongoRepository; +import org.springframework.data.mongodb.repository.Query; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Repository; + +import com.realnet.fnd.entity.Rn_Menu_Register; + +@Repository +public interface Rn_Menu_Register_Repository extends MongoRepository { + // for pagination + Page findAll(Pageable p); + +// @Query(value = "SELECT * FROM RN_MENU_REGISTER WHERE ACCOUNT_ID =:acc_id" , nativeQuery = true) + @Query("{'account_id': ?0}") + List findByAccountId(@Param("acc_id") String account_id); // accountId + + @Query("{'id': ?0}") + Optional findById(int id); +} diff --git a/backend/src/main/java/com/realnet/fnd/repository1/GrpMenuAccessRepository.java b/backend/src/main/java/com/realnet/fnd/repository1/GrpMenuAccessRepository.java new file mode 100644 index 0000000..19e59a1 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/repository1/GrpMenuAccessRepository.java @@ -0,0 +1,139 @@ +package com.realnet.fnd.repository1; + +import java.util.List; +import java.util.Optional; + +import org.springframework.data.mongodb.repository.MongoRepository; +import org.springframework.data.mongodb.repository.Query; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Repository; + +import com.realnet.fnd.entity1.GrpMenuAccess; +import com.realnet.fnd.entity1.GrpMenuAccesscompositeKey; + +@Repository +public interface GrpMenuAccessRepository extends MongoRepository { + +// @Query(value="SELECT * FROM sec_grp_menu_access a where a.usr_grp= ?1", nativeQuery = true) + @Query("{'usr_grp': ?0}") + GrpMenuAccess findByUsrGrp(Long usr_grp); + +// @Query(value="SELECT * FROM sec_grp_menu_access a where a.usr_grp= ?1 ORDER BY item_seq", nativeQuery = true) + @Query("{'usr_grp': ?0}") + List findAllByUsrGrp(Long usr_grp); + +// @Query(value="SELECT * FROM sec_grp_menu_access a where a.menu_item_id=?1",nativeQuery = true) + @Query("{'menu_item_id': ?0}") + GrpMenuAccess findbymenuitemid(Long menu_item_id); + +// @Query(value="SELECT * FROM sec_grp_menu_access where child = 0 ", nativeQuery = true) + @Query("{'child': 0}") + List findAllRoots(); + +// @Query(value="SELECT * FROM sec_grp_menu_access a where a.child=:parent", nativeQuery = true) + @Query("{'parent': ?0}") + List findAllSubmenu(@Param("parent") Long parent); +// @Query(value="SELECT * FROM sec_grp_menu_access a where a.parent=:parent", nativeQuery = true) +// GrpMenuAccess findById(@Param("parent") Long parent); + +// @Query(value="SELECT * FROM sec_grp_menu_access where child = 0 and created_for =:created_for ", nativeQuery = true) +// List findAllRootsbyusrGrp(@Param("created_for") Long created_for); + +// @Query(value="SELECT * FROM sec_grp_menu_access where child = 0 and usr_grp =:usr_grp ", nativeQuery = true) + @Query("{'usr_grp': ?0}") + List findAllRootsbyusrGrp(@Param("usr_grp") Long usr_grp); + +//// @Query(value="SELECT * FROM sec_grp_menu_access where menu_id = 0 and status= 'Enable' and usr_grp =:usr_grp ORDER BY item_seq;", nativeQuery = true) +// @Query("{'menu_id': ?0, 'status': Enable}") +// List findAllRootsByMenuId(@Param("usr_grp") Long usr_grp); + + @Query("{'menu_id': 0, 'status': 'Enable', 'usr_grp': ?0}") + List findAllRootsByMenuId(Long usr_grp); +// +//// @Query(value="SELECT * FROM sec_grp_menu_access a where a.menu_id=:menu_item_id and a.usr_grp =:usr_grp ORDER BY item_seq", nativeQuery = true) +// List findAllSubmenuByMenuId(@Param("menu_item_id") Long menu_item_id,@Param("usr_grp") Long usr_grp); +// +//// @Query(value="SELECT * FROM sec_grp_menu_access a where a.status= 'Enable' and a.menu_id=:menu_item_id and a.usr_grp =:usr_grp ORDER BY item_seq", nativeQuery = true) +// List findAllSubmenuByMenuIdWithStatus(@Param("menu_item_id") Long menu_item_id,@Param("usr_grp") Long usr_grp); +// +// +//// @Query(value="SELECT * FROM sec_grp_menu_access a where a.menu_item_id=:menu_item_id", nativeQuery = true) +// GrpMenuAccess findById1(@Param("menu_item_id") Long menu_item_id); +// +//// @Query(value="SELECT * FROM sec_grp_menu_access a where a.menu_item_id=:menu_item_id", nativeQuery = true) +// List findlist(@Param("menu_item_id") Long menu_item_id); +// +//// @Query(value="SELECT * FROM sec_grp_menu_access a where a.menu_item_id=:menu_item_id && a.usr_grp =:usr_grp", nativeQuery = true) +// GrpMenuAccess findById2(@Param("menu_item_id") Long menu_item_id, @Param("usr_grp") Long usr_grp); +// +//// @Query(value="SELECT * FROM sec_grp_menu_access a where a.menu_item_id=:menu_item_id && a.usr_grp =:usr_grp", nativeQuery = true) +// Optional findbygrpandmenuid(@Param("menu_item_id") Long menu_item_id,@Param("usr_grp") Long usr_grp); +// +//// @Query(value="SELECT * FROM sec_grp_menu_access a where a.usr_grp =:usr_grp and a.menu_item_id=:menu_item_id", nativeQuery = true) +// List findById(@Param("usr_grp") Long usr_grp,@Param("menu_item_id") Long menu_item_id); +// +//// @Query(value="SELECT * FROM sec_grp_menu_access a where a.usr_grp =:usr_grp and a.menu_item_id=:menu_item_id", nativeQuery = true) +// GrpMenuAccess findSingle(@Param("usr_grp") Long usr_grp,@Param("menu_item_id") Long menu_item_id); +// +// +//// @Query(value="SELECT * FROM sec_grp_menu_access a where a.menu_item_id=:menu_item_id && a.usr_grp =:usr_grp", nativeQuery = true) +// GrpMenuAccess findByUsrgrpAndMenuitemid(@Param("menu_item_id") Long menu_item_id,@Param("usr_grp") Long usr_grp); +// +//// @Query(value="SELECT * FROM sec_grp_menu_access a where a.menu_item_id=:menu_item_id", nativeQuery = true) +// List findByGrpAndMenuid1(@Param("menu_item_id") Long menu_item_id); +// +//// @Query(value="SELECT * FROM sec_grp_menu_access a where a.menu_id = 0 && a.usr_grp =:usr_grp && a.menu_item_id=:menu_item_id ORDER BY item_seq;", nativeQuery = true) +// GrpMenuAccess findAllRootsByMenuIdAndGrp(@Param("menu_item_id") Long menu_item_id,@Param("usr_grp") Long usr_grp); +// +//// @Query(value="SELECT * FROM sec_grp_menu_access a where a.menu_id=:menu_item_id", nativeQuery = true) +// List findAllSubmenuByMenuitemid(@Param("menu_item_id") Long menu_item_id); +// +//// @Query(value="SELECT * FROM sec_grp_menu_access a where a.menu_id=:menu_item_id && a.usr_grp =:usr_grp ORDER BY item_seq", nativeQuery = true) +// List findAllSubmenuByMenuitemidAndUsrGrp(@Param("menu_item_id") Long menu_item_id,@Param("usr_grp") Long usr_grp); +// +//// @Query(value="SELECT * FROM sec_grp_menu_access a where a.menu_item_id=:menu_item_id", nativeQuery = true) +// List findAllById(@Param("menu_item_id") Long menu_item_id); + + @Query("{ 'menu_id': ?0, 'usrGrp': ?1 }") + List findAllSubmenuByMenuId(Long menuItemId, Long usrGrp); + + @Query("{ 'status': 'Enable', 'menu_id': ?0, 'usrGrp': ?1 }") + List findAllSubmenuByMenuIdWithStatus(Long menuItemId, Long usrGrp); + + @Query("{ 'menuItem_id': ?0 }") + GrpMenuAccess findById1(Long menuItemId); + + @Query("{ 'menuItem_id': ?0 }") + List findlist(Long menuItemId); + + @Query("{ 'menuItem_id': ?0, 'usrGrp': ?1 }") + GrpMenuAccess findById2(Long menuItemId, Long usrGrp); + + @Query("{ 'menuItem_id': ?0, 'usrGrp': ?1 }") + Optional findbygrpandmenuid(Long menuItemId, Long usrGrp); + + @Query("{ 'usrGrp': ?0, 'menuItem_id': ?1 }") + List findById(Long usrGrp, Long menuItemId); + + @Query("{ 'usrGrp': ?0, 'menuItem_id': ?1 }") + GrpMenuAccess findSingle(Long usrGrp, Long menuItemId); + + @Query("{ 'menuItem_id': ?0, 'usrGrp': ?1 }") + GrpMenuAccess findByUsrgrpAndMenuitemid(Long menuItemId, Long usrGrp); + + @Query("{ 'menuItem_id': ?0 }") + List findByGrpAndMenuid1(Long menuItemId); + + @Query("{ 'menu_id': 0, 'usrGrp': ?1, 'menuItem_id': ?0 }") + GrpMenuAccess findAllRootsByMenuIdAndGrp(Long menuItemId, Long usrGrp); + + @Query("{ 'menuItem_id': ?0 }") + List findAllSubmenuByMenuitemid(Long menuItemId); + + @Query("{ 'menu_id': ?0, 'usrGrp': ?1 }") + List findAllSubmenuByMenuitemidAndUsrGrp(Long menuItemId, Long usrGrp); + + @Query("{ 'menuItem_id': ?0 }") + List findAllById(Long menuItemId); + +} diff --git a/backend/src/main/java/com/realnet/fnd/repository1/MenuDetRepository.java b/backend/src/main/java/com/realnet/fnd/repository1/MenuDetRepository.java new file mode 100644 index 0000000..f03520c --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/repository1/MenuDetRepository.java @@ -0,0 +1,401 @@ +package com.realnet.fnd.repository1; + +import java.util.List; +import java.util.Optional; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; + +import org.springframework.data.mongodb.repository.MongoRepository; +import org.springframework.data.mongodb.repository.Query; +import org.springframework.data.repository.query.Param; +import org.springframework.stereotype.Repository; + +import com.realnet.fnd.entity1.GrpMenuAccess; +import com.realnet.fnd.entity1.MIXMENUN; +import com.realnet.fnd.entity1.MenuDet; +import com.realnet.fnd.entity1.MixMenuNew; +import com.realnet.users.entity.Role; +import com.realnet.users.entity1.AppUser; + +@Repository +public interface MenuDetRepository extends MongoRepository { +//// @Query(value="select a.menu_item_id,a.menu_item_desc, \n" +//// + " a.menu_id,b.m_create,b.m_visible,\n" +//// + " b.m_edit,b.m_query,b.m_delete\n" +//// + "from sec_menu_det a,sec_grp_menu_access b\n" +//// + "where b.menu_item_id=a.menu_item_id\n" +//// + "order by a.item_seq", +//// countQuery="select count(*) " +//// + "from sec_menu_det a,sec_grp_menu_access b\n" +//// + "where b.menu_item_id=a.menu_item_id\n" +//// + "order by a.item_seq",nativeQuery=true) +// Page getAll(Pageable page); +// +//// @Query(value="select a.menu_item_id,a.menu_item_desc, \n" +//// + " a.menu_id,b.m_create,b.m_visible,\n" +//// + " b.m_edit,b.m_query,b.m_delete\n" +//// + "from sec_menu_det a,sec_grp_menu_access b\n" +//// + "where b.menu_item_id=a.menu_item_id\n" +//// + "and b.usr_grp = ?1 " +//// + "and a.menu_id = ?2 " +//// + "order by a.item_seq",countQuery="select count(*) " +//// + "from sec_menu_det a,sec_grp_menu_access b\n" +//// + "where b.menu_item_id=a.menu_item_id\n" +//// + "and b.usr_grp = ?1 " +//// + "and a.menu_id = ?2 " +//// + "order by a.item_seq;" +//// ,nativeQuery = true) +// List getById(Long usr_grp,Long menu_id); +// +//// @Query(value="select a.menu_item_id,a.menu_item_desc,\n" +//// + " a.menu_id,b.m_create,b.m_visible,\n" +//// + " b.m_edit,b.m_query,b.m_delete,\n" +//// + " a.main_menu_action_name,a.main_menu_icon_name " +//// + "from sec_menu_det a,sec_grp_menu_access b\n" +//// + "where b.menu_item_id=a.menu_item_id\n" +//// + "and b.usr_grp = ?1\n" +//// + "and a.menu_id= ?2 " +//// + "order by a.item_seq", +//// countQuery="select count(*) " +//// + "from sec_menu_det a,sec_grp_menu_access b\n" +//// + "where b.menu_item_id=a.menu_item_id\n" +//// + "and b.usr_grp = ?1" +//// + "and a.menu_id= ?2 " +//// + "order by a.item_seq", +//// nativeQuery=true) +//// List getByUserId(Long usr_grp,Long menu_id); +// +// +//// @Query(value="select a.menu_item_id menu_item_id,a.menu_item_desc menu_item_desc,\n" +//// + " a.menu_id menu_id,b.m_create m_create,b.m_visible m_visible,\n" +//// + " b.m_edit m_edit,b.m_query m_query,b.m_delete m_delete,\n" +//// + " a.main_menu_action_name main_menu_action_name,a.main_menu_icon_name main_menu_icon_name " +//// + "from sec_menu_det a,sec_grp_menu_access b\n" +//// + "where b.menu_item_id=a.menu_item_id\n" +//// + "and b.usr_grp =:usr_grp\n" +//// + "and a.menu_id=:menu_id " +//// + "order by a.item_seq", +////// countQuery="select count(*) " +////// + "from sec_menu_det a,sec_grp_menu_access b\n" +////// + "where b.menu_item_id=a.menu_item_id\n" +////// + "and b.usr_grp = ?1" +////// + "and a.menu_id= ?2 " +////// + "order by a.item_seq", +//// nativeQuery=true) +// List getByUserId(Long usr_grp,Long menu_id); +// +//// @Query(value="select a.menu_item_id menu_item_id,a.menu_item_desc menu_item_desc,\r\n" +//// + " a.menu_id menu_id,b.m_create m_create,b.m_visible m_visible,\r\n" +//// + " b.m_edit m_edit,b.m_query m_query,b.m_delete m_delete,\r\n" +//// + " a.main_menu_action_name main_menu_action_name,a.main_menu_icon_name main_menu_icon_name \r\n" +//// + " from sec_menu_det a,sec_grp_menu_access b \r\n" +//// , +//// nativeQuery=true) +// List getallmenu(); +// +//// @Query(value="select a.menu_item_id menu_item_id,a.menu_item_desc menu_item_desc,\r\n" +//// + " a.menu_id menu_id,b.m_create m_create,b.m_visible m_visible,\r\n" +//// + " b.m_edit m_edit,b.m_query m_query,b.m_delete m_delete\r\n" +////// + " a.main_menu_action_name main_menu_action_name,a.main_menu_icon_name main_menu_icon_name \r\n" +//// + " from sec_menu_det a,sec_grp_menu_access b \r\n" +//// , +//// nativeQuery=true) +// List allmenu(); +// +// +// +//// @Query(value="select a.menu_item_id,a.menu_item_desc,\r\n" +//// + " a.menu_id,b.m_create,b.m_visible,\r\n" +//// + " b.m_edit,b.m_query,b.m_delete,\r\n" +//// + " a.main_menu_action_name,a.main_menu_icon_name \r\n" +//// + " from sec_menu_det a,sec_grp_menu_access b\r\n" +//// + " where a.menu_id=100", +//// nativeQuery = true) +// List findEqual100(); +// +//// @Query(value="select a.menu_item_id,a.menu_item_desc,\r\n" +//// + " a.menu_id,b.m_create,b.m_visible,\r\n" +//// + " b.m_edit,b.m_query,b.m_delete,\r\n" +//// + " a.main_menu_action_name,a.main_menu_icon_name \r\n" +//// + " from sec_menu_det a,sec_grp_menu_access b \r\n" +//// + " where a.menu_id=ANY(SELECT menu_id from sec_menu_det where menu_id >100 && menu_id< 200);", +//// nativeQuery = true) +// List findGreater100(); +// +//// @Query(value="select a.menu_item_id,a.menu_item_desc,\r\n" +//// + " a.menu_id,b.m_create,b.m_visible,\r\n" +//// + " b.m_edit,b.m_query,b.m_delete,\r\n" +//// + " a.main_menu_action_name,a.main_menu_icon_name \r\n" +//// + " from sec_menu_det a,sec_grp_menu_access b\r\n" +//// + " where a.menu_id=200", +//// nativeQuery = true) +// List findEqual200(); +// +//// @Query(value="select a.menu_item_id,a.menu_item_desc,\r\n" +//// + " a.menu_id,b.m_create,b.m_visible,\r\n" +//// + " b.m_edit,b.m_query,b.m_delete,\r\n" +//// + " a.main_menu_action_name,a.main_menu_icon_name \r\n" +//// + " from sec_menu_det a,sec_grp_menu_access b \r\n" +//// + " where a.menu_id=ANY(SELECT menu_id from sec_menu_det where menu_id >200 && menu_id< 300);", +//// nativeQuery = true) +// List findGreater200(); +// +// +//// @Query(value="select a.menu_item_id,a.menu_item_desc,\r\n" +//// + " a.menu_id,b.m_create,b.m_visible,\r\n" +//// + " b.m_edit,b.m_query,b.m_delete,\r\n" +//// + " a.main_menu_action_name,a.main_menu_icon_name \r\n" +//// + " from sec_menu_det a,sec_grp_menu_access b\r\n" +//// + " where a.menu_id=300", +//// nativeQuery = true) +// List findEqual300(); +// +//// @Query(value="select a.menu_item_id,a.menu_item_desc,\r\n" +//// + " a.menu_id,b.m_create,b.m_visible,\r\n" +//// + " b.m_edit,b.m_query,b.m_delete,\r\n" +//// + " a.main_menu_action_name,a.main_menu_icon_name \r\n" +//// + " from sec_menu_det a,sec_grp_menu_access b \r\n" +//// + " where a.menu_id=ANY(SELECT menu_id from sec_menu_det where menu_id >300 && menu_id< 400);", +//// nativeQuery = true) +// List findGreater300(); +// +// +//// @Query(value="select a.menu_item_id,a.menu_item_desc,\r\n" +//// + " a.menu_id,b.m_create,b.m_visible,\r\n" +//// + " b.m_edit,b.m_query,b.m_delete,\r\n" +//// + " a.main_menu_action_name,a.main_menu_icon_name \r\n" +//// + " from sec_menu_det a,sec_grp_menu_access b\r\n" +//// + " where a.menu_id=400", +//// nativeQuery = true) +// List findEqual400(); +// +//// @Query(value="select a.menu_item_id,a.menu_item_desc,\r\n" +//// + " a.menu_id,b.m_create,b.m_visible,\r\n" +//// + " b.m_edit,b.m_query,b.m_delete,\r\n" +//// + " a.main_menu_action_name,a.main_menu_icon_name \r\n" +//// + " from sec_menu_det a,sec_grp_menu_access b \r\n" +//// + " where a.menu_id=ANY(SELECT menu_id from sec_menu_det where menu_id >400 && menu_id< 500);", +//// nativeQuery = true) +// List findGreater400(); +// +//// @Query(value="select a.menu_item_id,a.menu_item_desc,\r\n" +//// + " a.menu_id,b.m_create,b.m_visible,\r\n" +//// + " b.m_edit,b.m_query,b.m_delete,\r\n" +//// + " a.main_menu_action_name,a.main_menu_icon_name \r\n" +//// + " from sec_menu_det a,sec_grp_menu_access b\r\n" +//// + " where a.menu_id=500", +//// nativeQuery = true) +// List findEqual500(); +// +//// @Query(value="select a.menu_item_id,a.menu_item_desc,\r\n" +//// + " a.menu_id,b.m_create,b.m_visible,\r\n" +//// + " b.m_edit,b.m_query,b.m_delete,\r\n" +//// + " a.main_menu_action_name,a.main_menu_icon_name \r\n" +//// + " from sec_menu_det a,sec_grp_menu_access b \r\n" +//// + " where a.menu_id=ANY(SELECT menu_id from sec_menu_det where menu_id >500 && menu_id< 600);", +//// nativeQuery = true) +// List findGreater500(); +// +//// @Query(value="select a.menu_item_id,a.menu_item_desc,\r\n" +//// + " a.menu_id,b.m_create,b.m_visible,\r\n" +//// + " b.m_edit,b.m_query,b.m_delete,\r\n" +//// + " a.main_menu_action_name,a.main_menu_icon_name \r\n" +//// + " from sec_menu_det a,sec_grp_menu_access b\r\n" +//// + " where a.menu_id=600", +//// nativeQuery = true) +// List findEqual600(); +// +//// @Query(value="select a.menu_item_id,a.menu_item_desc,\r\n" +//// + " a.menu_id,b.m_create,b.m_visible,\r\n" +//// + " b.m_edit,b.m_query,b.m_delete,\r\n" +//// + " a.main_menu_action_name,a.main_menu_icon_name \r\n" +//// + " from sec_menu_det a,sec_grp_menu_access b \r\n" +//// + " where a.menu_id=ANY(SELECT menu_id from sec_menu_det where menu_id >600 && menu_id< 700);", +//// nativeQuery = true) +// List findGreater600(); + +// +//// @Query(value="SELECT * FROM sec_menu_det where menu_id=100", nativeQuery = true) +// MenuDet findequalto100(); +// +//// @Query(value="SELECT * FROM sec_menu_det a where a.menu_id=ANY(SELECT menu_id from sec_menu_det where menu_id >100 && menu_id< 200)", nativeQuery = true) +// List findgreaterthan100(); +// +//// @Query(value="SELECT * FROM sec_menu_det where menu_id=200", nativeQuery = true) +// MenuDet findequalto200(); +// +//// @Query(value="SELECT * FROM sec_menu_det a where a.menu_id=ANY(SELECT menu_id from sec_menu_det where menu_id >200 && menu_id< 300)", nativeQuery = true) +// List findgreaterthan200(); +// +//// @Query(value="SELECT * FROM sec_menu_det where menu_id=300", nativeQuery = true) +// MenuDet findequalto300(); +// +//// @Query(value="SELECT * FROM sec_menu_det a where a.menu_id=ANY(SELECT menu_id from sec_menu_det where menu_id >300 && menu_id< 400)", nativeQuery = true) +// List findgreaterthan300(); +// +//// @Query(value="SELECT * FROM sec_menu_det where menu_id=400", nativeQuery = true) +// MenuDet findequalto400(); +// +//// @Query(value="SELECT * FROM sec_menu_det a where a.menu_id=ANY(SELECT menu_id from sec_menu_det where menu_id >400 && menu_id< 500)", nativeQuery = true) +// List findgreaterthan400(); +// +//// @Query(value="SELECT * FROM sec_menu_det where menu_id=500", nativeQuery = true) +// MenuDet findequalto500(); +// +//// @Query(value="SELECT * FROM sec_menu_det a where a.menu_id=ANY(SELECT menu_id from sec_menu_det where menu_id >500 && menu_id< 600)", nativeQuery = true) +// List findgreaterthan500(); +// +//// @Query(value="SELECT * FROM sec_menu_det where menu_id=600", nativeQuery = true) +// MenuDet findequalto600(); +// +//// @Query(value="SELECT * FROM sec_menu_det a where a.menu_id=ANY(SELECT menu_id from sec_menu_det where menu_id >600 && menu_id< 700)", nativeQuery = true) +// List findgreaterthan600(); +// +//// @Query(value="SELECT * FROM sec_menu_det a where a.menu_id=?1", nativeQuery = true) +// List findAllById(Long menu_id); +// +//// @Query(value="SELECT * FROM sec_menu_det a where a.root_menudet_id is null", nativeQuery = true) +// List findAllRoots(); +// +//// @Query(value="SELECT * FROM sec_menu_det a where a.root_menudet_id=:menu_item_id", nativeQuery = true) +// List findAllSubmenu(@Param("menu_item_id") Long menu_item_id); +// +//// @Query(value="SELECT * FROM sec_menu_det a where a.root_menudet_id=:menu_item_id", nativeQuery = true) +// List findAllSubCategoriesInRoot(@Param("menu_item_id") List menu_item_id); +// +//// @Query(value="SELECT * FROM sec_menu_det a where a.menu_id = 0 ORDER BY item_seq ASC", nativeQuery = true) +// List findAllRootsByMenuId(); +// +//// @Query(value="SELECT * FROM sec_menu_det a where a.menu_id=:menu_item_id ORDER BY item_seq ASC", nativeQuery = true) +// List findAllSubmenuByMenuId(@Param("menu_item_id") Long menu_item_id); +// +//// @Query(value="select * from sec_menu_det where menu_item_id = :menu_item_id UNION select * from sec_menu_det where menu_id = :menu_item_id", nativeQuery = true) +// List findAllSubmenuforusrgrp(@Param("menu_item_id") Long menu_item_id); +// +// @Query(value="SELECT `COLUMN_NAME` FROM `INFORMATION_SCHEMA`.`COLUMNS` WHERE `TABLE_SCHEMA`='realnet_CNSBE' AND `TABLE_NAME`=:TABLE_NAME", nativeQuery = true) +// List findcolumnbytablename(@Param("TABLE_NAME") Object TABLE_NAME); +// +// Optional findById(Long gmenuid); + + @Query("{}") + Page getAll(Pageable page); + + @Query("{ 'usrGrp': ?0, 'menu_id': ?1 }") + List getById(Long usrGrp, Long menuId); + + @Query("{ 'usrGrp': ?0, 'menu_id': ?1 }") + List getByUserId(Long usrGrp, Long menuId); + + @Query("{ 'menu_id': 100 }") + List findEqual100(); + + @Query("{ 'menu_id': { $gt: 100, $lt: 200 } }") + List findGreater100(); + + @Query("{ 'menu_id': 200 }") + List findEqual200(); + + @Query("{ 'menu_id': { $gt: 200, $lt: 300 } }") + List findGreater200(); + + @Query("{ 'menu_id': 300 }") + List findEqual300(); + + @Query("{ 'menu_id': { $gt: 300, $lt: 400 } }") + List findGreater300(); + + @Query("{ 'menu_id': 400 }") + List findEqual400(); + + @Query("{ 'menu_id': { $gt: 400, $lt: 500 } }") + List findGreater400(); + + @Query("{ 'menu_id': 500 }") + List findEqual500(); + + @Query("{ 'menu_id': { $gt: 500, $lt: 600 } }") + List findGreater500(); + + @Query("{ 'menu_id': 600 }") + List findEqual600(); + + @Query("{ 'menu_id': { $gt: 600, $lt: 700 } }") + List findGreater600(); + + @Query("{}") + List getallmenu(); + + @Query("{}") + List allmenu(); + + @Query("{ 'menu_id': 100 }") + Optional findequalto100(); + + @Query("{ 'menu_id': { $gt: 100, $lt: 200 } }") + List findgreaterthan100(); + + @Query("{ 'menu_id': 200 }") + Optional findequalto200(); + + @Query("{ 'menu_id': { $gt: 200, $lt: 300 } }") + List findgreaterthan200(); + + @Query("{ 'menu_id': 300 }") + Optional findequalto300(); + + @Query("{ 'menu_id': { $gt: 300, $lt: 400 } }") + List findgreaterthan300(); + + @Query("{ 'menu_id': 400 }") + Optional findequalto400(); + + @Query("{ 'menu_id': { $gt: 400, $lt: 500 } }") + List findgreaterthan400(); + + @Query("{ 'menu_id': 500 }") + Optional findequalto500(); + + @Query("{ 'menu_id': { $gt: 500, $lt: 600 } }") + List findgreaterthan500(); + + @Query("{ 'menu_id': 600 }") + Optional findequalto600(); + + @Query("{ 'menu_id': { $gt: 600, $lt: 700 } }") + List findgreaterthan600(); + + @Query("{ 'menu_id': ?0 }") + List findAllById(Long menu_id); + + @Query("{ 'rootMenudetId': null }") + List findAllRoots(); + + @Query("{ 'rootMenudetId': ?0 }") + List findAllSubmenu(Long menu_item_id); + + @Query("{ 'rootMenudetId': { $in: ?0 } }") + List findAllSubCategoriesInRoot(List menu_item_id); + + @Query("{ 'menu_id': 0 }") + List findAllRootsByMenuId(); + + @Query("{ 'menu_id': ?0 }") + List findAllSubmenuByMenuId(Long menu_item_id); + + @Query("{ $or: [{ 'menuItemId': ?0 }, { 'menu_id': ?0 }] }") + List findAllSubmenuforusrgrp(Long menu_item_id); + + // Note: MongoDB doesn't have the equivalent of INFORMATION_SCHEMA, so finding + // columns may not be straightforward. + + + +// @Query(value="SELECT `COLUMN_NAME` FROM `INFORMATION_SCHEMA`.`COLUMNS` WHERE `TABLE_SCHEMA`='realnet_CNSBE' AND `TABLE_NAME`=:TABLE_NAME", nativeQuery = true) + +// List findcolumnbytablename(@Param("TABLE_NAME") Object TABLE_NAME); + + @Query("{'menuItemId': ?0}") + MenuDet findById(Long menu_item_id); + +} diff --git a/backend/src/main/java/com/realnet/fnd/response/CustomResponse.java b/backend/src/main/java/com/realnet/fnd/response/CustomResponse.java new file mode 100644 index 0000000..b5274ce --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/response/CustomResponse.java @@ -0,0 +1,15 @@ +package com.realnet.fnd.response; + +import java.util.List; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper = false) +public class CustomResponse extends PageResponse { + @ApiModelProperty(required = true, value = "") + private List items; + //private List items; +} diff --git a/backend/src/main/java/com/realnet/fnd/response/EntityResponse.java b/backend/src/main/java/com/realnet/fnd/response/EntityResponse.java new file mode 100644 index 0000000..8bb7ab2 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/response/EntityResponse.java @@ -0,0 +1,15 @@ +package com.realnet.fnd.response; + +import lombok.Data; + +@Data +public class EntityResponse { + + private String msg; + + public EntityResponse(String msg) { + super(); + this.msg = msg; + } + +} diff --git a/backend/src/main/java/com/realnet/fnd/response/OperationResponse.java b/backend/src/main/java/com/realnet/fnd/response/OperationResponse.java new file mode 100644 index 0000000..b1ab421 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/response/OperationResponse.java @@ -0,0 +1,19 @@ +/** + This is the common structure for all responses + if the response contains a list(array) then it will have 'items' field + if the response contains a single item then it will have 'item' field + */ + + +package com.realnet.fnd.response; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data //for getters and setters +public class OperationResponse { + public enum ResponseStatusEnum {SUCCESS, ERROR, WARNING, NO_ACCESS}; + @ApiModelProperty(required = true) + private ResponseStatusEnum operationStatus; + private String operationMessage; +} diff --git a/backend/src/main/java/com/realnet/fnd/response/PageResponse.java b/backend/src/main/java/com/realnet/fnd/response/PageResponse.java new file mode 100644 index 0000000..9cb000b --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/response/PageResponse.java @@ -0,0 +1,53 @@ +package com.realnet.fnd.response; + +import java.util.List; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Sort; + +import lombok.Getter; +import lombok.Setter; + +//@Data //for getters and setters +public class PageResponse extends OperationResponse { + @Getter @Setter private boolean first; + @Getter @Setter private boolean last; + @Getter @Setter private int currentPageNumber; + @Getter @Setter private int itemsInPage; + @Getter @Setter private int pageSize; + @Getter @Setter private int totalPages; + @Getter @Setter private long totalItems; + @Getter @Setter private Sort sort; + private List items; + + public void setPageStats(Page pg, boolean setDefaultMessage){ + this.first = pg.isFirst(); + this.last = pg.isLast(); + this.currentPageNumber = pg.getNumber(); + this.itemsInPage = pg.getNumberOfElements(); + this.pageSize = pg.getSize(); + this.totalPages = pg.getTotalPages(); + this.totalItems = pg.getTotalElements(); + //this.items = pg.getContent(); + this.sort = pg.getSort(); + if (setDefaultMessage == true){ + this.setOperationStatus(ResponseStatusEnum.SUCCESS); + this.setOperationMessage("Page " + (pg.getNumber()+ 1 ) + " of " + pg.getTotalPages() ); + } + } + + public void setPageTotal(int count, boolean setDefaultMessage){ + //this.items = list; + this.first = true; + this.last = true; + this.itemsInPage = count; + this.totalItems = count; + this.totalPages = 1; + this.pageSize = count; + if (setDefaultMessage == true){ + this.setOperationStatus(ResponseStatusEnum.SUCCESS); + this.setOperationMessage("Total " + count + " items "); + } + } + +} diff --git a/backend/src/main/java/com/realnet/fnd/response/Rn_DynamicTransactionResponse.java b/backend/src/main/java/com/realnet/fnd/response/Rn_DynamicTransactionResponse.java new file mode 100644 index 0000000..aab0da1 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/response/Rn_DynamicTransactionResponse.java @@ -0,0 +1,16 @@ +package com.realnet.fnd.response; + +import java.util.List; + +import com.realnet.fnd.entity.Rn_Dynamic_Transaction; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper=false) +public class Rn_DynamicTransactionResponse extends PageResponse { + @ApiModelProperty(required = true, value = "") + private List items; +} diff --git a/backend/src/main/java/com/realnet/fnd/response/Rn_Forms_SetupResponse.java b/backend/src/main/java/com/realnet/fnd/response/Rn_Forms_SetupResponse.java new file mode 100644 index 0000000..2c5f1fd --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/response/Rn_Forms_SetupResponse.java @@ -0,0 +1,16 @@ +package com.realnet.fnd.response; + +import java.util.List; + +import com.realnet.fnd.entity.Rn_Forms_Setup; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper=false) +public class Rn_Forms_SetupResponse extends PageResponse { + @ApiModelProperty(required = true, value = "") + private List items; +} diff --git a/backend/src/main/java/com/realnet/fnd/response/Rn_Function_Register_Response.java b/backend/src/main/java/com/realnet/fnd/response/Rn_Function_Register_Response.java new file mode 100644 index 0000000..b7a0733 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/response/Rn_Function_Register_Response.java @@ -0,0 +1,16 @@ +package com.realnet.fnd.response; + +import java.util.List; + +import com.realnet.fnd.entity.Rn_Function_Register; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper = false) +public class Rn_Function_Register_Response extends PageResponse { + @ApiModelProperty(required = true, value = "") + private List items; +} diff --git a/backend/src/main/java/com/realnet/fnd/response/Rn_Main_Menu_Response.java b/backend/src/main/java/com/realnet/fnd/response/Rn_Main_Menu_Response.java new file mode 100644 index 0000000..70c3a4a --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/response/Rn_Main_Menu_Response.java @@ -0,0 +1,16 @@ +package com.realnet.fnd.response; + +import java.util.List; + +import com.realnet.fnd.entity.Rn_Main_Menu; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper=false) +public class Rn_Main_Menu_Response extends PageResponse { + @ApiModelProperty(required = true, value = "") + private List items; +} diff --git a/backend/src/main/java/com/realnet/fnd/response/Rn_Menu_Group_Response.java b/backend/src/main/java/com/realnet/fnd/response/Rn_Menu_Group_Response.java new file mode 100644 index 0000000..c536780 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/response/Rn_Menu_Group_Response.java @@ -0,0 +1,16 @@ +package com.realnet.fnd.response; + +import java.util.List; + +import com.realnet.fnd.entity.Rn_Menu_Group_Header; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper=false) +public class Rn_Menu_Group_Response extends PageResponse { + @ApiModelProperty(required = true, value = "") + private List items; +} diff --git a/backend/src/main/java/com/realnet/fnd/response/Rn_Menu_Register_Response.java b/backend/src/main/java/com/realnet/fnd/response/Rn_Menu_Register_Response.java new file mode 100644 index 0000000..70a0e65 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/response/Rn_Menu_Register_Response.java @@ -0,0 +1,16 @@ +package com.realnet.fnd.response; + +import java.util.List; + +import com.realnet.fnd.entity.Rn_Menu_Register; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper=false) +public class Rn_Menu_Register_Response extends PageResponse { + @ApiModelProperty(required = true, value = "") + private List items; +} diff --git a/backend/src/main/java/com/realnet/fnd/response/SingleDataSeriseResponse.java b/backend/src/main/java/com/realnet/fnd/response/SingleDataSeriseResponse.java new file mode 100644 index 0000000..26223d8 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/response/SingleDataSeriseResponse.java @@ -0,0 +1,16 @@ +//This is a common http response model for providing data series + +package com.realnet.fnd.response; + +import java.util.List; + +import com.realnet.fnd.entity.SingleSerise; + +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper=false) +public class SingleDataSeriseResponse extends OperationResponse { + private List items; +} diff --git a/backend/src/main/java/com/realnet/fnd/service/ExtFieldService.java b/backend/src/main/java/com/realnet/fnd/service/ExtFieldService.java new file mode 100644 index 0000000..847a2ad --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/service/ExtFieldService.java @@ -0,0 +1,26 @@ +package com.realnet.fnd.service; + +import java.util.List; + +import com.realnet.fnd.entity.Rn_Ext_Fields; + +public interface ExtFieldService { + List getAll(); + //Page getAll(Pageable p); + Rn_Ext_Fields getById(int id); + Rn_Ext_Fields save(Rn_Ext_Fields rn_ext_fields); + Rn_Ext_Fields updateById(int id, Rn_Ext_Fields rn_ext_fields); + boolean deleteById(int id); + +// // LOOKUP FIELDS (ATTRIBUTE, FLEX) +// List getLookupValues(); +// +// // TEXTFIELD, DROPDOWN ETC... +// List getDataTypeValues(); + + // BUILD HTML FOR EXTENSION + String buildExtensionByFormCode(String acc_id, String f_code, Integer formId); + + String stringReplace(String str, String start, String end, String replaceWith); + +} diff --git a/backend/src/main/java/com/realnet/fnd/service/ExtFieldServiceImpl.java b/backend/src/main/java/com/realnet/fnd/service/ExtFieldServiceImpl.java new file mode 100644 index 0000000..1143678 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/service/ExtFieldServiceImpl.java @@ -0,0 +1,260 @@ +package com.realnet.fnd.service; + +import java.util.List; +import java.util.Optional; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; + +import com.realnet.exceptions.ResourceNotFoundException; +import com.realnet.fnd.entity.Rn_Ext_Fields; +import com.realnet.fnd.repository.ExtFieldRepository; +import com.realnet.fnd.repository.Rn_LookUpRepository; +import com.realnet.utils.WireFrameConstant; + +@Service +public class ExtFieldServiceImpl implements ExtFieldService { + + @Value("${angularProjectPath}") + private String angularProjectPath; + + @Value("${projectPath}") + private String projectPath; + + @Autowired + private ExtFieldRepository extFieldRepository; + + @Autowired + Rn_LookUpRepository lookUpRepository1; + + @Override + public List getAll() { + return extFieldRepository.findAll(); + } + +// @Override +// public Page getAll(Pageable page) { +// return extFieldRepository.findAll(page); +// } + + @Override + public Rn_Ext_Fields getById(int id) { + Rn_Ext_Fields rn_ext_fields = extFieldRepository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Extension Field not found :: " + id)); + return rn_ext_fields; + } + + @Override + public Rn_Ext_Fields save(Rn_Ext_Fields rn_ext_fields) { + Rn_Ext_Fields savedRn_Ext_Fields = extFieldRepository.save(rn_ext_fields); + return savedRn_Ext_Fields; + } + + @Override + public Rn_Ext_Fields updateById(int id, Rn_Ext_Fields extensionRequest) { + Rn_Ext_Fields old_ext_field = extFieldRepository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Extension Field not found :: " + id)); + + old_ext_field.setField_name(extensionRequest.getField_name()); + old_ext_field.setMapping(extensionRequest.getMapping()); + old_ext_field.setData_type(extensionRequest.getData_type()); + old_ext_field.setType(extensionRequest.getType()); + old_ext_field.setActive(extensionRequest.isActive()); + final Rn_Ext_Fields updated_ext_field = extFieldRepository.save(old_ext_field); + return updated_ext_field; + } + + @Override + public boolean deleteById(int id) { + if (extFieldRepository.findById(id) == null) { + throw new ResourceNotFoundException("Extension Field not found :: " + id); + } + Rn_Ext_Fields rn_ext_fields = extFieldRepository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Extension Field not found :: " + id)); + extFieldRepository.delete(rn_ext_fields); + return true; + } + +// @Override +// public List getLookupValues() { +// return lookUpRepository.findLookupValues(); +// } +// +// @Override +// public List getDataTypeValues() { +// return lookUpRepository.findDataTypeValues(); +// } + + @Override + public String buildExtensionByFormCode(String acc_id, String f_code, Integer formId) { + + Optional extensions = extFieldRepository.findById(formId); +// List extensions = extFieldRepository.getExtensionFieldByFormCode(acc_id, f_code); + StringBuilder extension_grid_form = new StringBuilder(); + StringBuilder extension_entry_form = new StringBuilder(); + + if (extensions == null || !extensions.isPresent()) { + throw new ResourceNotFoundException("Extension Fields Not Found"); + } else { + +// extension_entry_form.append("\n"); + // extension_code.append("
\n" + "
\n"); + +// for (Rn_Ext_Fields extension : extensions) { + // String form_code = extension.getForm_code(); + Rn_Ext_Fields extension = extensions.get(); + String type = extension.getType(); // ho, hl + String data_type = extension.getData_type(); + String mapping = extension.getMapping(); + String field_name = extension.getField_name(); + + String ext = ",\"extValue\":\"" + mapping + "\""; + + if (WireFrameConstant.DT_TEXTFIELD.equals(data_type)) { +// extension_entry_form.append("
\r\n" + " \r\n" +// + " \r\n" + " \n"); + + extension_entry_form.append("{\"fieldName\":\"" + field_name + + "\",\"fieldType\":\"text\",\"fieldValue\":\"\",\"formCode\":\"" + f_code + "\"" + ext + "},"); + } + + if (WireFrameConstant.DT_DATE.equals(data_type)) { +// extension_entry_form.append(" \r\n" + " \r\n" +// + " \r\n" + " \n"); + extension_entry_form.append("{\"fieldName\":\"" + field_name + + "\",\"fieldType\":\"date\",\"fieldValue\":\"\",\"formCode\":\"" + f_code + "\"" + ext + "},"); + + } + + if (WireFrameConstant.DT_LONGTEXT.equals(data_type)) { +// extension_entry_form.append(" \r\n" + " \r\n" +// + " \r\n" + " \n"); +// + extension_entry_form.append("{\"fieldName\":\"" + field_name + + "\",\"fieldType\":\"textarea\",\"fieldValue\":\"\",\"formCode\":\"" + f_code + "\"" + ext + + "},"); + + } + + if (WireFrameConstant.FIELD_CHECKBOX.equals(data_type)) { +// extension_entry_form.append(" \r\n" + " \r\n" +// + " \r\n" + " \n"); + extension_entry_form.append("{\"fieldName\":\"" + field_name + + "\",\"fieldType\":\"checkbox\",\"fieldValue\":\"\",\"formCode\":\"" + f_code + "\"" + ext + + "},"); + + } + +// if (TypeConstants.FIELD_CHECKBOX.equals(data_type)) { +// extension_entry_form.append(" \r\n" + " \r\n" +// + " \r\n" + " \n"); +// } + if (WireFrameConstant.FIELD_AUTOCOMPLETE.equals(data_type)) { +// extension_entry_form.append(" \r\n" + " \r\n" +// + " \r\n" + " \n"); + extension_entry_form.append("{\"fieldName\":\"" + field_name + + "\",\"fieldType\":\"text\",\"fieldValue\":\"\",\"formCode\":\"" + f_code + "\"" + ext + "},"); + } + + // extension grid-view code + extension_grid_form.append("{prop: \"" + mapping + "\", name: \"" + field_name + "\", width: 200},\n"); + + // extension read-only code + + // extension update code + + } + extension_entry_form.deleteCharAt(extension_entry_form.length() - 1); + // extension_code.append("\n\n
" + field_name +// + "
" + field_name +// + "
" + field_name +// + "
" + field_name +// + "
" + field_name +// + "
" + field_name +// + "
"); +// extension_entry_form.append("\n"); + +// FileWriter fw = null; +// BufferedWriter bw = null; +// try { +// +// // ENTRY FORM +//// String ngExtEntryPath = angularProjectPath +//// + "/src/app/pages/university/teacher/extensions/add-ext/teacher-add-extension.component.html"; +// +// String path = projectPath + "/cns-portal/pages"; +// +// String ngExtEntryPath = path + File.separator + f_code + "_ext.html"; +// +// File ngExtEntryFile1 = new File(path); +// if (!ngExtEntryFile1.exists()) { +// ngExtEntryFile1.mkdir(); +// } +// +// File ngExtEntryFile = new File(ngExtEntryPath); +// if (!ngExtEntryFile.exists()) { +// ngExtEntryFile.createNewFile(); +// } +// fw = new FileWriter(ngExtEntryFile.getAbsoluteFile()); +// bw = new BufferedWriter(fw); +// bw.write(extension_entry_form.toString()); +// bw.close(); +// +// // GRID VIEW FORM +//// final String start = "// EXTENSION COLUMN START"; +//// final String end = "// EXTENSION COLUMN END"; +//// String replaceWith = extension_grid_form.toString(); +//// +//// String ngExtGridPath = path + "/teacher-add-extension.component.ts"; +//// File ngExtGridFile = new File(ngExtGridPath); +//// String fileString = FileUtils.readFileToString(ngExtGridFile, StandardCharsets.UTF_8); +//// String finalString = stringReplace(fileString, start, end, replaceWith); +//// +//// bw = new BufferedWriter(new FileWriter(ngExtGridFile, false)); // replaced string +//// bw.write(finalString); +//// bw.close(); +// +// // UPDATE FORM +// +// // READ-ONLY FORM +// +// } catch (IOException e) { +// e.printStackTrace(); +// } + + return extension_entry_form.toString(); + } + + @Override + public String stringReplace(String str, String start, String end, String replaceWith) { + int i = str.indexOf(start); + while (i != -1) { + int j = str.indexOf(end, i + 1); + if (j != -1) { + /* + * @Include starting and ending string String data = str.substring(0, i + + * start.length()) + "\n" + replaceWith + "\n"; String temp = str.substring(j); + * + * @Not Include starting and ending string String data = str.substring(0, i) + + * "\n" + replaceWith + "\n"; String temp = str.substring(j + end.length()); + */ + String data = str.substring(0, i + start.length()) + "\n" + replaceWith + "\n"; + String temp = str.substring(j); + data += temp; + str = data; + i = str.indexOf(start, i + replaceWith.length() + end.length() + 1); + } else { + break; + } + } + return str; + } +} diff --git a/backend/src/main/java/com/realnet/fnd/service/FileStorageService.java b/backend/src/main/java/com/realnet/fnd/service/FileStorageService.java new file mode 100644 index 0000000..a385565 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/service/FileStorageService.java @@ -0,0 +1,136 @@ +package com.realnet.fnd.service; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.nio.file.StandardCopyOption; + +import org.apache.commons.io.FilenameUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; +import org.springframework.web.multipart.MultipartFile; + +//import com.realnet.codeextractor.service.Rn_Bcf_Extractor_Service; +import com.realnet.exceptions.StorageException; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; + +import lombok.extern.slf4j.Slf4j; + +@Slf4j +@Service +public class FileStorageService { + + //private static final Logger logger = LoggerFactory.getLogger(FileStorageService.class); + + @Autowired + private AppUserServiceImpl userService; + + @Autowired +// private Rn_Bcf_Extractor_Service extractorService; + + @Value("${projectPath}") + private String projectPath; + + public void uploadProfilePicture(MultipartFile file, String location) { + if (file.isEmpty()) { + throw new StorageException("Failed to store empty file"); + } + // create path for every new File + // File fileLoc = new File(location); + try { +// if(!fileLoc.exists()) { +// fileLoc.mkdir(); +// //System.out.println("Path Created..."); +// } + AppUser user = userService.getLoggedInUser(); + String UserId = String.valueOf(user.getUserId()); + String fileName = file.getOriginalFilename(); + + String ext = fileName.substring(fileName.lastIndexOf(".")); + String extension = FilenameUtils.getExtension(fileName); // lol + String newName = "profile-pic-" + UserId + ext; + + System.out.println(System.getProperty("java.io.tmpdir")); + File convFile = new File(System.getProperty("java.io.tmpdir")+System.getProperty("file.separator")+newName); + file.transferTo(convFile); + } catch (IOException e) { + String msg = String.format("Failed to store file %s", file.getName()); + log.info(msg); + throw new StorageException("Failed to store file ", e); + } + + } + + // ========================== BCF EXTRACTOR ============================= + // max size 100 mb + public void uploadFile(MultipartFile file, String location) { + if (file.isEmpty()) { + throw new StorageException("Failed to store empty file"); + } + try { + String fileName = file.getOriginalFilename(); + InputStream is = file.getInputStream(); + Files.copy(is, Paths.get(location + fileName), StandardCopyOption.REPLACE_EXISTING); + } catch (IOException e) { + String msg = String.format("Failed to store file : %s", file.getName()); + log.debug(msg); + throw new StorageException("Failed to store file", e); + } + + } + +// private static ArrayList fileList = new ArrayList(); +// +// public ArrayList listOFiles(String directory) throws IOException { +// File destDir = new File(directory); +// System.out.println("Destination Folder Path = " + directory); +// // ArrayList files = new ArrayList(); +// // Get all files from a directory. +// File[] fList = destDir.listFiles(); +// if (fList != null) { +// for (File file : fList) { +// if (file.isFile()) { +// fileList.add(file.getAbsolutePath()); +// // System.out.println("directory:" + file.getAbsolutePath()); +// } else if (file.isDirectory()) { +// listOFiles(file.getAbsolutePath()); +// } +// } +// } +// return fileList; +// } + + // =============== MOVE FILE FROM ONE DIRECTORY TO ANTHER ============== +// public void move(String fromDir, String toDir) throws IOException { +// File fromDirFile = new File(fromDir); +// File moveToFile = new File(toDir); +// +// String fileName = fromDirFile.getName(); +// +// // MOVE ALL FILES INTO PARENT DIRECTORY +// System.out.println("File name = " + fileName + "\n" + "Move to = " + toDir); +// fromDirFile.renameTo(new File(moveToFile, fromDirFile.getName())); +// } + + // ============== DELETE EMPTY DIRECTORY =========== +// public static void deleteEmptyDirectory(File dir) { +// if (dir.isDirectory()) { +// File[] fList = dir.listFiles(); +// if (fList != null) { +// for (File file : fList) { +// if (!file.isFile()) { +// System.out.println("Removing empty directory : " + file.getName()); +// file.delete(); +// deleteEmptyDirectory(file); +// } +// } +// dir.delete(); +// } +// } +// } + +} diff --git a/backend/src/main/java/com/realnet/fnd/service/RnGroupMenuLineServiec.java b/backend/src/main/java/com/realnet/fnd/service/RnGroupMenuLineServiec.java new file mode 100644 index 0000000..beb5c17 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/service/RnGroupMenuLineServiec.java @@ -0,0 +1,19 @@ +package com.realnet.fnd.service; + +import java.util.List; + +import com.realnet.fnd.entity.Rn_Menu_Group_Header; +import com.realnet.fnd.entity.Rn_Menu_Group_Line; + +public interface RnGroupMenuLineServiec { + + public Rn_Menu_Group_Line addToDb(Rn_Menu_Group_Line rn_Menu_Group_Line); + + public Rn_Menu_Group_Line getoneById(int id); + + public List getAll(); + + public Rn_Menu_Group_Line updateToDb(Rn_Menu_Group_Line rn_Menu_Group_Line); + +// public List getLinesByHeader(Rn_Menu_Group_Header rn_Menu_Group_Header); +} diff --git a/backend/src/main/java/com/realnet/fnd/service/RnGroupMenuLineServiecImpl.java b/backend/src/main/java/com/realnet/fnd/service/RnGroupMenuLineServiecImpl.java new file mode 100644 index 0000000..1ef3ca6 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/service/RnGroupMenuLineServiecImpl.java @@ -0,0 +1,49 @@ +package com.realnet.fnd.service; + +import java.util.List; +import java.util.Optional; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import com.realnet.fnd.entity.Rn_Menu_Group_Header; +import com.realnet.fnd.entity.Rn_Menu_Group_Line; +import com.realnet.fnd.repository.RnGroupLineRepository; + +@Service +public class RnGroupMenuLineServiecImpl implements RnGroupMenuLineServiec { + + @Autowired + private RnGroupLineRepository r; + + @Override + public Rn_Menu_Group_Line addToDb(Rn_Menu_Group_Line rn_Menu_Group_Line) { + Rn_Menu_Group_Line addToDb = this.r.save(rn_Menu_Group_Line); + return addToDb; + } + + @Override + public Rn_Menu_Group_Line getoneById(int id) { + Optional findById = this.r.findById(id); + return findById.get(); + } + + @Override + public List getAll() { + List all = this.r.findAll(); + return all; + } + + @Override + public Rn_Menu_Group_Line updateToDb(Rn_Menu_Group_Line rn_Menu_Group_Line) { + Rn_Menu_Group_Line addToDb = this.r.save(rn_Menu_Group_Line); + return addToDb; + } + +// @Override +// public List getLinesByHeader(Rn_Menu_Group_Header rn_Menu_Group_Header) { +// List lineByHeader = this.r.findLineByHeader(rn_Menu_Group_Header); +// return lineByHeader; +// } + +} diff --git a/backend/src/main/java/com/realnet/fnd/service/Rn_DynamicTransactionService.java b/backend/src/main/java/com/realnet/fnd/service/Rn_DynamicTransactionService.java new file mode 100644 index 0000000..732171e --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/service/Rn_DynamicTransactionService.java @@ -0,0 +1,26 @@ +package com.realnet.fnd.service; + +import java.util.List; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; + +import com.realnet.fnd.entity.Rn_Dynamic_Transaction; + +public interface Rn_DynamicTransactionService { + List getAll(); + + Page getAll(Pageable p); + + List getByFormId(int form_id); + + Rn_Dynamic_Transaction getByIdAndFormId(int id, int form_id); + + + Rn_Dynamic_Transaction save(Rn_Dynamic_Transaction rn_dynamic_transaction); + + Rn_Dynamic_Transaction updateByFormId(int id, int form_id, Rn_Dynamic_Transaction rn_dynamic_transaction); + + boolean deleteById(int id); + +} diff --git a/backend/src/main/java/com/realnet/fnd/service/Rn_DynamicTransactionServiceImpl.java b/backend/src/main/java/com/realnet/fnd/service/Rn_DynamicTransactionServiceImpl.java new file mode 100644 index 0000000..350286c --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/service/Rn_DynamicTransactionServiceImpl.java @@ -0,0 +1,105 @@ +package com.realnet.fnd.service; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.stereotype.Service; + +import com.realnet.exceptions.ResourceNotFoundException; +import com.realnet.fnd.entity.Rn_Dynamic_Transaction; +import com.realnet.fnd.repository.Rn_DynamicTransactionRepository; + +@Service +public class Rn_DynamicTransactionServiceImpl implements Rn_DynamicTransactionService { + + @Autowired + private Rn_DynamicTransactionRepository rn_dynamic_transactionRepository; + + @Override + public List getAll() { + return rn_dynamic_transactionRepository.findAll(); + } + + @Override + public Page getAll(Pageable page) { + return rn_dynamic_transactionRepository.findAll(page); + } + + @Override + public List getByFormId(int form_id) { + // Rn_Dynamic_Transaction rn_dynamic_transaction = + // rn_dynamic_transactionRepository.findById(id) + List rn_dynamic_transaction = rn_dynamic_transactionRepository.findByFormId(form_id); + return rn_dynamic_transaction; + } + + @Override + public Rn_Dynamic_Transaction save(Rn_Dynamic_Transaction rn_dynamic_transaction) { + Rn_Dynamic_Transaction savedRn_Dynamic_Transaction = rn_dynamic_transactionRepository + .save(rn_dynamic_transaction); + return savedRn_Dynamic_Transaction; + } + + @Override + public Rn_Dynamic_Transaction updateByFormId(int id, int form_id, Rn_Dynamic_Transaction txRequest) { + Rn_Dynamic_Transaction rn_dynamic_transaction = rn_dynamic_transactionRepository.findByIdAndFormId(id, form_id) + .orElseThrow(() -> new ResourceNotFoundException("Extension Field not found :: " + form_id)); + rn_dynamic_transaction.setUpdatedBy(txRequest.getUpdatedBy()); + // rn_dynamic_transaction.setForm_id(txRequest.getForm_id()); // modify needed + rn_dynamic_transaction.setForm_version(txRequest.getForm_version()); + + rn_dynamic_transaction.setComp1(txRequest.getComp1()); + rn_dynamic_transaction.setComp2(txRequest.getComp2()); + rn_dynamic_transaction.setComp3(txRequest.getComp3()); + rn_dynamic_transaction.setComp4(txRequest.getComp4()); + rn_dynamic_transaction.setComp5(txRequest.getComp5()); + rn_dynamic_transaction.setComp6(txRequest.getComp6()); + rn_dynamic_transaction.setComp7(txRequest.getComp7()); + rn_dynamic_transaction.setComp8(txRequest.getComp8()); + rn_dynamic_transaction.setComp9(txRequest.getComp9()); + rn_dynamic_transaction.setComp10(txRequest.getComp10()); + rn_dynamic_transaction.setComp11(txRequest.getComp11()); + rn_dynamic_transaction.setComp12(txRequest.getComp12()); + rn_dynamic_transaction.setComp13(txRequest.getComp13()); + rn_dynamic_transaction.setComp14(txRequest.getComp14()); + rn_dynamic_transaction.setComp15(txRequest.getComp15()); + rn_dynamic_transaction.setComp16(txRequest.getComp16()); + rn_dynamic_transaction.setComp17(txRequest.getComp17()); + rn_dynamic_transaction.setComp18(txRequest.getComp18()); + rn_dynamic_transaction.setComp19(txRequest.getComp19()); + rn_dynamic_transaction.setComp20(txRequest.getComp20()); + rn_dynamic_transaction.setComp21(txRequest.getComp21()); + rn_dynamic_transaction.setComp22(txRequest.getComp22()); + rn_dynamic_transaction.setComp23(txRequest.getComp23()); + rn_dynamic_transaction.setComp24(txRequest.getComp24()); + rn_dynamic_transaction.setComp25(txRequest.getComp25()); + rn_dynamic_transaction.setComp_l26(txRequest.getComp_l26()); + rn_dynamic_transaction.setComp_l27(txRequest.getComp_l27()); + rn_dynamic_transaction.setComp_l28(txRequest.getComp_l28()); + rn_dynamic_transaction.setComp_l29(txRequest.getComp_l29()); + rn_dynamic_transaction.setComp_l30(txRequest.getComp_l30()); + final Rn_Dynamic_Transaction updated_ext_field = rn_dynamic_transactionRepository.save(rn_dynamic_transaction); + return updated_ext_field; + } + + @Override + public boolean deleteById(int id) { +// if (!rn_dynamic_transactionRepository.findById(id)) { +// throw new ResourceNotFoundException("Data not Exist = " + id); +// } + Rn_Dynamic_Transaction rn_dynamic_transaction = rn_dynamic_transactionRepository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Data not found :: " + id)); + rn_dynamic_transactionRepository.delete(rn_dynamic_transaction); + return true; + } + + @Override + public Rn_Dynamic_Transaction getByIdAndFormId(int id, int form_id) { + Rn_Dynamic_Transaction rn_dynamic_transaction = rn_dynamic_transactionRepository.findByIdAndFormId(id, form_id) + .orElseThrow(() -> new ResourceNotFoundException("Data not found with id :: " + id + " and form_id ::" + form_id)); + return rn_dynamic_transaction; + } + +} diff --git a/backend/src/main/java/com/realnet/fnd/service/Rn_Forms_Setup_Service.java b/backend/src/main/java/com/realnet/fnd/service/Rn_Forms_Setup_Service.java new file mode 100644 index 0000000..3ce6485 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/service/Rn_Forms_Setup_Service.java @@ -0,0 +1,29 @@ +package com.realnet.fnd.service; + +import java.util.List; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; + +import com.realnet.fnd.entity.Rn_Forms_Setup; + +public interface Rn_Forms_Setup_Service { + List getAll(); + + Page getAll(Pageable p); + + Rn_Forms_Setup getById(int id); + + Rn_Forms_Setup save(Rn_Forms_Setup rn_forms_setup); + + Rn_Forms_Setup updateById(int id, Rn_Forms_Setup rn_forms_setup); + + boolean deleteById(int id); + + List getByFormId(int form_id); + + void buildDynamicForm(int form_id); + + String stringReplace(String str, String start, String end, String replaceWith); + +} diff --git a/backend/src/main/java/com/realnet/fnd/service/Rn_Forms_Setup_ServiceImpl.java b/backend/src/main/java/com/realnet/fnd/service/Rn_Forms_Setup_ServiceImpl.java new file mode 100644 index 0000000..d45d6c5 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/service/Rn_Forms_Setup_ServiceImpl.java @@ -0,0 +1,302 @@ +package com.realnet.fnd.service; + +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.List; + +import org.apache.commons.io.FileUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.stereotype.Service; + +import com.realnet.exceptions.ResourceNotFoundException; +import com.realnet.fnd.entity.Rn_Forms_Component_Setup; +import com.realnet.fnd.entity.Rn_Forms_Setup; +import com.realnet.fnd.repository.Rn_Forms_Setup_Repository; +import com.realnet.utils.WireFrameConstant; + +@Service +public class Rn_Forms_Setup_ServiceImpl implements Rn_Forms_Setup_Service { + + @Value("${angularProjectPath}") + private String angularProjectPath; + + @Autowired + private Rn_Forms_Setup_Repository rn_forms_setup_repository; + + @Override + public List getAll() { + return rn_forms_setup_repository.findAll(); + } + + @Override + public Page getAll(Pageable page) { + return rn_forms_setup_repository.findAll(page); + } + + @Override + public Rn_Forms_Setup getById(int id) { + Rn_Forms_Setup rn_forms_setup = rn_forms_setup_repository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Rn_Forms_Setup not found :: " + id)); + return rn_forms_setup; + } + + @Override + public Rn_Forms_Setup save(Rn_Forms_Setup rn_forms_setup) { + Rn_Forms_Setup savedRn_Forms_Setup = rn_forms_setup_repository.save(rn_forms_setup); + return savedRn_Forms_Setup; + } + + @Override + public Rn_Forms_Setup updateById(int id, Rn_Forms_Setup rn_forms_setupRequest) { + Rn_Forms_Setup old_rn_forms_setup = rn_forms_setup_repository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Rn_Forms_Setup not found :: " + id)); + old_rn_forms_setup.setButton_caption(rn_forms_setupRequest.getButton_caption()); + old_rn_forms_setup.setForm_desc(rn_forms_setupRequest.getForm_desc()); + old_rn_forms_setup.setForm_name(rn_forms_setupRequest.getForm_name()); + old_rn_forms_setup.setPage_event(rn_forms_setupRequest.getPage_event()); + old_rn_forms_setup.setRelated_to(rn_forms_setupRequest.getRelated_to()); + // line part + old_rn_forms_setup.setComponents(rn_forms_setupRequest.getComponents()); + // updated by + old_rn_forms_setup.setUpdatedBy(rn_forms_setupRequest.getUpdatedBy()); + final Rn_Forms_Setup updated_rn_forms_setup = rn_forms_setup_repository.save(old_rn_forms_setup); + return updated_rn_forms_setup; + } + + @Override + public boolean deleteById(int id) { + Rn_Forms_Setup rn_forms_setup = rn_forms_setup_repository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Rn_Forms_Setup not found :: " + id)); + rn_forms_setup_repository.delete(rn_forms_setup); + return true; + } + + @Override + public List getByFormId(int form_id) { + return rn_forms_setup_repository.findByFormId(form_id); + } + + @Override + public void buildDynamicForm(int form_id) + { + //HEADER + Rn_Forms_Setup rn_forms_setup = rn_forms_setup_repository.findById(form_id) + .orElseThrow(() -> new ResourceNotFoundException("Rn_Forms_Setup not found :: " + form_id)); + + //LINE + List components = rn_forms_setup.getComponents(); + String form_name = rn_forms_setup.getForm_name(); + String form_name_upper = form_name.toUpperCase(); + String buttonCaption = rn_forms_setup.getButton_caption(); + + StringBuilder dynamic_entry_form_html = new StringBuilder(); + StringBuilder dynamic_grid_view_form = new StringBuilder(); + StringBuilder dynamic_read_only_form = new StringBuilder(); + StringBuilder dynamic_edit_form = new StringBuilder(); + // add + dynamic_entry_form_html.append("
\r\n" + + "

ENTRY FORM

\r\n" + + "\r\n" + + "
\r\n" + + "

studen info

\r\n" + + "
\n" + + " \r\n" + + "
\r\n" + + " \r\n"); + + + // edit + dynamic_edit_form.append("
\r\n" + + "

EDIT FORM

\r\n" + + "
\r\n" + + "

" + form_name_upper + "

\r\n" + + "\r\n" + + "
\r\n" + + " \r\n" + + "
\n"); + + // read-only + dynamic_read_only_form.append("
\n"); + + int loopCount = 0; + for(Rn_Forms_Component_Setup component: components) + { + int i = ++loopCount; + String label = component.getLabel(); + String type = component.getType(); + boolean mandatory = Boolean.parseBoolean(component.getMandatory()); + boolean readonly = Boolean.parseBoolean(component.getReadonly()); + //boolean b1=Boolean.parseBoolean(string); + String drop_value = component.getDrop_values(); + + System.out.println("Label Name::" + label); + // FOR MODIFICATION REFER : com.realnet.wfb.service: SpringMVCFieldTypeServiceImpl.java + if(WireFrameConstant.DT_TEXTFIELD.equalsIgnoreCase(type)) { + // ENTRY FORM (.html) + dynamic_entry_form_html.append("\r\n" + + " \r\n" + + " \r\n" + + " \r\n"); + } else if (readonly) { + dynamic_entry_form_html.append(" style=\"width:180px\" readonly>\r\n" + + " \r\n" + + " \r\n"); + } else { + dynamic_entry_form_html.append(" style=\"width:180px\">\r\n" + + " \r\n" + + " \r\n"); + } + + // UPDATE FORM + dynamic_edit_form.append("\r\n" + + " \r\n" + + " \r\n" + + " \r\n"); + + } + + if(WireFrameConstant.DT_LONGTEXT.equalsIgnoreCase(type)) { + System.out.println("LONG TEXT i =" + i); + dynamic_entry_form_html.append(" \r\n" + + " \r\n" + + " \r\n" + + " \n"); + } + + + if (WireFrameConstant.FIELD_CHECKBOX.equalsIgnoreCase(type)) { + dynamic_entry_form_html.append(" \r\n" + + " \r\n" + + " \r\n" + " \n"); + } + + if (WireFrameConstant.FIELD_AUTOCOMPLETE.equalsIgnoreCase(type)) { + dynamic_entry_form_html.append(" \r\n" + " \r\n" + + " \r\n" + " \n"); + } + + // GRID VIEW FORM (.ts) + dynamic_grid_view_form.append("{prop:\"comp" + i + "\" , name: \"" + label + "\" , width:120 },\r\n"); + + // READ-ONLY FORM + dynamic_read_only_form.append("\r\n" + + " \r\n" + + " \r\n" + + " \r\n"); + + } // LOOP END + + // ADD + dynamic_entry_form_html.append("\n
" + label + ": \r\n" + + " \r\n" + + "
" + label + ":
" + label + ":
" + label + + "
" + label + + "
" + label + " {{ dynamicForm.comp" + i + " }}
\r\n" + + "
\r\n" + + " \r\n" + + "
\r\n" + + "
\r\n" + + "
\r\n"); + + + // UPDATE + dynamic_edit_form.append(" \r\n" + + "
\r\n" + + " \r\n" + + " \r\n" + + " \r\n" + + "\r\n"); + + // READ-ONLY + dynamic_read_only_form.append(" \r\n"); + + FileWriter fw = null; + BufferedWriter bw = null; + try { + + // ENTRY FORM + String ngDynamicEntryFormHtmlPath = angularProjectPath + + "/src/app/pages/dynamic-form/add/add-dynamic-form.component.html"; + File ngDynamicEntryFormHtmlFile = new File(ngDynamicEntryFormHtmlPath); + if (!ngDynamicEntryFormHtmlFile.exists()) { + ngDynamicEntryFormHtmlFile.createNewFile(); + } + fw = new FileWriter(ngDynamicEntryFormHtmlFile.getAbsoluteFile()); + bw = new BufferedWriter(fw); + bw.write(dynamic_entry_form_html.toString()); + bw.close(); + + // UPDATE FORM + String ngDynamicEditFormHtmlPath = angularProjectPath + + "/src/app/pages/dynamic-form/edit/edit-dynamic-form.component.html"; + File ngDynamicEditFormHtmlFile = new File(ngDynamicEditFormHtmlPath); + if (!ngDynamicEditFormHtmlFile.exists()) { + ngDynamicEditFormHtmlFile.createNewFile(); + } + fw = new FileWriter(ngDynamicEditFormHtmlFile.getAbsoluteFile()); + bw = new BufferedWriter(fw); + bw.write(dynamic_edit_form.toString()); + bw.close(); + + // GRID VIEW FORM + final String grid_form_start = "// DYNAMIC FORM GRID START"; + final String grid_form_end = "// DYNAMIC FORM GRID END"; + String grid_form_replaceWith = dynamic_grid_view_form.toString(); + String ngDynamicGridFormTsPath = angularProjectPath + + "/src/app/pages/dynamic-form/all/all-dynamic-form.component.ts"; + File ngDynamicGridFormTsFile = new File(ngDynamicGridFormTsPath); + String grid_fileString = FileUtils.readFileToString(ngDynamicGridFormTsFile, StandardCharsets.UTF_8); + String grid_finalString = stringReplace(grid_fileString, grid_form_start, grid_form_end, grid_form_replaceWith); + + bw = new BufferedWriter(new FileWriter(ngDynamicGridFormTsFile, false)); // replaced string + bw.write(grid_finalString); + bw.close(); + + // READ-ONLY FORM + final String read_only_form_start = ""; + final String read_only_form_end = ""; + String read_only_form_replaceWith = dynamic_read_only_form.toString(); + String ngDynamicReadOnlyFormHtmlPath = angularProjectPath + + "/src/app/pages/dynamic-form/read-only/read-only-dynamic-form.component.html"; + File ngDynamicReadOnlyFormHtmlFile = new File(ngDynamicReadOnlyFormHtmlPath); + String read_only_fileString = FileUtils.readFileToString(ngDynamicReadOnlyFormHtmlFile, StandardCharsets.UTF_8); + String read_only_finalString = stringReplace(read_only_fileString, read_only_form_start, read_only_form_end, read_only_form_replaceWith); + + bw = new BufferedWriter(new FileWriter(ngDynamicReadOnlyFormHtmlFile, false)); // replaced string + bw.write(read_only_finalString); + bw.close(); + + } catch (IOException e) { + e.printStackTrace(); + } + } + + @Override + public String stringReplace(String str, String start, String end, String replaceWith) { + int i = str.indexOf(start); + while (i != -1) { + int j = str.indexOf(end, i + 1); + if (j != -1) { + String data = str.substring(0, i + start.length()) + "\n" + replaceWith + "\n"; + String temp = str.substring(j); + data += temp; + str = data; + i = str.indexOf(start, i + replaceWith.length() + end.length() + 1); + } else { + break; + } + } + return str; + } + +} diff --git a/backend/src/main/java/com/realnet/fnd/service/Rn_Function_Register_Service.java b/backend/src/main/java/com/realnet/fnd/service/Rn_Function_Register_Service.java new file mode 100644 index 0000000..3e3e185 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/service/Rn_Function_Register_Service.java @@ -0,0 +1,21 @@ +package com.realnet.fnd.service; + +import java.util.List; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; + +import com.realnet.fnd.entity.Rn_Function_Register; + +public interface Rn_Function_Register_Service { + List getAll(); + Page getAll(Pageable p); + Rn_Function_Register getById(int id); + Rn_Function_Register save(Rn_Function_Register rn_function_register); + Rn_Function_Register updateById(int id, Rn_Function_Register rn_function_register); + boolean deleteById(int id); + + List getByMenuId(int menu_id); + + +} diff --git a/backend/src/main/java/com/realnet/fnd/service/Rn_Function_Register_ServiceImpl.java b/backend/src/main/java/com/realnet/fnd/service/Rn_Function_Register_ServiceImpl.java new file mode 100644 index 0000000..da760a2 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/service/Rn_Function_Register_ServiceImpl.java @@ -0,0 +1,81 @@ +package com.realnet.fnd.service; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.stereotype.Service; + +import com.realnet.exceptions.ResourceNotFoundException; +import com.realnet.fnd.entity.Rn_Function_Register; +import com.realnet.fnd.repository.Rn_Function_Register_Repository; + +@Service +public class Rn_Function_Register_ServiceImpl implements Rn_Function_Register_Service { + + @Autowired + private Rn_Function_Register_Repository rn_function_register_repository; + + @Override + public List getAll() { + return rn_function_register_repository.findAll(); + } + + @Override + public Page getAll(Pageable page) { + return rn_function_register_repository.findAll(page); + } + + @Override + public Rn_Function_Register getById(int id) { + Rn_Function_Register rn_function_register = rn_function_register_repository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Menu not found :: " + id)); + return rn_function_register; + } + + @Override + public Rn_Function_Register save(Rn_Function_Register rn_function_register) { + Rn_Function_Register savedRn_Function_Register = rn_function_register_repository.save(rn_function_register); + return savedRn_Function_Register; + } + + @Override + public Rn_Function_Register updateById(int id, Rn_Function_Register functionRequest) { + Rn_Function_Register old_function = rn_function_register_repository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Menu not found :: " + id)); + + old_function.setMenu_id(functionRequest.getMenu_id()); + old_function.setFunction_name(functionRequest.getFunction_name()); + old_function.setFunction_action_name(functionRequest.getFunction_action_name()); + old_function.setFunction_icon(functionRequest.getFunction_icon()); + old_function.setEnd_date(functionRequest.getEnd_date()); + old_function.setEnable_flag(functionRequest.getEnable_flag()); + //This is for line part + // old_function.setStudents(functionRequest.getStudents()); // need to improve + old_function.setUpdatedBy(functionRequest.getUpdatedBy()); + final Rn_Function_Register updated_function = rn_function_register_repository.save(old_function); + return updated_function; + } + + @Override + public boolean deleteById(int id) { +// if (!rn_function_register_repository.existsById(id)) { +// throw new ResourceNotFoundException("Rn_Menu not exist"); +// } + Rn_Function_Register rn_function_register = rn_function_register_repository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Menu not found :: " + id)); + rn_function_register_repository.delete(rn_function_register); + return true; + } + + @Override + public List getByMenuId(int menu_id) { +// List functions = rn_function_register_repository.findByMenuId(menu_id); +// if(functions.isEmpty()) { +// throw new ResourceNotFoundException("Rn_Function_Register Is Empty"); +// } + return rn_function_register_repository.findByMenuId(menu_id); + } + +} diff --git a/backend/src/main/java/com/realnet/fnd/service/Rn_Main_Menu_Service.java b/backend/src/main/java/com/realnet/fnd/service/Rn_Main_Menu_Service.java new file mode 100644 index 0000000..4029dec --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/service/Rn_Main_Menu_Service.java @@ -0,0 +1,25 @@ +package com.realnet.fnd.service; + +import java.util.List; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; + +import com.realnet.fnd.entity.Rn_Main_Menu; + +public interface Rn_Main_Menu_Service { + List getAll(); + + Page getAll(Pageable p); + + List getByAccountId(String account_id); + + Rn_Main_Menu getById(int id); + + Rn_Main_Menu save(Rn_Main_Menu rn_Main_Menu); + + Rn_Main_Menu updateById(int id, Rn_Main_Menu rn_main_menu); + + boolean deleteById(int id); + +} diff --git a/backend/src/main/java/com/realnet/fnd/service/Rn_Main_Menu_ServiceImpl.java b/backend/src/main/java/com/realnet/fnd/service/Rn_Main_Menu_ServiceImpl.java new file mode 100644 index 0000000..de06fab --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/service/Rn_Main_Menu_ServiceImpl.java @@ -0,0 +1,79 @@ +package com.realnet.fnd.service; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.stereotype.Service; + +import com.realnet.exceptions.ResourceNotFoundException; +import com.realnet.fnd.entity.Rn_Main_Menu; +import com.realnet.fnd.repository.Rn_Main_Menu_Repository; + +@Service +public class Rn_Main_Menu_ServiceImpl implements Rn_Main_Menu_Service { + + @Autowired + private Rn_Main_Menu_Repository rn_menu_register_repository; + + @Override + public List getAll() { + return rn_menu_register_repository.findAll(); + } + + @Override + public Page getAll(Pageable page) { + return rn_menu_register_repository.findAll(page); + } + + @Override + public List getByAccountId(String account_id) { + List rn_menu_register = rn_menu_register_repository.findByAccountId(account_id); + if (rn_menu_register.isEmpty()) { + throw new ResourceNotFoundException("Menu not found With Account id :: " + account_id); + } + return rn_menu_register; + } + + @Override + public Rn_Main_Menu getById(int id) { + Rn_Main_Menu rn_menu_register = rn_menu_register_repository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Menu not found :: " + id)); + return rn_menu_register; + } + + @Override + public Rn_Main_Menu save(Rn_Main_Menu rn_menu_register) { + Rn_Main_Menu savedRn_Main_Menu = rn_menu_register_repository.save(rn_menu_register); + return savedRn_Main_Menu; + } + + @Override + public Rn_Main_Menu updateById(int id, Rn_Main_Menu menuRequest) { + Rn_Main_Menu old_menu = rn_menu_register_repository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Menu not found :: " + id)); + + old_menu.setMenu_name(menuRequest.getMenu_name()); + old_menu.setMenu_action_link(menuRequest.getMenu_action_link()); + old_menu.setMenu_icon(menuRequest.getMenu_icon()); + old_menu.setMenu_type(menuRequest.getMenu_type()); + // This is for line part // need to improve + old_menu.setSub_menus(menuRequest.getSub_menus()); + old_menu.setUpdatedBy(menuRequest.getUpdatedBy()); + final Rn_Main_Menu updated_menu = rn_menu_register_repository.save(old_menu); + return updated_menu; + } + + @Override + public boolean deleteById(int id) { +// if (!rn_menu_register_repository.existsById(id)) { +// throw new ResourceNotFoundException("Rn_Menu not exist"); +// } + Rn_Main_Menu rn_menu_register = rn_menu_register_repository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Menu not found :: " + id)); + rn_menu_register_repository.delete(rn_menu_register); + return true; + } + +} diff --git a/backend/src/main/java/com/realnet/fnd/service/Rn_Menu_Group_Service.java b/backend/src/main/java/com/realnet/fnd/service/Rn_Menu_Group_Service.java new file mode 100644 index 0000000..a343d60 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/service/Rn_Menu_Group_Service.java @@ -0,0 +1,29 @@ +package com.realnet.fnd.service; + +import java.util.List; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; + +import com.realnet.fnd.entity.Rn_Menu_Group_Header; + +public interface Rn_Menu_Group_Service { + List getAll(); + + Page getAll(Pageable p); + + Rn_Menu_Group_Header getById(Long id); + + Rn_Menu_Group_Header save(Rn_Menu_Group_Header rn_menu_group_header); + + Rn_Menu_Group_Header updateById(Long id, Rn_Menu_Group_Header rn_menu_group_header); + + boolean deleteById(Long id); + + //List getByFormId(int form_id); + + //Rn_Main_Menu loadmenuGroupByUser(int menu_group_id); + + + +} diff --git a/backend/src/main/java/com/realnet/fnd/service/Rn_Menu_Group_ServiceImpl.java b/backend/src/main/java/com/realnet/fnd/service/Rn_Menu_Group_ServiceImpl.java new file mode 100644 index 0000000..1fdddad --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/service/Rn_Menu_Group_ServiceImpl.java @@ -0,0 +1,86 @@ +package com.realnet.fnd.service; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.stereotype.Service; + +import com.realnet.exceptions.ResourceNotFoundException; +import com.realnet.fnd.entity.Rn_Menu_Group_Header; +import com.realnet.fnd.repository.Rn_Menu_Group_Repository; + +@Service +public class Rn_Menu_Group_ServiceImpl implements Rn_Menu_Group_Service { + + + @Autowired + private Rn_Menu_Group_Repository rn_menu_group_repository; + + @Override + public List getAll() { + return rn_menu_group_repository.findAll(); + } + + @Override + public Page getAll(Pageable page) { + return rn_menu_group_repository.findAll(page); + } + + @Override + public Rn_Menu_Group_Header getById(Long id) { + Rn_Menu_Group_Header rn_forms_setup = rn_menu_group_repository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Rn_Menu_Group not found :: " + id)); + return rn_forms_setup; + } + + @Override + public Rn_Menu_Group_Header save(Rn_Menu_Group_Header rn_menu_group_header) { + Rn_Menu_Group_Header savedMenu_Group = rn_menu_group_repository.save(rn_menu_group_header); + return savedMenu_Group; + } + + @Override + public Rn_Menu_Group_Header updateById(Long id, Rn_Menu_Group_Header menu_groupRequest) { + Rn_Menu_Group_Header old_rn_menu_group = rn_menu_group_repository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Rn_Menu_Group not found :: " + id)); + old_rn_menu_group.setMenu_name(menu_groupRequest.getMenu_name()); + old_rn_menu_group.setDescription(menu_groupRequest.getDescription()); +// old_rn_menu_group.setActive(menu_groupRequest.getActive()); + old_rn_menu_group.setStart_date(menu_groupRequest.getStart_date()); + old_rn_menu_group.setEnd_date(menu_groupRequest.getEnd_date()); + // line part + old_rn_menu_group.setMenu_group_lines(menu_groupRequest.getMenu_group_lines()); + // updated by + old_rn_menu_group.setUpdatedBy(menu_groupRequest.getUpdatedBy()); + final Rn_Menu_Group_Header updated_rn_forms_setup = rn_menu_group_repository.save(old_rn_menu_group); + return updated_rn_forms_setup; + } + + @Override + public boolean deleteById(Long id) { + Rn_Menu_Group_Header rn_forms_setup = rn_menu_group_repository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Rn_Menu_Group_Header not found :: " + id)); + rn_menu_group_repository.delete(rn_forms_setup); + return true; + } + + // this is not done +// @Override +// public Rn_Main_Menu loadmenuGroupByUser(int menu_group_id) { +// Rn_Menu_Group_Header menu_group_header = getById(menu_group_id); +// List menu_group_lines = menu_group_header.getMenu_group_lines(); +// for(Rn_Menu_Group_Line menu_group_line : menu_group_lines) { +// int menu_id = menu_group_line.getMenu_id(); +// +// } +// return null; +// } + + /* + * @Override public List getByFormId(int form_id) { return + * rn_menu_group_repository.findByFormId(form_id); } + */ + +} diff --git a/backend/src/main/java/com/realnet/fnd/service/Rn_Menu_Register_Service.java b/backend/src/main/java/com/realnet/fnd/service/Rn_Menu_Register_Service.java new file mode 100644 index 0000000..6d92595 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/service/Rn_Menu_Register_Service.java @@ -0,0 +1,19 @@ +package com.realnet.fnd.service; + +import java.util.List; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; + +import com.realnet.fnd.entity.Rn_Menu_Register; + +public interface Rn_Menu_Register_Service { + List getAll(); + Page getAll(Pageable p); + List getByAccountId(String account_id); + Rn_Menu_Register getById(int id); + Rn_Menu_Register save(Rn_Menu_Register rn_Menu_Register); + Rn_Menu_Register updateById(int id, Rn_Menu_Register rn_Menu_Register); + boolean deleteById(int id); + +} diff --git a/backend/src/main/java/com/realnet/fnd/service/Rn_Menu_Register_ServiceImpl.java b/backend/src/main/java/com/realnet/fnd/service/Rn_Menu_Register_ServiceImpl.java new file mode 100644 index 0000000..f3a5229 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/service/Rn_Menu_Register_ServiceImpl.java @@ -0,0 +1,82 @@ +package com.realnet.fnd.service; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.stereotype.Service; + +import com.realnet.exceptions.ResourceNotFoundException; +import com.realnet.fnd.entity.Rn_Menu_Register; +import com.realnet.fnd.repository.Rn_Menu_Register_Repository; + +@Service +public class Rn_Menu_Register_ServiceImpl implements Rn_Menu_Register_Service { + + @Autowired + private Rn_Menu_Register_Repository rn_menu_register_repository; + + @Override + public List getAll() { + return rn_menu_register_repository.findAll(); + } + + @Override + public Page getAll(Pageable page) { + return rn_menu_register_repository.findAll(page); + } + + @Override + public List getByAccountId(String account_id) { + List rn_menu_register = rn_menu_register_repository.findByAccountId(account_id); + if(rn_menu_register.isEmpty()) { + throw new ResourceNotFoundException("Menus not found With Account id :: " + account_id); + } + return rn_menu_register; + } + + @Override + public Rn_Menu_Register getById(int id) { + Rn_Menu_Register rn_menu_register = rn_menu_register_repository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Menu not found :: " + id)); + return rn_menu_register; + } + + @Override + public Rn_Menu_Register save(Rn_Menu_Register rn_menu_register) { + Rn_Menu_Register savedRn_Menu_Register = rn_menu_register_repository.save(rn_menu_register); + return savedRn_Menu_Register; + } + + @Override + public Rn_Menu_Register updateById(int id, Rn_Menu_Register menuRequest) { + Rn_Menu_Register old_menu = rn_menu_register_repository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Menu not found :: " + id)); + + old_menu.setMain_menu_name(menuRequest.getMain_menu_name()); + old_menu.setMain_menu_action_name(menuRequest.getMain_menu_action_name()); + old_menu.setMain_menu_icon(menuRequest.getMain_menu_icon()); + old_menu.setEnable_flag(menuRequest.getEnable_flag()); + old_menu.setEnd_date(menuRequest.getEnd_date()); + //This is for line part + // old_menu.setStudents(menuRequest.getStudents()); // need to improve + old_menu.setUpdatedBy(menuRequest.getUpdatedBy()); + final Rn_Menu_Register updated_menu = rn_menu_register_repository.save(old_menu); + return updated_menu; + } + + @Override + public boolean deleteById(int id) { +// if (!rn_menu_register_repository.existsById(id)) { +// throw new ResourceNotFoundException("Rn_Menu not exist"); +// } + Rn_Menu_Register rn_menu_register = rn_menu_register_repository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Menu not found :: " + id)); + rn_menu_register_repository.delete(rn_menu_register); + return true; + } + + + +} diff --git a/backend/src/main/java/com/realnet/fnd/service1/GrpMenuAccessServiceImpl.java b/backend/src/main/java/com/realnet/fnd/service1/GrpMenuAccessServiceImpl.java new file mode 100644 index 0000000..0c26709 --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/service1/GrpMenuAccessServiceImpl.java @@ -0,0 +1,25 @@ +package com.realnet.fnd.service1; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Pageable; +import org.springframework.stereotype.Service; + +import com.realnet.fnd.entity1.GrpMenuAccess; +import com.realnet.fnd.repository1.GrpMenuAccessRepository; + +@Service +public class GrpMenuAccessServiceImpl { + private GrpMenuAccessRepository grpMenuAccessRepository; + @Autowired + public GrpMenuAccessServiceImpl(GrpMenuAccessRepository grpMenuAccessRepository) { + super(); + this.grpMenuAccessRepository = grpMenuAccessRepository; + } + public List getAll(Pageable page){ + List l = grpMenuAccessRepository.findAll(page).getContent(); + return l; + } + +} diff --git a/backend/src/main/java/com/realnet/fnd/service1/MenuDetServiceImpl.java b/backend/src/main/java/com/realnet/fnd/service1/MenuDetServiceImpl.java new file mode 100644 index 0000000..04bea5c --- /dev/null +++ b/backend/src/main/java/com/realnet/fnd/service1/MenuDetServiceImpl.java @@ -0,0 +1,33 @@ +package com.realnet.fnd.service1; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Pageable; +import org.springframework.stereotype.Service; + +import com.realnet.fnd.entity1.MenuDet; +import com.realnet.fnd.repository1.MenuDetRepository; + +@Service +public class MenuDetServiceImpl { + private MenuDetRepository menuDetRepository; + @Autowired + public MenuDetServiceImpl(MenuDetRepository menuDetRepository) { + super(); + this.menuDetRepository = menuDetRepository; + } + public List getAll(){ + return menuDetRepository.findAll(); + } + public List getAllObject(Pageable page){ + List l = menuDetRepository.getAll(page).getContent(); + return l; + } + public List getById(Long usrGrp,Long menuId){ + return menuDetRepository.getById(usrGrp, menuId); + } + public List getByUserId(Long usrGrp,Long menuId) { + return menuDetRepository.getByUserId(usrGrp,menuId); + } +} diff --git a/backend/src/main/java/com/realnet/logging/LogEntity.java b/backend/src/main/java/com/realnet/logging/LogEntity.java new file mode 100644 index 0000000..a53e3d4 --- /dev/null +++ b/backend/src/main/java/com/realnet/logging/LogEntity.java @@ -0,0 +1,38 @@ +package com.realnet.logging; + +import org.springframework.data.annotation.Id; +import org.springframework.data.mongodb.core.mapping.Document; + +//import javax.persistence.Column; +//import javax.persistence.Entity; +//import javax.persistence.Id; +//import javax.persistence.Table; + +import lombok.Data; + +@Data +//@Entity +//@Table(name= "LOGS") +@Document +public class LogEntity { + + @Id + private String mongoid; + +// @Id +// @Column(name="USER_ID") + private Long userId; + +// @Column(name="DATED") + private String dated; + +// @Column(name="LOGGER") + private String logger; + +// @Column(name="LAVEL") + private String lavel; + +// @Column(name="MESSAGE") + private String message; + +} diff --git a/backend/src/main/java/com/realnet/logging/LogExecutionTime.java b/backend/src/main/java/com/realnet/logging/LogExecutionTime.java new file mode 100644 index 0000000..4743378 --- /dev/null +++ b/backend/src/main/java/com/realnet/logging/LogExecutionTime.java @@ -0,0 +1,12 @@ +package com.realnet.logging; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Target(ElementType.METHOD) +@Retention(RetentionPolicy.RUNTIME) +public @interface LogExecutionTime { + +} diff --git a/backend/src/main/java/com/realnet/logging/LoggingAspect.java b/backend/src/main/java/com/realnet/logging/LoggingAspect.java new file mode 100644 index 0000000..c775758 --- /dev/null +++ b/backend/src/main/java/com/realnet/logging/LoggingAspect.java @@ -0,0 +1,145 @@ +package com.realnet.logging; + +import java.util.concurrent.TimeUnit; + +import org.aspectj.lang.JoinPoint; +import org.aspectj.lang.ProceedingJoinPoint; +import org.aspectj.lang.annotation.AfterReturning; +import org.aspectj.lang.annotation.AfterThrowing; +import org.aspectj.lang.annotation.Around; +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.Pointcut; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; + +import lombok.Data; + +@Data +@Component +public class LoggingAspect { + + Logger logger = LoggerFactory.getLogger(LoggingAspect.class); + + // static Logger logger = LogManager.getLogger(LoggingAspect.class.getName()); + + /* + * 1. (..) zero or more || (*) one or more args + * 2. @Before("execution(* com.realnet.*.*(..))") + * 3. getTarger() returns the Object name + */ + +// @Before("packagePointcut()") +// public void beforeMethodCall(JoinPoint joinPoint) throws JsonProcessingException { +// String className = joinPoint.getTarget().getClass().toString(); // com.realnet.controller.Rn_InstructorController +// String methodName = joinPoint.getSignature().getName(); //// getInstructors +// String methodSignature = joinPoint.getSignature().toString(); +// +// // Rn_InstructorResponse com.realnet.controller.Rn_InstructorController.getInstructors(Integer,Integer) +// //System.out.println(methodSignature); +// String method = getMethodSignature(methodSignature); +// logger.info("Executing " + className + " : " + method); +// +// Object[] args = joinPoint.getArgs(); +// // object into json format +// ObjectMapper mapper = new ObjectMapper(); +// String json = mapper.writeValueAsString(args); +// logger.debug("Arguments: " + json); +// } + + // handle before after together + @Around("anyClasses()") + public Object LoggingAdvice(ProceedingJoinPoint pjp) throws Throwable { + String className = pjp.getTarget().getClass().toString(); + // String methodName = pjp.getSignature().getName(); + String methodSignature = pjp.getSignature().toString(); + String methodName = methodSignature(methodSignature); + Object[] args = pjp.getArgs(); + // object into json format + ObjectMapper mapper = new ObjectMapper(); + String json = mapper.writeValueAsString(args); + logger.info("Executing : " + className + " : " + methodName); + logger.debug("Arguments: " + args); + Object object = pjp.proceed(); + logger.info("Execution complete: " + className + " : " + methodName); + logger.debug(className + " : " + methodName + " Response: " + json); + return object; + } + + + @AfterReturning("anyClasses()") + public void afterMethodCall(JoinPoint joinPoint) throws JsonProcessingException { + String className = joinPoint.getTarget().getClass().toString(); + String methodSignature = joinPoint.getSignature().toString(); + String methodName = methodSignature(methodSignature); + Object[] args = joinPoint.getArgs(); + // object into json format + ObjectMapper mapper = new ObjectMapper(); + String json = mapper.writeValueAsString(args); + logger.info("Successfully Executed: " + className + " : " + methodName); + } + + // handle exception + @AfterThrowing(pointcut = "anyClasses()", throwing = "ex") + public void errorHandling(JoinPoint joinPoint, Exception ex) throws JsonProcessingException { + String className = joinPoint.getTarget().getClass().toString(); + // String methodName = joinPoint.getSignature().getName(); + String methodSignature = joinPoint.getSignature().toString(); + String methodName = methodSignature(methodSignature); + Object[] args = joinPoint.getArgs(); + // object into json format + ObjectMapper mapper = new ObjectMapper(); + String json = mapper.writeValueAsString(args); + logger.debug(className + " : " + methodName + "Arguments: " + json); + logger.error("Some Exception Happens: " + className + " : " + methodName); + logger.error(ex.getMessage()); + } + + // any package, any class, any method inside com.realnet + @Pointcut("execution(* com.realnet.*.*.*(..)) && !@annotation(com.realnet.logging.NoLogging)") + public void packagePointcut() { + } + // any public class + @Pointcut("within(com.realnet..*) && !@annotation(com.realnet.logging.NoLogging)") + private void anyClasses() {} + + + // problem in config class + @Pointcut("!within(com.realnet.config..*)") + private void configOperations() { + } + + @Around("@annotation(com.realnet.logging.LogExecutionTime)") + public Object logExecutionTime(ProceedingJoinPoint joinPoint) throws Throwable { + long start = System.currentTimeMillis(); + + Object proceed = joinPoint.proceed(); + + long executionTime = System.currentTimeMillis() - start; + + long seconds = TimeUnit.MILLISECONDS.toSeconds(executionTime); + long minutes = (executionTime/1000)/60; + + System.out.println(joinPoint.getSignature() + " executed in " + seconds + "sec(" + minutes + " Mins)"); + return proceed; + } + + + + + static String methodSignature(String name) { + name = name.substring(name.lastIndexOf(".") + 1); + return name; + } + + + +// // any public class +// @Pointcut("execution(public * *(..))") +// private void anyPublicOperation() {} +} diff --git a/backend/src/main/java/com/realnet/logging/NoLogging.java b/backend/src/main/java/com/realnet/logging/NoLogging.java new file mode 100644 index 0000000..bebdce1 --- /dev/null +++ b/backend/src/main/java/com/realnet/logging/NoLogging.java @@ -0,0 +1,11 @@ +package com.realnet.logging; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Target(ElementType.METHOD) +@Retention(RetentionPolicy.RUNTIME) +public @interface NoLogging { +} diff --git a/backend/src/main/java/com/realnet/logging/SecurityNoLogging.java b/backend/src/main/java/com/realnet/logging/SecurityNoLogging.java new file mode 100644 index 0000000..933716b --- /dev/null +++ b/backend/src/main/java/com/realnet/logging/SecurityNoLogging.java @@ -0,0 +1,11 @@ +package com.realnet.logging; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Target(ElementType.TYPE) +@Retention(RetentionPolicy.RUNTIME) +public @interface SecurityNoLogging { +} diff --git a/backend/src/main/java/com/realnet/logging1/ExceptionLoggingController.java b/backend/src/main/java/com/realnet/logging1/ExceptionLoggingController.java new file mode 100644 index 0000000..cd8da91 --- /dev/null +++ b/backend/src/main/java/com/realnet/logging1/ExceptionLoggingController.java @@ -0,0 +1,92 @@ +//package com.realnet.logging1; +// +//import java.io.File; +//import java.io.FileWriter; +//import java.nio.file.FileSystems; +//import java.nio.file.Path; +//import java.nio.file.Paths; +// +//import javax.servlet.http.HttpSession; +// +//import org.slf4j.Logger; +//import org.slf4j.LoggerFactory; +//import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.boot.web.servlet.error.ErrorController; +//import org.springframework.http.HttpStatus; +//import org.springframework.http.ResponseEntity; +//import org.springframework.web.bind.annotation.ExceptionHandler; +//import org.springframework.web.bind.annotation.RestControllerAdvice; +// +//import com.realnet.config.HttpLoggingFilter; +//import com.realnet.users.service1.AppUserServiceImpl; +// +//@RestControllerAdvice +//public class ExceptionLoggingController implements ErrorController{ +// private static final String ERROR_PATH = "/error"; +// private final Logger LOGGER = LoggerFactory.getLogger(getClass()); +// @Autowired +// private AppUserServiceImpl appUserServiceImpl; +// +// public ExceptionLoggingController(AppUserServiceImpl appUserServiceImpl) { +// super(); +// this.appUserServiceImpl = appUserServiceImpl; +// } +// +// @ExceptionHandler(Exception.class) +// public ResponseEntity internalServerEror(Exception exception,HttpSession session){ +// StackTraceElement[] e = exception.getStackTrace(); +// System.out.println(e[0].getMethodName()); +// System.out.println(e[0].getClassName()); +// LOGGER.error("Unhandled Error By "+appUserServiceImpl.getLoggedInUser().getUsername()+" = "+exception.getMessage()); +// LOGGER.error("Request Info = "+HttpLoggingFilter.logInfo+"Error at Mehod= "+e[0].getMethodName()+" In Class= "+e[0].getClassName()); +// if(session.getAttribute("generate_log").equals("Y")) { +// try { +// if (session.getAttribute("LogginLevel").equals("error")) { +// Path root = FileSystems.getDefault().getPath("").toAbsolutePath(); +// Path filePath = Paths.get(root.toString(),"logs",session.getAttribute("LogFileName").toString()); +// File f=filePath.toFile(); +// // File f = new File("/home/jboss/EAP-7.1.0/logs/sysadmin2_5463783.log"); +// FileWriter fw = new FileWriter(f,true); +// StringBuilder logInfo = HttpLoggingFilter.logInfo; +// logInfo.append(" [RESPONSE:").append(" ERROR]").append(" [ERROR AT ").append(e[0].getMethodName()) +// .append(" IN CLASS ").append(e[0].getClassName()).append("]"); +// fw.write(logInfo + "\n"); +// fw.close(); +// } else if (session.getAttribute("LogginLevel").equals("debug")) { +// Path root = FileSystems.getDefault().getPath("").toAbsolutePath(); +// Path filePath = Paths.get(root.toString(),"logs",session.getAttribute("LogFileName").toString()); +// File f=filePath.toFile(); +// // File f = new File("/home/jboss/EAP-7.1.0/logs/sysadmin2_5463783.log"); +// FileWriter fw = new FileWriter(f,true); +// StringBuilder logInfo = HttpLoggingFilter.logInfo; +// logInfo.append(" [RESPONSE:").append(" DEBUG]").append(" [ERROR AT ").append(e[0].getMethodName()) +// .append(" IN CLASS ").append(e[0].getClassName()).append("]"); +// fw.write(logInfo + "\n"); +// fw.close(); +// HttpLoggingFilter.logged=true; +// } else if (session.getAttribute("LogginLevel").equals("warn")) { +// Path root = FileSystems.getDefault().getPath("").toAbsolutePath(); +// Path filePath = Paths.get(root.toString(),"logs",session.getAttribute("LogFileName").toString()); +// File f=filePath.toFile(); +// // File f = new File("/home/jboss/EAP-7.1.0/logs/sysadmin2_5463783.log"); +// FileWriter fw = new FileWriter(f,true); +// StringBuilder logInfo = HttpLoggingFilter.logInfo; +// logInfo.append(" [RESPONSE:").append(" WARN]").append(" [ERROR AT ").append(e[0].getMethodName()) +// .append(" IN CLASS ").append(e[0].getClassName()).append("]"); +// fw.write(logInfo + "\n"); +// fw.close(); +// } +// } catch (Exception e1) { +// +// } +// } +// return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR); +// } +// +// @Override +// public String getErrorPath() { +// // TODO Auto-generated method stub +// return ERROR_PATH; +// } +// +//} diff --git a/backend/src/main/java/com/realnet/logging1/PatternLayoutWithUserContext.java b/backend/src/main/java/com/realnet/logging1/PatternLayoutWithUserContext.java new file mode 100644 index 0000000..55f1f0e --- /dev/null +++ b/backend/src/main/java/com/realnet/logging1/PatternLayoutWithUserContext.java @@ -0,0 +1,12 @@ +package com.realnet.logging1; + +import ch.qos.logback.classic.PatternLayout; + +public class PatternLayoutWithUserContext extends PatternLayout { + static { + PatternLayout.defaultConverterMap.put( + "user", UserConverter.class.getName()); + PatternLayout.defaultConverterMap.put( + "session", SessionConverter.class.getName()); + } +} \ No newline at end of file diff --git a/backend/src/main/java/com/realnet/logging1/SessionConverter.java b/backend/src/main/java/com/realnet/logging1/SessionConverter.java new file mode 100644 index 0000000..52954cd --- /dev/null +++ b/backend/src/main/java/com/realnet/logging1/SessionConverter.java @@ -0,0 +1,18 @@ +package com.realnet.logging1; + +import org.springframework.web.context.request.RequestAttributes; +import org.springframework.web.context.request.RequestContextHolder; + +import ch.qos.logback.classic.pattern.ClassicConverter; +import ch.qos.logback.classic.spi.ILoggingEvent; + +public class SessionConverter extends ClassicConverter { + @Override + public String convert(ILoggingEvent event) { + RequestAttributes attrs = RequestContextHolder.getRequestAttributes(); + if (attrs != null) { + return attrs.getSessionId(); + } + return "NO_SESSION"; + } +} \ No newline at end of file diff --git a/backend/src/main/java/com/realnet/logging1/UserConverter.java b/backend/src/main/java/com/realnet/logging1/UserConverter.java new file mode 100644 index 0000000..f72cbe2 --- /dev/null +++ b/backend/src/main/java/com/realnet/logging1/UserConverter.java @@ -0,0 +1,18 @@ +package com.realnet.logging1; + +import org.springframework.security.core.Authentication; +import org.springframework.security.core.context.SecurityContextHolder; + +import ch.qos.logback.classic.pattern.ClassicConverter; +import ch.qos.logback.classic.spi.ILoggingEvent; + +public class UserConverter extends ClassicConverter { + @Override + public String convert(ILoggingEvent event) { + Authentication auth = SecurityContextHolder.getContext().getAuthentication(); + if (auth != null) { + return auth.getName(); + } + return "NO_USER"; + } +} \ No newline at end of file diff --git a/backend/src/main/java/com/realnet/logging1/controller/AppUserLogController.java b/backend/src/main/java/com/realnet/logging1/controller/AppUserLogController.java new file mode 100644 index 0000000..ddc9cea --- /dev/null +++ b/backend/src/main/java/com/realnet/logging1/controller/AppUserLogController.java @@ -0,0 +1,183 @@ +package com.realnet.logging1.controller; + +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.time.Instant; +import java.util.Date; +import java.util.List; + +import javax.servlet.http.HttpSession; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.CrossOrigin; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.logging1.entity.AppUserLog; +import com.realnet.logging1.service.LoggingService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; + +@RestController +@CrossOrigin(origins = "*", maxAge = 3600) +@RequestMapping(value="/log" ) +public class AppUserLogController { + private LoggingService loggingService; + private AppUserServiceImpl appUserServiceImpl; + @Autowired + public AppUserLogController(LoggingService loggingService, + AppUserServiceImpl appUserServiceImpl) { + super(); + this.loggingService = loggingService; + this.appUserServiceImpl=appUserServiceImpl; + } + + @GetMapping("/getAll") + public ResponseEntity getAllLog(){ + List l = loggingService.getAll(); + return new ResponseEntity<>(l,HttpStatus.OK); + } + @GetMapping("/getOne/{id}") + public ResponseEntity getOne(@PathVariable("id") Long id){ + AppUserLog a = loggingService.getOne(id); + if(a!=null) { + return new ResponseEntity<>(a,HttpStatus.OK); + } + return new ResponseEntity<>("Not Found",HttpStatus.BAD_REQUEST); + } + @GetMapping("/startLogging/{username}/{mode}") + public ResponseEntity addOne(@PathVariable("username") String username,@PathVariable("mode")String mode,HttpSession session){ + AppUser a = appUserServiceImpl.getByUserName(username).orElse(null); + DateFormat simple =new SimpleDateFormat("dd MMM yyyy HH:mm:ss"); + if(a!=null) { + AppUserLog l = loggingService.getOne(a.getUserId()); + if(l!=null) { + l.setGenerateLog("Y"); + if(mode!=null) { + l.setLogLevel(mode); + } + loggingService.update(l); + session.setAttribute("generate_log","Y"); + Object a1 = new Object() { + private String message="Will now Start logging"; + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + }; + return new ResponseEntity<>(a1,HttpStatus.OK); + }else { + long ut1 = Instant.now().getEpochSecond(); + AppUserLog p =new AppUserLog(); + p.setUserName(a.getUsername()); + p.setGenerateLog("Y"); + p.setLogFileName(a.getUsername()+ut1+".log"); + p.setLogLevel("info"); + if(mode!=null) { + p.setLogLevel(mode); + } + p.setGenerateLog("Y"); + p.setCreatedOn(new Date()); + p.setCreatedOnFormated(simple.format(new Date())); + loggingService.add(p); + session.setAttribute("generate_log","Y"); + Object a1 = new Object() { + private String message="Will now Start logging"; + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + }; + return new ResponseEntity<>(a1,HttpStatus.OK); + } + } + Object a1 = new Object() { + private String message="No user found with this username"; + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + }; + return new ResponseEntity<>(a1,HttpStatus.OK); + } + @GetMapping("/stopLogging/{username}") + public ResponseEntity stopLog(@PathVariable("username") String username,HttpSession session){ + AppUser a = appUserServiceImpl.getByUserName(username).orElse(null); + DateFormat simple =new SimpleDateFormat("dd MMM yyyy HH:mm:ss"); + if(a!=null) { + AppUserLog l = loggingService.getOne(a.getUserId()); + if(l!=null) { + l.setGenerateLog("N"); + loggingService.add(l); + session.setAttribute("generate_log","N"); + Object a1 = new Object() { + private String message="Will now Stop logging from next session"; + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + }; + return new ResponseEntity<>(a1,HttpStatus.OK); + }else { + long ut1 = Instant.now().getEpochSecond(); + //AppUserLog p = new AppUserLog(c,a.getUsername(),"Y",a.getUsername()+ut1+".log","info",null,null); + AppUserLog p =new AppUserLog(); + p.setUserName(a.getUsername()); + p.setLogFileName(a.getUsername()+ut1+".log"); + p.setLogLevel("info"); + p.setGenerateLog("N"); + p.setCreatedOn(new Date()); + p.setCreatedOnFormated(simple.format(new Date())); + loggingService.add(p); + session.setAttribute("generate_log","N"); + Object a1 = new Object() { + private String message="Will now Stop logging from next session"; + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + }; + return new ResponseEntity<>(a1,HttpStatus.OK); + } + } + Object a1 = new Object() { + private String message="No user found with this username"; + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + }; + return new ResponseEntity<>(a1,HttpStatus.OK); + } + + + +} \ No newline at end of file diff --git a/backend/src/main/java/com/realnet/logging1/controller/AppUserLogController2.java b/backend/src/main/java/com/realnet/logging1/controller/AppUserLogController2.java new file mode 100644 index 0000000..8960bd9 --- /dev/null +++ b/backend/src/main/java/com/realnet/logging1/controller/AppUserLogController2.java @@ -0,0 +1,75 @@ +package com.realnet.logging1.controller; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileReader; +import java.io.IOException; + +import javax.servlet.http.HttpServletRequest; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.core.io.Resource; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.CrossOrigin; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + + +import com.realnet.logging1.entity.AppUserLog; +import com.realnet.logging1.repository.AppUserLogginRepository; +import com.realnet.logging1.service.LoggingService; +import com.realnet.utils.Constant; + +import lombok.extern.slf4j.Slf4j; + +@Slf4j +@RestController +@CrossOrigin(origins = "*", maxAge = 3600) +@RequestMapping(value = "/log2") +public class AppUserLogController2 { + private LoggingService loggingService; + + @Value("${projectPath}") + private String projectPath; + + @Autowired + private AppUserLogginRepository logginRepository; + + @Autowired + public AppUserLogController2(LoggingService loggingService) { + super(); + this.loggingService = loggingService; + } + + @GetMapping("/downloadLog/{filename}") + public ResponseEntity sendFile(@PathVariable("filename") String filename, HttpServletRequest request) + throws Exception { + // AppUser a = appUserServiceImpl.getByUserName(username).orElse(null); + Resource resource = loggingService.loadFileAsResource(filename); + if (resource != null) { + String contentType = null; + try { + contentType = request.getServletContext().getMimeType(resource.getFile().getAbsolutePath()); + } catch (IOException ex) { + throw new Exception("Could not find log file for file: " + filename); + } + // Fallback to the default content type if type could not be determined + if (contentType == null) { + contentType = "application/octet-stream"; + } + return ResponseEntity.ok().contentType(MediaType.parseMediaType(contentType)) + .header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"" + resource.getFilename() + "\"") + .body(resource); + } else { + return new ResponseEntity<>("File could not be loaded", HttpStatus.BAD_REQUEST); + } + } + + +} diff --git a/backend/src/main/java/com/realnet/logging1/entity/AppUserLog.java b/backend/src/main/java/com/realnet/logging1/entity/AppUserLog.java new file mode 100644 index 0000000..6a8a286 --- /dev/null +++ b/backend/src/main/java/com/realnet/logging1/entity/AppUserLog.java @@ -0,0 +1,46 @@ +package com.realnet.logging1.entity; + +import java.sql.Blob; +import java.util.Date; + +import org.springframework.data.annotation.Id; +import org.springframework.data.mongodb.core.mapping.Document; + +import lombok.AllArgsConstructor; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; + +//@Entity +//@Table(name="app_user_log") +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@EqualsAndHashCode +@ToString +@Document +public class AppUserLog { + + @Id + private String mongoid; + +// @Id +// @GeneratedValue(generator = "appUserLog_gen") +// @SequenceGenerator(name="appUserLog_gen", sequenceName="app_user_log_sequence",initialValue = 1, allocationSize = 1) + private Long logId; +// @Column(unique = true) + private String userName; + private String generateLog="N"; + private String logFileName; + private String logLevel="info"; + private Date createdOn; +// @Transient + private Blob file; +// @Transient + private Long filesizeCurrent; +// @Transient + private String createdOnFormated; +} diff --git a/backend/src/main/java/com/realnet/logging1/repository/AppUserLogginRepository.java b/backend/src/main/java/com/realnet/logging1/repository/AppUserLogginRepository.java new file mode 100644 index 0000000..beca418 --- /dev/null +++ b/backend/src/main/java/com/realnet/logging1/repository/AppUserLogginRepository.java @@ -0,0 +1,15 @@ +package com.realnet.logging1.repository; + +import java.util.List; + +import org.springframework.data.mongodb.repository.MongoRepository; +import org.springframework.stereotype.Repository; + +import com.realnet.logging1.entity.AppUserLog; + +@Repository +public interface AppUserLogginRepository extends MongoRepository{ + List findByUserName(String userName); +// @Query(value="select Max(*) from app") +// long getMax(); +} diff --git a/backend/src/main/java/com/realnet/logging1/service/LoggingService.java b/backend/src/main/java/com/realnet/logging1/service/LoggingService.java new file mode 100644 index 0000000..df115eb --- /dev/null +++ b/backend/src/main/java/com/realnet/logging1/service/LoggingService.java @@ -0,0 +1,125 @@ +package com.realnet.logging1.service; + +import java.io.File; +import java.io.IOException; +import java.net.MalformedURLException; +import java.nio.file.FileSystems; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.sql.Blob; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.List; + +import javax.sql.rowset.serial.SerialBlob; + +import org.apache.commons.io.FileUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.io.Resource; +import org.springframework.core.io.UrlResource; +import org.springframework.stereotype.Service; + +import com.realnet.logging1.entity.AppUserLog; +import com.realnet.logging1.repository.AppUserLogginRepository; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; + +@Service +public class LoggingService { + + + private AppUserLogginRepository appUserLogginRepository; + private AppUserServiceImpl appUserServiceImpl; + + @Autowired + public LoggingService(AppUserLogginRepository appUserLogginRepository, AppUserServiceImpl appUserServiceImpl) { + super(); + this.appUserLogginRepository = appUserLogginRepository; + this.appUserServiceImpl = appUserServiceImpl; + } + + public AppUserLog generate(AppUser appUser) throws IOException { + long id = 1; + List l = appUserLogginRepository.findByUserName(appUser.getUsername()); + if (l.size() > 0) { + AppUserLog log = l.get(0); + if (log != null) { + // For local machine testing + Path root = FileSystems.getDefault().getPath("").toAbsolutePath(); + Path filePath = Paths.get(root.toString(), "logs", log.getLogFileName()); + File f = new File(filePath.toString()); + // For prod server + // File f = new File("/home/jboss/EAP-7.1.0/logs/"+this.user_log_file_nam); + if (!f.exists()) { + f.createNewFile(); + } + + return log; + + } + } + + return null; + } + + public AppUserLog add(AppUserLog appUserLog) { + return appUserLogginRepository.save(appUserLog); + } + + public List getAll() { + List a = appUserLogginRepository.findAll(); + DateFormat simple = new SimpleDateFormat("dd MMM yyyy HH:mm:ss"); + a.forEach(o -> { + try { + byte[] fileContent = null; + Path root = FileSystems.getDefault().getPath("").toAbsolutePath(); + Path filePath = Paths.get(root.toString(), "logs", o.getLogFileName()); + File f = new File(filePath.toString()); + fileContent = FileUtils.readFileToByteArray(f); + long size_kb = (Files.size(filePath)) / 1024; + long size_mb = size_kb / 1024; + o.setFilesizeCurrent(size_mb); + Blob b = new SerialBlob(fileContent); + o.setCreatedOnFormated(simple.format(o.getCreatedOn())); + o.setFile(b); + } catch (Exception e) { + o.setFile(null); + o.setFilesizeCurrent(null); + o.setCreatedOnFormated(null); + } + }); + return a; + } + + public AppUserLog getOne(Long id) { + AppUser user = appUserServiceImpl.getById(id); + if (user != null) { + List l = appUserLogginRepository.findByUserName(user.getUsername()); + if (l.size() > 0) { + return l.get(0); + } + } + return null; + } + + public AppUserLog update(AppUserLog appUserLog) { + return appUserLogginRepository.save(appUserLog); + } + + public Resource loadFileAsResource(String fileName) { + try { + Path root = FileSystems.getDefault().getPath("").toAbsolutePath(); + Path filePath = Paths.get(root.toString(), "logs", fileName); + Resource resource = new UrlResource(filePath.toUri()); + if (resource.exists()) { + return resource; + } else { + return null; + } + } catch (MalformedURLException ex) { + return null; + } + } + +} diff --git a/backend/src/main/java/com/realnet/session/controller/SessionController.java b/backend/src/main/java/com/realnet/session/controller/SessionController.java new file mode 100644 index 0000000..ec95832 --- /dev/null +++ b/backend/src/main/java/com/realnet/session/controller/SessionController.java @@ -0,0 +1,368 @@ +package com.realnet.session.controller; + +import java.io.IOException; +import java.net.InetAddress; +import java.net.NetworkInterface; +import java.net.UnknownHostException; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Random; +import java.util.Set; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpSession; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.slf4j.MDC; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.mail.javamail.JavaMailSender; +import org.springframework.security.authentication.AuthenticationManager; +import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; +import org.springframework.util.StringUtils; +import org.springframework.web.bind.annotation.CrossOrigin; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.context.request.RequestContextHolder; + +import com.realnet.config.EmailService; +import com.realnet.config.TokenProvider; +import com.realnet.fnd.response.EntityResponse; +import com.realnet.fnd.response.OperationResponse; +import com.realnet.fnd.response.OperationResponse.ResponseStatusEnum; +import com.realnet.logging1.entity.AppUserLog; +import com.realnet.logging1.service.LoggingService; +import com.realnet.session.entity.AboutWork; +import com.realnet.session.entity.SessionItem; +import com.realnet.session.response.SessionResponse; +import com.realnet.users.entity.LoginUser; +import com.realnet.users.entity.Role; +import com.realnet.users.entity.Sys_Accounts; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.entity1.AppUserSessions; +import com.realnet.users.entity1.Registration; +import com.realnet.users.repository.CompanyRepo; +import com.realnet.users.repository1.AppUserRepository; +import com.realnet.users.repository1.AppUserSessionsRepository; +import com.realnet.users.response.MessageResponse; +import com.realnet.users.service.AboutWorkService; +import com.realnet.users.service1.AppUserServiceImpl; +import com.realnet.users.service1.AppUserSessionsServiceImpl; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiResponse; +import io.swagger.annotations.ApiResponses; + +/* +This is a dummy rest controller, for the purpose of documentation (/session) path is map to a filter + - This will only be invoked if security is disabled + - If Security is enabled then SessionFilter.java is invoked + - Enabling and Disabling Security is done at config/applicaton.properties 'security.ignored=/**' +*/ + +@Api(tags = { "Authentication" }) +@CrossOrigin(origins = "http://localhost:4200", maxAge = 3600) +@RestController +@RequestMapping(value = "/token", produces = MediaType.APPLICATION_JSON_VALUE) +public class SessionController { + + private final Logger LOGGER = LoggerFactory.getLogger(getClass()); + @Autowired + private AuthenticationManager authenticationManager; + @Autowired + private LoggingService loggingService; + @Autowired + private TokenProvider jwtTokenUtil; + + @Autowired + private AppUserRepository appUserRepository; + + @Autowired + private AppUserServiceImpl appUserServiceImpl; + + @Autowired + private AppUserSessionsRepository appUserSessionsRepository; + + @Autowired + private AppUserServiceImpl userService; + +// @Autowired +// private CompanyService companyService; + + @Autowired + private EmailService emailService; + + @Autowired + private JavaMailSender mailSender; + + @Autowired + private AboutWorkService aboutworkservice; + + @Autowired + private CompanyRepo sysrepo; + + @Autowired + private BCryptPasswordEncoder bcryptEncoder; + + @Autowired + private AppUserSessionsServiceImpl appUserSessionsServiceImpl; + + @ApiResponses(value = { + @ApiResponse(code = 200, message = "Will return a security token, which must be passed in every request", response = SessionResponse.class) }) + @RequestMapping(value = "/session", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE) + @ResponseBody + public SessionResponse newSession(@RequestBody LoginUser loginRequest, HttpServletRequest request, + HttpSession session1) { + + try { + + final Authentication authentication = authenticationManager.authenticate( + new UsernamePasswordAuthenticationToken(loginRequest.getEmail(), loginRequest.getPassword())); + + SecurityContextHolder.getContext().setAuthentication(authentication); + + final String token = jwtTokenUtil.generateToken(authentication); + + System.out.println("authentication.getName() =>" + authentication.getName()); // email + + AppUser loggedInUser = userService.getLoggedInUser(); + MDC.put("USER", loggedInUser.getUsername()); + // System.out.println("/session logged in user -> " + loggedInUser); + +// List loggedInUserRoles = new ArrayList(); + StringBuilder roleString = new StringBuilder(); + roleString.append(loggedInUser.getUsrGrp().getGroupName()); +// .forEach(role -> { +//// loggedInUserRoles.add(role.getName()); +// roleString.append(role.getName() + ", "); +// }); + // String role = roleString.toString().substring(0, + // roleString.toString().lastIndexOf(",")); + // List roleList = Arrays.asList(role.split("\\s*,\\s*")); + + SessionResponse resp = new SessionResponse(); + SessionItem sessionItem = new SessionItem(); + sessionItem.setToken(token); + sessionItem.setUserId(loggedInUser.getUserId()); + sessionItem.setFullname(loggedInUser.getFullName()); + sessionItem.setFirstName(loggedInUser.getFullName()); + // sessionItem.setUsername(loggedInUser.getUsername()); + sessionItem.setEmail(loggedInUser.getEmail()); + // sessionItem.setRoles(roleList); + Set roles = loggedInUser.getRoles(); + List roleList = new ArrayList<>(); + for (Role ro : roles) { + roleList.add(ro.getDescription()); + } + sessionItem.setRoles(roleList); + // sessionItem.setRoles(loggedInUser.getUsrGrp().getGroupName()); + resp.setOperationStatus(ResponseStatusEnum.SUCCESS); + resp.setOperationMessage("Login Success"); + resp.setItem(sessionItem); + + InetAddress ip; + StringBuilder sb = new StringBuilder(); + try { + ip = InetAddress.getLocalHost(); + System.out.println("Current IP address : " + ip.getHostAddress()); + NetworkInterface network = NetworkInterface.getByInetAddress(ip); + byte[] mac = network.getHardwareAddress(); + System.out.print("Current MAC address : "); + + for (int i = 0; i < mac.length; i++) { + sb.append(String.format("%02X%s", mac[i], (i < mac.length - 1) ? ":" : "")); + } + System.out.println(sb.toString()); + } catch (Exception e) { + e.printStackTrace(); + } + + AppUserSessions session = new AppUserSessions(); + + session.setUserId(loggedInUser); + session.setLastAccessDate(new Date()); + session.setLogintime(new Date()); +// session.setLogouttime(new Date()); + session.setSessionId(RequestContextHolder.currentRequestAttributes().getSessionId()); + // String ip = request.getHeader("X-Forward-For"); + // String ip = getClientIp(); + // String ip = getClientIp(request); + String ip1 = request.getRemoteAddr(); + session.setClientIp(ip1); + session.setMacid(sb.toString()); + appUserSessionsServiceImpl.add(session); + AppUserLog s = loggingService.generate(loggedInUser); + // AppUserLog s = null; + if (s != null) { + session1.setAttribute("LogginLevel", s.getLogLevel()); + session1.setAttribute("generate_log", s.getGenerateLog()); + session1.setAttribute("LogFileName", s.getLogFileName()); + } else { + session1.setAttribute("generate_log", "N"); + } + return resp; + } catch (Exception e) { + LOGGER.error("Login Failed " + e.getMessage()); + System.out.print(e.getMessage()); + SessionResponse resp = new SessionResponse(); + resp.setOperationStatus(ResponseStatusEnum.ERROR); + resp.setOperationMessage("Login Failed"); + return resp; + } + + } + + // logout + @GetMapping("/logout") + public ResponseEntity logoutUser(HttpSession session2) throws IOException { + +// if(session1.getAttribute("generate_log").equals("Y")) { +// Path root = FileSystems.getDefault().getPath("").toAbsolutePath(); +// Path filePath = Paths.get(root.toString(),"logs",session1.getAttribute("LogFileName").toString()); +// File f=filePath.toFile(); +// FileWriter fw = new FileWriter(f,true); +// fw.write("Logout\n"); +// fw.close(); +// } + +// String sessionId = RequestContextHolder.currentRequestAttributes().getSessionId(); +// AppUserSessions session = appUserSessionsRepository.findBySessionId(session2.toString()); +// session.setLogouttime(new Date()); +// appUserSessionsServiceImpl.add(session); + return new ResponseEntity<>("Logged out succesfully", HttpStatus.OK); + } + // logout + + public String getClientIp(HttpServletRequest request) { + final String LOCALHOST_IPV4 = "127.0.0.1"; + final String LOCALHOST_IPV6 = "0:0:0:0:0:0:0:1"; + String ipAddress = request.getHeader("X-Forwarded-For"); + if (StringUtils.isEmpty(ipAddress) || "unknown".equalsIgnoreCase(ipAddress)) { + ipAddress = request.getHeader("Proxy-Client-IP"); + } + + if (StringUtils.isEmpty(ipAddress) || "unknown".equalsIgnoreCase(ipAddress)) { + ipAddress = request.getHeader("WL-Proxy-Client-IP"); + } + + if (StringUtils.isEmpty(ipAddress) || "unknown".equalsIgnoreCase(ipAddress)) { + ipAddress = request.getRemoteAddr(); + if (LOCALHOST_IPV4.equals(ipAddress) || LOCALHOST_IPV6.equals(ipAddress)) { + try { + InetAddress inetAddress = InetAddress.getLocalHost(); + ipAddress = inetAddress.getHostAddress(); + } catch (UnknownHostException e) { + e.printStackTrace(); + } + } + } + + if (!StringUtils.isEmpty(ipAddress) && ipAddress.length() > 15 && ipAddress.indexOf(",") > 0) { + ipAddress = ipAddress.substring(0, ipAddress.indexOf(",")); + } + + return ipAddress; + } + + @PostMapping("/addOneAppUser") + public ResponseEntity addOneUser(@RequestBody Registration reg) { + System.out.println(reg); +// if (appUserRepository.findByEmail(reg.getEmail()) != null) { +// return ResponseEntity.badRequest().body(new MessageResponse("email already exist")); +// } + AppUser a = appUserServiceImpl.addOneUser(reg); + return new ResponseEntity<>(a, HttpStatus.OK); + } + + @ApiOperation(value = "Send Email For OTP") + @PostMapping("/user/send_email") + public ResponseEntity userviaadmin(HttpServletRequest request, @RequestBody Registration reg) { + String email = reg.getEmail(); + + AppUser user = userService.findUserByEmail(email); + if (user != null) { + return ResponseEntity.badRequest().body(new MessageResponse(email + " already exist")); + } else { + Random random = new Random(); + int otp = 100000 + random.nextInt(900000); + AppUser appUser = new AppUser(); + userService.adduserbyemail(appUser, String.valueOf(otp), email); + + String subject = "Email Verification"; + String url = String.valueOf(otp); + emailService.adduserviaadmin(email, subject, url); + return new ResponseEntity<>(new EntityResponse("Otp send successfully"), HttpStatus.OK); + } + + } + +// RESEND OTP + @PostMapping("/user/resend_otp") + public ResponseEntity resendotp(@RequestParam String email) { + + AppUser user = userService.findUserByEmail(email); + if (user == null) { + return ResponseEntity.badRequest().body(new MessageResponse(email + " not exist")); + } else { + Random random = new Random(); + int otp = 100000 + random.nextInt(900000); + userService.resendotp(otp, email); + String subject = "Email Verification"; + String url = String.valueOf(otp); + emailService.adduserviaadmin(email, subject, url); + return new ResponseEntity<>(new EntityResponse("resend Otp send successfully"), HttpStatus.OK); + } + + } + +// OTP VERIFICATION + @PostMapping("/user/otp_verification") + public ResponseEntity otpverfication(@RequestParam String email, @RequestParam String otp) { + email = email.replaceAll(" ", "+"); + AppUser user = userService.findUserByEmail(email); + if (user == null) { + return ResponseEntity.badRequest().body(new MessageResponse(user + " not exist")); + } + String random_no = user.getRandom_no(); + if (random_no.equalsIgnoreCase(otp)) { + return new ResponseEntity<>(new EntityResponse("OTP Verified"), HttpStatus.OK); + } else { + return new ResponseEntity<>(new EntityResponse("Wrong OTP"), HttpStatus.BAD_REQUEST); + } + } + + @ApiOperation(value = "Add new cluodnsure", response = OperationResponse.class) + @PostMapping("/aboutwork") + public AppUser addNewCustomer(@RequestBody AboutWork aboutWork) { + + System.out.println("about work controller started"); + + // save acccount info + AboutWork about = aboutworkservice.adddata(aboutWork); + Sys_Accounts sys = new Sys_Accounts(); + sys.setAccount_id(about.getId()); + sysrepo.save(sys); + + // save user with accout id + AppUser user = new AppUser(); + user.setChangePassw(aboutWork.getPassword()); + user.setEmail(aboutWork.getEmail()); + user.setMob_no(aboutWork.getMobile()); + AppUser userResister = userService.userResister(user, about.getId()); + return userResister; + } +} \ No newline at end of file diff --git a/backend/src/main/java/com/realnet/session/entity/AboutWork.java b/backend/src/main/java/com/realnet/session/entity/AboutWork.java new file mode 100644 index 0000000..f4447c2 --- /dev/null +++ b/backend/src/main/java/com/realnet/session/entity/AboutWork.java @@ -0,0 +1,35 @@ +package com.realnet.session.entity; + + +import org.springframework.data.annotation.Id; +import org.springframework.data.mongodb.core.mapping.Document; + +import lombok.Data; + +@Data +//@Entity +//@Table(name = "Accounts") + +@Document +public class AboutWork { + + + @Id + private String mongoid; + +// @Id +// @GeneratedValue(strategy = GenerationType.AUTO) + private Long id ; + private String name; + + private String password; + private Long mobile; + private String email; + private String companyname; + private String pancard; + private String working; + private String managing_work; +// @OneToOne(mappedBy = "user",fetch = FetchType.LAZY, +// cascade = CascadeType.ALL) +// private User user; +} diff --git a/backend/src/main/java/com/realnet/session/entity/SessionItem.java b/backend/src/main/java/com/realnet/session/entity/SessionItem.java new file mode 100644 index 0000000..95cc277 --- /dev/null +++ b/backend/src/main/java/com/realnet/session/entity/SessionItem.java @@ -0,0 +1,18 @@ +package com.realnet.session.entity; + +import java.util.List; + +import lombok.Data; + +@Data +public class SessionItem { + private String token; + private Long userId; + private String fullname; + private String username; + private String email; + private String firstName; + private List roles; + //private String roles; + +} diff --git a/backend/src/main/java/com/realnet/session/entity/VersionModel.java b/backend/src/main/java/com/realnet/session/entity/VersionModel.java new file mode 100644 index 0000000..db25839 --- /dev/null +++ b/backend/src/main/java/com/realnet/session/entity/VersionModel.java @@ -0,0 +1,11 @@ +package com.realnet.session.entity; + +import lombok.Data; + +@Data // For Getters and Setters +public class VersionModel { + private String version = null; + private Integer major = null; + private Integer minor = null; + private Integer patch = null; +} diff --git a/backend/src/main/java/com/realnet/session/response/SessionResponse.java b/backend/src/main/java/com/realnet/session/response/SessionResponse.java new file mode 100644 index 0000000..181aa16 --- /dev/null +++ b/backend/src/main/java/com/realnet/session/response/SessionResponse.java @@ -0,0 +1,15 @@ +package com.realnet.session.response; + +import com.realnet.fnd.response.OperationResponse; +import com.realnet.session.entity.SessionItem; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper=false) +public class SessionResponse extends OperationResponse { + @ApiModelProperty(required = true, value = "") + private SessionItem item; +} diff --git a/backend/src/main/java/com/realnet/userDTO/CompanyDto.java b/backend/src/main/java/com/realnet/userDTO/CompanyDto.java new file mode 100644 index 0000000..0000a61 --- /dev/null +++ b/backend/src/main/java/com/realnet/userDTO/CompanyDto.java @@ -0,0 +1,15 @@ +package com.realnet.userDTO; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class CompanyDto implements Serializable { + private static final long serialVersionUID = 1L; + private String userEmail; // for load the user who is responsible + private String companyName; + private String workspace; + private String gstNumber; + +} diff --git a/backend/src/main/java/com/realnet/userDTO/Email.java b/backend/src/main/java/com/realnet/userDTO/Email.java new file mode 100644 index 0000000..5ea7e2d --- /dev/null +++ b/backend/src/main/java/com/realnet/userDTO/Email.java @@ -0,0 +1,94 @@ +package com.realnet.userDTO; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +@AllArgsConstructor +@NoArgsConstructor +@Getter +@Setter +public class Email extends Rn_Who_Columns { + + /** + * + */ + private static final long serialVersionUID = 1L; + private Long userId; + private String email1; + private String email2; + private String email3; + private String email4; + + private Long id; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + +// private String password; + +// @ManyToOne(fetch = FetchType.LAZY) +// @JoinColumn(name = "ACCOUNT_ID") +// @JsonBackReference +// private Sys_Accounts sys_account; + + //public String getPassword() { +// return password; +// } +// public void setPassword(String password) { +// this.password = password; +// } + // public Sys_Accounts getSys_account() { +// return sys_account; +// } +// public void setSys_account(Sys_Accounts sys_account) { +// this.sys_account = sys_account; +// } + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public String getEmail1() { + return email1; + } + + public void setEmail1(String email1) { + this.email1 = email1; + } + + public String getEmail2() { + return email2; + } + + public void setEmail2(String email2) { + this.email2 = email2; + } + + public String getEmail3() { + return email3; + } + + public void setEmail3(String email3) { + this.email3 = email3; + } + + public String getEmail4() { + return email4; + } + + public void setEmail4(String email4) { + this.email4 = email4; + } + + +} diff --git a/backend/src/main/java/com/realnet/userDTO/EmailRequest.java b/backend/src/main/java/com/realnet/userDTO/EmailRequest.java new file mode 100644 index 0000000..240a638 --- /dev/null +++ b/backend/src/main/java/com/realnet/userDTO/EmailRequest.java @@ -0,0 +1,8 @@ +package com.realnet.userDTO; + +import lombok.Data; + +@Data +public class EmailRequest { + private String email; +} diff --git a/backend/src/main/java/com/realnet/userDTO/Login.java b/backend/src/main/java/com/realnet/userDTO/Login.java new file mode 100644 index 0000000..ce469c0 --- /dev/null +++ b/backend/src/main/java/com/realnet/userDTO/Login.java @@ -0,0 +1,13 @@ +package com.realnet.userDTO; + + +import lombok.Data; + +@Data +public class Login { + + private String username = ""; + + private String password = ""; + +} diff --git a/backend/src/main/java/com/realnet/userDTO/LoginUser.java b/backend/src/main/java/com/realnet/userDTO/LoginUser.java new file mode 100644 index 0000000..094cf50 --- /dev/null +++ b/backend/src/main/java/com/realnet/userDTO/LoginUser.java @@ -0,0 +1,37 @@ +package com.realnet.userDTO; + +public class LoginUser { + + //private String username; + private String email; + private String password; + + /* + * public String getUsername() { return username; } + * + * public void setUsername(String username) { this.username = username; } + */ + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + +// @Override +// public String toString() { +// return "LoginUser [email=" + email + ", password=" + password + "]"; +// } + + +} diff --git a/backend/src/main/java/com/realnet/userDTO/PasswordResetRequest.java b/backend/src/main/java/com/realnet/userDTO/PasswordResetRequest.java new file mode 100644 index 0000000..f0033cd --- /dev/null +++ b/backend/src/main/java/com/realnet/userDTO/PasswordResetRequest.java @@ -0,0 +1,9 @@ +package com.realnet.userDTO; + +import lombok.Data; + +@Data +public class PasswordResetRequest { + private String oldPassword; + private String newPassword; +} diff --git a/backend/src/main/java/com/realnet/userDTO/Provider.java b/backend/src/main/java/com/realnet/userDTO/Provider.java new file mode 100644 index 0000000..1e9b1b1 --- /dev/null +++ b/backend/src/main/java/com/realnet/userDTO/Provider.java @@ -0,0 +1,5 @@ +package com.realnet.userDTO; + +public enum Provider { + LOCAL, GOOGLE +} \ No newline at end of file diff --git a/backend/src/main/java/com/realnet/userDTO/Rn_Who_AccId_Column.java b/backend/src/main/java/com/realnet/userDTO/Rn_Who_AccId_Column.java new file mode 100644 index 0000000..3d5f8f8 --- /dev/null +++ b/backend/src/main/java/com/realnet/userDTO/Rn_Who_AccId_Column.java @@ -0,0 +1,74 @@ +package com.realnet.userDTO; + +import org.springframework.data.annotation.CreatedDate; +import org.springframework.data.annotation.LastModifiedDate; + +import java.io.Serializable; +import java.util.Date; + +//@MappedSuperclass +//@EntityListeners(AuditingEntityListener.class) +public class Rn_Who_AccId_Column implements Serializable { + private static final long serialVersionUID = 1L; + +// @Temporal(TemporalType.TIMESTAMP) +// @Column(name = "CREATED_AT", nullable = false, updatable = false) +// @CreatedDate + private Date createdAt; + + // @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime createdAt; + +// @Temporal(TemporalType.TIMESTAMP) +// @Column(name = "UPDATED_AT", nullable = false) +// @LastModifiedDate + private Date updatedAt; + +// @Column(name = "CREATED_BY", updatable = false) + private Long createdBy; + +// @Column(name = "UPDATED_BY") + private Long updatedBy; + +// @Column(name = "ACCOUNT_ID") + private Long accountId; + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Long getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(Long createdBy) { + this.createdBy = createdBy; + } + + public Long getUpdatedBy() { + return updatedBy; + } + + public void setUpdatedBy(Long updatedBy) { + this.updatedBy = updatedBy; + } + + public Long getAccountId() { + return accountId; + } + + public void setAccountId(Long accountId) { + this.accountId = accountId; + } +} diff --git a/backend/src/main/java/com/realnet/userDTO/Rn_Who_Columns.java b/backend/src/main/java/com/realnet/userDTO/Rn_Who_Columns.java new file mode 100644 index 0000000..395d51d --- /dev/null +++ b/backend/src/main/java/com/realnet/userDTO/Rn_Who_Columns.java @@ -0,0 +1,57 @@ +package com.realnet.userDTO; + +import org.springframework.data.annotation.CreatedDate; +import org.springframework.data.annotation.LastModifiedDate; + +import java.io.Serializable; +import java.util.Date; + + +public class Rn_Who_Columns implements Serializable { + private static final long serialVersionUID = 1L; + +// @Temporal(TemporalType.TIMESTAMP) +// @Column(name = "CREATED_AT", nullable = false, updatable = false) +// @CreatedDate + private Date createdAt; +// @Temporal(TemporalType.TIMESTAMP) +// @Column(name = "UPDATED_AT", nullable = false) +// @LastModifiedDate + private Date updatedAt; +// @Column(name = "CREATED_BY", updatable = false) + private Long createdBy; +// @Column(name = "UPDATED_BY") + private Long updatedBy; + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Long getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(Long createdBy) { + this.createdBy = createdBy; + } + + public Long getUpdatedBy() { + return updatedBy; + } + + public void setUpdatedBy(Long updatedBy) { + this.updatedBy = updatedBy; + } +} diff --git a/backend/src/main/java/com/realnet/userDTO/Role.java b/backend/src/main/java/com/realnet/userDTO/Role.java new file mode 100644 index 0000000..c3740f7 --- /dev/null +++ b/backend/src/main/java/com/realnet/userDTO/Role.java @@ -0,0 +1,59 @@ +package com.realnet.userDTO; + +import java.util.Set; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +@AllArgsConstructor +@NoArgsConstructor +@Getter +@Setter +public class Role { + private Long id; + + private String name; + + private String description; + + private Set users; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public Set getUsers() { + return users; + } + + public void setUsers(Set users) { + this.users = users; + } + + + + + +} diff --git a/backend/src/main/java/com/realnet/userDTO/RoleUpdateDto.java b/backend/src/main/java/com/realnet/userDTO/RoleUpdateDto.java new file mode 100644 index 0000000..aaac0fe --- /dev/null +++ b/backend/src/main/java/com/realnet/userDTO/RoleUpdateDto.java @@ -0,0 +1,36 @@ +package com.realnet.userDTO; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class RoleUpdateDto { + + private Long userId; + + private String[] roles; + + public Long getUserId() { + return userId; + } + + public RoleUpdateDto setUserId(Long userId) { + this.userId = userId; + return this; + } + + public String[] getRoles() { + return roles; + } + + public RoleUpdateDto setRoles(String[] roles) { + this.roles = roles; + return this; + } + +} diff --git a/backend/src/main/java/com/realnet/userDTO/Sys_Accounts.java b/backend/src/main/java/com/realnet/userDTO/Sys_Accounts.java new file mode 100644 index 0000000..c0e9989 --- /dev/null +++ b/backend/src/main/java/com/realnet/userDTO/Sys_Accounts.java @@ -0,0 +1,23 @@ +package com.realnet.userDTO; + +import java.util.List; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + +@Data +@ToString(exclude="users") +@EqualsAndHashCode(callSuper=false) +public class Sys_Accounts { + private Long id; + + private String companyName; + + private String workspace; + + private String gstNumber; + + private List users; + +} diff --git a/backend/src/main/java/com/realnet/userDTO/User.java b/backend/src/main/java/com/realnet/userDTO/User.java new file mode 100644 index 0000000..91b1fa5 --- /dev/null +++ b/backend/src/main/java/com/realnet/userDTO/User.java @@ -0,0 +1,98 @@ +package com.realnet.userDTO; + +import java.util.Set; + +import lombok.AllArgsConstructor; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; + +//@Data +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@ToString(exclude = "sys_account") +@EqualsAndHashCode(callSuper = false) +public class User extends Rn_Who_Columns { // implements Comparable + /** + * + */ + private static final long serialVersionUID = 1L; + + + private Long userId; + + private String firstName; + + private String lastName; + + private String fullName; + + private String email; + + private String username; + + private String password; + + // added = 7.12.20 + private int menu_group_id; + + private String status; // for invitation + + private String department; + + private String about; + private String photos; + + private String role; + + // private String company; + + private int securityProviderId; + + private int defaultCustomerId; + + private String phone; + + private String address1; + + private String address2; + private String country; + + private String postal; + + private boolean enabled; + private boolean isBlocked; + private String secretQuestion; + private String secretAnswer; + private boolean enableBetaTesting; + private boolean enableRenewal; + private String pancard; + + private String working; + + private String managing_work; + + private Long checknumber; + + private Provider provider; + + private Set roles; + + + private Sys_Accounts sys_account; + + +// public void setChecknumber(long nextLong) { +// this.checknumber=nextLong; +// +// } + +// @Column(name = "Accounts_id") +// private int account_id; + + +} \ No newline at end of file diff --git a/backend/src/main/java/com/realnet/userDTO/UserDto.java b/backend/src/main/java/com/realnet/userDTO/UserDto.java new file mode 100644 index 0000000..3b0a0fc --- /dev/null +++ b/backend/src/main/java/com/realnet/userDTO/UserDto.java @@ -0,0 +1,26 @@ +package com.realnet.userDTO; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.io.Serializable; +import java.util.Set; + +@Data +public class UserDto implements Serializable { + private static final long serialVersionUID = 1L; +// private String username; +// private String password; + private String firstName; + private String lastName; + private String password; + private String email; + private String fullName; + private String department; + private int menuGroupId; + @JsonIgnore + private String phone; + @JsonIgnore + private Set roles; + +} diff --git a/backend/src/main/java/com/realnet/userDTO/UserProfileDTO.java b/backend/src/main/java/com/realnet/userDTO/UserProfileDTO.java new file mode 100644 index 0000000..8f64f14 --- /dev/null +++ b/backend/src/main/java/com/realnet/userDTO/UserProfileDTO.java @@ -0,0 +1,21 @@ +package com.realnet.userDTO; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class UserProfileDTO implements Serializable { + /** + * + */ + private static final long serialVersionUID = 1L; + + private String fullName; + private String pronounce; + private String role; + private String department; + private String about; + + +} diff --git a/backend/src/main/java/com/realnet/userlist/controller/UserListController.java b/backend/src/main/java/com/realnet/userlist/controller/UserListController.java new file mode 100644 index 0000000..3b8173f --- /dev/null +++ b/backend/src/main/java/com/realnet/userlist/controller/UserListController.java @@ -0,0 +1,175 @@ + package com.realnet.userlist.controller; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.util.List; +import java.util.Optional; +import java.util.zip.DataFormatException; +import java.util.zip.Deflater; +import java.util.zip.Inflater; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.http.ResponseEntity.BodyBuilder; +import org.springframework.web.bind.annotation.CrossOrigin; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; + +import com.realnet.userlist.entity.UserImage; +import com.realnet.userlist.entity.UserList; +import com.realnet.userlist.repository.UserImageRepository; +import com.realnet.userlist.service.UserListService; + +import io.swagger.annotations.Api; + +@RestController +@CrossOrigin(origins = "http://localhost:4200", maxAge = 3600) +//@CrossOrigin("*") +@RequestMapping(value = "/user_list", produces=org.springframework.http.MediaType.APPLICATION_JSON_VALUE) +@Api(tags = {"/user_list"}) +public class UserListController { + + @Autowired + private UserImageRepository userImageRepository; + + @Autowired + private UserListService userListService; + + @PostMapping("/create") + public ResponseEntity add(@RequestBody UserList user){ + UserList addToDb = this.userListService.addToDb(user); + return ResponseEntity.ok(addToDb); + } + + @PutMapping("/update") + public ResponseEntity update(@RequestBody UserList user){ + UserList updateToDb = this.userListService.updateToDb(user); + return ResponseEntity.ok(updateToDb); + } + + @GetMapping("/get-one/{id}") + public ResponseEntity getOne(@PathVariable("id") String id){ + UserList oneById = this.userListService.getOneById(id); + return ResponseEntity.ok(oneById); + } + + @GetMapping("/get-all") + public List getAll(){ + List allFromDb = this.userListService.getAllFromDb(); + return allFromDb; + } + +// @DeleteMapping("/delete/{id}") +// public void delete(@PathVariable("id") Long id) { +// System.out.println("Request came to delete API.."); +// +// // parsing Long value into String and then call get image by user's id API. +// String rawId = String.valueOf(id); +// Optional findByUser = this.userImageRepository.findByUser(rawId); +// +// // delete users image before deleting user. +// this.userImageRepository.deleteById(findByUser.get().getId()); +// +// // delete user after deleting profile image. +// this.userListService.deleteFromDbById(id); +// } + + @PostMapping("/upload") + public BodyBuilder uplaodImage(@RequestParam("imageFile") MultipartFile file, + @RequestParam("user_id") Long user_id) throws IOException { + + System.out.println("Original Image Byte Size - " + file.getBytes().length); + UserImage file1 = new UserImage(file.getOriginalFilename(), file.getContentType(), + compressBytes(file.getBytes())); + + file1.setFilename(file.getOriginalFilename()); + file1.setType(file.getContentType()); + file1.setUser_id(String.valueOf(user_id)); + + this.userImageRepository.save(file1); + return ResponseEntity.status(HttpStatus.OK); + } + + @GetMapping("/get/{user}") + public UserImage getImage(@PathVariable("user") Integer user_id) throws Exception { + + System.out.println("Id of User is: " + user_id); + String rawId = String.valueOf(user_id); + + Optional retrievedImage = null; + try { + retrievedImage = userImageRepository.findByUser(rawId); + } catch (Exception e) { + System.out.println("No image found for this user"); + } + +// if(retrievedImage == null) { +// throw new Exception("No image found for this user"); +// } + UserImage img = new UserImage(retrievedImage.get().getFilename(), retrievedImage.get().getType(), + decompressBytes(retrievedImage.get().getPicByte())); + return img; + } + +// @GetMapping("/get/{imageName}") +// public UserImage getImage(@PathVariable("imageName") String imageName) throws IOException { +// +// System.out.println("Name of file is: " + imageName); +// +// final Optional retrievedImage = userImageRepository.findByFilename(imageName); +// UserImage img = new UserImage(retrievedImage.get().getFilename(), retrievedImage.get().getType(), +// decompressBytes(retrievedImage.get().getPicByte())); +// return img; +// } +// + // compress the image bytes before storing it in the database + public static byte[] compressBytes(byte[] data) { + Deflater deflater = new Deflater(); + deflater.setInput(data); + deflater.finish(); + + ByteArrayOutputStream outputStream = new ByteArrayOutputStream(data.length); + byte[] buffer = new byte[1024]; + while (!deflater.finished()) { + int count = deflater.deflate(buffer); + outputStream.write(buffer, 0, count); + } + try { + outputStream.close(); + } catch (IOException e) { + } + System.out.println("Compressed Image Byte Size - " + outputStream.toByteArray().length); + + return outputStream.toByteArray(); + } + + // uncompress the image bytes before returning it to the angular application + public static byte[] decompressBytes(byte[] data) { + Inflater inflater = new Inflater(); + inflater.setInput(data); + ByteArrayOutputStream outputStream = new ByteArrayOutputStream(data.length); + byte[] buffer = new byte[1024]; + try { + while (!inflater.finished()) { + int count = inflater.inflate(buffer); + outputStream.write(buffer, 0, count); + } + outputStream.close(); + } catch (IOException ioe) { + } catch (DataFormatException e) { + } + return outputStream.toByteArray(); + } + + + +} diff --git a/backend/src/main/java/com/realnet/userlist/entity/UserImage.java b/backend/src/main/java/com/realnet/userlist/entity/UserImage.java new file mode 100644 index 0000000..552154b --- /dev/null +++ b/backend/src/main/java/com/realnet/userlist/entity/UserImage.java @@ -0,0 +1,88 @@ +package com.realnet.userlist.entity; + +import org.springframework.data.annotation.Id; +import org.springframework.data.mongodb.core.mapping.Document; + +//@Entity +//@Table(name = "user_image") +@Document +public class UserImage { + +// @Id +// @GeneratedValue(strategy = GenerationType.AUTO) + + @Id + private String mongoid; + + private Long id; + private String filename; + private String type; + private String user; + +// @Column(name = "picByte", length = 5000) + private byte[] picByte; + +// @ManyToOne(fetch = FetchType.EAGER) +// private UserList userlist; + + public UserImage() { + + } + + public UserImage(String name, String type, byte[] picByte) { + this.filename = name; + this.type = type; + this.picByte = picByte; + } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getFilename() { + return filename; + } + + public void setFilename(String filename) { + this.filename = filename; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getUser_id() { + return user; + } + + public void setUser_id(String user_id) { + this.user = user_id; + } + + public byte[] getPicByte() { + return picByte; + } + + public void setPicByte(byte[] picByte) { + this.picByte = picByte; + } + +// public UserList getUserlist() { +// return userlist; +// } +// +// public void setUserlist(UserList userlist) { +// this.userlist = userlist; +// } + +// + +} diff --git a/backend/src/main/java/com/realnet/userlist/entity/UserList.java b/backend/src/main/java/com/realnet/userlist/entity/UserList.java new file mode 100644 index 0000000..2196a06 --- /dev/null +++ b/backend/src/main/java/com/realnet/userlist/entity/UserList.java @@ -0,0 +1,408 @@ +package com.realnet.userlist.entity; + +import java.util.ArrayList; +import java.util.List; + +import org.springframework.data.annotation.Id; +import org.springframework.data.mongodb.core.mapping.Document; + +import com.fasterxml.jackson.annotation.JsonIgnore; + +//@Entity +//@Table(name = "user_list") + +@Document +public class UserList { + + @Id + private String mongoid; + +// @Id +// @GeneratedValue(strategy = GenerationType.AUTO) + private Long id; + + private String user_id; + private String name; + private String gender; + private String dob; + private String email; + private String username; + private String password; + private String firstname; + private String lastname; + private String security_provider_id; + private String default_customer_id; + private String company; + private String phone; + private String address1; + private String address2; + private String country; + private String postal; + private String role; + private String other_roles; + private boolean is_active; + private boolean is_blocked; + private String secret_question; + private String secret_answer; + private boolean enable_beta_testing; + private boolean enable_renewal; + private String created_at; + private String created_by; + private String updated_at; + private String updated_by; + private String about; + private String department; + private String fullname; + private String photos; + private String status; + private String account_id; + private String checknumber; + private String managing_work; + private String pancard; + private String working; + private int menu_group; + +// @OneToMany(mappedBy = "userlist", cascade = CascadeType.ALL, fetch = FetchType.LAZY) +// @JsonIgnore +// private List img = new ArrayList<>(); + + public UserList() { + } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public int getMenu_group() { + return menu_group; + } + + public void setMenu_group(int menu_group) { + this.menu_group = menu_group; + } + + public String getUser_id() { + return user_id; + } + + public void setUser_id(String user_id) { + this.user_id = user_id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getGender() { + return gender; + } + + public void setGender(String gender) { + this.gender = gender; + } + + public String getDob() { + return dob; + } + + public void setDob(String dob) { + this.dob = dob; + } + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getFirstname() { + return firstname; + } + + public void setFirstname(String firstname) { + this.firstname = firstname; + } + + public String getLastname() { + return lastname; + } + + public void setLastname(String lastname) { + this.lastname = lastname; + } + + public String getSecurity_provider_id() { + return security_provider_id; + } + + public void setSecurity_provider_id(String security_provider_id) { + this.security_provider_id = security_provider_id; + } + + public String getDefault_customer_id() { + return default_customer_id; + } + + public void setDefault_customer_id(String default_customer_id) { + this.default_customer_id = default_customer_id; + } + + public String getCompany() { + return company; + } + + public void setCompany(String company) { + this.company = company; + } + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public String getAddress1() { + return address1; + } + + public void setAddress1(String address1) { + this.address1 = address1; + } + + public String getAddress2() { + return address2; + } + + public void setAddress2(String address2) { + this.address2 = address2; + } + + public String getCountry() { + return country; + } + + public void setCountry(String country) { + this.country = country; + } + + public String getPostal() { + return postal; + } + + public void setPostal(String postal) { + this.postal = postal; + } + + public String getRole() { + return role; + } + + public void setRole(String role) { + this.role = role; + } + + public String getOther_roles() { + return other_roles; + } + + public void setOther_roles(String other_roles) { + this.other_roles = other_roles; + } + + public boolean isIs_active() { + return is_active; + } + + public void setIs_active(boolean is_active) { + this.is_active = is_active; + } + + public boolean isIs_blocked() { + return is_blocked; + } + + public void setIs_blocked(boolean is_blocked) { + this.is_blocked = is_blocked; + } + + public String getSecret_question() { + return secret_question; + } + + public void setSecret_question(String secret_question) { + this.secret_question = secret_question; + } + + public String getSecret_answer() { + return secret_answer; + } + + public void setSecret_answer(String secret_answer) { + this.secret_answer = secret_answer; + } + + public boolean isEnable_beta_testing() { + return enable_beta_testing; + } + + public void setEnable_beta_testing(boolean enable_beta_testing) { + this.enable_beta_testing = enable_beta_testing; + } + + public boolean isEnable_renewal() { + return enable_renewal; + } + + public void setEnable_renewal(boolean enable_renewal) { + this.enable_renewal = enable_renewal; + } + + public String getCreated_at() { + return created_at; + } + + public void setCreated_at(String created_at) { + this.created_at = created_at; + } + + public String getCreated_by() { + return created_by; + } + + public void setCreated_by(String created_by) { + this.created_by = created_by; + } + + public String getUpdated_at() { + return updated_at; + } + + public void setUpdated_at(String updated_at) { + this.updated_at = updated_at; + } + + public String getUpdated_by() { + return updated_by; + } + + public void setUpdated_by(String updated_by) { + this.updated_by = updated_by; + } + + public String getAbout() { + return about; + } + + public void setAbout(String about) { + this.about = about; + } + + public String getDepartment() { + return department; + } + + public void setDepartment(String department) { + this.department = department; + } + + public String getFullname() { + return fullname; + } + + public void setFullname(String fullname) { + this.fullname = fullname; + } + + public String getPhotos() { + return photos; + } + + public void setPhotos(String photos) { + this.photos = photos; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getAccount_id() { + return account_id; + } + + public void setAccount_id(String account_id) { + this.account_id = account_id; + } + + public String getChecknumber() { + return checknumber; + } + + public void setChecknumber(String checknumber) { + this.checknumber = checknumber; + } + + public String getManaging_work() { + return managing_work; + } + + public void setManaging_work(String managing_work) { + this.managing_work = managing_work; + } + + public String getPancard() { + return pancard; + } + + public void setPancard(String pancard) { + this.pancard = pancard; + } + + public String getWorking() { + return working; + } + + public void setWorking(String working) { + this.working = working; + } + +// public List getImg() { +// return img; +// } +// +// public void setImg(List img) { +// this.img = img; +// } + +} diff --git a/backend/src/main/java/com/realnet/userlist/repository/UserImageRepository.java b/backend/src/main/java/com/realnet/userlist/repository/UserImageRepository.java new file mode 100644 index 0000000..d39d72e --- /dev/null +++ b/backend/src/main/java/com/realnet/userlist/repository/UserImageRepository.java @@ -0,0 +1,25 @@ +package com.realnet.userlist.repository; + +import java.util.Optional; + +import org.springframework.data.mongodb.repository.MongoRepository; +import org.springframework.data.mongodb.repository.Query; + +import com.realnet.userlist.entity.UserImage; +import com.realnet.userlist.entity.UserList; + +public interface UserImageRepository extends MongoRepository { + + @Query("{'id': ?0}") + Optional findByid(Long user_id); + + @Query("{'filename': ?0}") + Optional findByFilename(String filename); + + @Query("{'user': ?0}") + Optional findByUser(String user); + + @Query("{'id': ?0}") + UserImage findById(Long id); + +} diff --git a/backend/src/main/java/com/realnet/userlist/repository/UserListRepository.java b/backend/src/main/java/com/realnet/userlist/repository/UserListRepository.java new file mode 100644 index 0000000..7c626a1 --- /dev/null +++ b/backend/src/main/java/com/realnet/userlist/repository/UserListRepository.java @@ -0,0 +1,13 @@ +package com.realnet.userlist.repository; + +import org.springframework.data.mongodb.repository.MongoRepository; +import org.springframework.data.mongodb.repository.Query; + +import com.realnet.userlist.entity.UserList; + +public interface UserListRepository extends MongoRepository { + + @Query("{'id': ?0}") + UserList findById(Long id); + +} diff --git a/backend/src/main/java/com/realnet/userlist/service/UserListService.java b/backend/src/main/java/com/realnet/userlist/service/UserListService.java new file mode 100644 index 0000000..c7de892 --- /dev/null +++ b/backend/src/main/java/com/realnet/userlist/service/UserListService.java @@ -0,0 +1,20 @@ +package com.realnet.userlist.service; + +import java.util.List; + +import com.realnet.userlist.entity.UserList; + + +public interface UserListService { + + public UserList addToDb(UserList userList); + + public UserList updateToDb(UserList userList); + + public UserList getOneById(String id); + + public List getAllFromDb(); + + public void deleteFromDbById(String id); + +} diff --git a/backend/src/main/java/com/realnet/userlist/service/impl/UserListServiceImpl.java b/backend/src/main/java/com/realnet/userlist/service/impl/UserListServiceImpl.java new file mode 100644 index 0000000..6a7d80b --- /dev/null +++ b/backend/src/main/java/com/realnet/userlist/service/impl/UserListServiceImpl.java @@ -0,0 +1,49 @@ +package com.realnet.userlist.service.impl; + +import java.util.List; +import java.util.Optional; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import com.realnet.userlist.entity.UserList; +import com.realnet.userlist.repository.UserListRepository; +import com.realnet.userlist.service.UserListService; + +@Service +public class UserListServiceImpl implements UserListService { + + @Autowired + private UserListRepository userListRepository; + + @Override + public UserList addToDb(UserList userList) { + UserList save = this.userListRepository.save(userList); + return save; + } + + @Override + public UserList updateToDb(UserList userList) { + UserList save = this.userListRepository.save(userList); + return save; + } + + @Override + public UserList getOneById(String id) { + Optional findById = this.userListRepository.findById(id); + return findById.get(); + } + + @Override + public List getAllFromDb() { + List findAll = this.userListRepository.findAll(); + return findAll; + } + + @Override + public void deleteFromDbById(String id) { + this.userListRepository.deleteById(id); + System.out.println("Deletion success..."); + } + +} diff --git a/backend/src/main/java/com/realnet/users/controller/RoleController.java b/backend/src/main/java/com/realnet/users/controller/RoleController.java new file mode 100644 index 0000000..06b8739 --- /dev/null +++ b/backend/src/main/java/com/realnet/users/controller/RoleController.java @@ -0,0 +1,138 @@ +package com.realnet.users.controller; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.users.entity.Role; +import com.realnet.users.repository.RoleRepo; +import com.realnet.users.service.RoleService; +import com.realnet.users.service1.AppUserService; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; + +@Slf4j +@RestController +@RequestMapping(value = "/api") // , produces = MediaType.APPLICATION_JSON_VALUE) +@Api(tags = { "Role Assignment" }) +public class RoleController { + + @Autowired(required=false) + private AppUserService userService; + + @Autowired + private RoleService roleService; + + @Autowired + private RoleRepo roleRepo; + + // GET profile details + @ApiOperation(value = "Gets All Roles", response = Role.class) + @GetMapping("/roles") + public ResponseEntity getAllRoles(@RequestParam(value = "page", defaultValue = "0", required = false) Integer page, + @RequestParam(value = "size", defaultValue = "20", required = false) Integer size) { + //Pageable paging = PageRequest.of(page, size, Sort.by("created_at").descending()); + //Page result = roleService.getAll(paging); + List roles = roleService.getRoles(); + return ResponseEntity.ok().body(roles); + } + + // GET USER BY ID ADDED BY ADMIN + @ApiOperation(value = "Get Roles Id", response = Role.class) + @GetMapping("/roles/{id}") + public ResponseEntity getRolesById(@PathVariable(value = "id") String id) { + Role role = roleService.getRoleById(id); + return ResponseEntity.ok().body(role); + } + + /* ========WORKING CODE ======= */ + // add or remove a Role on a user + @GetMapping("org-users/{id}/add-roles/{roleId}") + public ResponseEntity addRole(@PathVariable("id") String id, @PathVariable("roleId") String roleId) { + roleService.addRole(id, roleId); + Map res = new HashMap(); + res.put("message", "Role Added Succcessfully"); + return ResponseEntity.ok(res); + } + + @GetMapping("org-users/{id}/remove-roles/{roleId}") + public ResponseEntity removeRole(@PathVariable("id") String id, @PathVariable("roleId") String roleId) { + roleService.removeRole(id, roleId); + Map res = new HashMap(); + res.put("message", "Role removed Succcessfully"); + return ResponseEntity.ok(res); + } + +// ADD NEW ROLE + @PostMapping("/roles") + public ResponseEntity add(@RequestBody Role role) { + Role save = roleRepo.save(role); + + return ResponseEntity.ok(save); + } + + // =================================== + +// @ApiOperation(value = "Assign roles to an user", response = ServiceResponse.class) +// @ApiResponses(value = { +// @ApiResponse(code = 200, message = "Roles successfully assigned to user!"), //response = UserResponse.class), +// @ApiResponse(code = 401, message = Constants.UNAUTHORIZED_MESSAGE), //response = BadRequestResponse.class), +// @ApiResponse(code = 403, message = Constants.FORBIDDEN_MESSAGE), //response = BadRequestResponse.class), +// @ApiResponse(code = 422, message = Constants.INVALID_DATA_MESSAGE) //, response = InvalidDataResponse.class), +// }) +// @PreAuthorize("hasRole('ROLE_ADMIN')") +// @PutMapping("/assign") +// public ResponseEntity assignRoles(@Valid @RequestBody RoleUpdateDto roleUpdateDto) { +// User user = userService.getById(roleUpdateDto.getUserId()); +// +// Arrays.stream(roleUpdateDto.getRoles()).forEach(role -> { +// Role roleObject = roleRepo.findByName(role); +// //if (roleObject != null && !user.hasRole(role)) { +// user.addRole(roleObject); +// } +// }); +// +// userService.update(user); +// +// return ResponseEntity.ok().body(user); +// } +// +// @ApiOperation(value = "Assign roles to an user", response = ServiceResponse.class) +// @ApiResponses(value = { +// @ApiResponse(code = 200, message = "Roles successfully assigned to user!"), // response = UserResponse.class), +// @ApiResponse(code = 401, message = Constants.UNAUTHORIZED_MESSAGE), // response = BadRequestResponse.class), +// @ApiResponse(code = 403, message = Constants.FORBIDDEN_MESSAGE), //response = BadRequestResponse.class), +// @ApiResponse(code = 422, message = Constants.INVALID_DATA_MESSAGE)//, response = InvalidDataResponse.class), +// }) +// @PreAuthorize("hasRole('ROLE_ADMIN')") +// @PutMapping("/revoke") +// public ResponseEntity revokeRoles(@Valid @RequestBody RoleUpdateDto roleUpdateDto) { +// User user = userService.findById(roleUpdateDto.getUserId()); +// +// Arrays.stream(roleUpdateDto.getRoles()).forEach(role -> { +// Role roleObject = roleService.findByName(role); +// +// if (roleObject != null && user.hasRole(role)) { +// user.removeRole(roleObject); +// } +// }); +// +// userService.update(user); +// +// return ResponseEntity.ok().body(user); +// } +//} + +} diff --git a/backend/src/main/java/com/realnet/users/controller/UserController.java b/backend/src/main/java/com/realnet/users/controller/UserController.java new file mode 100644 index 0000000..12842a2 --- /dev/null +++ b/backend/src/main/java/com/realnet/users/controller/UserController.java @@ -0,0 +1,479 @@ +package com.realnet.users.controller; + +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.util.Base64; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; + +import javax.servlet.http.HttpServletRequest; +import javax.validation.Valid; + +import org.apache.commons.io.FilenameUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; + +import com.realnet.config.EmailService; +import com.realnet.fnd.service.FileStorageService; +import com.realnet.users.entity.PasswordResetRequest; +import com.realnet.users.entity.PasswordResetToken; +import com.realnet.users.entity.Sys_Accounts; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.repository1.AppUserRepository; +import com.realnet.users.repository1.passwordTokenRepository; +import com.realnet.users.response.MessageResponse; +import com.realnet.users.service1.AppUserServiceImpl; +import com.realnet.utils.Port_Constant; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; + +@Slf4j +@RestController +@RequestMapping(value = "/api") // , produces = MediaType.APPLICATION_JSON_VALUE) +@Api(tags = { "User Mnagement" }) +public class UserController { + + @Autowired + private AppUserServiceImpl userService; + @Autowired + private AppUserRepository appUserRepository; + + @Autowired + private BCryptPasswordEncoder bcryptEncoder; + + + @Autowired + private passwordTokenRepository passwordTokenRepository; + + + @Autowired + private FileStorageService fileStorageService; + + private AppUserServiceImpl appUserServiceImpl; + private EmailService emailService; + @Autowired + public UserController(AppUserServiceImpl appUserServiceImpl, + EmailService emailService) { + super(); + this.appUserServiceImpl = appUserServiceImpl; + this.emailService = emailService; + } + + + @Value("${projectPath}") + private String projectPath; + + // GET profile details (ADMIN, USER BOTH, WHO IS LOGGED IN) + @ApiOperation(value = "Gets current user information", response = AppUser.class) + @GetMapping("/user-profile") + public ResponseEntity getUserProfile() { + AppUser user = userService.getLoggedInUser(); + return ResponseEntity.ok().body(user); + } + + // UPDATE (ADMIN, USER BOTH, WHO IS LOGGED IN) +// @ApiOperation(value = "Update current user information", response = User.class) +// @PutMapping("/user-profile") +// public ResponseEntity updateUserProfile(@Valid @RequestBody UserProfileDTO userRequest) { +// String loggedInUserEmail = userService.getLoggedInUserEmail(); +// AppUser user = userService.updateAppUserDto(userRequest); +// return new ResponseEntity<>(user, HttpStatus.ACCEPTED); +// } + + // UPLOAD IMAGE + @PostMapping("/upload") + public ResponseEntity uploadProfilePic(@RequestParam("imageFile") MultipartFile file) throws IOException { + AppUser user = userService.getLoggedInUser(); + // String userId = Long.toString(user.getUserId()); + String userId = String.valueOf(user.getUserId()); + System.out.println("USER ID = " + userId); + // String uploadPath = + // projectPath.concat("/src/main/resources/uploaded-picture/" + userId + "/"); + String uploadPath = projectPath.concat("/src/main/resources/uploaded-picture/"); + System.out.println("UPLOAD PATH = " + uploadPath); + + fileStorageService.uploadProfilePicture(file, uploadPath); + + String fileName = file.getOriginalFilename(); + // String head = fileName.substring(0, fileName.indexOf(".")); + String ext = fileName.substring(fileName.lastIndexOf(".")); + String fileNewName = "profile-pic-" + userId + ext; + + System.out.println( + "UPLOAD PATH = " + uploadPath + "\nFILE NAME = " + fileNewName + "\nFile Size = " + file.getSize()); + user.setPhotoName(fileNewName); + boolean success = userService.insertOrSaveUser(user); + Map res = new HashMap(); + if (success) { + res.put("success", success); + return new ResponseEntity<>(res, HttpStatus.OK); + } else { + res.put("success", success); + return new ResponseEntity<>(res, HttpStatus.BAD_REQUEST); + } + } + + // GET IMAGE + @GetMapping("/retrieve-image") + public ResponseEntity getProfilePic() { + AppUser user = userService.getLoggedInUser(); + String imageName = user.getPhotoName(); + String imagePath = System.getProperty("java.io.tmpdir")+ System.getProperty("file.separator")+imageName; + File file = new File(imagePath); + Map res = new HashMap(); + + String encodeBase64 = null; + try { + String ext = FilenameUtils.getExtension(file.getName()); + FileInputStream fis = new FileInputStream(file); + // byte[] media = IOUtils.toByteArray(fis); + byte[] bytes = new byte[(int) file.length()]; + fis.read(bytes); + encodeBase64 = Base64.getEncoder().encodeToString(bytes); + String data = "data:/image/" + ext + ";base64," + encodeBase64; + fis.close(); + res.put("image", data); + return new ResponseEntity<>(res, HttpStatus.OK); + } catch (IOException e) { + log.debug("File Not Found Exception Handled: {}", e.getMessage()); + res.put("image", "Not Found"); + return new ResponseEntity<>(res, HttpStatus.NOT_FOUND); + } + } + + // ====================USER ACCOUNT DETAILS================ + // ########## NEED MOD ########## + // GET ADMIN profile details (admin accounts) + @ApiOperation(value = "Get User Account Details", response = Sys_Accounts.class) + @GetMapping("/user-account") + public ResponseEntity getUserAccountDetails() { + AppUser user = userService.getLoggedInUser(); + Sys_Accounts sys_account = user.getAccount(); + System.out.println("Company Details : " + sys_account); + return ResponseEntity.ok().body(sys_account); + } + + // =========== reset password ============= + @ApiOperation(value = "Reset Password", response = PasswordResetRequest.class) + @PostMapping("/reset-password") + public ResponseEntity resetPassword(@Valid @RequestBody PasswordResetRequest passwordResetReq) { + AppUser reset = userService.resetPassword(passwordResetReq.getUserId(), + passwordResetReq.getHash(),passwordResetReq.getNewPassword()); + System.out.println("resetPassword() Controller : RESET ? " + reset); + Map res = new HashMap(); + if (reset!=null) { + res.put("reset", reset); + return new ResponseEntity<>(res, HttpStatus.ACCEPTED); + } else { + res.put("reset", reset); + return new ResponseEntity<>(res, HttpStatus.BAD_REQUEST); + } + } +// new Reset password +// by Gaurav + + @ApiOperation(value = "Reset Password", response = PasswordResetRequest.class) + @PostMapping("/reset_password") + public ResponseEntity resetPasswordnew(@Valid @RequestBody PasswordResetRequest passwordResetReq) { + AppUser reset = userService.resetPasswordnew(passwordResetReq); + System.out.println("resetPassword() Controller : RESET ? " + reset); + Map res = new HashMap(); + if (reset!=null) { + res.put("reset", reset); + return new ResponseEntity<>(res, HttpStatus.ACCEPTED); + } else { + res.put("reset", reset); + return new ResponseEntity<>(res, HttpStatus.BAD_REQUEST); + } + } + + @ApiOperation(value = "Forgot password", response = PasswordResetRequest.class) + @PostMapping("/forgot_password") + public ResponseEntity forgotpassword(@Valid @RequestBody PasswordResetRequest passwordResetReq) { + AppUser reset = userService.forgotpassword(passwordResetReq); + System.out.println("resetPassword() Controller : RESET ? " + reset); + Map res = new HashMap(); + if (reset!=null) { + res.put("reset", reset); + return new ResponseEntity<>(res, HttpStatus.ACCEPTED); + } else { + res.put("reset", reset); + return new ResponseEntity<>(res, HttpStatus.BAD_REQUEST); + } + } + + +// Reset password by email sending + @PostMapping("/resources/forgotpassword") + public ResponseEntity resetPassword(HttpServletRequest request, + @RequestParam("email") String email) { + AppUser user = userService.findUserByEmail(email); + if (user == null) { + return ResponseEntity.badRequest() + .body(new MessageResponse(email +" not found")); + }else { + String token = UUID.randomUUID().toString(); + userService.createPasswordResetTokenForUser(user, token); + + String em = user.getEmail(); + String subject = "Pass reset"; + String url = "http://"+Port_Constant.LOCAL_HOST+":"+Port_Constant.FRONTEND_PORT_9191+"/#/forgotresetpassword/" +token; + // String url = "http://surecns.ml:30165/#/forgotresetpassword/" + token; +// String url = "http://localhost:9191/api" + "/resources/savePassword/" + token; + emailService.constructEmail(em, subject, url); + return new ResponseEntity<>("Email sent success",HttpStatus.OK); + } + + } + + + + + // get email save link + @PostMapping("/resources/savePassword/{token}") + public ResponseEntity savePassword( @PathVariable String token, + @Valid @RequestBody PasswordResetRequest passwordResetReq) { + + PasswordResetToken resetToken = passwordTokenRepository.findByToken(token); + if (resetToken == null) { + return ResponseEntity.badRequest() + .body(new MessageResponse("Token expire")); + } + +// AppUser a = appUserRepository.findById(resetToken.getUser().getUserId()).orElse(null); + AppUser a = appUserRepository.findByEmail(resetToken.getUser().getEmail()); + + if(a!=null) { + + if (passwordResetReq.getNewPassword().equals(passwordResetReq.getConfirmPassword())){ + + a.setUserPassw(bcryptEncoder.encode(passwordResetReq.getNewPassword())); + a.setPwdChangedCnt(a.getPwdChangedCnt()!=null?(long)1+a.getPwdChangedCnt():(long)1); + a.setLastPwdChangedDate(new Date()); + a.setChangePassw(passwordResetReq.getNewPassword()); + + appUserRepository.save(a); + passwordTokenRepository.delete(resetToken); + return new ResponseEntity<>(a, HttpStatus.OK); + } + return ResponseEntity.badRequest() + .body(new MessageResponse("password and confirm password not match")); + } + return ResponseEntity.badRequest() + .body(new MessageResponse("user not found")); + } + + + +// String result = userService.validatePasswordResetToken(token); +// +// +// if(result != null) { +// return null; +// } +// AppUser reset = userService.forgotpassword(passwordResetReq); +// System.out.println("resetPassword() Controller : RESET ? " + reset); +// Map res = new HashMap(); +// if (reset!=null) { +// res.put("reset", reset); +// return new ResponseEntity<>(res, HttpStatus.ACCEPTED); +// } else { +// res.put("reset", reset); +// return new ResponseEntity<>(res, HttpStatus.BAD_REQUEST); +// } + +// } + + + + + +// AppUser user = userService.getUserByPasswordResetToken(token); +// +// +//// AppUser user = userService.getUserByPasswordResetToken(passwordDto.getToken()); +// if(user != null) { +// userService.changeUserPassword(user, passwordDto.getNewPassword()); +// +// } +// +// return new ResponseEntity<>(user,HttpStatus.OK); +// } + + + + + + @GetMapping("/all-users") + public List getAll(){ + System.out.println("Request came to API.."); + List usersAll = this.userService.getAllUsers(); + return usersAll; + } + + @GetMapping("/get-one/{userId}") + public ResponseEntity getOne(@PathVariable("userId") Long userId){ + AppUser byId = this.userService.getById(userId); + return ResponseEntity.ok(byId); + } + // ############=== NEED MODIFICATION ========###### + + // GET profile details (user ADDED BY ADMIN) +// @ApiOperation(value = "Get Company User Details", response = User.class) +// @GetMapping("/org-users") +// public ResponseEntity getUsersByAccount(@RequestParam(value = "page", defaultValue = "0", required = false) Integer page, +// @RequestParam(value = "size", defaultValue = "20", required = false) Integer size) { +// AppUser adminUser = userService.getLoggedInUser(); +// // Sys_Accounts Sys_Account = adminUser.getCompany(); +// Sys_Accounts sys_account = adminUser.getSys_account(); +//// Long account_id = Sys_Account.getId(); +// +//// List users = userService.getUsersByAccountId(account_id); +// // OR +//// Sys_Accounts company = companyService.getById(account_id); +//// List users = company.getUsers(); +// System.out.println("Company Details : " + sys_account); +// Long accId = adminUser.getSys_account().getId(); +// Pageable paging = PageRequest.of(page, size, Sort.by("created_at").descending()); +// +// // invited user list will show here +// List invitedUsers = userRepo.findByAccountIdAndStatus(accId, UserConstant.STATUS_INVITED, paging); +// +// +// return ResponseEntity.ok().body(invitedUsers); +// } + + // GET USER BY ID (ADDED BY ADMIN) +// @ApiOperation(value = "Get Company User By Id", response = User.class) +// @GetMapping("/org-users/{id}") +// public ResponseEntity getUserById(@PathVariable(value = "id") Long id) { +// User user = userService.getById(id); +// if (user == null) { +// throw new ResourceNotFoundException("User Not Found ::" + id); +// } +// return ResponseEntity.ok().body(user); +// } + + // SAVE A USER BY ADMIN +// @ApiOperation(value = "Add A New Company User", response = User.class) +// @PostMapping("/org-users") +// public ResponseEntity createUser(@Valid @RequestBody User userReq) throws MessagingException, IOException { +// +// // admin will invite and create user with default value +// User user = userService.createUserByAdmin(userReq); +// +// // ====EMAIL CODE==== +// User admin = userService.getLoggedInUser(); +// String from = admin.getEmail(); // from is not working +// String to = userReq.getEmail(); +// String subject = "Invitation To Collaborate"; +// String text = "Dear " + userReq.getFirstName() + ",
" + "You have an Invitation from " +// + admin.getFullName() + ". Please Follow the steps below.
" +// + "1. Log on to https://localhost:4200/login
" +// + "2. Log on to the system with the following User Name and Password.
" +// + "3. User Name : " + userReq.getEmail() + " Password : " + userReq.getPassword() + "
" +// + "4. Change the existing system generated password and coninue."; +//// try { +//// //emailService.sendSimpleMessage(from, to, subject, text); +//// } catch (MailException mailException) { +//// System.out.println(mailException); +//// } +// emailService.sendEmailWithAttachment(to, subject, text); +// +// return ResponseEntity.status(HttpStatus.CREATED).body(user); +// } + + // UPDATE USER ADDED BY ADMIN +// @ApiOperation(value = "Update A Company User", response = User.class) +// @PutMapping("/org-users/{id}") +// public ResponseEntity updateUser(@PathVariable(value = "id") Long id, @Valid @RequestBody User user) { +// User updatedUser = userService.updateById(id, user); +// return ResponseEntity.status(HttpStatus.ACCEPTED).body(updatedUser); +// } + + // DELETE USER ADDED BY ADMIN +// @DeleteMapping("/org-users/{id}") +// public ResponseEntity> deleteUser(@PathVariable(value = "id") Long id) { +// boolean deleted = userService.deleteById(id); +// Map response = new HashMap<>(); +// response.put("deleted", Boolean.TRUE); +// // response.put("deleted", deleted); +// return ResponseEntity.status(HttpStatus.OK).body(response); +// } +// // ==== access by admin done + +// @ApiOperation(value = "Gets current user information", response = UserResponse.class) +// @RequestMapping(value = "/user", method = RequestMethod.GET, produces = {"application/json"}) +// public UserResponse getUserInformation(@RequestParam(value = "name", required = false) String userIdParam, HttpServletRequest req) { +// +// String loggedInUserName = userService.getLoggedInUserName(); +// +// User user; +// boolean provideUserDetails = false; +// +// if (Strings.isNullOrEmpty(userIdParam)) { +// provideUserDetails = true; +// user = userService.getLoggedInUser(); +// } +// else if (loggedInUserName.equals(userIdParam)) { +// provideUserDetails = true; +// user = userService.getLoggedInUser(); +// } +// else { +// //Check if the current user is superuser then provide the details of requested user +// provideUserDetails = true; +// user = userService.getUserInfoByUserId(userIdParam); +// } +// +// UserResponse resp = new UserResponse(); +// if (provideUserDetails) { +// resp.setOperationStatus(ResponseStatusEnum.SUCCESS); +// } +// else { +// resp.setOperationStatus(ResponseStatusEnum.NO_ACCESS); +// resp.setOperationMessage("No Access"); +// } +// resp.setData(user); +// return resp; +// } +// +// +// +// // @Secured({"ROLE_ADMIN", "ROLE_USER"}) +// @PreAuthorize("hasRole('ADMIN')") +// @RequestMapping(value = "/users", method = RequestMethod.GET) +// public List listUser() { +// return userService.getAll(); +// } +// +// // @Secured("ROLE_USER") +// // @PreAuthorize("hasRole('USER')") +// // @PreAuthorize("hasAnyRole('USER', 'ADMIN')") +// // @PreAuthorize("hasRole('ADMIN') && hasRole('USER')") +// @PreAuthorize("hasRole('USER')") +// @RequestMapping(value = "/users/{id}", method = RequestMethod.GET) +// public User getOne(@PathVariable(value = "id") Long id) { +// return userService.getById(id); +// } + /* + * @RequestMapping(value = "/signup", method = RequestMethod.POST) public User + * saveUser(@RequestBody UserDto user) { return userService.save(user); } + */ +} diff --git a/backend/src/main/java/com/realnet/users/controller1/AppUserController.java b/backend/src/main/java/com/realnet/users/controller1/AppUserController.java new file mode 100644 index 0000000..47455bf --- /dev/null +++ b/backend/src/main/java/com/realnet/users/controller1/AppUserController.java @@ -0,0 +1,324 @@ +package com.realnet.users.controller1; + +import java.util.Date; +import java.util.HashSet; +import java.util.List; +import java.util.Optional; +import java.util.Set; +import java.util.UUID; + +import javax.servlet.http.HttpServletRequest; +import javax.validation.Valid; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.config.EmailService; +import com.realnet.userDTO.User; +import com.realnet.users.entity.PasswordResetRequest; +import com.realnet.users.entity.Role; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.entity1.AppUserDto; +import com.realnet.users.entity1.AppUserRole; +import com.realnet.users.entity1.Registration; +import com.realnet.users.entity1.SignUp; +import com.realnet.users.repository.RoleRepo; +import com.realnet.users.repository1.AppUserRepository; +import com.realnet.users.repository1.AppUserRoleRepository; +import com.realnet.users.response.MessageResponse; +import com.realnet.users.service1.AppUserServiceImpl; +import com.realnet.utils.Port_Constant; + +import io.swagger.annotations.ApiOperation; + +@RestController +@RequestMapping(value = "/api") +public class AppUserController { + @Autowired + private AppUserServiceImpl userService; + @Autowired + private BCryptPasswordEncoder bcryptEncoder; + @Autowired + private AppUserRepository appUserRepository; + + @Autowired + private RoleRepo roleRepo; + @Autowired + private AppUserRoleRepository appUserRoleRepository; + + private AppUserServiceImpl appUserServiceImpl; + private EmailService emailService; + + @Autowired + public AppUserController(AppUserServiceImpl appUserServiceImpl, EmailService emailService) { + super(); + this.appUserServiceImpl = appUserServiceImpl; + this.emailService = emailService; + } + + @GetMapping("/getAllAppUser") + public ResponseEntity getAllUsers( + @RequestParam(value = "page", defaultValue = "0", required = false) Integer page, + @RequestParam(value = "size", defaultValue = "1000", required = false) Integer size) { + Pageable p = PageRequest.of(page, size); + List u = appUserServiceImpl.getAllAppUsers(p); + return new ResponseEntity<>(u, HttpStatus.OK); + } + + @GetMapping("/getOneAppUser/{id}") + public ResponseEntity getOneAppUser(@PathVariable("id") Long id) { + AppUser a = appUserServiceImpl.getOneUser(id); + if (a != null) { + return new ResponseEntity<>(a, HttpStatus.OK); + } + return new ResponseEntity<>("User not found", HttpStatus.OK); + } + + @PostMapping("/addOneAppUser") + public ResponseEntity addOneUser(@RequestBody Registration reg) { + if (appUserRepository.findByEmail(reg.getEmail()) != null) { + return ResponseEntity.badRequest().body(new MessageResponse("email already exist")); + } + AppUser a = appUserServiceImpl.addOneUser(reg); + return new ResponseEntity<>(a, HttpStatus.OK); + } + + @GetMapping("/test") + public void test() { + System.out.println("Aaa"); + } + + @PostMapping("/addOneAppUserCustom") + public ResponseEntity addOneUserCustom(@RequestBody User appUser) { + System.out.println("aaaaa"); + System.out.println(appUser); + AppUser a = appUserServiceImpl.addOneUserCustom(appUser); + System.out.println(a); + return new ResponseEntity<>(HttpStatus.OK); + } + + @PutMapping("/updateAppUser") + public ResponseEntity updateOneUser(@RequestBody AppUser appUser) { + AppUser a = appUserServiceImpl.updateOneUser(appUser); + return new ResponseEntity<>(a, HttpStatus.OK); + } + +// update app user + @PutMapping("/updateAppUserDto/{userId}") + public ResponseEntity updateAppUser(@PathVariable String userId, @RequestBody AppUserDto appUserDto) { + AppUser a = appUserServiceImpl.updateAppUserDto(userId, appUserDto); + if (a != null) { + return new ResponseEntity<>(a, HttpStatus.OK); + } + return new ResponseEntity<>("No user found", HttpStatus.BAD_REQUEST); + } + + @PostMapping("/resetPasswordEmail/{userId}") + public ResponseEntity sendEmailForResetPassword(@PathVariable("userId") Long userId) { + AppUser a = appUserServiceImpl.getUserInfoByUserId(userId); + // random string + String hash = appUserServiceImpl.generateRandomHash(8); + if (a != null) { + String email = a.getEmail(); + String subject = "Pass reset"; + String link = "http://" + hash + "/" + String.valueOf(a.getUserId()); + emailService.sendSimpleMessage(null, email, subject, link); + return new ResponseEntity<>("Email sent success", HttpStatus.OK); + } + return new ResponseEntity<>("User not found", HttpStatus.BAD_REQUEST); + } + + @PostMapping("/resetPassword/{userId}/{hash}") + public ResponseEntity resetPassword(@PathVariable("userId") Long userId, @PathVariable("hash") String hash, + @RequestBody PasswordResetRequest passwordResetRequest) { + + AppUser a = appUserServiceImpl.resetPassword(userId, hash, passwordResetRequest.getNewPassword()); + if (a != null) { + return new ResponseEntity<>("Password Reset Successfull", HttpStatus.OK); + } + return new ResponseEntity<>("Password Not changed", HttpStatus.BAD_REQUEST); + } + + // By Gk + // ADD USER VIA ADMIN + @ApiOperation(value = "Add user Via Admin") + @PostMapping("/userviaadmin") + public ResponseEntity userviaadmin(HttpServletRequest request, @RequestParam("email") String email) { + AppUser loggedInUser = userService.getLoggedInUser(); + Long account_id = loggedInUser.getAccount().getAccount_id(); + + AppUser user = userService.findUserByEmail(email); + if (user != null) { + return ResponseEntity.badRequest().body(new MessageResponse(email + " already exist")); + } else { + String token = UUID.randomUUID().toString(); + AppUser appUser = new AppUser(); + userService.adduserviaadmin(appUser, token, email, account_id); + + String subject = "add user"; + // String url = "http://localhost:4200/#/adduser/" +token; + // String url = "http://surecns.ml:30165/#/adduser/" +token; + String url = "http://" + Port_Constant.LOCAL_HOST + ":" + Port_Constant.BACKEND_PORT_9191 + "/api" + + "/admin/adduser/" + token; + emailService.adduserviaadmin(email, subject, url); + return new ResponseEntity<>("Email sent success", HttpStatus.OK); + } + + } + + // get email make user VIA ADMIN + @PostMapping("/admin/adduser/{token}") + public ResponseEntity saveuser(@PathVariable String token, @Valid @RequestBody SignUp signUp) { + + AppUser a = appUserRepository.findByToken(token); + + if (a != null) { + + if (signUp.getPassword().equals(signUp.getConfirm_password())) { + + a.setFullName(signUp.getFirst_name() + " " + signUp.getLast_name()); + a.setMob_no(signUp.getMob_no()); + a.setUserPassw(bcryptEncoder.encode(signUp.getPassword())); + a.setPwdChangedCnt(a.getPwdChangedCnt() != null ? (long) 1 + a.getPwdChangedCnt() : (long) 1); + a.setLastPwdChangedDate(new Date()); + a.setChangePassw(signUp.getPassword()); + a.setIsComplete(true); + a.setActive(true); + + long r = 42; + AppUserRole grp = appUserRoleRepository.findById(r); + a.setUsrGrp(grp); +// Set strRoles = a.getRoles(); + Set roles = new HashSet<>(); + +// if (strRoles == null) { + String role1 = "ROLE_Developer"; + Role userRole = roleRepo.findByName(role1); + roles.add(userRole); + a.setRoles(roles); +// } + a.setRandom_no(null); + AppUser save = appUserRepository.save(a); + return new ResponseEntity<>(save, HttpStatus.CREATED); + + } + return ResponseEntity.badRequest().body(new MessageResponse("password and confirm password not match")); + } + + return ResponseEntity.ok().body(new MessageResponse("registration already done")); + } + + // By Gk + // ADD GUEST VIA ADMIN + @ApiOperation(value = "Add user Via Admin") + @PostMapping("/guest_via_admin") + public ResponseEntity guestviaadmin(HttpServletRequest request, @RequestParam("email") String email) { + + AppUser loggedInUser = userService.getLoggedInUser(); + Long account_id = loggedInUser.getAccount().getAccount_id(); + + AppUser user = userService.findUserByEmail(email); + if (user != null) { + return ResponseEntity.badRequest().body(new MessageResponse(email + " already exist")); + } else { + String token = UUID.randomUUID().toString(); + AppUser appUser = new AppUser(); + userService.addguestviaadmin(appUser, token, email, account_id); + + String subject = "add guest"; + // String url = "http://localhost:4200/#/addguest/" +token; + // String url = "http://surecns.ml:30165/#/addguest/" +token; + String url = "http://" + Port_Constant.LOCAL_HOST + ":" + Port_Constant.BACKEND_PORT_9191 + "/api" + + "/admin/addguest/" + token; + emailService.adduserviaadmin(email, subject, url); + return new ResponseEntity<>("Email sent success", HttpStatus.OK); + } + + } + + // get email ADD GUEST VIA ADMIN + @PostMapping("/admin/addguest/{token}") + public ResponseEntity saveguest(@PathVariable String token, @Valid @RequestBody SignUp signUp) { + + AppUser a = appUserRepository.findByToken(token); + + if (a != null) { + + if (signUp.getPassword().equals(signUp.getConfirm_password())) { + + a.setFullName(signUp.getFirst_name() + " " + signUp.getLast_name()); + a.setMob_no(signUp.getMob_no()); + a.setUserPassw(bcryptEncoder.encode(signUp.getPassword())); + a.setPwdChangedCnt(a.getPwdChangedCnt() != null ? (long) 1 + a.getPwdChangedCnt() : (long) 1); + a.setLastPwdChangedDate(new Date()); + a.setChangePassw(signUp.getPassword()); + a.setIsComplete(true); + a.setActive(true); + long r = 45; + AppUserRole grp = appUserRoleRepository.findById(r); + a.setUsrGrp(grp); +// Set strRoles = a.getRoles(); + Set roles = new HashSet<>(); + +// if (strRoles == null) { + String role1 = "ROLE_GUEST"; + Role userRole = roleRepo.findByName(role1); + roles.add(userRole); + a.setRoles(roles); +// } + a.setRandom_no(null); + AppUser save = appUserRepository.save(a); + return new ResponseEntity<>(save, HttpStatus.CREATED); + + } + return ResponseEntity.badRequest().body(new MessageResponse("password and confirm password not match")); + } + + return ResponseEntity.ok().body(new MessageResponse("registration already done")); + } + + // GET ALL USER FOR CHAT APP + @GetMapping("/token/getalluser_chat") + public ResponseEntity getAllUserSforchat() { + + List u = appUserRepository.findAll(); + return new ResponseEntity<>(u, HttpStatus.OK); + } + + // GET ALL USER FOR CHAT APP + @GetMapping("/token/getuser_chat/{userName}") + public ResponseEntity getUserSforchat(@PathVariable String userName) { + + AppUser u = appUserRepository.findByUserName(userName); + return new ResponseEntity<>(u, HttpStatus.OK); + } + + @GetMapping("/token/getchatuser_byid/{id}") + public ResponseEntity getChatUserById(@PathVariable Long id) { + AppUser u = appUserRepository.findByUserId(id); + return new ResponseEntity<>(u, HttpStatus.OK); + } + + @DeleteMapping("/delete_usr/{user_id}") + public ResponseEntity deleteusr(@PathVariable String user_id) { + Optional r = appUserRepository.findById(user_id); + r.get().setActive(false); + AppUser save = appUserRepository.save(r.get()); + + return new ResponseEntity<>(save, HttpStatus.OK); + + } +} diff --git a/backend/src/main/java/com/realnet/users/controller1/AppUserGrpController.java b/backend/src/main/java/com/realnet/users/controller1/AppUserGrpController.java new file mode 100644 index 0000000..e060c42 --- /dev/null +++ b/backend/src/main/java/com/realnet/users/controller1/AppUserGrpController.java @@ -0,0 +1,88 @@ +package com.realnet.users.controller1; + +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.List; +import java.util.Optional; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.users.entity1.AppUserRole; +import com.realnet.users.repository1.AppUserRoleRepository; +import com.realnet.users.service1.AppUserRoleServiceImpl; + +@RestController +@RequestMapping(value = "/token/api") +public class AppUserGrpController { + private AppUserRoleServiceImpl appUserRoleServiceImpl; + + @Autowired + private AppUserRoleRepository appUserRoleRepository; + + + @Autowired + public AppUserGrpController(AppUserRoleServiceImpl appUserRoleServiceImpl) { + super(); + this.appUserRoleServiceImpl = appUserRoleServiceImpl; + } + + @GetMapping("/getAllUsrGrp") + public ResponseEntity getAll() { + DateFormat simple = new SimpleDateFormat("dd MMM yyyy HH:mm:ss"); + List l = appUserRoleServiceImpl.getAll(); + for (AppUserRole o : l) { + if (o.getCreatedate() != null) { + o.setCreateDateFormated(simple.format(o.getCreatedate())); + } + if (o.getUpdatedate() != null) { + o.setUpdateDateFormated(simple.format(o.getUpdatedate())); + } + } + return new ResponseEntity<>(l, HttpStatus.OK); + } + + @GetMapping("/getOneUsrGrp/{id}") + public ResponseEntity getOne(@PathVariable("id") Long id) { + DateFormat simple = new SimpleDateFormat("dd MMM yyyy HH:mm:ss"); + AppUserRole r = appUserRoleServiceImpl.getOne(id); + if (r != null) { + if (r.getCreatedate() != null) { + r.setCreateDateFormated(simple.format(r.getCreatedate())); + } + if (r.getUpdatedate() != null) { + r.setUpdateDateFormated(simple.format(r.getUpdatedate())); + } + return new ResponseEntity<>(r, HttpStatus.OK); + } + return new ResponseEntity<>("not found", HttpStatus.BAD_REQUEST); + } + + @PostMapping("/addOneUsrGrp") + public ResponseEntity addOne(@RequestBody AppUserRole appUserRole) { + AppUserRole a = appUserRoleServiceImpl.addOne(appUserRole); + return new ResponseEntity<>(a, HttpStatus.OK); + } + + @PostMapping("/updateOneUsrGrp") + public ResponseEntity updateOne(@RequestBody AppUserRole appUserRole) { + AppUserRole a = appUserRoleServiceImpl.addOne(appUserRole); + return new ResponseEntity<>(a, HttpStatus.OK); + } + + @DeleteMapping("/delete_usrgrp/{id}") + public ResponseEntity deleteusrgroup(@PathVariable("id") Long id) { + AppUserRole r = appUserRoleServiceImpl.getOne(id); + appUserRoleRepository.delete(r); + + return new ResponseEntity<>("deleted", HttpStatus.OK); + } +} diff --git a/backend/src/main/java/com/realnet/users/controller1/AppuserSessionController.java b/backend/src/main/java/com/realnet/users/controller1/AppuserSessionController.java new file mode 100644 index 0000000..5481a2c --- /dev/null +++ b/backend/src/main/java/com/realnet/users/controller1/AppuserSessionController.java @@ -0,0 +1,61 @@ +package com.realnet.users.controller1; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileReader; +import java.io.IOException; +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.fnd.entity.Error; +import com.realnet.fnd.entity.ErrorPojo; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.entity1.AppUserSessions; +import com.realnet.users.repository1.AppUserSessionsRepository; +import com.realnet.utils.Constant; + +@RestController +@RequestMapping(value = "/user1/session") // , produces = MediaType.APPLICATION_JSON_VALUE) +public class AppuserSessionController { + + @Value("${projectPath}") + private String projectPath; + + @Autowired + private AppUserSessionsRepository sessionsRepository; + + + + //get all app user session + @GetMapping("/getAll") + public ResponseEntity getAllLog() { + List l = sessionsRepository.findAll(); + return new ResponseEntity<>(l, HttpStatus.OK); + } + + //delete session by userid + @DeleteMapping("/delete/{userId}") + public ResponseEntity getOne(@PathVariable("userId") AppUser userId) { + List a = sessionsRepository.findByUserId(userId); + + for (AppUserSessions appUserSessions : a) { + sessionsRepository.delete(appUserSessions); + } + + if (a != null) { + return new ResponseEntity<>("deleted", HttpStatus.OK); + } + return new ResponseEntity<>("Not Found", HttpStatus.BAD_REQUEST); + } + + +} diff --git a/backend/src/main/java/com/realnet/users/controller1/PositonAndDepartmentController.java b/backend/src/main/java/com/realnet/users/controller1/PositonAndDepartmentController.java new file mode 100644 index 0000000..619bb5f --- /dev/null +++ b/backend/src/main/java/com/realnet/users/controller1/PositonAndDepartmentController.java @@ -0,0 +1,53 @@ +package com.realnet.users.controller1; + +import java.util.List; +import java.util.Optional; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.users.entity1.AppUserDepartment; +import com.realnet.users.entity1.AppUserPosition; +import com.realnet.users.service1.PositionAndDepartmentServiceImpl; + +@RestController +@RequestMapping(value = "/api") +public class PositonAndDepartmentController { + private PositionAndDepartmentServiceImpl positionAndDepartmentServiceImpl; + @Autowired + public PositonAndDepartmentController(PositionAndDepartmentServiceImpl positionAndDepartmentServiceImpl) { + super(); + this.positionAndDepartmentServiceImpl = positionAndDepartmentServiceImpl; + } + @GetMapping("/getAllDepartments") + public ResponseEntity getAll(){ + List l = positionAndDepartmentServiceImpl.getAll(); + return new ResponseEntity<>(l,HttpStatus.OK); + } + @GetMapping("/getDepartment/{id}") + public ResponseEntity getOne(@PathVariable("id") String id){ + Optional o = positionAndDepartmentServiceImpl.getOne(id); + if(o.get()!=null) { + return new ResponseEntity<>(o.get(),HttpStatus.OK); + } + return new ResponseEntity<>("Department not found",HttpStatus.BAD_REQUEST); + } + @GetMapping("/getAllPositions") + public ResponseEntity getAllPosition(){ + List l = positionAndDepartmentServiceImpl.getAllPosition(); + return new ResponseEntity<>(l,HttpStatus.OK); + } + @GetMapping("/getPosition/{id}") + public ResponseEntity getOnePosition(@PathVariable("id") String id){ + Optional o = positionAndDepartmentServiceImpl.getOnePosition(id); + if(o.get()!=null) { + return new ResponseEntity<>(o.get(),HttpStatus.OK); + } + return new ResponseEntity<>("Position not found",HttpStatus.BAD_REQUEST); + } +} diff --git a/backend/src/main/java/com/realnet/users/controller1/SysAccountController.java b/backend/src/main/java/com/realnet/users/controller1/SysAccountController.java new file mode 100644 index 0000000..f66106f --- /dev/null +++ b/backend/src/main/java/com/realnet/users/controller1/SysAccountController.java @@ -0,0 +1,66 @@ +package com.realnet.users.controller1; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.realnet.session.entity.AboutWork; +import com.realnet.users.entity.Sys_Accounts; +import com.realnet.users.repository.AboutWorkRepo; +import com.realnet.users.repository.SysAccountRepo; + +@RequestMapping("/token/users/sysaccount") +@RestController +public class SysAccountController { + + @Autowired + private SysAccountRepo sysAccountRepo; + + @Autowired + private AboutWorkRepo aboutWorkRepo; + + @PostMapping("/savesysaccount") + public Sys_Accounts save(@RequestBody Sys_Accounts sys_Accounts) { + Sys_Accounts save = sysAccountRepo.save(sys_Accounts); + + System.out.println("created account data is .." + save); + return save; + } + + @PostMapping("/addaccountcusto") + public AboutWork addaccountcusto(@RequestBody AboutWork aWork) { + + System.out.println("Here"); + AboutWork work = new AboutWork(); + work.setCompanyname(aWork.getCompanyname()); + work.setEmail(aWork.getEmail()); + work.setManaging_work(aWork.getManaging_work()); + work.setMobile(aWork.getMobile()); + work.setName(aWork.getName()); + work.setPancard(aWork.getPancard()); + work.setPassword(aWork.getPassword()); + work.setWorking(aWork.getWorking()); + + AboutWork save = aboutWorkRepo.save(work); + return save; + } + + @GetMapping("/sysaccount") + public List getall() { + + List getall = sysAccountRepo.findAll(); + return getall; + } + + @DeleteMapping("/deleteaccount") + public void deleteaccount() { + aboutWorkRepo.deleteAll(); + } + +} diff --git a/backend/src/main/java/com/realnet/users/controller1/WorkSpaceController1.java b/backend/src/main/java/com/realnet/users/controller1/WorkSpaceController1.java new file mode 100644 index 0000000..e8d0bb4 --- /dev/null +++ b/backend/src/main/java/com/realnet/users/controller1/WorkSpaceController1.java @@ -0,0 +1,137 @@ +//package com.realnet.users.controller1; +// +//import java.util.List; +// +//import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.http.HttpStatus; +//import org.springframework.http.ResponseEntity; +//import org.springframework.web.bind.annotation.DeleteMapping; +//import org.springframework.web.bind.annotation.GetMapping; +//import org.springframework.web.bind.annotation.PathVariable; +//import org.springframework.web.bind.annotation.PostMapping; +//import org.springframework.web.bind.annotation.RequestBody; +//import org.springframework.web.bind.annotation.RequestMapping; +//import org.springframework.web.bind.annotation.RestController; +// +//import com.realnet.Workspaceuser.Entity.Sec_team_members; +//import com.realnet.Workspaceuser.Entity.Sec_teams; +//import com.realnet.Workspaceuser.Repository.SecWorkspaceUserRepo; +//import com.realnet.Workspaceuser.Repository.Sec_team_MemberRepository; +//import com.realnet.Workspaceuser.Repository.Sec_teams_Repository; +//import com.realnet.users.entity1.AppUser; +//import com.realnet.users.repository1.AppUserRepository; +//import com.realnet.users.response.MessageResponse; +//import com.realnet.users.service1.AppUserServiceImpl; +// +//@RestController +//@RequestMapping("/User_workSpace") +//public class WorkSpaceController1 { +// @Autowired +// private AppUserServiceImpl userService; +// +// @Autowired +// private AppUserRepository appUserRepository; +// @Autowired +// private Sec_teams_Repository sec_teams_Repository; +// +// @Autowired +// private Sec_team_MemberRepository memberRepository; +// +// @Autowired +// private SecWorkspaceUserRepo secWorkspaceUserRepo; +// +// //GET ALL USER attach from login id +// @GetMapping("/GetAll") +// public ResponseEntity getall(){ +// AppUser loggedInUser = userService.getLoggedInUser(); +// Long account_id = loggedInUser.getAccount().getAccount_id(); +// +// List li = appUserRepository.getall(account_id); +// return new ResponseEntity<>(li,HttpStatus.OK); +// } +// +// //ADD USER TO SPECIFIC TEAM +// @PostMapping("/add_team/{id}/{userId}") +// public ResponseEntity addteam(@RequestBody Sec_team_members team_mem, +// @PathVariable int id,@PathVariable Long userId){ +// Sec_team_members members = memberRepository.findteammember(id,userId); +// if(members == null) { +// +// Sec_teams team = sec_teams_Repository.findById(id); +// if(team != null) { +// +// AppUser user = appUserRepository.findById(userId).orElseThrow(null); +// +// team_mem.setTeam_id(team.getId()); +// team_mem.setMember_name(user.getFullName()); +// team_mem.setMember_id(user.getUserId()); +// Sec_team_members save = memberRepository.save(team_mem); +// +// +// return new ResponseEntity<>(save, HttpStatus.OK); +// +// } +// else +// return ResponseEntity.badRequest().body(new MessageResponse("team not found")); +// } +// else +// return ResponseEntity.badRequest().body(new MessageResponse("member already added")); +// } +// +// //REMOVE MEMBER FROM TEAM +// @DeleteMapping("/RemoveMember/{id}/{userId}") +// public MessageResponse removemember(@PathVariable int id,@PathVariable Long userId){ +// Sec_team_members members = memberRepository.findteammember(id,userId); +// if(members != null) { +// memberRepository.delete(members); +// return new MessageResponse("deleted"); +// }else +// +// return new MessageResponse("member not found"); +// } +// +// +// //GET ALL USER ADD BY ADMIN +// @GetMapping("/GetAllUser") +// public ResponseEntity GetUser(){ +// AppUser loggedInUser = userService.getLoggedInUser(); +// Long account_id = loggedInUser.getAccount().getAccount_id(); +// +// List li = appUserRepository.getalluser(account_id); +// return new ResponseEntity<>(li,HttpStatus.OK); +// } +// +// //GET ALL GUEST ADD BY ADMIN +// @GetMapping("/GetAllGuest") +// public ResponseEntity Getguest(){ +// AppUser loggedInUser = userService.getLoggedInUser(); +// Long account_id = loggedInUser.getAccount().getAccount_id(); +// +// List li = appUserRepository.getallguest(account_id); +// return new ResponseEntity<>(li,HttpStatus.OK); +// } +// +// //GET ALL TEAM MEMBER FROM SPECIFIC TEAM +// @GetMapping("/GetAllMember/{team_id}") +// public ResponseEntity GetAllteamMember(@PathVariable int team_id){ +// +// +// List li = memberRepository.getallteam(team_id); +// if(li == null) { +// return ResponseEntity.badRequest().body(new MessageResponse("team not found")); +// }else +// return new ResponseEntity<>(li,HttpStatus.OK); +// } +// +// +// +// +// +// +// +// +// +// +// +// +//} diff --git a/backend/src/main/java/com/realnet/users/entity/CompanyDto.java b/backend/src/main/java/com/realnet/users/entity/CompanyDto.java new file mode 100644 index 0000000..4fccdc4 --- /dev/null +++ b/backend/src/main/java/com/realnet/users/entity/CompanyDto.java @@ -0,0 +1,15 @@ +package com.realnet.users.entity; + +import java.io.Serializable; + +import lombok.Data; + +@Data +public class CompanyDto implements Serializable { + private static final long serialVersionUID = 1L; + private String userEmail; // for load the user who is responsible + private String companyName; + private String workspace; + private String gstNumber; + +} diff --git a/backend/src/main/java/com/realnet/users/entity/CustomUserDetails.java b/backend/src/main/java/com/realnet/users/entity/CustomUserDetails.java new file mode 100644 index 0000000..49c56a7 --- /dev/null +++ b/backend/src/main/java/com/realnet/users/entity/CustomUserDetails.java @@ -0,0 +1,77 @@ +//package com.realnet.users.entity; +// +//import java.util.Collection; +//import java.util.HashSet; +//import java.util.Set; +// +//import org.springframework.security.core.GrantedAuthority; +//import org.springframework.security.core.authority.SimpleGrantedAuthority; +//import org.springframework.security.core.userdetails.UserDetails; +// +//import com.fasterxml.jackson.annotation.JsonIgnore; +//import com.realnet.users.entity1.AppUser; +// +//import lombok.ToString; +// +//@ToString +//public class CustomUserDetails implements UserDetails { +// private static final long serialVersionUID = 3163073361116831556L; +// +// private AppUser user; +//// public User getUser() { +//// return user; +//// } +//// public void setUser(User user) { +//// this.user = user; +//// } +// +// public CustomUserDetails(AppUser user) { +// super(); +// this.user = user; +// } +// +// @Override +// public Collection getAuthorities() { +// Set authorities = new HashSet<>(); +// user.getRoles().forEach(role -> { +// authorities.add(new SimpleGrantedAuthority("ROLE_" + role.getName())); +// }); +// return authorities; +// } +// +// @Override +// public String getPassword() { +// return user.getPassword(); +// } +// +// @Override +// public String getUsername() { +// //return user.getUsername(); +// return user.getEmail(); +// } +// +// @JsonIgnore +// @Override +// public boolean isAccountNonExpired() { +// return true; +// } +// +// @JsonIgnore +// @Override +// public boolean isAccountNonLocked() { +// return true; +// } +// +// @JsonIgnore +// @Override +// public boolean isCredentialsNonExpired() { +// return true; +// } +// +// @JsonIgnore +// @Override +// public boolean isEnabled() { +// return true; +// } +// +//} diff --git a/backend/src/main/java/com/realnet/users/entity/ERole.java b/backend/src/main/java/com/realnet/users/entity/ERole.java new file mode 100644 index 0000000..5d7cacf --- /dev/null +++ b/backend/src/main/java/com/realnet/users/entity/ERole.java @@ -0,0 +1,14 @@ +package com.realnet.users.entity; + +public enum ERole { + ROLE_USER, + ROLE_ADMIN, + ROLE_REVIEWER, + ROLE_COLLABORATOR, + ROLE_ProjectManager, + ROLE_Scum_master, + ROLE_Developer, + ROLE_Tester, + ROLE_DevOps + +} diff --git a/backend/src/main/java/com/realnet/users/entity/Email.java b/backend/src/main/java/com/realnet/users/entity/Email.java new file mode 100644 index 0000000..42d53d6 --- /dev/null +++ b/backend/src/main/java/com/realnet/users/entity/Email.java @@ -0,0 +1,89 @@ +package com.realnet.users.entity; + + + +import org.springframework.data.annotation.Id; +import org.springframework.data.mongodb.core.mapping.Document; + +import com.fasterxml.jackson.annotation.JsonBackReference; +import com.realnet.fnd.entity.Rn_Who_Columns; + +import lombok.Data; + + +//@Entity +@Document +public class Email extends Rn_Who_Columns { + +// @Id +// @Column(name = "user_id") +// @GeneratedValue(strategy = GenerationType.IDENTITY) + @Id + private String mongoid; + + private Long userId; + private String email1; + private String email2; + private String email3; + private String email4; + + private Long id; + public Long getId() { + return id; + } + public void setId(Long id) { + this.id = id; + } + +// private String password; + +// @ManyToOne(fetch = FetchType.LAZY) +// @JoinColumn(name = "ACCOUNT_ID") +// @JsonBackReference +// private Sys_Accounts sys_account; + +//public String getPassword() { +// return password; +// } +// public void setPassword(String password) { +// this.password = password; +// } + // public Sys_Accounts getSys_account() { +// return sys_account; +// } +// public void setSys_account(Sys_Accounts sys_account) { +// this.sys_account = sys_account; +// } + public Long getUserId() { + return userId; + } + public void setUserId(Long userId) { + this.userId = userId; + } + public String getEmail1() { + return email1; + } + public void setEmail1(String email1) { + this.email1 = email1; + } + public String getEmail2() { + return email2; + } + public void setEmail2(String email2) { + this.email2 = email2; + } + public String getEmail3() { + return email3; + } + public void setEmail3(String email3) { + this.email3 = email3; + } + public String getEmail4() { + return email4; + } + public void setEmail4(String email4) { + this.email4 = email4; + } + + +} diff --git a/backend/src/main/java/com/realnet/users/entity/EmailRequest.java b/backend/src/main/java/com/realnet/users/entity/EmailRequest.java new file mode 100644 index 0000000..fb55795 --- /dev/null +++ b/backend/src/main/java/com/realnet/users/entity/EmailRequest.java @@ -0,0 +1,8 @@ +package com.realnet.users.entity; + +import lombok.Data; + +@Data +public class EmailRequest { + private String email; +} diff --git a/backend/src/main/java/com/realnet/users/entity/GenericResponse.java b/backend/src/main/java/com/realnet/users/entity/GenericResponse.java new file mode 100644 index 0000000..f58d128 --- /dev/null +++ b/backend/src/main/java/com/realnet/users/entity/GenericResponse.java @@ -0,0 +1,20 @@ +package com.realnet.users.entity; + +public class GenericResponse { + private String message; + private String error; + + + + public GenericResponse(String message) { + super(); + this.message = message; + } + + public GenericResponse(String message, String error) { + super(); + this.message = message; + this.error = error; + } + +} diff --git a/backend/src/main/java/com/realnet/users/entity/Login.java b/backend/src/main/java/com/realnet/users/entity/Login.java new file mode 100644 index 0000000..e306b9f --- /dev/null +++ b/backend/src/main/java/com/realnet/users/entity/Login.java @@ -0,0 +1,15 @@ +package com.realnet.users.entity; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +public class Login { + + @ApiModelProperty(example = "demo", required = true) + private String username = ""; + + @ApiModelProperty(example = "demo", required = true) + private String password = ""; + +} diff --git a/backend/src/main/java/com/realnet/users/entity/LoginUser.java b/backend/src/main/java/com/realnet/users/entity/LoginUser.java new file mode 100644 index 0000000..6b4e45b --- /dev/null +++ b/backend/src/main/java/com/realnet/users/entity/LoginUser.java @@ -0,0 +1,37 @@ +package com.realnet.users.entity; + +public class LoginUser { + + //private String username; + private String email; + private String password; + + /* + * public String getUsername() { return username; } + * + * public void setUsername(String username) { this.username = username; } + */ + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + +// @Override +// public String toString() { +// return "LoginUser [email=" + email + ", password=" + password + "]"; +// } + + +} diff --git a/backend/src/main/java/com/realnet/users/entity/PasswordResetRequest.java b/backend/src/main/java/com/realnet/users/entity/PasswordResetRequest.java new file mode 100644 index 0000000..6dfaf3b --- /dev/null +++ b/backend/src/main/java/com/realnet/users/entity/PasswordResetRequest.java @@ -0,0 +1,16 @@ +package com.realnet.users.entity; + +import lombok.Data; + +@Data +public class PasswordResetRequest { + + private Long userId; + private String email; + + private String oldPassword; + private String newPassword; + private String token; + private String hash; + private String confirmPassword; +} diff --git a/backend/src/main/java/com/realnet/users/entity/PasswordResetToken.java b/backend/src/main/java/com/realnet/users/entity/PasswordResetToken.java new file mode 100644 index 0000000..16ae738 --- /dev/null +++ b/backend/src/main/java/com/realnet/users/entity/PasswordResetToken.java @@ -0,0 +1,52 @@ +package com.realnet.users.entity; + +import java.util.Date; + +import org.springframework.data.annotation.Id; +import org.springframework.data.mongodb.core.mapping.Document; + +import com.realnet.users.entity1.AppUser; + +import lombok.Data; + +@Data +//@Entity + +@Document +public class PasswordResetToken { + + private static final int EXPIRATION = 60 * 24; + + @Id + private String mongoid; + +// @Id +// @GeneratedValue(strategy = GenerationType.AUTO) + private Long id; + + private String token; + +// @OneToOne(targetEntity = AppUser.class, fetch = FetchType.EAGER) +// @JoinColumn(nullable = false, name = "user_id") + private AppUser user; + + private Date expiryDate; + + public PasswordResetToken(AppUser user, String token) { + super(); + this.token = token; + this.user = user; + } + + public PasswordResetToken(String token) { + super(); + this.token = token; +// this.user = user; + } + + public PasswordResetToken() { + super(); + // TODO Auto-generated constructor stub + } + +} diff --git a/backend/src/main/java/com/realnet/users/entity/Role.java b/backend/src/main/java/com/realnet/users/entity/Role.java new file mode 100644 index 0000000..afdf672 --- /dev/null +++ b/backend/src/main/java/com/realnet/users/entity/Role.java @@ -0,0 +1,90 @@ +package com.realnet.users.entity; + +import java.util.Set; + +import org.springframework.data.annotation.Id; +import org.springframework.data.mongodb.core.mapping.Document; + +import com.fasterxml.jackson.annotation.JsonBackReference; +import com.realnet.users.entity1.AppUser; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; + +@Data +//@Entity +@Document +public class Role { + + @Id + private String mongoid; +// @Id +// @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + +// @Column + private String name; + +// @Column + private String description; + +// @JsonBackReference +// @ManyToMany(fetch = FetchType.EAGER, mappedBy = "roles", cascade = { CascadeType.PERSIST, CascadeType.DETACH, +// CascadeType.MERGE, CascadeType.REFRESH }) +// private Set users; + +// @JsonBackReference +// @ManyToMany(fetch = FetchType.EAGER, mappedBy = "roles", cascade = { CascadeType.PERSIST, CascadeType.DETACH, +// CascadeType.MERGE, CascadeType.REFRESH }) + private Set appusers; + +// public Long getId() { +// return id; +// } +// +// public void setId(Long id) { +// this.id = id; +// } +// +// public String getName() { +// return name; +// } +// +// public void setName(String name) { +// this.name = name; +// } +// +// public String getDescription() { +// return description; +// } +// +// public void setDescription(String description) { +// this.description = description; +// } +// +// public Set getUsers() { +// return users; +// } +// +// public void setUsers(Set users) { +// this.users = users; +// } +// +// public Role(Long id, String name, String description, Set users) { +// super(); +// this.id = id; +// this.name = name; +// this.description = description; +// this.users = users; +// } + + public Role() { + + // TODO Auto-generated constructor stub + } + +} diff --git a/backend/src/main/java/com/realnet/users/entity/RoleUpdateDto.java b/backend/src/main/java/com/realnet/users/entity/RoleUpdateDto.java new file mode 100644 index 0000000..c5b5152 --- /dev/null +++ b/backend/src/main/java/com/realnet/users/entity/RoleUpdateDto.java @@ -0,0 +1,36 @@ +package com.realnet.users.entity; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotEmpty; + +import io.swagger.annotations.ApiModelProperty; + +public class RoleUpdateDto { + + @ApiModelProperty(notes = "User identifier", required = true) + @NotBlank(message = "The userId is required") + private Long userId; + + @ApiModelProperty(notes = "Array of roles to give to an user", required = true) + @NotEmpty(message = "The field must have at least one item") + private String[] roles; + + public Long getUserId() { + return userId; + } + + public RoleUpdateDto setUserId(Long userId) { + this.userId = userId; + return this; + } + + public String[] getRoles() { + return roles; + } + + public RoleUpdateDto setRoles(String[] roles) { + this.roles = roles; + return this; + } + +} diff --git a/backend/src/main/java/com/realnet/users/entity/Sys_Accounts.java b/backend/src/main/java/com/realnet/users/entity/Sys_Accounts.java new file mode 100644 index 0000000..adb7a2c --- /dev/null +++ b/backend/src/main/java/com/realnet/users/entity/Sys_Accounts.java @@ -0,0 +1,50 @@ +package com.realnet.users.entity; + +import java.util.List; + +import org.springframework.data.annotation.Id; +import org.springframework.data.mongodb.core.mapping.Document; + +import com.fasterxml.jackson.annotation.JsonManagedReference; +import com.realnet.users.entity1.AppUser; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + +@Data +@ToString(exclude="users") +@EqualsAndHashCode(callSuper=false) +//@Entity +//@Table(name = "sys_accounts") +@Document +public class Sys_Accounts { + + @Id + private String mongoid; +// @Id +// @Column(name = "id") +// @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long account_id; + +// @Column(name = "company_name") + private String companyName; + +// @Column(name = "workspace") + private String workspace; + +// @Column(name = "gst_no") + private String gstNumber; + + private String mobile; + private String email; + + private String pancard; + private String working; + + +// @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY) +// @JsonManagedReference + private List users; + +} diff --git a/backend/src/main/java/com/realnet/users/entity/UserDto.java b/backend/src/main/java/com/realnet/users/entity/UserDto.java new file mode 100644 index 0000000..a677c12 --- /dev/null +++ b/backend/src/main/java/com/realnet/users/entity/UserDto.java @@ -0,0 +1,27 @@ +package com.realnet.users.entity; + +import java.io.Serializable; +import java.util.Set; + +import com.fasterxml.jackson.annotation.JsonIgnore; + +import lombok.Data; + +@Data +public class UserDto implements Serializable { + private static final long serialVersionUID = 1L; +// private String username; +// private String password; + private String firstName; + private String lastName; + private String password; + private String email; + private String fullName; + private String department; + private int menuGroupId; + @JsonIgnore + private String phone; + @JsonIgnore + private Set roles; + +} diff --git a/backend/src/main/java/com/realnet/users/entity/UserProfileDTO.java b/backend/src/main/java/com/realnet/users/entity/UserProfileDTO.java new file mode 100644 index 0000000..6d26cc8 --- /dev/null +++ b/backend/src/main/java/com/realnet/users/entity/UserProfileDTO.java @@ -0,0 +1,21 @@ +package com.realnet.users.entity; + +import java.io.Serializable; + +import lombok.Data; + +@Data +public class UserProfileDTO implements Serializable { + /** + * + */ + private static final long serialVersionUID = 1L; + + private String fullName; + private String pronounce; + private String role; + private String department; + private String about; + + +} diff --git a/backend/src/main/java/com/realnet/users/entity1/AppUser.java b/backend/src/main/java/com/realnet/users/entity1/AppUser.java new file mode 100644 index 0000000..41137d4 --- /dev/null +++ b/backend/src/main/java/com/realnet/users/entity1/AppUser.java @@ -0,0 +1,156 @@ +package com.realnet.users.entity1; + +import java.io.Serializable; +import java.sql.Blob; +import java.time.LocalDateTime; +import java.util.Date; +import java.util.Set; + + +import org.springframework.data.annotation.CreatedDate; +import org.springframework.data.annotation.Id; +import org.springframework.data.annotation.LastModifiedDate; +import org.springframework.data.mongodb.core.mapping.Document; + +import com.fasterxml.jackson.annotation.JsonBackReference; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.realnet.users.entity.PasswordResetToken; +import com.realnet.users.entity.Role; +import com.realnet.users.entity.Sys_Accounts; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; + +//@Entity +//@Table(name = "SEC_USERS") +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@ToString +@Document +public class AppUser implements Serializable { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + private String mongoid; +// @Id +// @Column(name = "user_id") +// @GeneratedValue(generator = "SecUsers_gen") +// @SequenceGenerator(name = "SecUsers_gen", sequenceName = "sec_users_sequencs", initialValue = 10007300, allocationSize = 1) + private Long userId; + +// @Column(name = "user_name", unique = true) + private String username; + + private String userPassw; + private String title; + private String shortName; + private String fullName; + private Date expiryDate; + private String daysMth; + private Long noDaysMth; + private String status; + private String changePassw; + + private String createby; + +// @Temporal(TemporalType.TIMESTAMP) +// @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss") +// @Column(name = "createdate", nullable = false, updatable = false) +// @CreatedDate + private LocalDateTime createdate; + + private String updateby; + +// @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss") +// @Temporal(TemporalType.TIMESTAMP) +// @LastModifiedDate + private Date updatedate; + +// @ManyToOne +// @JoinColumn(name = "usr_grp") + private AppUserRole usrGrp; + + private String langCode; + + private String firstLogin; + +// @ManyToOne +// @JoinColumn(name = "position_code") + private AppUserPosition positionCode; + +// @ManyToOne +// @JoinColumn(name = "department_code") + private AppUserDepartment departmentCode; + +// @JsonBackReference +// @ManyToOne + private Sys_Accounts Account; + + private String email; + private String notification; + private Long customerId; + private String password1; + private String password2; + private String password3; + private String password4; + private Long pwdChangedCnt; + private Date lastPwdChangedDate; + private Blob photo; + private String photoName; + + private String provider; + private String country; + private String depString; + private boolean isBlocked; + private String about; + private Long checknumber; + private String working; + private String accesstype; +// private Integer access_duration; +// +// @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "dd-mm-yyyy") +// private Date access_till_date; + + private String random_no; + private Long mob_no; + + private boolean IsComplete; + + private boolean active; + +// @Transient + private String customerNumer; +// @Transient + private String positionCodeString; +// @Transient + private String departmentCodeString; + + // @Transient + private Long usrGrpId; +// @Transient + private String confirmPassword; +// @Transient + private String usrGrpName; +// @Transient + private StringBuilder totalLogInfo; + +// @Transient +// @JsonIgnore + private PasswordResetToken pass; + +// @ManyToMany(targetEntity = Role.class, fetch = FetchType.EAGER, cascade = { CascadeType.PERSIST, CascadeType.DETACH, +// CascadeType.ALL, CascadeType.REFRESH }) +// @JoinTable(name = "SECUSER_ROLES", joinColumns = { @JoinColumn(name = "SECUSER_ID") }, inverseJoinColumns = { +// @JoinColumn(name = "ROLE_ID") }) + private Set roles; + +} diff --git a/backend/src/main/java/com/realnet/users/entity1/AppUserDepartment.java b/backend/src/main/java/com/realnet/users/entity1/AppUserDepartment.java new file mode 100644 index 0000000..14b348b --- /dev/null +++ b/backend/src/main/java/com/realnet/users/entity1/AppUserDepartment.java @@ -0,0 +1,41 @@ +package com.realnet.users.entity1; + +import java.util.Date; + +import org.springframework.data.annotation.Id; +import org.springframework.data.mongodb.core.mapping.Document; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; + +//@Entity +//@Table(name="DEPARTMENT") +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@ToString +@Document +public class AppUserDepartment { + + @Id + private String mongoid; +// @Id +// @Column(name="department_code") + private String departmentCode; + private String active; + private String description; +// @Column(name="created_on") + private Date createdOn; +// @Column(name="created_by") + private String createdBy; +// @Column(name="created_on",updatable = false,insertable = false) + private Date updatedOn; +// @Column(name="updated_by") + private String updatedBy; + private Long id; + +} diff --git a/backend/src/main/java/com/realnet/users/entity1/AppUserDto.java b/backend/src/main/java/com/realnet/users/entity1/AppUserDto.java new file mode 100644 index 0000000..4f8af42 --- /dev/null +++ b/backend/src/main/java/com/realnet/users/entity1/AppUserDto.java @@ -0,0 +1,25 @@ +package com.realnet.users.entity1; + +import lombok.Data; + +@Data +public class AppUserDto { + private Long userId; + private String username; + private String userPassw; + private String title; + private String shortName; + private String fullName; + private String status; + + private String positionCodeId; + private String departmentCodeId; + private Long usrGrpId; + private Long customerId; + private String email; + private String notification; + private Long mob_no; + private boolean active; + + +} diff --git a/backend/src/main/java/com/realnet/users/entity1/AppUserLoginHist.java b/backend/src/main/java/com/realnet/users/entity1/AppUserLoginHist.java new file mode 100644 index 0000000..3ea8cfa --- /dev/null +++ b/backend/src/main/java/com/realnet/users/entity1/AppUserLoginHist.java @@ -0,0 +1,43 @@ +package com.realnet.users.entity1; + +import java.io.Serializable; +import java.util.Date; + +import org.springframework.data.annotation.Id; +import org.springframework.data.mongodb.core.mapping.Document; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; + +//@Entity +//@Table(name="USERLOGINHIST") +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@ToString +@Document +public class AppUserLoginHist implements Serializable{ + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + private String mongoid; +// @Id +// @OneToOne +// @JoinColumn(name="user_id") + private AppUser userId; + private Date lastLoginDate; + private Date lastPasswordChgDate; + private Long lastPasswordFailNo; + private String createBy; + private Date createDate; + private String updateBy; + private Date updateDate; + private Long expiryReminder; +} diff --git a/backend/src/main/java/com/realnet/users/entity1/AppUserPasswlog.java b/backend/src/main/java/com/realnet/users/entity1/AppUserPasswlog.java new file mode 100644 index 0000000..a93138c --- /dev/null +++ b/backend/src/main/java/com/realnet/users/entity1/AppUserPasswlog.java @@ -0,0 +1,45 @@ +package com.realnet.users.entity1; + +import java.io.Serializable; +import java.util.Date; + +import org.springframework.data.annotation.Id; +import org.springframework.data.mongodb.core.mapping.Document; + +import lombok.AllArgsConstructor; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; + +//@Entity +//@Table(name="USERPASSWLOG") +//@IdClass(AppUserPasswlogCompositeKey.class) +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@ToString +@EqualsAndHashCode +@Document +public class AppUserPasswlog implements Serializable{ + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + private String mongoid; +// @Id +// @ManyToOne +// @JoinColumn(name="user_id") + private AppUser userId; +// @Id + private String userPassw; + private String createBy; +// @Id + private Date createDate; + private String updateBy; + private Date updateDate; +} diff --git a/backend/src/main/java/com/realnet/users/entity1/AppUserPasswlogCompositeKey.java b/backend/src/main/java/com/realnet/users/entity1/AppUserPasswlogCompositeKey.java new file mode 100644 index 0000000..19aebcc --- /dev/null +++ b/backend/src/main/java/com/realnet/users/entity1/AppUserPasswlogCompositeKey.java @@ -0,0 +1,27 @@ +package com.realnet.users.entity1; + +import java.io.Serializable; +import java.util.Date; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +@Data +@Getter +@Setter +@EqualsAndHashCode +@AllArgsConstructor +@NoArgsConstructor +public class AppUserPasswlogCompositeKey implements Serializable{ + /** + * + */ + private static final long serialVersionUID = 1L; + private Long userId; + private String userPassw; + private Date createDate; +} diff --git a/backend/src/main/java/com/realnet/users/entity1/AppUserPosition.java b/backend/src/main/java/com/realnet/users/entity1/AppUserPosition.java new file mode 100644 index 0000000..0bbc250 --- /dev/null +++ b/backend/src/main/java/com/realnet/users/entity1/AppUserPosition.java @@ -0,0 +1,35 @@ +package com.realnet.users.entity1; + +import java.util.Date; + +import org.springframework.data.annotation.Id; +import org.springframework.data.mongodb.core.mapping.Document; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; + +//@Entity +//@Table(name="POSITION") +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@ToString +@Document +public class AppUserPosition { + + @Id + private String mongoid; + + private Long id; + private String positionCode; + private String active; + private String description; + private Date createdOn; + private String createdBy; + private Date updatedOn; + private String updatedBy; +} diff --git a/backend/src/main/java/com/realnet/users/entity1/AppUserPrinciple.java b/backend/src/main/java/com/realnet/users/entity1/AppUserPrinciple.java new file mode 100644 index 0000000..f6c1f2d --- /dev/null +++ b/backend/src/main/java/com/realnet/users/entity1/AppUserPrinciple.java @@ -0,0 +1,105 @@ +package com.realnet.users.entity1; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; + +import org.springframework.security.core.GrantedAuthority; +import org.springframework.security.core.authority.SimpleGrantedAuthority; +import org.springframework.security.core.userdetails.UserDetails; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.realnet.users.entity.Role; + +public class AppUserPrinciple implements UserDetails{ + + /** + * + */ + private static final long serialVersionUID = 1L; + private AppUser u; + public AppUserPrinciple(AppUser u) { + super(); + this.u = u; + } + + +// private String username; +// @JsonIgnore +// private String password; +// private String role; +// +// public AppUserPrinciple( String username, String password,String role +// ) { +// this.username = username; +// this.password = password; +// this.role = role; +// } + + + + @Override + public Collection getAuthorities() { +// Set authorities = new HashSet<>(); +// authorities.add(new SimpleGrantedAuthority("ROLE_"+u.getUsrGrp().getGroupName())); +//// u.getUsrGrp().forEach(role->{ +//// authorities.add(new SimpleGrantedAuthority("ROLE_"+role.getGroupName())); +//// }); +// return authorities; + + //FROM GK +// List authorities = u.getRoles().stream().map(role-> new SimpleGrantedAuthority(role.getName())).collect(Collectors.toList()); +// authorities.add(new SimpleGrantedAuthority("ROLE_"+role)); +// return authorities; + + Set roles = u.getRoles(); + List authorities = new ArrayList<>(); + + for (Role role : roles) { +// authorities.add(new SimpleGrantedAuthority(role.getName().getDeclaringClass().getName())); + authorities.add(new SimpleGrantedAuthority(role.getName())); + } + + return authorities; + } + + @Override + public String getPassword() { + // TODO Auto-generated method stub + return u.getUserPassw(); + } + + @Override + public String getUsername() { + // TODO Auto-generated method stub + return u.getUsername(); + } + + @Override + public boolean isAccountNonExpired() { + // TODO Auto-generated method stub + return true; + } + + @Override + public boolean isAccountNonLocked() { + // TODO Auto-generated method stub + return true; + } + + @Override + public boolean isCredentialsNonExpired() { + // TODO Auto-generated method stub + return true; + } + + @Override + public boolean isEnabled() { + // TODO Auto-generated method stub + return true; + } + +} diff --git a/backend/src/main/java/com/realnet/users/entity1/AppUserRole.java b/backend/src/main/java/com/realnet/users/entity1/AppUserRole.java new file mode 100644 index 0000000..fc5b45b --- /dev/null +++ b/backend/src/main/java/com/realnet/users/entity1/AppUserRole.java @@ -0,0 +1,60 @@ +package com.realnet.users.entity1; + +import java.io.Serializable; +import java.util.Date; + + + +import org.springframework.data.annotation.CreatedDate; +import org.springframework.data.annotation.Id; +import org.springframework.data.annotation.LastModifiedDate; + +import org.springframework.data.mongodb.core.mapping.Document; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; + + +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@ToString +@Document +public class AppUserRole implements Serializable{ + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + private String mongoid; +// @Id +// @Column(name="usr_grp") +// @GeneratedValue(generator = "SecUserGrp_gen") +// @SequenceGenerator(name="SecUserGrp_gen", sequenceName="sec_user_group_id",initialValue = 40, allocationSize = 1) + private Long usrGrp; //auto generate +// @Transient +// @ManyToOne(fetch=FetchType.LAZY,cascade = CascadeType.ALL) +// private AppUser appUser; + private String groupName; //will come + private String groupDesc; //will come + private String createby; +// @Temporal(TemporalType.TIMESTAMP) +// @CreatedDate + private Date createdate; +// @Temporal(TemporalType.TIMESTAMP) +// @LastModifiedDate + private Date updatedate; + private String updateby; + private String status; //will come but need to change + private Long groupLevel; //will come +// @Transient + private String createDateFormated; +// @Transient + private String updateDateFormated; + +} diff --git a/backend/src/main/java/com/realnet/users/entity1/AppUserSessions.java b/backend/src/main/java/com/realnet/users/entity1/AppUserSessions.java new file mode 100644 index 0000000..a1cf15d --- /dev/null +++ b/backend/src/main/java/com/realnet/users/entity1/AppUserSessions.java @@ -0,0 +1,48 @@ +package com.realnet.users.entity1; + +import java.io.Serializable; +import java.util.Date; + +import org.springframework.data.annotation.Id; +import org.springframework.data.mongodb.core.mapping.Document; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import lombok.AllArgsConstructor; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; + +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@ToString +@EqualsAndHashCode +@Document +public class AppUserSessions implements Serializable { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + private String mongoid; +// @Id +// @ManyToOne +// @JoinColumn(name="user_id") + private AppUser userId; +// @Id + private String sessionId; +// @Id + private String clientIp; + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss") + private Date lastAccessDate; + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss") + private Date logintime; + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss") + private Date logouttime; + private String macid; +} diff --git a/backend/src/main/java/com/realnet/users/entity1/AppUserSessionsCompositeKey.java b/backend/src/main/java/com/realnet/users/entity1/AppUserSessionsCompositeKey.java new file mode 100644 index 0000000..6ec8958 --- /dev/null +++ b/backend/src/main/java/com/realnet/users/entity1/AppUserSessionsCompositeKey.java @@ -0,0 +1,26 @@ +package com.realnet.users.entity1; + +import java.io.Serializable; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +@Data +@Getter +@Setter +@EqualsAndHashCode +@AllArgsConstructor +@NoArgsConstructor +public class AppUserSessionsCompositeKey implements Serializable{ + /** + * + */ + private static final long serialVersionUID = 1L; + private Long userId; + private String sessionId; + private String clientIp; +} diff --git a/backend/src/main/java/com/realnet/users/entity1/AppUser_who_column.java b/backend/src/main/java/com/realnet/users/entity1/AppUser_who_column.java new file mode 100644 index 0000000..0b2f777 --- /dev/null +++ b/backend/src/main/java/com/realnet/users/entity1/AppUser_who_column.java @@ -0,0 +1,48 @@ +package com.realnet.users.entity1; + +import java.io.Serializable; +import java.util.Date; + +import org.springframework.data.annotation.CreatedDate; +import org.springframework.data.annotation.LastModifiedDate; + + +import com.fasterxml.jackson.annotation.JsonFormat; + +import lombok.Data; + +@Data +//@MappedSuperclass +//@EntityListeners(AuditingEntityListener.class) +public class AppUser_who_column implements Serializable{ + + private static final long serialVersionUID = 1L; + +// @Temporal(TemporalType.TIMESTAMP) +// @Column(name = "CREATED_AT", nullable = false, updatable = false) +// @CreatedDate +// @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss") + private Date createdAt; + +// @Temporal(TemporalType.TIMESTAMP) +// @Column(name = "UPDATED_AT", nullable = false) +// @LastModifiedDate +// @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss") + private Date updatedAt; + + // @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime createdAt; + + +// @Column(name = "CREATED_BY", updatable = false) +// private Long createdBy; + +// @Column(name = "UPDATED_BY") +// private Long updatedBy; + + + +// @Column(name = "ACCOUNT_ID") +// private Long accountId; + + +} diff --git a/backend/src/main/java/com/realnet/users/entity1/Registration.java b/backend/src/main/java/com/realnet/users/entity1/Registration.java new file mode 100644 index 0000000..305a14b --- /dev/null +++ b/backend/src/main/java/com/realnet/users/entity1/Registration.java @@ -0,0 +1,35 @@ +package com.realnet.users.entity1; + + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.Size; + +import lombok.Data; + +@Data +public class Registration { + + private String first_name; + + private String last_name; + + private Long mob_no; + + private String email; + + private Long account_id; + + private Long usrGrpId; + + @NotBlank + @Size(min = 6, max = 40) + private String new_password; + + private String confirm_password; + private String accesstype; + + private String gender; + private String date_of_birth; +// @Lob + private String how_you_know_aboutus; +} diff --git a/backend/src/main/java/com/realnet/users/entity1/SignUp.java b/backend/src/main/java/com/realnet/users/entity1/SignUp.java new file mode 100644 index 0000000..b52a808 --- /dev/null +++ b/backend/src/main/java/com/realnet/users/entity1/SignUp.java @@ -0,0 +1,24 @@ +package com.realnet.users.entity1; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.Size; + +import lombok.Data; + +@Data +public class SignUp { + + private String first_name; + + private String last_name; + + private Long mob_no; + +// private Set role; + @NotBlank + @Size(min = 6, max = 40) + private String password; + + private String confirm_password; + +} diff --git a/backend/src/main/java/com/realnet/users/repository/AboutWorkRepo.java b/backend/src/main/java/com/realnet/users/repository/AboutWorkRepo.java new file mode 100644 index 0000000..040f206 --- /dev/null +++ b/backend/src/main/java/com/realnet/users/repository/AboutWorkRepo.java @@ -0,0 +1,18 @@ +package com.realnet.users.repository; + +import java.util.Optional; + +import org.springframework.data.mongodb.repository.MongoRepository; +import org.springframework.data.mongodb.repository.Query; +import org.springframework.stereotype.Repository; + +import com.realnet.session.entity.AboutWork; +import com.realnet.users.entity.Email; + +@Repository +public interface AboutWorkRepo extends MongoRepository { + + @Query("{'id': ?0}") + Optional findById(Long id); + +} diff --git a/backend/src/main/java/com/realnet/users/repository/CompanyRepo.java b/backend/src/main/java/com/realnet/users/repository/CompanyRepo.java new file mode 100644 index 0000000..b9c5c71 --- /dev/null +++ b/backend/src/main/java/com/realnet/users/repository/CompanyRepo.java @@ -0,0 +1,19 @@ +package com.realnet.users.repository; + +import org.springframework.data.mongodb.repository.MongoRepository; +import org.springframework.data.mongodb.repository.Query; + +import com.realnet.users.entity.Sys_Accounts; + +public interface CompanyRepo extends MongoRepository { + + + + @Query("{'account_id': ?0}") + Sys_Accounts findById(Long account_id); + + + @Query("{'company_name': ?0}") + Sys_Accounts findByCompanyName(String company_name); + +} diff --git a/backend/src/main/java/com/realnet/users/repository/RoleRepo.java b/backend/src/main/java/com/realnet/users/repository/RoleRepo.java new file mode 100644 index 0000000..2a861f5 --- /dev/null +++ b/backend/src/main/java/com/realnet/users/repository/RoleRepo.java @@ -0,0 +1,28 @@ +package com.realnet.users.repository; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.mongodb.repository.MongoRepository; +import org.springframework.data.mongodb.repository.Query; +import org.springframework.stereotype.Repository; + +import com.realnet.users.entity.Role; + +@Repository +public interface RoleRepo extends MongoRepository { + // for pagination + + @Query("{}") + Page findAll(Pageable p); + + @Query("{'name': ?0}") + Role findByName(String name); + + + @Query("{'id': ?0}") + Role getOne(String id); + + @Query("{'id': ?0}") + Role findById(int id); + +} diff --git a/backend/src/main/java/com/realnet/users/repository/SysAccountRepo.java b/backend/src/main/java/com/realnet/users/repository/SysAccountRepo.java new file mode 100644 index 0000000..57dc7e3 --- /dev/null +++ b/backend/src/main/java/com/realnet/users/repository/SysAccountRepo.java @@ -0,0 +1,18 @@ +package com.realnet.users.repository; + +import org.springframework.data.mongodb.repository.MongoRepository; +import org.springframework.data.mongodb.repository.Query; +import org.springframework.stereotype.Repository; + +import com.realnet.users.entity.Sys_Accounts; + +@Repository +public interface SysAccountRepo extends MongoRepository { + + @Query("{'email': ?0}") + Sys_Accounts findByEmail(String email); + + @Query("{'account_id': ?0}") + Sys_Accounts findById(Long account_id); + +} diff --git a/backend/src/main/java/com/realnet/users/repository/UserRepo.java b/backend/src/main/java/com/realnet/users/repository/UserRepo.java new file mode 100644 index 0000000..e0df3ae --- /dev/null +++ b/backend/src/main/java/com/realnet/users/repository/UserRepo.java @@ -0,0 +1,47 @@ +//package com.realnet.users.repository; +// +//import java.util.List; +//import java.util.Optional; +// +//import javax.validation.Valid; +// +//import org.springframework.data.domain.Pageable; +//import org.springframework.data.jpa.repository.JpaRepository; +//import org.springframework.data.jpa.repository.Query; +//import org.springframework.data.repository.query.Param; +// +//import com.realnet.session.entity.AboutWork; +//import com.realnet.users.entity.User; +//import com.realnet.users.entity1.AppUser; +// +//public interface UserRepo extends JpaRepository { +// User findByUsername(String username); +// +// User findByEmail(String email); +// +// Optional findByUsernameAndPassword(String username, String password); +// // @Query("SELECT CASE WHEN COUNT(c) > 0 THEN true ELSE false END FROM User p WHERE p.email = :email") +// +// Boolean existsByEmail(String email); +// +// // need modification +// @Query(value = "SELECT * FROM USER WHERE ACCOUNT_ID =:accId AND STATUS =:status", nativeQuery = true) +// List findByAccountIdAndStatus(@Param("accId") Long id, @Param("status") String status, Pageable pageable); +// +// @Query(value = "delete from user_roles where users_id= :user_id", nativeQuery = true) +// void deleteRelation(@Param("user_id") Long user_id); +// +// +// @Query(value = "SELECT * FROM USER WHERE user_id =:user_id AND checknumber =:checknumber", nativeQuery = true) +// User exitbychecknumber(@Param("user_id") Long user_id,@Param("checknumber") Long checknumber); +// +// // List findByAccountIdAndStatus(Long id, String status); +// +//// @Query("SELECT CASE WHEN COUNT(c) > 0 THEN true ELSE false END FROM User c WHERE c.name = :name") +//// Boolean existsByName(@Param("name") String name); +// +//// User findById(int acc_id); +// +//// public List findAll(); +// +//} diff --git a/backend/src/main/java/com/realnet/users/repository1/AppUserDepartmentRepository.java b/backend/src/main/java/com/realnet/users/repository1/AppUserDepartmentRepository.java new file mode 100644 index 0000000..c3108bb --- /dev/null +++ b/backend/src/main/java/com/realnet/users/repository1/AppUserDepartmentRepository.java @@ -0,0 +1,15 @@ +package com.realnet.users.repository1; + +import org.springframework.data.mongodb.repository.MongoRepository; +import org.springframework.data.mongodb.repository.Query; +import org.springframework.stereotype.Repository; + +import com.realnet.users.entity1.AppUserDepartment; + +@Repository +public interface AppUserDepartmentRepository extends MongoRepository{ + + @Query("{'id': ?0}") + AppUserDepartment findById(int id); + +} diff --git a/backend/src/main/java/com/realnet/users/repository1/AppUserPositionRepository.java b/backend/src/main/java/com/realnet/users/repository1/AppUserPositionRepository.java new file mode 100644 index 0000000..1fa5cad --- /dev/null +++ b/backend/src/main/java/com/realnet/users/repository1/AppUserPositionRepository.java @@ -0,0 +1,16 @@ +package com.realnet.users.repository1; + +import org.springframework.data.mongodb.repository.MongoRepository; +import org.springframework.data.mongodb.repository.Query; +import org.springframework.stereotype.Repository; + +import com.realnet.users.entity1.AppUserPosition; +import com.realnet.users.entity1.AppUserRole; + +@Repository +public interface AppUserPositionRepository extends MongoRepository{ + + @Query("{'id': ?0}") + AppUserPosition findById(int id); + +} diff --git a/backend/src/main/java/com/realnet/users/repository1/AppUserRepository.java b/backend/src/main/java/com/realnet/users/repository1/AppUserRepository.java new file mode 100644 index 0000000..324c791 --- /dev/null +++ b/backend/src/main/java/com/realnet/users/repository1/AppUserRepository.java @@ -0,0 +1,96 @@ +package com.realnet.users.repository1; + +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; +import java.util.Optional; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.mongodb.repository.MongoRepository; +import org.springframework.data.mongodb.repository.Query; +import org.springframework.stereotype.Repository; + +import com.realnet.fnd.entity1.GrpMenuAccess; +import com.realnet.users.entity.Role; +import com.realnet.users.entity1.AppUser; + +@Repository +public interface AppUserRepository extends MongoRepository { + + @Query("{'username': ?0}") + Optional findByUsername(String username); + +// AppUser findByEmail(String email); + + @Query("{'username': ?0, 'userPassw': ?1}") + Optional findByUsernameAndUserPassw(String username, String userPassw); + +// Boolean existsByEmail(String email); + + +// @Query(value = "SELECT customer_number FROM be_cust_master WHERE customer_id = ?1", countQuery = "SELECT count(*) FROM be_cust_master WHERE customer_id = ?1", nativeQuery = true) +// @Query("{'customer_id': ?0}") +// String getCustomerNumber(BigDecimal customerId); + +// @Query(value = "select refcodedesc from refcodedet where reftype = ?1 and refcode = ?2", countQuery = "select refcodedesc from refcodedet where reftype = ?1 and refcode = ?2", nativeQuery = true) +// @Query("{'reftype': ?0, 'refcode': ?1}") +// String getStatus(String tableName, String code); + +// @Query(value = "SELECT * FROM sec_users a where a.email =?1", nativeQuery = true) + @Query("{'email': ?0}") + AppUser findByEmail(String email); + +// @Query(value = "SELECT * FROM sec_users a where a.user_name =?1", nativeQuery = true) + @Query("{'email': ?0}") + AppUser findByUserName(String email); +// AppUser findByUsername(String username); + +// @Query(value = "SELECT * FROM sec_users a where a.random_no = ?1", nativeQuery = true) + @Query("{'random_no': ?0}") + AppUser findByToken(String random_no); + +// @Query(value = "SELECT * FROM sec_grp_menu_access a where a.usr_grp= ?1", nativeQuery = true) + @Query("{'usr_grp': ?0}") + GrpMenuAccess findByUsrGrp(Long usr_grp); + +// @Query(value = "SELECT * FROM sec_users a where a.account_id =?1", nativeQuery = true) + @Query("{'account_id': ?0}") + List getall(Long account_id); + +// @Query(value = "SELECT * FROM sec_users a where a.usr_grp=42 and a.account_id =?1", nativeQuery = true) + @Query("{'usr_grp': ?0, 'account_id': ?1}") + List getalluser(Long account_id); + +// @Query(value = "SELECT * FROM sec_users a where a.usr_grp=45 and a.account_id =?1", nativeQuery = true) + @Query("{'usr_grp': ?0, 'account_id': ?1}") + List getallguest(Long account_id); + +// @Query(value = "SELECT * FROM sec_users a where a.user_id =?1", nativeQuery = true) + @Query("{'user_id': ?0}") + AppUser findByUserId(Long id); + +// @Query(value = "SELECT * FROM sec_users where user_name LIKE %:keyword% ", nativeQuery = true) + @Query("{'user_name': { $regex: ?0, $options: 'i' }}") +// List SearchByKeyword(@Param("keyword") String keyword); + List SearchByKeyword(String keyword); + +// @Query(value = "SELECT * FROM sec_users a where a.active =true", nativeQuery = true) + @Query("{'active': true}") + Page getallusers(Pageable page); + +// @Query(value = "SELECT * FROM sec_users a where a.user_id =?1 && access_till_date >= NOW();", nativeQuery = true) +// AppUser findusertilldate(Long id); +// AppUser findByIdAndAccessTillDateGreaterThan(Long id, Date currentDate); + +// List findByFullNameContaining(String keyword); + +// @Query("{'id': ?0}") +// Optional findById(Long userId); + + @Query("{'userId': ?0}") + AppUser findById(Long userId); + + + +} diff --git a/backend/src/main/java/com/realnet/users/repository1/AppUserRoleRepository.java b/backend/src/main/java/com/realnet/users/repository1/AppUserRoleRepository.java new file mode 100644 index 0000000..d991020 --- /dev/null +++ b/backend/src/main/java/com/realnet/users/repository1/AppUserRoleRepository.java @@ -0,0 +1,24 @@ +package com.realnet.users.repository1; + +import java.util.Optional; + +import org.springframework.data.mongodb.repository.MongoRepository; +import org.springframework.data.mongodb.repository.Query; +import org.springframework.stereotype.Repository; + +import com.realnet.users.entity1.AppUser; +import com.realnet.users.entity1.AppUserRole; +import com.realnet.users.entity1.AppUserSessions; + +@Repository +public interface AppUserRoleRepository extends MongoRepository { + + @Query("{'usrGrp': ?0}") + AppUserRole findById(Long usrGrp); + + Optional findTopByOrderByUsrGrpDesc(); + +// @Query("{'usrGrpId':?0}") +// AppUser findById(Long usrGrpId); + +} diff --git a/backend/src/main/java/com/realnet/users/repository1/AppUserSessionsRepository.java b/backend/src/main/java/com/realnet/users/repository1/AppUserSessionsRepository.java new file mode 100644 index 0000000..5b12cac --- /dev/null +++ b/backend/src/main/java/com/realnet/users/repository1/AppUserSessionsRepository.java @@ -0,0 +1,26 @@ +package com.realnet.users.repository1; + +import java.util.List; + +import org.springframework.data.mongodb.repository.MongoRepository; +import org.springframework.data.mongodb.repository.Query; +import org.springframework.stereotype.Repository; + +import com.realnet.users.entity.PasswordResetToken; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.entity1.AppUserSessions; +import com.realnet.users.entity1.AppUserSessionsCompositeKey; + +@Repository +public interface AppUserSessionsRepository extends MongoRepository{ + + List findByUserId(AppUser userId); + +// @Query(value = "SELECT * FROM realnet_CNSBE.sec_user_sessions where session_id = ?1",nativeQuery = true) + @Query("{'sessionId': ?0}") + AppUserSessions findBySessionId(String sessionId); + + + @Query("{'sessionId': ?0}") + AppUserSessions findById(int sessionId); +} diff --git a/backend/src/main/java/com/realnet/users/repository1/passwordTokenRepository.java b/backend/src/main/java/com/realnet/users/repository1/passwordTokenRepository.java new file mode 100644 index 0000000..6f55c40 --- /dev/null +++ b/backend/src/main/java/com/realnet/users/repository1/passwordTokenRepository.java @@ -0,0 +1,30 @@ +package com.realnet.users.repository1; + +import org.springframework.data.mongodb.repository.MongoRepository; +import org.springframework.data.mongodb.repository.Query; +import org.springframework.data.repository.query.Param; + +import com.realnet.users.entity.PasswordResetToken; +import com.realnet.users.entity.Role; + +public interface passwordTokenRepository extends MongoRepository { + +// @Query(value = "SELECT * FROM password_reset_token a where a.token =?1", nativeQuery = true) +// +// Optional findByToken(String token); + +// @Query(value = "SELECT * FROM password_reset_token a where a.token = ?1", nativeQuery = true) +// +// PasswordResetToken findByToken(String token); + +// @Query(value="SELECT * FROM password_reset_token a where a.token=:token", nativeQuery = true) + + @Query("{'token': ?0}") + PasswordResetToken findByToken(@Param("token") String token); + + + @Query("{'id': ?0}") + PasswordResetToken findById(int id); + + +} diff --git a/backend/src/main/java/com/realnet/users/response/MessageResponse.java b/backend/src/main/java/com/realnet/users/response/MessageResponse.java new file mode 100644 index 0000000..21acd23 --- /dev/null +++ b/backend/src/main/java/com/realnet/users/response/MessageResponse.java @@ -0,0 +1,17 @@ +package com.realnet.users.response; + +public class MessageResponse { + private String message; + + public MessageResponse(String message) { + this.message = message; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } +} diff --git a/backend/src/main/java/com/realnet/users/response/ServiceResponse.java b/backend/src/main/java/com/realnet/users/response/ServiceResponse.java new file mode 100644 index 0000000..ce53ae5 --- /dev/null +++ b/backend/src/main/java/com/realnet/users/response/ServiceResponse.java @@ -0,0 +1,29 @@ +package com.realnet.users.response; + +public class ServiceResponse { + private int status; + + private Object data; + + public ServiceResponse(int status, Object data) { + this.status = status; + this.data = data; + } + + public int getStatus() { + return status; + } + + public void setStatus(int status) { + this.status = status; + } + + public Object getData() { + return data; + } + + public void setData(Object result) { + this.data = result; + } + +} diff --git a/backend/src/main/java/com/realnet/users/response/UserItem.java b/backend/src/main/java/com/realnet/users/response/UserItem.java new file mode 100644 index 0000000..44acb0a --- /dev/null +++ b/backend/src/main/java/com/realnet/users/response/UserItem.java @@ -0,0 +1,12 @@ +package com.realnet.users.response; + +import lombok.Data; + +@Data +public class UserItem { + private Long userId; + private String firstName; + private String fullname; + private String email; + +} diff --git a/backend/src/main/java/com/realnet/users/response/UserResponse.java b/backend/src/main/java/com/realnet/users/response/UserResponse.java new file mode 100644 index 0000000..6c67d88 --- /dev/null +++ b/backend/src/main/java/com/realnet/users/response/UserResponse.java @@ -0,0 +1,15 @@ +package com.realnet.users.response; + +import com.realnet.fnd.response.OperationResponse; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper = false) +public class UserResponse extends OperationResponse { + @ApiModelProperty(required = true, value = "") + private UserItem item; + +} diff --git a/backend/src/main/java/com/realnet/users/service/AboutServiceImple.java b/backend/src/main/java/com/realnet/users/service/AboutServiceImple.java new file mode 100644 index 0000000..a29bda7 --- /dev/null +++ b/backend/src/main/java/com/realnet/users/service/AboutServiceImple.java @@ -0,0 +1,132 @@ +package com.realnet.users.service; + +import javax.validation.Valid; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; +import org.springframework.stereotype.Service; + +import com.realnet.exceptions.ResourceNotFoundException; +import com.realnet.session.entity.AboutWork; +import com.realnet.users.entity.Email; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.repository.AboutWorkRepo; +import com.realnet.utils.Constant; + + +@Service +public class AboutServiceImple implements AboutWorkService { + + @Autowired + private AboutWorkRepo aboutworkrepo; + + @Autowired + private BCryptPasswordEncoder bcryptEncoder; + + @Override + public AboutWork adddata(AboutWork data) { + // TODO Auto-generated method stub + + AboutWork a=new AboutWork(); + a.setId(data.getId()); + a.setName(data.getName()); + + + AppUser user =new AppUser(); + user.setChangePassw(data.getPassword()); + user.setEmail(data.getEmail()); +// user.setPhone(data.getMobile()); + + + + AboutWork about=aboutworkrepo.save(a); + + + return about; + } + + @Override + public AboutWork updateById(String id, @Valid AboutWork about) { + AboutWork oldUser = aboutworkrepo.findById(id) + .orElseThrow(() -> new ResourceNotFoundException(Constant.NOT_FOUND_EXCEPTION + " :" + id)); + oldUser.setName(about.getName()); + oldUser.setMobile(about.getMobile()); + oldUser.setEmail(about.getEmail()); + oldUser.setPassword(bcryptEncoder.encode(about.getPassword())); + oldUser.setCompanyname(about.getCompanyname()); + oldUser.setPancard(about.getPancard()); + AboutWork updatedUser = aboutworkrepo.save(oldUser); + return updatedUser; + } + + @Override + public AboutWork updateById2(String id, @Valid AboutWork about) { + AboutWork oldUser = aboutworkrepo.findById(id) + .orElseThrow(() -> new ResourceNotFoundException(Constant.NOT_FOUND_EXCEPTION + " :" + id)); + + oldUser.setCompanyname(about.getCompanyname()); + oldUser.setPancard(about.getPancard()); + AboutWork updatedUser = aboutworkrepo.save(oldUser); + return updatedUser; + } + + + @Override + public AboutWork updateById3(String id, @Valid AboutWork about) { + AboutWork oldUser = aboutworkrepo.findById(id) + .orElseThrow(() -> new ResourceNotFoundException(Constant.NOT_FOUND_EXCEPTION + " :" + id)); + oldUser.setWorking(about.getWorking()); + AboutWork updatedUser = aboutworkrepo.save(oldUser); + return updatedUser; + } + + + @Override + public AboutWork adddata(Email email) { + // TODO Auto-generated method stub + AboutWork a=new AboutWork(); + a.setId(email.getId()); + + AboutWork about=aboutworkrepo.save(a); + return about; + } + +// @Override +// public AboutWork adddata(Email email) { +// +// AboutWork a=new AboutWork(); +// a.setId(email.getUserId()); +// a.setName(email.getEmail1()); +// a.setName(email.getEmail2()); +// a.setName(email.getEmail3()); +// a.setName(email.getEmail4()); +// +// +// +// User user =new User(); +// user.setPassword(email.getPassword()); +// user.setEmail(email.getEmail1()); +// user.setEmail(email.getEmail2()); +// user.setEmail(email.getEmail3()); +// user.setEmail(email.getEmail4()); +//AboutWork about=aboutworkrepo.save(a); +// +// +// return about; +// } + +// @Override +// public AboutWork updateById(Long id, @Valid AboutWork aboutWork) { +// // TODO Auto-generated method stub +// +// AboutWork oldUser = aboutworkrepo.findById(id) +// .orElseThrow(() -> new ResourceNotFoundException(Constant.NOT_FOUND_EXCEPTION + " :" + id)); +// +// oldUser.setCompanyname(aboutWork.getCompanyname()); +// +// final AboutWork updatedUser = aboutworkrepo.save(oldUser); +// return updatedUser; +// } + + +} diff --git a/backend/src/main/java/com/realnet/users/service/AboutWorkService.java b/backend/src/main/java/com/realnet/users/service/AboutWorkService.java new file mode 100644 index 0000000..d242416 --- /dev/null +++ b/backend/src/main/java/com/realnet/users/service/AboutWorkService.java @@ -0,0 +1,23 @@ +package com.realnet.users.service; + +import com.realnet.session.entity.AboutWork; +import com.realnet.users.entity.Email; + +public interface AboutWorkService { + public AboutWork adddata(AboutWork data); + + public AboutWork updateById(String id, AboutWork about); + public AboutWork updateById2(String id, AboutWork about); + public AboutWork updateById3(String id, AboutWork about); + + public AboutWork adddata(Email email); + +// public AboutWork adddata(Email email); + +// public AboutWork adddata(Email email); + +// public AboutWork updateById(Long id, @Valid AboutWork aboutWork); + +// User adddata(User data); + +} diff --git a/backend/src/main/java/com/realnet/users/service/CompanyService.java b/backend/src/main/java/com/realnet/users/service/CompanyService.java new file mode 100644 index 0000000..db2198b --- /dev/null +++ b/backend/src/main/java/com/realnet/users/service/CompanyService.java @@ -0,0 +1,21 @@ +package com.realnet.users.service; + +import java.util.List; + +import com.realnet.users.entity.CompanyDto; +import com.realnet.users.entity.Sys_Accounts; + +public interface CompanyService { + // creating new company + Sys_Accounts companyResister(CompanyDto company); + + public boolean insertOrSaveCompany(Sys_Accounts company); + // company registration + + List getAll(); + + public Sys_Accounts getById(Long id); + + void delete(long id); + +} diff --git a/backend/src/main/java/com/realnet/users/service/CompanyServiceImpl.java b/backend/src/main/java/com/realnet/users/service/CompanyServiceImpl.java new file mode 100644 index 0000000..67c1901 --- /dev/null +++ b/backend/src/main/java/com/realnet/users/service/CompanyServiceImpl.java @@ -0,0 +1,98 @@ +//package com.realnet.users.service; +// +//import java.util.List; +// +//import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.stereotype.Service; +// +//import com.realnet.users.entity.CompanyDto; +//import com.realnet.users.entity.Sys_Accounts; +//import com.realnet.users.entity.User; +//import com.realnet.users.repository.CompanyRepo; +//import com.realnet.users.repository.RoleRepo; +//import com.realnet.users.repository.UserRepo; +// +//import lombok.extern.slf4j.Slf4j; +// +//@Slf4j +//@Service +//public class CompanyServiceImpl implements CompanyService { +// +// @Autowired +// private UserRepo userRepo; +// +// @Autowired +// private RoleRepo roleRepo; +// +// @Autowired +// private CompanyRepo companyRepo; +// +// public List getAll() { +// return companyRepo.findAll(); +// +// } +// +// @Override +// public void delete(long id) { +// companyRepo.deleteById(id); +// } +// +// @Override +// public Sys_Accounts getById(Long id) { +// return companyRepo.findById(id).get(); +// } +// +// public boolean addNewCompany(Sys_Accounts company) { +// boolean exists = companyRepo.existsById(company.getAccount_id()); +// if (exists) { +// return false; +// } else { +// return this.insertOrSaveCompany(company); +// +// } +// } +// +//// public User resister(UserDto user) { +//// User newUser = new User(); +//// newUser.setEmail(user.getEmail()); +//// newUser.setFirstName(user.getFirstName()); +//// newUser.setLastName(user.getLastName()); +//// Role admin_role = roleRepo.findByName("ADMIN"); +//// Role user_role = roleRepo.findByName("USER"); +//// Role billing_role = roleRepo.findByName("BILLING"); +//// Set roles = new HashSet(); +//// roles.add(admin_role); +//// roles.add(user_role); +//// roles.add(billing_role); +//// newUser.setRoles(roles); +//// return userRepo.save(newUser); +//// } +// +// //########## MOD NEEDED ########## +// @Override +// public Sys_Accounts companyResister(CompanyDto company) { +// Sys_Accounts newCompany = new Sys_Accounts(); +// newCompany.setCompanyName(company.getCompanyName()); +// newCompany.setGstNumber(company.getGstNumber()); +// newCompany.setWorkspace(company.getWorkspace()); +// log.info("companyResister() -> CompanyDto : {}", newCompany); +// Sys_Accounts savedCompany = companyRepo.save(newCompany); +// log.info("companyResister() -> savedCompany : {}", savedCompany); +// +// String userEmail = company.getUserEmail(); +// log.info("companyResister() -> userEmail : {}", userEmail); +// User user = userRepo.findByEmail(userEmail); +// //user.setCompany(savedCompany); +// user.setSys_account(savedCompany); +// userRepo.save(user); +// log.info("companyResister() -> savedUser : {}", user); +// return savedCompany; +// } +// +// @Override +// public boolean insertOrSaveCompany(Sys_Accounts company) { +// this.companyRepo.save(company); +// return true; +// } +// +//} diff --git a/backend/src/main/java/com/realnet/users/service/RoleService.java b/backend/src/main/java/com/realnet/users/service/RoleService.java new file mode 100644 index 0000000..95a21ba --- /dev/null +++ b/backend/src/main/java/com/realnet/users/service/RoleService.java @@ -0,0 +1,29 @@ +package com.realnet.users.service; + +import java.util.List; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.http.ResponseEntity; + +import com.realnet.users.entity.Role; +import com.realnet.users.entity1.AppUser; + +public interface RoleService { + + public List getRoles(); + + public Page getAll(Pageable page); + + public Role getRoleById(String id); + + ResponseEntity addRole(Role role); + + ResponseEntity deleteRole(String id); + + ResponseEntity updateRole(String id, Role role); + + // add or remove a Role on a user + public AppUser addRole(String id, String roleId); + public AppUser removeRole(String id, String roleId); +} diff --git a/backend/src/main/java/com/realnet/users/service/RoleServiceImpl.java b/backend/src/main/java/com/realnet/users/service/RoleServiceImpl.java new file mode 100644 index 0000000..516d053 --- /dev/null +++ b/backend/src/main/java/com/realnet/users/service/RoleServiceImpl.java @@ -0,0 +1,177 @@ +package com.realnet.users.service; + +import java.util.HashSet; +import java.util.List; +import java.util.Optional; +import java.util.Set; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Service; + +import com.realnet.exceptions.InvalidUserDataException; +import com.realnet.exceptions.ResourceNotFoundException; +import com.realnet.users.entity.Role; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.repository.RoleRepo; +import com.realnet.users.repository1.AppUserRepository; +import com.realnet.users.service1.AppUserService; + +import lombok.extern.slf4j.Slf4j; + +@Slf4j +@Service +public class RoleServiceImpl implements RoleService { // UserDetailsService, + + @Autowired + private AppUserRepository userRepository; + @Autowired(required=false) + private AppUserService userService; + + + + @Autowired + private RoleRepo roleRepository; + + @Override + public List getRoles() { + return roleRepository.findAll(); + } + + @Override + public Page getAll(Pageable page) { + return roleRepository.findAll(page); + } + + @Override + public Role getRoleById(String id) { + Role role = roleRepository.findById(id) + .orElseThrow(() -> new ResourceNotFoundException("Role not found :: " + id)); + return role; + } + + @Override + public ResponseEntity addRole(Role role) { + Role newRole = new Role(); + newRole.setName(role.getName()); + newRole.setDescription(role.getDescription()); + Set roleList = new HashSet<>(); + roleList.add(newRole); + // for(int i=0; i< role.getUsers().size(); i++){ + for (AppUser user : role.getAppusers()) { + // if(!userRepository.findByEmail(role.getUsers().get(i).getEmail()).isPresent()) + // { + AppUser usr = userRepository.findByEmail(user.getEmail()); + if (usr != null) { + AppUser newUser = user; + newUser.setRoles(roleList); + AppUser savedUser = userRepository.save(newUser); + if (userRepository.findById(savedUser.getUserId()) == null) + return ResponseEntity.unprocessableEntity().body("Role Creation Failed"); + } else + return ResponseEntity.unprocessableEntity().body("User with email Id is already Present"); + } + return ResponseEntity.ok("Successfully created Role"); + + } + + @Override + public ResponseEntity deleteRole(String id) { + if (roleRepository.findById(id).isPresent()) { + if (roleRepository.getOne(id).getAppusers().size() == 0) { + roleRepository.deleteById(id); + if (roleRepository.findById(id).isPresent()) { + return ResponseEntity.unprocessableEntity().body("Failed to delete the specified record"); + } else + return ResponseEntity.ok().body("Successfully deleted specified record"); + } else + return ResponseEntity.unprocessableEntity() + .body("Failed to delete, Please delete the users associated with this role"); + } else + return ResponseEntity.unprocessableEntity().body("No Records Found"); + } + + @Override + public ResponseEntity updateRole(String id, Role role) { + if (roleRepository.findById(id).isPresent()) { + Role newRole = roleRepository.findById(id).get(); + newRole.setName(role.getName()); + newRole.setDescription(role.getDescription()); + Role savedRole = roleRepository.save(newRole); + + Long id2 = savedRole.getId(); + String roleid=id2.toString(); + + if (roleRepository.findById(roleid).isPresent()) + return ResponseEntity.accepted().body("Role saved successfully"); + else + return ResponseEntity.badRequest().body("Failed to update Role"); + } else + return ResponseEntity.unprocessableEntity().body("Specified Role not found"); + } + + + public void addUserRole(AppUser user, String roleId) { + Optional roleOpt = roleRepository.findById(roleId); + if (!roleOpt.isPresent()) { + throw new ResourceNotFoundException("Role cannot be null"); + } + user.getRoles().add(roleOpt.get()); + } + + /* ==== WORKING CODE ==== */ + @Override + public AppUser addRole(String id, String roleId) { + // check user + Optional userOpt = userRepository.findById(id); + if (!userOpt.isPresent()) { + throw new ResourceNotFoundException(String.format("User not found with Id = %s", id)); + } + AppUser user = userOpt.get(); + // check role + Optional roleOpt = roleRepository.findById(roleId); + if (!roleOpt.isPresent()) { + throw new ResourceNotFoundException(String.format("Role not found with Id = %s", roleId)); + } + Role role = roleOpt.get(); + + // ==== MOD ==== + // check if user already have that role... + if(user.getRoles().contains(role)) { + throw new InvalidUserDataException(String.format("Role %s already exists with the User = %s", roleId, id)); + } + user.getRoles().add(role); +// user.setUpdateby(userService.getLoggedInUserId()); + userRepository.save(user); + log.info(String.format("Added role %s on user id = %s", role.getName(), user.getUserId())); + return user; + } + @Override + public AppUser removeRole(String id, String roleId) { + // check user + Optional userOpt = userRepository.findById(id); + if (!userOpt.isPresent()) { + throw new ResourceNotFoundException(String.format("User not found with Id = %s", id)); + } + AppUser user = userOpt.get(); + // check role + Optional roleOpt = roleRepository.findById(roleId); + if (!roleOpt.isPresent()) { + throw new ResourceNotFoundException(String.format("Role not found with Id = %s", roleId)); + } + Role role = roleOpt.get(); + user.getRoles().remove(role); + + // === MOD NEEDED + if(user.getRoles().isEmpty()) { + throw new InvalidUserDataException(String.format("User %s Must Have a Single Role", id)); + //user.setRoles(roleRepository.findByName("USER")); + } +// user.setUpdatedBy(userService.getLoggedInUserId()); + userRepository.save(user); + log.info(String.format("Removed role %s on user id = %s", role.getName(), user.getUserId())); + return user; + } +} diff --git a/backend/src/main/java/com/realnet/users/service/UserService.java b/backend/src/main/java/com/realnet/users/service/UserService.java new file mode 100644 index 0000000..22b630c --- /dev/null +++ b/backend/src/main/java/com/realnet/users/service/UserService.java @@ -0,0 +1,94 @@ +//package com.realnet.users.service; +// +//import java.util.List; +// +//import javax.validation.Valid; +// +//import com.realnet.session.entity.AboutWork; +//import com.realnet.users.entity.User; +//import com.realnet.users.entity.UserDto; +//import com.realnet.users.entity.UserProfileDTO; +// +//public interface UserService { +// public boolean insertOrSaveUser(User user); +// +// public List getAllUsers(); +// +// // company registration +// List getAll(); +// +// void delete(long id); +// +// // Optional getByUserNameAndPassword(String username, String password); +// User getByUserNameAndPassword(String username, String password); +// +// User getByUserName(String username); +// +// User getByEmail(String email); +// +// User getById(Long id); +// +// boolean existsByEmail(String email); +// +// // update by username +// User updateByEmail(String email, UserProfileDTO userProfile); +// +// // get logged in user details +// String getLoggedInUserEmail(); +// +// Long getLoggedInUserId(); +// +// Long getLoggedInUserAccountId(); +// +// User getLoggedInUser(); +// +// User getUserInfoByUserId(Long userId); +// +// // creating new user (sign up user as ADMIN) +// User userResister(UserDto user); +// +// // --- USERS ADDED BY ADMIN --- +// User createUserByAdmin(User user); +//// List getUsersByAccountId(Long id); +// //List getUsersByCompanyId(Long id); // need mod +// public User updateById(Long id, User UserRequest); +// boolean deleteById(Long id); +// +// boolean changePassword(String oldPassword, String newPassword); +// +// public void sendEmail(String email,Long id,Long checkNo); +// +// public User adddata(AboutWork about); +// +// public User updateById(Long id, @Valid AboutWork aboutWork); +// public User updateById2(Long id, @Valid AboutWork aboutWork); +// +// public User userResister(User user, Long id); +// +// +// User updateByIdWorkingId(Long id, @Valid AboutWork aboutWork); +// +// User updateByMangingWork(Long id, @Valid AboutWork aboutWork); +// +// public User userResisteremail(User user); +// +// public void sendEmail2(String email1, Long userId, Long checknumber); +// +// public void sendEmail3(String email2, Long userId, Long checknumber); +// +// public void sendEmail4(String email3, Long userId, Long checknumber); +// +// public void sendEmail5(String email4, Long userId, Long checknumber); +// +// //public boolean exitbychecknumber(Long userId, Long checknumber); +// public User exitbychecknumber(Long userId, Long checknumber); +// +// public User save(User user); +// +// +// +//// public List save(List about); +// +// +// +//} \ No newline at end of file diff --git a/backend/src/main/java/com/realnet/users/service1/AppUserRoleServiceImpl.java b/backend/src/main/java/com/realnet/users/service1/AppUserRoleServiceImpl.java new file mode 100644 index 0000000..70d8e64 --- /dev/null +++ b/backend/src/main/java/com/realnet/users/service1/AppUserRoleServiceImpl.java @@ -0,0 +1,63 @@ +package com.realnet.users.service1; + +import java.util.List; +import java.util.Optional; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Sort; +import org.springframework.stereotype.Service; + +import com.realnet.users.entity1.AppUserRole; +import com.realnet.users.repository1.AppUserRoleRepository; + +@Service +public class AppUserRoleServiceImpl { + private AppUserRoleRepository appUserRoleRepository; + private AppUserServiceImpl appUserServiceImpl; + + @Autowired + public AppUserRoleServiceImpl(AppUserRoleRepository appUserRoleRepository, AppUserServiceImpl appUserServiceImpl) { + super(); + this.appUserRoleRepository = appUserRoleRepository; + this.appUserServiceImpl = appUserServiceImpl; + + } + + public List getAll() { + + return appUserRoleRepository.findAll(Sort.by(Sort.Direction.ASC, "usrGrp")); + } + + public AppUserRole getOne(Long id) { + return appUserRoleRepository.findById(id); + } + + public AppUserRole addOne(AppUserRole appUserRole) { +// String createdBy = appUserServiceImpl.getLoggedInUser().getUsername(); +// String updatedBy = createdBy; +// appUserRole.setCreateby(createdBy); +// appUserRole.setUpdateby(updatedBy); + + Optional latestRecord = appUserRoleRepository.findTopByOrderByUsrGrpDesc(); + + if (latestRecord.isPresent()) { + AppUserRole save = latestRecord.get(); + if (save.getUsrGrp() == null) { + appUserRole.setUsrGrp(1l); + + } else { + appUserRole.setUsrGrp(save.getUsrGrp() + 1); + + } + } else { + appUserRole.setUsrGrp(1l); + } + return appUserRoleRepository.save(appUserRole); + } + + public AppUserRole updateOne(AppUserRole appUserRole) { + String updatedBy = appUserServiceImpl.getLoggedInUser().getUsername(); + appUserRole.setUpdateby(updatedBy); + return appUserRoleRepository.save(appUserRole); + } +} diff --git a/backend/src/main/java/com/realnet/users/service1/AppUserService.java b/backend/src/main/java/com/realnet/users/service1/AppUserService.java new file mode 100644 index 0000000..ac33539 --- /dev/null +++ b/backend/src/main/java/com/realnet/users/service1/AppUserService.java @@ -0,0 +1,66 @@ +package com.realnet.users.service1; + +import java.util.List; +import java.util.Optional; + + +import com.realnet.users.entity1.AppUser; + +public interface AppUserService { + public boolean insertOrSaveUser(AppUser appUser); + + public List getAllUsers(); + + // company registration + List getAll(); + + void delete(String id); + + // Optional getByUserNameAndPassword(String username, String password); + AppUser getByUserNameAndPassword(String username, String userPassw); + + Optional getByUserName(String username); + + AppUser getByEmail(String email); + + AppUser getById(Long id); + + boolean existsByEmail(String email); + + // update by username +// User updateByEmail(String email, UserProfileDTO userProfile); + + // get logged in user details + String getLoggedInUserEmail(); + + Long getLoggedInUserId(); + + Long getLoggedInUserAccountId(); + + AppUser getLoggedInUser(); + + AppUser getUserInfoByUserId(Long userId); + + // creating new user (sign up user as ADMIN) + AppUser userResister(AppUser appUser); + + // --- USERS ADDED BY ADMIN --- + AppUser createUserByAdmin(AppUser appUser); +// List getUsersByAccountId(Long id); + //List getUsersByCompanyId(Long id); // need mod +// public User updateById(Long id, User UserRequest); + boolean deleteById(String id); + +// boolean changePassword(String oldPassword, String newPassword); + + public void sendEmail(String email,Long id,Long checkNo); + + //public User adddata(AboutWork about); + +// public User updateById(Long id, @Valid AboutWork aboutWork); +// public User updateById2(Long id, @Valid AboutWork aboutWork); + + public AppUser userResister(AppUser user, String id); + + +} diff --git a/backend/src/main/java/com/realnet/users/service1/AppUserServiceImpl.java b/backend/src/main/java/com/realnet/users/service1/AppUserServiceImpl.java new file mode 100644 index 0000000..1f7a857 --- /dev/null +++ b/backend/src/main/java/com/realnet/users/service1/AppUserServiceImpl.java @@ -0,0 +1,651 @@ +package com.realnet.users.service1; + +import java.math.BigDecimal; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Optional; +import java.util.Random; +import java.util.Set; +import java.util.jar.Attributes; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.mail.SimpleMailMessage; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.security.core.userdetails.UserDetails; +import org.springframework.security.core.userdetails.UserDetailsService; +import org.springframework.security.core.userdetails.UsernameNotFoundException; +import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; +import org.springframework.stereotype.Service; +import org.springframework.util.StringUtils; + +import com.realnet.exceptions.ResourceNotFoundException; +import com.realnet.userDTO.User; +import com.realnet.users.entity.ERole; +import com.realnet.users.entity.PasswordResetRequest; +import com.realnet.users.entity.PasswordResetToken; +import com.realnet.users.entity.Role; +import com.realnet.users.entity.Sys_Accounts; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.entity1.AppUserDepartment; +import com.realnet.users.entity1.AppUserDto; +import com.realnet.users.entity1.AppUserPosition; +import com.realnet.users.entity1.AppUserPrinciple; +import com.realnet.users.entity1.AppUserRole; +import com.realnet.users.entity1.Registration; +import com.realnet.users.entity1.SignUp; +import com.realnet.users.repository.RoleRepo; +import com.realnet.users.repository.SysAccountRepo; +import com.realnet.users.repository1.AppUserDepartmentRepository; +import com.realnet.users.repository1.AppUserPositionRepository; +import com.realnet.users.repository1.AppUserRepository; +import com.realnet.users.repository1.AppUserRoleRepository; +import com.realnet.users.repository1.passwordTokenRepository; +import com.realnet.users.response.MessageResponse; + +import lombok.extern.slf4j.Slf4j; + +@Service +@Slf4j +public class AppUserServiceImpl implements UserDetailsService, AppUserService { + + @Autowired + private RoleRepo roleRepo; + + @Autowired + private SysAccountRepo sysAccountRepo; + + private passwordTokenRepository passwordTokenRepository; + private AppUserRepository appUserRepository; + private AppUserRoleRepository appUserRoleRepository; + private AppUserPositionRepository appUserPositionRepository; + private AppUserDepartmentRepository appUserDepartmentRepository; + private BCryptPasswordEncoder bcryptEncoder; + + @Autowired + public AppUserServiceImpl(AppUserRepository appUserRepository, BCryptPasswordEncoder bCryptPasswordEncoder, + AppUserRoleRepository appUserRoleRepository, AppUserPositionRepository appUserPositionRepository, + AppUserDepartmentRepository appUserDepartmentRepository, passwordTokenRepository passwordTokenRepository) { + super(); + this.appUserRepository = appUserRepository; + this.bcryptEncoder = bCryptPasswordEncoder; + this.appUserRoleRepository = appUserRoleRepository; + this.appUserPositionRepository = appUserPositionRepository; + this.appUserDepartmentRepository = appUserDepartmentRepository; + this.passwordTokenRepository = passwordTokenRepository; + } + + @Override + public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException { + Optional user = appUserRepository.findByUsername(username); + if (user.get() == null) { + throw new UsernameNotFoundException("Invalid Email or password."); + } + AppUserPrinciple appUserPrinciple = new AppUserPrinciple(user.get()); + + return appUserPrinciple; + } + + public List getAllAppUsers(Pageable page) { + Page p = appUserRepository.getallusers(page); + List l = p.getContent(); + for (AppUser o : l) { +// if (o.getCustomerId() != null) { +// o.setCustomerNumer(appUserRepository.getCustomerNumber(BigDecimal.valueOf(o.getCustomerId()))); +// } + if (o.getUsrGrp() != null) { + o.setUsrGrpId(o.getUsrGrp().getUsrGrp()); + o.setUsrGrpName(o.getUsrGrp().getGroupName()); + o.setUsrGrp(null); + } + if (o.getPositionCode() != null) { + o.setPositionCodeString(o.getPositionCode().getPositionCode()); + o.setPositionCode(null); + } + if (o.getDepartmentCode() != null) { + o.setDepartmentCodeString(o.getDepartmentCode().getDepartmentCode()); + o.setDepartmentCode(null); + } +// if(o.getStatus()!=null) { +// String s = getStatus("USRST",o.getStatus()); +// if(s!=null) { +// o.setStatus(s); +// } +// } + } + return l; + } + + public AppUser addOneUser(Registration reg) { + AppUser appUser = findUserByEmail(reg.getEmail()); + if (reg.getNew_password().equals(reg.getConfirm_password())) { + +// appUser.setEmail(reg.getEmail()); + appUser.setUsername(reg.getEmail()); + + AppUserRole r = null; + Long usrGrpId = reg.getUsrGrpId(); + if (reg.getUsrGrpId() != null) { + r = appUserRoleRepository.findById(usrGrpId); + } + + if (r != null) { + appUser.setUsrGrp(r); + } + Long account_id = reg.getAccount_id(); + + Sys_Accounts account = sysAccountRepo.findById(account_id); + appUser.setAccount(account); + appUser.setFullName(reg.getFirst_name() + " " + reg.getLast_name()); + appUser.setMob_no(reg.getMob_no()); + appUser.setChangePassw(reg.getNew_password()); + appUser.setUserPassw(bcryptEncoder.encode(reg.getNew_password())); + appUser.setIsComplete(true); + appUser.setActive(true); + + appUser.setAccesstype(reg.getAccesstype()); + Set strRoles = appUser.getRoles(); + Set roles = new HashSet<>(); + + if (strRoles == null || strRoles.isEmpty()) { + String role1 = "ROLE_ADMIN"; +// Role role = new Role(); +// role.setId(1l); +// role.setName(role1); +// role.setDescription(role1); +// roleRepo.save(role); + Role userRole = roleRepo.findByName(role1); + roles.add(userRole); + appUser.setRoles(roles); + } + } + + AppUser save = appUserRepository.save(appUser); +// System.out.println("saved user is .." + save); + + return save; + } + + public AppUser addOneUserCustom(User ppUser) { + AppUser appUser = new AppUser(); + appUser.setUsername(ppUser.getUsername()); + appUser.setFullName(ppUser.getFullName()); + appUser.setEmail(ppUser.getEmail()); + appUser.setUserPassw(bcryptEncoder.encode(ppUser.getPassword())); + appUser.setChangePassw(ppUser.getPassword()); + appUser.setShortName(ppUser.getFirstName()); + appUser.setUsrGrpName(ppUser.getRole()); + appUser.setAbout(ppUser.getAbout()); +// appUser.setProvider( ppUser.getProvider().name()); + appUser.setCountry(ppUser.getCountry()); + appUser.setBlocked(false); + appUser.setIsComplete(true); + appUser.setActive(true); + + appUser.setChecknumber(ppUser.getChecknumber()); +// AppUser appUser2 = appUserRoleRepository.findById("42").get(); + +// appUser.setUsrGrp(appUserRoleRepository.findById(42l).get()); +// Sys_Accounts account = sysAccountRepo.findByEmail(ppUser.getEmail()); +// if (account != null) { +// appUser.setAccount(account); +// } else { +// appUser.setAccount(sysAccountRepo.findById(1l).get()); +// +// } +// +// appUser.setUsrGrp(appUserRoleRepository.findById(46l).orElse(null)); + + Set roles = new HashSet<>(); + String role1 = "ROLE_ADMIN"; + Role userRole = roleRepo.findByName(role1); + roles.add(userRole); + appUser.setRoles(roles); + if (appUserRepository.findByEmail(ppUser.getEmail()) != null) { + return null; + } + return appUserRepository.save(appUser); + } + + public AppUser getOneUser(Long id) { + AppUser o = appUserRepository.findById(id); + if (o != null) { + // o.setCustomerNumer(appUserRepository.getCustomerNumber(o.getCustomerId())); +// if (o.getCustomerId() != null) { +// o.setCustomerNumer( +// appUserRepository.getCustomerNumber(BigDecimal.valueOf(o.getCustomerId()))); +// } + if (o.getUsrGrp() != null) { + o.setUsrGrpId(o.getUsrGrp().getUsrGrp()); + o.setUsrGrpName(o.getUsrGrp().getGroupName()); + o.setUsrGrp(null); + } + if (o.getPositionCode() != null) { + o.setPositionCodeString(o.getPositionCode().getPositionCode()); + o.setPositionCode(null); + } + if (o.getDepartmentCode() != null) { + o.setDepartmentCodeString(o.getDepartmentCode().getDepartmentCode()); + o.setDepartmentCode(null); + } + } + return o; + } + + @Override + public boolean insertOrSaveUser(AppUser appUser) { + // TODO Auto-generated method stub + appUserRepository.save(appUser); + return true; + } + + @Override + public List getAllUsers() { + // TODO Auto-generated method stub + List users = appUserRepository.findAll(); + // users.forEach(o->o.setCustomerNumer(appUserRepository.getCustomerNumber(o.getCustomerId()))); + return users; + } + + @Override + public List getAll() { + // TODO Auto-generated method stub + List list = new ArrayList<>(); + appUserRepository.findAll().iterator().forEachRemaining(list::add); + // list.forEach(o->o.setCustomerNumer(appUserRepository.getCustomerNumber(o.getCustomerId()))); + return list; + } + + @Override + public void delete(String id) { + appUserRepository.deleteById(id); + } + + @Override + public AppUser getByUserNameAndPassword(String username, String password) { + // TODO Auto-generated method stub + String userPassw = bcryptEncoder.encode(password); + AppUser user = appUserRepository.findByUsernameAndUserPassw(username, userPassw).orElse(null); + return user; + } + + @Override + public Optional getByUserName(String username) { + // TODO Auto-generated method stub + return appUserRepository.findByUsername(username); + } + + @Override + public AppUser getByEmail(String email) { + // TODO Auto-generated method stub + AppUser user = appUserRepository.findByEmail(email); + return user; + } + + @Override + public AppUser getById(Long id) { + // TODO Auto-generated method stub + return appUserRepository.findById(id); + } + + @Override + public boolean existsByEmail(String email) { + // TODO Auto-generated method stub + AppUser appUser = appUserRepository.findByEmail(email); + + if (appUser != null) { + return true; + } else { + return false; + } + } + + @Override + public String getLoggedInUserEmail() { + // TODO Auto-generated method stub + Authentication auth = SecurityContextHolder.getContext().getAuthentication(); + if (auth == null) { + return "noSession"; + } + return auth.getName(); + } + + @Override + public Long getLoggedInUserId() { + // TODO Auto-generated method stub + String loggedInUserEmail = this.getLoggedInUserEmail(); + AppUser appUser = appUserRepository.findByEmail(loggedInUserEmail); + Long id = appUser.getUserId(); + return id; + } + + @Override + public Long getLoggedInUserAccountId() { + // TODO Auto-generated method stub + return null; + } + + @Override + public AppUser getLoggedInUser() { + String loggedInUserName = this.getLoggedInUserEmail(); + Optional user = appUserRepository.findByUsername(loggedInUserName); +// log.info("getLoggedInUser() : {} ", user.get()); + return user.get(); + } + + @Override + public AppUser getUserInfoByUserId(Long userId) { + // TODO Auto-generated method stub + AppUser user = appUserRepository.findById(userId); + return user; + } + + @Override + public AppUser userResister(AppUser appUser) { + // TODO Auto-generated method stub + appUser.setUserPassw(bcryptEncoder.encode(appUser.getUserPassw())); + return appUserRepository.save(appUser); + } + + @Override + public AppUser createUserByAdmin(AppUser appUser) { + appUser.setUserPassw(bcryptEncoder.encode(appUser.getUserPassw())); + return appUserRepository.save(appUser); + } + + @Override + public boolean deleteById(String id) { + // TODO Auto-generated method stub + if (!appUserRepository.existsById(id)) { + throw new ResourceNotFoundException("User not exists"); + } + appUserRepository.deleteById(id); + return true; + } + + @Override + public void sendEmail(String email, Long id, Long checkNo) { + // TODO Auto-generated method stub + + } + +// public User userResister(User user, Long id) { +// // TODO Auto-generated method stub +// return null; +// } + + public AppUser updateOneUser(AppUser appUser) { + return appUserRepository.save(appUser); + } + + public AppUser updateAppUserDto(String userId, AppUserDto appUserDto) { + AppUser a = appUserRepository.findById(userId).orElse(null); + if (a != null) { + String encodedPass1 = bcryptEncoder.encode(appUserDto.getUserPassw()); + if (a.getUserPassw() != encodedPass1) { + a.setUserPassw(encodedPass1); + a.setPwdChangedCnt((long) 0); + a.setPwdChangedCnt(a.getPwdChangedCnt() + 1); + a.setLastPwdChangedDate(new Date()); + } + a.setUsername(appUserDto.getUsername() != null ? appUserDto.getUsername() : a.getUsername()); + a.setTitle(appUserDto.getTitle() != null ? appUserDto.getTitle() : a.getTitle()); + a.setShortName(appUserDto.getShortName() != null ? appUserDto.getShortName() : a.getShortName()); + a.setFullName(appUserDto.getFullName() != null ? appUserDto.getFullName() : a.getFullName()); + a.setStatus(appUserDto.getStatus() != null ? appUserDto.getStatus() : a.getStatus()); + a.setCustomerId(appUserDto.getCustomerId() != null ? appUserDto.getCustomerId() : a.getCustomerId()); + a.setEmail(appUserDto.getEmail() != null ? appUserDto.getEmail() : a.getEmail()); + a.setNotification( + appUserDto.getNotification() != null ? appUserDto.getNotification() : a.getNotification()); + + a.setMob_no(appUserDto.getMob_no()); + a.setActive(appUserDto.isActive()); + + if (appUserDto.getUsrGrpId() != null) { + if (a.getUsrGrp().getUsrGrp() != appUserDto.getUsrGrpId()) { + Long usrGrpId = appUserDto.getUsrGrpId(); + String string = usrGrpId.toString(); + AppUserRole role = appUserRoleRepository.findById(string).orElse(null); + if (role != null) { + a.setUsrGrp(role); + } + } + } + if (appUserDto.getPositionCodeId() != null) { + if (!a.getPositionCode().getPositionCode().equals(appUserDto.getPositionCodeId())) { + AppUserPosition position = appUserPositionRepository.findById(appUserDto.getPositionCodeId()) + .orElse(null); + if (position != null) { + a.setPositionCode(position); + } + } + } + if (appUserDto.getDepartmentCodeId() != null) { + if (!a.getDepartmentCode().getDepartmentCode().equals(appUserDto.getDepartmentCodeId())) { + AppUserDepartment department = appUserDepartmentRepository + .findById(appUserDto.getDepartmentCodeId()).orElse(null); + if (department != null) { + a.setDepartmentCode(department); + } + } + } + a.setUpdateby(getLoggedInUser().getFullName()); + appUserRepository.save(a); + return a; + } + return null; + } + + public AppUser resetPassword(Long userId, String hash, String newPassword) { + + String string = userId.toString(); + AppUser a = appUserRepository.findById(string).orElse(null); + if (a != null) { + if (a.getPassword4().equals(hash)) { + a.setUserPassw(bcryptEncoder.encode(newPassword)); + a.setPwdChangedCnt(a.getPwdChangedCnt() != null ? (long) 1 + a.getPwdChangedCnt() : (long) 1); + a.setLastPwdChangedDate(new Date()); +// a.setPassword4(null); + appUserRepository.save(a); + return a; + } + return null; + } + return null; + } + +// By Gaurav +// RESET PASSWORD WITH CONFIRM PASSWORD + + public AppUser resetPasswordnew(PasswordResetRequest p) { + + Long userId = p.getUserId(); + String string = userId.toString(); + AppUser a = appUserRepository.findById(string).orElse(null); + if (a != null) { + if (bcryptEncoder.matches(p.getOldPassword(), a.getUserPassw())) { + + if (p.getNewPassword().equals(p.getConfirmPassword())) { + + a.setUserPassw(bcryptEncoder.encode(p.getNewPassword())); + a.setPwdChangedCnt(a.getPwdChangedCnt() != null ? (long) 1 + a.getPwdChangedCnt() : (long) 1); + a.setLastPwdChangedDate(new Date()); + a.setChangePassw(p.getNewPassword()); + + appUserRepository.save(a); + return a; + } + return null; + } + return null; + } + return null; + } + +// By Gaurav +// FORGOT PASSWORD + + public AppUser forgotpassword(PasswordResetRequest p) { + Long userId = p.getUserId(); + String string = userId.toString(); + AppUser a = appUserRepository.findById(string).orElse(null); + + if (a != null) { + + if (p.getNewPassword().equals(p.getConfirmPassword())) { + + a.setUserPassw(bcryptEncoder.encode(p.getNewPassword())); + a.setPwdChangedCnt(a.getPwdChangedCnt() != null ? (long) 1 + a.getPwdChangedCnt() : (long) 1); + a.setLastPwdChangedDate(new Date()); + a.setChangePassw(p.getNewPassword()); + + appUserRepository.save(a); + return a; + } + return null; + } + return null; + + } + + public String generateRandomHash(int len) { + String chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijk" + "lmnopqrstuvwxyz!@#$%&"; + Random rnd = new Random(); + StringBuilder sb = new StringBuilder(len); + for (int i = 0; i < len; i++) + sb.append(chars.charAt(rnd.nextInt(chars.length()))); + return sb.toString(); + } + +// public String getStatus(String tableName, String code) { +// String s = appUserRepository.getStatus(tableName, code); +// if (StringUtils.hasText(s)) { +// return s; +// } +// return null; +// } + + @Override + public AppUser userResister(AppUser user, String id) { + // TODO Auto-generated method stub + return null; + } + + // method for forgot password by email + + public AppUser findUserByEmail(String email) { + AppUser user = appUserRepository.findByEmail(email); + + return user; + } + +// public void createPasswordResetTokenForUser(AppUser user, String token) { +// PasswordResetToken myToken = new PasswordResetToken(user,token); +// passwordTokenRepository.save(myToken); +// } + + public void createPasswordResetTokenForUser(AppUser user, String token) { + AppUser user1 = appUserRepository.findByEmail(user.getEmail()); + + PasswordResetToken myToken = new PasswordResetToken(token); + myToken.setUser(user1); + passwordTokenRepository.save(myToken); + } + + // ADD USER VIA ADMIN + public void adduserbyemail(AppUser user, String token, String email) { + + user.setRandom_no(token); + user.setUsername(email); + user.setEmail(email); + + appUserRepository.save(user); + + } + +// resend otp for verification + public void resendotp(int otp, String email) { + AppUser user = findUserByEmail(email); + + user.setRandom_no(String.valueOf(otp)); + + appUserRepository.save(user); + + } + + // ADD USER VIA ADMIN + public void adduserviaadmin(AppUser user, String token, String email, Long account_id) { + Sys_Accounts accounts = sysAccountRepo.findById(account_id); + + user.setRandom_no(token); + user.setUsername(email); + user.setEmail(email); + user.setAccount(accounts); + + appUserRepository.save(user); + + } + + // ADD GUEST VIA ADMIN + public void addguestviaadmin(AppUser user, String token, String email, Long account_id) { + Sys_Accounts accounts = sysAccountRepo.findById(account_id); + + user.setRandom_no(token); + user.setUsername(email); + user.setEmail(email); + user.setAccount(accounts); +// user.setAccess_duration(access_duration); +// +// Calendar c = Calendar.getInstance(); +// c.setTime(new Date()); +// c.add(Calendar.DATE, access_duration); +// +//// SimpleDateFormat dateFormat = new SimpleDateFormat(); +//// String format = dateFormat.format(c.getTime()); +// +// user.setAccess_till_date(c.getTime()); + appUserRepository.save(user); + + } + + public String validatePasswordResetToken(String token) { + final PasswordResetToken passToken = passwordTokenRepository.findByToken(token); + + return !isTokenFound(passToken) ? "invalidToken" : isTokenExpired(passToken) ? "expired" : null; + } + + private boolean isTokenFound(PasswordResetToken passToken) { + return passToken != null; + } + + private boolean isTokenExpired(PasswordResetToken passToken) { + final Calendar cal = Calendar.getInstance(); + return passToken.getExpiryDate().before(cal.getTime()); + } + + public void changeUserPassword(AppUser user, String newPassword) { + user.setUserPassw(bcryptEncoder.encode(newPassword)); + appUserRepository.save(user); + } + + public AppUser getUserByPasswordResetToken(String token) { + AppUser token2 = appUserRepository.findByToken(token); + return token2; + } + + public AppUser userResister(AppUser user, Long id) { + // TODO Auto-generated method stub + return null; + } + + // end method for forgot password +} diff --git a/backend/src/main/java/com/realnet/users/service1/AppUserSessionsServiceImpl.java b/backend/src/main/java/com/realnet/users/service1/AppUserSessionsServiceImpl.java new file mode 100644 index 0000000..fa1c700 --- /dev/null +++ b/backend/src/main/java/com/realnet/users/service1/AppUserSessionsServiceImpl.java @@ -0,0 +1,23 @@ +package com.realnet.users.service1; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import com.realnet.users.entity1.AppUserSessions; +import com.realnet.users.repository1.AppUserSessionsRepository; + +@Service +public class AppUserSessionsServiceImpl { + private AppUserSessionsRepository appUserSessionsRepository; + @Autowired + public AppUserSessionsServiceImpl(AppUserSessionsRepository appUserSessionsRepository) { + super(); + this.appUserSessionsRepository = appUserSessionsRepository; + } + public AppUserSessions newSession(AppUserSessions appUserSessions) { + return appUserSessionsRepository.save(appUserSessions); + } + public AppUserSessions add(AppUserSessions session) { + return appUserSessionsRepository.save(session); + } +} diff --git a/backend/src/main/java/com/realnet/users/service1/PositionAndDepartmentServiceImpl.java b/backend/src/main/java/com/realnet/users/service1/PositionAndDepartmentServiceImpl.java new file mode 100644 index 0000000..ae759e9 --- /dev/null +++ b/backend/src/main/java/com/realnet/users/service1/PositionAndDepartmentServiceImpl.java @@ -0,0 +1,37 @@ +package com.realnet.users.service1; + +import java.util.List; +import java.util.Optional; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import com.realnet.users.entity1.AppUserDepartment; +import com.realnet.users.entity1.AppUserPosition; +import com.realnet.users.repository1.AppUserDepartmentRepository; +import com.realnet.users.repository1.AppUserPositionRepository; + +@Service +public class PositionAndDepartmentServiceImpl { + private AppUserDepartmentRepository appUserDepartmentRepository; + private AppUserPositionRepository appUserPositionRepository; + @Autowired + public PositionAndDepartmentServiceImpl(AppUserDepartmentRepository appUserDepartmentRepository, + AppUserPositionRepository appUserPositionRepository) { + super(); + this.appUserDepartmentRepository = appUserDepartmentRepository; + this.appUserPositionRepository = appUserPositionRepository; + } + public List getAll(){ + return appUserDepartmentRepository.findAll(); + } + public List getAllPosition(){ + return appUserPositionRepository.findAll(); + } + public Optional getOne(String departmentCode){ + return appUserDepartmentRepository.findById(departmentCode); + } + public Optional getOnePosition(String positionCode){ + return appUserPositionRepository.findById(positionCode); + } +} diff --git a/backend/src/main/java/com/realnet/utils/Constant.java b/backend/src/main/java/com/realnet/utils/Constant.java new file mode 100644 index 0000000..b93f5e1 --- /dev/null +++ b/backend/src/main/java/com/realnet/utils/Constant.java @@ -0,0 +1,283 @@ +package com.realnet.utils; + +public final class Constant { + + // SORT BY + public final static String SORT_BY_CREATION_DATE = "createdAt"; + public final static String SORT_BY_CREATION_DATE_NATIVE_QUERY = "created_at"; + + // --------------------------------------Error Type + public final static String ERROR_TYPE_HIBERNATE = "Hibernate Exception"; + public final static String ERROR_TYPE_DB = "Database Exception"; + public final static String ERROR_TYPE_EXCEPTION = "Other Exception"; + public final static String ERROR_TYPE_CONTROLLER = "Controller Exception"; + public final static String ERROR_TYPE_HTTP = "HTTP Error"; + + public final static String NOT_FOUND_EXCEPTION = "Data Not Found "; + public final static String NOT_EXIST_EXCEPTION = "Data Not Exist "; + + // --------------------------------------Error Status + public final static String ERROR_LEVEL_FAILURE = "Failure"; + public final static String ERROR_LEVEL_SUCCESS = "Success"; + + // --------------------------------------DB Error Code + public final static int ERROR_CODE_SERVER = 404; + public final static int ERROR_CODE_SERVER_AUTH = 401; + public final static int ERROR_CODE_DB = 500; + public final static int ERROR_CODE_DATA = 201; + public final static int SUCCESS_CODE = 200; + public final static int ERROR_CODE_VALIDATION = 301; + public final static int ERROR_CODE_VERYFICATION = 403; + + // --------------------------------------REAL IT API RESPONSE MESSEGES + public final static String EXTRACTOR_API_TITLE = "Extractor"; + public final static String EXTRACTOR_CREATED_SUCCESSFULLY = "Extractor added Successfully !"; + public final static String EXTRACTOR_UPDATED_SUCCESSFULLY = "Extractor updated Successfully !"; + public final static String EXTRACTOR_DELETED_SUCCESSFULLY = "Extractor deleted Successfully !"; + public final static String EXTRACTOR_NOT_DELETED = "Extractor not deleted"; + public final static String EXTRACTOR_NOT_CREATED = "Extractor not Added !"; + public final static String EXTRACTOR_NOT_UPDATED = "Extractor not updated !"; + + + public final static String STATIC_EXTRACTION_SUCCESS = "Static Extraction Completed !"; + public final static String DYNAMIC_EXTRACTION_SUCCESS = "Dynamic Extraction Completed !"; + public final static String STATIC_EXTRACTION_FAILED = "Static Extraction Failed !"; + public final static String DYNAMIC_EXTRACTION_FAILED = "Dynamic Extraction Failed !"; + + // RULE + public final static String RULE_LIBRARY_API_TITLE = "Rule Library"; + public final static String RULE_CREATED_SUCCESSFULLY = "Rule added Successfully !"; + public final static String RULE_UPDATED_SUCCESSFULLY = "Ruler updated Successfully !"; + public final static String RULE_DELETED_SUCCESSFULLY = "Rule deleted Successfully !"; + public final static String RULE_NOT_DELETED = "Rule not deleted"; + public final static String RULE_NOT_CREATED = "Rule not Added !"; + public final static String RULE_NOT_UPDATED = "Rule not updated !"; + + // EXCEPTION RULE + public final static String EXCEPTION_RULE_LIBRARY_API_TITLE = "Exception Rule Library"; + public final static String EXCEPTION_RULE_CREATED_SUCCESSFULLY = "Exception Rule added Successfully !"; + public final static String EXCEPTION_RULE_UPDATED_SUCCESSFULLY = "Exception Rule updated Successfully !"; + public final static String EXCEPTION_RULE_DELETED_SUCCESSFULLY = "Exception Rule deleted Successfully !"; + + public final static String EXCEPTION_RULE_NOT_DELETED = "Exception Rule not deleted"; + public final static String EXCEPTION_RULE_NOT_CREATED = "Exception Rule not Added !"; + public final static String EXCEPTION_RULE_NOT_UPDATED = "Exception Rule not updated !"; + + // TECHNOLOGY STACK + public final static String TECHNOLOGY_STACK_API_TITLE = "Technology Stack"; + public final static String TECHNOLOGY_STACK_CREATED_SUCCESSFULLY = "Technology Stack saved Successfully !"; + public final static String TECHNOLOGY_STACK_UPDATED_SUCCESSFULLY = "Technology Stack updated Successfully !"; + public final static String TECHNOLOGY_STACK_DELETED_SUCCESSFULLY = "Technology Stack deleted Successfully !"; + public final static String TECHNOLOGY_STACK_NOT_DELETED = "Technology Stack not deleted"; + public final static String TECHNOLOGY_STACK_NOT_CREATED = "Technology Stack not Added !"; + public final static String TECHNOLOGY_STACK_NOT_UPDATED = "Technology Stack not updated !"; + public final static String UNZIP_EXCEPTION = "There is a problem while Unziping"; + + // PROJECT SETUP + public final static String PROJECT_SETUP_API_TITLE = "Project Setup"; + public final static String PROJECT_CREATED_SUCCESSFULLY = "Project saved Successfully !"; + public final static String PROJECT__UPDATED_SUCCESSFULLY = "Project updated Successfully !"; + public final static String PROJECT_DELETED_SUCCESSFULLY = "Project deleted Successfully !"; + public final static String PROJECT_NOT_DELETED = "Project not deleted"; + public final static String PROJECT_NOT_CREATED = "Project not Added !"; + public final static String PROJECT_NOT_UPDATED = "Project not updated !"; + public final static String PROJECT_COPY_SUCCESS = "Project Copy Success !"; + public final static String PROJECT_COPY_FAILURE = "Project Copy Failed !"; + + // MODULE SETUP + public final static String MODULE_SETUP_API_TITLE = "Module Setup"; + public final static String MODULE_CREATED_SUCCESSFULLY = "Module saved Successfully !"; + public final static String MODULE_UPDATED_SUCCESSFULLY = "Module updated Successfully !"; + public final static String MODULE_DELETED_SUCCESSFULLY = "Module deleted Successfully !"; + public final static String MODULE_NOT_DELETED = "Module not deleted"; + public final static String MODULE_NOT_CREATED = "Module not Added !"; + public final static String MODULE_NOT_UPDATED = "Module not updated !"; + public final static String MODULE_COPY_SUCCESS = "Module Copy Success !"; + public final static String MODULE_COPY_FAILURE = "Module Copy Failed !"; + + // WIREFRAME APIS + public final static String WIREFRAME_API_TITLE = "Wireframe Setup"; + public final static String WIREFRAME_CREATED_SUCCESSFULLY = "Wireframe saved Successfully !"; + public final static String WIREFRAME_UPDATED_SUCCESSFULLY = "Wireframe updated Successfully !"; + public final static String WIREFRAME_DELETED_SUCCESSFULLY = "Wireframe deleted Successfully !"; + public final static String WIREFRAME_NOT_DELETED = "Wireframe not deleted"; + public final static String WIREFRAME_NOT_CREATED = "Wireframe not Added !"; + public final static String WIREFRAME_NOT_UPDATED = "Wireframe not updated !"; + + //REPORT APIS + public final static String REPORT_API_TITLE = "report Setup"; + public final static String REPORT_CREATED_SUCCESSFULLY = "Report saved Successfully !"; + public final static String REPORT_UPDATED_SUCCESSFULLY = "Report updated Successfully !"; + public final static String REPORT_DELETED_SUCCESSFULLY = "Report deleted Successfully !"; + public final static String REPORT_NOT_DELETED = "Report not deleted"; + public final static String REPORT_NOT_CREATED = "Report not Added !"; + public final static String REPORT_NOT_UPDATED = "Report not updated !"; + + + + public final static String WIREFRAME_BUTTON_ADDED = "Wireframe Button Added !"; + public final static String WIREFRAME_SECTION_ADDED = "Wireframe Section Added !"; + public final static String WIREFRAME_FIELD_ADDED_IN_SECTION = "Wireframe Field Added In Section !"; + public final static String WIREFRAME_FIELD_NOT_ADDED_IN_SECTION = "Wireframe Field Not Added"; + public final static String WIREFRAME_FIELD_NAME_CHANGE_SUCCESS = "Wireframe Field Name Changed"; + public final static String WIREFRAME_FIELD_NAME_CHANGE_FAILURE = "Wireframe Field Name Not Changed"; + public final static String WIREFRAME_COPY_SUCCESS = "Wireframe Copy Success !"; + public final static String WIREFRAME_COPY_FAILURE = "Wireframe Copy Failed !"; + + public final static String WIREFRAME_SECTION_DELETE_SUCCESS = "Section Deleted Successfully !"; + public final static String WIREFRAME_SECTION_DELETE_FAILURE = "Section Deletion Failure !"; + public final static String WIREFRAME_FIELD_DELETE_SUCCESS = "Section Deleted Successfully !"; + public final static String WIREFRAME_FIELD_DELETE_FAILURE = "Section Deletion Failure !"; + + // LOOKUP + public final static String LOOKUP_API_TITLE = "Lookup"; + public final static String LOOKUP_CREATED_SUCCESSFULLY = "Lookup saved Successfully !"; + public final static String LOOKUP_UPDATED_SUCCESSFULLY = "Lookup updated Successfully !"; + public final static String LOOKUP_DELETED_SUCCESSFULLY = "Lookup deleted Successfully !"; + public final static String LOOKUP_NOT_DELETED = "Lookup not deleted"; + public final static String LOOKUP_NOT_CREATED = "Lookup not Added !"; + public final static String LOOKUP_NOT_UPDATED = "Lookup not updated !"; + + // ACTION BUILDER + public final static String ACTION_BUILDER_API_TITLE = "Action Builder"; + public final static String ACTION_CREATED_SUCCESSFULLY = "Action saved Successfully !"; + public final static String ACTION_UPDATED_SUCCESSFULLY = "Action updated Successfully !"; + public final static String ACTION_DELETED_SUCCESSFULLY = "Action deleted Successfully !"; + public final static String ACTION_NOT_DELETED = "Action not deleted"; + public final static String ACTION_NOT_CREATED = "Action not Added !"; + public final static String ACTION_NOT_UPDATED = "Action not updated !"; + public final static String ACTION_CFF_LAYOUT_SUCCESS = "Layout Created Successfully!"; + public final static String ACTION_CFF_LAYOUT_FAILURE = "Layout Not Created!"; + public final static String ACTION_CFF_DATA_SUCCESS = "Data Added Successfully!"; + public final static String ACTION_CFF_DATA_FAILURE = "Data Not Added!"; + + // MASTER BUILDER CONTROLLER + public final static String MASTER_BUILDER_API_TITLE = "Master Builder"; + public final static String MASTER_BUILDER_SUCCESS = "Master Builder created Successfully!"; + public final static String MASTER_BUILDER_FAILURE = "Master Builder Not Created!"; + + // FORM BUILDER + public final static String FORM_BUILDER_API_TITLE = "Form Builder"; + public final static String FORM_BUILD_SUCCESS = "Form created Successfully!"; + public final static String FORM_BUILD_FAILURE = "Form Not Created!"; + public final static String FORM_DELETE_SUCCESS = "Form Deleted!"; + public final static String FORM_DELETE_FAILURE = "Form Not Delete!"; + + // QUERY BUILDER + public final static String QUERY_API_TITLE = "Create Query"; + public final static String QUERY_CREATE_SUCCESS = "Table created Successfully!"; + public final static String QUERY_CREATE_FAILURE = "Table Not Created!"; + + // FILE OPERATION + public final static String FILE_OPERATION_API_TITLE = "File Operation"; + public final static String FILE_CODE_SAVE_SUCCESSFULLY = "Code Save Successfully!"; + public final static String FILE_NOT_FOUND_EXCEPTION = "File Not Found!"; + public final static String FILE_CODE_SAVE_FAILURE = "Code Not Saved!"; + public final static String FILE_LIST_API_TITLE = "File List"; + public final static String FILE_LIST_IS_EMPTY = "File List Is Empty"; + + // FLF + public final static String FLF_API_TITLE = "FLF"; + public final static String FLF_CREATED_SUCCESSFULLY = "FLF saved Successfully !"; + public final static String FLF_UPDATED_SUCCESSFULLY = "FLF updated Successfully !"; + public final static String FLF_DELETED_SUCCESSFULLY = "FLF deleted Successfully !"; + public final static String FLF_NOT_DELETED = "FLF not deleted"; + public final static String FLF_NOT_CREATED = "FLF not Added !"; + public final static String FLF_NOT_UPDATED = "FLF not updated !"; + + + + + // --------------------------------------Success another + public final static String USER_ADDED_SUCCESSFULLY = "User added Successfully !"; + public final static String USER_INFO_UPDATED_SUCCESSFULLY = "User info update successfully !"; + public final static String ERROR_MESSAGE_SAME_OLD_NEW_PWD = "Old and New Password are same"; + public final static String USER_DOES_NOT_EXIST = "UserName does not exist."; + public final static String USER_DELETE_TITLE = "User Deleted"; + public final static String USER_DELETED_SUCCESSFULLY = "User deleted Successfully !"; + public final static String ERROR_MESSAGE_AUTH_FAILED = "Authentication failed"; + public final static String ERROR_MESSAGE_USER_NAME_AND_PASS = "Please check username and password"; + public final static String USER_LOFOUT_TITLE = "Auth Session"; + public final static String USER_LOG_OUT_SUCCESSFULLY = "User Loged Out successfully !"; + public final static String ERROR_LOG_OUT_MESSAGE = "Session does not exist."; + public final static String ERROR_MOBILE_NO_VERIFICATION = "Mobile number is not register."; + public final static String VERYFICATION_CODE_ACCEPTED = "Code accepted. Phone now marked verified"; + public final static String ERROR_VERYFICATION_MESSAGE = "Code not accepted or Invalide OTP"; + public final static String PROFILE_PIC_ADDED_SUCCESSFULLY = "Pic added Successfully !"; + public final static String ERROR_PROFILE_PIC_FAILED_TO_UPLOAD = "Pic failed to add."; + public final static String FAILED_TO_DELETED_USER = "User info does not exist."; + public final static String PICTURE_TITLE = "Picture"; + +// public final static String PROFILE_PIC_DELETED_SUCCESSFULLY = "Pic delted Successfully !"; +// public final static String PROFILE_API_TITLE = "Profile Pic"; +// public final static String ERROR_PROFILE_PIC_FAILED_TO_DELETE = "Profile Picture does not exist"; +// +// public final static String CONTACT_API_TITLE = "Contacts Uploaded"; +// public final static String CONTACTS_UPLOADED_SUCCESS_MESSAGE = "Contacts uploaded successfully !"; +// public final static String FAILED_TO_UPLOADED_CONTACTS = "Failed to uploaded contacts"; +// +// public final static String GROUP_WITH_USERS_CREATED_SUCCESSFULLY = "Group with users created Successfully !"; +// public final static String FAILED_TO_CREATE_GROUP_WITH_USERS = "Failed to create group with users."; +// +// public final static String GROUP_API_TITLE = "Group"; +// public final static String GROUP_NOT_FOUND_MSG = "There is no any group."; +// public final static String GROUP_CREATED_SUCCESSFULLY_MESSAGE = "Group added Successfully !"; +// public final static String FAILED_TO_CREATE_GROUP_MESSAGE = "Failed to create group."; +// public final static String GROUP_NAME_UPDATED_SUCCESSFULLY = "Group name updated Successfully !"; +// public final static String FAILED_TO_UPDATE_GROUP_NAME_MESSAGE = "Failed to upload group name."; +// public final static String USER_DELETED_FROM_GROUP_SUCCESSFULLY = "User deleted from group Successfully !"; +// public final static String FAILED_TO_DELETE_USER_FROM_GROUP = "Failed to delete user from group."; +// public final static String GROUP_DELETED_SUCCESSFULLY = "User deleted from group Successfully !"; +// public final static String FAILED_TO_DELETE_GROUP = "Failed to delete group."; +// +// public final static String CHAT_MESSAGE_TITLE = "Message"; +// public final static String MESSAGE_SEND_SUCCESSFULLY = "Message sent Successfully !"; +// public final static String FAILED_TO_SEND_MESSAGE = "Failed to send message."; +// public final static String FAILED_TO_DELETE_MESSAGE = "Failed to Delete"; +// +// public final static String NOTIFICATIONS_MESSAGE_TITLE = "Notification"; +// public final static String NOTIFICATIONS_MESSAGE_SET_SUCCESSFULLY = "Notifications preferences set successfully !"; +// public final static String NOTIFICATIONS_FAILED_TO_SET_MESSAGE = "Failed to set preferences."; +// +// public final static String SOCIAL_MESSAGE_TITLE = "Social Network"; +// public final static String SOCIAL_FAILED_TO_SET_MESSAGE = "Failed to link social network site."; +// +// public final static String LIVE_LOCATION_MESSAGE_TITLE = "Live Location"; +// public final static String LIVE_LOCATION_FAILED_TO_SET_MESSAGE = "Failed to set current location."; +// public final static String LIVE_LOCATION_FAILED_TO_GET_MESSAGE = "There is no active sharing sessions."; +// public final static String LIVE_LOCATION_DELETED = "Current live location sharing session deleted."; + + public final static String PIC_UPLOADED_TITLE = "Profile Picture"; + public final static String PIC_UPLOAD_FAILED = "You failed to upload "; + + public final static String PICTURE_CATEGORY = "full"; + public final static String IMAGE_STORAGE_PATH = "D:\\image\\cyooTempFiles\\"; + + public final static String USER_TITLE = "User"; + public final static String USER_NAME_EMAIL_IN_USE = "Username/Email already taken."; + public final static String USER_NAME_EMAIL_NOT_IN_USE = "Username/Email not taken."; + public final static String EMAIL_ID_IN_USE = "Email already taken."; + public final static String USER_NOT_IN_USE = "Username not taken."; + public final static String EMAIL_NOT_IN_USE = "Email not taken."; + + // ======================================================================================== + + /* + * Group group = new Group(); group.setGroupId(2); + * group.setGroupName("friends"); group.setCreatedBy("Munta"); + * group.setCreatedDateTime("2014-11-22 12:45:34"); group.setIsDelete(0); + * + * Set grList = new HashSet(); + * + * GroupUser groupUser = new GroupUser(); groupUser.setId(1); + * groupUser.setGroupId(4); groupUser.setUserName("Jake4"); + * groupUser.setAddedDateTime("2014-11-22 12:45:34"); grList.add(groupUser); + * + * groupUser = new GroupUser(); groupUser.setId(5); groupUser.setGroupId(2); + * groupUser.setUserName("Jake5"); + * groupUser.setAddedDateTime("2014-11-22 12:45:34"); grList.add(groupUser); + * + * group.setGroupUserList(grList); + */ + +} diff --git a/backend/src/main/java/com/realnet/utils/Port_Constant.java b/backend/src/main/java/com/realnet/utils/Port_Constant.java new file mode 100644 index 0000000..d574897 --- /dev/null +++ b/backend/src/main/java/com/realnet/utils/Port_Constant.java @@ -0,0 +1,32 @@ +package com.realnet.utils; + +public class Port_Constant { + +// public final static String LOCAL_HOST = "localhost"; +// public final static String BACKEND_PORT_9191 = "9191"; +// public final static String FRONTEND_PORT_9191 = "4200"; +// public final static String SUREOPS_PORT_9090 = "9090"; +// public final static String JOBPRO_PORT_8087 = "8087"; +// public final static String SCRIPT_RUNNER_8901 = "8901"; +// public final static String APP_BUILD_19001 = "19001"; +// public final static String SURE_JOB_8089 = "8089"; +// public final static String SURE_COMMUNICATION_19002 = "19002"; + + + + public final static String LOCAL_HOST = "43.205.154.152"; + public final static String BACKEND_PORT_9191 = "30166"; + public final static String FRONTEND_PORT_9191 = "30165"; + public final static String SUREOPS_PORT_9090 = "31123"; + public final static String JOBPRO_PORT_8087 = "30167"; + public final static String SCRIPT_RUNNER_8901 = "30168"; + public final static String APP_BUILD_19001 = "30171"; + public final static String SURE_JOB_8089 = "30188"; + public final static String SURE_COMMUNICATION_19002 = "30187"; + + public final static String GITEA_IP_ADDRESS = "try.gitea"; + public final static String GITEA_PORT = "io"; + + + +} diff --git a/backend/src/main/java/com/realnet/utils/WireFrameConstant.java b/backend/src/main/java/com/realnet/utils/WireFrameConstant.java new file mode 100644 index 0000000..542e305 --- /dev/null +++ b/backend/src/main/java/com/realnet/utils/WireFrameConstant.java @@ -0,0 +1,54 @@ +package com.realnet.utils; + +public class WireFrameConstant { + + public static enum FormType { + header_only, + line_only, + header_line, + multiline + } + + public static final String HEADER_ONLY = "header_only"; + public static final String LINE_ONLY = "line_only"; + public static final String HEADER_LINE = "header_line"; + public static final String MULTILINE = "multiline"; + + public static final String HEADER_TYPE = "header"; + public static final String LINE_TYPE = "line"; + + public static final String ID = "id"; + public static final String DT_PK = "PRI"; + public static final String DT_INTEGER = "int"; + public static final String DT_DOUBLE = "double"; + public static final String DT_LONGTEXT = "longtext"; + public static final String DT_VARCHAR = "varchar"; + public static final String DT_DATE_TIME = "datetime"; + public static final String DT_NULL = "N"; + + public static final String SECTION = "section"; + public static final String LINE_SECTION = "line_section"; + public static final String LABEL = "label"; + public static final String COLUMN = "column"; + public static final String BUTTON = "button"; + + + + public static final String DT_TEXTFIELD = "textfield"; + public static final String DT_LINE_TEXTFIELD = "l_textfield"; +// public static final String DT_LONGTEXT = "longtext"; + public static final String DT_DATE = "date"; + public static final String FIELD_CHECKBOX = "checkbox"; + public static final String FIELD_RADIOBUTTON = "radiobutton"; + public static final String FIELD_AUTOCOMPLETE = "autocomplete"; + + public static final String BASIC = "basic"; + public static final String ADDITIONAL = "addtional"; + + public static final String DT_MULTISELECT = "multiselect"; + + + + +} + diff --git a/backend/src/main/resources/MyprojectUI_view.properties b/backend/src/main/resources/MyprojectUI_view.properties new file mode 100644 index 0000000..e69de29 diff --git a/backend/src/main/resources/application.properties b/backend/src/main/resources/application.properties new file mode 100644 index 0000000..d78cc6b --- /dev/null +++ b/backend/src/main/resources/application.properties @@ -0,0 +1,90 @@ +# File is used by sprigboot +server.contextPath=/* +server.port=9292 +spring.resources.static-locations=classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/,classpath:/webui/ + +spring.banner.location=classpath:banner_txt.txt + +#Temporary disable security to enable it remove this +#security.ignored=/** + +springfox.documentation.swagger.v2.path=/api-docs +spring.jackson.date-format=yyyy-MM-dd + + + +System.Net.ServicePointManager.Expect100Continue = false; + + + + + +#spring.data.mongodb.uri=mongodb://gaurav:gaurav123@13.233.70.96:30165/realnet_cns?authSource=admin + +spring.data.mongodb.uri=mongodb+srv://azmat_db_user:064lBmIKyXFPzyLy@cluster0.u9a6g8k.mongodb.net/azzudb +# Prefix Path + + + + +# **********paytm dependency ****** +razorpay.api.key=rzp_test_xVnrBUjJWTEH0r +razorpay.api.secret=evTXkIFcgpVtiLa1P7M7CIox + +#***** MAIL SENDER +spring.mail.host=smtp.gmail.com +spring.mail.username=realitconnect@gmail.com +spring.mail.password=tysnukjdimsneiyv +spring.mail.port=587 +#spring.mail.properties.mail.smtp.auth=true +spring.mail.properties.mail.smtp.starttls.enable=true +spring.mail.properties.mail.smtp.starttls.required=true + +# JACKSON +spring.jackson.serialization.FAIL_ON_EMPTY_BEANS=false + + +spring.mail.properties.mail.smtp.auth = true +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.fallback = false + +#******* MULTIPART RESOLVER +spring.servlet.multipart.enabled=true +spring.servlet.multipart.max-file-size=100MB +spring.servlet.multipart.max-request-size=100MB + +#***************OAUTH2 SOCIAL LOGIN ********* +# Social login provider props +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.scope=profile, email + + +spring.security.oauth2.client.registration.linkedin.clientId= +spring.security.oauth2.client.registration.linkedin.clientSecret= +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.scope=r_liteprofile, r_emailaddress +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.provider=linkedin +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.user-info-uri=https://api.linkedin.com/v2/me +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~)) +app.auth.tokenSecret=926D96C90030DD58429D2751AC1BDBBC +app.auth.tokenExpirationMsec=864000000 + # After successfully authenticating with the OAuth2 Provider, + # 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. + # 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 + + +#projectPath=/data +projectPath=@project.basedir@ +angularProjectPath=@project.basedir@/webui + + diff --git a/backend/src/main/resources/banner_txt.txt b/backend/src/main/resources/banner_txt.txt new file mode 100644 index 0000000..5c9c817 --- /dev/null +++ b/backend/src/main/resources/banner_txt.txt @@ -0,0 +1,11 @@ +******************************************************************* +******************************************************************* + __ _ ____ __ __ __ + / \ \ | |__****** / ___| **** ****_ \ \ \ \ \ \ + / / \ \ | '_ \ / _ \ \___ \| | | | '__|/ _ \ \ \ \ \ \ \ + \ \ / / | |_) | __/ ___) | |_| | | | __/ / / / / / / + \ /_/ |_.__/ \___| |____/ \__,_|_| \___| /_/ /_/ /_/ + *** *** ***** +******************************************************************* +::SPRING BOOT:: CNS Version::v1.1.0 RELEASE +******************************************************************* \ No newline at end of file diff --git a/backend/src/main/resources/data.sql b/backend/src/main/resources/data.sql new file mode 100644 index 0000000..77daec5 --- /dev/null +++ b/backend/src/main/resources/data.sql @@ -0,0 +1,2023 @@ +/* Instructor */ +insert into RN_INSTRUCTOR (ID, FIRST_NAME, LAST_NAME, EMAIL, CREATED_AT, UPDATED_AT) values + (1, 'rajdeep', 'rajbanshi', 'rjraj@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (2, 'sandipan', 'saha', 'sandy@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (3, 'niladri', 'sen', 'sen@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (4, 'abhishek', 'banerjee', 'abhi@gmail.com', '2020-05-24 17:17:36', '2020-07-24 20:12:30'), + (5, 'sayandeep', 'bhowmick', 'sayndeep@gmail.com', '2020-06-24 17:17:36', '2020-07-24 20:12:30'), + (6, 'titas', 'maity', 'titi@gmail.com', '2020-10-22 17:17:36', '2020-10-24 20:12:30'), + (7, 'dip', 'chakraborty', 'dipc@gmail.com', '2020-09-04 17:17:36', '2020-10-24 20:12:30'), + (8, 'asif', 'baidya', 'asif@gmail.com', '2020-08-24 18:17:36', '2020-07-24 20:12:30'), + (9, 'anushree', 'sanyal', 'anus@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (10, 'trisha', 'das', 'trisha@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (11, 'avijit', 'chakraborty', 'avijit@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (12, 'dona', 'sen', 'dona@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (13, 'disha', 'maitra', 'rjraj@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (14, 'sasa', 'saha', 'sandy@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (15, 'vvvv', 'sen', 'sen@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (16, 'qqqq', 'banerjee', 'abhi@gmail.com', '2020-05-24 17:17:36', '2020-07-24 20:12:30'), + (17, 'saaaaayasndeep', 'bhowmick', 'sayndeep@gmail.com', '2020-06-24 17:17:36', '2020-07-24 20:12:30'), + (18, 'lllll', 'maity', 'titi@gmail.com', '2020-10-22 17:17:36', '2020-10-24 20:12:30'), + (19, 'kkkkk', 'chakraborty', 'dipc@gmail.com', '2020-09-04 17:17:36', '2020-10-24 20:12:30'), + (20, 'ffffff', 'baidya', 'asif@gmail.com', '2020-08-24 18:17:36', '2020-07-24 20:12:30'), + (21, 'rajaaQdesep', 'rajbanshi', 'rjraj@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (22, 'sandaaQipsan', 'saha', 'sandy@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (23, 'nilaaQadri', 'sen', 'sen@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (24, 'abQhaaishek', 'banerjee', 'abhi@gmail.com', '2020-05-24 17:17:36', '2020-07-24 20:12:30'), + (25, 'sayanaadeep', 'bhowmick', 'sayndeep@gmail.com', '2020-06-24 17:17:36', '2020-07-24 20:12:30'), + (26, 'tiaatas', 'maity', 'titi@gmail.com', '2020-10-22 17:17:36', '2020-10-24 20:12:30'), + (27, 'dittp', 'chakraborty', 'dipc@gmail.com', '2020-09-04 17:17:36', '2020-10-24 20:12:30'), + (28, 'attsif', 'baidya', 'asif@gmail.com', '2020-08-24 18:17:36', '2020-07-24 20:12:30'), + (29, 'anutttshree', 'sanyal', 'anus@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (30, 'trigggsha', 'das', 'trisha@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (31, 'avijgggit', 'chakraborty', 'avijit@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (32, 'dogggna', 'sen', 'dona@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (33, 'rgggajdeep', 'rajbanshi', 'rjraj@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (34, 'sangggdipan', 'saha', 'sandy@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (35, 'nifgfladri', 'sen', 'sen@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (36, 'abhisfgfhek', 'banerjee', 'abhi@gmail.com', '2020-05-24 17:17:36', '2020-07-24 20:12:30'), + (37, 'safgfgyandeep', 'bhowmick', 'sayndeep@gmail.com', '2020-06-24 17:17:36', '2020-07-24 20:12:30'), + (38, 'titfgfas', 'maity', 'titi@gmail.com', '2020-10-22 17:17:36', '2020-10-24 20:12:30'), + (39, 'dfgfip', 'chakraborty', 'dipc@gmail.com', '2020-09-04 17:17:36', '2020-10-24 20:12:30'), + (40, 'asifgff', 'baidya', 'asif@gmail.com', '2020-08-24 18:17:36', '2020-07-24 20:12:30'), + (41, 'fggfrajdeep', 'rajbanshi', 'rjraj@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (42, 'fgfgsandipan', 'saha', 'sandy@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (43, 'ncxilgbgadri', 'sen', 'sen@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (44, 'adghghbhishek', 'banerjee', 'abhi@gmail.com', '2020-05-24 17:17:36', '2020-07-24 20:12:30'), + (45, 'sayandhyyueep', 'bhowmick', 'sayndeep@gmail.com', '2020-06-24 17:17:36', '2020-07-24 20:12:30'), + (46, 'teritas', 'mereaity', 'titi@gmail.com', '2020-10-22 17:17:36', '2020-10-24 20:12:30'), + (47, 'dipere', 'chakraborty', 'dipc@gmail.com', '2020-09-04 17:17:36', '2020-10-24 20:12:30'), + (48, 'asifcc', 'baidya', 'asif@gmail.com', '2020-08-24 18:17:36', '2020-07-24 20:12:30'), + (49, 'anushrccee', 'sanyal', 'anus@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (50, 'trishawww', 'das', 'trisha@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (51, 'avijiqqt', 'chakraborty', 'avijit@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (52, 'qqqdona', 'sen', 'dona@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (53, 'rajqqqdeep', 'rajbanshi', 'rjraj@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (54, 'sandipqqqqan', 'saha', 'sandy@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (55, 'niladriwww', 'sen', 'sen@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (56, 'abhishewwwk', 'banerjee', 'abhi@gmail.com', '2020-05-24 17:17:36', '2020-07-24 20:12:30'), + (57, 'sayandeepbbb', 'bhowmick', 'sayndeep@gmail.com', '2020-06-24 17:17:36', '2020-07-24 20:12:30'), + (58, 'tbbbitas', 'maity', 'titi@gmail.com', '2020-10-22 17:17:36', '2020-10-24 20:12:30'), + (59, 'dbbbip', 'chakraborty', 'dipc@gmail.com', '2020-09-04 17:17:36', '2020-10-24 20:12:30'), + (60, 'asbbbif', 'baidya', 'asif@gmail.com', '2020-08-24 18:17:36', '2020-07-24 20:12:30'), + (61, 'rajdeAFep', 'rajbanshi', 'rjraj@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (62, 'sanSDFipan', 'saha', 'sandy@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (63, 'nilaSDFdri', 'sen', 'sen@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (64, 'abhiSDFshek', 'banerjee', 'abhi@gmail.com', '2020-05-24 17:17:36', '2020-07-24 20:12:30'), + (65, 'sayaSDndeep', 'bhowmick', 'sayndeep@gmail.com', '2020-06-24 17:17:36', '2020-07-24 20:12:30'), + (66, 'tiAStas', 'maity', 'titi@gmail.com', '2020-10-22 17:17:36', '2020-10-24 20:12:30'), + (67, 'diASp', 'chakraborty', 'dipc@gmail.com', '2020-09-04 17:17:36', '2020-10-24 20:12:30'), + (68, 'aASsif', 'baidya', 'asif@gmail.com', '2020-08-24 18:17:36', '2020-07-24 20:12:30'), + (69, 'anuASshree', 'sanyal', 'anus@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (70, 'triASsha', 'das', 'trisha@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (71, 'avASCijit', 'chakraborty', 'avijit@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (72, 'donVa', 'sen', 'dona@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (73, 'rajCVdeep', 'rajbanshi', 'rjraj@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (74, 'saVndipan', 'saha', 'sandy@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (75, 'nilVadri', 'sen', 'sen@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (76, 'abChishek', 'banerjee', 'abhi@gmail.com', '2020-05-24 17:17:36', '2020-07-24 20:12:30'), + (77, 'saCyandeep', 'bhowmick', 'sayndeep@gmail.com', '2020-06-24 17:17:36', '2020-07-24 20:12:30'), + (78, 'titCas', 'maity', 'titi@gmail.com', '2020-10-22 17:17:36', '2020-10-24 20:12:30'), + (79, 'diCp', 'chakraborty', 'dipc@gmail.com', '2020-09-04 17:17:36', '2020-10-24 20:12:30'), + (80, 'asCif', 'baidya', 'asif@gmail.com', '2020-08-24 18:17:36', '2020-07-24 20:12:30'), + (81, 'rajdeCep', 'rajbanshi', 'rjraj@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (82, 'saSndCipan', 'saha', 'sandy@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (83, 'nilCadri', 'sen', 'sen@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (84, 'abhSCshek', 'banerjee', 'abhi@gmail.com', '2020-05-24 17:17:36', '2020-07-24 20:12:30'), + (85, 'saSyCandeep', 'bhowmick', 'sayndeep@gmail.com', '2020-06-24 17:17:36', '2020-07-24 20:12:30'), + (86, 'titSasCE', 'maity', 'titi@gmail.com', '2020-10-22 17:17:36', '2020-10-24 20:12:30'), + (87, 'diCp', 'chakraborty', 'dipc@gmail.com', '2020-09-04 17:17:36', '2020-10-24 20:12:30'), + (88, 'asEif', 'baidya', 'asif@gmail.com', '2020-08-24 18:17:36', '2020-07-24 20:12:30'), + (89, 'anEushree', 'sanyal', 'anus@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (90, 'triEsha', 'das', 'trisha@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (91, 'avEijit', 'chakraborty', 'avijit@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (92, 'donEa', 'sen', 'dona@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (93, 'raEjdeep', 'rajbanshi', 'rjraj@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (94, 'sanEdipan', 'saha', 'sandy@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (95, 'niladEri', 'sen', 'sen@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (96, 'abhEishek', 'banerjee', 'abhi@gmail.com', '2020-05-24 17:17:36', '2020-07-24 20:12:30'), + (97, 'sayEandeep', 'bhowmick', 'sayndeep@gmail.com', '2020-06-24 17:17:36', '2020-07-24 20:12:30'), + (98, 'tEitas', 'maity', 'titi@gmail.com', '2020-10-22 17:17:36', '2020-10-24 20:12:30'), + (99, 'dEip', 'chakraborty', 'dipc@gmail.com', '2020-09-04 17:17:36', '2020-10-24 20:12:30'), + (100, 'aEsif', 'baidya', 'asif@gmail.com', '2020-08-24 18:17:36', '2020-07-24 20:12:30'), + (101, 'rajSSdeep', 'rajbanshi', 'rjraj@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (102, 'sandSSipan', 'saha', 'sandy@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (103, 'nilaLSSdri', 'sen', 'sen@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (104, 'abLhishek', 'banerjee', 'abhi@gmail.com', '2020-05-24 17:17:36', '2020-07-24 20:12:30'), + (105, 'saLyandeep', 'bhowmick', 'sayndeep@gmail.com', '2020-06-24 17:17:36', '2020-07-24 20:12:30'), + (106, 'tLitas', 'maity', 'titi@gmail.com', '2020-10-22 17:17:36', '2020-10-24 20:12:30'), + (107, 'diLp', 'chakraborty', 'dipc@gmail.com', '2020-09-04 17:17:36', '2020-10-24 20:12:30'), + (108, 'aLsif', 'baidya', 'asif@gmail.com', '2020-08-24 18:17:36', '2020-07-24 20:12:30'), + (109, 'anLushree', 'sanyal', 'anus@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (110, 'triLsha', 'das', 'trisha@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (111, 'aviLjit', 'chakraborty', 'avijit@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (112, 'doLna', 'sen', 'dona@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (113, 'rajLdeep', 'rajbanshi', 'rjraj@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (114, 'sandLipan', 'saha', 'sandy@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (115, 'niULladri', 'sen', 'sen@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (116, 'aLbhUishek', 'banerjee', 'abhi@gmail.com', '2020-05-24 17:17:36', '2020-07-24 20:12:30'), + (117, 'sLLUayandeep', 'bhowmick', 'sayndeep@gmail.com', '2020-06-24 17:17:36', '2020-07-24 20:12:30'), + (118, 'tiLUtas', 'maity', 'titi@gmail.com', '2020-10-22 17:17:36', '2020-10-24 20:12:30'), + (119, 'diUp', 'chakraborty', 'dipc@gmail.com', '2020-09-04 17:17:36', '2020-10-24 20:12:30'), + (120, 'asUif', 'baidya', 'asif@gmail.com', '2020-08-24 18:17:36', '2020-07-24 20:12:30'); + + +/* User */ +insert into user (user_id, password, first_name, last_name, email, company, phone, address1, address2, country, postal, role, is_active, is_blocked, security_provider_id, default_customer_id, secret_question, secret_answer, enable_beta_testing, enable_renewal) values +('demo' , 'demo' , 'Mrinmoy' , 'Majumdar', 'arivera2@joomla.org' , 'Abshire Inc', '7-(740)701-4547', '80429 Garrison Crossing', '4967' , 'USA' , '64890', 'USER' , 1, 0, 10001, 20000, 'Diverse' , 'Yellow' , 0, 0), +('admin' , '$2b$10$AkngMoFbJhllHomzUFdwAehsPzbHxY31XXtWTr0Cnpo9OYs7enn0q' , 'Theresa' , 'Russell' , 'trussell1@about.me' , 'Glover, Adams and Bins', '383-(779)851-3208', '30874 Graceland Terrace', '99152' , 'USA' , '51065', 'ADMIN', 1, 0, 10001, 20000, 'knowledge base', 'Mauv' , 1, 0), +('user' , '$2b$10$AK/siGGl4ITIq0dZHDck0uAyLJHkGPOeLBSAyUL8j5OU5vlf79wjq' , 'Virginia' , 'Reynolds', 'vreynolds0@slashdot.org', 'Rippin, Osinski and Beatty', '84-(228)809-9998', '0118 Burrows Plaza', '496' , 'USA' , '94086', 'USER' , 1, 0, 10001, 20000, 'Innovative' , 'Turquoise', 1, 1), +('jowens3' , 'jowens3' , 'Judy' , 'Owens' , 'jowens3@hp.com' , 'Altenwerth, Fisher and Heidenreich', '30-(772)268-8227', '98 Loeprich Way', '447', 'Greece' , null , 'USER' , 0, 0, 10001, 20001, 'capacity' , 'Fuscia' , 1, 1), +('kburns4' , 'kburns4' , 'Kelly' , 'Burns' , 'kburns4@icio.us' , 'McCullough-Morar', '86-(857)185-5740', '1638 Basil Alley', '56297' , 'China' , null , 'ADMIN', 1, 0, 10000, 20002, 'user-facing' , 'Crimson', 1, 1), +('jshaw5' , 'jshaw5' , 'Julie' , 'Shaw' , 'jshaw5@opera.com' , 'Steuber-Okuneva', '1-(871)375-6188', '389 Myrtle Pass', '41444' , 'Canada' , null , 'ADMIN', 1, 1, 10000, 20000, 'software' , 'Green' , 0, 1), +('pgilbert6' , 'pgilbert6', 'Peter' , 'Gilbert' , 'pgilbert6@eepurl.com' , 'Robel Inc', '52-(372)555-4687', '11522 Fuller Avenue', '5' , 'Mexico' , '39230', 'ADMIN', 1, 1, 10000, 20000, 'multi-state' , 'Puce' , 1, 1), +('jjacobs7' , 'jjacobs7' , 'Justin' , 'Jacobs' , 'jjacobs7@google.co.uk' , 'Harris-Bashirian', '963-(199)359-2552', '95012 Hanover Street', '2377' , 'India' , null , 'USER' , 1, 0, 10000, 20002, 'motivating' , 'Crimson', 1, 0), +('kbennett8' , 'kbennett8', 'Kevin' , 'Bennett' , 'kbennett8@hostgator.com', 'Leannon Inc', '62-(892)710-5713', '459 Coleman Drive', '397' , 'Indonesia' , null , 'ADMIN', 0, 0, 10001, 20000, 'Exclusive' , 'Purple' , 1, 1), +('cmurphy9' , 'cmurphy9' , 'Chris' , 'Murphy' , 'cmurphy9@over-blog.com' , 'Mosciski LLC', '64-(272)961-0086', '2 Ludington Point', '7' , 'New Zealand', null , 'ADMIN', 0, 1, 10000, 20000, 'empowering' , 'Maroon' , 0, 1); + +/* Employees */ +insert into employees (id, last_name, first_name, email, phone, address1, address2, city, state, postal_code, country, avatar, job_title, department, manager_id) values + (201, 'Harris' , 'George' , 'gharris0@pagesperso-orange.fr', '1-(210)270-8536', '2 Bayside Drive', null, 'San Antonio', 'Texas', '78240', 'United States', 'https://robohash.org/modilaboriosammolestiae.bmp?size=50x50&set=set1', 'Administrative Assistant I', 'Toys', null) +,(202, 'Hayes' , 'Rachel' , 'rhayes1@si.edu', '1-(971)797-2729', '30 Anhalt Street', null, 'Portland', 'Oregon', '97232', 'United States', 'https://robohash.org/seddistinctiodolorem.jpg?size=50x50&set=set1', 'Design Engineer', 'Books', null) +,(203, 'Palmer' , 'Anthony', 'apalmer2@posterous.com', '1-(702)984-2108', '02809 4th Pass', null, 'North Las Vegas', 'Nevada', '89036', 'United States', 'https://robohash.org/vitaererumdolore.png?size=50x50&set=set1', 'Health Coach II', 'Toys', null) +,(204, 'Alvarez' , 'Laura' , 'lalvarez3@time.com', '1-(518)328-2658', '647 Lakeland Road', null, 'Albany', 'New York', '12210', 'United States', 'https://robohash.org/nobisplaceatquisquam.jpg?size=50x50&set=set1', 'Computer Systems Analyst II', 'Health', null) +,(205, 'Reynolds', 'Annie' , 'areynolds4@nasa.gov', '1-(775)838-2203', '163 Carey Street', null, 'Reno', 'Nevada', '89550', 'United States', 'https://robohash.org/praesentiumdoloremrerum.png?size=50x50&set=set1', 'Senior Quality Engineer', 'Kids', null) +,(206, 'Henry' , 'Joe' , 'jhenry5@bbb.org', '1-(682)563-2229', '1 Harper Circle', null, 'Fort Worth', 'Texas', '76178', 'United States', 'https://robohash.org/earumiurevoluptas.jpg?size=50x50&set=set1', 'Chief Design Engineer', 'Electronics', null) +,(207, 'Willis' , 'Willie' , 'wwillis6@berkeley.edu', '1-(317)654-6888', '641 Kropf Parkway', null, 'Indianapolis', 'Indiana', '46216', 'United States', 'https://robohash.org/suntsitnecessitatibus.png?size=50x50&set=set1', 'Structural Analysis Engineer', 'Shoes', null) +,(208, 'Lawrence', 'Keith' , 'klawrence7@discovery.com', '1-(501)583-8851', '2184 Melby Crossing', null, 'Little Rock', 'Arkansas', '72222', 'United States', 'https://robohash.org/delenitiomnisconsequatur.jpg?size=50x50&set=set1', 'VP Quality Control', 'Outdoors', null) +,(209, 'Johnston', 'Tina' , 'tjohnston8@alexa.com', '1-(901)128-9976', '72 Hauk Road', null, 'Memphis', 'Tennessee', '38114', 'United States', 'https://robohash.org/voluptasautmaiores.png?size=50x50&set=set1', 'Assistant Media Planner', 'Electronics', null) +,(210, 'Burns' , 'Lisa' , 'lburns9@taobao.com', '1-(585)113-8402', '99 Manufacturers Drive', null, 'Rochester', 'New York', '14624', 'United States', 'https://robohash.org/illumsinttempore.jpg?size=50x50&set=set1', 'Operator', 'Industrial', null) +,(211, 'Stone' , 'Howard' , 'hstonea@ucsd.edu', '1-(202)958-2516', '03 Anthes Center', null, 'Washington', 'District of Columbia', '20425', 'United States', 'https://robohash.org/eautet.bmp?size=50x50&set=set1', 'Account Executive', 'Electronics', null) +,(212, 'Brown' , 'Julie' , 'jbrownb@squidoo.com', '1-(217)741-6449', '37574 4th Drive', null, 'Springfield', 'Illinois', '62705', 'United States', 'https://robohash.org/laborumtotameveniet.png?size=50x50&set=set1', 'Analog Circuit Design manager', 'Electronics', null) +,(213, 'Turner' , 'Edward' , 'eturnerc@theatlantic.com', '1-(701)353-1996', '3 Bultman Circle', null, 'Fargo', 'North Dakota', '58122', 'United States', 'https://robohash.org/sedutporro.png?size=50x50&set=set1', 'Structural Engineer', 'Computers', null) +,(214, 'Nichols' , 'Douglas', 'dnicholsd@fda.gov', '1-(302)771-6486', '5150 Holmberg Way', null, 'Wilmington', 'Delaware', '19805', 'United States', 'https://robohash.org/blanditiiscommodiet.png?size=50x50&set=set1', 'Editor', 'Outdoors', null) +,(215, 'Gilbert' , 'Jessica', 'jgilberte@infoseek.co.jp', '1-(320)607-0289', '32 Summit Park', null, 'Saint Cloud', 'Minnesota', '56372', 'United States', 'https://robohash.org/providentaccusamussed.bmp?size=50x50&set=set1', 'Account Executive', 'Baby', null) +,(216, 'Hernandez', 'Kathy' , 'khernandezf@shinystat.com', '1-(210)733-3380', '24 Merrick Way', null, 'San Antonio', 'Texas', '78225', 'United States', 'https://robohash.org/utfaciliset.png?size=50x50&set=set1', 'Junior Executive', 'Movies', null) +,(217, 'Sullivan', 'Lillian', 'lsullivang@flavors.me', '1-(904)885-2053', '42 Manufacturers Pass', null, 'Jacksonville', 'Florida', '32215', 'United States', 'https://robohash.org/quiaetaut.jpg?size=50x50&set=set1', 'Engineer I', 'Sports', null) +,(218, 'Jenkins' , 'Frances', 'fjenkinsh@huffingtonpost.com', '1-(512)764-3809', '69255 Dakota Plaza', null, 'Austin', 'Texas', '78769', 'United States', 'https://robohash.org/voluptatemnamaliquam.bmp?size=50x50&set=set1', 'Developer IV', 'Baby', null) +,(219, 'Myers' , 'Roger' , 'rmyersi@alexa.com', '1-(480)583-9583', '3 Eagle Crest Place', null, 'Gilbert', 'Arizona', '85297', 'United States', 'https://robohash.org/consequaturutquo.png?size=50x50&set=set1', 'Account Executive', 'Beauty', null) +,(220, 'Hunter' , 'Bonnie' , 'bhunterj@ucsd.edu', '1-(320)933-5140', '99 Arapahoe Terrace', null, 'Saint Cloud', 'Minnesota', '56372', 'United States', 'https://robohash.org/etfacilisquo.bmp?size=50x50&set=set1', 'Analog Circuit Design manager', 'Baby', null); + +/* Products */ +insert into products (id, product_code, product_name, description, standard_cost, list_price, target_level, reorder_level, minimum_reorder_quantity, quantity_per_unit, discontinued, category) values + (601, 'P1' , 'Nikon D810' , null, 1167.09, 1123.39, 75 , 10, 10, 50, 1, 'Camera') +,(602, 'P2' , 'Canon EOS 5D Mark IV' , null, 1382.83, 1293.84, 90 , 15, 15, 56, 0, 'Camera') +,(603, 'P3' , 'Dell XPS 13' , null, 1482.83, 1393.84, 95 , 20, 30, 56, 0, 'Laptop') +,(604, 'P4' , 'iPad Air' , null, 382.83 , 293.84 , 180, 75, 50, 56, 0, 'Tablet') +,(605, 'P5' , 'Acer Aspire S 13' , null, 882.83 , 793.84 , 40 , 15, 15, 56, 0, 'Laptop') +,(606, 'P6' , 'Nexus 6' , null, 633.88 , 511.7 , 75 , 10, 20, 79, 1, 'Phone' ) +,(607, 'P7' , 'ThinkPad T365' , null, 1441.02, 1308.98, 100, 30, 10, 92, 1, 'Laptop') +,(608, 'P8' , 'Moto Z' , null, 538.44 , 462.34 , 75 , 20, 20, 54, 1, 'Phone' ) +,(609, 'P9' , 'HTC 10' , null, 547.58 , 481.83 , 50 , 5 , 15, 58, 1, 'Tablet') +,(610, 'P10', 'MacBook Pro 13.3' , null, 1625.81, 1576.61, 120, 40, 30, 11, 1, 'Laptop') +,(611, 'P11', 'Nikon D500' , null, 867.09 , 723.39 , 75 , 25, 15, 50, 1, 'Camera') +,(612, 'P12', 'Pentax K-1' , null, 882.83 , 793.84 , 50 , 10, 5 , 56, 0, 'Camera') +,(613, 'P13', 'Asus Zenbook Ux305' , null, 1182.83, 1093.84, 55 , 10, 5 , 56, 0, 'Laptop') +,(614, 'P14', 'HP Envy m7-n109dx 17.3', null, 1382.83, 1293.84, 50 , 10, 10, 56, 0, 'Laptop') +,(615, 'P15', 'Microsft Surface Book' , null, 1682.83, 1593.84, 200, 80, 50, 56, 0, 'Tablet') +,(616, 'P16', 'Apple iPhone 7' , null, 833.88 , 711.76 , 250, 100,50, 79, 1, 'Phone' ) +,(617, 'P17', 'Google Pixel' , null, 641.02 , 608.98 , 100, 30 ,20, 92, 1, 'Phone' ) +,(618, 'P18', 'Samsung Galaxy S7' , null, 538.44 , 562.34 , 75 , 15, 10, 54, 1, 'Phone' ) +,(619, 'P19', 'Samasung Note' , null, 547.58 , 481.83 , 75 , 15, 15, 58, 1, 'Tablet') +,(620, 'P20', 'Chromebook 11.6' , null, 1078.81, 1008.61, 80 , 14, 10, 11, 1, 'Laptop'); + +/* Customers */ +insert into customers (id, last_name, first_name, email, company, phone, address1, address2, city, state, postal_code, country) values + (1 , 'Gray' , 'Clarence' , 'cgray0@rambler.ru' , 'Jetpulse' , '1-(260)615-5114', '02937 Merrick Avenue' , null, 'Fort Wayne', 'Indiana', '46805', 'United States') +,(2 , 'Cooper' , 'Emily' , 'ecooper1@macromedia.com' , 'Skippad' , '1-(251)614-5034', '60 Forster Crossing' , null, 'Mobile', 'Alabama', '36605', 'United States') +,(3 , 'Wilson' , 'George' , 'gwilson2@xinhuanet.com' , 'Riffpath' , '1-(901)445-9881', '52 Browning Center' , null, 'Memphis', 'Tennessee', '38181', 'United States') +,(4 , 'Mcdonald', 'Michael' , 'mmcdonald3@twitter.com' , 'Feedfire' , '1-(419)743-7314', '85093 Jackson Park' , null, 'Toledo', 'Ohio', '43610', 'United States') +,(5 , 'Tucker' , 'Lori' , 'ltucker4@etsy.com' , 'Oyondu' , '1-(202)381-2663', '0706 Heffernan Pass' , null, 'Washington', 'District of Columbia', '20380', 'United States') +,(6 , 'Hansen' , 'Lois' , 'lhansen5@stumbleupon.com', 'Yozio' , '1-(315)385-6866', '2 Ruskin Pass' , null, 'Syracuse', 'New York', '13251', 'United States') +,(7 , 'Grant' , 'Frances' , 'fgrant6@yale.edu' , 'Eire' , '1-(863)799-9068', '61402 Morning Court' , null, 'Lakeland', 'Florida', '33811', 'United States') +,(8 , 'Lewis' , 'Catherine', 'clewis7@unesco.org' , 'Realpoint', '1-(915)208-4997', '775 Messerschmidt Junction', null, 'El Paso', 'Texas', '88563', 'United States') +,(9 , 'Rogers' , 'Edward' , 'erogers8@guardian.co.uk' , 'Quinu' , '1-(971)934-2404', '7074 Montana Place' , null, 'Portland', 'Oregon', '97271', 'United States') +,(10, 'Owens' , 'Tina' , 'towens9@earthlink.net' , 'Blogtag' , '1-(712)989-9002', '59039 Sachtjen Street', null, 'Sioux City', 'Iowa', '51105', 'United States') +,(11, 'Peterson', 'Fred' , 'fpetersona@home.pl' , 'Meedoo' , '1-(202)228-9380', '55 Knutson Street', null, 'Washington', 'District of Columbia', '20099', 'United States') +,(12, 'Cox' , 'Jason' , 'jcoxb@slashdot.org' , 'Tagcat' , '1-(651)991-0172', '19 Hoffman Avenue', null, 'Saint Paul', 'Minnesota', '55114', 'United States') +,(13, 'Perez' , 'Paul' , 'pperezc@ask.com' , 'Kazu' , '1-(405)290-7944', '6336 Continental Circle', null, 'Oklahoma City', 'Oklahoma', '73167', 'United States') +,(14, 'Duncan' , 'Anthony' , 'aduncand@disqus.com' , 'Aibox' , '1-(727)705-8400', '17794 Northport Point', null, 'Clearwater', 'Florida', '33763', 'United States') +,(15, 'Graham' , 'Sean' , 'sgrahame@google.com.br' , 'Tekfly' , '1-(901)443-0731', '47493 Reinke Drive', null, 'Memphis', 'Tennessee', '38131', 'United States') +,(16, 'Simpson' , 'Jose' , 'jsimpsonf@youtube.com' , 'Youspan' , '1-(518)381-4659', '498 Carey Lane', null, 'Albany', 'New York', '12262', 'United States') +,(17, 'Simmons' , 'Frances' , 'fsimmonsg@webster.com' ,'Feednation', '1-(251)473-1327', '44102 Montana Crossing', null, 'Mobile', 'Alabama', '36641', 'United States') +,(18, 'Schmidt' , 'John' , 'jschmidth@vinaora.com' , 'Topicblab', '1-(202)945-2079', '384 Goodland Pass', null, 'Washington', 'District of Columbia', '20210', 'United States') +,(19, 'West' , 'Roger' , 'rwesti@cornell.edu' , 'Skilith' , '1-(716)707-3907', '74 Nancy Pass', null, 'Buffalo', 'New York', '14215', 'United States') +,(20, 'Fields' , 'Jesse' , 'jfieldsj@shop-pro.jp' , 'Vinte' , '1-(617)810-9493', '602 Laurel Park', null, 'Boston', 'Massachusetts', '02203', 'United States') +,(21, 'Patterson', 'Kathy' , 'kpattersonk@machines.org', 'Brainverse', '1-(806)803-9725', '67063 Spenser Junction', null, 'Amarillo', 'Texas', '79188', 'United States') +,(22, 'Bell' , 'Stephanie', 'sbelll@gravatar.com' , 'DabZ' , '1-(801)924-1975', '05 Gina Crossing', null, 'Salt Lake City', 'Utah', '84145', 'United States') +,(23, 'Turner' , 'Martha' , 'mturnerm@hp.com' , 'Yadel' , '1-(225)880-9134', '97789 Scofield Point', null, 'Baton Rouge', 'Louisiana', '70894', 'United States') +,(24, 'Ross' , 'Richard' , 'rrossn@weebly.com' , 'Voolith' , '1-(415)690-1916', '19 Briar Crest Alley', null, 'San Francisco', 'California', '94164', 'United States') +,(25, 'Stephens', 'Stephanie', 'sstephenso@times.co.uk' , 'BlogXS' , '1-(501)827-1408', '63291 Huxley Drive', null, 'North Little Rock', 'Arkansas', '72118', 'United States') +,(26, 'Sanchez' , 'Diane' , 'dsanchezp@sun.com' , 'Tagtune' , '1-(315)979-6793', '13 Oneill Junction', null, 'Syracuse', 'New York', '13224', 'United States') +,(27, 'Lawrence', 'Douglas' , 'dlawrenceq@flickr.com' , 'Browsetype', '1-(610)622-4045', '83224 Mallard Center', null, 'Philadelphia', 'Pennsylvania', '19109', 'United States') +,(28, 'Hansen' , 'Lori' , 'lhansenr@patch.com' , 'Einti' , '1-(915)266-1989', '48410 Westport Circle', null, 'El Paso', 'Texas', '88546', 'United States') +,(29, 'Medina' , 'Robert' , 'rmedinas@uiuc.edu' , 'Tambee' , '1-(216)752-7216', '0562 Muir Trail', null, 'Cleveland', 'Ohio', '44197', 'United States') +,(30, 'Harrison', 'Shawn' , 'sharrisont@webnode.com' , 'Youopia' , '1-(205)595-8085', '20 Mayer Center', null, 'Birmingham', 'Alabama', '35205', 'United States') +,(31, 'Alexander', 'Julia' , 'jalexanderu@netsol.com' , 'Oodoo' , '1-(864)349-2185', '61859 West Point', null, 'Greenville', 'South Carolina', '29610', 'United States') +,(32, 'Stanley', 'Victor' , 'vstanleyv@wikipedia.org' , 'Centimia' , '1-(561)507-7317', '08229 Glacier Hill Avenue', null, 'Boynton Beach', 'Florida', '33436', 'United States') +,(33, 'Wheeler', 'Dennis' , 'dwheelerw@indiatimes.com', 'Dynabox' , '1-(419)889-2883', '409 American Ash Plaza', null, 'Lima', 'Ohio', '45807', 'United States') +,(34, 'Frazier', 'Rachel' , 'rfrazierx@sfgate.com' , 'Skivee' , '1-(314)249-1796', '7 Waxwing Court', null, 'Saint Louis', 'Missouri', '63131', 'United States') +,(35, 'Brooks' , 'Shawn' , 'sbrooksy@mediafire.com' , 'Omba' , '1-(971)854-8478', '614 Monica Terrace', null, 'Portland', 'Oregon', '97240', 'United States') +,(36, 'Coleman', 'Frank' , 'fcolemanz@un.org' , 'Agimba' , '1-(318)446-4337', '4 Browning Park', null, 'Shreveport', 'Louisiana', '71151', 'United States') +,(37, 'Wright' , 'Frank' , 'fwright10@flickr.com' , 'Meedoo' , '1-(504)852-2553', '03446 Sheridan Trail', null, 'New Orleans', 'Louisiana', '70183', 'United States') +,(38, 'Perkins', 'Tina' , 'tperkins11@va.gov' , 'Rhybox' , '1-(571)497-0755', '62 Grayhawk Lane', null, 'Fairfax', 'Virginia', '22036', 'United States') +,(39, 'Griffin', 'Ruth' , 'rgriffin12@pcworld.com' , 'Trudoo' , '1-(504)312-7448', '29701 Jenifer Junction', null, 'Metairie', 'Louisiana', '70033', 'United States') +,(40, 'Sanchez', 'Sean' , 'ssanchez13@bandcamp.com' , 'Chatterpoint', '1-(316)535-7647', '10 Stuart Road', null, 'Wichita', 'Kansas', '67260', 'United States') +,(41, 'Harris' , 'Linda' , 'lharris14@ask.com' , 'Blogpad' , '1-(913)258-6547', '17635 Elka Alley', null, 'Shawnee Mission', 'Kansas', '66205', 'United States') +,(42, 'Wood' , 'George' , 'gwood15@imdb.com' , 'Feednation' , '1-(865)482-7169', '210 Anhalt Drive', null, 'Knoxville', 'Tennessee', '37924', 'United States') +,(43, 'Bennett', 'Nancy' , 'nbennett16@netsol.com' , 'Yodo' , '1-(210)749-3167', '97861 Harper Pass', null, 'San Antonio', 'Texas', '78260', 'United States') +,(44, 'Pierce' , 'Jesse' , 'jpierce17@cyberchimps.com', 'Divanoodle' , '1-(501)518-2300', '0 Columbus Terrace', null, 'Little Rock', 'Arkansas', '72231', 'United States') +,(45, 'Larson' , 'Jerry' , 'jlarson18@ustream.tv' , 'Kazu' , '1-(916)702-0977', '0422 Merry Court', null, 'Sacramento', 'California', '95852', 'United States') +,(46, 'Williams', 'Norma' , 'nwilliams19@spiegel.de' , 'Yacero' , '1-(562)631-4036', '5779 Burning Wood Crossing', null, 'Long Beach', 'California', '90847', 'United States') +,(47, 'Kelley' , 'Louis' , 'lkelley1a@wsj.com' , 'Linkbuzz' , '1-(432)286-2200', '04321 Northport Pass', null, 'Odessa', 'Texas', '79764', 'United States') +,(48, 'Mason' , 'Ruby' , 'rmason1b@census.gov' , 'Trudeo' , '1-(763)835-7627', '99219 5th Place', null, 'Monticello', 'Minnesota', '55565', 'United States') +,(49, 'Carr' , 'Nicole' , 'ncarr1c@yellowbook.com' , 'Plajo' , '1-(330)154-9245', '41 Monica Parkway', null, 'Youngstown', 'Ohio', '44511', 'United States') +,(50, 'Franklin', 'Michelle' , 'mfranklin1d@ucoz.com' , 'Wikivu' , '1-(405)751-8906', '62 Rutledge Alley', null, 'Oklahoma City', 'Oklahoma', '73147', 'United States') +,(51, 'Hawkins', 'Larry' , 'lhawkins1e@typepad.com' , 'Tagpad' , '1-(240)796-9270', '48 Columbus Road', null, 'Hagerstown', 'Maryland', '21747', 'United States') +,(52, 'Adams' , 'Lillian' , 'ladams1f@smugmug.com' , 'Avamm' , '1-(419)394-2363', '69708 West Avenue', null, 'Toledo', 'Ohio', '43605', 'United States') +,(53, 'Williamson', 'Janice' , 'jwilliamson1g@sbwire.com', 'Wordware' , '1-(212)576-0309', '311 Clemons Crossing', null, 'New York City', 'New York', '10090', 'United States') +,(54, 'Mitchell', 'Lisa' , 'lmitchell1h@live.com' , 'Trudoo' , '1-(225)794-6979', '17242 Eagan Terrace', null, 'Baton Rouge', 'Louisiana', '70820', 'United States') +,(55, 'Lawrence', 'Anna' , 'alawrence1i@manage.com' , 'Pixope' , '1-(818)505-8262', '51241 Tennessee Point', null, 'Santa Monica', 'California', '90405', 'United States') +,(56, 'Scott' , 'Margaret' , 'mscott1j@arizona.edu' , 'Mynte' , '1-(202)265-0994', '117 Arapahoe Crossing', null, 'Washington', 'District of Columbia', '20051', 'United States') +,(57, 'Harper' , 'Timothy' , 'tharper1k@loc.gov' , 'Trudoo' , '1-(212)348-5025', '137 Commercial Court', null, 'New York City', 'New York', '10175', 'United States') +,(58, 'Frazier' , 'Mary' , 'mfrazier1l@mapy.cz' , 'Photobug' , '1-(214)939-0299', '281 Briar Crest Way', null, 'Garland', 'Texas', '75049', 'United States') +,(59, 'Young' , 'Margaret' , 'myoung1m@ehow.com' , 'Realmix' , '1-(318)144-2666', '537 Memorial Way', null, 'Shreveport', 'Louisiana', '71105', 'United States') +,(60, 'Sullivan', 'Phyllis' , 'psullivan1n@jiathis.com' , 'Demivee' , '1-(518)361-7505', '117 Onsgard Crossing', null, 'Albany', 'New York', '12227', 'United States') +,(61, 'Knight' , 'Roy' , 'rknight1o@qq.com' , 'Meezzy' , '1-(478)438-2599', '60 Kinsman Drive', null, 'Macon', 'United Kingdom', '31210', 'United States') +,(62, 'Ruiz' , 'Andrea' , 'aruiz1p@domainmarket.com', 'Fivespan' , '1-(415)374-7204', '55455 Heffernan Plaza', null, 'San Francisco', 'California', '94142', 'United States') +,(63, 'Hayes' , 'Heather' , 'hhayes1q@odnoklasniki.ru', 'Twitternation', '1-(615)919-6350', '31 Banding Plaza', null, 'Jackson', 'Mississippi', '39296', 'United States') +,(64, 'Chapman' , 'Roy' , 'rchapman1r@theguardian.com', 'BlogXS' , '1-(941)329-4488', '27487 Fair Oaks Crossing', null, 'Sarasota', 'Florida', '34233', 'United States') +,(65, 'Moore' , 'Daniel' , 'dmoore1s@google.co.uk' , 'Twitterbridge', '1-(408)838-8747', '52377 Everett Court', null, 'San Jose', 'California', '95194', 'United States') +,(66, 'Day' , 'Amy' , 'aday1t@indiegogo.com' , 'Brainverse' , '1-(336)903-6679', '50107 Northport Circle', null, 'Winston Salem', 'North Carolina', '27157', 'United States') +,(67, 'Kelley' , 'Jesse' , 'jkelley1u@who.int' , 'Zoomzone' , '1-(304)183-6041', '31740 Bayside Trail', null, 'Huntington', 'West Virginia', '25711', 'United States') +,(68, 'Andrews' , 'Andrea' , 'aandrews1v@patch.com' , 'Fanoodle' , '1-(206)996-3516', '544 Lakewood Gardens Alley', null, 'Seattle', 'Washington', '98148', 'United States') +,(69, 'Willis' , 'Robert' , 'rwillis1w@si.edu' , 'Tazz' , '1-(678)738-3382', '0998 Bellgrove Circle', null, 'Duluth', 'United Kingdom', '30195', 'United States') +,(70, 'Reid' , 'Daniel' , 'dreid1x@miitbeian.gov.cn', 'Babbleblab', '1-(786)539-0220', '2 New Castle Avenue', null, 'Miami', 'Florida', '33111', 'United States') +,(71, 'Roberts' , 'Louise' , 'lroberts1y@cpanel.net' , 'Skippad' , '1-(316)418-5043', '598 Mayfield Road', null, 'Wichita', 'Kansas', '67210', 'United States') +,(72, 'Harrison', 'Margaret' , 'mharrison1z@globe.ne.jp' , 'Zoovu' , '1-(775)625-5357', '636 Maple Point', null, 'Reno', 'Nevada', '89550', 'United States') +,(73, 'Chapman' , 'Peter' , 'pchapman20@eventbrite.com', 'Linkbuzz' , '1-(574)707-4449', '1 Vermont Plaza', null, 'South Bend', 'Indiana', '46620', 'United States') +,(74, 'Tucker' , 'Willie' , 'wtucker21@hubpages.com' , 'Eazzy' , '1-(814)593-2963', '3 Dryden Trail', null, 'Erie', 'Pennsylvania', '16505', 'United States') +,(75, 'Bradley' , 'Adam' , 'abradley22@cnet.com' , 'Yabox' , '1-(903)334-0845', '15 Veith Center', null, 'Tyler', 'Texas', '75705', 'United States') +,(76, 'Armstrong', 'Juan' , 'jarmstrong23@archive.org', 'Gevee' , '1-(916)285-8157', '95 Claremont Crossing', null, 'Sacramento', 'California', '95865', 'United States') +,(77, 'Payne' , 'Kenneth' , 'kpayne24@com.com' , 'Skinte' , '1-(770)150-8423', '75 Beilfuss Court', null, 'Alpharetta', 'United Kingdom', '30022', 'United States') +,(78, 'Jacobs' , 'Louis' , 'ljacobs25@intel.com' , 'Photolist' , '1-(404)386-3449', '542 Browning Park', null, 'Atlanta', 'United Kingdom', '30343', 'United States') +,(79, 'Cooper' , 'Marilyn' , 'mcooper26@whitehouse.gov', 'Yotz' , '1-(520)875-3539', '03 Transport Point', null, 'Tucson', 'Arizona', '85710', 'United States') +,(80, 'Watkins' , 'William' , 'wwatkins27@pbs.org' , 'Brightbean', '1-(719)568-3678', '0316 La Follette Drive', null, 'Colorado Springs', 'Colorado', '80920', 'United States') +,(81, 'Baker' , 'Douglas' , 'dbaker28@exblog.jp' , 'Voonix' , '1-(619)121-6070', '99 Kedzie Terrace', null, 'Chula Vista', 'California', '91913', 'United States') +,(82, 'Cunningham','Daniel' , 'dcunningham29@oakley.com', 'Leexo' , '1-(619)609-6206', '53540 Hallows Place', null, 'San Diego', 'California', '92137', 'United States') +,(83, 'Mitchell', 'Edward' , 'emitchell2a@amazon.com' , 'Jatri' , '1-(502)427-5275', '3 Jana Junction', null, 'Louisville', 'Kentucky', '40280', 'United States') +,(84, 'Matthews', 'Adam' , 'amatthews2b@live.com' , 'Muxo' , '1-(316)764-9074', '5 Arapahoe Plaza', null, 'Wichita', 'Kansas', '67220', 'United States') +,(85, 'Jacobs' , 'Diane' , 'djacobs2c@jimdo.com' , 'Youspan' , '1-(804)398-4775', '6 Moose Street', null, 'Richmond', 'Virginia', '23285', 'United States') +,(86, 'Frazier' , 'Mary' , 'mfrazier2d@forbes.com' , 'Zoomdog' , '1-(716)502-4243', '713 Continental Trail', null, 'Buffalo', 'New York', '14210', 'United States') +,(87, 'Howard' , 'Anthony' , 'ahoward2e@disqus.com' , 'Katz' , '1-(805)800-7968', '006 Elka Center', null, 'Bakersfield', 'California', '93311', 'United States') +,(88, 'Kelly' , 'Anna' , 'akelly2f@unc.edu' , 'Trilia' , '1-(804)117-9707', '292 Browning Circle', null, 'Richmond', 'Virginia', '23228', 'United States') +,(89, 'Clark' , 'Kathy' , 'kclark2g@businesswire.com' , 'Gigabox' , '1-(831)755-4869', '45 Walton Parkway', null, 'Salinas', 'California', '93907', 'United States') +,(90, 'Carpenter', 'Gerald' , 'gcarpenter2h@foxnews.com' , 'Yakidoo' , '1-(213)344-9608', '84560 Stephen Parkway', null, 'Los Angeles', 'California', '90055', 'United States') +,(91, 'Hart' , 'Albert' , 'ahart2i@scribd.com' , 'Jaloo' , '1-(415)201-5281', '0 Washington Place', null, 'Oakland', 'California', '94611', 'United States') +,(92, 'Young' , 'Julia' , 'jyoung2j@craigslist.org' , 'Oloo' , '1-(615)660-1203', '0623 Gale Drive', null, 'Jackson', 'Mississippi', '39210', 'United States') +,(93, 'Pierce' , 'Tammy' , 'tpierce2k@psu.edu' , 'Ntags' , '1-(703)772-3155', '501 Leroy Parkway', null, 'Washington', 'District of Columbia', '20041', 'United States') +,(94, 'Washington', 'Ronald' , 'rwashington2l@drupal.org' , 'Livetube' , '1-(202)828-6093', '6220 Del Sol Alley', null, 'Washington', 'District of Columbia', '20551', 'United States') +,(95, 'Carter' , 'Alan' , 'acarter2m@simplemachines.org', 'Centizu' , '1-(952)234-1678', '043 Sunnyside Center', null, 'Young America', 'Minnesota', '55551', 'United States') +,(96, 'Freeman' , 'Stephanie', 'sfreeman2n@redcross.org' , 'Feednation' , '1-(504)126-8245', '1120 Veith Parkway', null, 'New Orleans', 'Louisiana', '70165', 'United States') +,(97, 'Price' , 'Sara' , 'sprice2o@irs.gov' , 'Izio' , '1-(415)668-5714', '96394 Bonner Hill', null, 'San Francisco', 'California', '94116', 'United States') +,(98, 'Parker' , 'Emily' , 'eparker2p@4shared.com' , 'Skalith' , '1-(330)637-4894', '0 Old Shore Center', null, 'Akron', 'Ohio', '44310', 'United States') +,(99, 'Chavez' , 'Jeremy' , 'jchavez2q@businessweek.com' , 'Topicware' , '1-(515)769-2045', '8584 Jay Street', null, 'Des Moines', 'Iowa', '50335', 'United States') +,(100, 'Kim' , 'Pamela' , 'pkim2r@stumbleupon.com' , 'Photolist' , '1-(510)144-4318', '3688 Gerald Trail', null, 'Sacramento', 'California', '95823', 'United States'); + +/* LOOK UP VALUES */ + + +/* orders */ +insert into orders (id, employee_id, customer_id, order_date, shipped_date, ship_name, ship_address1, ship_address2, ship_city, ship_state, ship_postal_code, ship_country, shipping_fee, payment_type, paid_date, order_status) values + (4001, 204, 40, '2016-04-05', '2016-11-06', 'Jean Fuller', '93 Spohn Place', null, 'Manggekompo', null, null, 'Indonesia', 8.14, 'Card', '2016-10-12', 'On Hold') +,(4002, 204, 95, '2017-01-29', '2016-05-28', 'Diane Holmes', '46 Eliot Trail', null, 'Virginia Beach', 'Virginia', '23459', 'United States', 1.55, 'Check', '2016-06-27', 'Shipped') +,(4003, 218, 54, '2016-08-19', '2016-12-08', 'Jerry Frazier', '23 Sundown Junction', null, 'Obodivka', null, null, 'Ukraine', 2.29, 'Cash', '2016-09-27', 'On Hold') +,(4004, 204, 69, '2016-09-25', '2016-12-24', 'Denise Freeman', '4909 Beilfuss Hill', null, 'Nova Venécia', null, '29830-000', 'Brazil', 4.77, 'Check', '2016-07-04', 'New') +,(4005, 215, 10, '2017-03-14', '2016-03-19', 'Jonathan Gordon', '7 Ludington Court', null, 'Sukamaju', null, null, 'Indonesia', 8.78, 'Check', '2016-03-22', 'On Hold') +,(4006, 211, 23, '2016-08-14', '2016-12-05', 'Sean Carter', '859 Dahle Plaza', null, 'Dayou', null, null, 'China', 9.43, 'Cash', '2016-08-21', 'New') +,(4007, 204, 92, '2017-01-02', '2016-07-09', 'Alice Warren', '5 Fuller Center', null, 'Log pri Brezovici', null, '1358', 'India', 3.25, 'Cash', '2016-03-24', 'Shipped') +,(4008, 205, 20, '2016-05-15', '2016-09-12', 'Andrea Hamilton', '99 Blue Bill Park Junction', null, 'Liangshui', null, null, 'China', 7.04, 'Check', '2016-09-02', 'On Hold') +,(4009, 219, 58, '2016-11-27', '2017-03-02', 'Wanda Hill', '907 Sundown Court', null, 'Pedra Azul', null, '39970-000', 'Brazil', 4.35, 'Cash', '2016-09-27', 'On Hold') +,(4010, 218, 57, '2016-09-11', '2017-02-26', 'Carolyn Foster', '0 Charing Cross Court', null, 'Chicago', 'Illinois', '60609', 'United States', 1.23, 'Cash', '2016-08-09', 'Complete') +,(4011, 207, 3 , '2017-03-01', '2016-08-04', 'Timothy Warren', '19 John Wall Parkway', null, 'Lyon', 'Rhône-Alpes', '69362 CEDEX 07', 'France', 9.57, 'Card', '2016-05-08', 'Complete') +,(4012, 210, 59, '2016-12-31', '2016-08-08', 'Kathleen Marshall', '2 Swallow Circle', null, 'Cunliji', null, null, 'China', 9.03, 'Cash', '2016-04-23', 'On Hold') +,(4013, 204, 57, '2017-01-11', '2017-02-13', 'Jane Ortiz', '1136 Kedzie Alley', null, 'Eirado', 'Viana do Castelo', '4990-540', 'Portugal', 8.9, 'Check', '2016-10-26', 'Shipped') +,(4014, 212, 26, '2016-09-23', '2016-05-13', 'Carolyn Martinez', '954 Kropf Court', null, 'Ibitinga', null, '14940-000', 'Brazil', 4.57, 'Card', '2016-09-11', 'New') +,(4015, 201, 86, '2016-11-04', '2016-10-03', 'Debra Willis', '89 Grasskamp Road', null, 'San Francisco', null, '8501', 'Philippines', 3.53, 'Card', '2016-10-05', 'New') +,(4016, 208, 17, '2016-04-17', '2016-03-22', 'Sharon Little', '27501 Sommers Junction', null, 'San Juan Opico', null, null, 'India', 6.87, 'Card', '2017-01-08', 'Complete') +,(4017, 205, 73, '2016-07-03', '2016-09-26', 'Nancy Hughes', '1 John Wall Avenue', null, 'La Libertad', null, null, 'Argentina', 4.67, 'Check', '2017-02-01', 'New') +,(4018, 213, 16, '2016-12-01', '2016-06-08', 'Sara Knight', '98248 Tony Pass', null, 'Val-d''Or', 'Québec', 'J9P', 'Canada', 9.52, 'Card', '2016-08-06', 'New') +,(4019, 209, 10, '2016-04-18', '2016-04-25', 'Russell Wood', '3 Commercial Point', null, 'Rokietnica', null, '62-090', 'Poland', 6.8, 'Card', '2017-01-20', 'On Hold') +,(4020, 216, 1 , '2016-07-23', '2017-02-23', 'Aaron Grant', '15477 Farwell Circle', null, 'Yongyang', null, null, 'China', 3.17, 'Cash', '2016-08-11', 'Complete') +,(4021, 209, 38, '2016-12-16', '2017-02-14', 'Ryan Foster', '9218 Leroy Avenue', null, 'Mogapinyana', null, null, 'India', 3.34, 'Cash', '2016-06-21', 'On Hold') +,(4022, 207, 91, '2016-07-18', '2016-04-06', 'Peter Montgomery', '570 Londonderry Pass', null, 'Mathakola', null, null, 'India', 8.11, 'Card', '2016-10-27', 'New') +,(4023, 209, 39, '2016-07-15', '2017-02-02', 'Lawrence Schmidt', '371 Acker Drive', null, 'Mesa', 'Arizona', '85205', 'United States', 1.39, 'Cash', '2016-10-27', 'Complete') +,(4024, 219, 51, '2016-12-08', '2017-01-03', 'Eric Gray', '4608 Farmco Point', null, 'Gemblengmulyo', null, null, 'Indonesia', 8.76, 'Card', '2016-05-13', 'Complete') +,(4025, 204, 77, '2016-09-24', '2017-01-20', 'Gloria Green', '62 Sunnyside Park', null, 'Itararé', null, '18460-000', 'Brazil', 7.75, 'Cash', '2017-02-06', 'On Hold') +,(4026, 215, 73, '2016-09-15', '2016-12-24', 'Nicholas Price', '5672 Ruskin Hill', null, 'Maimará', null, '4624', 'Argentina', 9.11, 'Card', '2016-07-22', 'On Hold') +,(4027, 208, 98, '2016-05-31', '2016-07-14', 'Doris Watson', '133 Gina Street', null, 'Bantiran', null, null, 'Indonesia', 3.0, 'Cash', '2016-10-08', 'Complete') +,(4028, 217, 39, '2016-05-10', '2016-04-07', 'Linda Foster', '40382 4th Terrace', null, 'Agrelo', 'Braga', '4730-300', 'Portugal', 2.39, 'Cash', '2016-09-11', 'Complete') +,(4029, 212, 52, '2016-09-14', '2016-12-21', 'Anthony Spencer', '02 Esker Junction', null, 'El Ocotón', null, null, 'Canada', 7.72, 'Check', '2016-09-23', 'Shipped') +,(4030, 218, 74, '2016-05-08', '2016-07-21', 'James Kennedy', '7460 Westport Hill', null, 'Köln', 'Nordrhein-Westfalen', '51107', 'Germany', 6.16, 'Cash', '2016-11-27', 'Shipped') +,(4031, 214, 4 , '2016-05-31', '2017-03-03', 'Theresa Robinson', '44 Havey Way', null, 'Qingtong', null, null, 'China', 5.02, 'Check', '2017-03-15', 'New') +,(4032, 201, 81, '2016-07-05', '2016-11-18', 'Jesse Ray', '68 Derek Hill', null, 'Azogues', null, null, 'Argentina', 5.41, 'Check', '2016-10-16', 'New') +,(4033, 203, 15, '2016-09-07', '2016-06-09', 'Harold Fields', '2 Vermont Terrace', null, 'Mogocha', null, '673732', 'Russia', 2.38, 'Check', '2016-03-30', 'Complete') +,(4034, 217, 11, '2016-08-19', '2016-12-08', 'Larry Watkins', '629 Waxwing Avenue', null, 'Krasnyy Oktyabr’', null, '398526', 'Russia', 5.23, 'Cash', '2016-07-01', 'On Hold') +,(4035, 205, 51, '2016-11-29', '2016-09-02', 'Debra Marshall', '23578 Arizona Junction', null, 'Juhut', null, null, 'Indonesia', 1.59, 'Card', '2016-06-17', 'Shipped') +,(4036, 217, 56, '2016-10-21', '2017-02-13', 'Todd Stephens', '63633 Columbus Avenue', null, 'Paccho', null, null, 'Peru', 5.09, 'Cash', '2016-04-25', 'New') +,(4037, 219, 60, '2016-09-22', '2016-11-08', 'Jean Webb', '0916 Grover Way', null, 'Kuršėnai', null, '81001', 'Denmark', 8.66, 'Cash', '2016-09-30', 'Shipped') +,(4038, 213, 3 , '2016-06-01', '2016-10-07', 'Heather Snyder', '44 Grayhawk Court', null, 'Haenam', null, null, 'Finland', 5.33, 'Cash', '2016-06-30', 'Complete') +,(4039, 201, 28, '2017-02-19', '2016-11-25', 'Janet Howard', '5351 Barby Trail', null, 'Shanghu', null, null, 'China', 9.18, 'Check', '2017-03-16', 'On Hold') +,(4040, 215, 74, '2016-09-14', '2016-06-23', 'Aaron Wheeler', '08 Burrows Avenue', null, 'Tân Sơn', null, null, 'Vietnam', 3.36, 'Card', '2017-03-05', 'New') +,(4041, 204, 79, '2016-09-27', '2017-02-15', 'Lori Watkins', '3 Pennsylvania Court', null, 'Victoria', null, 'VCT', 'India', 9.41, 'Card', '2016-08-12', 'New') +,(4042, 205, 92, '2016-11-03', '2016-05-11', 'Alice Miller', '7895 Amoth Avenue', null, 'Mae Lao', null, '57250', 'Thailand', 2.11, 'Cash', '2016-08-06', 'Shipped') +,(4043, 212, 82, '2016-11-17', '2016-04-19', 'Marilyn Nguyen', '25203 Meadow Ridge Plaza', null, 'Nine', 'Braga', '4775-446', 'Portugal', 6.03, 'Cash', '2016-05-07', 'On Hold') +,(4044, 218, 55, '2016-06-26', '2016-08-15', 'Ashley West', '08621 Porter Lane', null, 'Kingsport', 'Tennessee', '37665', 'United States', 8.23, 'Cash', '2016-12-17', 'New') +,(4045, 217, 53, '2016-05-07', '2017-02-25', 'Julia Fernandez', '91519 Harbort Way', null, 'Issoire', 'Auvergne', '63504 CEDEX', 'France', 1.14, 'Check', '2016-10-27', 'Complete') +,(4046, 211, 78, '2016-12-11', '2017-02-15', 'Willie Sims', '683 Caliangt Parkway', null, 'Balazar', 'Braga', '4805-005', 'Portugal', 6.57, 'Card', '2017-02-13', 'On Hold') +,(4047, 201, 77, '2016-05-20', '2017-02-19', 'Samuel Burke', '25 Grover Lane', null, 'Housuo', null, null, 'China', 6.99, 'Cash', '2016-08-12', 'New') +,(4048, 217, 72, '2016-11-06', '2016-09-29', 'Patricia Green', '29791 Thierer Street', null, 'Campamento', null, '052027', 'Argentina', 3.33, 'Check', '2016-03-24', 'Complete') +,(4049, 210, 98, '2016-08-24', '2016-04-16', 'Nicole Washington', '68 Monica Point', null, 'Cikaung', null, null, 'Indonesia', 5.78, 'Check', '2016-04-30', 'Complete') +,(4050, 215, 26, '2016-10-07', '2016-11-03', 'Marie Bryant', '36611 Schlimgen Place', null, 'Villa Francisca', null, '10215', 'Canada', 4.11, 'Check', '2016-07-29', 'Complete') +,(4051, 212, 51, '2016-05-19', '2017-03-16', 'Brandon Lane', '5 Duke Center', null, 'Soutinho', 'Porto', '4650-530', 'Portugal', 9.62, 'Check', '2016-11-28', 'Shipped') +,(4052, 205, 9 , '2016-07-19', '2016-09-05', 'Pamela Ferguson', '0 Mockingbird Crossing', null, 'Jefferson City', 'Missouri', '65105', 'United States', 9.98, 'Card', '2016-12-08', 'Shipped') +,(4053, 210, 42, '2016-04-09', '2017-02-05', 'Gloria Edwards', '8275 Sage Plaza', null, 'Yilkiqi', null, null, 'China', 5.21, 'Cash', '2016-11-10', 'On Hold') +,(4054, 211, 70, '2017-02-28', '2017-02-11', 'John Cole', '4679 Trailsway Circle', null, 'Sanlanbahai', null, null, 'China', 4.42, 'Card', '2017-01-06', 'Complete') +,(4055, 208, 65, '2017-01-11', '2017-02-14', 'Bobby Butler', '314 Jenna Crossing', null, 'Malusac', null, '2005', 'Philippines', 7.37, 'Cash', '2017-03-15', 'Shipped') +,(4056, 220, 15, '2016-07-12', '2016-09-06', 'Anthony Lane', '1 Packers Avenue', null, 'Batambak', null, null, 'Indonesia', 5.41, 'Card', '2016-11-21', 'On Hold') +,(4057, 220, 76, '2016-05-05', '2016-04-19', 'Karen Ray', '891 Raven Street', null, 'Chinju', null, null, 'Finland', 4.71, 'Cash', '2017-02-11', 'On Hold') +,(4058, 216, 90, '2017-01-26', '2016-12-19', 'Martha Gonzalez', '8695 Mandrake Place', null, 'Maythalūn', null, null, 'India', 1.75, 'Card', '2017-03-16', 'On Hold') +,(4059, 212, 43, '2016-09-20', '2017-02-11', 'Judy Daniels', '154 Lukken Court', null, 'Luoqiao', null, null, 'China', 4.63, 'Check', '2016-11-09', 'On Hold') +,(4060, 207, 80, '2016-04-29', '2016-07-01', 'Jane Stevens', '43 Kingsford Pass', null, 'Dobruševo', null, '7514', 'Denmark', 1.96, 'Cash', '2016-09-02', 'On Hold') +,(4061, 214, 89, '2016-10-09', '2016-09-09', 'Emily Miller', '5 Pearson Lane', null, 'East London', null, '5688', 'South Africa', 2.14, 'Card', '2016-06-10', 'Complete') +,(4062, 220, 8 , '2016-12-01', '2017-03-09', 'Sarah Johnson', '30 Chinook Lane', null, 'Selishche', null, '180536', 'Russia', 3.76, 'Card', '2016-11-18', 'On Hold') +,(4063, 220, 48, '2017-03-05', '2016-11-30', 'Carolyn Reyes', '72 Michigan Pass', null, 'Sukasenang', null, null, 'Indonesia', 6.52, 'Cash', '2016-05-20', 'Shipped') +,(4064, 214, 31, '2016-07-19', '2016-08-16', 'Kathryn Coleman', '43358 Packers Court', null, 'Przystajń', null, '42-141', 'Poland', 1.68, 'Card', '2016-12-13', 'Complete') +,(4065, 205, 41, '2016-12-09', '2016-03-20', 'Clarence Graham', '1675 Starling Point', null, 'Zangbawa', null, null, 'China', 5.82, 'Cash', '2016-07-08', 'Complete') +,(4066, 205, 41, '2016-05-25', '2016-11-15', 'David Harris', '00 Warner Court', null, 'Kabba', null, null, 'Netherlands', 7.24, 'Cash', '2016-09-24', 'New') +,(4067, 218, 13, '2016-07-24', '2016-12-06', 'Ruth Fields', '88567 Golf Course Plaza', null, 'Mauá', null, '09300-000', 'Brazil', 6.82, 'Cash', '2017-01-26', 'New') +,(4068, 206, 11, '2016-05-04', '2016-07-10', 'Todd Butler', '88 Graedel Point', null, 'Jablah', null, null, 'India', 3.83, 'Cash', '2016-06-17', 'On Hold') +,(4069, 215, 55, '2016-12-22', '2016-03-28', 'Catherine Perkins', '95 Troy Parkway', null, 'Frampol', null, '23-440', 'Poland', 7.6, 'Check', '2016-08-24', 'Shipped') +,(4070, 220, 40, '2016-10-17', '2016-12-01', 'Jeffrey Rodriguez', '3393 Weeping Birch Court', null, 'Burunday', null, null, 'Denmark', 2.52, 'Cash', '2016-09-06', 'Shipped') +,(4071, 218, 70, '2017-03-16', '2016-12-09', 'Rachel Butler', '79327 Ridgeway Circle', null, 'Dupnitsa', null, '2680', 'Denmark', 6.25, 'Check', '2016-04-02', 'Complete') +,(4072, 205, 45, '2017-01-22', '2016-05-15', 'Robin Fisher', '0 Susan Court', null, 'Morohongō', null, '357-0211', 'Japan', 4.42, 'Card', '2017-03-06', 'Complete') +,(4073, 217, 94, '2017-01-25', '2016-04-11', 'Ruth Carpenter', '4 Glacier Hill Road', null, 'Ngrejo', null, null, 'Indonesia', 4.9, 'Cash', '2016-08-13', 'On Hold') +,(4074, 219, 27, '2017-01-06', '2017-01-03', 'Irene Kelly', '0 Comanche Junction', null, 'Chao', null, null, 'Peru', 5.32, 'Check', '2016-11-20', 'On Hold') +,(4075, 214, 44, '2016-06-24', '2016-12-20', 'Douglas Sims', '81709 Helena Park', null, 'Dongmaku', null, null, 'China', 3.35, 'Card', '2017-02-27', 'Complete') +,(4076, 216, 27, '2016-09-23', '2016-10-05', 'Kenneth Rose', '5316 Dottie Way', null, 'Olszówka', null, '62-641', 'Poland', 2.63, 'Cash', '2016-05-27', 'Shipped') +,(4077, 211, 84, '2016-11-24', '2016-08-04', 'Jimmy Morgan', '42187 Shoshone Center', null, 'Saltsjöbaden', 'Stockholm', '133 41', 'Sweden', 1.11, 'Cash', '2016-09-09', 'On Hold') +,(4078, 202, 57, '2016-05-28', '2016-06-02', 'Annie Vasquez', '5 Lien Junction', null, 'Al Qaţn', null, null, 'South Africa', 2.73, 'Check', '2016-11-14', 'On Hold') +,(4079, 202, 64, '2016-07-05', '2016-05-20', 'Henry Mccoy', '58 Nelson Circle', null, 'Tsaghkahovit', null, null, 'India', 3.29, 'Card', '2016-08-18', 'Shipped') +,(4080, 216, 44, '2017-02-20', '2016-10-08', 'Norma Graham', '27 Heffernan Pass', null, 'Cairima', null, null, 'China', 7.02, 'Check', '2017-03-06', 'Complete') +,(4081, 218, 60, '2017-03-16', '2016-08-06', 'Albert Wright', '572 Vahlen Place', null, 'Drahovo', null, null, 'Ukraine', 4.92, 'Check', '2017-01-29', 'New') +,(4082, 219, 15, '2016-12-26', '2017-02-17', 'Jane Wells', '21 Merchant Way', null, 'Acacías', null, '507009', 'Argentina', 6.53, 'Card', '2016-06-04', 'Complete') +,(4083, 212, 61, '2016-06-24', '2016-03-23', 'Jesse Mitchell', '4060 Carioca Drive', null, 'Ntoroko', null, null, 'South Africa', 9.41, 'Cash', '2016-10-19', 'On Hold') +,(4084, 216, 3 , '2016-08-20', '2017-02-15', 'Carlos Brooks', '868 Pankratz Trail', null, 'Bat Khela', null, '18351', 'Iran', 1.0, 'Check', '2016-12-22', 'On Hold') +,(4085, 209, 25, '2016-12-03', '2016-06-01', 'Christopher Williamson', '8874 Starling Plaza', null, 'Tarbes', 'Midi-Pyrénées', '65951 CEDEX 9', 'France', 4.15, 'Card', '2017-02-04', 'New') +,(4086, 205, 2 , '2016-06-19', '2016-08-26', 'Joseph Wells', '7223 Carpenter Road', null, 'Chitral', null, '17200', 'Iran', 5.31, 'Card', '2016-07-22', 'Shipped') +,(4087, 216, 96, '2016-06-04', '2016-12-31', 'Teresa Thomas', '908 Ramsey Junction', null, 'Dzerzhinskiy', null, '140083', 'Russia', 4.29, 'Cash', '2017-03-03', 'Shipped') +,(4088, 203, 35, '2016-09-21', '2017-01-08', 'Scott Gomez', '70537 Tennessee Crossing', null, 'Bồng Sơn', null, null, 'Vietnam', 6.93, 'Cash', '2017-01-01', 'New') +,(4089, 210, 18, '2017-02-17', '2016-10-28', 'Nicole Miller', '0 Jackson Place', null, 'Šilheřovice', null, '747 15', 'Czech Republic', 5.64, 'Card', '2016-11-17', 'On Hold') +,(4090, 201, 8 , '2016-11-12', '2016-06-02', 'Donald Nguyen', '7320 Bunting Pass', null, 'Namioka', null, '953-0062', 'Japan', 7.07, 'Cash', '2016-09-29', 'Complete') +,(4091, 212, 67, '2016-04-08', '2016-11-21', 'Shawn Myers', '1844 Esch Plaza', null, 'Gračec', null, '10370', 'Canada', 4.84, 'Card', '2016-03-17', 'New') +,(4092, 220, 16, '2017-01-12', '2016-08-04', 'Daniel Armstrong', '2 Donald Alley', null, 'La Colorada', null, null, 'Denmark', 2.98, 'Check', '2016-12-08', 'Shipped') +,(4093, 203, 60, '2016-04-17', '2016-05-10', 'Henry Gonzales', '23848 6th Center', null, 'Guayatá', null, '153047', 'Argentina', 1.54, 'Check', '2016-04-18', 'New') +,(4094, 209, 37, '2016-08-07', '2016-04-26', 'Stephanie Snyder', '1152 Morning Park', null, 'Zhitan', null, null, 'China', 9.76, 'Card', '2016-05-23', 'New') +,(4095, 205, 46, '2016-09-01', '2017-02-25', 'Joan Butler', '98050 Mitchell Point', null, 'Bun Barat', null, null, 'Indonesia', 9.57, 'Card', '2017-01-25', 'Shipped') +,(4096, 211, 92, '2017-01-02', '2016-12-06', 'Gloria Murray', '8 Vidon Terrace', null, 'Rumenka', null, null, 'India', 5.33, 'Card', '2016-12-28', 'Shipped') +,(4097, 210, 66, '2016-07-04', '2016-05-30', 'Dorothy Simpson', '0 Pearson Point', null, 'Yevpatoriya', null, null, 'Ukraine', 3.52, 'Check', '2016-04-28', 'Complete') +,(4098, 219, 59, '2016-09-27', '2016-12-17', 'Katherine Brooks', '921 Anhalt Place', null, 'Rietavas', null, '90018', 'Denmark', 5.29, 'Check', '2016-12-19', 'Complete') +,(4099, 207, 65, '2016-07-06', '2016-10-11', 'Linda Reid', '89712 Dryden Point', null, 'Bronnitsy', null, '142451', 'Russia', 5.68, 'Card', '2016-07-08', 'New') +,(4100, 212, 61, '2016-04-14', '2016-05-02', 'Richard Carpenter', '17032 Melrose Crossing', null, 'White River', null, '1256', 'South Africa', 7.22, 'Card', '2016-08-03', 'Shipped') +,(4101, 206, 23, '2016-03-28', '2016-12-01', 'Clarence Coleman', '9167 Valley Edge Point', null, 'Guocun', null, null, 'China', 5.86, 'Check', '2016-08-19', 'Shipped') +,(4102, 202, 16, '2016-07-26', '2017-01-18', 'Kevin Dunn', '178 Park Meadow Avenue', null, 'Mlonggo', null, null, 'Indonesia', 4.15, 'Check', '2016-08-03', 'Complete') +,(4103, 211, 65, '2017-01-17', '2016-11-09', 'Keith Lopez', '689 Anthes Pass', null, 'Cibanten', null, null, 'Indonesia', 8.25, 'Check', '2016-10-15', 'Shipped') +,(4104, 218, 86, '2017-03-12', '2016-05-25', 'Chris Wright', '57974 Riverside Junction', null, 'Ban Mai', null, '80000', 'Thailand', 4.85, 'Cash', '2016-05-08', 'New') +,(4105, 215, 57, '2016-07-03', '2016-05-03', 'Michael Snyder', '93 Ohio Hill', null, 'Bryan', 'Texas', '77806', 'United States', 3.54, 'Card', '2016-08-10', 'Shipped') +,(4106, 210, 2 , '2017-03-07', '2016-09-18', 'David Day', '5024 Summerview Circle', null, 'Itapira', null, '13970-000', 'Brazil', 3.6, 'Cash', '2017-01-20', 'On Hold') +,(4107, 218, 4 , '2016-10-10', '2016-09-02', 'Lisa Kim', '4892 Huxley Center', null, 'Tanjungagung', null, null, 'Indonesia', 6.23, 'Cash', '2016-06-11', 'On Hold') +,(4108, 214, 26, '2016-06-02', '2016-10-05', 'Teresa Ellis', '1569 Mariners Cove Terrace', null, 'Maszkienice', null, '32-854', 'Poland', 7.65, 'Check', '2016-04-14', 'On Hold') +,(4109, 201, 51, '2016-10-07', '2017-02-02', 'Jimmy Lawson', '2165 Bluestem Center', null, 'Kampungbaru', null, null, 'Indonesia', 1.73, 'Check', '2016-09-30', 'Shipped') +,(4110, 215, 4 , '2016-08-21', '2017-02-05', 'Jerry Murray', '40070 Anderson Court', null, 'Vicente Guerrero', 'Veracruz Llave', '92440', 'Mexico', 1.57, 'Card', '2016-06-26', 'New') +,(4111, 210, 56, '2016-07-06', '2016-09-19', 'Joan Adams', '5322 Goodland Avenue', null, 'Paris 17', 'Île-de-France', '75853 CEDEX 17', 'France', 7.52, 'Cash', '2016-05-07', 'New') +,(4112, 214, 77, '2016-09-04', '2016-10-19', 'Chris Young', '7 Clove Center', null, 'Gongjiahe', null, null, 'China', 3.31, 'Card', '2016-11-06', 'New') +,(4113, 217, 62, '2016-07-18', '2016-09-30', 'Norma Oliver', '6002 Rieder Road', null, 'Lingbei', null, null, 'China', 8.85, 'Check', '2016-09-25', 'Complete') +,(4114, 213, 72, '2016-08-01', '2016-09-12', 'Douglas Day', '88 Helena Drive', null, 'Alcoutim', 'Faro', '8970-055', 'Portugal', 5.52, 'Card', '2016-12-19', 'New') +,(4115, 220, 6 , '2016-11-13', '2017-02-22', 'Janet James', '820 Westend Place', null, 'Springfield', 'Massachusetts', '01129', 'United States', 4.72, 'Cash', '2016-03-21', 'On Hold') +,(4116, 201, 72, '2016-09-01', '2016-09-07', 'Martha Lee', '2 Donald Hill', null, 'Majiang', null, null, 'China', 4.39, 'Cash', '2016-12-10', 'Shipped') +,(4117, 202, 40, '2017-02-04', '2016-12-09', 'Benjamin Cruz', '02989 Morningstar Avenue', null, 'Gīvī', null, null, 'Iran', 1.77, 'Check', '2017-01-29', 'Complete') +,(4118, 213, 48, '2016-12-24', '2017-01-06', 'Diane Porter', '7 Kensington Center', null, 'Pingyi', null, null, 'China', 4.69, 'Check', '2016-05-31', 'On Hold') +,(4119, 205, 69, '2016-06-30', '2016-05-01', 'Brandon Myers', '80411 Victoria Center', null, 'Punsu', null, null, 'Indonesia', 7.8, 'Cash', '2016-12-28', 'New') +,(4120, 220, 63, '2016-11-11', '2016-10-30', 'Beverly Garza', '2750 Sullivan Place', null, 'San Jose', null, '8427', 'Philippines', 8.15, 'Check', '2016-09-23', 'Shipped') +,(4121, 220, 32, '2016-05-05', '2016-09-05', 'Cynthia Simpson', '0731 Clarendon Point', null, 'Pomichna', null, null, 'Ukraine', 5.56, 'Card', '2017-02-23', 'On Hold') +,(4122, 201, 38, '2016-04-24', '2016-07-30', 'Janet West', '4800 Dottie Parkway', null, 'Tân Kỳ', null, null, 'Vietnam', 2.63, 'Cash', '2016-06-17', 'On Hold') +,(4123, 214, 24, '2016-04-04', '2016-06-11', 'Kevin Stone', '85 Duke Avenue', null, 'Shemonaīkha', null, null, 'Denmark', 9.99, 'Card', '2016-09-24', 'On Hold') +,(4124, 210, 9 , '2016-09-01', '2016-06-18', 'Amy Austin', '80663 Almo Park', null, 'Zaječov', null, '267 63', 'Czech Republic', 3.58, 'Card', '2016-08-29', 'Complete') +,(4125, 206, 78, '2017-02-09', '2016-07-07', 'Gregory Greene', '6 Commercial Junction', null, 'Hudong', null, null, 'China', 7.34, 'Cash', '2016-12-26', 'New') +,(4126, 215, 48, '2016-07-30', '2016-12-25', 'Laura Woods', '115 Ramsey Plaza', null, 'Allentown', 'Pennsylvania', '18105', 'United States', 4.92, 'Check', '2016-09-28', 'On Hold') +,(4127, 220, 19, '2016-03-29', '2016-05-27', 'Stephanie Reed', '452 Grayhawk Way', null, 'Sicheng', null, null, 'China', 1.1, 'Card', '2017-03-14', 'Shipped') +,(4128, 208, 64, '2016-06-03', '2016-08-13', 'Craig Gonzalez', '6028 West Street', null, 'Kliteh', null, null, 'Indonesia', 1.73, 'Cash', '2016-06-23', 'Complete') +,(4129, 201, 28, '2016-09-05', '2016-04-03', 'Raymond Gomez', '4 Stone Corner Place', null, 'Chechenglu', null, null, 'China', 4.32, 'Card', '2016-06-29', 'Complete') +,(4130, 215, 83, '2016-11-14', '2016-09-13', 'Kenneth Taylor', '7 Nevada Way', null, 'Alīpur', null, '34451', 'Iran', 5.07, 'Card', '2016-11-28', 'Complete') +,(4131, 203, 76, '2017-02-01', '2017-01-04', 'Jose Peters', '2493 Saint Paul Crossing', null, 'Bofuer', null, null, 'Indonesia', 9.85, 'Card', '2016-11-18', 'New') +,(4132, 207, 67, '2016-09-02', '2017-03-10', 'Martin West', '7251 Prairieview Place', null, 'Espinillo', null, '3460', 'Argentina', 7.9, 'Card', '2017-02-05', 'New') +,(4133, 208, 78, '2016-08-27', '2016-12-26', 'Louise Dunn', '4076 East Trail', null, 'Caramanta', null, '056047', 'Argentina', 1.28, 'Cash', '2016-12-22', 'Shipped') +,(4134, 209, 93, '2016-06-27', '2016-04-10', 'Gregory Stanley', '67 Namekagon Crossing', null, 'Pasarkayu', null, null, 'Indonesia', 2.83, 'Check', '2016-09-17', 'Complete') +,(4135, 206, 60, '2016-03-23', '2016-06-19', 'Ronald Palmer', '21 Old Shore Place', null, 'Tujing', null, null, 'China', 9.01, 'Check', '2016-12-22', 'New') +,(4136, 209, 10, '2016-11-07', '2016-11-21', 'Harry Robinson', '740 Toban Court', null, 'Liujiage', null, null, 'China', 7.13, 'Card', '2016-09-20', 'New') +,(4137, 214, 83, '2016-05-20', '2016-04-08', 'Joan Torres', '5167 Laurel Drive', null, 'Nirji', null, null, 'China', 9.81, 'Card', '2016-09-13', 'Complete') +,(4138, 207, 47, '2016-07-17', '2016-10-03', 'Carlos Jones', '4 Fuller Lane', null, 'Detroit', 'Michigan', '48258', 'United States', 8.02, 'Card', '2016-11-16', 'On Hold') +,(4139, 214, 92, '2016-07-17', '2017-01-23', 'Terry Freeman', '738 Vernon Road', null, 'Veverská Bítýška', null, '664 71', 'Czech Republic', 1.93, 'Check', '2016-04-04', 'Complete') +,(4140, 204, 92, '2016-06-09', '2016-05-06', 'Rose Hunt', '3242 Bunting Trail', null, 'Schaumburg', 'Illinois', '60193', 'United States', 7.65, 'Check', '2016-07-03', 'On Hold') +,(4141, 214, 12, '2016-11-19', '2017-03-16', 'Harry Reid', '395 Hauk Road', null, 'Rudky', null, null, 'Ukraine', 5.23, 'Card', '2017-01-18', 'On Hold') +,(4142, 212, 88, '2016-12-25', '2016-12-14', 'Fred Olson', '9311 Old Gate Park', null, 'Hejiabao', null, null, 'China', 4.02, 'Check', '2016-05-16', 'New') +,(4143, 217, 79, '2016-06-14', '2016-08-25', 'Paul Arnold', '08347 Comanche Pass', null, 'Bukovec', null, '739 84', 'Czech Republic', 6.02, 'Card', '2016-05-08', 'New') +,(4144, 216, 56, '2016-06-03', '2016-07-22', 'Carolyn Woods', '55 Stoughton Pass', null, 'Shengmi', null, null, 'China', 7.32, 'Card', '2016-07-27', 'New') +,(4145, 218, 84, '2016-07-02', '2016-11-05', 'Craig Schmidt', '2 Stephen Plaza', null, 'Arhust', null, null, 'Japan', 3.31, 'Check', '2016-06-17', 'New') +,(4146, 219, 13, '2016-09-02', '2017-01-29', 'Antonio Jordan', '452 Clemons Court', null, 'København', 'Region Hovedstaden', '1787', 'Denmark', 4.84, 'Card', '2016-11-10', 'Complete') +,(4147, 212, 51, '2016-10-19', '2017-01-20', 'Carol Evans', '1649 Crescent Oaks Road', null, 'Roubaix', 'Nord-Pas-de-Calais', '59100', 'France', 7.71, 'Card', '2017-03-08', 'On Hold') +,(4148, 217, 26, '2016-04-16', '2016-11-28', 'Steven Torres', '73679 Morning Drive', null, 'Ayotupas', null, null, 'Japan', 7.0, 'Card', '2016-06-12', 'On Hold') +,(4149, 215, 1 , '2017-02-06', '2016-10-27', 'Louis Watson', '03 Golf View Way', null, 'Madaoua', null, null, 'United Kingdom', 4.45, 'Check', '2016-07-22', 'Complete') +,(4150, 210, 100,'2017-01-14', '2016-11-12', 'Robin Reynolds', '5 Hagan Hill', null, 'Huacaschuque', null, null, 'Peru', 7.37, 'Check', '2017-02-09', 'New') +,(4151, 217, 24, '2016-09-06', '2016-10-11', 'Julia Gilbert', '3 Manitowish Avenue', null, 'Passos', 'Viana do Castelo', '4990-770', 'Portugal', 1.76, 'Card', '2016-07-16', 'New') +,(4152, 210, 90, '2016-05-26', '2016-07-14', 'Chris Chavez', '0 Birchwood Plaza', null, 'Odivelas', 'Lisboa', '2675-080', 'Portugal', 8.35, 'Cash', '2017-02-05', 'On Hold') +,(4153, 220, 79, '2016-10-27', '2016-08-14', 'Adam Morrison', '04510 West Circle', null, 'Weda', null, null, 'Japan', 8.84, 'Check', '2016-10-05', 'On Hold') +,(4154, 210, 57, '2017-02-21', '2016-09-28', 'Doris Snyder', '37027 Hintze Parkway', null, 'Vakhrushi', null, '613110', 'Russia', 2.75, 'Cash', '2016-12-02', 'Complete') +,(4155, 202, 24, '2017-02-03', '2016-08-03', 'Lisa Fisher', '919 Warner Circle', null, 'Kanbe', null, null, 'India', 2.48, 'Check', '2016-12-23', 'New') +,(4156, 213, 89, '2017-01-26', '2016-06-25', 'Gloria Murphy', '6750 Hansons Center', null, 'Saint Petersburg', null, '190990', 'Russia', 2.88, 'Cash', '2017-01-31', 'On Hold') +,(4157, 219, 83, '2016-08-03', '2016-06-15', 'Sara Mcdonald', '88365 Namekagon Park', null, 'Maofan', null, null, 'China', 4.69, 'Cash', '2016-09-22', 'New') +,(4158, 202, 79, '2016-08-13', '2016-10-08', 'John Barnes', '41 Springs Plaza', null, 'Carangola', null, '36800-000', 'Brazil', 4.84, 'Check', '2016-11-25', 'New') +,(4159, 215, 84, '2016-11-30', '2017-02-27', 'Bobby Matthews', '39153 Kipling Trail', null, 'Now Zād', null, null, 'Germany', 7.56, 'Cash', '2016-09-25', 'Shipped') +,(4160, 216, 40, '2016-07-27', '2016-12-05', 'Robin Greene', '899 Waubesa Alley', null, 'Vellinge', 'Skåne', '235 93', 'Sweden', 4.17, 'Card', '2016-12-22', 'New') +,(4161, 211, 91, '2017-03-12', '2016-09-11', 'Joseph Long', '3 Nobel Terrace', null, 'Bukabu', null, null, 'Japan', 2.26, 'Card', '2016-10-26', 'On Hold') +,(4162, 204, 94, '2016-10-08', '2016-09-26', 'Lisa Rodriguez', '880 Arizona Terrace', null, 'Elena', null, '5815', 'Argentina', 3.13, 'Cash', '2016-06-15', 'Shipped') +,(4163, 208, 49, '2017-02-23', '2016-06-05', 'Douglas Parker', '79 Mariners Cove Plaza', null, 'Şafāshahr', null, null, 'Iran', 1.83, 'Cash', '2016-10-26', 'On Hold') +,(4164, 201, 23, '2016-10-31', '2017-01-07', 'Laura Stewart', '97911 Meadow Ridge Road', null, 'Hexi', null, null, 'China', 1.24, 'Check', '2017-03-08', 'Shipped') +,(4165, 202, 27, '2017-01-07', '2016-10-05', 'Matthew Jordan', '29 Lakewood Trail', null, 'Kalkal Barat', null, null, 'Japan', 9.19, 'Card', '2016-09-03', 'Shipped') +,(4166, 218, 61, '2016-03-31', '2017-03-03', 'Denise Mason', '79 Carberry Alley', null, 'Vạn Giã', null, null, 'Vietnam', 7.78, 'Card', '2016-03-23', 'New') +,(4167, 220, 56, '2016-11-12', '2016-06-18', 'Phillip Castillo', '9910 Reindahl Parkway', null, 'Shangyanzhuang', null, null, 'China', 2.48, 'Card', '2016-07-14', 'Complete') +,(4168, 201, 41, '2016-07-10', '2016-07-29', 'Dorothy Nelson', '8 Hermina Terrace', null, 'Petrolina', null, '56300-000', 'Brazil', 1.52, 'Check', '2016-11-11', 'Shipped') +,(4169, 218, 100,'2016-12-18', '2016-12-02', 'Lawrence Willis', '21 Northland Trail', null, 'Bukor', null, null, 'India', 2.28, 'Card', '2017-01-06', 'New') +,(4170, 218, 6 , '2016-10-31', '2016-10-20', 'Jonathan Banks', '5748 Kings Hill', null, 'Tianning', null, null, 'China', 5.71, 'Check', '2016-06-02', 'Shipped') +,(4171, 211, 93, '2016-11-16', '2017-01-20', 'Gary Green', '001 Straubel Point', null, 'Huangshapu', null, null, 'China', 3.6, 'Cash', '2016-12-12', 'Complete') +,(4172, 203, 46, '2016-10-16', '2016-09-08', 'Nancy Bryant', '367 Gateway Park', null, 'Zhutang', null, null, 'China', 2.19, 'Cash', '2017-02-15', 'Shipped') +,(4173, 208, 72, '2016-08-27', '2016-04-09', 'Jeremy Rose', '8 Service Lane', null, 'Jinshandian', null, null, 'China', 8.09, 'Check', '2017-01-18', 'On Hold') +,(4174, 212, 88, '2016-06-25', '2016-08-21', 'Rebecca Gibson', '74 American Crossing', null, 'Canmang', null, null, 'China', 1.31, 'Card', '2017-02-08', 'New') +,(4175, 208, 75, '2017-02-28', '2017-01-03', 'Marilyn Hanson', '676 Service Crossing', null, 'Racławice', null, '32-222', 'Poland', 2.88, 'Check', '2017-02-18', 'New') +,(4176, 204, 1 , '2016-09-23', '2016-08-16', 'Denise Hanson', '8 Lakewood Crossing', null, 'Huaizhong', null, null, 'China', 9.48, 'Card', '2016-12-30', 'On Hold') +,(4177, 204, 20, '2017-03-02', '2016-12-27', 'John Shaw', '4752 Meadow Ridge Lane', null, 'Sosnovo-Ozerskoye', null, '612955', 'Russia', 7.17, 'Check', '2016-06-21', 'On Hold') +,(4178, 202, 30, '2016-03-20', '2016-10-17', 'Russell Fernandez', '5941 Esch Lane', null, 'Shuiyang', null, null, 'China', 1.04, 'Check', '2017-01-05', 'On Hold') +,(4179, 202, 27, '2017-01-14', '2016-07-31', 'Annie Ruiz', '67778 Butterfield Trail', null, 'Qalyūb', null, null, 'Germany', 5.51, 'Card', '2016-05-12', 'Shipped') +,(4180, 208, 1 , '2017-03-16', '2016-04-04', 'Ashley Gonzales', '88504 Johnson Street', null, 'Salingogan', null, '6417', 'Philippines', 7.56, 'Check', '2016-07-26', 'Shipped') +,(4181, 203, 70, '2016-03-25', '2016-11-06', 'Richard George', '54 3rd Circle', null, 'Haibeitou', null, null, 'China', 1.99, 'Cash', '2016-09-05', 'New') +,(4182, 219, 69, '2016-04-11', '2017-02-03', 'David Harris', '2 Menomonie Pass', null, 'Oslo', 'Oslo', '0188', 'Greece', 1.93, 'Check', '2016-11-30', 'Shipped') +,(4183, 211, 25, '2016-12-08', '2016-11-16', 'Catherine Reynolds', '302 Autumn Leaf Parkway', null, 'Lameiras', 'Lisboa', '2715-145', 'Portugal', 6.68, 'Cash', '2016-04-02', 'Shipped') +,(4184, 217, 73, '2016-06-19', '2016-11-29', 'Donald Moreno', '690 Laurel Park', null, 'Sinisian', null, '4212', 'Philippines', 3.1, 'Check', '2017-01-06', 'New') +,(4185, 210, 34, '2016-07-03', '2016-05-23', 'Ryan Thomas', '45044 Harper Place', null, 'Madīnat Lab‘ūs', null, null, 'South Africa', 6.31, 'Cash', '2016-06-27', 'Complete') +,(4186, 206, 91, '2016-05-26', '2016-09-09', 'Ruby Lynch', '8350 Karstens Parkway', null, 'Puyo', null, null, 'Argentina', 6.07, 'Check', '2016-05-10', 'Shipped') +,(4187, 208, 64, '2016-05-31', '2016-10-16', 'Linda Robinson', '6069 Chive Plaza', null, 'Joutseno', null, '54101', 'Finland', 3.11, 'Card', '2016-05-15', 'Shipped') +,(4188, 216, 41, '2017-02-07', '2016-03-28', 'Bonnie Morris', '2611 Comanche Junction', null, 'Lacombe', 'Alberta', 'T4L', 'Canada', 2.53, 'Check', '2016-08-31', 'New') +,(4189, 206, 51, '2016-12-20', '2016-12-08', 'Dennis Gardner', '2348 Blue Bill Park Crossing', null, 'Ngkiong', null, null, 'Japan', 5.1, 'Check', '2016-11-28', 'New') +,(4190, 220, 54, '2016-08-06', '2016-08-27', 'Carolyn Matthews', '817 Ohio Point', null, 'Orekhovo-Zuyevo', null, '142609', 'Russia', 7.52, 'Card', '2016-03-22', 'On Hold') +,(4191, 207, 96, '2016-07-03', '2016-06-18', 'Jesse Parker', '3 Eastwood Terrace', null, 'Berezovo', null, null, 'Ukraine', 6.64, 'Check', '2016-05-07', 'New') +,(4192, 216, 18, '2016-06-05', '2017-01-11', 'Ann Gilbert', '6 Oak Valley Lane', null, 'Caijiang', null, null, 'China', 3.72, 'Cash', '2016-11-17', 'On Hold') +,(4193, 208, 22, '2016-06-26', '2017-02-22', 'Martha Hawkins', '57581 Union Road', null, 'Ilinden', null, '1041', 'Denmark', 5.64, 'Cash', '2016-05-23', 'On Hold') +,(4194, 207, 42, '2017-02-03', '2017-01-08', 'Jeffrey Hart', '83 Green Ridge Point', null, 'Wangcheng', null, null, 'China', 1.15, 'Check', '2016-12-07', 'Shipped') +,(4195, 217, 28, '2016-10-18', '2016-05-01', 'Joseph Riley', '54373 Coleman Street', null, 'Karangbungur', null, null, 'Japan', 5.9, 'Cash', '2016-04-23', 'Complete') +,(4196, 207, 78, '2016-07-09', '2016-07-15', 'Brian Dean', '9 Stone Corner Hill', null, 'Dambulla', null, '21100', 'United Kingdom', 5.15, 'Check', '2016-07-09', 'On Hold') +,(4197, 204, 38, '2016-07-19', '2016-04-13', 'Christine Campbell', '47302 Porter Junction', null, 'Dananshan', null, null, 'China', 6.74, 'Card', '2016-11-07', 'Complete') +,(4198, 201, 7 , '2017-03-02', '2016-08-16', 'Ruth Mcdonald', '401 Erie Avenue', null, 'Borkowice', null, '26-422', 'Poland', 3.24, 'Cash', '2016-04-17', 'New') +,(4199, 216, 87, '2016-12-14', '2017-03-05', 'Jean Armstrong', '450 Sullivan Avenue', null, 'Carpenter', null, '2009', 'Philippines', 4.25, 'Cash', '2016-07-11', 'Complete') +,(4200, 218, 8 , '2017-02-01', '2016-04-17', 'Gary Price', '775 Butterfield Lane', null, 'Vaasa', null, '66999', 'Finland', 5.36, 'Card', '2016-07-09', 'Shipped') +,(4201, 217, 77, '2016-11-10', '2016-11-13', 'Carolyn Scott', '5878 Badeau Lane', null, 'Kazanskaya', null, '396614', 'Russia', 7.94, 'Card', '2016-12-09', 'New') +,(4202, 204, 10, '2016-08-12', '2016-03-21', 'Earl Anderson', '9 Roth Court', null, 'Governor’s Harbour', null, null, 'Canada', 2.47, 'Card', '2016-08-06', 'Complete') +,(4203, 204, 54, '2016-05-26', '2016-04-18', 'Elizabeth Kelley', '70 Burrows Street', null, 'Fucheng', null, null, 'China', 9.94, 'Cash', '2016-08-24', 'Shipped') +,(4204, 208, 58, '2017-03-09', '2016-04-17', 'Julia Wilson', '46476 Burning Wood Crossing', null, 'Koper', null, '6600', 'India', 3.82, 'Card', '2016-08-26', 'New') +,(4205, 208, 85, '2016-05-04', '2016-03-18', 'Jeffrey Oliver', '39 Tennessee Avenue', null, 'Jejkowice', null, '44-290', 'Poland', 7.22, 'Card', '2016-09-23', 'Shipped') +,(4206, 220, 8 , '2016-06-16', '2017-01-03', 'Angela Walker', '579 Miller Street', null, 'Hà Tĩnh', null, null, 'Vietnam', 1.04, 'Check', '2016-05-18', 'Complete') +,(4207, 212, 55, '2016-07-04', '2016-11-09', 'Karen Hansen', '953 Manufacturers Pass', null, 'Lysekil', 'Västra Götaland', '453 35', 'Sweden', 8.81, 'Check', '2016-03-18', 'New') +,(4208, 217, 96, '2016-10-26', '2016-07-11', 'Patricia West', '1 Browning Alley', null, 'Huayang', null, null, 'China', 7.54, 'Card', '2016-09-15', 'New') +,(4209, 203, 71, '2016-08-04', '2017-01-01', 'Phillip Gardner', '30438 Mariners Cove Way', null, 'Phu Khiao', null, '36110', 'Thailand', 3.03, 'Check', '2016-03-31', 'Shipped') +,(4210, 207, 30, '2017-03-08', '2016-07-21', 'Fred Howard', '45981 Hovde Trail', null, 'Suncheon', null, null, 'Finland', 1.13, 'Check', '2016-07-14', 'On Hold') +,(4211, 217, 57, '2016-05-28', '2017-03-11', 'George Wagner', '24863 Messerschmidt Road', null, 'Ningzhong', null, null, 'China', 6.5, 'Check', '2016-07-26', 'New') +,(4212, 213, 19, '2016-11-28', '2016-06-09', 'Clarence Russell', '85 Kropf Circle', null, 'Ouro Branco', null, '59347-000', 'Brazil', 6.88, 'Check', '2016-04-02', 'On Hold') +,(4213, 217, 51, '2016-06-25', '2016-05-25', 'Jane Johnston', '1708 Corscot Pass', null, 'Şafāshahr', null, null, 'Iran', 9.16, 'Cash', '2016-10-12', 'Complete') +,(4214, 203, 88, '2017-02-19', '2016-03-25', 'John Adams', '100 Hollow Ridge Way', null, 'Satita', null, null, 'India', 3.01, 'Cash', '2016-11-19', 'Shipped') +,(4215, 202, 12, '2017-01-26', '2016-10-07', 'Diana Graham', '12 Esch Park', null, 'Krasnokamensk', null, '662955', 'Russia', 9.29, 'Check', '2016-06-10', 'Shipped') +,(4216, 211, 66, '2016-07-19', '2016-11-30', 'John Henry', '448 Hanover Trail', null, 'Phitsanulok', null, '65000', 'Thailand', 7.23, 'Card', '2016-09-22', 'Shipped') +,(4217, 218, 98, '2016-11-20', '2016-11-12', 'Donna Bradley', '92136 Arkansas Avenue', null, 'Balong Wetan', null, null, 'Japan', 7.79, 'Card', '2016-12-18', 'New') +,(4218, 206, 5 , '2016-05-04', '2016-08-19', 'Kevin Harper', '2911 Laurel Point', null, 'Patapan', null, null, 'Japan', 1.52, 'Card', '2016-03-20', 'On Hold') +,(4219, 205, 76, '2016-11-15', '2016-12-12', 'Margaret Hanson', '9603 Northridge Junction', null, 'Mwembe', null, null, 'India', 4.76, 'Cash', '2017-03-14', 'Shipped') +,(4220, 206, 62, '2016-12-30', '2016-10-23', 'Henry Bradley', '84 Lake View Plaza', null, 'Zheleznovodsk', null, '357408', 'Russia', 8.08, 'Cash', '2017-02-23', 'Complete') +,(4221, 218, 91, '2016-08-07', '2016-08-31', 'Jane Fowler', '2484 Hoepker Hill', null, 'Huangcun', null, null, 'China', 9.34, 'Card', '2017-01-10', 'Complete') +,(4222, 207, 19, '2016-05-22', '2016-06-25', 'Kimberly Peterson', '5851 Carey Crossing', null, 'Pochuta', null, '04008', 'Japan', 9.16, 'Card', '2016-04-25', 'Shipped') +,(4223, 203, 69, '2017-02-13', '2016-09-18', 'Nicholas Simpson', '9 Hudson Way', null, 'Chashan', null, null, 'China', 5.37, 'Check', '2017-01-01', 'On Hold') +,(4224, 214, 71, '2017-02-28', '2016-06-18', 'Carol Rodriguez', '78 Grayhawk Place', null, 'Luntas', null, null, 'Indonesia', 1.76, 'Card', '2016-10-06', 'Shipped') +,(4225, 207, 34, '2017-03-06', '2016-07-20', 'Jessica Mason', '65 Merrick Lane', null, 'Křižanov', null, '789 01', 'Czech Republic', 9.75, 'Card', '2016-12-28', 'New') +,(4226, 209, 74, '2016-06-04', '2017-01-15', 'Jeffrey Sims', '05441 Wayridge Pass', null, 'Rennes', 'Bretagne', '35047 CEDEX 9', 'France', 9.09, 'Check', '2016-05-19', 'Shipped') +,(4227, 205, 74, '2016-09-09', '2017-01-06', 'Arthur Simmons', '733 Logan Circle', null, 'Dzhankoy', null, null, 'Ukraine', 2.51, 'Check', '2017-01-25', 'New') +,(4228, 207, 52, '2017-01-30', '2017-01-08', 'Kevin Williams', '3561 6th Trail', null, 'Narganá', null, null, 'Denmark', 7.32, 'Cash', '2016-06-24', 'On Hold') +,(4229, 209, 76, '2016-05-05', '2016-07-11', 'Joe Stewart', '0314 Ryan Parkway', null, 'San Jose', 'Oaxaca', '69570', 'Mexico', 9.28, 'Check', '2016-05-06', 'Shipped') +,(4230, 214, 2 , '2016-09-19', '2016-09-08', 'Walter Barnes', '80695 Stone Corner Road', null, 'Busdi', null, '6210', 'Philippines', 5.97, 'Check', '2016-07-19', 'Shipped') +,(4231, 211, 55, '2016-08-27', '2016-10-04', 'Sean Holmes', '91 Becker Drive', null, 'Gezan', null, null, 'China', 3.81, 'Check', '2016-06-14', 'Shipped') +,(4232, 209, 14, '2016-04-01', '2017-03-06', 'Sandra Perez', '45373 Buhler Park', null, 'Ust’-Kut', null, '162176', 'Russia', 4.25, 'Cash', '2017-01-22', 'Shipped') +,(4233, 205, 96, '2016-09-27', '2016-07-03', 'Sara Kelly', '73457 Buhler Court', null, 'Sima', null, null, 'Canada', 7.2, 'Card', '2016-12-14', 'Complete') +,(4234, 217, 74, '2016-11-22', '2017-01-18', 'Edward Reid', '02 Westport Trail', null, 'Tchaourou', null, null, 'India', 3.5, 'Cash', '2016-12-25', 'New') +,(4235, 206, 69, '2016-03-17', '2016-10-29', 'Betty Cook', '83578 Ohio Avenue', null, 'Stockholm', 'Stockholm', '101 22', 'Sweden', 6.17, 'Check', '2016-09-02', 'On Hold') +,(4236, 217, 97, '2017-02-06', '2016-07-01', 'Diana Ellis', '49 Jenna Circle', null, 'Yanshan', null, null, 'China', 6.06, 'Check', '2016-07-16', 'Complete') +,(4237, 216, 17, '2016-11-30', '2016-10-02', 'Donald Miller', '8581 Farragut Junction', null, 'Yosowilangun', null, null, 'Indonesia', 8.9, 'Check', '2016-11-01', 'Complete') +,(4238, 203, 21, '2017-02-09', '2016-12-14', 'Eric Coleman', '9242 Badeau Street', null, 'Caiyuan', null, null, 'China', 4.1, 'Check', '2016-06-07', 'Shipped') +,(4239, 213, 23, '2016-09-15', '2016-11-04', 'Heather Vasquez', '454 Gale Hill', null, 'Susoh', null, null, 'Indonesia', 1.59, 'Check', '2016-10-25', 'New') +,(4240, 208, 2 , '2016-05-28', '2016-05-21', 'Martin Sims', '30 Bunting Center', null, 'Efeng', null, null, 'China', 1.92, 'Cash', '2016-12-15', 'Complete') +,(4241, 202, 85, '2017-02-05', '2016-08-13', 'Catherine Washington', '637 Hermina Court', null, 'San Francisco', 'Jalisco', '46175', 'Mexico', 6.49, 'Card', '2016-12-20', 'On Hold') +,(4242, 204, 17, '2016-10-04', '2016-05-13', 'Gary Kennedy', '2 Grasskamp Point', null, 'Famaillá', null, '4132', 'Argentina', 9.78, 'Card', '2016-12-03', 'Complete') +,(4243, 205, 86, '2016-04-15', '2016-05-25', 'Pamela Parker', '43642 Utah Point', null, 'Santa Rosa', 'Nuevo Leon', '67803', 'Mexico', 1.78, 'Card', '2017-02-16', 'Shipped') +,(4244, 208, 3 , '2016-08-02', '2017-03-13', 'Michelle Russell', '947 Jenna Place', null, 'Kinshasa', null, null, 'Canada', 8.43, 'Cash', '2016-04-13', 'New') +,(4245, 210, 32, '2016-06-16', '2016-07-14', 'Lois Jenkins', '1 Pepper Wood Road', null, 'Kallinge', 'Blekinge', '372 53', 'Sweden', 4.77, 'Cash', '2016-03-17', 'On Hold') +,(4246, 203, 39, '2017-02-04', '2016-08-08', 'Kelly Ramirez', '20490 Eagle Crest Circle', null, 'Baraba', null, '623509', 'Russia', 8.65, 'Cash', '2016-10-04', 'Complete') +,(4247, 202, 24, '2016-05-05', '2016-11-26', 'Harold Gray', '9033 Elmside Plaza', null, 'N’dalatando', null, null, 'Netherlands', 2.78, 'Cash', '2016-07-24', 'New') +,(4248, 210, 16, '2017-01-27', '2017-03-14', 'Dennis Fisher', '4 Sage Road', null, 'Niederanven', null, 'L-6948', 'United Kingdom', 1.26, 'Check', '2016-05-12', 'On Hold') +,(4249, 203, 20, '2016-07-21', '2016-12-08', 'Antonio Wells', '99743 Algoma Hill', null, 'Mūdīyah', null, null, 'South Africa', 4.36, 'Card', '2016-05-28', 'Complete') +,(4250, 217, 88, '2016-05-31', '2016-10-17', 'William Gonzales', '3258 Holy Cross Way', null, 'Yangdun', null, null, 'China', 7.06, 'Check', '2016-04-13', 'New') +,(4251, 211, 1 , '2017-03-04', '2016-10-27', 'Ronald Ward', '5 Logan Terrace', null, 'Tanahmerah', null, null, 'Indonesia', 4.38, 'Card', '2016-09-22', 'On Hold') +,(4252, 217, 87, '2016-12-29', '2016-09-18', 'Gloria Boyd', '10 Grayhawk Hill', null, 'Boromlya', null, null, 'Ukraine', 4.84, 'Cash', '2016-08-01', 'On Hold') +,(4253, 212, 99, '2017-02-02', '2016-04-28', 'Raymond Scott', '3 Donald Trail', null, 'Lakshmīpur', null, '1553', 'Canada', 8.37, 'Cash', '2016-12-06', 'On Hold') +,(4254, 201, 7 , '2016-11-28', '2016-04-11', 'Arthur Hamilton', '95 Doe Crossing Avenue', null, 'Purwosari', null, null, 'Indonesia', 6.84, 'Card', '2016-06-14', 'Shipped') +,(4255, 220, 100,'2016-09-30', '2016-10-08', 'Jean Wagner', '5690 Meadow Valley Alley', null, 'Svedala', 'Skåne', '233 94', 'Sweden', 8.57, 'Check', '2017-01-06', 'Shipped') +,(4256, 218, 78, '2016-04-28', '2016-04-03', 'Kimberly Rose', '6067 Twin Pines Hill', null, 'Capinzal', null, '89665-000', 'Brazil', 6.07, 'Check', '2016-05-18', 'New') +,(4257, 213, 44, '2016-11-04', '2016-03-28', 'Doris Foster', '170 Chive Court', null, 'Lang', null, null, 'China', 1.72, 'Card', '2016-10-20', 'Shipped') +,(4258, 208, 46, '2017-01-11', '2016-09-25', 'Teresa Reynolds', '3 Prairie Rose Alley', null, 'Tashang', null, null, 'China', 4.84, 'Card', '2016-10-16', 'On Hold') +,(4259, 215, 89, '2016-07-07', '2016-12-29', 'Christine Turner', '0746 Heffernan Center', null, 'Henggang', null, null, 'China', 6.81, 'Cash', '2016-08-21', 'New') +,(4260, 210, 23, '2016-10-26', '2017-02-10', 'Jimmy Jordan', '903 Anniversary Trail', null, 'Elaiochóri', null, null, 'Greece', 9.66, 'Cash', '2017-01-10', 'Complete') +,(4261, 207, 20, '2016-11-07', '2017-02-17', 'Andrew Baker', '3 Pennsylvania Park', null, 'Kansas City', 'Missouri', '64130', 'United States', 5.46, 'Cash', '2016-11-20', 'Complete') +,(4262, 203, 32, '2017-02-21', '2016-11-17', 'Diana Dixon', '18520 Maryland Drive', null, 'Santa Catalina', null, '2701', 'Philippines', 4.66, 'Card', '2017-01-09', 'On Hold') +,(4263, 210, 10, '2017-02-28', '2017-02-26', 'Karen Miller', '5608 Moose Court', null, 'Torres Vedras', 'Lisboa', '2560-234', 'Portugal', 5.71, 'Card', '2016-11-30', 'New') +,(4264, 214, 39, '2017-01-09', '2016-10-24', 'Angela Austin', '9659 Vera Point', null, 'Santiaoshi', null, null, 'China', 6.59, 'Check', '2016-05-07', 'Shipped') +,(4265, 203, 3 , '2016-11-11', '2016-11-22', 'Steve Snyder', '7626 Hoepker Junction', null, 'Wulan Hada', null, null, 'China', 5.67, 'Cash', '2017-01-01', 'New') +,(4266, 218, 94, '2016-04-06', '2016-10-02', 'Kevin Daniels', '24 Chinook Point', null, 'Bhairāhawā', null, null, 'United Kingdom', 8.21, 'Card', '2016-05-12', 'Shipped') +,(4267, 203, 58, '2016-11-14', '2016-03-28', 'Patricia Welch', '60375 Corry Street', null, 'Solidaridad', 'Veracruz Llave', '94330', 'Mexico', 2.77, 'Card', '2017-02-02', 'On Hold') +,(4268, 218, 2 , '2016-07-02', '2016-08-14', 'Wanda Reynolds', '965 Calypso Circle', null, 'Dera Bugti', null, '80100', 'Iran', 8.86, 'Check', '2017-01-30', 'On Hold') +,(4269, 216, 47, '2017-03-11', '2016-07-16', 'Harold Williamson', '14332 Texas Junction', null, 'Mzimba', null, null, 'India', 2.47, 'Cash', '2016-06-01', 'Shipped') +,(4270, 213, 62, '2016-11-09', '2017-02-07', 'Juan Fox', '17 Eagan Crossing', null, 'Xiayang', null, null, 'China', 7.63, 'Card', '2017-02-17', 'Shipped') +,(4271, 211, 70, '2016-04-16', '2016-04-26', 'Ryan Long', '0 Harper Circle', null, 'Blagoveshchenka', null, '658670', 'Russia', 3.2, 'Card', '2016-09-10', 'Complete') +,(4272, 206, 29, '2016-03-25', '2016-10-07', 'Frank Cole', '07 Westend Place', null, 'Laixi', null, null, 'China', 1.93, 'Cash', '2016-05-01', 'New') +,(4273, 209, 25, '2016-05-06', '2016-04-13', 'Tammy Wilson', '74278 Grim Pass', null, 'Åkersberga', 'Stockholm', '184 70', 'Sweden', 2.83, 'Card', '2016-10-29', 'Complete') +,(4274, 206, 82, '2017-02-07', '2017-03-06', 'Joan Gonzales', '40 Stephen Street', null, 'Tlogoagung', null, null, 'Indonesia', 3.44, 'Check', '2016-10-14', 'Complete') +,(4275, 203, 91, '2016-10-10', '2016-11-04', 'Jeffrey Hughes', '38 Toban Plaza', null, 'Privas', 'Rhône-Alpes', '07004 CEDEX', 'France', 8.33, 'Card', '2016-04-23', 'On Hold') +,(4276, 210, 89, '2016-05-14', '2016-09-03', 'Rachel Martin', '08 Lake View Hill', null, 'Sandgerði', null, '245', 'India', 2.07, 'Cash', '2016-06-07', 'Complete') +,(4277, 208, 97, '2016-04-06', '2016-07-02', 'Laura Harper', '1 Dexter Street', null, 'Xintaimen', null, null, 'China', 8.08, 'Check', '2016-05-11', 'Shipped') +,(4278, 215, 3 , '2017-03-04', '2017-03-08', 'Annie Rivera', '5975 Debra Park', null, 'Canchaque', null, null, 'Peru', 5.65, 'Check', '2016-04-09', 'Complete') +,(4279, 201, 6 , '2017-03-01', '2016-08-06', 'Pamela Graham', '2 Monument Avenue', null, 'Danxi', null, null, 'China', 2.05, 'Check', '2016-05-23', 'New') +,(4280, 202, 35, '2017-02-04', '2016-06-09', 'Joseph Jenkins', '00001 Fairfield Center', null, 'Mashtūl as Sūq', null, null, 'Germany', 5.32, 'Card', '2016-12-28', 'New') +,(4281, 203, 76, '2016-05-19', '2016-07-29', 'Eugene Garcia', '8308 Onsgard Lane', null, 'Limoncito', null, null, 'India', 4.07, 'Card', '2016-10-20', 'Shipped') +,(4282, 204, 27, '2016-07-20', '2016-09-26', 'Kevin Anderson', '8 Thierer Center', null, 'Saint-Étienne', 'Rhône-Alpes', '42963 CEDEX 9', 'France', 4.88, 'Card', '2016-07-21', 'Complete') +,(4283, 214, 50, '2016-11-27', '2016-06-14', 'Robin Parker', '51949 Forster Parkway', null, 'Laval', 'Pays de la Loire', '53009 CEDEX', 'France', 1.04, 'Check', '2016-04-20', 'Complete') +,(4284, 214, 74, '2016-11-29', '2016-12-08', 'Kelly Palmer', '2 Hauk Hill', null, 'Östersund', 'Jämtland', '831 17', 'Sweden', 4.26, 'Card', '2016-10-08', 'Complete') +,(4285, 214, 76, '2016-10-22', '2016-05-05', 'Diane Freeman', '5441 Petterle Way', null, 'El Tambo', null, null, 'Peru', 7.17, 'Check', '2016-09-27', 'New') +,(4286, 209, 96, '2016-11-08', '2016-08-26', 'Kathleen Adams', '423 Talisman Point', null, 'Kurume', null, '963-8846', 'Japan', 1.99, 'Cash', '2016-05-19', 'On Hold') +,(4287, 204, 76, '2016-10-18', '2017-01-15', 'Teresa Mendoza', '818 Atwood Lane', null, 'Mosteiro', 'Viana do Castelo', '4980-125', 'Portugal', 3.29, 'Cash', '2016-10-03', 'On Hold') +,(4288, 210, 45, '2016-10-15', '2016-12-14', 'Irene Anderson', '4 Rutledge Alley', null, 'Saparua', null, null, 'Indonesia', 4.35, 'Card', '2016-10-13', 'On Hold') +,(4289, 209, 61, '2017-02-12', '2016-07-15', 'Terry Bennett', '351 Johnson Circle', null, 'Quiling', null, '2902', 'Philippines', 6.77, 'Card', '2016-07-20', 'New') +,(4290, 203, 1 , '2017-03-02', '2016-08-25', 'Ronald Mccoy', '73609 Waywood Center', null, 'Zheleznodorozhnyy', null, '238411', 'Russia', 1.05, 'Cash', '2016-06-10', 'New') +,(4291, 211, 73, '2016-09-13', '2016-04-17', 'Andrew Matthews', '820 Lawn Crossing', null, 'Japeri', null, '26400-000', 'Brazil', 1.22, 'Cash', '2016-09-08', 'New') +,(4292, 215, 15, '2016-12-26', '2016-10-04', 'Melissa Chapman', '88384 Ohio Park', null, 'Dayr al Ghuşūn', null, null, 'India', 9.89, 'Check', '2016-08-14', 'Shipped') +,(4293, 210, 18, '2016-11-23', '2016-12-12', 'Russell Griffin', '6 Eliot Lane', null, 'Changshu City', null, null, 'China', 9.37, 'Check', '2016-05-10', 'On Hold') +,(4294, 206, 95, '2016-06-24', '2017-01-21', 'Jeffrey Gray', '04078 Hudson Drive', null, 'Luangwa', null, null, 'India', 2.58, 'Cash', '2016-06-15', 'Shipped') +,(4295, 215, 85, '2016-10-23', '2017-01-29', 'Lori Frazier', '724 Logan Drive', null, 'Gent', 'Vlaanderen', '9052', 'Denmark', 8.59, 'Cash', '2017-01-01', 'New') +,(4296, 217, 83, '2016-04-08', '2017-02-07', 'Joan Ortiz', '90 Merchant Avenue', null, 'Irasan', null, '3120', 'Philippines', 4.64, 'Card', '2016-09-01', 'Complete') +,(4297, 211, 29, '2016-07-13', '2017-02-06', 'John Stanley', '680 Artisan Pass', null, 'Borås', 'Västra Götaland', '504 75', 'Sweden', 1.77, 'Cash', '2016-07-12', 'On Hold') +,(4298, 208, 65, '2016-12-28', '2016-04-19', 'Dorothy Bell', '397 Kim Place', null, 'Zhongxin', null, null, 'China', 1.2, 'Check', '2017-01-28', 'On Hold') +,(4299, 201, 43, '2017-01-12', '2016-08-07', 'Doris Ramirez', '181 Prentice Terrace', null, 'Severnyy', null, '141707', 'Russia', 2.65, 'Card', '2016-08-13', 'Shipped') +,(4300, 207, 27, '2016-11-10', '2016-11-01', 'Elizabeth Harrison', '067 Talisman Trail', null, 'Guangang', null, null, 'China', 4.78, 'Check', '2016-04-30', 'On Hold') +,(4301, 206, 64, '2016-08-14', '2017-01-13', 'Judith Howard', '55095 Sloan Alley', null, 'Longhua', null, null, 'China', 1.93, 'Card', '2016-10-29', 'New') +,(4302, 213, 33, '2017-01-19', '2016-05-23', 'Julia Simpson', '87375 Londonderry Parkway', null, 'Fufang', null, null, 'China', 9.23, 'Card', '2016-11-15', 'Shipped') +,(4303, 220, 49, '2016-08-01', '2016-04-23', 'Elizabeth Bell', '60 Ridgeview Trail', null, 'Infantas', 'Braga', '4810-578', 'Portugal', 3.22, 'Check', '2017-02-01', 'Complete') +,(4304, 217, 56, '2016-09-07', '2016-08-13', 'Ernest Andrews', '231 Graceland Terrace', null, 'Pindamonhangaba', null, '12400-000', 'Brazil', 2.77, 'Card', '2016-04-04', 'On Hold') +,(4305, 219, 44, '2016-06-11', '2016-03-27', 'Jeffrey Lopez', '76434 Havey Court', null, 'Khvalovo', null, '187435', 'Russia', 8.84, 'Cash', '2016-04-14', 'Shipped') +,(4306, 212, 16, '2016-05-29', '2016-12-31', 'Ralph Weaver', '15 Armistice Alley', null, 'Odienné', null, null, 'Canada', 7.1, 'Card', '2017-01-09', 'Shipped') +,(4307, 210, 16, '2016-10-19', '2017-01-10', 'Mary Stevens', '1928 Aberg Park', null, 'Dzwola', null, '23-304', 'Poland', 4.04, 'Card', '2016-08-24', 'Complete') +,(4308, 220, 50, '2016-09-23', '2016-09-16', 'Douglas Welch', '9 Ryan Circle', null, 'Babakanloa', null, null, 'Indonesia', 1.11, 'Card', '2016-10-13', 'Shipped') +,(4309, 217, 99, '2016-10-17', '2017-01-01', 'Raymond Cruz', '0402 Burning Wood Alley', null, 'Bucay', null, '2805', 'Philippines', 9.27, 'Cash', '2016-06-02', 'Complete') +,(4310, 219, 65, '2016-04-14', '2016-05-14', 'Sara Frazier', '43 Truax Terrace', null, 'Halton', 'England', 'LS9', 'United Kingdom', 5.56, 'Check', '2016-12-04', 'New') +,(4311, 220, 17, '2017-02-03', '2016-07-09', 'Sarah Lane', '414 Gina Point', null, 'Fulong', null, null, 'China', 3.35, 'Cash', '2016-12-27', 'New') +,(4312, 205, 77, '2017-02-27', '2016-04-10', 'Michelle Bradley', '16664 Towne Point', null, 'Yangchun', null, null, 'China', 8.64, 'Cash', '2017-01-28', 'Complete') +,(4313, 210, 68, '2016-08-29', '2016-10-27', 'Marie Porter', '7802 Hovde Plaza', null, 'Redakodi', null, null, 'Indonesia', 1.97, 'Cash', '2016-11-08', 'Complete') +,(4314, 207, 41, '2016-08-08', '2016-08-31', 'Melissa Moore', '438 Mendota Way', null, 'Bensonville', null, null, 'United Kingdom', 7.97, 'Cash', '2017-01-17', 'New') +,(4315, 212, 96, '2016-08-08', '2016-07-27', 'Katherine Bell', '76 Manley Park', null, 'Xagmakajor', null, null, 'China', 7.49, 'Cash', '2016-03-29', 'New') +,(4316, 209, 67, '2016-09-26', '2017-02-03', 'Katherine Elliott', '86 Nelson Point', null, 'Boavista', 'Aveiro', '4520-104', 'Portugal', 1.92, 'Card', '2016-04-28', 'Complete') +,(4317, 219, 40, '2016-10-09', '2016-12-21', 'Dorothy Rose', '75962 Basil Drive', null, 'Pécs', 'Baranya', '7610', 'Denmark', 3.23, 'Card', '2017-02-21', 'Shipped') +,(4318, 209, 68, '2017-01-15', '2017-01-03', 'Larry Hicks', '5985 Crest Line Road', null, 'Lingqiao', null, null, 'China', 2.77, 'Check', '2017-01-20', 'Complete') +,(4319, 214, 55, '2016-07-14', '2017-03-05', 'Paula Rodriguez', '6 Lawn Court', null, 'Simajia', null, null, 'China', 6.33, 'Check', '2016-04-08', 'Shipped') +,(4320, 203, 83, '2016-12-26', '2016-10-07', 'Sharon Richards', '43297 Rigney Avenue', null, 'Salto', null, null, 'India', 7.32, 'Check', '2016-09-14', 'Complete') +,(4321, 215, 29, '2016-12-27', '2016-07-21', 'Craig Day', '22 Thierer Center', null, 'Alberton', 'Prince Edward Island', 'P7K', 'Canada', 5.32, 'Check', '2016-04-02', 'On Hold') +,(4322, 207, 80, '2016-12-06', '2016-05-21', 'Donna Butler', '4149 Bartelt Point', null, 'Carbonear', 'Newfoundland and Labrador', 'A1Y', 'Canada', 3.1, 'Check', '2016-10-03', 'New') +,(4323, 216, 31, '2016-06-27', '2017-03-13', 'Carolyn Ferguson', '97225 Bartelt Avenue', null, 'Tinalmud', null, '1531', 'Philippines', 7.11, 'Cash', '2016-05-22', 'Complete') +,(4324, 212, 78, '2016-05-19', '2016-11-14', 'Peter Romero', '22977 Westridge Terrace', null, 'Toulouse', 'Midi-Pyrénées', '31029 CEDEX 4', 'France', 2.97, 'Check', '2016-09-09', 'Shipped') +,(4325, 213, 73, '2017-02-18', '2016-09-22', 'Jose Greene', '40351 Rusk Place', null, 'Vila Nova de Gaia', 'Porto', '4400-005', 'Portugal', 5.76, 'Cash', '2016-12-12', 'Shipped') +,(4326, 208, 62, '2017-02-14', '2016-11-13', 'Betty Anderson', '8403 Melody Center', null, 'Būsh', null, null, 'Germany', 9.56, 'Check', '2016-10-08', 'Shipped') +,(4327, 220, 56, '2016-09-06', '2016-08-17', 'Amanda Frazier', '47 Dapin Center', null, 'Pasirmanggu', null, null, 'Indonesia', 2.25, 'Card', '2016-07-11', 'On Hold') +,(4328, 201, 24, '2016-10-29', '2017-01-25', 'Douglas Foster', '6953 Stoughton Avenue', null, 'Bokhan', null, '669310', 'Russia', 1.26, 'Card', '2016-07-06', 'Complete') +,(4329, 206, 33, '2017-03-09', '2017-03-12', 'Louis Brown', '76 Little Fleur Park', null, 'Shazhenxi', null, null, 'China', 3.4, 'Check', '2016-08-09', 'Complete') +,(4330, 205, 61, '2016-04-14', '2016-09-26', 'Elizabeth Butler', '82 Springview Road', null, 'Kimito', null, '11710', 'Finland', 1.92, 'Card', '2016-10-18', 'Shipped') +,(4331, 220, 39, '2016-06-10', '2016-04-07', 'Albert Flores', '19 Talmadge Hill', null, 'Almelo', 'Provincie Overijssel', '7604', 'Netherlands', 4.23, 'Check', '2016-12-15', 'Shipped') +,(4332, 217, 47, '2016-10-25', '2016-09-28', 'Kimberly Fowler', '0 Trailsway Crossing', null, 'Iwata', null, '925-0145', 'Japan', 8.14, 'Check', '2016-06-06', 'On Hold') +,(4333, 209, 12, '2016-12-25', '2016-10-31', 'Joe Powell', '5 Everett Drive', null, 'Bergen', 'Hordaland', '5895', 'Greece', 8.02, 'Cash', '2016-09-05', 'Shipped') +,(4334, 219, 1 , '2016-08-12', '2017-02-18', 'Virginia Collins', '78693 Cordelia Point', null, 'San Benito', null, '8423', 'Philippines', 8.4, 'Cash', '2017-01-06', 'Complete') +,(4335, 220, 59, '2017-02-26', '2016-11-05', 'Mary Howard', '5 Golf View Street', null, 'Gjinkar', null, null, 'Canada', 3.54, 'Card', '2016-06-09', 'Complete') +,(4336, 220, 19, '2017-02-09', '2017-01-26', 'Ronald Stevens', '57 Old Shore Crossing', null, 'Bureng', null, null, 'United Kingdom', 8.21, 'Card', '2016-12-21', 'On Hold') +,(4337, 204, 59, '2016-05-14', '2016-07-08', 'James Evans', '44078 Warner Drive', null, 'Amurzet', null, '679230', 'Russia', 9.35, 'Card', '2016-07-22', 'Complete') +,(4338, 213, 96, '2016-09-02', '2016-11-10', 'Willie Snyder', '361 Stone Corner Pass', null, 'Sindangsari', null, null, 'Indonesia', 9.32, 'Check', '2016-04-10', 'Complete') +,(4339, 220, 30, '2017-03-04', '2016-08-16', 'Julie Black', '2922 Grasskamp Alley', null, 'Cotonou', null, null, 'India', 9.14, 'Cash', '2017-03-07', 'Shipped') +,(4340, 206, 17, '2016-11-18', '2016-11-24', 'Roy Olson', '4 Shopko Hill', null, 'Binagadi', null, null, 'India', 5.22, 'Check', '2016-10-14', 'Shipped') +,(4341, 202, 28, '2016-11-18', '2017-02-18', 'Evelyn Lawrence', '90 Crownhardt Center', null, 'Bayshint', null, null, 'Japan', 7.25, 'Check', '2016-12-16', 'On Hold') +,(4342, 209, 37, '2016-10-30', '2016-06-07', 'John Rodriguez', '69 Golf View Avenue', null, 'Hezuoqiao', null, null, 'China', 8.23, 'Cash', '2016-11-05', 'On Hold') +,(4343, 203, 51, '2016-04-09', '2016-12-17', 'Ruth Kim', '0027 Dunning Pass', null, 'Kuteynykove', null, null, 'Ukraine', 2.46, 'Cash', '2016-03-28', 'New') +,(4344, 217, 34, '2016-12-16', '2016-10-11', 'Shawn Patterson', '36 Little Fleur Circle', null, 'Xiekou', null, null, 'China', 6.43, 'Cash', '2016-03-27', 'New') +,(4345, 213, 59, '2016-10-30', '2016-07-10', 'Nancy Jones', '47088 Crowley Junction', null, 'Promna', null, '26-803', 'Poland', 5.67, 'Cash', '2016-12-02', 'Complete') +,(4346, 217, 70, '2016-12-27', '2016-10-06', 'Deborah Bishop', '1 Summer Ridge Circle', null, 'Bunobogu', null, null, 'Indonesia', 7.57, 'Cash', '2016-09-19', 'New') +,(4347, 203, 30, '2016-05-26', '2016-08-14', 'Steve Hunt', '4393 Summer Ridge Crossing', null, 'Hošťka', null, '348 06', 'Czech Republic', 5.78, 'Cash', '2016-12-30', 'Shipped') +,(4348, 203, 9 , '2016-04-14', '2016-10-19', 'Betty Black', '23 Nova Junction', null, 'Sępólno Krajeńskie', null, '89-400', 'Poland', 8.55, 'Cash', '2016-09-23', 'New') +,(4349, 211, 95, '2017-01-28', '2016-04-13', 'Gregory Wood', '96 Grasskamp Point', null, 'Psará', null, null, 'Greece', 8.47, 'Cash', '2016-12-18', 'Shipped') +,(4350, 218, 97, '2016-03-22', '2016-04-13', 'Martin Martinez', '5 Towne Crossing', null, 'Kista', 'Stockholm', '164 45', 'Sweden', 8.07, 'Check', '2016-05-15', 'On Hold') +,(4351, 215, 80, '2016-06-20', '2016-11-05', 'Margaret Cook', '82 Eggendart Junction', null, 'Omuthiya', null, null, 'India', 9.71, 'Cash', '2016-09-18', 'Shipped') +,(4352, 211, 15, '2016-09-02', '2017-01-23', 'Justin Myers', '6734 Continental Drive', null, 'Tadabliro', null, null, 'Indonesia', 2.23, 'Cash', '2016-05-12', 'New') +,(4353, 216, 77, '2016-10-09', '2016-07-31', 'Jane Ruiz', '2743 Harbort Center', null, 'Pasar', null, null, 'Indonesia', 4.88, 'Cash', '2016-06-04', 'New') +,(4354, 202, 53, '2017-03-15', '2016-06-21', 'Philip Bradley', '6 Bartillon Park', null, 'Aimorés', null, '35200-000', 'Brazil', 5.01, 'Cash', '2016-05-16', 'New') +,(4355, 220, 14, '2017-01-03', '2016-05-07', 'Phillip White', '1 Schurz Crossing', null, 'Tuzhai', null, null, 'China', 7.06, 'Check', '2016-10-18', 'New') +,(4356, 208, 85, '2016-12-26', '2016-07-28', 'George Ryan', '92 Morrow Road', null, 'Nijmegen', 'Provincie Gelderland', '6519', 'Netherlands', 5.76, 'Cash', '2016-12-14', 'New') +,(4357, 208, 73, '2016-04-06', '2016-04-01', 'Evelyn Rose', '134 Milwaukee Lane', null, 'Tiechang', null, null, 'China', 5.37, 'Cash', '2016-12-19', 'Shipped') +,(4358, 202, 77, '2016-04-14', '2016-10-21', 'Janet Robertson', '09309 Dottie Park', null, 'Ljubešćica', null, '42222', 'Canada', 5.27, 'Cash', '2016-06-07', 'On Hold') +,(4359, 202, 35, '2016-05-08', '2017-01-27', 'Diana Perry', '95535 Lotheville Center', null, 'Kvasice', null, '768 21', 'Czech Republic', 7.1, 'Card', '2016-07-27', 'New') +,(4360, 210, 86, '2016-11-23', '2016-10-12', 'Todd Elliott', '6737 Melrose Road', null, 'Catumbela', null, null, 'Netherlands', 2.19, 'Check', '2016-04-05', 'Shipped') +,(4361, 209, 45, '2016-04-07', '2016-06-30', 'Emily Dean', '143 Ridge Oak Alley', null, 'Diriá', null, null, 'United Kingdom', 1.33, 'Cash', '2016-12-31', 'Complete') +,(4362, 208, 88, '2016-05-08', '2016-04-14', 'Eric Simpson', '8113 Graceland Junction', null, 'Borovoy', null, '309135', 'Russia', 3.81, 'Card', '2016-06-21', 'Shipped') +,(4363, 211, 84, '2016-12-31', '2016-06-05', 'Alan Chapman', '461 Westport Center', null, 'Inayauan', null, '3336', 'Philippines', 8.62, 'Card', '2017-03-03', 'Complete') +,(4364, 205, 100,'2016-09-10', '2017-02-19', 'Denise Dixon', '066 Gerald Avenue', null, 'Venëv', null, '301320', 'Russia', 4.82, 'Check', '2016-04-22', 'Shipped') +,(4365, 211, 7 , '2017-03-09', '2017-03-16', 'Douglas Nelson', '03051 Grasskamp Way', null, 'Póvoa', 'Vila Real', '4870-130', 'Portugal', 1.67, 'Check', '2016-08-30', 'Complete') +,(4366, 213, 24, '2016-04-25', '2016-06-06', 'Louis Frazier', '65 Buhler Circle', null, 'Bīleh Savār', null, null, 'Iran', 9.53, 'Check', '2016-12-20', 'Complete') +,(4367, 207, 8 , '2016-09-24', '2016-04-06', 'Theresa Stanley', '487 Birchwood Point', null, 'T’et’ri Tsqaro', null, null, 'United Kingdom', 5.06, 'Cash', '2016-04-08', 'New') +,(4368, 207, 76, '2016-12-21', '2016-05-03', 'Sean Chapman', '3917 Miller Pass', null, 'Andaray', null, null, 'Peru', 4.36, 'Check', '2016-07-25', 'New') +,(4369, 215, 90, '2016-03-30', '2017-01-03', 'Eugene Brooks', '137 1st Hill', null, 'Independencia', 'Tamaulipas', '89888', 'Mexico', 9.56, 'Check', '2017-01-23', 'Shipped') +,(4370, 204, 33, '2016-12-17', '2016-10-22', 'Joan Martin', '24 Hayes Point', null, 'Dobrzeń Wielki', null, '46-081', 'Poland', 8.87, 'Cash', '2016-07-09', 'Shipped') +,(4371, 204, 13, '2016-12-11', '2016-05-07', 'Martha Mendoza', '0 Sommers Point', null, 'Jiamachi', null, null, 'China', 1.53, 'Check', '2016-08-05', 'On Hold') +,(4372, 211, 90, '2016-10-27', '2017-02-14', 'Joan Allen', '64 Bluestem Drive', null, 'Conde', 'Braga', '4815-019', 'Portugal', 2.66, 'Card', '2016-09-25', 'Shipped') +,(4373, 208, 81, '2016-08-20', '2017-03-16', 'Tammy Richards', '15541 Ramsey Alley', null, 'Gunungkendeng', null, null, 'Indonesia', 5.66, 'Cash', '2016-05-03', 'Shipped') +,(4374, 216, 19, '2017-01-22', '2016-09-10', 'Andrea Medina', '3 Goodland Pass', null, 'Ḩarīb', null, null, 'South Africa', 1.03, 'Card', '2016-10-12', 'Shipped') +,(4375, 213, 8 , '2016-09-13', '2016-12-21', 'Antonio Carpenter', '453 Duke Point', null, 'Rouen', 'Haute-Normandie', '76029 CEDEX', 'France', 5.11, 'Cash', '2017-01-26', 'Complete') +,(4376, 207, 83, '2016-11-29', '2016-04-13', 'Jeffrey Smith', '7 Old Shore Center', null, 'Licuan', null, '2500', 'Philippines', 8.55, 'Cash', '2016-11-08', 'New') +,(4377, 216, 13, '2016-11-06', '2016-10-08', 'Mark Perkins', '57 Troy Court', null, 'Mojimán', null, null, 'Canada', 2.03, 'Card', '2017-01-06', 'Shipped') +,(4378, 219, 4 , '2016-08-05', '2017-03-04', 'Louis Jordan', '5 Armistice Street', null, 'Labège', 'Midi-Pyrénées', '31673 CEDEX', 'France', 3.61, 'Cash', '2016-12-07', 'New') +,(4379, 218, 66, '2017-02-26', '2016-11-18', 'Fred Johnson', '4 Dovetail Crossing', null, 'Santa Cruz', null, null, 'India', 1.08, 'Cash', '2016-04-02', 'Complete') +,(4380, 201, 27, '2016-09-01', '2016-05-08', 'Rose Harvey', '8 Canary Plaza', null, 'Pingtan', null, null, 'China', 6.9, 'Check', '2016-12-09', 'Complete') +,(4381, 209, 89, '2017-02-04', '2016-08-30', 'Christine Thomas', '008 Carberry Alley', null, 'Logung', null, null, 'Indonesia', 6.13, 'Card', '2016-05-09', 'On Hold') +,(4382, 204, 47, '2016-08-11', '2016-12-27', 'Juan Reed', '4337 Del Sol Hill', null, 'Dayeuhluhur', null, null, 'Indonesia', 7.76, 'Card', '2016-06-15', 'New') +,(4383, 215, 30, '2016-08-07', '2016-07-22', 'Diane Gray', '899 Oneill Pass', null, 'Alegrete', null, '97540-000', 'Brazil', 5.62, 'Cash', '2016-12-26', 'Complete') +,(4384, 212, 88, '2016-07-23', '2016-05-07', 'Louise Baker', '46092 Kedzie Court', null, 'Ban Mo', null, '18130', 'Thailand', 4.0, 'Card', '2016-07-11', 'Complete') +,(4385, 203, 62, '2017-02-20', '2016-10-01', 'Paul Thompson', '77444 Northwestern Pass', null, 'Francisco I Madero', 'Coahuila De Zaragoza', '26010', 'Mexico', 3.99, 'Check', '2016-12-23', 'Shipped') +,(4386, 218, 26, '2016-09-02', '2016-06-10', 'Anne Kim', '67814 Buena Vista Court', null, 'Sanjie', null, null, 'China', 9.61, 'Card', '2016-04-05', 'New') +,(4387, 219, 20, '2017-03-05', '2016-12-19', 'Matthew Gutierrez', '33055 Evergreen Crossing', null, 'Cusco', null, null, 'Peru', 6.52, 'Check', '2017-02-17', 'Shipped') +,(4388, 219, 71, '2016-09-06', '2016-05-24', 'Janet Hernandez', '9243 Forest Run Parkway', null, 'Ulanov', null, null, 'Ukraine', 3.04, 'Cash', '2016-09-20', 'New') +,(4389, 207, 2 , '2016-04-25', '2017-02-16', 'Louis Chapman', '878 Roth Alley', null, 'Kusak', null, '423430', 'Russia', 5.78, 'Cash', '2017-02-18', 'On Hold') +,(4390, 218, 64, '2016-09-25', '2016-09-22', 'Joe Carpenter', '56 Artisan Park', null, 'Xinjiang', null, null, 'China', 8.2, 'Card', '2016-12-01', 'On Hold') +,(4391, 218, 64, '2016-07-30', '2016-07-23', 'Charles Harper', '7 Sutherland Road', null, 'Tatarbunary', null, null, 'Ukraine', 4.62, 'Cash', '2016-06-29', 'Shipped') +,(4392, 206, 92, '2016-05-05', '2016-07-17', 'Craig Reynolds', '3 Erie Park', null, 'East End', null, null, 'Canada', 2.03, 'Check', '2017-02-03', 'New') +,(4393, 212, 45, '2016-06-29', '2016-06-17', 'Raymond Mcdonald', '792 Brown Trail', null, 'Yangfang', null, null, 'China', 4.44, 'Card', '2017-02-27', 'Complete') +,(4394, 211, 87, '2016-09-28', '2016-04-03', 'Sandra Medina', '7 Eagan Circle', null, 'Baratleke', null, null, 'Indonesia', 4.34, 'Cash', '2017-01-05', 'Complete') +,(4395, 203, 57, '2016-08-18', '2017-03-05', 'Sean Carpenter', '33 Dottie Park', null, 'Sokal’', null, null, 'Ukraine', 5.39, 'Cash', '2017-02-22', 'On Hold') +,(4396, 203, 87, '2016-06-19', '2016-07-10', 'Alice Ferguson', '0399 Dixon Hill', null, 'Privolzhskiy', null, '413138', 'Russia', 8.74, 'Cash', '2016-12-23', 'New') +,(4397, 216, 61, '2016-08-01', '2016-12-25', 'Diana Nguyen', '5052 Rigney Junction', null, 'Guaynabo', 'Pr', '00971', 'Germany', 5.36, 'Check', '2016-07-12', 'On Hold') +,(4398, 211, 52, '2016-12-04', '2016-05-11', 'Earl Gutierrez', '32 Summit Avenue', null, 'Maqbanah', null, null, 'South Africa', 5.82, 'Cash', '2016-07-21', 'New') +,(4399, 208, 71, '2016-05-16', '2017-02-25', 'Gloria Gordon', '5 Prentice Trail', null, 'Xichang', null, null, 'China', 3.2, 'Card', '2016-05-24', 'Complete') +,(4400, 218, 7 , '2016-09-06', '2016-03-21', 'Robert Wheeler', '83 Logan Circle', null, 'Zhongshan', null, null, 'China', 9.15, 'Cash', '2016-08-16', 'Shipped') +,(4401, 210, 53, '2016-09-05', '2016-05-01', 'Walter Williamson', '8459 American Plaza', null, 'Santo Rosario', null, '3114', 'Philippines', 7.71, 'Check', '2017-01-25', 'New') +,(4402, 216, 92, '2016-10-10', '2016-03-28', 'Jonathan James', '164 Bonner Hill', null, 'Vale de Mendiz', 'Vila Real', '5085-105', 'Portugal', 2.96, 'Card', '2016-07-15', 'Shipped') +,(4403, 212, 12, '2016-09-15', '2016-11-11', 'Judy Williams', '207 Scofield Place', null, 'Lawa-an', null, '5706', 'Philippines', 9.68, 'Check', '2016-04-30', 'On Hold') +,(4404, 213, 83, '2016-04-25', '2016-05-14', 'Amy Olson', '84189 Schurz Circle', null, 'Ogoja', null, null, 'Netherlands', 5.18, 'Card', '2016-11-02', 'Complete') +,(4405, 209, 7 , '2016-12-01', '2016-08-30', 'Donna Vasquez', '82460 Ridgeway Hill', null, 'La Guacamaya', null, null, 'Canada', 5.32, 'Card', '2017-02-11', 'Complete') +,(4406, 209, 66, '2016-09-14', '2016-05-13', 'Susan Jacobs', '17 Morningstar Lane', null, 'Chedao', null, null, 'China', 4.12, 'Cash', '2016-11-11', 'New') +,(4407, 214, 57, '2016-05-04', '2016-06-03', 'Kathryn Burns', '116 Hollow Ridge Park', null, 'Comagascas', null, '1950', 'Philippines', 1.05, 'Cash', '2017-01-28', 'New') +,(4408, 201, 64, '2017-02-11', '2016-06-08', 'Doris Bennett', '090 Lien Place', null, 'Luotang', null, null, 'China', 1.35, 'Cash', '2016-12-16', 'Complete') +,(4409, 209, 41, '2017-02-28', '2016-09-05', 'Cynthia Robertson', '6 Eliot Center', null, 'Abu Dhabi', null, null, 'Denmark', 4.21, 'Check', '2017-01-01', 'New') +,(4410, 215, 24, '2016-08-28', '2016-10-30', 'Jonathan Parker', '0 Weeping Birch Hill', null, 'Cienfuegos', null, null, 'Denmark', 1.69, 'Card', '2017-01-21', 'Shipped') +,(4411, 206, 10, '2016-08-30', '2016-12-06', 'Bobby Foster', '8279 Ridgeview Place', null, 'Cruz Alta', null, '98000-000', 'Brazil', 7.5, 'Cash', '2016-09-09', 'On Hold') +,(4412, 205, 65, '2016-12-13', '2017-02-27', 'Phyllis Moore', '806 Acker Drive', null, 'Paoay', null, '2902', 'Philippines', 4.63, 'Cash', '2017-01-11', 'Shipped') +,(4413, 211, 2 , '2016-12-05', '2016-12-07', 'Kevin Gordon', '00875 Sherman Lane', null, 'Wansheng', null, null, 'China', 2.7, 'Card', '2016-07-31', 'New') +,(4414, 219, 25, '2017-02-08', '2016-06-22', 'Jack Mccoy', '2 Killdeer Center', null, 'Gresik', null, null, 'Indonesia', 4.1, 'Check', '2017-03-05', 'On Hold') +,(4415, 220, 9 , '2017-01-02', '2016-08-28', 'Margaret Fuller', '1960 Parkside Hill', null, 'Kafr Zaytā', null, null, 'India', 1.09, 'Cash', '2016-08-07', 'New') +,(4416, 214, 100,'2017-01-07', '2017-02-07', 'Melissa Nichols', '6 Lakewood Gardens Avenue', null, 'Stockholm', 'Stockholm', '113 90', 'Sweden', 4.1, 'Cash', '2016-03-31', 'On Hold') +,(4417, 210, 87, '2017-01-23', '2016-12-14', 'William Webb', '84 Mifflin Junction', null, 'Kanungu', null, null, 'South Africa', 4.38, 'Card', '2016-05-05', 'Complete') +,(4418, 213, 29, '2017-01-05', '2017-02-07', 'Anne Gonzales', '7 Myrtle Plaza', null, 'Davila', null, '2012', 'Philippines', 5.45, 'Cash', '2016-05-23', 'Shipped') +,(4419, 212, 94, '2016-10-19', '2016-12-20', 'Kathleen Graham', '22 Forest Run Hill', null, 'Mollepampa', null, null, 'Peru', 5.86, 'Check', '2016-07-31', 'Shipped') +,(4420, 201, 32, '2016-11-29', '2016-09-24', 'Diana Sanders', '8925 Kennedy Parkway', null, 'San Miguel de Tucumán', null, '4137', 'Argentina', 3.71, 'Cash', '2016-08-10', 'Complete') +,(4421, 208, 58, '2017-03-02', '2016-04-03', 'Willie Wright', '60 Old Shore Alley', null, 'Jinjiang', null, null, 'China', 6.72, 'Card', '2016-10-09', 'Shipped') +,(4422, 206, 59, '2016-04-19', '2016-12-29', 'Frank Evans', '785 Little Fleur Center', null, 'El Triunfo', null, null, 'Argentina', 9.43, 'Check', '2016-05-13', 'New') +,(4423, 209, 68, '2016-08-22', '2016-11-20', 'Phillip Carter', '6398 John Wall Center', null, 'Shouxihu', null, null, 'China', 4.22, 'Check', '2016-10-18', 'New') +,(4424, 205, 31, '2016-10-05', '2016-10-09', 'Lillian Gomez', '17560 Melrose Point', null, 'Milwaukee', 'Wisconsin', '53205', 'United States', 1.16, 'Check', '2016-04-17', 'On Hold') +,(4425, 202, 7 , '2016-07-24', '2017-02-22', 'John Ortiz', '45 Vera Place', null, 'Kiel', 'Schleswig-Holstein', '24109', 'Germany', 5.86, 'Cash', '2016-10-13', 'On Hold') +,(4426, 214, 80, '2016-10-04', '2016-09-01', 'Brandon Fields', '94792 Jackson Hill', null, 'San Juan', 'Pr', '00918', 'Germany', 2.54, 'Check', '2016-12-19', 'On Hold') +,(4427, 209, 23, '2016-06-23', '2016-04-29', 'Willie Hart', '20 Sloan Terrace', null, 'Mount Darwin', null, null, 'India', 3.71, 'Cash', '2016-09-22', 'Complete') +,(4428, 211, 7 , '2016-09-07', '2016-10-28', 'Walter Montgomery', '67285 Crowley Road', null, 'Wailolong', null, null, 'Indonesia', 9.79, 'Check', '2016-04-05', 'Complete') +,(4429, 217, 10, '2017-03-02', '2016-11-27', 'Sara Williamson', '72 Monterey Circle', null, 'Salvacion', null, '1114', 'Philippines', 3.33, 'Card', '2016-05-18', 'On Hold') +,(4430, 210, 12, '2017-02-18', '2016-03-17', 'Wayne Sanders', '21302 Valley Edge Pass', null, 'Balakasap', null, null, 'Indonesia', 2.18, 'Card', '2016-06-02', 'New') +,(4431, 220, 80, '2016-10-01', '2016-09-28', 'Cynthia Allen', '1 Karstens Avenue', null, 'Santo António das Areias', 'Portalegre', '7330-254', 'Portugal', 3.4, 'Cash', '2016-08-21', 'New') +,(4432, 211, 95, '2017-02-04', '2016-03-17', 'Jonathan Hughes', '93993 Fairview Junction', null, 'Buje', null, '52460', 'Canada', 5.19, 'Cash', '2016-10-01', 'New') +,(4433, 208, 67, '2017-02-11', '2016-06-01', 'Gerald Wright', '77811 Dennis Point', null, 'Hohoe', null, null, 'United Kingdom', 3.25, 'Card', '2016-07-15', 'New') +,(4434, 201, 53, '2016-12-25', '2017-01-07', 'Roy Anderson', '182 High Crossing Terrace', null, 'Bajiazi', null, null, 'China', 8.8, 'Card', '2017-02-11', 'Shipped') +,(4435, 207, 3 , '2016-05-30', '2016-04-07', 'Brenda Wright', '98 Kim Drive', null, 'Lillehammer', 'Oppland', '2605', 'Greece', 5.76, 'Cash', '2017-02-02', 'On Hold') +,(4436, 204, 29, '2016-07-19', '2016-07-05', 'Philip Price', '16 Brown Plaza', null, 'Čapljina', null, null, 'India', 9.62, 'Cash', '2016-11-05', 'On Hold') +,(4437, 210, 80, '2016-10-13', '2016-04-24', 'Michelle Webb', '4160 Everett Point', null, 'Waepana', null, null, 'Indonesia', 9.54, 'Cash', '2016-07-11', 'Complete') +,(4438, 209, 6 , '2016-12-31', '2017-01-27', 'Heather Fields', '10 Fairview Center', null, 'Złotniki Kujawskie', null, '88-180', 'Poland', 1.81, 'Cash', '2017-03-15', 'Shipped') +,(4439, 216, 53, '2017-02-01', '2016-09-12', 'Ryan Long', '0 Gateway Avenue', null, 'Pizhanka', null, '613380', 'Russia', 9.34, 'Cash', '2016-07-02', 'New') +,(4440, 211, 25, '2017-02-03', '2016-10-13', 'Joyce Stewart', '61 Burrows Street', null, 'Kushelevka', null, '658381', 'Russia', 6.4, 'Cash', '2017-01-29', 'On Hold') +,(4441, 215, 93, '2016-03-21', '2016-11-17', 'Walter Arnold', '97613 Pond Avenue', null, 'Looc', null, '5507', 'Philippines', 1.09, 'Cash', '2016-10-05', 'Shipped') +,(4442, 214, 10, '2016-05-10', '2016-05-31', 'Irene Simmons', '36 Larry Court', null, 'Rozhdestveno', null, '399768', 'Russia', 4.82, 'Check', '2017-01-13', 'Complete') +,(4443, 208, 19, '2017-02-09', '2017-02-05', 'Christina Mccoy', '1482 Rockefeller Point', null, 'Rybatskoye', null, '196851', 'Russia', 1.62, 'Cash', '2016-09-14', 'Shipped') +,(4444, 210, 98, '2017-02-15', '2016-05-17', 'Marie Fowler', '04 Prairie Rose Junction', null, 'Chicago', 'Illinois', '60604', 'United States', 7.47, 'Card', '2017-02-22', 'Complete') +,(4445, 218, 32, '2017-02-12', '2016-05-20', 'Louise Bell', '3 Charing Cross Pass', null, 'Selce', null, '1219', 'Denmark', 4.47, 'Cash', '2016-04-01', 'New') +,(4446, 209, 25, '2016-09-22', '2016-12-03', 'Barbara Black', '697 Oneill Drive', null, 'Shanghang', null, null, 'China', 4.66, 'Check', '2016-11-09', 'On Hold') +,(4447, 209, 100,'2016-08-26', '2017-01-16', 'James Holmes', '77 Marcy Court', null, 'Estreito', null, '65975-000', 'Brazil', 9.85, 'Check', '2016-12-04', 'On Hold') +,(4448, 210, 72, '2016-06-25', '2016-12-07', 'Kenneth Williams', '6400 Milwaukee Hill', null, 'Wanshan', null, null, 'China', 3.66, 'Card', '2016-06-09', 'On Hold') +,(4449, 213, 16, '2016-12-13', '2016-08-07', 'Joshua Jacobs', '8 Judy Park', null, 'Ágios Andréas', null, null, 'Greece', 3.81, 'Cash', '2016-07-07', 'Complete') +,(4450, 216, 100,'2016-12-21', '2017-02-13', 'Aaron Sanders', '1 Dakota Court', null, 'Huayllo', null, null, 'Peru', 7.59, 'Cash', '2016-04-22', 'On Hold') +,(4451, 211, 50, '2016-08-22', '2016-06-05', 'Eugene Scott', '03 Golden Leaf Point', null, 'Stírion', null, null, 'Greece', 8.99, 'Card', '2017-02-25', 'New') +,(4452, 220, 86, '2016-05-07', '2016-07-20', 'Cynthia Phillips', '820 Merchant Way', null, 'Mrongi Daja', null, null, 'Indonesia', 2.21, 'Check', '2016-04-27', 'On Hold') +,(4453, 213, 58, '2016-10-30', '2016-03-22', 'Martin Reed', '14 Meadow Vale Alley', null, 'Jiangdong', null, null, 'China', 3.58, 'Cash', '2017-02-12', 'Complete') +,(4454, 206, 98, '2016-05-14', '2016-11-07', 'Janet Porter', '74391 Ronald Regan Park', null, 'Lamakera Dua', null, null, 'Indonesia', 9.86, 'Check', '2016-06-12', 'New') +,(4455, 204, 2 , '2016-03-28', '2016-04-11', 'Amanda Duncan', '047 Jenna Road', null, 'Tungawan', null, '7018', 'Philippines', 2.04, 'Card', '2016-07-09', 'New') +,(4456, 211, 58, '2016-08-05', '2016-11-19', 'Joseph Henderson', '14 Morningstar Pass', null, 'Kolobolon', null, null, 'Indonesia', 6.44, 'Check', '2016-05-24', 'New') +,(4457, 215, 21, '2017-02-15', '2016-06-11', 'Cynthia Bishop', '066 Surrey Pass', null, 'Hưng Yên', null, null, 'Vietnam', 1.61, 'Check', '2016-07-05', 'Shipped') +,(4458, 211, 10, '2016-08-08', '2016-08-06', 'Craig Andrews', '7 Mariners Cove Court', null, 'Tuanchengshan', null, null, 'China', 8.4, 'Cash', '2016-12-15', 'New') +,(4459, 211, 71, '2016-05-13', '2017-02-19', 'Steve Warren', '6702 Delladonna Point', null, 'Pražmo', null, '739 04', 'Czech Republic', 8.29, 'Card', '2016-06-29', 'New') +,(4460, 214, 5 , '2016-12-21', '2016-06-21', 'Brenda Mills', '77934 Prairieview Way', null, 'Huafeng', null, null, 'China', 6.76, 'Cash', '2016-07-08', 'New') +,(4461, 212, 34, '2016-04-27', '2016-07-22', 'Randy Wright', '9 Thackeray Way', null, 'Dvůr Králové nad Labem', null, '544 01', 'Czech Republic', 9.45, 'Card', '2016-03-20', 'Shipped') +,(4462, 202, 47, '2016-10-31', '2016-06-30', 'Michelle Ramirez', '0152 Old Shore Road', null, 'Pulaupinang', null, null, 'Indonesia', 2.42, 'Card', '2016-09-05', 'New') +,(4463, 209, 86, '2016-07-30', '2016-04-29', 'Frank Duncan', '67 Buell Terrace', null, 'Krasne', null, null, 'Ukraine', 2.71, 'Card', '2016-06-22', 'Complete') +,(4464, 204, 62, '2017-03-01', '2017-03-11', 'Carlos Warren', '978 Merrick Circle', null, 'Penghua', null, null, 'China', 7.29, 'Cash', '2016-03-22', 'Shipped') +,(4465, 202, 87, '2016-06-23', '2016-11-15', 'Tina Gardner', '0 Mcguire Terrace', null, 'Cangqian', null, null, 'China', 2.17, 'Card', '2016-06-01', 'New') +,(4466, 220, 31, '2016-06-04', '2016-06-08', 'Stephen Turner', '17 Leroy Plaza', null, 'Pedaringan', null, null, 'Indonesia', 8.89, 'Check', '2016-05-09', 'Shipped') +,(4467, 210, 35, '2016-05-21', '2016-09-26', 'Melissa Wilson', '61199 Forest Center', null, 'Krmelín', null, '739 24', 'Czech Republic', 2.35, 'Card', '2016-06-20', 'On Hold') +,(4468, 216, 50, '2016-09-10', '2016-12-02', 'Billy Harper', '8940 Fisk Parkway', null, 'San Jose', 'California', '95113', 'United States', 3.98, 'Cash', '2016-10-04', 'Complete') +,(4469, 207, 22, '2016-06-03', '2016-11-06', 'Carl Davis', '5 Lindbergh Street', null, 'Taling Chan', null, '10170', 'Thailand', 4.71, 'Card', '2017-02-03', 'New') +,(4470, 211, 64, '2016-06-16', '2016-05-26', 'Gerald Henry', '2221 Porter Crossing', null, 'Mozdok', null, '363759', 'Russia', 9.57, 'Cash', '2016-10-11', 'Shipped') +,(4471, 206, 25, '2016-07-27', '2016-08-24', 'Debra Garza', '65379 Sunnyside Trail', null, 'Jiadingzhen', null, null, 'China', 1.06, 'Check', '2016-06-23', 'On Hold') +,(4472, 204, 18, '2016-08-30', '2016-10-09', 'Margaret Rodriguez', '3202 Marquette Point', null, 'Oranzherei', null, '416368', 'Russia', 3.35, 'Check', '2016-06-18', 'On Hold') +,(4473, 212, 88, '2016-10-29', '2016-05-25', 'William Burke', '46 Kingsford Center', null, 'San Juan', null, '11301', 'Denmark', 3.85, 'Check', '2017-02-12', 'Shipped') +,(4474, 217, 9 , '2017-02-19', '2016-05-29', 'Larry Myers', '731 Packers Point', null, 'Trelleborg', 'Skåne', '231 68', 'Sweden', 4.46, 'Card', '2016-06-19', 'New') +,(4475, 202, 40, '2016-11-03', '2016-04-25', 'Virginia Hall', '141 Rowland Way', null, 'Aoji-ri', null, null, 'Denmark', 7.58, 'Check', '2016-11-13', 'Shipped') +,(4476, 211, 16, '2017-03-07', '2016-10-14', 'Doris Berry', '60 Rusk Lane', null, 'Al Qamşīyah', null, null, 'India', 1.8, 'Check', '2016-03-19', 'On Hold') +,(4477, 210, 87, '2016-12-04', '2016-03-22', 'Juan Richards', '3830 Randy Parkway', null, 'Nakhon Nayok', null, '26120', 'Thailand', 1.22, 'Card', '2016-08-05', 'Complete') +,(4478, 203, 34, '2017-01-28', '2016-09-27', 'Kimberly Fox', '34957 Elka Way', null, 'Santiago', null, '97700-000', 'Brazil', 3.99, 'Check', '2016-07-06', 'On Hold') +,(4479, 219, 89, '2016-07-01', '2016-05-31', 'Ruby Ruiz', '90581 American Hill', null, 'Agudos', null, '17120-000', 'Brazil', 5.97, 'Cash', '2016-06-03', 'On Hold') +,(4480, 203, 53, '2016-10-17', '2016-11-07', 'Ruby Robinson', '385 Carioca Plaza', null, 'Kalangan', null, null, 'Indonesia', 8.71, 'Card', '2016-12-01', 'Complete') +,(4481, 207, 91, '2017-02-25', '2016-03-31', 'Victor Lopez', '170 Mariners Cove Circle', null, 'Bressuire', 'Poitou-Charentes', '79304 CEDEX', 'France', 8.59, 'Check', '2016-07-30', 'Complete') +,(4482, 215, 58, '2017-02-15', '2016-07-25', 'Kimberly Marshall', '647 Summerview Circle', null, 'Timahankrajan', null, null, 'Indonesia', 3.07, 'Check', '2016-04-21', 'On Hold') +,(4483, 207, 76, '2016-06-27', '2016-10-15', 'Pamela Matthews', '9379 Summit Trail', null, 'Brangsi', null, null, 'Indonesia', 1.35, 'Card', '2016-05-27', 'New') +,(4484, 210, 98, '2017-02-03', '2016-11-04', 'Randy Patterson', '6641 American Ash Point', null, 'Ivanec', null, '42240', 'Canada', 2.36, 'Card', '2016-10-31', 'Shipped') +,(4485, 205, 71, '2017-01-01', '2017-02-16', 'Carolyn Garza', '281 Raven Lane', null, 'Jingyang', null, null, 'China', 6.85, 'Check', '2016-04-27', 'Shipped') +,(4486, 202, 20, '2016-07-24', '2016-07-06', 'Ruth Perkins', '5656 Northview Lane', null, 'Burevestnik', null, '607612', 'Russia', 9.29, 'Cash', '2017-03-16', 'On Hold') +,(4487, 203, 49, '2017-02-20', '2017-01-12', 'Kelly Oliver', '249 Londonderry Pass', null, 'Grande Rivière du Nord', null, null, 'Canada', 7.65, 'Check', '2016-12-04', 'Shipped') +,(4488, 203, 67, '2016-11-09', '2016-07-19', 'Shirley Henry', '3045 Rowland Lane', null, 'Midlands', null, null, 'Germany', 5.35, 'Check', '2016-06-14', 'Complete') +,(4489, 209, 100,'2017-01-24', '2016-05-30', 'Marie Ferguson', '629 Crownhardt Junction', null, 'El Paso', 'Texas', '88546', 'United States', 5.18, 'Check', '2016-04-20', 'Shipped') +,(4490, 202, 87, '2016-06-27', '2016-09-05', 'Rachel Scott', '343 Schurz Road', null, 'Cabiguan', null, '1144', 'Philippines', 1.05, 'Cash', '2016-07-24', 'Shipped') +,(4491, 211, 93, '2017-01-16', '2016-09-29', 'Henry Fields', '26143 Del Sol Avenue', null, 'Huangduobu', null, null, 'China', 6.15, 'Card', '2016-06-02', 'Shipped') +,(4492, 217, 10, '2016-12-08', '2016-10-01', 'Harold Jones', '2 Oak Avenue', null, 'Surkhakhi', null, '386147', 'Russia', 9.96, 'Card', '2016-04-07', 'New') +,(4493, 217, 35, '2016-05-05', '2016-05-01', 'Walter Wright', '12 Paget Road', null, 'Siluman', null, null, 'Indonesia', 2.1, 'Cash', '2016-10-26', 'On Hold') +,(4494, 206, 51, '2017-02-25', '2016-10-24', 'Marilyn Hayes', '4 5th Way', null, 'Punkaharju', null, '58501', 'Finland', 3.57, 'Cash', '2016-06-22', 'New') +,(4495, 208, 3 , '2016-12-27', '2016-09-09', 'Sandra West', '0384 Bowman Center', null, 'Tagta', null, null, 'India', 6.45, 'Cash', '2016-08-25', 'New') +,(4496, 218, 41, '2017-01-10', '2016-12-11', 'Dennis Meyer', '4 Cambridge Alley', null, 'Cariamanga', null, null, 'Argentina', 5.33, 'Check', '2016-09-28', 'New') +,(4497, 216, 76, '2016-09-28', '2016-05-12', 'Frank Dean', '23227 Veith Park', null, 'Fengqiao', null, null, 'China', 6.72, 'Cash', '2016-04-12', 'Complete') +,(4498, 204, 3 , '2016-11-11', '2016-12-01', 'Amy Palmer', '7735 Maple Wood Road', null, 'Działoszyce', null, '28-440', 'Poland', 3.08, 'Card', '2016-09-07', 'Shipped') +,(4499, 211, 96, '2017-02-04', '2016-03-27', 'Emily Nelson', '3 Crownhardt Plaza', null, 'Oslob', null, '6025', 'Philippines', 6.41, 'Card', '2016-09-25', 'On Hold') +,(4500, 204, 7 , '2016-04-29', '2017-01-20', 'Randy Hanson', '687 Drewry Place', null, 'Barberena', null, '06002', 'Japan', 2.51, 'Card', '2016-12-12', 'Complete') +,(4501, 215, 92, '2017-02-27', '2016-09-26', 'Raymond Banks', '826 Mendota Pass', null, 'Chicago', 'Illinois', '60681', 'United States', 3.34, 'Card', '2016-10-30', 'Complete') +,(4502, 220, 24, '2016-10-01', '2016-09-26', 'Kimberly Robertson', '2643 Becker Trail', null, 'Columbus', 'United Kingdom', '31904', 'United States', 3.07, 'Check', '2016-04-27', 'Complete') +,(4503, 215, 52, '2017-02-25', '2016-08-08', 'Marilyn Miller', '1 Tennessee Park', null, 'Spokane', 'Washington', '99252', 'United States', 5.34, 'Check', '2016-08-16', 'On Hold') +,(4504, 220, 35, '2017-01-27', '2016-09-08', 'Marie Carpenter', '4575 Fair Oaks Hill', null, 'Richmond', 'Virginia', '23293', 'United States', 7.01, 'Cash', '2016-04-06', 'Shipped') +,(4505, 203, 10, '2016-06-24', '2017-02-22', 'Nicholas Wells', '823 Duke Center', null, 'Irvine', 'California', '92710', 'United States', 1.4, 'Check', '2016-06-17', 'On Hold') +,(4506, 207, 26, '2016-12-26', '2017-03-14', 'John Dean', '06 Spenser Place', null, 'Charleston', 'South Carolina', '29403', 'United States', 1.31, 'Cash', '2016-10-25', 'Shipped') +,(4507, 216, 28, '2016-08-22', '2016-12-13', 'Diana Spencer', '26 Ridgeway Plaza', null, 'Ogden', 'Utah', '84403', 'United States', 9.42, 'Cash', '2016-04-13', 'Shipped') +,(4508, 213, 90, '2016-08-31', '2017-01-13', 'Wanda Bowman', '862 Iowa Avenue', null, 'Kansas City', 'Kansas', '66160', 'United States', 7.1, 'Cash', '2016-10-19', 'Complete') +,(4509, 204, 93, '2016-07-07', '2016-05-31', 'Andrew Garrett', '27066 Gina Road', null, 'El Paso', 'Texas', '88558', 'United States', 6.88, 'Check', '2016-04-23', 'Complete') +,(4510, 202, 56, '2017-02-06', '2016-10-29', 'Juan Webb', '6233 South Junction', null, 'Lafayette', 'Louisiana', '70505', 'United States', 1.07, 'Cash', '2016-05-20', 'New') +,(4511, 219, 54, '2016-11-08', '2016-06-17', 'William Gardner', '5 Meadow Ridge Terrace', null, 'Tacoma', 'Washington', '98447', 'United States', 4.46, 'Check', '2016-05-25', 'Complete') +,(4512, 215, 4 , '2016-09-09', '2016-08-21', 'Fred Fernandez', '15 Ludington Junction', null, 'San Rafael', 'California', '94913', 'United States', 4.3, 'Cash', '2016-09-02', 'New') +,(4513, 206, 54, '2016-10-28', '2016-06-30', 'Ruth Ellis', '41196 Rieder Avenue', null, 'Baltimore', 'Maryland', '21211', 'United States', 8.39, 'Card', '2016-05-29', 'Complete') +,(4514, 215, 73, '2017-02-26', '2016-09-17', 'David Ferguson', '5813 Brown Parkway', null, 'Shawnee Mission', 'Kansas', '66286', 'United States', 2.71, 'Card', '2016-04-18', 'Shipped') +,(4515, 216, 23, '2016-11-08', '2016-06-27', 'Susan Freeman', '0 Bashford Parkway', null, 'Tucson', 'Arizona', '85720', 'United States', 5.5, 'Check', '2017-02-01', 'Shipped') +,(4516, 212, 9 , '2016-04-30', '2016-12-31', 'Alan Hunt', '193 Declaration Plaza', null, 'Louisville', 'Kentucky', '40256', 'United States', 9.74, 'Cash', '2017-01-20', 'On Hold') +,(4517, 202, 46, '2017-02-01', '2016-07-22', 'Phillip Romero', '1860 Thompson Crossing', null, 'Biloxi', 'Mississippi', '39534', 'United States', 3.02, 'Card', '2016-11-04', 'Complete') +,(4518, 203, 75, '2016-09-07', '2016-11-14', 'George Diaz', '6 Mcguire Center', null, 'Mesa', 'Arizona', '85210', 'United States', 7.84, 'Check', '2016-06-21', 'Shipped') +,(4519, 217, 68, '2016-10-07', '2016-08-15', 'Virginia King', '7405 High Crossing Alley', null, 'Sioux City', 'Iowa', '51105', 'United States', 4.03, 'Check', '2016-05-09', 'Complete') +,(4520, 216, 6 , '2017-02-18', '2017-02-17', 'Brenda Ruiz', '224 Badeau Street', null, 'Corpus Christi', 'Texas', '78426', 'United States', 9.11, 'Check', '2016-11-13', 'New') +,(4521, 201, 84, '2016-09-17', '2016-06-15', 'Debra Brown', '94 Morningstar Center', null, 'San Francisco', 'California', '94177', 'United States', 6.59, 'Check', '2017-03-10', 'Shipped') +,(4522, 205, 89, '2016-10-22', '2017-03-13', 'Emily Henry', '79 Manufacturers Center', null, 'Los Angeles', 'California', '90020', 'United States', 4.11, 'Cash', '2016-10-27', 'Complete') +,(4523, 211, 67, '2016-04-17', '2017-02-12', 'Aaron Peterson', '504 Schlimgen Terrace', null, 'Bethesda', 'Maryland', '20892', 'United States', 5.42, 'Card', '2016-08-25', 'Shipped') +,(4524, 215, 83, '2016-08-22', '2016-07-31', 'Janice Burke', '3 Mcbride Lane', null, 'Washington', 'District of Columbia', '20073', 'United States', 3.76, 'Card', '2016-08-09', 'Shipped') +,(4525, 217, 100,'2016-03-31', '2016-12-09', 'Debra Kelley', '18155 Northview Plaza', null, 'Detroit', 'Michigan', '48267', 'United States', 2.26, 'Cash', '2016-12-29', 'On Hold') +,(4526, 214, 32, '2016-11-24', '2016-03-28', 'Donald Sims', '86 Michigan Avenue', null, 'Brooklyn', 'New York', '11231', 'United States', 5.05, 'Check', '2016-08-07', 'Shipped') +,(4527, 205, 100,'2016-05-13', '2016-06-17', 'Daniel Mason', '4 Hanover Road', null, 'Reno', 'Nevada', '89595', 'United States', 4.81, 'Check', '2016-10-22', 'Shipped') +,(4528, 201, 32, '2016-11-15', '2016-11-16', 'Howard Knight', '5 Weeping Birch Alley', null, 'Jacksonville', 'Florida', '32225', 'United States', 5.99, 'Check', '2016-11-07', 'New') +,(4529, 213, 99, '2016-12-02', '2016-07-09', 'Virginia Hughes', '629 Manufacturers Point', null, 'Syracuse', 'New York', '13224', 'United States', 5.6, 'Card', '2016-12-02', 'Complete') +,(4530, 219, 18, '2016-12-07', '2017-02-07', 'Carl Graham', '90 Heffernan Pass', null, 'Saint Petersburg', 'Florida', '33737', 'United States', 9.35, 'Check', '2016-10-18', 'Complete') +,(4531, 201, 57, '2016-12-26', '2016-12-29', 'Joan Murray', '38 Bellgrove Crossing', null, 'Tacoma', 'Washington', '98447', 'United States', 6.69, 'Card', '2016-12-05', 'On Hold') +,(4532, 202, 58, '2016-04-02', '2016-07-01', 'Robert Williams', '09407 Northfield Circle', null, 'Cedar Rapids', 'Iowa', '52410', 'United States', 6.56, 'Card', '2016-04-16', 'On Hold') +,(4533, 218, 36, '2017-02-07', '2016-05-05', 'Ryan Black', '57199 Hoffman Place', null, 'Jacksonville', 'Florida', '32204', 'United States', 8.54, 'Check', '2017-01-24', 'Shipped') +,(4534, 208, 92, '2016-07-09', '2016-06-20', 'Brenda Hunter', '16179 Ludington Court', null, 'Birmingham', 'Alabama', '35263', 'United States', 9.82, 'Cash', '2016-09-30', 'New') +,(4535, 214, 70, '2016-08-04', '2016-06-29', 'Anne Warren', '08161 Barnett Parkway', null, 'Van Nuys', 'California', '91411', 'United States', 7.04, 'Cash', '2017-02-24', 'Complete') +,(4536, 213, 99, '2017-01-11', '2017-01-21', 'Betty Snyder', '9 Badeau Court', null, 'Davenport', 'Iowa', '52804', 'United States', 8.72, 'Card', '2016-09-03', 'Shipped') +,(4537, 217, 76, '2016-07-31', '2017-02-13', 'Edward Wilson', '1031 Esch Drive', null, 'Fresno', 'California', '93750', 'United States', 1.64, 'Check', '2016-04-21', 'On Hold') +,(4538, 210, 60, '2016-06-22', '2016-04-10', 'Terry Butler', '124 Hoepker Pass', null, 'San Antonio', 'Texas', '78255', 'United States', 2.35, 'Check', '2017-01-31', 'Complete') +,(4539, 220, 5 , '2016-11-12', '2016-04-25', 'Emily Hawkins', '990 Quincy Drive', null, 'Richmond', 'Virginia', '23289', 'United States', 4.36, 'Card', '2016-09-17', 'Complete') +,(4540, 213, 42, '2017-02-28', '2017-02-11', 'Cynthia Rose', '8881 Packers Trail', null, 'Berkeley', 'California', '94712', 'United States', 6.09, 'Check', '2016-04-14', 'New') +,(4541, 204, 27, '2016-09-30', '2017-01-28', 'Lisa Turner', '83 Graedel Terrace', null, 'Oakland', 'California', '94611', 'United States', 9.61, 'Card', '2016-05-07', 'Shipped') +,(4542, 219, 26, '2016-07-13', '2016-03-23', 'Jason Price', '475 Meadow Valley Point', null, 'Annapolis', 'Maryland', '21405', 'United States', 2.93, 'Check', '2016-06-10', 'New') +,(4543, 202, 63, '2016-07-29', '2016-05-20', 'Joan Hayes', '7 Upham Center', null, 'Temple', 'Texas', '76505', 'United States', 7.39, 'Card', '2016-09-20', 'Complete') +,(4544, 212, 97, '2016-10-31', '2017-01-16', 'Paula Torres', '443 Debs Terrace', null, 'Racine', 'Wisconsin', '53405', 'United States', 3.93, 'Card', '2016-07-07', 'Shipped') +,(4545, 201, 33, '2017-03-08', '2016-08-21', 'Theresa Watkins', '85395 Rusk Center', null, 'Jackson', 'Mississippi', '39210', 'United States', 5.32, 'Card', '2016-11-19', 'Complete') +,(4546, 211, 68, '2016-05-25', '2016-07-17', 'Clarence Nguyen', '155 Northport Road', null, 'Greensboro', 'North Carolina', '27455', 'United States', 7.06, 'Cash', '2016-08-24', 'Shipped') +,(4547, 203, 73, '2016-05-03', '2016-10-23', 'Jean Mason', '03 Eagle Crest Lane', null, 'Colorado Springs', 'Colorado', '80935', 'United States', 4.2, 'Cash', '2016-04-07', 'New') +,(4548, 217, 2 , '2016-05-20', '2016-08-07', 'Nicole Brown', '364 Debra Lane', null, 'Washington', 'District of Columbia', '20046', 'United States', 7.97, 'Cash', '2016-04-30', 'New') +,(4549, 220, 89, '2016-04-11', '2016-12-11', 'Carol Chapman', '756 Muir Point', null, 'Washington', 'District of Columbia', '20397', 'United States', 2.21, 'Card', '2017-02-05', 'Shipped') +,(4550, 211, 13, '2016-04-16', '2016-08-03', 'Roy George', '8 Anhalt Terrace', null, 'Indianapolis', 'Indiana', '46207', 'United States', 4.5, 'Check', '2017-03-06', 'New') +,(4551, 219, 37, '2016-04-14', '2017-03-01', 'Heather Bishop', '0901 Tennessee Street', null, 'Kingsport', 'Tennessee', '37665', 'United States', 1.92, 'Card', '2017-01-02', 'Shipped') +,(4552, 218, 94, '2017-03-05', '2016-06-01', 'Wayne Mason', '90645 Carberry Drive', null, 'Madison', 'Wisconsin', '53716', 'United States', 6.96, 'Card', '2016-12-31', 'Complete') +,(4553, 212, 37, '2016-10-16', '2016-10-13', 'Gloria Elliott', '100 Granby Junction', null, 'Miami', 'Florida', '33153', 'United States', 9.25, 'Cash', '2016-06-09', 'Shipped') +,(4554, 217, 4 , '2016-06-05', '2016-07-26', 'Timothy Hayes', '6001 Elgar Circle', null, 'Pensacola', 'Florida', '32575', 'United States', 6.5, 'Cash', '2016-03-30', 'Complete') +,(4555, 207, 49, '2016-08-19', '2016-08-15', 'Judith Baker', '3436 Briar Crest Park', null, 'Newark', 'New Jersey', '07188', 'United States', 2.33, 'Check', '2016-09-17', 'Complete') +,(4556, 217, 17, '2016-11-18', '2016-12-10', 'Roy Russell', '6401 Graedel Court', null, 'Alexandria', 'Virginia', '22301', 'United States', 3.24, 'Check', '2016-04-08', 'Complete') +,(4557, 216, 35, '2016-09-11', '2016-05-07', 'Jacqueline Davis', '864 Cherokee Lane', null, 'Columbus', 'Ohio', '43226', 'United States', 4.7, 'Card', '2016-08-06', 'Shipped') +,(4558, 211, 20, '2016-10-06', '2016-07-15', 'Eugene Castillo', '03090 Northland Circle', null, 'Salt Lake City', 'Utah', '84199', 'United States', 9.36, 'Card', '2016-10-06', 'Complete') +,(4559, 216, 13, '2017-01-13', '2016-03-28', 'Janice Mills', '522 Holmberg Alley', null, 'Scottsdale', 'Arizona', '85271', 'United States', 7.31, 'Cash', '2016-05-15', 'On Hold') +,(4560, 211, 77, '2016-08-24', '2017-03-13', 'Ruby White', '0070 Corben Way', null, 'Naples', 'Florida', '34114', 'United States', 3.71, 'Check', '2016-07-17', 'On Hold') +,(4561, 219, 55, '2016-08-13', '2016-11-19', 'Frank Jackson', '25 Rigney Point', null, 'Washington', 'District of Columbia', '20420', 'United States', 1.94, 'Cash', '2016-06-12', 'Shipped') +,(4562, 207, 96, '2016-10-12', '2016-12-04', 'Pamela Peterson', '830 Loftsgordon Junction', null, 'Houston', 'Texas', '77281', 'United States', 1.45, 'Check', '2017-03-06', 'New') +,(4563, 204, 70, '2016-07-23', '2017-02-06', 'Martha Frazier', '3 Gerald Lane', null, 'Scottsdale', 'Arizona', '85260', 'United States', 2.74, 'Cash', '2017-01-19', 'New') +,(4564, 204, 59, '2017-02-26', '2016-10-23', 'Kenneth Hawkins', '27305 Maple Crossing', null, 'San Diego', 'California', '92145', 'United States', 9.41, 'Cash', '2017-02-09', 'On Hold') +,(4565, 203, 66, '2016-08-06', '2017-02-03', 'Barbara Collins', '8 Norway Maple Junction', null, 'Fort Worth', 'Texas', '76198', 'United States', 1.08, 'Card', '2016-06-24', 'New') +,(4566, 217, 83, '2016-09-14', '2016-03-29', 'Gary Ellis', '97 Nobel Avenue', null, 'Alexandria', 'Louisiana', '71307', 'United States', 5.05, 'Card', '2016-06-13', 'Shipped') +,(4567, 214, 63, '2017-03-04', '2016-11-05', 'Douglas Hughes', '98309 Mccormick Park', null, 'Kansas City', 'Kansas', '66160', 'United States', 1.4, 'Card', '2017-02-13', 'Shipped') +,(4568, 208, 12, '2016-10-31', '2017-02-27', 'Harold Flores', '1 Merchant Lane', null, 'Duluth', 'United Kingdom', '30096', 'United States', 4.84, 'Check', '2016-04-30', 'On Hold') +,(4569, 201, 96, '2016-08-20', '2016-10-03', 'Marie Nguyen', '084 Stuart Hill', null, 'Arlington', 'Texas', '76004', 'United States', 5.95, 'Cash', '2016-04-25', 'On Hold') +,(4570, 203, 1 , '2016-10-13', '2016-03-21', 'Judy Fowler', '7541 Golf Course Way', null, 'Kansas City', 'Missouri', '64109', 'United States', 8.02, 'Check', '2016-05-05', 'New') +,(4571, 219, 49, '2016-11-04', '2016-09-02', 'Howard Rogers', '5 Scott Hill', null, 'Brooklyn', 'New York', '11215', 'United States', 5.21, 'Cash', '2016-10-28', 'Complete') +,(4572, 215, 5 , '2016-03-24', '2016-08-31', 'Stephanie Martinez', '0022 Reinke Trail', null, 'Baton Rouge', 'Louisiana', '70894', 'United States', 7.74, 'Card', '2016-08-14', 'On Hold') +,(4573, 206, 61, '2016-08-31', '2016-07-10', 'Jacqueline Lane', '780 Elka Place', null, 'Cleveland', 'Ohio', '44105', 'United States', 9.12, 'Check', '2016-11-30', 'On Hold') +,(4574, 220, 65, '2016-06-26', '2016-06-25', 'Betty Harrison', '23089 Kensington Junction', null, 'Greensboro', 'North Carolina', '27404', 'United States', 5.63, 'Check', '2016-03-30', 'Complete') +,(4575, 212, 81, '2016-04-28', '2016-10-19', 'Robin Bradley', '7895 Weeping Birch Plaza', null, 'Waterbury', 'Connecticut', '06721', 'United States', 7.34, 'Cash', '2017-01-25', 'On Hold') +,(4576, 216, 13, '2017-02-24', '2016-07-18', 'Ralph Bailey', '4019 Harper Park', null, 'Sacramento', 'California', '94291', 'United States', 6.77, 'Cash', '2017-02-02', 'New') +,(4577, 203, 43, '2016-09-24', '2016-11-18', 'Melissa Ross', '775 Lyons Road', null, 'Bridgeport', 'Connecticut', '06606', 'United States', 1.64, 'Check', '2016-07-23', 'Shipped') +,(4578, 212, 53, '2016-07-05', '2016-06-19', 'Joan Russell', '0 Kings Terrace', null, 'Bloomington', 'Illinois', '61709', 'United States', 4.66, 'Card', '2016-04-09', 'New') +,(4579, 214, 17, '2016-10-01', '2016-10-18', 'Benjamin George', '40131 Ronald Regan Road', null, 'Washington', 'District of Columbia', '20525', 'United States', 8.04, 'Check', '2016-06-16', 'Complete') +,(4580, 207, 69, '2016-04-19', '2017-02-09', 'Katherine Stone', '37483 Melrose Parkway', null, 'Fresno', 'California', '93794', 'United States', 6.7, 'Check', '2017-02-08', 'Complete') +,(4581, 218, 28, '2017-03-04', '2016-11-25', 'Ernest Cruz', '872 Nancy Street', null, 'Pompano Beach', 'Florida', '33069', 'United States', 5.81, 'Cash', '2016-04-21', 'On Hold') +,(4582, 217, 32, '2017-03-16', '2016-06-08', 'Joshua Edwards', '72309 Elmside Point', null, 'San Francisco', 'California', '94110', 'United States', 2.49, 'Cash', '2016-04-01', 'On Hold') +,(4583, 219, 83, '2017-01-24', '2016-07-25', 'Justin Mills', '88350 Wayridge Hill', null, 'Charleston', 'West Virginia', '25326', 'United States', 6.03, 'Card', '2016-10-07', 'New') +,(4584, 208, 45, '2016-10-18', '2016-05-13', 'Kathleen Gibson', '25 Carpenter Lane', null, 'Reno', 'Nevada', '89505', 'United States', 5.41, 'Check', '2016-08-21', 'Shipped') +,(4585, 216, 71, '2016-09-19', '2016-10-15', 'Ruby Bennett', '1 Muir Pass', null, 'Las Vegas', 'Nevada', '89135', 'United States', 2.5, 'Cash', '2016-11-29', 'On Hold') +,(4586, 214, 48, '2016-08-07', '2016-08-12', 'Richard Robinson', '1125 Melvin Terrace', null, 'Bethesda', 'Maryland', '20816', 'United States', 4.02, 'Card', '2017-01-09', 'Complete') +,(4587, 212, 62, '2016-12-17', '2017-01-23', 'Debra Sanchez', '534 Stoughton Lane', null, 'Johnstown', 'Pennsylvania', '15906', 'United States', 8.78, 'Cash', '2016-08-07', 'Shipped') +,(4588, 216, 30, '2016-10-24', '2016-12-21', 'Willie Dean', '680 Northview Circle', null, 'Huntington', 'West Virginia', '25775', 'United States', 8.43, 'Card', '2017-03-12', 'New') +,(4589, 210, 10, '2017-01-01', '2016-09-22', 'Christina Kelley', '8706 Sundown Street', null, 'Peoria', 'Illinois', '61635', 'United States', 4.24, 'Cash', '2017-02-08', 'On Hold') +,(4590, 205, 6 , '2016-11-29', '2017-02-23', 'Russell Montgomery', '977 Packers Drive', null, 'Charlotte', 'North Carolina', '28247', 'United States', 2.87, 'Cash', '2016-05-30', 'Complete') +,(4591, 206, 15, '2016-03-28', '2017-02-23', 'Edward Cunningham', '283 Bultman Way', null, 'Jacksonville', 'Florida', '32277', 'United States', 6.55, 'Check', '2017-03-10', 'Shipped') +,(4592, 209, 82, '2016-12-20', '2016-09-07', 'Michael Chavez', '00 Oak Avenue', null, 'Young America', 'Minnesota', '55551', 'United States', 8.22, 'Check', '2016-04-19', 'On Hold') +,(4593, 204, 24, '2017-03-13', '2016-08-30', 'David White', '506 Nevada Circle', null, 'Portland', 'Maine', '04109', 'United States', 1.11, 'Card', '2017-01-13', 'On Hold') +,(4594, 206, 27, '2016-09-13', '2017-03-12', 'Cheryl Vasquez', '9070 Di Loreto Court', null, 'Van Nuys', 'California', '91499', 'United States', 7.42, 'Card', '2017-02-25', 'On Hold') +,(4595, 211, 94, '2016-07-03', '2016-05-08', 'Charles Garrett', '1337 Hooker Trail', null, 'Honolulu', 'Hawaii', '96810', 'United States', 9.57, 'Check', '2016-10-04', 'Shipped') +,(4596, 216, 56, '2016-07-08', '2017-02-28', 'Michelle Butler', '1 Magdeline Lane', null, 'Orlando', 'Florida', '32813', 'United States', 7.05, 'Check', '2016-07-12', 'New') +,(4597, 217, 26, '2016-09-24', '2016-10-05', 'Howard Reyes', '3677 Donald Alley', null, 'Carol Stream', 'Illinois', '60351', 'United States', 7.62, 'Cash', '2017-02-08', 'Complete') +,(4598, 212, 76, '2016-04-13', '2016-08-10', 'Eugene Kelly', '838 Becker Plaza', null, 'Laredo', 'Texas', '78044', 'United States', 4.9, 'Check', '2016-10-23', 'New') +,(4599, 208, 29, '2016-04-16', '2016-05-15', 'Jimmy Mcdonald', '0 Dayton Place', null, 'Rochester', 'New York', '14646', 'United States', 1.56, 'Check', '2017-01-14', 'Complete') +,(4600, 208, 2 , '2016-04-26', '2016-04-06', 'Stephen Jacobs', '7131 Scoville Terrace', null, 'Phoenix', 'Arizona', '85020', 'United States', 4.52, 'Cash', '2017-01-22', 'On Hold'); + + + + +/* Order details */ +insert into order_items (order_id, product_id, quantity, unit_price, discount, order_item_status, date_allocated) values + (4001, 608, 1 , 97.34, 8.73, 'Allocated', '2017-01-15') +,(4001, 611, 2 , 58.46, 4.36, 'No Stock' , '2016-09-21') +,(4001, 616, 2 , 58.46, 4.36, 'No Stock' , '2016-09-21') +,(4001, 613, 2 , 58.46, 4.36, 'No Stock' , '2016-09-21') +,(4001, 615, 2 , 58.46, 4.36, 'No Stock' , '2016-09-21') +,(4002, 604, 3 , 88.97, 2.86, 'On Order' , '2016-12-15') +,(4002, 610, 4 , 37.19, 8.65, 'Allocated', '2016-10-12') +,(4002, 615, 4 , 37.19, 8.65, 'Allocated', '2016-10-12') +,(4003, 609, 8 , 92.87, 4.01, 'No Stock' , '2016-06-15') +,(4003, 612, 7 , 87.15, 3.54, 'No Stock' , '2017-02-09') +,(4004, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4004, 620, 2 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4004, 611, 4 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4004, 612, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4005, 618, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4005, 619, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4005, 620, 2 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4006, 617, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4006, 618, 2 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4006, 607, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4007, 617, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4007, 610, 2 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4007, 612, 5 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4008, 612, 1 , 57.2 , 8.94, 'Allocated', '2017-01-13') +,(4008, 615, 3 , 57.2 , 8.94, 'Allocated', '2017-01-13') +,(4008, 611, 1 , 57.2 , 8.94, 'Allocated', '2017-01-13') +,(4009, 605, 6 , 62.16, 5.68, 'No Stock' , '2017-02-13') +,(4009, 610, 6 , 19.31, 5.0 , 'No Stock' , '2016-09-16') +,(4009, 615, 9 , 51.21, 4.48, 'Allocated', '2016-10-18') +,(4010, 601, 1 , 32.18, 9.41, 'On Order' , '2016-03-17') +,(4010, 602, 1 , 31.35, 7.18, 'No Stock' , '2016-12-30') +,(4010, 603, 10, 24.24, 2.76, 'Allocated', '2016-07-05') +,(4010, 610, 6 , 9.09 , 3.02, 'On Order' , '2016-07-17') +,(4011, 604, 10, 58.25, 9.3 , 'No Stock' , '2016-04-04') +,(4011, 606, 5 , 73.34, 1.76, 'Allocated', '2016-06-30') +,(4011, 608, 3 , 95.07, 4.6 , 'On Order' , '2016-06-04') +,(4011, 615, 9 , 20.84, 3.93, 'Allocated', '2016-06-10') +,(4012, 604, 5 , 19.82, 9.97, 'No Stock' , '2016-09-21') +,(4012, 601, 3 , 19.82, 9.97, 'No Stock' , '2016-09-21') +,(4012, 610, 3 , 19.82, 9.97, 'No Stock' , '2016-09-21') +,(4013, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4013, 604, 2 , 19.82, 9.97, 'No Stock' , '2016-09-21') +,(4013, 606, 5 , 19.82, 9.97, 'No Stock' , '2016-09-21') +,(4014, 601, 3 , 37.57, 4.99, 'Allocated', '2016-08-21') +,(4015, 611, 8 , 95.27, 6.62, 'Allocated', '2017-03-13') +,(4015, 612, 2 , 89.63, 4.14, 'Allocated', '2016-04-07') +,(4015, 615, 8 , 69.03, 1.11, 'On Order' , '2016-08-15') +,(4016, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4016, 611, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4016, 612, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4017, 605, 6 , 75.88, 2.1 , 'On Order' , '2017-02-15') +,(4017, 610, 4 , 26.43, 7.18, 'On Order' , '2016-04-30') +,(4017, 619, 6 , 77.91, 9.26, 'No Stock' , '2016-04-02') +,(4018, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4019, 615, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4020, 614, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4021, 604, 3 , 20.14, 8.54, 'No Stock' , '2016-06-26') +,(4022, 614, 7 , 41.61, 4.62, 'On Order' , '2016-09-09') +,(4022, 619, 1 , 10.45, 2.56, 'On Order' , '2016-10-18') +,(4023, 607, 6 , 7.68 , 5.59, 'On Order' , '2016-11-15') +,(4023, 611, 7 , 89.4 , 1.71, 'No Stock' , '2016-04-03') +,(4024, 613, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4024, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4024, 608, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4024, 609, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4025, 612, 6 , 81.24, 3.52, 'Allocated', '2016-04-25') +,(4025, 614, 4 , 14.07, 2.58, 'On Order' , '2016-09-11') +,(4026, 617, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4026, 618, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4027, 611, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4027, 612, 3 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4027, 613, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4028, 605, 5 , 95.04, 7.82, 'On Order' , '2016-07-24') +,(4028, 615, 8 , 74.56, 1.78, 'Allocated', '2016-12-09') +,(4029, 604, 1 , 11.06, 5.37, 'On Order' , '2016-11-26') +,(4029, 603, 1 , 11.06, 5.37, 'On Order' , '2016-11-26') +,(4029, 607, 1 , 11.06, 5.37, 'On Order' , '2016-11-26') +,(4030, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4030, 620, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4030, 619, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4031, 605, 7 , 75.42, 2.92, 'No Stock' , '2017-02-12') +,(4031, 608, 7 , 75.42, 2.92, 'No Stock' , '2017-02-12') +,(4031, 609, 7 , 75.42, 2.92, 'No Stock' , '2017-02-12') +,(4031, 615, 7 , 75.42, 2.92, 'No Stock' , '2017-02-12') +,(4032, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4032, 612, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4032, 611, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4032, 619, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4033, 615, 4 , 45.55, 6.19, 'Allocated', '2016-05-09') +,(4033, 609, 3 , 45.55, 6.19, 'Allocated', '2016-05-09') +,(4033, 620, 1 , 45.55, 6.19, 'Allocated', '2016-05-09') +,(4034, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4034, 620, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4034, 609, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4035, 613, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4035, 614, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4035, 619, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4036, 604, 1 , 46.63, 4.25, 'No Stock' , '2016-05-04') +,(4036, 605, 6 , 66.75, 9.97, 'Allocated', '2017-02-25') +,(4037, 615, 2 , 44.76, 7.22, 'On Order' , '2017-03-01') +,(4037, 612, 2 , 44.76, 7.22, 'On Order' , '2017-03-01') +,(4038, 602, 2 , 13.25, 7.66, 'On Order' , '2016-07-13') +,(4038, 620, 3 , 13.25, 7.66, 'On Order' , '2016-07-13') +,(4039, 609, 1 , 99.68, 6.09, 'No Stock' , '2016-07-24') +,(4039, 619, 3 , 99.68, 6.09, 'No Stock' , '2016-07-24') +,(4039, 620, 1 , 99.68, 6.09, 'No Stock' , '2016-07-24') +,(4040, 612, 2 , 79.64, 6.72, 'Allocated', '2016-04-24') +,(4040, 620, 2 , 79.64, 6.72, 'Allocated', '2016-04-24') +,(4041, 615, 9 , 42.79, 8.92, 'No Stock' , '2016-03-31') +,(4041, 612, 2 , 42.79, 8.92, 'No Stock' , '2016-03-31') +,(4041, 620, 1 , 42.79, 8.92, 'No Stock' , '2016-03-31') +,(4042, 617, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4042, 613, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4042, 620, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4043, 611, 7 , 87.95, 8.57, 'No Stock' , '2016-06-18') +,(4043, 619, 3 , 87.95, 8.57, 'No Stock' , '2016-06-18') +,(4043, 620, 1 , 87.95, 8.57, 'No Stock' , '2016-06-18') +,(4044, 602, 8 , 47.3 , 3.26, 'On Order' , '2016-11-05') +,(4044, 612, 3 , 79.42, 6.56, 'On Order' , '2017-02-11') +,(4045, 603, 3 , 31.01, 7.2 , 'No Stock' , '2016-11-11') +,(4045, 604, 10, 43.54, 6.8 , 'Allocated', '2016-11-13') +,(4045, 608, 7 , 15.2 , 3.58, 'Allocated', '2017-01-18') +,(4046, 611, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4047, 619, 2 , 81.11, 8.77, 'No Stock' , '2016-06-17') +,(4047, 620, 8 , 1.54 , 6.85, 'No Stock' , '2016-05-05') +,(4048, 605, 7 , 13.52, 2.44, 'On Order' , '2016-07-06') +,(4049, 603, 7 , 40.99, 5.77, 'Allocated', '2017-02-22') +,(4049, 609, 10, 90.45, 2.75, 'Allocated', '2017-01-26') +,(4049, 612, 10, 24.28, 9.85, 'No Stock' , '2016-10-01') +,(4050, 606, 4 , 27.84, 1.49, 'No Stock' , '2016-12-18') +,(4050, 607, 2 , 72.72, 3.08, 'On Order' , '2016-04-24') +,(4050, 612, 2 , 76.85, 5.15, 'No Stock' , '2017-02-25') +,(4051, 603, 1 , 57.6 , 1.77, 'Allocated', '2016-07-02') +,(4052, 605, 9 , 50.74, 6.47, 'No Stock' , '2016-05-22') +,(4053, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4054, 601, 10, 55.48, 9.19, 'On Order' , '2016-07-12') +,(4055, 606, 10, 57.17, 3.06, 'No Stock' , '2016-11-20') +,(4056, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4057, 609, 1 , 79.3 , 9.42, 'On Order' , '2016-10-01') +,(4057, 610, 5 , 41.21, 5.55, 'No Stock' , '2016-07-20') +,(4057, 618, 3 , 68.99, 6.42, 'On Order' , '2016-08-19') +,(4058, 604, 6 , 36.78, 6.96, 'Allocated', '2016-05-20') +,(4058, 619, 6 , 79.01, 4.3 , 'Allocated', '2016-06-19') +,(4059, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4060, 603, 10, 40.38, 2.1 , 'On Order' , '2017-02-05') +,(4060, 604, 9 , 41.98, 1.46, 'Allocated', '2017-01-17') +,(4061, 605, 1 , 41.12, 2.51, 'On Order' , '2016-09-05') +,(4061, 602, 1 , 41.12, 2.51, 'On Order' , '2016-09-05') +,(4061, 603, 1 , 41.12, 2.51, 'On Order' , '2016-09-05') +,(4062, 604, 1 , 71.77, 4.91, 'No Stock' , '2016-11-20') +,(4062, 605, 2 , 41.12, 2.51, 'On Order' , '2016-09-05') +,(4062, 607, 1 , 41.12, 2.51, 'On Order' , '2016-09-05') +,(4063, 608, 1 , 62.85, 4.62, 'Allocated', '2016-03-25') +,(4063, 605, 4 , 41.12, 2.51, 'On Order' , '2016-09-05') +,(4063, 607, 1 , 41.12, 2.51, 'On Order' , '2016-09-05') +,(4064, 615, 1 , 68.27, 6.79, 'No Stock' , '2016-07-06') +,(4064, 602, 2 , 41.12, 2.51, 'On Order' , '2016-09-05') +,(4064, 603, 5 , 41.12, 2.51, 'On Order' , '2016-09-05') +,(4064, 605, 1 , 41.12, 2.51, 'On Order' , '2016-09-05') +,(4065, 610, 5 , 99.76, 1.78, 'Allocated', '2016-09-23') +,(4066, 605, 1 , 41.12, 2.51, 'On Order' , '2016-09-05') +,(4066, 604, 9 , 2.63 , 7.42, 'Allocated', '2016-08-12') +,(4066, 615, 7 , 25.14, 7.22, 'No Stock' , '2016-03-27') +,(4067, 618, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4068, 602, 4 , 12.67, 5.17, 'Allocated', '2016-08-30') +,(4068, 603, 1 , 87.81, 1.02, 'On Order' , '2016-10-12') +,(4069, 620, 7 , 89.85, 3.49, 'Allocated', '2017-02-22') +,(4070, 615, 5 , 94.08, 4.09, 'On Order' , '2017-01-31') +,(4071, 616, 1, 10.00, 1.00, 'Allocated', '2016-12-14') +,(4072, 601, 3 , 89.95, 9.61, 'No Stock' , '2016-11-25') +,(4072, 612, 5 , 34.51, 5.99, 'No Stock' , '2016-05-25') +,(4073, 613, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4074, 606, 10, 98.2 , 3.63, 'On Order' , '2016-04-30') +,(4075, 605, 8 , 69.36, 9.16, 'On Order' , '2016-07-19') +,(4075, 606, 1 , 3.95 , 8.66, 'On Order' , '2016-04-09') +,(4076, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4077, 602, 10, 90.58, 5.92, 'No Stock' , '2016-06-23') +,(4077, 609, 1 , 8.25 , 3.74, 'No Stock' , '2016-12-07') +,(4077, 615, 9 , 86.2 , 4.5 , 'Allocated', '2017-03-10') +,(4078, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4078, 612, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4078, 618, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4079, 615, 7 , 1.95 , 1.76, 'On Order' , '2017-03-04') +,(4079, 613, 2 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4079, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4080, 608, 5 , 26.84, 9.03, 'On Order' , '2016-11-13') +,(4080, 609, 3 , 41.76, 4.08, 'Allocated', '2016-09-10') +,(4081, 604, 9 , 5.49 , 8.45, 'On Order' , '2016-10-21') +,(4082, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4083, 602, 1 , 44.85, 5.16, 'No Stock' , '2016-09-16') +,(4084, 604, 4 , 58.27, 4.09, 'Allocated', '2016-08-12') +,(4085, 605, 8 , 93.54, 7.49, 'On Order' , '2016-11-24') +,(4086, 615, 2 , 94.02, 1.63, 'No Stock' , '2016-09-01') +,(4087, 601, 2 , 79.39, 3.86, 'No Stock' , '2016-07-13') +,(4088, 615, 3 , 14.03, 3.74, 'Allocated', '2016-11-15') +,(4089, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4090, 611, 4 , 46.11, 1.53, 'No Stock' , '2016-07-25') +,(4091, 613, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4092, 602, 5 , 42.68, 7.92, 'On Order' , '2016-09-09') +,(4093, 615, 8 , 75.27, 5.92, 'No Stock' , '2016-07-09') +,(4094, 605, 7 , 91.05, 4.52, 'On Order' , '2017-02-21') +,(4095, 602, 6 , 58.5 , 9.62, 'On Order' , '2017-02-26') +,(4095, 604, 3 , 80.13, 4.11, 'No Stock' , '2016-12-01') +,(4095, 608, 1 , 23.96, 5.54, 'No Stock' , '2016-03-27') +,(4096, 601, 4 , 9.84 , 5.33, 'No Stock' , '2016-04-18') +,(4097, 605, 4 , 45.03, 5.61, 'On Order' , '2016-05-13') +,(4097, 606, 3 , 41.39, 3.59, 'On Order' , '2016-11-29') +,(4098, 607, 8 , 11.86, 2.74, 'No Stock' , '2016-11-23') +,(4099, 606, 2 , 54.09, 5.84, 'On Order' , '2016-10-08') +,(4100, 608, 3 , 6.62 , 1.25, 'Allocated', '2016-11-16') +,(4101, 617, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4102, 608, 1 , 2.54 , 9.62, 'On Order' , '2016-10-01') +,(4102, 609, 9 , 92.56, 5.98, 'On Order' , '2016-10-14') +,(4102, 610, 10, 26.81, 5.9 , 'On Order' , '2016-08-20') +,(4103, 606, 6 , 71.32, 9.88, 'No Stock' , '2016-09-10') +,(4103, 608, 1 , 73.91, 9.79, 'No Stock' , '2016-12-26') +,(4104, 603, 9 , 33.85, 4.08, 'Allocated', '2017-03-02') +,(4105, 601, 5 , 49.17, 1.99, 'On Order' , '2016-11-11') +,(4105, 606, 9 , 93.8 , 4.48, 'Allocated', '2017-01-06') +,(4106, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4107, 603, 2 , 24.95, 3.71, 'On Order' , '2016-07-20') +,(4107, 604, 5 , 43.75, 1.39, 'No Stock' , '2017-01-03') +,(4107, 608, 1 , 49.09, 8.72, 'Allocated', '2016-12-19') +,(4107, 616, 8 , 26.78, 1.21, 'On Order' , '2016-09-23') +,(4108, 604, 8 , 36.89, 3.04, 'On Order' , '2017-01-01') +,(4108, 619, 1 , 6.43 , 6.66, 'Allocated', '2016-05-03') +,(4109, 604, 9 , 89.19, 9.43, 'No Stock' , '2016-10-21') +,(4109, 609, 2 , 3.71 , 9.12, 'No Stock' , '2016-10-23') +,(4110, 605, 3 , 61.65, 7.86, 'On Order' , '2016-08-05') +,(4110, 606, 2 , 63.62, 7.4 , 'Allocated', '2016-06-07') +,(4111, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4111, 612, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4111, 613, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4112, 607, 5 , 63.7 , 9.44, 'On Order' , '2017-01-01') +,(4112, 610, 1 , 22.54, 8.3 , 'On Order' , '2016-04-09') +,(4113, 604, 6 , 86.01, 4.4 , 'Allocated', '2017-01-05') +,(4113, 611, 5 , 39.64, 4.58, 'Allocated', '2017-02-26') +,(4113, 615, 3 , 22.49, 3.61, 'Allocated', '2016-08-24') +,(4113, 619, 6 , 7.6 , 6.63, 'On Order' , '2016-05-01') +,(4114, 610, 6 , 3.77 , 4.79, 'Allocated', '2017-01-18') +,(4114, 608, 2 , 3.77 , 4.79, 'Allocated', '2017-01-18') +,(4114, 609, 3 , 3.77 , 4.79, 'Allocated', '2017-01-18') +,(4115, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4115, 620, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4116, 610, 5 , 54.21, 9.53, 'On Order' , '2016-05-11') +,(4116, 620, 3 , 54.21, 9.53, 'On Order' , '2016-05-11') +,(4116, 615, 1 , 54.21, 9.53, 'On Order' , '2016-05-11') +,(4117, 603, 7 , 91.81, 4.35, 'On Order' , '2016-04-18') +,(4117, 610, 9 , 79.15, 6.8 , 'Allocated', '2017-02-09') +,(4118, 611, 8 , 1.55 , 8.73, 'On Order' , '2016-08-18') +,(4118, 615, 3 , 1.55 , 8.73, 'On Order' , '2016-08-18') +,(4118, 612, 1 , 1.55 , 8.73, 'On Order' , '2016-08-18') +,(4119, 611, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4119, 615, 8 , 1.55 , 8.73, 'On Order' , '2016-08-18') +,(4119, 612, 4 , 1.55 , 8.73, 'On Order' , '2016-08-18') +,(4120, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4120, 612, 2 , 1.55 , 8.73, 'On Order' , '2016-08-18') +,(4120, 611, 8 , 1.55 , 8.73, 'On Order' , '2016-08-18') +,(4121, 602, 3 , 7.09 , 6.48, 'No Stock' , '2016-06-03') +,(4121, 612, 2 , 1.55 , 8.73, 'On Order' , '2016-08-18') +,(4121, 611, 1 , 1.55 , 8.73, 'On Order' , '2016-08-18') +,(4122, 606, 5 , 44.99, 1.66, 'No Stock' , '2016-05-08') +,(4122, 611, 2 , 1.55 , 8.73, 'On Order' , '2016-08-18') +,(4122, 612, 6 , 1.55 , 8.73, 'On Order' , '2016-08-18') +,(4123, 607, 10, 4.78 , 1.32, 'Allocated', '2016-12-28') +,(4124, 604, 1 , 18.79, 6.75, 'On Order' , '2017-01-05') +,(4125, 605, 9 , 59.37, 1.61, 'On Order' , '2016-07-24') +,(4125, 608, 1 , 72.49, 2.72, 'On Order' , '2016-08-22') +,(4126, 610, 10, 13.83, 1.15, 'On Order' , '2016-09-29') +,(4126, 615, 10, 71.77, 9.08, 'No Stock' , '2017-02-24') +,(4127, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4128, 605, 6 , 94.61, 7.16, 'No Stock' , '2017-02-09') +,(4128, 616, 3 , 4.67 , 2.72, 'On Order' , '2016-04-06') +,(4129, 610, 5 , 73.89, 8.17, 'On Order' , '2016-04-30') +,(4130, 608, 6 , 47.42, 8.39, 'No Stock' , '2017-02-27') +,(4131, 602, 5 , 28.62, 6.07, 'No Stock' , '2016-03-21') +,(4132, 602, 7 , 38.86, 3.58, 'Allocated', '2016-06-21') +,(4132, 604, 4 , 89.39, 2.36, 'No Stock' , '2016-12-20') +,(4132, 605, 5 , 29.97, 9.78, 'No Stock' , '2016-08-03') +,(4133, 611, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4133, 613, 2 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4133, 615, 4 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4134, 606, 1 , 73.57, 3.21, 'Allocated', '2016-04-07') +,(4134, 608, 1 , 65.61, 8.68, 'On Order' , '2017-01-14') +,(4135, 603, 2 , 7.24 , 2.61, 'Allocated', '2017-01-02') +,(4135, 607, 6 , 15.99, 6.23, 'No Stock' , '2016-12-16') +,(4135, 609, 6 , 26.55, 2.9 , 'On Order' , '2016-11-25') +,(4135, 612, 8 , 17.99, 9.59, 'No Stock' , '2016-03-25') +,(4136, 606, 10, 16.82, 8.15, 'On Order' , '2016-06-22') +,(4137, 605, 2 , 39.96, 6.08, 'On Order' , '2016-05-22') +,(4138, 620, 6 , 4.6 , 3.68, 'Allocated', '2016-09-17') +,(4139, 601, 4 , 87.74, 7.37, 'No Stock' , '2016-11-25') +,(4140, 603, 10, 90.31, 6.8 , 'On Order' , '2016-05-23') +,(4140, 615, 8 , 82.86, 2.49, 'On Order' , '2016-12-24') +,(4141, 609, 7 , 20.28, 1.51, 'Allocated', '2017-02-10') +,(4142, 608, 7 , 55.47, 8.32, 'No Stock' , '2016-07-07') +,(4142, 619, 5 , 75.63, 1.64, 'Allocated', '2016-08-02') +,(4143, 606, 3 , 99.61, 4.9 , 'No Stock' , '2016-10-25') +,(4144, 604, 6 , 80.75, 3.9 , 'Allocated', '2016-09-09') +,(4145, 603, 3 , 57.97, 8.04, 'On Order' , '2016-06-17') +,(4146, 611, 8 , 69.7 , 6.14, 'On Order' , '2016-04-15') +,(4147, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4148, 602, 4 , 67.89, 1.73, 'Allocated', '2016-03-26') +,(4149, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4150, 615, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4151, 617, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4151, 618, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4152, 608, 10, 97.82, 9.97, 'No Stock' , '2016-07-11') +,(4152, 620, 10, 97.82, 9.97, 'No Stock' , '2016-07-11') +,(4153, 615, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4153, 618, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4153, 601, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4153, 613, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4154, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4154, 604, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4155, 606, 7 , 42.62, 2.57, 'No Stock' , '2017-02-11') +,(4155, 607, 2 , 83.04, 5.25, 'On Order' , '2016-09-01') +,(4155, 610, 6 , 90.56, 6.31, 'On Order' , '2016-10-18') +,(4156, 615, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4156, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4156, 601, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4157, 603, 9 , 93.09, 5.35, 'Allocated', '2016-08-03') +,(4157, 607, 6 , 40.05, 3.9 , 'On Order' , '2017-01-13') +,(4158, 612, 1 , 17.5 , 6.29, 'Allocated', '2016-04-14') +,(4158, 611, 1 , 17.5 , 6.29, 'Allocated', '2016-04-14') +,(4159, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4159, 612, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4160, 610, 8 , 42.67, 5.88, 'No Stock' , '2017-01-04') +,(4160, 620, 10, 87.78, 4.28, 'Allocated', '2016-11-20') +,(4161, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4161, 611, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4162, 613, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4162, 620, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4163, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4163, 612, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4163, 611, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4164, 607, 6 , 80.56, 4.32, 'On Order' , '2016-08-17') +,(4164, 608, 6 , 80.56, 4.32, 'On Order' , '2016-08-17') +,(4164, 617, 6 , 80.56, 4.32, 'On Order' , '2016-08-17') +,(4165, 604, 8 , 72.67, 7.56, 'On Order' , '2016-08-09') +,(4165, 603, 8 , 72.67, 7.56, 'On Order' , '2016-08-09') +,(4165, 614, 8 , 72.67, 7.56, 'On Order' , '2016-08-09') +,(4166, 601, 3 , 34.36, 9.92, 'No Stock' , '2016-09-01') +,(4166, 602, 10, 33.99, 5.76, 'Allocated', '2016-05-26') +,(4167, 603, 5 , 58.2 , 1.14, 'Allocated', '2016-06-20') +,(4167, 608, 1 , 20.01, 6.24, 'No Stock' , '2017-01-05') +,(4168, 601, 1 , 59.45, 7.44, 'On Order' , '2016-09-06') +,(4168, 605, 1 , 59.45, 7.44, 'On Order' , '2016-09-06') +,(4169, 604, 2 , 93.43, 2.26, 'No Stock' , '2017-01-16') +,(4169, 609, 2 , 93.43, 2.26, 'No Stock' , '2017-01-16') +,(4169, 607, 2 , 93.43, 2.26, 'No Stock' , '2017-01-16') +,(4170, 607, 10, 68.27, 9.02, 'No Stock' , '2017-02-11') +,(4170, 620, 10, 68.27, 9.02, 'No Stock' , '2017-02-11') +,(4171, 610, 10, 49.38, 3.71, 'Allocated', '2016-04-25') +,(4171, 601, 10, 49.38, 3.71, 'Allocated', '2016-04-25') +,(4171, 611, 10, 49.38, 3.71, 'Allocated', '2016-04-25') +,(4171, 613, 10, 49.38, 3.71, 'Allocated', '2016-04-25') +,(4171, 615, 10, 49.38, 3.71, 'Allocated', '2016-04-25') +,(4172, 606, 6 , 88.26, 2.95, 'No Stock' , '2016-04-11') +,(4172, 609, 7 , 60.97, 1.12, 'Allocated', '2016-10-14') +,(4173, 601, 10, 11.22, 9.03, 'On Order' , '2017-01-26') +,(4173, 603, 10, 11.22, 9.03, 'On Order' , '2017-01-26') +,(4173, 605, 10, 11.22, 9.03, 'On Order' , '2017-01-26') +,(4174, 607, 8 , 53.95, 6.31, 'No Stock' , '2016-04-30') +,(4174, 612, 2 , 13.56, 7.15, 'No Stock' , '2016-07-08') +,(4175, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4175, 617, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4175, 620, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4176, 615, 2 , 70.24, 1.09, 'Allocated', '2017-01-21') +,(4176, 616, 2 , 70.24, 1.09, 'Allocated', '2017-01-21') +,(4177, 601, 2 , 17.86, 2.99, 'Allocated', '2016-05-07') +,(4177, 604, 8 , 18.39, 6.73, 'On Order' , '2016-04-05') +,(4178, 605, 9 , 23.59, 8.82, 'Allocated', '2016-09-11') +,(4178, 607, 9 , 62.59, 7.88, 'No Stock' , '2016-04-18') +,(4179, 614, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4180, 602, 7 , 48.19, 6.05, 'Allocated', '2016-11-30') +,(4180, 603, 1 , 48.19, 6.05, 'Allocated', '2016-11-30') +,(4181, 602, 2 , 64.2 , 4.74, 'Allocated', '2016-08-16') +,(4181, 603, 3 , 41.45, 2.49, 'Allocated', '2016-04-18') +,(4181, 604, 5 , 86.42, 6.42, 'No Stock' , '2016-05-03') +,(4182, 611, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4183, 615, 1 , 68.34, 8.16, 'On Order' , '2016-12-22') +,(4184, 601, 2 , 95.18, 2.74, 'Allocated', '2016-09-16') +,(4184, 603, 9 , 99.41, 9.44, 'No Stock' , '2016-07-01') +,(4184, 604, 1 , 29.52, 3.48, 'Allocated', '2016-04-02') +,(4185, 602, 2 , 22.84, 5.5 , 'On Order' , '2016-10-20') +,(4185, 611, 10, 34.57, 4.27, 'Allocated', '2017-02-05') +,(4185, 612, 4 , 85.32, 5.03, 'Allocated', '2017-03-14') +,(4185, 619, 9 , 64.97, 1.57, 'No Stock' , '2016-10-19') +,(4186, 605, 2 , 80.08, 7.63, 'On Order' , '2017-01-31') +,(4187, 602, 9 , 87.92, 7.74, 'On Order' , '2016-11-13') +,(4187, 616, 3 , 73.39, 6.52, 'On Order' , '2016-09-15') +,(4188, 604, 8 , 30.36, 1.97, 'No Stock' , '2016-06-05') +,(4188, 605, 5 , 70.95, 6.11, 'On Order' , '2016-03-31') +,(4188, 611, 3 , 23.18, 8.76, 'On Order' , '2016-03-30') +,(4189, 608, 4 , 52.23, 3.08, 'No Stock' , '2016-04-12') +,(4190, 602, 10, 17.3 , 4.18, 'No Stock' , '2016-03-29') +,(4190, 615, 6 , 34.29, 9.45, 'Allocated', '2016-11-01') +,(4191, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4192, 602, 4 , 90.29, 5.09, 'Allocated', '2017-02-14') +,(4192, 605, 8 , 1.03 , 1.28, 'On Order' , '2017-02-14') +,(4192, 615, 1 , 11.61, 7.49, 'No Stock' , '2016-08-11') +,(4193, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4194, 618, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4195, 617, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4196, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4197, 608, 10, 60.36, 3.99, 'On Order' , '2016-10-30') +,(4198, 606, 1 , 58.71, 2.32, 'No Stock' , '2016-06-26') +,(4199, 602, 8 , 12.59, 9.45, 'Allocated', '2016-04-16') +,(4199, 603, 7 , 5.5 , 2.26, 'No Stock' , '2016-11-28') +,(4200, 605, 10, 92.81, 1.0 , 'No Stock' , '2017-03-07') +,(4201, 606, 3 , 46.48, 5.94, 'Allocated', '2016-12-15') +,(4201, 608, 2 , 97.29, 5.87, 'No Stock' , '2016-09-12') +,(4202, 609, 4 , 56.7 , 2.07, 'No Stock' , '2017-03-11') +,(4202, 608, 4 , 56.7 , 2.07, 'No Stock' , '2017-03-11') +,(4203, 610, 2 , 29.12, 6.46, 'No Stock' , '2016-10-27') +,(4203, 609, 4 , 56.7 , 2.07, 'No Stock' , '2017-03-11') +,(4204, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4204, 609, 4 , 56.7 , 2.07, 'No Stock' , '2017-03-11') +,(4205, 610, 4 , 78.23, 5.95, 'No Stock' , '2016-06-21') +,(4205, 609, 4 , 56.7 , 2.07, 'No Stock' , '2017-03-11') +,(4206, 603, 2 , 40.49, 6.94, 'On Order' , '2017-02-23') +,(4206, 619, 6 , 80.19, 3.28, 'No Stock' , '2017-01-21') +,(4207, 604, 9 , 84.48, 7.01, 'No Stock' , '2016-08-17') +,(4207, 605, 9 , 41.79, 1.55, 'On Order' , '2016-06-27') +,(4207, 610, 5 , 12.3 , 9.51, 'On Order' , '2016-05-17') +,(4208, 603, 7 , 37.26, 3.68, 'Allocated', '2016-03-30') +,(4208, 605, 5 , 82.65, 2.76, 'On Order' , '2016-12-11') +,(4208, 607, 1 , 84.88, 8.67, 'No Stock' , '2016-04-28') +,(4208, 609, 1 , 88.01, 1.98, 'Allocated', '2016-10-04') +,(4208, 610, 6 , 88.85, 4.2 , 'No Stock' , '2016-04-19') +,(4209, 606, 6 , 46.31, 8.98, 'Allocated', '2016-04-20') +,(4210, 603, 2 , 92.12, 8.78, 'No Stock' , '2016-12-11') +,(4210, 609, 7 , 70.37, 6.89, 'Allocated', '2016-06-23') +,(4211, 614, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4212, 613, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4213, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4214, 608, 3 , 37.43, 5.18, 'Allocated', '2016-05-15') +,(4214, 610, 9 , 35.48, 7.16, 'On Order' , '2017-02-13') +,(4214, 611, 7 , 84.99, 8.17, 'No Stock' , '2016-07-08') +,(4215, 610, 5 , 4.35 , 2.65, 'Allocated', '2016-07-24') +,(4216, 606, 3 , 79.91, 8.92, 'Allocated', '2016-05-02') +,(4216, 608, 8 , 45.75, 3.7 , 'Allocated', '2017-02-24') +,(4216, 615, 1 , 55.11, 8.94, 'No Stock' , '2016-05-06') +,(4217, 605, 5 , 40.67, 3.31, 'On Order' , '2016-11-09') +,(4217, 610, 5 , 20.0 , 8.58, 'On Order' , '2016-07-27') +,(4218, 615, 7 , 34.14, 8.03, 'Allocated', '2016-11-12') +,(4218, 619, 9 , 62.61, 5.74, 'On Order' , '2016-11-08') +,(4219, 604, 9 , 46.24, 2.42, 'No Stock' , '2016-10-31') +,(4219, 613, 7 , 26.63, 3.9 , 'No Stock' , '2016-12-04') +,(4219, 619, 1 , 98.58, 7.38, 'No Stock' , '2016-08-06') +,(4220, 604, 5 , 66.78, 9.28, 'No Stock' , '2016-10-09') +,(4220, 609, 6 , 62.82, 9.71, 'No Stock' , '2016-04-06') +,(4221, 602, 8 , 8.44 , 1.85, 'Allocated', '2016-11-25') +,(4222, 601, 10, 84.14, 2.59, 'No Stock' , '2016-06-25') +,(4222, 604, 9 , 39.15, 8.12, 'No Stock' , '2016-09-27') +,(4223, 602, 2 , 74.35, 9.94, 'Allocated', '2016-04-18') +,(4223, 611, 4 , 58.85, 6.75, 'No Stock' , '2017-03-04') +,(4224, 618, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4225, 605, 7 , 88.08, 8.69, 'On Order' , '2016-11-13') +,(4226, 606, 1 , 84.22, 3.54, 'On Order' , '2017-01-19') +,(4226, 608, 4 , 97.1 , 4.73, 'On Order' , '2016-04-25') +,(4227, 606, 9 , 74.37, 1.85, 'On Order' , '2016-12-19') +,(4227, 607, 9 , 74.37, 1.85, 'On Order' , '2016-12-19') +,(4228, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4228, 618, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4228, 610, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4229, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4229, 618, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4230, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4230, 618, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4230, 619, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4231, 611, 6 , 36.05, 2.56, 'On Order' , '2017-02-12') +,(4231, 618, 6 , 36.05, 2.56, 'On Order' , '2017-02-12') +,(4232, 615, 8 , 16.99, 7.26, 'No Stock' , '2016-11-28') +,(4232, 618, 8 , 16.99, 7.26, 'No Stock' , '2016-11-28') +,(4233, 608, 6 , 70.71, 1.75, 'Allocated', '2016-09-29') +,(4233, 610, 6 , 70.71, 1.75, 'Allocated', '2016-09-29') +,(4233, 618, 6 , 70.71, 1.75, 'Allocated', '2016-09-29') +,(4234, 604, 5 , 15.26, 9.54, 'No Stock' , '2016-04-06') +,(4234, 619, 5 , 15.26, 9.54, 'No Stock' , '2016-04-06') +,(4235, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4235, 619, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4236, 607, 8 , 46.97, 4.9 , 'Allocated', '2017-02-16') +,(4236, 617, 8 , 46.97, 4.9 , 'Allocated', '2017-02-16') +,(4236, 620, 8 , 46.97, 4.9 , 'Allocated', '2017-02-16') +,(4237, 602, 1 , 27.79, 8.84, 'No Stock' , '2016-11-07') +,(4237, 620, 1 , 27.79, 8.84, 'No Stock' , '2016-11-07') +,(4238, 602, 3 , 32.5 , 2.63, 'No Stock' , '2016-04-09') +,(4238, 608, 8 , 88.3 , 7.59, 'On Order' , '2016-08-18') +,(4239, 606, 7 , 99.65, 2.31, 'Allocated', '2017-03-04') +,(4239, 616, 7 , 99.65, 2.31, 'Allocated', '2017-03-04') +,(4240, 606, 10, 43.66, 2.48, 'No Stock' , '2017-02-05') +,(4240, 609, 2 , 56.95, 2.11, 'No Stock' , '2016-11-15') +,(4241, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4241, 618, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4241, 620, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4242, 605, 6 , 52.37, 8.56, 'No Stock' , '2016-06-10') +,(4242, 606, 6 , 52.37, 8.56, 'No Stock' , '2016-06-10') +,(4242, 607, 6 , 52.37, 8.56, 'No Stock' , '2016-06-10') +,(4243, 604, 2 , 6.33 , 1.16, 'No Stock' , '2016-04-09') +,(4243, 614, 2 , 6.33 , 1.16, 'No Stock' , '2016-04-09') +,(4243, 610, 2 , 6.33 , 1.16, 'No Stock' , '2016-04-09') +,(4244, 609, 4 , 67.62, 7.49, 'On Order' , '2016-09-03') +,(4244, 619, 4 , 67.62, 7.49, 'On Order' , '2016-09-03') +,(4244, 620, 4 , 67.62, 7.49, 'On Order' , '2016-09-03') +,(4245, 608, 1 , 32.47, 9.9 , 'Allocated', '2017-03-14') +,(4245, 618, 1 , 32.47, 9.9 , 'Allocated', '2017-03-14') +,(4245, 620, 1 , 32.47, 9.9 , 'Allocated', '2017-03-14') +,(4246, 603, 10, 53.94, 3.85, 'No Stock' , '2016-06-04') +,(4246, 606, 7 , 6.16 , 9.37, 'No Stock' , '2016-07-05') +,(4246, 607, 3 , 27.34, 1.97, 'Allocated', '2016-11-15') +,(4246, 611, 4 , 73.06, 1.26, 'No Stock' , '2017-02-28') +,(4247, 601, 4 , 66.41, 4.54, 'On Order' , '2017-02-26') +,(4247, 605, 2 , 61.24, 5.9 , 'Allocated', '2016-12-15') +,(4248, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4248, 620, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4249, 615, 2 , 74.52, 3.88, 'On Order' , '2016-06-09') +,(4249, 620, 2 , 74.52, 3.88, 'On Order' , '2016-06-09') +,(4249, 609, 2 , 74.52, 3.88, 'On Order' , '2016-06-09') +,(4250, 606, 7 , 63.89, 3.39, 'On Order' , '2016-12-31') +,(4250, 612, 8 , 75.06, 4.19, 'Allocated', '2016-06-26') +,(4251, 602, 1 , 1.75 , 1.73, 'No Stock' , '2016-12-07') +,(4251, 604, 8 , 43.98, 1.58, 'Allocated', '2016-07-28') +,(4252, 606, 4 , 94.24, 1.31, 'No Stock' , '2017-03-14') +,(4252, 619, 10, 41.46, 4.18, 'No Stock' , '2017-03-03') +,(4252, 620, 3 , 29.91, 4.91, 'On Order' , '2016-12-28') +,(4253, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4253, 610, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4254, 610, 3 , 5.01 , 9.93, 'On Order' , '2017-02-03') +,(4254, 620, 2 , 5.01 , 9.93, 'On Order' , '2017-02-03') +,(4254, 612, 3 , 5.01 , 9.93, 'On Order' , '2017-02-03') +,(4255, 610, 7 , 45.49, 8.0 , 'Allocated', '2016-08-01') +,(4255, 611, 7 , 45.49, 8.0 , 'Allocated', '2016-08-01') +,(4256, 604, 9 , 6.74 , 1.84, 'No Stock' , '2016-06-13') +,(4256, 612, 4 , 42.02, 2.86, 'Allocated', '2016-09-19') +,(4256, 620, 2 , 31.71, 4.97, 'Allocated', '2016-10-02') +,(4257, 617, 1, 10.00, 1.00, 'On Order' , '2016-12-14') +,(4257, 610, 1, 10.00, 1.00, 'On Order' , '2016-12-14') +,(4257, 611, 1, 10.00, 1.00, 'On Order' , '2016-12-14') +,(4258, 605, 7 , 22.45, 8.41, 'On Order' , '2016-06-02') +,(4258, 615, 3 , 69.12, 3.65, 'Allocated', '2017-02-27') +,(4258, 619, 4 , 62.32, 2.23, 'Allocated', '2017-02-20') +,(4259, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4260, 603, 1 , 27.68, 1.99, 'Allocated', '2016-09-20') +,(4260, 604, 3 , 59.65, 3.05, 'No Stock' , '2016-12-31') +,(4261, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4262, 602, 4 , 51.73, 3.06, 'Allocated', '2017-01-17') +,(4263, 612, 4 , 18.46, 7.86, 'Allocated', '2016-08-12') +,(4263, 615, 4 , 18.46, 7.86, 'Allocated', '2016-08-12') +,(4263, 616, 4 , 18.46, 7.86, 'Allocated', '2016-08-12') +,(4264, 604, 8 , 82.02, 9.19, 'Allocated', '2016-11-28') +,(4264, 614, 8 , 82.02, 9.19, 'Allocated', '2016-11-28') +,(4265, 618, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4265, 620, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4266, 601, 2 , 66.57, 6.27, 'Allocated', '2016-09-19') +,(4266, 602, 2 , 66.57, 6.27, 'Allocated', '2016-09-19') +,(4267, 601, 4 , 44.78, 6.86, 'No Stock' , '2016-09-27') +,(4267, 610, 4 , 19.08, 6.41, 'No Stock' , '2016-12-24') +,(4268, 611, 1 , 24.72, 8.14, 'Allocated', '2016-06-08') +,(4268, 612, 1 , 24.72, 8.14, 'Allocated', '2016-06-08') +,(4269, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4269, 617, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4269, 618, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4270, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4270, 612, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4270, 620, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4271, 603, 2 , 80.47, 4.81, 'Allocated', '2016-05-25') +,(4271, 604, 8 , 38.65, 4.02, 'No Stock' , '2016-05-09') +,(4272, 610, 7 , 66.28, 2.85, 'No Stock' , '2016-09-17') +,(4273, 612, 10, 85.38, 8.44, 'No Stock' , '2016-12-19') +,(4274, 613, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4275, 610, 8 , 1.12 , 8.65, 'Allocated', '2016-10-28') +,(4275, 615, 1 , 24.01, 5.55, 'No Stock' , '2016-12-30') +,(4276, 603, 3 , 44.76, 7.28, 'No Stock' , '2016-12-28') +,(4277, 610, 9 , 40.01, 8.62, 'No Stock' , '2016-11-10') +,(4278, 603, 6 , 32.0 , 1.23, 'Allocated', '2016-12-23') +,(4278, 608, 4 , 38.01, 9.45, 'Allocated', '2016-10-05') +,(4278, 609, 5 , 31.99, 5.41, 'No Stock' , '2016-10-23') +,(4279, 613, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4280, 606, 5 , 7.52 , 2.76, 'Allocated', '2016-05-27') +,(4280, 609, 4 , 37.09, 4.44, 'On Order' , '2016-08-10') +,(4281, 610, 9 , 37.07, 8.7 , 'On Order' , '2016-12-28') +,(4281, 611, 2 , 37.07, 8.7 , 'On Order' , '2016-12-28') +,(4281, 612, 1 , 37.07, 8.7 , 'On Order' , '2016-12-28') +,(4282, 601, 1 , 19.14, 3.98, 'On Order' , '2016-11-09') +,(4282, 606, 3 , 88.94, 6.79, 'On Order' , '2016-09-29') +,(4282, 609, 6 , 25.35, 5.22, 'Allocated', '2016-10-05') +,(4283, 601, 1 , 14.78, 3.31, 'On Order' , '2016-10-07') +,(4284, 606, 5 , 32.57, 7.22, 'On Order' , '2016-08-24') +,(4285, 604, 5 , 47.88, 3.77, 'No Stock' , '2016-12-09') +,(4285, 615, 8 , 9.28 , 2.13, 'Allocated', '2016-03-27') +,(4286, 620, 5 , 63.24, 7.62, 'Allocated', '2016-12-06') +,(4287, 602, 6 , 2.9 , 9.5 , 'On Order' , '2016-10-06') +,(4287, 605, 5 , 7.63 , 2.78, 'Allocated', '2016-08-22') +,(4287, 611, 1 , 8.98 , 3.39, 'Allocated', '2016-07-18') +,(4287, 614, 3 , 34.4 , 7.12, 'On Order' , '2017-03-04') +,(4288, 604, 6 , 57.67, 3.25, 'Allocated', '2016-05-18') +,(4289, 601, 7 , 19.32, 7.31, 'On Order' , '2017-01-21') +,(4289, 615, 10, 89.16, 2.08, 'No Stock' , '2016-06-03') +,(4290, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4291, 601, 1 , 68.5 , 2.58, 'Allocated', '2016-11-05') +,(4291, 603, 5 , 11.27, 5.56, 'Allocated', '2016-06-10') +,(4291, 606, 1 , 76.82, 3.31, 'Allocated', '2016-09-27') +,(4292, 608, 10, 27.45, 4.8 , 'On Order' , '2016-05-12') +,(4292, 610, 9 , 16.78, 5.96, 'No Stock' , '2016-05-05') +,(4293, 612, 4 , 69.21, 2.07, 'Allocated', '2016-08-23') +,(4294, 619, 4 , 81.5 , 9.13, 'Allocated', '2017-01-20') +,(4295, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4296, 613, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4297, 604, 4 , 19.21, 1.7 , 'Allocated', '2016-08-20') +,(4297, 606, 4 , 71.24, 5.74, 'No Stock' , '2016-10-11') +,(4298, 613, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4299, 603, 8 , 81.7 , 5.69, 'Allocated', '2016-07-06') +,(4300, 601, 5 , 35.51, 8.38, 'On Order' , '2016-12-23') +,(4300, 607, 5 , 46.94, 6.82, 'No Stock' , '2016-07-29') +,(4301, 605, 6 , 99.32, 1.22, 'Allocated', '2016-09-02') +,(4301, 620, 7 , 96.67, 6.9 , 'Allocated', '2016-11-24') +,(4302, 617, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4303, 605, 8 , 31.92, 5.62, 'On Order' , '2016-04-09') +,(4304, 615, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4305, 606, 1 , 2.53 , 1.15, 'On Order' , '2016-12-03') +,(4305, 609, 6 , 76.41, 7.87, 'Allocated', '2016-07-05') +,(4305, 612, 3 , 31.58, 5.53, 'On Order' , '2016-10-01') +,(4306, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4307, 601, 7 , 36.63, 3.9 , 'On Order' , '2016-09-16') +,(4307, 606, 10, 56.47, 8.96, 'No Stock' , '2017-02-25') +,(4308, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4309, 606, 6 , 84.25, 2.28, 'On Order' , '2016-04-07') +,(4310, 605, 7 , 15.88, 2.48, 'Allocated', '2017-02-17') +,(4311, 603, 2 , 67.26, 6.18, 'No Stock' , '2016-05-06') +,(4312, 619, 4 , 87.5 , 6.57, 'Allocated', '2017-03-14') +,(4313, 602, 3 , 87.01, 4.45, 'On Order' , '2016-08-30') +,(4313, 610, 7 , 54.92, 8.87, 'No Stock' , '2017-01-20') +,(4314, 602, 9 , 49.19, 2.67, 'Allocated', '2016-07-24') +,(4314, 607, 10, 32.19, 8.12, 'On Order' , '2016-11-23') +,(4315, 602, 7 , 9.25 , 3.78, 'On Order' , '2017-01-04') +,(4316, 613, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4317, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4318, 609, 5 , 29.17, 3.35, 'No Stock' , '2016-11-28') +,(4318, 610, 4 , 41.75, 3.7 , 'On Order' , '2016-09-09') +,(4318, 620, 5 , 81.63, 1.49, 'On Order' , '2016-04-16') +,(4319, 614, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4320, 613, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4321, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4322, 603, 2 , 21.09, 9.37, 'No Stock' , '2016-11-29') +,(4323, 608, 8 , 24.05, 9.49, 'On Order' , '2016-08-12') +,(4324, 607, 7 , 83.23, 1.48, 'On Order' , '2016-07-10') +,(4325, 608, 10, 35.28, 1.8 , 'Allocated', '2016-09-01') +,(4326, 602, 8 , 69.18, 4.43, 'No Stock' , '2016-07-31') +,(4326, 610, 2 , 24.44, 8.1 , 'No Stock' , '2016-03-29') +,(4327, 608, 3 , 22.57, 4.64, 'Allocated', '2016-03-23') +,(4328, 604, 1 , 55.53, 3.16, 'On Order' , '2016-12-14') +,(4328, 605, 2 , 38.78, 6.97, 'Allocated', '2017-03-04') +,(4328, 607, 5 , 28.94, 3.59, 'Allocated', '2016-08-01') +,(4329, 603, 6 , 65.93, 2.86, 'On Order' , '2016-10-25') +,(4330, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4331, 602, 5 , 37.37, 6.39, 'No Stock' , '2016-03-19') +,(4332, 606, 5 , 93.96, 3.31, 'No Stock' , '2016-08-09') +,(4332, 610, 5 , 3.77 , 6.74, 'Allocated', '2016-06-23') +,(4333, 608, 7 , 14.29, 3.95, 'On Order' , '2016-06-16') +,(4334, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4335, 609, 6 , 63.15, 9.3 , 'Allocated', '2016-08-31') +,(4336, 613, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4337, 610, 1 , 52.98, 5.68, 'Allocated', '2016-03-19') +,(4338, 610, 1 , 83.94, 3.56, 'Allocated', '2016-11-03') +,(4339, 604, 10, 78.06, 5.32, 'No Stock' , '2016-11-19') +,(4340, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4341, 609, 6 , 52.04, 7.63, 'No Stock' , '2016-11-25') +,(4341, 615, 1 , 9.44 , 8.66, 'No Stock' , '2016-09-06') +,(4342, 615, 6 , 67.41, 8.5 , 'Allocated', '2016-08-28') +,(4343, 615, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4344, 610, 10, 61.53, 5.36, 'On Order' , '2016-04-30') +,(4345, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4346, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4347, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4348, 608, 1 , 96.42, 4.57, 'On Order' , '2016-05-14') +,(4348, 610, 3 , 38.0 , 5.74, 'On Order' , '2016-05-30') +,(4348, 611, 6 , 38.59, 6.7 , 'On Order' , '2016-08-16') +,(4349, 613, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4350, 602, 8 , 81.72, 7.57, 'Allocated', '2016-08-18') +,(4350, 604, 6 , 95.31, 9.43, 'On Order' , '2016-12-29') +,(4350, 608, 9 , 43.57, 6.54, 'No Stock' , '2016-08-24') +,(4351, 602, 1 , 37.63, 3.31, 'No Stock' , '2016-08-26') +,(4351, 607, 9 , 83.22, 2.44, 'No Stock' , '2016-04-11') +,(4352, 602, 3 , 13.09, 3.98, 'No Stock' , '2016-10-03') +,(4352, 603, 9 , 88.58, 4.87, 'On Order' , '2017-03-05') +,(4352, 614, 4 , 47.62, 5.05, 'Allocated', '2016-05-30') +,(4353, 612, 9 , 28.8 , 1.77, 'Allocated', '2016-03-28') +,(4354, 618, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4355, 607, 4 , 20.25, 3.18, 'No Stock' , '2016-04-27') +,(4355, 608, 9 , 73.3 , 5.95, 'Allocated', '2016-12-08') +,(4355, 609, 7 , 26.16, 6.88, 'Allocated', '2016-12-09') +,(4356, 614, 8 , 93.97, 2.88, 'No Stock' , '2016-06-14') +,(4357, 605, 6 , 24.39, 5.53, 'No Stock' , '2016-07-31') +,(4357, 612, 4 , 71.28, 1.94, 'No Stock' , '2016-07-08') +,(4358, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4359, 617, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4360, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4361, 601, 6 , 45.27, 1.05, 'Allocated', '2016-03-29') +,(4361, 609, 10, 39.75, 1.28, 'On Order' , '2016-07-15') +,(4362, 603, 4 , 42.92, 5.17, 'No Stock' , '2016-09-24') +,(4363, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4364, 602, 8 , 90.01, 4.2 , 'On Order' , '2017-02-09') +,(4365, 601, 2 , 92.96, 3.73, 'Allocated', '2016-06-10') +,(4365, 603, 7 , 86.67, 9.6 , 'On Order' , '2016-07-31') +,(4366, 604, 6 , 52.01, 2.02, 'No Stock' , '2016-09-23') +,(4366, 605, 9 , 88.21, 3.68, 'On Order' , '2016-08-10') +,(4366, 609, 8 , 80.78, 3.99, 'No Stock' , '2016-05-07') +,(4367, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4368, 604, 4 , 53.46, 4.56, 'No Stock' , '2016-09-07') +,(4369, 612, 2 , 8.5 , 3.86, 'Allocated', '2017-01-20') +,(4370, 603, 9 , 46.22, 8.2 , 'On Order' , '2016-09-02') +,(4370, 604, 10, 10.38, 2.29, 'Allocated', '2016-06-03') +,(4371, 610, 10, 23.33, 4.07, 'On Order' , '2016-08-25') +,(4372, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4373, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4374, 604, 3 , 29.51, 2.34, 'No Stock' , '2017-03-07') +,(4375, 618, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4376, 608, 10, 5.55 , 3.21, 'No Stock' , '2016-09-14') +,(4377, 602, 9 , 91.62, 8.57, 'On Order' , '2016-08-26') +,(4378, 603, 8 , 74.83, 5.38, 'On Order' , '2016-04-11') +,(4379, 605, 9 , 53.7 , 5.65, 'On Order' , '2016-10-29') +,(4380, 618, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4381, 619, 1 , 35.54, 3.78, 'Allocated', '2016-07-27') +,(4382, 602, 8 , 33.64, 7.95, 'Allocated', '2016-11-05') +,(4382, 606, 4 , 68.17, 6.06, 'On Order' , '2017-01-22') +,(4383, 613, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4384, 615, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4385, 609, 1 , 18.13, 8.94, 'On Order' , '2016-03-25') +,(4386, 613, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4387, 602, 8 , 86.06, 9.74, 'Allocated', '2016-12-01') +,(4387, 606, 8 , 87.31, 7.53, 'No Stock' , '2016-06-12') +,(4387, 610, 3 , 47.55, 5.2 , 'Allocated', '2016-10-06') +,(4388, 602, 4 , 5.86 , 3.52, 'On Order' , '2016-05-09') +,(4388, 603, 8 , 24.25, 6.18, 'Allocated', '2016-09-22') +,(4388, 606, 6 , 29.46, 2.93, 'Allocated', '2016-09-11') +,(4388, 619, 1 , 36.76, 7.37, 'No Stock' , '2016-12-29') +,(4389, 602, 1 , 94.23, 9.35, 'Allocated', '2016-06-13') +,(4389, 603, 2 , 40.15, 8.39, 'No Stock' , '2016-08-09') +,(4390, 609, 4 , 7.02 , 5.61, 'On Order' , '2016-11-29') +,(4391, 607, 1 , 48.41, 8.97, 'On Order' , '2016-07-10') +,(4392, 603, 8 , 74.91, 8.23, 'No Stock' , '2016-04-07') +,(4393, 611, 4 , 55.83, 4.56, 'Allocated', '2016-04-13') +,(4394, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4395, 610, 7 , 82.73, 5.09, 'No Stock' , '2016-09-27') +,(4395, 617, 6 , 26.05, 6.29, 'On Order' , '2016-07-24') +,(4396, 605, 9 , 66.19, 1.32, 'No Stock' , '2017-02-05') +,(4396, 619, 4 , 3.15 , 1.04, 'On Order' , '2016-07-08') +,(4397, 619, 9 , 78.52, 7.64, 'No Stock' , '2016-08-19') +,(4398, 618, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4399, 610, 7 , 85.03, 4.71, 'No Stock' , '2016-05-04') +,(4400, 612, 9 , 36.85, 6.54, 'On Order' , '2016-10-31') +,(4400, 620, 2 , 15.9 , 5.62, 'On Order' , '2016-06-18') +,(4401, 602, 1 , 91.01, 4.13, 'No Stock' , '2016-09-27') +,(4401, 604, 10, 98.7 , 5.27, 'Allocated', '2016-06-03') +,(4402, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4403, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4404, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4405, 604, 3 , 46.99, 9.31, 'No Stock' , '2016-09-08') +,(4405, 610, 10, 4.94 , 1.68, 'On Order' , '2016-11-15') +,(4406, 602, 7 , 25.84, 7.67, 'On Order' , '2016-10-28') +,(4406, 606, 2 , 96.43, 5.64, 'No Stock' , '2016-11-14') +,(4406, 607, 10, 14.91, 3.88, 'No Stock' , '2016-06-18') +,(4407, 606, 9 , 20.82, 6.82, 'No Stock' , '2016-10-08') +,(4407, 608, 4 , 29.19, 7.26, 'No Stock' , '2016-12-15') +,(4408, 605, 4 , 12.83, 9.29, 'No Stock' , '2016-11-20') +,(4408, 615, 4 , 89.77, 2.7 , 'No Stock' , '2017-03-07') +,(4408, 619, 3 , 36.44, 8.86, 'No Stock' , '2016-12-17') +,(4409, 602, 2 , 36.96, 9.73, 'Allocated', '2016-08-19') +,(4409, 611, 7 , 94.98, 4.11, 'On Order' , '2016-05-17') +,(4410, 603, 7 , 13.79, 5.05, 'No Stock' , '2016-09-28') +,(4410, 604, 10, 70.24, 4.07, 'No Stock' , '2016-10-27') +,(4410, 607, 6 , 26.39, 7.8 , 'No Stock' , '2016-03-21') +,(4411, 602, 7 , 3.47 , 3.86, 'No Stock' , '2017-03-14') +,(4411, 611, 3 , 10.43, 3.67, 'On Order' , '2016-12-27') +,(4412, 605, 10, 26.07, 6.78, 'Allocated', '2017-02-16') +,(4412, 607, 7 , 76.81, 5.67, 'No Stock' , '2016-11-26') +,(4412, 610, 3 , 98.77, 3.34, 'On Order' , '2016-09-29') +,(4413, 617, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4414, 606, 5 , 26.01, 4.54, 'On Order' , '2016-03-23') +,(4415, 605, 5 , 74.86, 1.68, 'No Stock' , '2016-09-18') +,(4416, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4417, 601, 6 , 66.38, 5.22, 'No Stock' , '2016-07-07') +,(4417, 604, 7 , 96.99, 4.89, 'No Stock' , '2016-09-30') +,(4418, 609, 8 , 59.88, 5.52, 'Allocated', '2016-09-03') +,(4419, 604, 4 , 54.04, 4.95, 'On Order' , '2017-01-05') +,(4420, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4421, 605, 2 , 96.34, 1.7 , 'On Order' , '2016-06-10') +,(4422, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4423, 602, 3 , 25.88, 5.34, 'Allocated', '2016-04-19') +,(4423, 605, 5 , 4.06 , 2.22, 'On Order' , '2016-06-21') +,(4423, 608, 9 , 20.4 , 4.26, 'On Order' , '2016-08-17') +,(4424, 605, 8 , 44.66, 4.23, 'Allocated', '2016-11-06') +,(4425, 607, 7 , 18.91, 6.75, 'On Order' , '2016-11-28') +,(4425, 608, 4 , 60.11, 4.46, 'No Stock' , '2017-02-15') +,(4426, 606, 8 , 44.98, 6.5 , 'On Order' , '2016-11-13') +,(4426, 607, 4 , 78.46, 2.91, 'Allocated', '2017-01-26') +,(4427, 604, 2 , 61.91, 3.08, 'On Order' , '2016-09-01') +,(4427, 607, 10, 53.82, 8.17, 'No Stock' , '2016-11-09') +,(4428, 603, 2 , 81.15, 5.94, 'Allocated', '2016-12-01') +,(4428, 605, 9 , 48.38, 5.26, 'On Order' , '2016-07-08') +,(4429, 606, 10, 28.8 , 2.75, 'Allocated', '2017-03-03') +,(4430, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4431, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4432, 603, 9 , 52.12, 4.42, 'No Stock' , '2016-09-03') +,(4433, 601, 4 , 34.09, 9.94, 'No Stock' , '2016-04-18') +,(4433, 605, 1 , 65.04, 7.32, 'On Order' , '2016-04-04') +,(4434, 601, 2 , 61.28, 1.15, 'On Order' , '2016-03-18') +,(4434, 605, 2 , 61.28, 1.15, 'On Order' , '2016-03-18') +,(4434, 607, 2 , 61.28, 1.15, 'On Order' , '2016-03-18') +,(4435, 610, 10, 9.19 , 7.18, 'On Order' , '2016-12-08') +,(4435, 612, 10, 9.19 , 7.18, 'On Order' , '2016-12-08') +,(4435, 614, 10, 9.19 , 7.18, 'On Order' , '2016-12-08') +,(4436, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4436, 618, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4436, 620, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4437, 601, 7 , 56.48, 9.07, 'Allocated', '2016-05-05') +,(4437, 602, 1 , 98.71, 8.08, 'On Order' , '2017-03-16') +,(4437, 609, 7 , 12.69, 5.56, 'On Order' , '2016-12-16') +,(4438, 604, 1 , 97.24, 5.43, 'Allocated', '2016-10-22') +,(4438, 605, 1 , 97.24, 5.43, 'Allocated', '2016-10-22') +,(4438, 606, 1 , 97.24, 5.43, 'Allocated', '2016-10-22') +,(4439, 615, 5 , 11.46, 3.07, 'Allocated', '2016-06-10') +,(4439, 618, 1 , 97.24, 5.43, 'Allocated', '2016-10-22') +,(4439, 620, 1 , 97.24, 5.43, 'Allocated', '2016-10-22') +,(4440, 603, 9 , 66.05, 8.7 , 'No Stock' , '2016-11-08') +,(4440, 616, 1 , 97.24, 5.43, 'Allocated', '2016-10-22') +,(4440, 620, 1 , 97.24, 5.43, 'Allocated', '2016-10-22') +,(4441, 602, 4 , 79.49, 2.54, 'Allocated', '2017-02-19') +,(4441, 609, 4 , 88.86, 9.63, 'Allocated', '2016-06-06') +,(4442, 608, 1 , 55.66, 2.52, 'Allocated', '2016-09-08') +,(4443, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4444, 602, 4 , 52.6 , 9.83, 'On Order' , '2017-01-18') +,(4444, 605, 8 , 81.63, 9.58, 'On Order' , '2017-01-27') +,(4445, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4445, 601, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4445, 607, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4446, 602, 3 , 76.28, 1.52, 'On Order' , '2017-02-17') +,(4446, 606, 5 , 18.52, 2.13, 'On Order' , '2016-06-28') +,(4447, 609, 9 , 54.61, 4.47, 'Allocated', '2016-07-08') +,(4447, 608, 9 , 54.61, 4.47, 'Allocated', '2016-07-08') +,(4447, 607, 9 , 54.61, 4.47, 'Allocated', '2016-07-08') +,(4448, 605, 2 , 69.71, 2.05, 'No Stock' , '2016-09-17') +,(4448, 606, 2 , 69.71, 2.05, 'No Stock' , '2016-09-17') +,(4448, 607, 2 , 69.71, 2.05, 'No Stock' , '2016-09-17') +,(4449, 618, 6 , 35.62, 5.23, 'On Order' , '2016-04-15') +,(4449, 619, 10, 86.97, 4.63, 'No Stock' , '2016-09-29') +,(4450, 619, 8 , 26.14, 4.87, 'On Order' , '2016-12-09') +,(4450, 620, 8 , 26.14, 4.87, 'On Order' , '2016-12-09') +,(4450, 601, 8 , 26.14, 4.87, 'On Order' , '2016-12-09') +,(4451, 604, 3 , 47.48, 1.4 , 'Allocated', '2016-09-12') +,(4452, 615, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4453, 606, 2 , 4.03 , 8.07, 'On Order' , '2016-12-10') +,(4454, 619, 7 , 55.92, 9.0 , 'On Order' , '2016-10-07') +,(4455, 602, 10, 50.3 , 9.33, 'On Order' , '2017-01-11') +,(4455, 603, 1 , 7.68 , 7.77, 'Allocated', '2016-12-09') +,(4455, 605, 1 , 98.23, 3.73, 'Allocated', '2016-07-07') +,(4456, 607, 8 , 54.83, 9.57, 'No Stock' , '2016-08-16') +,(4456, 612, 7 , 97.34, 1.24, 'Allocated', '2016-05-13') +,(4457, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4458, 615, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4459, 617, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4460, 602, 8 , 37.95, 8.36, 'No Stock' , '2017-01-03') +,(4461, 620, 6 , 73.77, 2.02, 'Allocated', '2016-03-27') +,(4462, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4463, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4464, 606, 1 , 31.6 , 1.18, 'On Order' , '2016-09-05') +,(4465, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4466, 620, 10, 37.79, 1.76, 'Allocated', '2016-12-14') +,(4467, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4468, 610, 3 , 80.77, 6.87, 'Allocated', '2016-12-30') +,(4469, 602, 3 , 19.99, 5.21, 'No Stock' , '2016-08-11') +,(4469, 612, 3 , 73.21, 4.85, 'On Order' , '2017-02-19') +,(4470, 607, 4 , 7.7 , 5.78, 'No Stock' , '2016-04-22') +,(4471, 617, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4472, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4473, 609, 2 , 97.6 , 1.84, 'Allocated', '2016-05-12') +,(4474, 611, 7 , 12.5 , 6.31, 'Allocated', '2016-04-18') +,(4475, 603, 2 , 44.42, 7.21, 'No Stock' , '2017-03-10') +,(4476, 603, 4 , 43.47, 5.63, 'No Stock' , '2016-09-17') +,(4477, 603, 4 , 24.99, 4.46, 'No Stock' , '2016-09-10') +,(4478, 606, 1 , 29.13, 4.59, 'On Order' , '2017-03-04') +,(4478, 619, 4 , 58.05, 2.9 , 'Allocated', '2017-01-26') +,(4479, 603, 10, 93.2 , 7.79, 'On Order' , '2016-03-21') +,(4479, 609, 4 , 70.36, 9.01, 'Allocated', '2017-02-03') +,(4479, 610, 6 , 49.48, 6.79, 'Allocated', '2017-03-01') +,(4480, 608, 9 , 11.03, 6.26, 'On Order' , '2016-12-10') +,(4481, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4482, 603, 10, 28.92, 8.1 , 'No Stock' , '2016-05-27') +,(4482, 607, 6 , 90.11, 5.74, 'On Order' , '2016-04-29') +,(4482, 610, 4 , 7.12 , 2.89, 'On Order' , '2017-01-12') +,(4482, 611, 1 , 12.48, 8.56, 'No Stock' , '2016-08-16') +,(4482, 614, 10, 55.93, 1.63, 'On Order' , '2016-07-09') +,(4482, 618, 1 , 33.9 , 2.46, 'Allocated', '2016-07-11') +,(4483, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4484, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4485, 605, 7 , 99.92, 1.31, 'No Stock' , '2016-05-11') +,(4486, 615, 7 , 4.39 , 3.61, 'Allocated', '2016-06-24') +,(4487, 602, 9 , 69.78, 7.96, 'No Stock' , '2016-12-29') +,(4487, 607, 5 , 24.92, 8.97, 'On Order' , '2016-08-15') +,(4487, 615, 4 , 72.16, 8.97, 'On Order' , '2016-07-28') +,(4488, 601, 9 , 64.29, 1.52, 'On Order' , '2016-03-30') +,(4488, 609, 10, 66.79, 5.3 , 'On Order' , '2016-07-11') +,(4489, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4490, 615, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4491, 602, 3 , 16.8 , 5.22, 'On Order' , '2016-09-16') +,(4492, 607, 4 , 99.59, 2.45, 'On Order' , '2017-03-04') +,(4493, 615, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4494, 615, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4495, 607, 7 , 86.05, 5.4 , 'Allocated', '2016-10-03') +,(4496, 603, 10, 55.12, 3.71, 'Allocated', '2016-07-06') +,(4497, 607, 7 , 27.3 , 4.26, 'Allocated', '2017-01-29') +,(4498, 604, 10, 89.58, 1.25, 'Allocated', '2016-03-19') +,(4498, 610, 10, 69.32, 2.48, 'No Stock' , '2016-06-24') +,(4499, 601, 4 , 56.58, 6.73, 'No Stock' , '2017-02-21') +,(4499, 602, 4 , 56.58, 6.73, 'No Stock' , '2017-02-21') +,(4499, 603, 4 , 56.58, 6.73, 'No Stock' , '2017-02-21') +,(4500, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4500, 620, 10, 54.41, 7.02, 'No Stock' , '2016-11-30') +,(4500, 619, 10, 54.41, 7.02, 'No Stock' , '2016-11-30') +,(4501, 620, 10, 54.41, 7.02, 'No Stock' , '2016-11-30') +,(4501, 619, 10, 54.41, 7.02, 'No Stock' , '2016-11-30') +,(4501, 618, 10, 54.41, 7.02, 'No Stock' , '2016-11-30') +,(4502, 603, 2 , 27.21, 1.12, 'No Stock' , '2016-07-27') +,(4502, 605, 9 , 39.93, 3.2 , 'On Order' , '2016-11-21') +,(4503, 615, 6 , 85.1 , 8.26, 'No Stock' , '2016-05-03') +,(4503, 611, 6 , 85.1 , 8.26, 'No Stock' , '2016-05-03') +,(4503, 612, 6 , 85.1 , 8.26, 'No Stock' , '2016-05-03') +,(4504, 615, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4504, 618, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4504, 619, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4505, 612, 3 , 10.99, 1.62, 'Allocated', '2016-09-04') +,(4505, 609, 3 , 10.99, 1.62, 'Allocated', '2016-09-04') +,(4505, 601, 3 , 10.99, 1.62, 'Allocated', '2016-09-04') +,(4506, 602, 7 , 88.03, 1.0 , 'On Order' , '2016-09-23') +,(4506, 603, 9 , 66.78, 1.18, 'Allocated', '2017-02-03') +,(4506, 606, 10, 85.37, 2.21, 'Allocated', '2016-10-03') +,(4506, 609, 9 , 84.3 , 4.06, 'Allocated', '2016-12-08') +,(4507, 617, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4508, 611, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4509, 611, 2 , 99.24, 8.51, 'Allocated', '2016-08-12') +,(4509, 612, 8 , 2.41 , 3.81, 'On Order' , '2016-08-30') +,(4510, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4511, 610, 3 , 73.48, 8.4 , 'Allocated', '2016-12-06') +,(4511, 611, 4 , 7.29 , 6.91, 'Allocated', '2016-12-23') +,(4511, 616, 5 , 26.16, 6.26, 'On Order' , '2016-12-09') +,(4512, 614, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4513, 614, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4514, 605, 6 , 86.17, 7.08, 'No Stock' , '2017-01-25') +,(4514, 610, 6 , 71.51, 6.3 , 'No Stock' , '2017-01-23') +,(4515, 617, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4516, 618, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4517, 604, 10, 55.76, 7.34, 'Allocated', '2016-10-23') +,(4517, 619, 2 , 1.09 , 7.07, 'Allocated', '2016-08-19') +,(4518, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4519, 609, 9 , 61.39, 7.83, 'On Order' , '2016-07-01') +,(4520, 619, 9 , 72.61, 9.55, 'No Stock' , '2016-10-08') +,(4521, 610, 10, 19.38, 3.54, 'Allocated', '2016-12-08') +,(4521, 615, 8 , 54.35, 7.77, 'No Stock' , '2017-01-31') +,(4522, 602, 9 , 68.98, 6.79, 'No Stock' , '2016-11-28') +,(4523, 606, 9 , 79.86, 1.63, 'No Stock' , '2016-05-25') +,(4524, 602, 9 , 91.58, 3.46, 'On Order' , '2017-03-12') +,(4525, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4526, 603, 9 , 56.56, 7.64, 'On Order' , '2016-10-14') +,(4526, 604, 4 , 80.67, 2.83, 'No Stock' , '2016-07-29') +,(4526, 610, 5 , 88.8 , 2.86, 'On Order' , '2017-02-25') +,(4527, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4528, 605, 4 , 73.64, 8.81, 'Allocated', '2017-01-26') +,(4528, 609, 4 , 64.56, 4.09, 'On Order' , '2016-10-03') +,(4529, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4530, 602, 9 , 70.97, 4.73, 'On Order' , '2016-12-07') +,(4531, 606, 10, 26.53, 2.83, 'No Stock' , '2016-03-25') +,(4531, 615, 5 , 79.05, 6.82, 'Allocated', '2016-08-04') +,(4531, 619, 4 , 36.14, 7.09, 'No Stock' , '2016-03-26') +,(4532, 605, 5 , 6.28 , 9.94, 'No Stock' , '2017-03-13') +,(4532, 610, 8 , 17.25, 3.68, 'Allocated', '2016-05-28') +,(4533, 615, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4534, 606, 8 , 60.95, 9.33, 'Allocated', '2016-07-15') +,(4534, 607, 10, 49.84, 8.32, 'No Stock' , '2016-04-24') +,(4535, 610, 6 , 17.67, 1.81, 'On Order' , '2017-03-01') +,(4535, 619, 3 , 88.0 , 3.12, 'Allocated', '2016-07-11') +,(4536, 615, 5 , 88.08, 4.93, 'Allocated', '2016-12-04') +,(4537, 611, 2 , 14.77, 4.04, 'No Stock' , '2016-03-25') +,(4538, 603, 6 , 3.51 , 4.54, 'Allocated', '2016-04-21') +,(4539, 603, 7 , 6.58 , 4.8 , 'Allocated', '2016-05-14') +,(4540, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4540, 617, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4540, 618, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4541, 603, 5 , 37.47, 2.89, 'On Order' , '2016-04-07') +,(4541, 607, 4 , 35.17, 5.44, 'No Stock' , '2017-01-07') +,(4541, 615, 2 , 83.62, 4.01, 'Allocated', '2016-11-22') +,(4542, 605, 10, 92.43, 3.27, 'On Order' , '2017-01-23') +,(4542, 601, 10, 92.43, 3.27, 'On Order' , '2017-01-23') +,(4542, 603, 10, 92.43, 3.27, 'On Order' , '2017-01-23') +,(4543, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4543, 617, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4543, 619, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4544, 611, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4544, 610, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4544, 609, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4545, 617, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4545, 604, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4545, 606, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4546, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4546, 606, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4546, 608, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4547, 606, 4 , 81.81, 9.44, 'No Stock' , '2016-05-14') +,(4547, 602, 4 , 81.81, 9.44, 'No Stock' , '2016-05-14') +,(4547, 603, 4 , 81.81, 9.44, 'No Stock' , '2016-05-14') +,(4548, 614, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4548, 611, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4548, 615, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4549, 605, 9 , 24.12, 7.26, 'No Stock' , '2016-08-22') +,(4549, 606, 7 , 6.19 , 4.68, 'Allocated', '2016-09-02') +,(4550, 609, 8 , 49.04, 7.62, 'On Order' , '2016-06-10') +,(4550, 610, 10, 92.51, 4.84, 'No Stock' , '2017-02-24') +,(4551, 601, 3 , 85.1 , 2.45, 'Allocated', '2016-07-08') +,(4551, 602, 3 , 69.43, 1.31, 'No Stock' , '2017-03-15') +,(4551, 610, 1 , 19.38, 8.43, 'No Stock' , '2016-11-09') +,(4552, 601, 2 , 91.69, 8.12, 'On Order' , '2016-06-03') +,(4552, 613, 3 , 41.15, 6.38, 'No Stock' , '2016-04-11') +,(4553, 603, 1 , 5.22 , 8.43, 'On Order' , '2016-10-28') +,(4554, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4555, 607, 6 , 77.16, 3.07, 'No Stock' , '2016-04-29') +,(4555, 612, 9 , 81.31, 9.81, 'On Order' , '2017-01-24') +,(4556, 615, 10, 65.81, 7.25, 'Allocated', '2016-11-07') +,(4557, 603, 1 , 5.01 , 4.57, 'No Stock' , '2016-09-05') +,(4557, 606, 3 , 29.35, 8.67, 'On Order' , '2016-09-14') +,(4558, 601, 3 , 29.62, 7.16, 'No Stock' , '2016-11-06') +,(4559, 620, 2 , 87.83, 7.93, 'On Order' , '2016-11-09') +,(4560, 610, 7 , 9.51 , 8.01, 'On Order' , '2016-08-22') +,(4561, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4562, 610, 9 , 15.1 , 6.8 , 'Allocated', '2016-08-27') +,(4562, 611, 3 , 71.09, 1.26, 'No Stock' , '2016-07-12') +,(4563, 618, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4564, 602, 2 , 6.68 , 6.29, 'Allocated', '2016-03-19') +,(4565, 603, 7 , 81.01, 2.82, 'Allocated', '2017-03-06') +,(4565, 606, 8 , 99.68, 6.28, 'No Stock' , '2016-04-27') +,(4566, 614, 7 , 57.79, 4.48, 'No Stock' , '2016-11-02') +,(4567, 604, 7 , 94.42, 5.46, 'No Stock' , '2016-05-18') +,(4567, 605, 1 , 61.75, 1.31, 'Allocated', '2016-04-14') +,(4567, 608, 10, 25.99, 4.85, 'On Order' , '2016-05-01') +,(4567, 620, 9 , 62.17, 4.66, 'Allocated', '2016-06-11') +,(4568, 606, 8 , 66.92, 1.1 , 'Allocated', '2016-10-02') +,(4568, 607, 10, 95.6 , 9.17, 'On Order' , '2016-05-04') +,(4568, 608, 6 , 81.57, 6.24, 'No Stock' , '2017-01-24') +,(4569, 601, 10, 96.56, 6.33, 'Allocated', '2016-07-22') +,(4570, 610, 6 , 98.15, 2.57, 'No Stock' , '2016-06-28') +,(4571, 604, 8 , 5.15 , 2.51, 'No Stock' , '2016-07-11') +,(4572, 603, 2 , 59.21, 2.46, 'Allocated', '2016-11-18') +,(4573, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4574, 615, 3 , 14.81, 9.61, 'On Order' , '2016-05-04') +,(4575, 608, 10, 79.25, 7.08, 'On Order' , '2016-11-19') +,(4575, 611, 10, 79.25, 7.08, 'On Order' , '2016-11-19') +,(4575, 615, 10, 79.25, 7.08, 'On Order' , '2016-11-19') +,(4576, 607, 7 , 31.78, 2.05, 'On Order' , '2016-03-17') +,(4576, 608, 7 , 31.78, 2.05, 'On Order' , '2016-03-17') +,(4576, 610, 7 , 31.78, 2.05, 'On Order' , '2016-03-17') +,(4577, 604, 5 , 92.54, 6.26, 'On Order' , '2016-04-22') +,(4577, 603, 5 , 92.54, 6.26, 'On Order' , '2016-04-22') +,(4577, 601, 5 , 92.54, 6.26, 'On Order' , '2016-04-22') +,(4578, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4578, 602, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4578, 603, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4579, 615, 10, 70.19, 5.85, 'No Stock' , '2016-09-11') +,(4579, 616, 10, 70.19, 5.85, 'No Stock' , '2016-09-11') +,(4579, 620, 10, 70.19, 5.85, 'No Stock' , '2016-09-11') +,(4580, 601, 1 , 15.44, 3.76, 'No Stock' , '2016-04-08') +,(4580, 603, 1 , 15.44, 3.76, 'No Stock' , '2016-04-08') +,(4580, 605, 1 , 15.44, 3.76, 'No Stock' , '2016-04-08') +,(4580, 609, 1 , 15.44, 3.76, 'No Stock' , '2016-04-08') +,(4581, 607, 8 , 42.4 , 9.73, 'On Order' , '2016-06-04') +,(4581, 610, 9 , 79.73, 3.87, 'On Order' , '2016-04-20') +,(4581, 611, 5 , 78.01, 3.65, 'On Order' , '2016-03-17') +,(4581, 616, 5 , 50.56, 5.24, 'No Stock' , '2016-07-06') +,(4582, 609, 7 , 65.99, 9.4 , 'No Stock' , '2016-05-22') +,(4582, 607, 7 , 65.99, 9.4 , 'No Stock' , '2016-05-22') +,(4582, 606, 7 , 65.99, 9.4 , 'No Stock' , '2016-05-22') +,(4583, 604, 9 , 19.92, 6.51, 'Allocated', '2016-04-13') +,(4583, 610, 1 , 19.4 , 8.3 , 'On Order' , '2016-12-08') +,(4584, 617, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4584, 620, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4584, 613, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4585, 602, 2 , 90.57, 2.52, 'Allocated', '2016-05-22') +,(4585, 610, 10, 44.26, 3.84, 'On Order' , '2016-12-27') +,(4586, 604, 2 , 56.61, 9.64, 'Allocated', '2017-02-23') +,(4586, 612, 7 , 24.24, 7.68, 'On Order' , '2016-04-04') +,(4587, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4587, 611, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4587, 612, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4588, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4588, 601, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4588, 602, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4589, 601, 5 , 52.25, 4.47, 'Allocated', '2016-07-02') +,(4589, 603, 9 , 72.27, 4.97, 'On Order' , '2016-04-03') +,(4590, 610, 3 , 46.2 , 6.71, 'Allocated', '2016-12-16') +,(4590, 615, 5 , 52.0 , 5.26, 'On Order' , '2016-06-01') +,(4591, 601, 1 , 96.52, 2.39, 'No Stock' , '2017-01-16') +,(4591, 605, 8 , 19.56, 9.68, 'On Order' , '2016-09-15') +,(4592, 609, 10, 30.76, 3.2 , 'No Stock' , '2016-05-02') +,(4592, 619, 1 , 48.47, 6.13, 'On Order' , '2016-07-19') +,(4593, 617, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4593, 619, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4593, 620, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4594, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4594, 617, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4594, 618, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4594, 620, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4595, 605, 1 , 50.28, 8.15, 'Allocated', '2017-02-19') +,(4595, 601, 1 , 50.28, 8.15, 'Allocated', '2017-02-19') +,(4595, 602, 1 , 50.28, 8.15, 'Allocated', '2017-02-19') +,(4596, 605, 6 , 95.17, 7.53, 'On Order' , '2016-09-11') +,(4596, 609, 10, 82.11, 4.38, 'No Stock' , '2016-11-17') +,(4597, 608, 9 , 96.25, 4.8 , 'No Stock' , '2016-07-02') +,(4597, 605, 9 , 96.25, 4.8 , 'No Stock' , '2016-07-02') +,(4597, 601, 9 , 96.25, 4.8 , 'No Stock' , '2016-07-02') +,(4598, 603, 5 , 69.02, 6.1 , 'No Stock' , '2016-12-23') +,(4598, 608, 5 , 69.02, 6.1 , 'No Stock' , '2016-12-23') +,(4598, 610, 5 , 69.02, 6.1 , 'No Stock' , '2016-12-23') +,(4599, 603, 9 , 40.91, 6.68, 'On Order' , '2016-12-27') +,(4599, 607, 9 , 40.91, 6.68, 'On Order' , '2016-12-27') +,(4599, 609, 9 , 40.91, 6.68, 'On Order' , '2016-12-27') +,(4600, 611, 5 , 22.93, 8.87, 'Allocated', '2016-06-16') +,(4600, 615, 5 , 22.93, 8.87, 'Allocated', '2016-06-16') +,(4600, 612, 5 , 22.93, 8.87, 'Allocated', '2016-06-16'); diff --git a/backend/src/main/resources/logback.xml b/backend/src/main/resources/logback.xml new file mode 100644 index 0000000..12fa9be --- /dev/null +++ b/backend/src/main/resources/logback.xml @@ -0,0 +1,108 @@ + + + + + + + + + ${LOG_PATTERN} + + + + + ${APP_LOG_ROOT}/ExceptionLogs/Error.log + + ${LOG_PATTERN} + + + ${APP_LOG_ROOT}/ExceptionLogs/Error-%d{yyyy-MM-dd}.%i.log + 1 + 10 + + + 10MB + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/backend/src/main/resources/messages.properties b/backend/src/main/resources/messages.properties new file mode 100644 index 0000000..b015c87 --- /dev/null +++ b/backend/src/main/resources/messages.properties @@ -0,0 +1,5 @@ + +email.notempty=Please provide valid email id. +email.valid=Email should be valid +email.regex=Enter a valid email +name.minsize=Name should have minimum 3 characters diff --git a/backend/src/main/resources/note.txt b/backend/src/main/resources/note.txt new file mode 100644 index 0000000..dd9fbe6 --- /dev/null +++ b/backend/src/main/resources/note.txt @@ -0,0 +1,57 @@ +HEADER-LINE FORM : + +GET: http://localhost:9119/api/teacher +GET: http://localhost:9119/api/teacher/{id} +PUT: http://localhost:9119/api/teacher/{id} +DELETE: http://localhost:9119/api/teacher/{id} : NEED TO MODIFY THE INCORRECT ID INPUT ERROR HANDLING +POST: http://localhost:9119/api/teacher +===EX1=== +{ + "name": "niladri", + "email": "sen.niladri6@gmail.com", + "phoneNumber": 6291, + "salary": 1000.0, + "students": [{ + "name": "paku", + "depertment": "CSE", + "rollNumber": 108 + }] +} +===EX2===: +{ + "name": "sandipan", + "email": "sandy@gmail.com", + "phoneNumber": 9038, + "salary": 2000.0, + "students": [ + { + "name": "sahil", + "depertment": "CSE", + "rollNumber": 111 + }, + { + "name": "tarun", + "depertment": "CSE", + "rollNumber": 121 + } + ] +} + +===== 6.11.36 +user.java class code changed +@Getter @Setter private List role; +TokenUtil class code change + +===== 9.11.20 +1.8 +=== SWAGGER UI ==== +http://localhost:9119/swagger-ui.html + +========= +GIT HUB COMMAND +========= +$ git commit -m "your mesage" +$ git push origin main +$ git status + +$ git push origin main diff --git a/backend/src/main/resources/schema.sql b/backend/src/main/resources/schema.sql new file mode 100644 index 0000000..573e44a --- /dev/null +++ b/backend/src/main/resources/schema.sql @@ -0,0 +1,303 @@ +/** + Model : NorthWind +**/ + +DROP SCHEMA IF EXISTS northwind; + +CREATE SCHEMA northwind; +USE northwind; + +/* Table: user (Application Users) */ +CREATE TABLE user ( + user_id NVARCHAR(20) NOT NULL, + password NVARCHAR(255) NOT NULL, + first_name NVARCHAR(50) , + last_name NVARCHAR(50) , + email NVARCHAR(70) , + security_provider_id INT , + default_customer_id INT , + company NVARCHAR(50) , + phone NVARCHAR(20) , + address1 NVARCHAR(100), + address2 NVARCHAR(100), + country NVARCHAR(20) , + postal NVARCHAR(20) , + role NVARCHAR(20) , + other_roles NVARCHAR(80) , + is_active TINYINT , + is_blocked TINYINT , + secret_question NVARCHAR(100), + secret_answer NVARCHAR(100), + enable_beta_testing TINYINT, + enable_renewal TINYINT, + CONSTRAINT user_id PRIMARY KEY(user_id) +); + +/* Table: customers */ +CREATE TABLE customers ( + id INT NOT NULL, + last_name VARCHAR(50) , + first_name VARCHAR(50) , + email VARCHAR(50) , + company VARCHAR(50) , + phone VARCHAR(25) , + address1 VARCHAR(150), + address2 VARCHAR(150), + city VARCHAR(50) , + state VARCHAR(50) , + postal_code VARCHAR(15) , + country VARCHAR(50) , + PRIMARY KEY (id) +); + +/* Table: employees */ +CREATE TABLE employees ( + id INT NOT NULL, + last_name VARCHAR(50) , + first_name VARCHAR(50) , + email VARCHAR(50) , + avatar VARCHAR(250) , + job_title VARCHAR(50) , + department VARCHAR(50) , + manager_id INT , + phone VARCHAR(25) , + address1 VARCHAR(150), + address2 VARCHAR(150), + city VARCHAR(50) , + state VARCHAR(50) , + postal_code VARCHAR(15) , + country VARCHAR(50) , + PRIMARY KEY (id) +); + +/* Table: orders */ +CREATE TABLE orders ( + id INT NOT NULL, + employee_id INT , + customer_id INT , + order_date DATETIME , + shipped_date DATETIME , + ship_name VARCHAR(50) , + ship_address1 VARCHAR(150) , + ship_address2 VARCHAR(150) , + ship_city VARCHAR(50) , + ship_state VARCHAR(50) , + ship_postal_code VARCHAR(50) , + ship_country VARCHAR(50) , + shipping_fee DECIMAL(19,4) NULL DEFAULT '0.0000', + payment_type VARCHAR(50) , + paid_date DATETIME , + order_status VARCHAR(25), + PRIMARY KEY (id) +); + +/* Table: order_details */ +CREATE TABLE order_items ( + order_id INT NOT NULL, + product_id INT , + quantity DECIMAL(18,4) NOT NULL DEFAULT '0.0000', + unit_price DECIMAL(19,4) NULL DEFAULT '0.0000', + discount DECIMAL(19,4) NULL DEFAULT '0.0000', + order_item_status VARCHAR(25), + date_allocated DATETIME , + PRIMARY KEY (order_id, product_id) +); + +/* Table: products */ +CREATE TABLE products ( + id INT NOT NULL, + product_code VARCHAR(25) , + product_name VARCHAR(50) , + description VARCHAR(250), + standard_cost DECIMAL(19,4) NULL DEFAULT '0.0000', + list_price DECIMAL(19,4) NOT NULL DEFAULT '0.0000', + target_level INT , + reorder_level INT , + minimum_reorder_quantity INT , + quantity_per_unit VARCHAR(50) , + discontinued TINYINT NOT NULL DEFAULT '0', + category VARCHAR(50), + PRIMARY KEY (id) +); + + +/* Foreign Key: orders */ +ALTER TABLE orders ADD CONSTRAINT fk_orders__customers FOREIGN KEY (customer_id) REFERENCES customers(id); +ALTER TABLE orders ADD CONSTRAINT fk_orders__employees FOREIGN KEY (employee_id) REFERENCES employees(id); +/* Foreign Key: order_items */ +ALTER TABLE order_items ADD CONSTRAINT fk_order_items__orders FOREIGN KEY (order_id) REFERENCES orders(id); +ALTER TABLE order_items ADD CONSTRAINT fk_order_items__products FOREIGN KEY (product_id) REFERENCES products(id); + +/* Views */ +CREATE OR REPLACE VIEW order_info AS +select o.id as order_id + , o.order_date + , o.order_status + , o.paid_date + , o.payment_type + , o.shipped_date + , o.shipping_fee + , o.ship_name + , o.ship_address1 + , o.ship_address2 + , o.ship_city + , o.ship_state + , o.ship_postal_code + , o.ship_country + , o.customer_id + , o.employee_id + , concat(c.first_name, ' ', c.last_name) as customer_name + , c.phone customer_phone + , c.email customer_email + , c.company as customer_company + , concat(e.first_name, ' ', e.last_name) as employee_name + , e.department employee_department + , e.job_title employee_job_title + From orders o + , employees e + , customers c + where o.employee_id = e.id + and o.customer_id = c.id; + +CREATE OR REPLACE VIEW order_details AS +select oi.order_id + , oi.product_id + , oi.quantity + , oi.unit_price + , oi.discount + , oi.date_allocated + , oi.order_item_status + , o.order_date + , o.order_status + , o.paid_date + , o.payment_type + , o.shipped_date + , o.shipping_fee + , o.ship_name + , o.ship_address1 + , o.ship_address2 + , o.ship_city + , o.ship_state + , o.ship_postal_code + , o.ship_country + , p.product_code + , p.product_name + , p.category + , p.description + , p.list_price + , o.customer_id + , concat(c.first_name, ' ', c.last_name) as customer_name + , c.phone as customer_phone + , c.email as customer_email + , c.company as customer_company + , o.employee_id + , concat(e.first_name, ' ', e.last_name) as employee_name + , e.department as employee_department + , e.job_title as employee_job_title + From orders o + , products p + , order_items oi + , employees e + , customers c + where oi.order_id = o.id + and oi.product_id = p.id + and o.employee_id = e.id + and o.customer_id = c.id; + +CREATE OR REPLACE VIEW customer_orders AS +select o.order_date, o.order_status, o.paid_date, o.payment_type, o.shipping_fee, o.customer_id + , c.first_name customer_first_name, c.last_name customer_last_name, c.phone customer_phone, c.email customer_email, c.company + from orders o,customers c + where o.customer_id = c.id; + +CREATE OR REPLACE VIEW employee_orders AS +select o.order_date, o.order_status, o.paid_date, o.payment_type, o.shipping_fee, o.employee_id + , e.first_name employee_first_name, e.last_name employee_last_name, e.email employee_email, e.department + from orders o,employees e + where o.customer_id = e.id; + + + /* REAL_NET */ + CREATE TABLE RN_INSTRUCTOR ( + ID VARCHAR(20) NOT NULL AUTO_INCREMENT, + FIRST_NAME VARCHAR(20) NOT NULL, + LAST_NAME VARCHAR(20) NOT NULL, + EMAIL VARCHAR(20) NOT NULL, + CREATED_AT DATETIME, + UPDATED_AT DATETIME, + PRIMARY KEY (id) + ); + + /*==== EXTENSION FIELD ===*/ + CREATE TABLE RN_EXT_FIELD_T ( + ID int(11) NOT NULL AUTO_INCREMENT, + TYPE VARCHAR(20), + DATA_TYPE VARCHAR(20), + FIELD_NAME VARCHAR(20), + MAPPING VARCHAR(20), + FORM_CODE VARCHAR(20), + IS_ACTIVE BOOLEAN, + ACCOUNT_ID VARCHAR(20), + CREATED_AT DATETIME, + UPDATED_AT DATETIME, + CREATED_BY VARCHAR(20), + UPDATED_BY VARCHAR(20), + PRIMARY KEY (ID) +); + +/*========= lookup ======== +CREATE TABLE `rn_lookup_values_t` ( + `ID` int(11) NOT NULL AUTO_INCREMENT, + `LOOKUP_CODE` longtext, + `MEANING` longtext, + `DESCRIPTION` longtext, + `LOOKUP_TYPE` longtext, + `ACTIVE_START_DATE` datetime DEFAULT NULL, + `ACTIVE_END_DATE` datetime DEFAULT NULL, + `ENABLED_FLAG` longtext, + `CREATED_BY` int(11) DEFAULT NULL, + `CREATION_DATE` datetime DEFAULT NULL, + `LAST_UPDATED_BY` int(11) DEFAULT NULL, + `LAST_UPDATE_DATE` datetime DEFAULT NULL + PRIMARY KEY (`ID`) +); */ + + + +/*========= LOGGING ======== + +DROP TABLE logging_event_exception IF EXISTS; +DROP TABLE logging_event_property IF EXISTS; +DROP TABLE logging_event IF EXISTS; + +CREATE TABLE logging_event ( + timestmp BIGINT NOT NULL, + formatted_message LONGVARCHAR NOT NULL, + logger_name VARCHAR(256) NOT NULL, + level_string VARCHAR(256) NOT NULL, + thread_name VARCHAR(256), + reference_flag SMALLINT, + arg0 VARCHAR(256), + arg1 VARCHAR(256), + arg2 VARCHAR(256), + arg3 VARCHAR(256), + caller_filename VARCHAR(256), + caller_class VARCHAR(256), + caller_method VARCHAR(256), + caller_line CHAR(4), + event_id IDENTITY NOT NULL); + + +CREATE TABLE logging_event_property ( + event_id BIGINT NOT NULL, + mapped_key VARCHAR(254) NOT NULL, + mapped_value LONGVARCHAR, + PRIMARY KEY(event_id, mapped_key), + FOREIGN KEY (event_id) REFERENCES logging_event(event_id)); + +CREATE TABLE logging_event_exception ( + event_id BIGINT NOT NULL, + i SMALLINT NOT NULL, + trace_line VARCHAR(256) NOT NULL, + PRIMARY KEY(event_id, i), + FOREIGN KEY (event_id) REFERENCES logging_event(event_id)); */ \ No newline at end of file diff --git a/backend/target/classes/.DS_Store b/backend/target/classes/.DS_Store new file mode 100644 index 0000000..0e78b9e Binary files /dev/null and b/backend/target/classes/.DS_Store differ diff --git a/backend/target/classes/META-INF/MANIFEST.MF b/backend/target/classes/META-INF/MANIFEST.MF new file mode 100644 index 0000000..b6b0da7 --- /dev/null +++ b/backend/target/classes/META-INF/MANIFEST.MF @@ -0,0 +1,6 @@ +Manifest-Version: 1.0 +Build-Jdk-Spec: 21 +Implementation-Title: REAL IT SOLUTIONS +Implementation-Version: 1.0.0 +Created-By: Maven Integration for Eclipse + diff --git a/backend/target/classes/META-INF/maven/com.realnet/app/pom.properties b/backend/target/classes/META-INF/maven/com.realnet/app/pom.properties new file mode 100644 index 0000000..26322bd --- /dev/null +++ b/backend/target/classes/META-INF/maven/com.realnet/app/pom.properties @@ -0,0 +1,7 @@ +#Generated by Maven Integration for Eclipse +#Thu Oct 22 15:16:26 IST 2026 +artifactId=app +groupId=com.realnet +m2e.projectLocation=D\:\\WAP\\Io8Learn\\Base_projjj\\authsec-be\\backend +m2e.projectName=app +version=1.0.0 diff --git a/backend/target/classes/META-INF/maven/com.realnet/app/pom.xml b/backend/target/classes/META-INF/maven/com.realnet/app/pom.xml new file mode 100644 index 0000000..942e1a1 --- /dev/null +++ b/backend/target/classes/META-INF/maven/com.realnet/app/pom.xml @@ -0,0 +1,556 @@ + + 4.0.0 + com.realnet + app + jar + 1.0.0 + REAL IT SOLUTIONS + + 2.7.0 + UTF-8 + UTF-8 + 1.8 + + + org.springframework.boot + spring-boot-starter-parent + 2.2.5.RELEASE + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + + org.springframework.boot + spring-boot-starter-mail + + + org.springframework.boot + spring-boot-starter-web + + + + org.springframework.boot + spring-boot-starter-aop + + + org.springframework.boot + spring-boot-starter-tomcat + provided + + + org.springframework.boot + spring-boot-starter-actuator + + + + io.springfox + springfox-swagger2 + 2.9.2 + + + io.swagger + swagger-annotations + + + io.swagger + swagger-models + + + + + org.apache.commons + commons-lang3 + 3.12.0 + + + com.googlecode.json-simple + json-simple + 1.1.1 + + + com.google.code.gson + gson + 2.8.5 + + + io.swagger + swagger-annotations + 1.5.22 + + + io.swagger + swagger-models + 1.5.22 + + + io.springfox + springfox-swagger-ui + 2.9.2 + + + + org.apache.pdfbox + pdfbox + 2.0.29 + + + + + + + + + + + + + org.springframework.boot + spring-boot-starter-security + + + + org.springframework.boot + spring-boot-starter-validation + + + org.apache.poi + poi-ooxml + 4.1.2 + + + + org.apache.poi + poi-ooxml + 3.8-beta4 + + + org.apache.poi + poi-scratchpad + 3.9 + + + + + + org.apache.poi + poi + 4.1.2 + + + org.apache.poi + poi-ooxml + 4.1.2 + + + + + + org.springframework.boot + spring-boot-starter-jdbc + + + org.postgresql + postgresql + runtime + + + org.xerial + sqlite-jdbc + 3.25.2 + + + com.microsoft.sqlserver + mssql-jdbc + runtime + + + + org.springframework.boot + spring-boot-starter-websocket + + + org.springframework + spring-messaging + + + + org.springframework.boot + spring-boot-starter-cache + + + com.github.ben-manes.caffeine + caffeine + + + + com.h2database + h2 + runtime + + + org.slf4j + slf4j-api + + + + + org.springframework.security.oauth.boot + spring-security-oauth2-autoconfigure + 2.3.3.RELEASE + + + + org.springframework.security + spring-security-oauth2-client + + + org.springframework.social + spring-social-google + 1.0.0.RELEASE + + + org.springframework.social + spring-social-linkedin + 1.0.2.RELEASE + + + + + io.jsonwebtoken + jjwt + 0.9.0 + + + com.google.guava + guava + 23.5-jre + + + joda-time + joda-time + 2.9.9 + + + + + + + + com.fasterxml.jackson.core + jackson-core + 2.12.1 + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + org.modelmapper + modelmapper + 2.3.0 + + + org.codehaus.jackson + jackson-mapper-asl + 1.9.13 + + + commons-io + commons-io + 2.7 + + + + net.lingala.zip4j + zip4j + 2.6.1 + + + org.json + json + 20171018 + + + org.projectlombok + lombok + 1.18.20 + provided + + + javax.xml.bind + jaxb-api + 2.3.0 + + + org.springframework.boot + spring-boot-devtools + + + + org.apache.httpcomponents + httpclient + 4.5.13 + + + + + org.apache.clerezza.ext + org.json.simple + 0.4 + + + commons-codec + commons-codec + 1.10 + + + org.springframework.boot + spring-boot-starter-webflux + + + + + org.apache.poi + poi + 4.1.2 + + + + org.apache.poi + ooxml-schemas + 1.4 + + + + org.json + json + 20201115 + + + com.jcraft + jsch + 0.1.55 + + + org.json + json + 20201115 + + + + org.json + json + 20201115 + + + + com.twilio.sdk + twilio + 8.18.0 + + + + org.xhtmlrenderer + flying-saucer-pdf + 9.1.22 + + + + + com.lowagie + itext + 2.1.7 + + + + + + org.seleniumhq.selenium + selenium-java + 3.141.59 + + + + + com.itextpdf + itextpdf + 5.5.13.2 + + + + + org.postgresql + postgresql + 42.2.24 + + + + + org.mariadb.jdbc + mariadb-java-client + 3.1.2 + + + + + com.ibm.db2 + jcc + 11.5.5.0 + + + + + org.mongodb + mongo-java-driver + 3.12.12 + + + + + redis.clients + jedis + 3.7.0 + + + + + + + + + + org.firebirdsql.jdbc + jaybird + 4.0.0.java11 + + + + + + + com.orientechnologies + orientdb-core + 3.2.19 + + + + + com.orientechnologies + orientdb-jdbc + 3.2.19 + + + + + software.amazon.awssdk + dynamodb + 2.17.102 + + + + + com.couchbase.client + java-client + 3.1.5 + + + io.projectreactor + reactor-core + 3.4.13 + + + + + org.neo4j + neo4j-jdbc-bolt + 5.0.0 + + + + + com.paytm.pg + paytm-checksum + 1.2.1 + + + + com.razorpay + razorpay-java + 1.4.4 + + + + + org.springframework + spring-test + + + + + org.apache.pdfbox + pdfbox + 2.0.28 + + + + + org.apache.xmlgraphics + fop + 2.6 + + + + org.apache.commons + commons-csv + 1.4 + + + + + com.googlecode.json-simple + json-simple + 1.1.1 + + + + com.opencsv + opencsv + 5.5 + + + + + org.springframework.boot + spring-boot-starter-data-mongodb + + + + org.mongodb + mongodb-driver-sync + 4.11.1 + + + + + diff --git a/backend/target/classes/MyprojectUI_view.properties b/backend/target/classes/MyprojectUI_view.properties new file mode 100644 index 0000000..e69de29 diff --git a/backend/target/classes/application.properties b/backend/target/classes/application.properties new file mode 100644 index 0000000..5a0ee4a --- /dev/null +++ b/backend/target/classes/application.properties @@ -0,0 +1,90 @@ +# File is used by sprigboot +server.contextPath=/* +server.port=9292 +spring.resources.static-locations=classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/,classpath:/webui/ + +spring.banner.location=classpath:banner_txt.txt + +#Temporary disable security to enable it remove this +#security.ignored=/** + +springfox.documentation.swagger.v2.path=/api-docs +spring.jackson.date-format=yyyy-MM-dd + + + +System.Net.ServicePointManager.Expect100Continue = false; + + + + + +#spring.data.mongodb.uri=mongodb://gaurav:gaurav123@13.233.70.96:30165/realnet_cns?authSource=admin + +spring.data.mongodb.uri=mongodb+srv://azmat_db_user:064lBmIKyXFPzyLy@cluster0.u9a6g8k.mongodb.net/azzudb +# Prefix Path + + + + +# **********paytm dependency ****** +razorpay.api.key=rzp_test_xVnrBUjJWTEH0r +razorpay.api.secret=evTXkIFcgpVtiLa1P7M7CIox + +#***** MAIL SENDER +spring.mail.host=smtp.gmail.com +spring.mail.username=realitconnect@gmail.com +spring.mail.password=tysnukjdimsneiyv +spring.mail.port=587 +#spring.mail.properties.mail.smtp.auth=true +spring.mail.properties.mail.smtp.starttls.enable=true +spring.mail.properties.mail.smtp.starttls.required=true + +# JACKSON +spring.jackson.serialization.FAIL_ON_EMPTY_BEANS=false + + +spring.mail.properties.mail.smtp.auth = true +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.fallback = false + +#******* MULTIPART RESOLVER +spring.servlet.multipart.enabled=true +spring.servlet.multipart.max-file-size=100MB +spring.servlet.multipart.max-request-size=100MB + +#***************OAUTH2 SOCIAL LOGIN ********* +# Social login provider props +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.scope=profile, email + + +spring.security.oauth2.client.registration.linkedin.clientId= +spring.security.oauth2.client.registration.linkedin.clientSecret= +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.scope=r_liteprofile, r_emailaddress +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.provider=linkedin +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.user-info-uri=https://api.linkedin.com/v2/me +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~)) +app.auth.tokenSecret=926D96C90030DD58429D2751AC1BDBBC +app.auth.tokenExpirationMsec=864000000 + # After successfully authenticating with the OAuth2 Provider, + # 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. + # 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 + + +#projectPath=/data +projectPath=D:\\WAP\\Io8Learn\\Base_projjj\\authsec-be\\backend +angularProjectPath=D:\\WAP\\Io8Learn\\Base_projjj\\authsec-be\\backend/webui + + diff --git a/backend/target/classes/banner_txt.txt b/backend/target/classes/banner_txt.txt new file mode 100644 index 0000000..5c9c817 --- /dev/null +++ b/backend/target/classes/banner_txt.txt @@ -0,0 +1,11 @@ +******************************************************************* +******************************************************************* + __ _ ____ __ __ __ + / \ \ | |__****** / ___| **** ****_ \ \ \ \ \ \ + / / \ \ | '_ \ / _ \ \___ \| | | | '__|/ _ \ \ \ \ \ \ \ + \ \ / / | |_) | __/ ___) | |_| | | | __/ / / / / / / + \ /_/ |_.__/ \___| |____/ \__,_|_| \___| /_/ /_/ /_/ + *** *** ***** +******************************************************************* +::SPRING BOOT:: CNS Version::v1.1.0 RELEASE +******************************************************************* \ No newline at end of file diff --git a/backend/target/classes/com/.DS_Store b/backend/target/classes/com/.DS_Store new file mode 100644 index 0000000..b31bd9b Binary files /dev/null and b/backend/target/classes/com/.DS_Store differ diff --git a/backend/target/classes/com/realnet/.DS_Store b/backend/target/classes/com/realnet/.DS_Store new file mode 100644 index 0000000..c78b5be Binary files /dev/null and b/backend/target/classes/com/realnet/.DS_Store differ diff --git a/backend/target/classes/com/realnet/RealNetApp.class b/backend/target/classes/com/realnet/RealNetApp.class new file mode 100644 index 0000000..9436474 Binary files /dev/null and b/backend/target/classes/com/realnet/RealNetApp.class differ diff --git a/backend/target/classes/com/realnet/WhoCollumn/Extension.class b/backend/target/classes/com/realnet/WhoCollumn/Extension.class new file mode 100644 index 0000000..2c744b5 Binary files /dev/null and b/backend/target/classes/com/realnet/WhoCollumn/Extension.class differ diff --git a/backend/target/classes/com/realnet/WhoCollumn/Who_column.class b/backend/target/classes/com/realnet/WhoCollumn/Who_column.class new file mode 100644 index 0000000..5af0643 Binary files /dev/null and b/backend/target/classes/com/realnet/WhoCollumn/Who_column.class differ diff --git a/backend/target/classes/com/realnet/config/AppConfig.class b/backend/target/classes/com/realnet/config/AppConfig.class new file mode 100644 index 0000000..fa5a211 Binary files /dev/null and b/backend/target/classes/com/realnet/config/AppConfig.class differ diff --git a/backend/target/classes/com/realnet/config/CorsFilter.class b/backend/target/classes/com/realnet/config/CorsFilter.class new file mode 100644 index 0000000..1abb6bc Binary files /dev/null and b/backend/target/classes/com/realnet/config/CorsFilter.class differ diff --git a/backend/target/classes/com/realnet/config/EmailService.class b/backend/target/classes/com/realnet/config/EmailService.class new file mode 100644 index 0000000..69bd927 Binary files /dev/null and b/backend/target/classes/com/realnet/config/EmailService.class differ diff --git a/backend/target/classes/com/realnet/config/JWTConstant.class b/backend/target/classes/com/realnet/config/JWTConstant.class new file mode 100644 index 0000000..d4cbe0f Binary files /dev/null and b/backend/target/classes/com/realnet/config/JWTConstant.class differ diff --git a/backend/target/classes/com/realnet/config/JwtAuthenticationEntryPoint.class b/backend/target/classes/com/realnet/config/JwtAuthenticationEntryPoint.class new file mode 100644 index 0000000..65e5e8c Binary files /dev/null and b/backend/target/classes/com/realnet/config/JwtAuthenticationEntryPoint.class differ diff --git a/backend/target/classes/com/realnet/config/JwtAuthenticationFilter.class b/backend/target/classes/com/realnet/config/JwtAuthenticationFilter.class new file mode 100644 index 0000000..4fbba9f Binary files /dev/null and b/backend/target/classes/com/realnet/config/JwtAuthenticationFilter.class differ diff --git a/backend/target/classes/com/realnet/config/MessageSourceConfig.class b/backend/target/classes/com/realnet/config/MessageSourceConfig.class new file mode 100644 index 0000000..312f9a3 Binary files /dev/null and b/backend/target/classes/com/realnet/config/MessageSourceConfig.class differ diff --git a/backend/target/classes/com/realnet/config/SecurityConfig.class b/backend/target/classes/com/realnet/config/SecurityConfig.class new file mode 100644 index 0000000..b1c8b65 Binary files /dev/null and b/backend/target/classes/com/realnet/config/SecurityConfig.class differ diff --git a/backend/target/classes/com/realnet/config/SequenceGeneratorService.class b/backend/target/classes/com/realnet/config/SequenceGeneratorService.class new file mode 100644 index 0000000..993bc0c Binary files /dev/null and b/backend/target/classes/com/realnet/config/SequenceGeneratorService.class differ diff --git a/backend/target/classes/com/realnet/config/SwaggerConfig.class b/backend/target/classes/com/realnet/config/SwaggerConfig.class new file mode 100644 index 0000000..248486d Binary files /dev/null and b/backend/target/classes/com/realnet/config/SwaggerConfig.class differ diff --git a/backend/target/classes/com/realnet/config/TokenProvider.class b/backend/target/classes/com/realnet/config/TokenProvider.class new file mode 100644 index 0000000..097e26e Binary files /dev/null and b/backend/target/classes/com/realnet/config/TokenProvider.class differ diff --git a/backend/target/classes/com/realnet/exceptions/InvalidUserDataException.class b/backend/target/classes/com/realnet/exceptions/InvalidUserDataException.class new file mode 100644 index 0000000..d93a02b Binary files /dev/null and b/backend/target/classes/com/realnet/exceptions/InvalidUserDataException.class differ diff --git a/backend/target/classes/com/realnet/exceptions/ResourceNotFoundException.class b/backend/target/classes/com/realnet/exceptions/ResourceNotFoundException.class new file mode 100644 index 0000000..536c221 Binary files /dev/null and b/backend/target/classes/com/realnet/exceptions/ResourceNotFoundException.class differ diff --git a/backend/target/classes/com/realnet/exceptions/StorageException.class b/backend/target/classes/com/realnet/exceptions/StorageException.class new file mode 100644 index 0000000..9bd0874 Binary files /dev/null and b/backend/target/classes/com/realnet/exceptions/StorageException.class differ diff --git a/backend/target/classes/com/realnet/fnd/controller/MainController.class b/backend/target/classes/com/realnet/fnd/controller/MainController.class new file mode 100644 index 0000000..84ceea5 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/controller/MainController.class differ diff --git a/backend/target/classes/com/realnet/fnd/controller/Rn_DynamicTransactionController.class b/backend/target/classes/com/realnet/fnd/controller/Rn_DynamicTransactionController.class new file mode 100644 index 0000000..da2902d Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/controller/Rn_DynamicTransactionController.class differ diff --git a/backend/target/classes/com/realnet/fnd/controller/Rn_Forms_Setup_Controller.class b/backend/target/classes/com/realnet/fnd/controller/Rn_Forms_Setup_Controller.class new file mode 100644 index 0000000..ec67251 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/controller/Rn_Forms_Setup_Controller.class differ diff --git a/backend/target/classes/com/realnet/fnd/controller/Rn_Function_Register_Controller.class b/backend/target/classes/com/realnet/fnd/controller/Rn_Function_Register_Controller.class new file mode 100644 index 0000000..184d39d Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/controller/Rn_Function_Register_Controller.class differ diff --git a/backend/target/classes/com/realnet/fnd/controller/Rn_Main_Menu_Controller.class b/backend/target/classes/com/realnet/fnd/controller/Rn_Main_Menu_Controller.class new file mode 100644 index 0000000..9968731 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/controller/Rn_Main_Menu_Controller.class differ diff --git a/backend/target/classes/com/realnet/fnd/controller/Rn_Menu_Group_Controller.class b/backend/target/classes/com/realnet/fnd/controller/Rn_Menu_Group_Controller.class new file mode 100644 index 0000000..92eb836 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/controller/Rn_Menu_Group_Controller.class differ diff --git a/backend/target/classes/com/realnet/fnd/controller/Rn_Menu_Group_Line_Controller.class b/backend/target/classes/com/realnet/fnd/controller/Rn_Menu_Group_Line_Controller.class new file mode 100644 index 0000000..c702282 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/controller/Rn_Menu_Group_Line_Controller.class differ diff --git a/backend/target/classes/com/realnet/fnd/controller/Rn_Menu_Register_Controller.class b/backend/target/classes/com/realnet/fnd/controller/Rn_Menu_Register_Controller.class new file mode 100644 index 0000000..f73defd Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/controller/Rn_Menu_Register_Controller.class differ diff --git a/backend/target/classes/com/realnet/fnd/controller1/LoadMenuController.class b/backend/target/classes/com/realnet/fnd/controller1/LoadMenuController.class new file mode 100644 index 0000000..7bf6708 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/controller1/LoadMenuController.class differ diff --git a/backend/target/classes/com/realnet/fnd/controller1/MenuController.class b/backend/target/classes/com/realnet/fnd/controller1/MenuController.class new file mode 100644 index 0000000..3f397e8 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/controller1/MenuController.class differ diff --git a/backend/target/classes/com/realnet/fnd/entity/DropDownDTO.class b/backend/target/classes/com/realnet/fnd/entity/DropDownDTO.class new file mode 100644 index 0000000..f772784 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/entity/DropDownDTO.class differ diff --git a/backend/target/classes/com/realnet/fnd/entity/Error.class b/backend/target/classes/com/realnet/fnd/entity/Error.class new file mode 100644 index 0000000..5d68e8e Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/entity/Error.class differ diff --git a/backend/target/classes/com/realnet/fnd/entity/ErrorPojo.class b/backend/target/classes/com/realnet/fnd/entity/ErrorPojo.class new file mode 100644 index 0000000..13dab1c Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/entity/ErrorPojo.class differ diff --git a/backend/target/classes/com/realnet/fnd/entity/ModuleCopyDTO.class b/backend/target/classes/com/realnet/fnd/entity/ModuleCopyDTO.class new file mode 100644 index 0000000..8272baf Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/entity/ModuleCopyDTO.class differ diff --git a/backend/target/classes/com/realnet/fnd/entity/Modulemini.class b/backend/target/classes/com/realnet/fnd/entity/Modulemini.class new file mode 100644 index 0000000..c728307 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/entity/Modulemini.class differ diff --git a/backend/target/classes/com/realnet/fnd/entity/ProjectMini.class b/backend/target/classes/com/realnet/fnd/entity/ProjectMini.class new file mode 100644 index 0000000..187ff07 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/entity/ProjectMini.class differ diff --git a/backend/target/classes/com/realnet/fnd/entity/Rn_AuditEntity.class b/backend/target/classes/com/realnet/fnd/entity/Rn_AuditEntity.class new file mode 100644 index 0000000..fcfb6e6 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/entity/Rn_AuditEntity.class differ diff --git a/backend/target/classes/com/realnet/fnd/entity/Rn_Dynamic_Transaction.class b/backend/target/classes/com/realnet/fnd/entity/Rn_Dynamic_Transaction.class new file mode 100644 index 0000000..4043aab Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/entity/Rn_Dynamic_Transaction.class differ diff --git a/backend/target/classes/com/realnet/fnd/entity/Rn_Ext_Fields.class b/backend/target/classes/com/realnet/fnd/entity/Rn_Ext_Fields.class new file mode 100644 index 0000000..3b51f3f Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/entity/Rn_Ext_Fields.class differ diff --git a/backend/target/classes/com/realnet/fnd/entity/Rn_ExtensionEntity.class b/backend/target/classes/com/realnet/fnd/entity/Rn_ExtensionEntity.class new file mode 100644 index 0000000..a901359 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/entity/Rn_ExtensionEntity.class differ diff --git a/backend/target/classes/com/realnet/fnd/entity/Rn_FlexEntity.class b/backend/target/classes/com/realnet/fnd/entity/Rn_FlexEntity.class new file mode 100644 index 0000000..f0c24d7 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/entity/Rn_FlexEntity.class differ diff --git a/backend/target/classes/com/realnet/fnd/entity/Rn_Forms_Component_Setup.class b/backend/target/classes/com/realnet/fnd/entity/Rn_Forms_Component_Setup.class new file mode 100644 index 0000000..cd87a32 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/entity/Rn_Forms_Component_Setup.class differ diff --git a/backend/target/classes/com/realnet/fnd/entity/Rn_Forms_Setup.class b/backend/target/classes/com/realnet/fnd/entity/Rn_Forms_Setup.class new file mode 100644 index 0000000..46e72c1 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/entity/Rn_Forms_Setup.class differ diff --git a/backend/target/classes/com/realnet/fnd/entity/Rn_Function_Register.class b/backend/target/classes/com/realnet/fnd/entity/Rn_Function_Register.class new file mode 100644 index 0000000..cf66cc9 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/entity/Rn_Function_Register.class differ diff --git a/backend/target/classes/com/realnet/fnd/entity/Rn_Instance_Type.class b/backend/target/classes/com/realnet/fnd/entity/Rn_Instance_Type.class new file mode 100644 index 0000000..037b335 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/entity/Rn_Instance_Type.class differ diff --git a/backend/target/classes/com/realnet/fnd/entity/Rn_Lookup_Values.class b/backend/target/classes/com/realnet/fnd/entity/Rn_Lookup_Values.class new file mode 100644 index 0000000..363ea9a Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/entity/Rn_Lookup_Values.class differ diff --git a/backend/target/classes/com/realnet/fnd/entity/Rn_Main_Menu.class b/backend/target/classes/com/realnet/fnd/entity/Rn_Main_Menu.class new file mode 100644 index 0000000..bf4d5dc Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/entity/Rn_Main_Menu.class differ diff --git a/backend/target/classes/com/realnet/fnd/entity/Rn_Menu_Group_Header.class b/backend/target/classes/com/realnet/fnd/entity/Rn_Menu_Group_Header.class new file mode 100644 index 0000000..edb03fc Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/entity/Rn_Menu_Group_Header.class differ diff --git a/backend/target/classes/com/realnet/fnd/entity/Rn_Menu_Group_Line.class b/backend/target/classes/com/realnet/fnd/entity/Rn_Menu_Group_Line.class new file mode 100644 index 0000000..0cda009 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/entity/Rn_Menu_Group_Line.class differ diff --git a/backend/target/classes/com/realnet/fnd/entity/Rn_Menu_Register.class b/backend/target/classes/com/realnet/fnd/entity/Rn_Menu_Register.class new file mode 100644 index 0000000..d2b8dff Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/entity/Rn_Menu_Register.class differ diff --git a/backend/target/classes/com/realnet/fnd/entity/Rn_Sub_Menu.class b/backend/target/classes/com/realnet/fnd/entity/Rn_Sub_Menu.class new file mode 100644 index 0000000..7ac7d13 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/entity/Rn_Sub_Menu.class differ diff --git a/backend/target/classes/com/realnet/fnd/entity/Rn_Who_AccId_Column.class b/backend/target/classes/com/realnet/fnd/entity/Rn_Who_AccId_Column.class new file mode 100644 index 0000000..5c971d0 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/entity/Rn_Who_AccId_Column.class differ diff --git a/backend/target/classes/com/realnet/fnd/entity/Rn_Who_Columns.class b/backend/target/classes/com/realnet/fnd/entity/Rn_Who_Columns.class new file mode 100644 index 0000000..3146138 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/entity/Rn_Who_Columns.class differ diff --git a/backend/target/classes/com/realnet/fnd/entity/SingleSerise.class b/backend/target/classes/com/realnet/fnd/entity/SingleSerise.class new file mode 100644 index 0000000..75b36ad Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/entity/SingleSerise.class differ diff --git a/backend/target/classes/com/realnet/fnd/entity/Success.class b/backend/target/classes/com/realnet/fnd/entity/Success.class new file mode 100644 index 0000000..80cc292 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/entity/Success.class differ diff --git a/backend/target/classes/com/realnet/fnd/entity/SuccessPojo.class b/backend/target/classes/com/realnet/fnd/entity/SuccessPojo.class new file mode 100644 index 0000000..9e77572 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/entity/SuccessPojo.class differ diff --git a/backend/target/classes/com/realnet/fnd/entity/Version.class b/backend/target/classes/com/realnet/fnd/entity/Version.class new file mode 100644 index 0000000..936601b Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/entity/Version.class differ diff --git a/backend/target/classes/com/realnet/fnd/entity/WireFrameCopyDTO.class b/backend/target/classes/com/realnet/fnd/entity/WireFrameCopyDTO.class new file mode 100644 index 0000000..1cb2fe9 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/entity/WireFrameCopyDTO.class differ diff --git a/backend/target/classes/com/realnet/fnd/entity/projectCopyDTO.class b/backend/target/classes/com/realnet/fnd/entity/projectCopyDTO.class new file mode 100644 index 0000000..d197d36 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/entity/projectCopyDTO.class differ diff --git a/backend/target/classes/com/realnet/fnd/entity1/ExtensionModel.class b/backend/target/classes/com/realnet/fnd/entity1/ExtensionModel.class new file mode 100644 index 0000000..a71e9e7 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/entity1/ExtensionModel.class differ diff --git a/backend/target/classes/com/realnet/fnd/entity1/GrpMenuAccess.class b/backend/target/classes/com/realnet/fnd/entity1/GrpMenuAccess.class new file mode 100644 index 0000000..acc487a Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/entity1/GrpMenuAccess.class differ diff --git a/backend/target/classes/com/realnet/fnd/entity1/GrpMenuAccesscompositeKey.class b/backend/target/classes/com/realnet/fnd/entity1/GrpMenuAccesscompositeKey.class new file mode 100644 index 0000000..ebbacac Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/entity1/GrpMenuAccesscompositeKey.class differ diff --git a/backend/target/classes/com/realnet/fnd/entity1/MIXMENUN.class b/backend/target/classes/com/realnet/fnd/entity1/MIXMENUN.class new file mode 100644 index 0000000..96f38a0 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/entity1/MIXMENUN.class differ diff --git a/backend/target/classes/com/realnet/fnd/entity1/MenuDet.class b/backend/target/classes/com/realnet/fnd/entity1/MenuDet.class new file mode 100644 index 0000000..cb75ba0 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/entity1/MenuDet.class differ diff --git a/backend/target/classes/com/realnet/fnd/entity1/MixMenu.class b/backend/target/classes/com/realnet/fnd/entity1/MixMenu.class new file mode 100644 index 0000000..ef16e71 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/entity1/MixMenu.class differ diff --git a/backend/target/classes/com/realnet/fnd/entity1/MixMenuNew.class b/backend/target/classes/com/realnet/fnd/entity1/MixMenuNew.class new file mode 100644 index 0000000..d926680 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/entity1/MixMenuNew.class differ diff --git a/backend/target/classes/com/realnet/fnd/entity1/menudet_who.class b/backend/target/classes/com/realnet/fnd/entity1/menudet_who.class new file mode 100644 index 0000000..3da23ab Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/entity1/menudet_who.class differ diff --git a/backend/target/classes/com/realnet/fnd/repository/ExtFieldRepository.class b/backend/target/classes/com/realnet/fnd/repository/ExtFieldRepository.class new file mode 100644 index 0000000..29dcad6 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/repository/ExtFieldRepository.class differ diff --git a/backend/target/classes/com/realnet/fnd/repository/LookUpRepository.class b/backend/target/classes/com/realnet/fnd/repository/LookUpRepository.class new file mode 100644 index 0000000..2c9123f Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/repository/LookUpRepository.class differ diff --git a/backend/target/classes/com/realnet/fnd/repository/RnGroupLineRepository.class b/backend/target/classes/com/realnet/fnd/repository/RnGroupLineRepository.class new file mode 100644 index 0000000..c656dd8 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/repository/RnGroupLineRepository.class differ diff --git a/backend/target/classes/com/realnet/fnd/repository/Rn_DynamicTransactionRepository.class b/backend/target/classes/com/realnet/fnd/repository/Rn_DynamicTransactionRepository.class new file mode 100644 index 0000000..efb5c4f Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/repository/Rn_DynamicTransactionRepository.class differ diff --git a/backend/target/classes/com/realnet/fnd/repository/Rn_Forms_Setup_Repository.class b/backend/target/classes/com/realnet/fnd/repository/Rn_Forms_Setup_Repository.class new file mode 100644 index 0000000..905749b Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/repository/Rn_Forms_Setup_Repository.class differ diff --git a/backend/target/classes/com/realnet/fnd/repository/Rn_Function_Register_Repository.class b/backend/target/classes/com/realnet/fnd/repository/Rn_Function_Register_Repository.class new file mode 100644 index 0000000..bed3c3b Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/repository/Rn_Function_Register_Repository.class differ diff --git a/backend/target/classes/com/realnet/fnd/repository/Rn_InstanceTypeRepository.class b/backend/target/classes/com/realnet/fnd/repository/Rn_InstanceTypeRepository.class new file mode 100644 index 0000000..6a3e1aa Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/repository/Rn_InstanceTypeRepository.class differ diff --git a/backend/target/classes/com/realnet/fnd/repository/Rn_LookUpRepository.class b/backend/target/classes/com/realnet/fnd/repository/Rn_LookUpRepository.class new file mode 100644 index 0000000..70b3c20 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/repository/Rn_LookUpRepository.class differ diff --git a/backend/target/classes/com/realnet/fnd/repository/Rn_Main_Menu_Repository.class b/backend/target/classes/com/realnet/fnd/repository/Rn_Main_Menu_Repository.class new file mode 100644 index 0000000..a014161 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/repository/Rn_Main_Menu_Repository.class differ diff --git a/backend/target/classes/com/realnet/fnd/repository/Rn_Menu_Group_Repository.class b/backend/target/classes/com/realnet/fnd/repository/Rn_Menu_Group_Repository.class new file mode 100644 index 0000000..c44cd3e Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/repository/Rn_Menu_Group_Repository.class differ diff --git a/backend/target/classes/com/realnet/fnd/repository/Rn_Menu_Register_Repository.class b/backend/target/classes/com/realnet/fnd/repository/Rn_Menu_Register_Repository.class new file mode 100644 index 0000000..acd3687 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/repository/Rn_Menu_Register_Repository.class differ diff --git a/backend/target/classes/com/realnet/fnd/repository1/GrpMenuAccessRepository.class b/backend/target/classes/com/realnet/fnd/repository1/GrpMenuAccessRepository.class new file mode 100644 index 0000000..860f5e2 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/repository1/GrpMenuAccessRepository.class differ diff --git a/backend/target/classes/com/realnet/fnd/repository1/MenuDetRepository.class b/backend/target/classes/com/realnet/fnd/repository1/MenuDetRepository.class new file mode 100644 index 0000000..8f31b0d Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/repository1/MenuDetRepository.class differ diff --git a/backend/target/classes/com/realnet/fnd/response/CustomResponse.class b/backend/target/classes/com/realnet/fnd/response/CustomResponse.class new file mode 100644 index 0000000..85b6928 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/response/CustomResponse.class differ diff --git a/backend/target/classes/com/realnet/fnd/response/EntityResponse.class b/backend/target/classes/com/realnet/fnd/response/EntityResponse.class new file mode 100644 index 0000000..d0756cb Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/response/EntityResponse.class differ diff --git a/backend/target/classes/com/realnet/fnd/response/OperationResponse$ResponseStatusEnum.class b/backend/target/classes/com/realnet/fnd/response/OperationResponse$ResponseStatusEnum.class new file mode 100644 index 0000000..33014ac Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/response/OperationResponse$ResponseStatusEnum.class differ diff --git a/backend/target/classes/com/realnet/fnd/response/OperationResponse.class b/backend/target/classes/com/realnet/fnd/response/OperationResponse.class new file mode 100644 index 0000000..fb663a1 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/response/OperationResponse.class differ diff --git a/backend/target/classes/com/realnet/fnd/response/PageResponse.class b/backend/target/classes/com/realnet/fnd/response/PageResponse.class new file mode 100644 index 0000000..9a20031 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/response/PageResponse.class differ diff --git a/backend/target/classes/com/realnet/fnd/response/Rn_DynamicTransactionResponse.class b/backend/target/classes/com/realnet/fnd/response/Rn_DynamicTransactionResponse.class new file mode 100644 index 0000000..fa38dff Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/response/Rn_DynamicTransactionResponse.class differ diff --git a/backend/target/classes/com/realnet/fnd/response/Rn_Forms_SetupResponse.class b/backend/target/classes/com/realnet/fnd/response/Rn_Forms_SetupResponse.class new file mode 100644 index 0000000..2e0c419 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/response/Rn_Forms_SetupResponse.class differ diff --git a/backend/target/classes/com/realnet/fnd/response/Rn_Function_Register_Response.class b/backend/target/classes/com/realnet/fnd/response/Rn_Function_Register_Response.class new file mode 100644 index 0000000..10e64b1 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/response/Rn_Function_Register_Response.class differ diff --git a/backend/target/classes/com/realnet/fnd/response/Rn_Main_Menu_Response.class b/backend/target/classes/com/realnet/fnd/response/Rn_Main_Menu_Response.class new file mode 100644 index 0000000..fc3b014 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/response/Rn_Main_Menu_Response.class differ diff --git a/backend/target/classes/com/realnet/fnd/response/Rn_Menu_Group_Response.class b/backend/target/classes/com/realnet/fnd/response/Rn_Menu_Group_Response.class new file mode 100644 index 0000000..6a54e94 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/response/Rn_Menu_Group_Response.class differ diff --git a/backend/target/classes/com/realnet/fnd/response/Rn_Menu_Register_Response.class b/backend/target/classes/com/realnet/fnd/response/Rn_Menu_Register_Response.class new file mode 100644 index 0000000..61d7dc8 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/response/Rn_Menu_Register_Response.class differ diff --git a/backend/target/classes/com/realnet/fnd/response/SingleDataSeriseResponse.class b/backend/target/classes/com/realnet/fnd/response/SingleDataSeriseResponse.class new file mode 100644 index 0000000..91f5cd6 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/response/SingleDataSeriseResponse.class differ diff --git a/backend/target/classes/com/realnet/fnd/service/ExtFieldService.class b/backend/target/classes/com/realnet/fnd/service/ExtFieldService.class new file mode 100644 index 0000000..6b39fa3 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/service/ExtFieldService.class differ diff --git a/backend/target/classes/com/realnet/fnd/service/ExtFieldServiceImpl.class b/backend/target/classes/com/realnet/fnd/service/ExtFieldServiceImpl.class new file mode 100644 index 0000000..d8d10ea Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/service/ExtFieldServiceImpl.class differ diff --git a/backend/target/classes/com/realnet/fnd/service/FileStorageService.class b/backend/target/classes/com/realnet/fnd/service/FileStorageService.class new file mode 100644 index 0000000..cce8897 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/service/FileStorageService.class differ diff --git a/backend/target/classes/com/realnet/fnd/service/RnGroupMenuLineServiec.class b/backend/target/classes/com/realnet/fnd/service/RnGroupMenuLineServiec.class new file mode 100644 index 0000000..9c2a3f2 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/service/RnGroupMenuLineServiec.class differ diff --git a/backend/target/classes/com/realnet/fnd/service/RnGroupMenuLineServiecImpl.class b/backend/target/classes/com/realnet/fnd/service/RnGroupMenuLineServiecImpl.class new file mode 100644 index 0000000..2b1d0ac Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/service/RnGroupMenuLineServiecImpl.class differ diff --git a/backend/target/classes/com/realnet/fnd/service/Rn_DynamicTransactionService.class b/backend/target/classes/com/realnet/fnd/service/Rn_DynamicTransactionService.class new file mode 100644 index 0000000..6e57671 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/service/Rn_DynamicTransactionService.class differ diff --git a/backend/target/classes/com/realnet/fnd/service/Rn_DynamicTransactionServiceImpl.class b/backend/target/classes/com/realnet/fnd/service/Rn_DynamicTransactionServiceImpl.class new file mode 100644 index 0000000..1ba580e Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/service/Rn_DynamicTransactionServiceImpl.class differ diff --git a/backend/target/classes/com/realnet/fnd/service/Rn_Forms_Setup_Service.class b/backend/target/classes/com/realnet/fnd/service/Rn_Forms_Setup_Service.class new file mode 100644 index 0000000..6073262 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/service/Rn_Forms_Setup_Service.class differ diff --git a/backend/target/classes/com/realnet/fnd/service/Rn_Forms_Setup_ServiceImpl.class b/backend/target/classes/com/realnet/fnd/service/Rn_Forms_Setup_ServiceImpl.class new file mode 100644 index 0000000..3a7c182 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/service/Rn_Forms_Setup_ServiceImpl.class differ diff --git a/backend/target/classes/com/realnet/fnd/service/Rn_Function_Register_Service.class b/backend/target/classes/com/realnet/fnd/service/Rn_Function_Register_Service.class new file mode 100644 index 0000000..8254eb1 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/service/Rn_Function_Register_Service.class differ diff --git a/backend/target/classes/com/realnet/fnd/service/Rn_Function_Register_ServiceImpl.class b/backend/target/classes/com/realnet/fnd/service/Rn_Function_Register_ServiceImpl.class new file mode 100644 index 0000000..430cbb5 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/service/Rn_Function_Register_ServiceImpl.class differ diff --git a/backend/target/classes/com/realnet/fnd/service/Rn_Main_Menu_Service.class b/backend/target/classes/com/realnet/fnd/service/Rn_Main_Menu_Service.class new file mode 100644 index 0000000..ab54aa2 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/service/Rn_Main_Menu_Service.class differ diff --git a/backend/target/classes/com/realnet/fnd/service/Rn_Main_Menu_ServiceImpl.class b/backend/target/classes/com/realnet/fnd/service/Rn_Main_Menu_ServiceImpl.class new file mode 100644 index 0000000..4562af2 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/service/Rn_Main_Menu_ServiceImpl.class differ diff --git a/backend/target/classes/com/realnet/fnd/service/Rn_Menu_Group_Service.class b/backend/target/classes/com/realnet/fnd/service/Rn_Menu_Group_Service.class new file mode 100644 index 0000000..eb60b8b Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/service/Rn_Menu_Group_Service.class differ diff --git a/backend/target/classes/com/realnet/fnd/service/Rn_Menu_Group_ServiceImpl.class b/backend/target/classes/com/realnet/fnd/service/Rn_Menu_Group_ServiceImpl.class new file mode 100644 index 0000000..3b40d20 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/service/Rn_Menu_Group_ServiceImpl.class differ diff --git a/backend/target/classes/com/realnet/fnd/service/Rn_Menu_Register_Service.class b/backend/target/classes/com/realnet/fnd/service/Rn_Menu_Register_Service.class new file mode 100644 index 0000000..7f75710 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/service/Rn_Menu_Register_Service.class differ diff --git a/backend/target/classes/com/realnet/fnd/service/Rn_Menu_Register_ServiceImpl.class b/backend/target/classes/com/realnet/fnd/service/Rn_Menu_Register_ServiceImpl.class new file mode 100644 index 0000000..58973bc Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/service/Rn_Menu_Register_ServiceImpl.class differ diff --git a/backend/target/classes/com/realnet/fnd/service1/GrpMenuAccessServiceImpl.class b/backend/target/classes/com/realnet/fnd/service1/GrpMenuAccessServiceImpl.class new file mode 100644 index 0000000..19aca4e Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/service1/GrpMenuAccessServiceImpl.class differ diff --git a/backend/target/classes/com/realnet/fnd/service1/MenuDetServiceImpl.class b/backend/target/classes/com/realnet/fnd/service1/MenuDetServiceImpl.class new file mode 100644 index 0000000..8c53795 Binary files /dev/null and b/backend/target/classes/com/realnet/fnd/service1/MenuDetServiceImpl.class differ diff --git a/backend/target/classes/com/realnet/logging/LogEntity.class b/backend/target/classes/com/realnet/logging/LogEntity.class new file mode 100644 index 0000000..99234cb Binary files /dev/null and b/backend/target/classes/com/realnet/logging/LogEntity.class differ diff --git a/backend/target/classes/com/realnet/logging/LogExecutionTime.class b/backend/target/classes/com/realnet/logging/LogExecutionTime.class new file mode 100644 index 0000000..ffd8409 Binary files /dev/null and b/backend/target/classes/com/realnet/logging/LogExecutionTime.class differ diff --git a/backend/target/classes/com/realnet/logging/LoggingAspect.class b/backend/target/classes/com/realnet/logging/LoggingAspect.class new file mode 100644 index 0000000..ff55896 Binary files /dev/null and b/backend/target/classes/com/realnet/logging/LoggingAspect.class differ diff --git a/backend/target/classes/com/realnet/logging/NoLogging.class b/backend/target/classes/com/realnet/logging/NoLogging.class new file mode 100644 index 0000000..e8efc29 Binary files /dev/null and b/backend/target/classes/com/realnet/logging/NoLogging.class differ diff --git a/backend/target/classes/com/realnet/logging/SecurityNoLogging.class b/backend/target/classes/com/realnet/logging/SecurityNoLogging.class new file mode 100644 index 0000000..b3320b2 Binary files /dev/null and b/backend/target/classes/com/realnet/logging/SecurityNoLogging.class differ diff --git a/backend/target/classes/com/realnet/logging1/PatternLayoutWithUserContext.class b/backend/target/classes/com/realnet/logging1/PatternLayoutWithUserContext.class new file mode 100644 index 0000000..931fcc5 Binary files /dev/null and b/backend/target/classes/com/realnet/logging1/PatternLayoutWithUserContext.class differ diff --git a/backend/target/classes/com/realnet/logging1/SessionConverter.class b/backend/target/classes/com/realnet/logging1/SessionConverter.class new file mode 100644 index 0000000..67d616d Binary files /dev/null and b/backend/target/classes/com/realnet/logging1/SessionConverter.class differ diff --git a/backend/target/classes/com/realnet/logging1/UserConverter.class b/backend/target/classes/com/realnet/logging1/UserConverter.class new file mode 100644 index 0000000..92f692f Binary files /dev/null and b/backend/target/classes/com/realnet/logging1/UserConverter.class differ diff --git a/backend/target/classes/com/realnet/logging1/controller/AppUserLogController$1.class b/backend/target/classes/com/realnet/logging1/controller/AppUserLogController$1.class new file mode 100644 index 0000000..4ae4176 Binary files /dev/null and b/backend/target/classes/com/realnet/logging1/controller/AppUserLogController$1.class differ diff --git a/backend/target/classes/com/realnet/logging1/controller/AppUserLogController$2.class b/backend/target/classes/com/realnet/logging1/controller/AppUserLogController$2.class new file mode 100644 index 0000000..6e827d1 Binary files /dev/null and b/backend/target/classes/com/realnet/logging1/controller/AppUserLogController$2.class differ diff --git a/backend/target/classes/com/realnet/logging1/controller/AppUserLogController$3.class b/backend/target/classes/com/realnet/logging1/controller/AppUserLogController$3.class new file mode 100644 index 0000000..170e363 Binary files /dev/null and b/backend/target/classes/com/realnet/logging1/controller/AppUserLogController$3.class differ diff --git a/backend/target/classes/com/realnet/logging1/controller/AppUserLogController$4.class b/backend/target/classes/com/realnet/logging1/controller/AppUserLogController$4.class new file mode 100644 index 0000000..0fab926 Binary files /dev/null and b/backend/target/classes/com/realnet/logging1/controller/AppUserLogController$4.class differ diff --git a/backend/target/classes/com/realnet/logging1/controller/AppUserLogController$5.class b/backend/target/classes/com/realnet/logging1/controller/AppUserLogController$5.class new file mode 100644 index 0000000..ce6f98d Binary files /dev/null and b/backend/target/classes/com/realnet/logging1/controller/AppUserLogController$5.class differ diff --git a/backend/target/classes/com/realnet/logging1/controller/AppUserLogController$6.class b/backend/target/classes/com/realnet/logging1/controller/AppUserLogController$6.class new file mode 100644 index 0000000..0a6362c Binary files /dev/null and b/backend/target/classes/com/realnet/logging1/controller/AppUserLogController$6.class differ diff --git a/backend/target/classes/com/realnet/logging1/controller/AppUserLogController.class b/backend/target/classes/com/realnet/logging1/controller/AppUserLogController.class new file mode 100644 index 0000000..5fb89ab Binary files /dev/null and b/backend/target/classes/com/realnet/logging1/controller/AppUserLogController.class differ diff --git a/backend/target/classes/com/realnet/logging1/controller/AppUserLogController2.class b/backend/target/classes/com/realnet/logging1/controller/AppUserLogController2.class new file mode 100644 index 0000000..b1b5614 Binary files /dev/null and b/backend/target/classes/com/realnet/logging1/controller/AppUserLogController2.class differ diff --git a/backend/target/classes/com/realnet/logging1/entity/AppUserLog.class b/backend/target/classes/com/realnet/logging1/entity/AppUserLog.class new file mode 100644 index 0000000..220f589 Binary files /dev/null and b/backend/target/classes/com/realnet/logging1/entity/AppUserLog.class differ diff --git a/backend/target/classes/com/realnet/logging1/repository/AppUserLogginRepository.class b/backend/target/classes/com/realnet/logging1/repository/AppUserLogginRepository.class new file mode 100644 index 0000000..2027b57 Binary files /dev/null and b/backend/target/classes/com/realnet/logging1/repository/AppUserLogginRepository.class differ diff --git a/backend/target/classes/com/realnet/logging1/service/LoggingService.class b/backend/target/classes/com/realnet/logging1/service/LoggingService.class new file mode 100644 index 0000000..f94a68c Binary files /dev/null and b/backend/target/classes/com/realnet/logging1/service/LoggingService.class differ diff --git a/backend/target/classes/com/realnet/session/controller/SessionController.class b/backend/target/classes/com/realnet/session/controller/SessionController.class new file mode 100644 index 0000000..b9d4a8b Binary files /dev/null and b/backend/target/classes/com/realnet/session/controller/SessionController.class differ diff --git a/backend/target/classes/com/realnet/session/entity/AboutWork.class b/backend/target/classes/com/realnet/session/entity/AboutWork.class new file mode 100644 index 0000000..889f052 Binary files /dev/null and b/backend/target/classes/com/realnet/session/entity/AboutWork.class differ diff --git a/backend/target/classes/com/realnet/session/entity/SessionItem.class b/backend/target/classes/com/realnet/session/entity/SessionItem.class new file mode 100644 index 0000000..890ec25 Binary files /dev/null and b/backend/target/classes/com/realnet/session/entity/SessionItem.class differ diff --git a/backend/target/classes/com/realnet/session/entity/VersionModel.class b/backend/target/classes/com/realnet/session/entity/VersionModel.class new file mode 100644 index 0000000..0e7a385 Binary files /dev/null and b/backend/target/classes/com/realnet/session/entity/VersionModel.class differ diff --git a/backend/target/classes/com/realnet/session/response/SessionResponse.class b/backend/target/classes/com/realnet/session/response/SessionResponse.class new file mode 100644 index 0000000..f3d0e63 Binary files /dev/null and b/backend/target/classes/com/realnet/session/response/SessionResponse.class differ diff --git a/backend/target/classes/com/realnet/userDTO/CompanyDto.class b/backend/target/classes/com/realnet/userDTO/CompanyDto.class new file mode 100644 index 0000000..35778d3 Binary files /dev/null and b/backend/target/classes/com/realnet/userDTO/CompanyDto.class differ diff --git a/backend/target/classes/com/realnet/userDTO/Email.class b/backend/target/classes/com/realnet/userDTO/Email.class new file mode 100644 index 0000000..b4ebc8d Binary files /dev/null and b/backend/target/classes/com/realnet/userDTO/Email.class differ diff --git a/backend/target/classes/com/realnet/userDTO/EmailRequest.class b/backend/target/classes/com/realnet/userDTO/EmailRequest.class new file mode 100644 index 0000000..a1b862d Binary files /dev/null and b/backend/target/classes/com/realnet/userDTO/EmailRequest.class differ diff --git a/backend/target/classes/com/realnet/userDTO/Login.class b/backend/target/classes/com/realnet/userDTO/Login.class new file mode 100644 index 0000000..545e1fa Binary files /dev/null and b/backend/target/classes/com/realnet/userDTO/Login.class differ diff --git a/backend/target/classes/com/realnet/userDTO/LoginUser.class b/backend/target/classes/com/realnet/userDTO/LoginUser.class new file mode 100644 index 0000000..4929091 Binary files /dev/null and b/backend/target/classes/com/realnet/userDTO/LoginUser.class differ diff --git a/backend/target/classes/com/realnet/userDTO/PasswordResetRequest.class b/backend/target/classes/com/realnet/userDTO/PasswordResetRequest.class new file mode 100644 index 0000000..662753d Binary files /dev/null and b/backend/target/classes/com/realnet/userDTO/PasswordResetRequest.class differ diff --git a/backend/target/classes/com/realnet/userDTO/Provider.class b/backend/target/classes/com/realnet/userDTO/Provider.class new file mode 100644 index 0000000..80812be Binary files /dev/null and b/backend/target/classes/com/realnet/userDTO/Provider.class differ diff --git a/backend/target/classes/com/realnet/userDTO/Rn_Who_AccId_Column.class b/backend/target/classes/com/realnet/userDTO/Rn_Who_AccId_Column.class new file mode 100644 index 0000000..4b05518 Binary files /dev/null and b/backend/target/classes/com/realnet/userDTO/Rn_Who_AccId_Column.class differ diff --git a/backend/target/classes/com/realnet/userDTO/Rn_Who_Columns.class b/backend/target/classes/com/realnet/userDTO/Rn_Who_Columns.class new file mode 100644 index 0000000..2255d58 Binary files /dev/null and b/backend/target/classes/com/realnet/userDTO/Rn_Who_Columns.class differ diff --git a/backend/target/classes/com/realnet/userDTO/Role.class b/backend/target/classes/com/realnet/userDTO/Role.class new file mode 100644 index 0000000..ab66569 Binary files /dev/null and b/backend/target/classes/com/realnet/userDTO/Role.class differ diff --git a/backend/target/classes/com/realnet/userDTO/RoleUpdateDto.class b/backend/target/classes/com/realnet/userDTO/RoleUpdateDto.class new file mode 100644 index 0000000..0782880 Binary files /dev/null and b/backend/target/classes/com/realnet/userDTO/RoleUpdateDto.class differ diff --git a/backend/target/classes/com/realnet/userDTO/Sys_Accounts.class b/backend/target/classes/com/realnet/userDTO/Sys_Accounts.class new file mode 100644 index 0000000..fdb016f Binary files /dev/null and b/backend/target/classes/com/realnet/userDTO/Sys_Accounts.class differ diff --git a/backend/target/classes/com/realnet/userDTO/User.class b/backend/target/classes/com/realnet/userDTO/User.class new file mode 100644 index 0000000..b1548ec Binary files /dev/null and b/backend/target/classes/com/realnet/userDTO/User.class differ diff --git a/backend/target/classes/com/realnet/userDTO/UserDto.class b/backend/target/classes/com/realnet/userDTO/UserDto.class new file mode 100644 index 0000000..d2a2089 Binary files /dev/null and b/backend/target/classes/com/realnet/userDTO/UserDto.class differ diff --git a/backend/target/classes/com/realnet/userDTO/UserProfileDTO.class b/backend/target/classes/com/realnet/userDTO/UserProfileDTO.class new file mode 100644 index 0000000..e5a6e72 Binary files /dev/null and b/backend/target/classes/com/realnet/userDTO/UserProfileDTO.class differ diff --git a/backend/target/classes/com/realnet/userlist/controller/UserListController.class b/backend/target/classes/com/realnet/userlist/controller/UserListController.class new file mode 100644 index 0000000..f66fece Binary files /dev/null and b/backend/target/classes/com/realnet/userlist/controller/UserListController.class differ diff --git a/backend/target/classes/com/realnet/userlist/entity/UserImage.class b/backend/target/classes/com/realnet/userlist/entity/UserImage.class new file mode 100644 index 0000000..bcd8349 Binary files /dev/null and b/backend/target/classes/com/realnet/userlist/entity/UserImage.class differ diff --git a/backend/target/classes/com/realnet/userlist/entity/UserList.class b/backend/target/classes/com/realnet/userlist/entity/UserList.class new file mode 100644 index 0000000..2b3fe33 Binary files /dev/null and b/backend/target/classes/com/realnet/userlist/entity/UserList.class differ diff --git a/backend/target/classes/com/realnet/userlist/repository/UserImageRepository.class b/backend/target/classes/com/realnet/userlist/repository/UserImageRepository.class new file mode 100644 index 0000000..111de78 Binary files /dev/null and b/backend/target/classes/com/realnet/userlist/repository/UserImageRepository.class differ diff --git a/backend/target/classes/com/realnet/userlist/repository/UserListRepository.class b/backend/target/classes/com/realnet/userlist/repository/UserListRepository.class new file mode 100644 index 0000000..363f883 Binary files /dev/null and b/backend/target/classes/com/realnet/userlist/repository/UserListRepository.class differ diff --git a/backend/target/classes/com/realnet/userlist/service/UserListService.class b/backend/target/classes/com/realnet/userlist/service/UserListService.class new file mode 100644 index 0000000..2b57e91 Binary files /dev/null and b/backend/target/classes/com/realnet/userlist/service/UserListService.class differ diff --git a/backend/target/classes/com/realnet/userlist/service/impl/UserListServiceImpl.class b/backend/target/classes/com/realnet/userlist/service/impl/UserListServiceImpl.class new file mode 100644 index 0000000..959a8aa Binary files /dev/null and b/backend/target/classes/com/realnet/userlist/service/impl/UserListServiceImpl.class differ diff --git a/backend/target/classes/com/realnet/users/controller/RoleController.class b/backend/target/classes/com/realnet/users/controller/RoleController.class new file mode 100644 index 0000000..51daeb8 Binary files /dev/null and b/backend/target/classes/com/realnet/users/controller/RoleController.class differ diff --git a/backend/target/classes/com/realnet/users/controller/UserController.class b/backend/target/classes/com/realnet/users/controller/UserController.class new file mode 100644 index 0000000..54893b8 Binary files /dev/null and b/backend/target/classes/com/realnet/users/controller/UserController.class differ diff --git a/backend/target/classes/com/realnet/users/controller1/AppUserController.class b/backend/target/classes/com/realnet/users/controller1/AppUserController.class new file mode 100644 index 0000000..ef9bd00 Binary files /dev/null and b/backend/target/classes/com/realnet/users/controller1/AppUserController.class differ diff --git a/backend/target/classes/com/realnet/users/controller1/AppUserGrpController.class b/backend/target/classes/com/realnet/users/controller1/AppUserGrpController.class new file mode 100644 index 0000000..7a5f6f7 Binary files /dev/null and b/backend/target/classes/com/realnet/users/controller1/AppUserGrpController.class differ diff --git a/backend/target/classes/com/realnet/users/controller1/AppuserSessionController.class b/backend/target/classes/com/realnet/users/controller1/AppuserSessionController.class new file mode 100644 index 0000000..e3f6486 Binary files /dev/null and b/backend/target/classes/com/realnet/users/controller1/AppuserSessionController.class differ diff --git a/backend/target/classes/com/realnet/users/controller1/PositonAndDepartmentController.class b/backend/target/classes/com/realnet/users/controller1/PositonAndDepartmentController.class new file mode 100644 index 0000000..9398fb6 Binary files /dev/null and b/backend/target/classes/com/realnet/users/controller1/PositonAndDepartmentController.class differ diff --git a/backend/target/classes/com/realnet/users/controller1/SysAccountController.class b/backend/target/classes/com/realnet/users/controller1/SysAccountController.class new file mode 100644 index 0000000..077306c Binary files /dev/null and b/backend/target/classes/com/realnet/users/controller1/SysAccountController.class differ diff --git a/backend/target/classes/com/realnet/users/entity/CompanyDto.class b/backend/target/classes/com/realnet/users/entity/CompanyDto.class new file mode 100644 index 0000000..c8da6b7 Binary files /dev/null and b/backend/target/classes/com/realnet/users/entity/CompanyDto.class differ diff --git a/backend/target/classes/com/realnet/users/entity/ERole.class b/backend/target/classes/com/realnet/users/entity/ERole.class new file mode 100644 index 0000000..680ef9e Binary files /dev/null and b/backend/target/classes/com/realnet/users/entity/ERole.class differ diff --git a/backend/target/classes/com/realnet/users/entity/Email.class b/backend/target/classes/com/realnet/users/entity/Email.class new file mode 100644 index 0000000..a37d8e1 Binary files /dev/null and b/backend/target/classes/com/realnet/users/entity/Email.class differ diff --git a/backend/target/classes/com/realnet/users/entity/EmailRequest.class b/backend/target/classes/com/realnet/users/entity/EmailRequest.class new file mode 100644 index 0000000..8224da9 Binary files /dev/null and b/backend/target/classes/com/realnet/users/entity/EmailRequest.class differ diff --git a/backend/target/classes/com/realnet/users/entity/GenericResponse.class b/backend/target/classes/com/realnet/users/entity/GenericResponse.class new file mode 100644 index 0000000..676143e Binary files /dev/null and b/backend/target/classes/com/realnet/users/entity/GenericResponse.class differ diff --git a/backend/target/classes/com/realnet/users/entity/Login.class b/backend/target/classes/com/realnet/users/entity/Login.class new file mode 100644 index 0000000..0f6c7fc Binary files /dev/null and b/backend/target/classes/com/realnet/users/entity/Login.class differ diff --git a/backend/target/classes/com/realnet/users/entity/LoginUser.class b/backend/target/classes/com/realnet/users/entity/LoginUser.class new file mode 100644 index 0000000..f84f2fd Binary files /dev/null and b/backend/target/classes/com/realnet/users/entity/LoginUser.class differ diff --git a/backend/target/classes/com/realnet/users/entity/PasswordResetRequest.class b/backend/target/classes/com/realnet/users/entity/PasswordResetRequest.class new file mode 100644 index 0000000..f6959e9 Binary files /dev/null and b/backend/target/classes/com/realnet/users/entity/PasswordResetRequest.class differ diff --git a/backend/target/classes/com/realnet/users/entity/PasswordResetToken.class b/backend/target/classes/com/realnet/users/entity/PasswordResetToken.class new file mode 100644 index 0000000..04fd956 Binary files /dev/null and b/backend/target/classes/com/realnet/users/entity/PasswordResetToken.class differ diff --git a/backend/target/classes/com/realnet/users/entity/Role.class b/backend/target/classes/com/realnet/users/entity/Role.class new file mode 100644 index 0000000..22f19ee Binary files /dev/null and b/backend/target/classes/com/realnet/users/entity/Role.class differ diff --git a/backend/target/classes/com/realnet/users/entity/RoleUpdateDto.class b/backend/target/classes/com/realnet/users/entity/RoleUpdateDto.class new file mode 100644 index 0000000..f3f5953 Binary files /dev/null and b/backend/target/classes/com/realnet/users/entity/RoleUpdateDto.class differ diff --git a/backend/target/classes/com/realnet/users/entity/Sys_Accounts.class b/backend/target/classes/com/realnet/users/entity/Sys_Accounts.class new file mode 100644 index 0000000..a7d1da1 Binary files /dev/null and b/backend/target/classes/com/realnet/users/entity/Sys_Accounts.class differ diff --git a/backend/target/classes/com/realnet/users/entity/UserDto.class b/backend/target/classes/com/realnet/users/entity/UserDto.class new file mode 100644 index 0000000..d386d8f Binary files /dev/null and b/backend/target/classes/com/realnet/users/entity/UserDto.class differ diff --git a/backend/target/classes/com/realnet/users/entity/UserProfileDTO.class b/backend/target/classes/com/realnet/users/entity/UserProfileDTO.class new file mode 100644 index 0000000..484236e Binary files /dev/null and b/backend/target/classes/com/realnet/users/entity/UserProfileDTO.class differ diff --git a/backend/target/classes/com/realnet/users/entity1/AppUser.class b/backend/target/classes/com/realnet/users/entity1/AppUser.class new file mode 100644 index 0000000..2bd6b12 Binary files /dev/null and b/backend/target/classes/com/realnet/users/entity1/AppUser.class differ diff --git a/backend/target/classes/com/realnet/users/entity1/AppUserDepartment.class b/backend/target/classes/com/realnet/users/entity1/AppUserDepartment.class new file mode 100644 index 0000000..2784b2e Binary files /dev/null and b/backend/target/classes/com/realnet/users/entity1/AppUserDepartment.class differ diff --git a/backend/target/classes/com/realnet/users/entity1/AppUserDto.class b/backend/target/classes/com/realnet/users/entity1/AppUserDto.class new file mode 100644 index 0000000..412a063 Binary files /dev/null and b/backend/target/classes/com/realnet/users/entity1/AppUserDto.class differ diff --git a/backend/target/classes/com/realnet/users/entity1/AppUserLoginHist.class b/backend/target/classes/com/realnet/users/entity1/AppUserLoginHist.class new file mode 100644 index 0000000..9bc9225 Binary files /dev/null and b/backend/target/classes/com/realnet/users/entity1/AppUserLoginHist.class differ diff --git a/backend/target/classes/com/realnet/users/entity1/AppUserPasswlog.class b/backend/target/classes/com/realnet/users/entity1/AppUserPasswlog.class new file mode 100644 index 0000000..8a63fdc Binary files /dev/null and b/backend/target/classes/com/realnet/users/entity1/AppUserPasswlog.class differ diff --git a/backend/target/classes/com/realnet/users/entity1/AppUserPasswlogCompositeKey.class b/backend/target/classes/com/realnet/users/entity1/AppUserPasswlogCompositeKey.class new file mode 100644 index 0000000..19d9c59 Binary files /dev/null and b/backend/target/classes/com/realnet/users/entity1/AppUserPasswlogCompositeKey.class differ diff --git a/backend/target/classes/com/realnet/users/entity1/AppUserPosition.class b/backend/target/classes/com/realnet/users/entity1/AppUserPosition.class new file mode 100644 index 0000000..ea53290 Binary files /dev/null and b/backend/target/classes/com/realnet/users/entity1/AppUserPosition.class differ diff --git a/backend/target/classes/com/realnet/users/entity1/AppUserPrinciple.class b/backend/target/classes/com/realnet/users/entity1/AppUserPrinciple.class new file mode 100644 index 0000000..ae6a1f0 Binary files /dev/null and b/backend/target/classes/com/realnet/users/entity1/AppUserPrinciple.class differ diff --git a/backend/target/classes/com/realnet/users/entity1/AppUserRole.class b/backend/target/classes/com/realnet/users/entity1/AppUserRole.class new file mode 100644 index 0000000..1ef52d8 Binary files /dev/null and b/backend/target/classes/com/realnet/users/entity1/AppUserRole.class differ diff --git a/backend/target/classes/com/realnet/users/entity1/AppUserSessions.class b/backend/target/classes/com/realnet/users/entity1/AppUserSessions.class new file mode 100644 index 0000000..c1fbe52 Binary files /dev/null and b/backend/target/classes/com/realnet/users/entity1/AppUserSessions.class differ diff --git a/backend/target/classes/com/realnet/users/entity1/AppUserSessionsCompositeKey.class b/backend/target/classes/com/realnet/users/entity1/AppUserSessionsCompositeKey.class new file mode 100644 index 0000000..4cf7847 Binary files /dev/null and b/backend/target/classes/com/realnet/users/entity1/AppUserSessionsCompositeKey.class differ diff --git a/backend/target/classes/com/realnet/users/entity1/AppUser_who_column.class b/backend/target/classes/com/realnet/users/entity1/AppUser_who_column.class new file mode 100644 index 0000000..06cf570 Binary files /dev/null and b/backend/target/classes/com/realnet/users/entity1/AppUser_who_column.class differ diff --git a/backend/target/classes/com/realnet/users/entity1/Registration.class b/backend/target/classes/com/realnet/users/entity1/Registration.class new file mode 100644 index 0000000..2cc5888 Binary files /dev/null and b/backend/target/classes/com/realnet/users/entity1/Registration.class differ diff --git a/backend/target/classes/com/realnet/users/entity1/SignUp.class b/backend/target/classes/com/realnet/users/entity1/SignUp.class new file mode 100644 index 0000000..cf8ba49 Binary files /dev/null and b/backend/target/classes/com/realnet/users/entity1/SignUp.class differ diff --git a/backend/target/classes/com/realnet/users/repository/AboutWorkRepo.class b/backend/target/classes/com/realnet/users/repository/AboutWorkRepo.class new file mode 100644 index 0000000..d4b340a Binary files /dev/null and b/backend/target/classes/com/realnet/users/repository/AboutWorkRepo.class differ diff --git a/backend/target/classes/com/realnet/users/repository/CompanyRepo.class b/backend/target/classes/com/realnet/users/repository/CompanyRepo.class new file mode 100644 index 0000000..0411ece Binary files /dev/null and b/backend/target/classes/com/realnet/users/repository/CompanyRepo.class differ diff --git a/backend/target/classes/com/realnet/users/repository/RoleRepo.class b/backend/target/classes/com/realnet/users/repository/RoleRepo.class new file mode 100644 index 0000000..130ef4c Binary files /dev/null and b/backend/target/classes/com/realnet/users/repository/RoleRepo.class differ diff --git a/backend/target/classes/com/realnet/users/repository/SysAccountRepo.class b/backend/target/classes/com/realnet/users/repository/SysAccountRepo.class new file mode 100644 index 0000000..6de1382 Binary files /dev/null and b/backend/target/classes/com/realnet/users/repository/SysAccountRepo.class differ diff --git a/backend/target/classes/com/realnet/users/repository1/AppUserDepartmentRepository.class b/backend/target/classes/com/realnet/users/repository1/AppUserDepartmentRepository.class new file mode 100644 index 0000000..23ae960 Binary files /dev/null and b/backend/target/classes/com/realnet/users/repository1/AppUserDepartmentRepository.class differ diff --git a/backend/target/classes/com/realnet/users/repository1/AppUserPositionRepository.class b/backend/target/classes/com/realnet/users/repository1/AppUserPositionRepository.class new file mode 100644 index 0000000..1c8f699 Binary files /dev/null and b/backend/target/classes/com/realnet/users/repository1/AppUserPositionRepository.class differ diff --git a/backend/target/classes/com/realnet/users/repository1/AppUserRepository.class b/backend/target/classes/com/realnet/users/repository1/AppUserRepository.class new file mode 100644 index 0000000..de3f913 Binary files /dev/null and b/backend/target/classes/com/realnet/users/repository1/AppUserRepository.class differ diff --git a/backend/target/classes/com/realnet/users/repository1/AppUserRoleRepository.class b/backend/target/classes/com/realnet/users/repository1/AppUserRoleRepository.class new file mode 100644 index 0000000..97c15ce Binary files /dev/null and b/backend/target/classes/com/realnet/users/repository1/AppUserRoleRepository.class differ diff --git a/backend/target/classes/com/realnet/users/repository1/AppUserSessionsRepository.class b/backend/target/classes/com/realnet/users/repository1/AppUserSessionsRepository.class new file mode 100644 index 0000000..f1254f3 Binary files /dev/null and b/backend/target/classes/com/realnet/users/repository1/AppUserSessionsRepository.class differ diff --git a/backend/target/classes/com/realnet/users/repository1/passwordTokenRepository.class b/backend/target/classes/com/realnet/users/repository1/passwordTokenRepository.class new file mode 100644 index 0000000..6aa7bd4 Binary files /dev/null and b/backend/target/classes/com/realnet/users/repository1/passwordTokenRepository.class differ diff --git a/backend/target/classes/com/realnet/users/response/MessageResponse.class b/backend/target/classes/com/realnet/users/response/MessageResponse.class new file mode 100644 index 0000000..8ac0698 Binary files /dev/null and b/backend/target/classes/com/realnet/users/response/MessageResponse.class differ diff --git a/backend/target/classes/com/realnet/users/response/ServiceResponse.class b/backend/target/classes/com/realnet/users/response/ServiceResponse.class new file mode 100644 index 0000000..02b0558 Binary files /dev/null and b/backend/target/classes/com/realnet/users/response/ServiceResponse.class differ diff --git a/backend/target/classes/com/realnet/users/response/UserItem.class b/backend/target/classes/com/realnet/users/response/UserItem.class new file mode 100644 index 0000000..d7b847e Binary files /dev/null and b/backend/target/classes/com/realnet/users/response/UserItem.class differ diff --git a/backend/target/classes/com/realnet/users/response/UserResponse.class b/backend/target/classes/com/realnet/users/response/UserResponse.class new file mode 100644 index 0000000..def4bdd Binary files /dev/null and b/backend/target/classes/com/realnet/users/response/UserResponse.class differ diff --git a/backend/target/classes/com/realnet/users/service/AboutServiceImple.class b/backend/target/classes/com/realnet/users/service/AboutServiceImple.class new file mode 100644 index 0000000..9845640 Binary files /dev/null and b/backend/target/classes/com/realnet/users/service/AboutServiceImple.class differ diff --git a/backend/target/classes/com/realnet/users/service/AboutWorkService.class b/backend/target/classes/com/realnet/users/service/AboutWorkService.class new file mode 100644 index 0000000..2a87096 Binary files /dev/null and b/backend/target/classes/com/realnet/users/service/AboutWorkService.class differ diff --git a/backend/target/classes/com/realnet/users/service/CompanyService.class b/backend/target/classes/com/realnet/users/service/CompanyService.class new file mode 100644 index 0000000..c82189c Binary files /dev/null and b/backend/target/classes/com/realnet/users/service/CompanyService.class differ diff --git a/backend/target/classes/com/realnet/users/service/RoleService.class b/backend/target/classes/com/realnet/users/service/RoleService.class new file mode 100644 index 0000000..343854e Binary files /dev/null and b/backend/target/classes/com/realnet/users/service/RoleService.class differ diff --git a/backend/target/classes/com/realnet/users/service/RoleServiceImpl.class b/backend/target/classes/com/realnet/users/service/RoleServiceImpl.class new file mode 100644 index 0000000..a7b71b4 Binary files /dev/null and b/backend/target/classes/com/realnet/users/service/RoleServiceImpl.class differ diff --git a/backend/target/classes/com/realnet/users/service1/AppUserRoleServiceImpl.class b/backend/target/classes/com/realnet/users/service1/AppUserRoleServiceImpl.class new file mode 100644 index 0000000..be179ab Binary files /dev/null and b/backend/target/classes/com/realnet/users/service1/AppUserRoleServiceImpl.class differ diff --git a/backend/target/classes/com/realnet/users/service1/AppUserService.class b/backend/target/classes/com/realnet/users/service1/AppUserService.class new file mode 100644 index 0000000..01d6959 Binary files /dev/null and b/backend/target/classes/com/realnet/users/service1/AppUserService.class differ diff --git a/backend/target/classes/com/realnet/users/service1/AppUserServiceImpl.class b/backend/target/classes/com/realnet/users/service1/AppUserServiceImpl.class new file mode 100644 index 0000000..fa6409e Binary files /dev/null and b/backend/target/classes/com/realnet/users/service1/AppUserServiceImpl.class differ diff --git a/backend/target/classes/com/realnet/users/service1/AppUserSessionsServiceImpl.class b/backend/target/classes/com/realnet/users/service1/AppUserSessionsServiceImpl.class new file mode 100644 index 0000000..99dc62c Binary files /dev/null and b/backend/target/classes/com/realnet/users/service1/AppUserSessionsServiceImpl.class differ diff --git a/backend/target/classes/com/realnet/users/service1/PositionAndDepartmentServiceImpl.class b/backend/target/classes/com/realnet/users/service1/PositionAndDepartmentServiceImpl.class new file mode 100644 index 0000000..9534bb2 Binary files /dev/null and b/backend/target/classes/com/realnet/users/service1/PositionAndDepartmentServiceImpl.class differ diff --git a/backend/target/classes/com/realnet/utils/Constant.class b/backend/target/classes/com/realnet/utils/Constant.class new file mode 100644 index 0000000..0a04ac0 Binary files /dev/null and b/backend/target/classes/com/realnet/utils/Constant.class differ diff --git a/backend/target/classes/com/realnet/utils/Port_Constant.class b/backend/target/classes/com/realnet/utils/Port_Constant.class new file mode 100644 index 0000000..757f363 Binary files /dev/null and b/backend/target/classes/com/realnet/utils/Port_Constant.class differ diff --git a/backend/target/classes/com/realnet/utils/WireFrameConstant$FormType.class b/backend/target/classes/com/realnet/utils/WireFrameConstant$FormType.class new file mode 100644 index 0000000..b9a8ad1 Binary files /dev/null and b/backend/target/classes/com/realnet/utils/WireFrameConstant$FormType.class differ diff --git a/backend/target/classes/com/realnet/utils/WireFrameConstant.class b/backend/target/classes/com/realnet/utils/WireFrameConstant.class new file mode 100644 index 0000000..3c3cefa Binary files /dev/null and b/backend/target/classes/com/realnet/utils/WireFrameConstant.class differ diff --git a/backend/target/classes/data.sql b/backend/target/classes/data.sql new file mode 100644 index 0000000..77daec5 --- /dev/null +++ b/backend/target/classes/data.sql @@ -0,0 +1,2023 @@ +/* Instructor */ +insert into RN_INSTRUCTOR (ID, FIRST_NAME, LAST_NAME, EMAIL, CREATED_AT, UPDATED_AT) values + (1, 'rajdeep', 'rajbanshi', 'rjraj@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (2, 'sandipan', 'saha', 'sandy@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (3, 'niladri', 'sen', 'sen@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (4, 'abhishek', 'banerjee', 'abhi@gmail.com', '2020-05-24 17:17:36', '2020-07-24 20:12:30'), + (5, 'sayandeep', 'bhowmick', 'sayndeep@gmail.com', '2020-06-24 17:17:36', '2020-07-24 20:12:30'), + (6, 'titas', 'maity', 'titi@gmail.com', '2020-10-22 17:17:36', '2020-10-24 20:12:30'), + (7, 'dip', 'chakraborty', 'dipc@gmail.com', '2020-09-04 17:17:36', '2020-10-24 20:12:30'), + (8, 'asif', 'baidya', 'asif@gmail.com', '2020-08-24 18:17:36', '2020-07-24 20:12:30'), + (9, 'anushree', 'sanyal', 'anus@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (10, 'trisha', 'das', 'trisha@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (11, 'avijit', 'chakraborty', 'avijit@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (12, 'dona', 'sen', 'dona@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (13, 'disha', 'maitra', 'rjraj@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (14, 'sasa', 'saha', 'sandy@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (15, 'vvvv', 'sen', 'sen@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (16, 'qqqq', 'banerjee', 'abhi@gmail.com', '2020-05-24 17:17:36', '2020-07-24 20:12:30'), + (17, 'saaaaayasndeep', 'bhowmick', 'sayndeep@gmail.com', '2020-06-24 17:17:36', '2020-07-24 20:12:30'), + (18, 'lllll', 'maity', 'titi@gmail.com', '2020-10-22 17:17:36', '2020-10-24 20:12:30'), + (19, 'kkkkk', 'chakraborty', 'dipc@gmail.com', '2020-09-04 17:17:36', '2020-10-24 20:12:30'), + (20, 'ffffff', 'baidya', 'asif@gmail.com', '2020-08-24 18:17:36', '2020-07-24 20:12:30'), + (21, 'rajaaQdesep', 'rajbanshi', 'rjraj@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (22, 'sandaaQipsan', 'saha', 'sandy@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (23, 'nilaaQadri', 'sen', 'sen@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (24, 'abQhaaishek', 'banerjee', 'abhi@gmail.com', '2020-05-24 17:17:36', '2020-07-24 20:12:30'), + (25, 'sayanaadeep', 'bhowmick', 'sayndeep@gmail.com', '2020-06-24 17:17:36', '2020-07-24 20:12:30'), + (26, 'tiaatas', 'maity', 'titi@gmail.com', '2020-10-22 17:17:36', '2020-10-24 20:12:30'), + (27, 'dittp', 'chakraborty', 'dipc@gmail.com', '2020-09-04 17:17:36', '2020-10-24 20:12:30'), + (28, 'attsif', 'baidya', 'asif@gmail.com', '2020-08-24 18:17:36', '2020-07-24 20:12:30'), + (29, 'anutttshree', 'sanyal', 'anus@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (30, 'trigggsha', 'das', 'trisha@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (31, 'avijgggit', 'chakraborty', 'avijit@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (32, 'dogggna', 'sen', 'dona@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (33, 'rgggajdeep', 'rajbanshi', 'rjraj@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (34, 'sangggdipan', 'saha', 'sandy@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (35, 'nifgfladri', 'sen', 'sen@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (36, 'abhisfgfhek', 'banerjee', 'abhi@gmail.com', '2020-05-24 17:17:36', '2020-07-24 20:12:30'), + (37, 'safgfgyandeep', 'bhowmick', 'sayndeep@gmail.com', '2020-06-24 17:17:36', '2020-07-24 20:12:30'), + (38, 'titfgfas', 'maity', 'titi@gmail.com', '2020-10-22 17:17:36', '2020-10-24 20:12:30'), + (39, 'dfgfip', 'chakraborty', 'dipc@gmail.com', '2020-09-04 17:17:36', '2020-10-24 20:12:30'), + (40, 'asifgff', 'baidya', 'asif@gmail.com', '2020-08-24 18:17:36', '2020-07-24 20:12:30'), + (41, 'fggfrajdeep', 'rajbanshi', 'rjraj@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (42, 'fgfgsandipan', 'saha', 'sandy@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (43, 'ncxilgbgadri', 'sen', 'sen@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (44, 'adghghbhishek', 'banerjee', 'abhi@gmail.com', '2020-05-24 17:17:36', '2020-07-24 20:12:30'), + (45, 'sayandhyyueep', 'bhowmick', 'sayndeep@gmail.com', '2020-06-24 17:17:36', '2020-07-24 20:12:30'), + (46, 'teritas', 'mereaity', 'titi@gmail.com', '2020-10-22 17:17:36', '2020-10-24 20:12:30'), + (47, 'dipere', 'chakraborty', 'dipc@gmail.com', '2020-09-04 17:17:36', '2020-10-24 20:12:30'), + (48, 'asifcc', 'baidya', 'asif@gmail.com', '2020-08-24 18:17:36', '2020-07-24 20:12:30'), + (49, 'anushrccee', 'sanyal', 'anus@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (50, 'trishawww', 'das', 'trisha@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (51, 'avijiqqt', 'chakraborty', 'avijit@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (52, 'qqqdona', 'sen', 'dona@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (53, 'rajqqqdeep', 'rajbanshi', 'rjraj@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (54, 'sandipqqqqan', 'saha', 'sandy@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (55, 'niladriwww', 'sen', 'sen@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (56, 'abhishewwwk', 'banerjee', 'abhi@gmail.com', '2020-05-24 17:17:36', '2020-07-24 20:12:30'), + (57, 'sayandeepbbb', 'bhowmick', 'sayndeep@gmail.com', '2020-06-24 17:17:36', '2020-07-24 20:12:30'), + (58, 'tbbbitas', 'maity', 'titi@gmail.com', '2020-10-22 17:17:36', '2020-10-24 20:12:30'), + (59, 'dbbbip', 'chakraborty', 'dipc@gmail.com', '2020-09-04 17:17:36', '2020-10-24 20:12:30'), + (60, 'asbbbif', 'baidya', 'asif@gmail.com', '2020-08-24 18:17:36', '2020-07-24 20:12:30'), + (61, 'rajdeAFep', 'rajbanshi', 'rjraj@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (62, 'sanSDFipan', 'saha', 'sandy@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (63, 'nilaSDFdri', 'sen', 'sen@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (64, 'abhiSDFshek', 'banerjee', 'abhi@gmail.com', '2020-05-24 17:17:36', '2020-07-24 20:12:30'), + (65, 'sayaSDndeep', 'bhowmick', 'sayndeep@gmail.com', '2020-06-24 17:17:36', '2020-07-24 20:12:30'), + (66, 'tiAStas', 'maity', 'titi@gmail.com', '2020-10-22 17:17:36', '2020-10-24 20:12:30'), + (67, 'diASp', 'chakraborty', 'dipc@gmail.com', '2020-09-04 17:17:36', '2020-10-24 20:12:30'), + (68, 'aASsif', 'baidya', 'asif@gmail.com', '2020-08-24 18:17:36', '2020-07-24 20:12:30'), + (69, 'anuASshree', 'sanyal', 'anus@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (70, 'triASsha', 'das', 'trisha@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (71, 'avASCijit', 'chakraborty', 'avijit@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (72, 'donVa', 'sen', 'dona@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (73, 'rajCVdeep', 'rajbanshi', 'rjraj@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (74, 'saVndipan', 'saha', 'sandy@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (75, 'nilVadri', 'sen', 'sen@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (76, 'abChishek', 'banerjee', 'abhi@gmail.com', '2020-05-24 17:17:36', '2020-07-24 20:12:30'), + (77, 'saCyandeep', 'bhowmick', 'sayndeep@gmail.com', '2020-06-24 17:17:36', '2020-07-24 20:12:30'), + (78, 'titCas', 'maity', 'titi@gmail.com', '2020-10-22 17:17:36', '2020-10-24 20:12:30'), + (79, 'diCp', 'chakraborty', 'dipc@gmail.com', '2020-09-04 17:17:36', '2020-10-24 20:12:30'), + (80, 'asCif', 'baidya', 'asif@gmail.com', '2020-08-24 18:17:36', '2020-07-24 20:12:30'), + (81, 'rajdeCep', 'rajbanshi', 'rjraj@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (82, 'saSndCipan', 'saha', 'sandy@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (83, 'nilCadri', 'sen', 'sen@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (84, 'abhSCshek', 'banerjee', 'abhi@gmail.com', '2020-05-24 17:17:36', '2020-07-24 20:12:30'), + (85, 'saSyCandeep', 'bhowmick', 'sayndeep@gmail.com', '2020-06-24 17:17:36', '2020-07-24 20:12:30'), + (86, 'titSasCE', 'maity', 'titi@gmail.com', '2020-10-22 17:17:36', '2020-10-24 20:12:30'), + (87, 'diCp', 'chakraborty', 'dipc@gmail.com', '2020-09-04 17:17:36', '2020-10-24 20:12:30'), + (88, 'asEif', 'baidya', 'asif@gmail.com', '2020-08-24 18:17:36', '2020-07-24 20:12:30'), + (89, 'anEushree', 'sanyal', 'anus@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (90, 'triEsha', 'das', 'trisha@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (91, 'avEijit', 'chakraborty', 'avijit@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (92, 'donEa', 'sen', 'dona@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (93, 'raEjdeep', 'rajbanshi', 'rjraj@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (94, 'sanEdipan', 'saha', 'sandy@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (95, 'niladEri', 'sen', 'sen@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (96, 'abhEishek', 'banerjee', 'abhi@gmail.com', '2020-05-24 17:17:36', '2020-07-24 20:12:30'), + (97, 'sayEandeep', 'bhowmick', 'sayndeep@gmail.com', '2020-06-24 17:17:36', '2020-07-24 20:12:30'), + (98, 'tEitas', 'maity', 'titi@gmail.com', '2020-10-22 17:17:36', '2020-10-24 20:12:30'), + (99, 'dEip', 'chakraborty', 'dipc@gmail.com', '2020-09-04 17:17:36', '2020-10-24 20:12:30'), + (100, 'aEsif', 'baidya', 'asif@gmail.com', '2020-08-24 18:17:36', '2020-07-24 20:12:30'), + (101, 'rajSSdeep', 'rajbanshi', 'rjraj@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (102, 'sandSSipan', 'saha', 'sandy@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (103, 'nilaLSSdri', 'sen', 'sen@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (104, 'abLhishek', 'banerjee', 'abhi@gmail.com', '2020-05-24 17:17:36', '2020-07-24 20:12:30'), + (105, 'saLyandeep', 'bhowmick', 'sayndeep@gmail.com', '2020-06-24 17:17:36', '2020-07-24 20:12:30'), + (106, 'tLitas', 'maity', 'titi@gmail.com', '2020-10-22 17:17:36', '2020-10-24 20:12:30'), + (107, 'diLp', 'chakraborty', 'dipc@gmail.com', '2020-09-04 17:17:36', '2020-10-24 20:12:30'), + (108, 'aLsif', 'baidya', 'asif@gmail.com', '2020-08-24 18:17:36', '2020-07-24 20:12:30'), + (109, 'anLushree', 'sanyal', 'anus@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (110, 'triLsha', 'das', 'trisha@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (111, 'aviLjit', 'chakraborty', 'avijit@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (112, 'doLna', 'sen', 'dona@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (113, 'rajLdeep', 'rajbanshi', 'rjraj@gmail.com', '2020-07-24 17:17:36', '2020-07-24 20:12:30'), + (114, 'sandLipan', 'saha', 'sandy@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (115, 'niULladri', 'sen', 'sen@gmail.com', '2020-04-25 17:17:36', '2020-07-26 18:10:59'), + (116, 'aLbhUishek', 'banerjee', 'abhi@gmail.com', '2020-05-24 17:17:36', '2020-07-24 20:12:30'), + (117, 'sLLUayandeep', 'bhowmick', 'sayndeep@gmail.com', '2020-06-24 17:17:36', '2020-07-24 20:12:30'), + (118, 'tiLUtas', 'maity', 'titi@gmail.com', '2020-10-22 17:17:36', '2020-10-24 20:12:30'), + (119, 'diUp', 'chakraborty', 'dipc@gmail.com', '2020-09-04 17:17:36', '2020-10-24 20:12:30'), + (120, 'asUif', 'baidya', 'asif@gmail.com', '2020-08-24 18:17:36', '2020-07-24 20:12:30'); + + +/* User */ +insert into user (user_id, password, first_name, last_name, email, company, phone, address1, address2, country, postal, role, is_active, is_blocked, security_provider_id, default_customer_id, secret_question, secret_answer, enable_beta_testing, enable_renewal) values +('demo' , 'demo' , 'Mrinmoy' , 'Majumdar', 'arivera2@joomla.org' , 'Abshire Inc', '7-(740)701-4547', '80429 Garrison Crossing', '4967' , 'USA' , '64890', 'USER' , 1, 0, 10001, 20000, 'Diverse' , 'Yellow' , 0, 0), +('admin' , '$2b$10$AkngMoFbJhllHomzUFdwAehsPzbHxY31XXtWTr0Cnpo9OYs7enn0q' , 'Theresa' , 'Russell' , 'trussell1@about.me' , 'Glover, Adams and Bins', '383-(779)851-3208', '30874 Graceland Terrace', '99152' , 'USA' , '51065', 'ADMIN', 1, 0, 10001, 20000, 'knowledge base', 'Mauv' , 1, 0), +('user' , '$2b$10$AK/siGGl4ITIq0dZHDck0uAyLJHkGPOeLBSAyUL8j5OU5vlf79wjq' , 'Virginia' , 'Reynolds', 'vreynolds0@slashdot.org', 'Rippin, Osinski and Beatty', '84-(228)809-9998', '0118 Burrows Plaza', '496' , 'USA' , '94086', 'USER' , 1, 0, 10001, 20000, 'Innovative' , 'Turquoise', 1, 1), +('jowens3' , 'jowens3' , 'Judy' , 'Owens' , 'jowens3@hp.com' , 'Altenwerth, Fisher and Heidenreich', '30-(772)268-8227', '98 Loeprich Way', '447', 'Greece' , null , 'USER' , 0, 0, 10001, 20001, 'capacity' , 'Fuscia' , 1, 1), +('kburns4' , 'kburns4' , 'Kelly' , 'Burns' , 'kburns4@icio.us' , 'McCullough-Morar', '86-(857)185-5740', '1638 Basil Alley', '56297' , 'China' , null , 'ADMIN', 1, 0, 10000, 20002, 'user-facing' , 'Crimson', 1, 1), +('jshaw5' , 'jshaw5' , 'Julie' , 'Shaw' , 'jshaw5@opera.com' , 'Steuber-Okuneva', '1-(871)375-6188', '389 Myrtle Pass', '41444' , 'Canada' , null , 'ADMIN', 1, 1, 10000, 20000, 'software' , 'Green' , 0, 1), +('pgilbert6' , 'pgilbert6', 'Peter' , 'Gilbert' , 'pgilbert6@eepurl.com' , 'Robel Inc', '52-(372)555-4687', '11522 Fuller Avenue', '5' , 'Mexico' , '39230', 'ADMIN', 1, 1, 10000, 20000, 'multi-state' , 'Puce' , 1, 1), +('jjacobs7' , 'jjacobs7' , 'Justin' , 'Jacobs' , 'jjacobs7@google.co.uk' , 'Harris-Bashirian', '963-(199)359-2552', '95012 Hanover Street', '2377' , 'India' , null , 'USER' , 1, 0, 10000, 20002, 'motivating' , 'Crimson', 1, 0), +('kbennett8' , 'kbennett8', 'Kevin' , 'Bennett' , 'kbennett8@hostgator.com', 'Leannon Inc', '62-(892)710-5713', '459 Coleman Drive', '397' , 'Indonesia' , null , 'ADMIN', 0, 0, 10001, 20000, 'Exclusive' , 'Purple' , 1, 1), +('cmurphy9' , 'cmurphy9' , 'Chris' , 'Murphy' , 'cmurphy9@over-blog.com' , 'Mosciski LLC', '64-(272)961-0086', '2 Ludington Point', '7' , 'New Zealand', null , 'ADMIN', 0, 1, 10000, 20000, 'empowering' , 'Maroon' , 0, 1); + +/* Employees */ +insert into employees (id, last_name, first_name, email, phone, address1, address2, city, state, postal_code, country, avatar, job_title, department, manager_id) values + (201, 'Harris' , 'George' , 'gharris0@pagesperso-orange.fr', '1-(210)270-8536', '2 Bayside Drive', null, 'San Antonio', 'Texas', '78240', 'United States', 'https://robohash.org/modilaboriosammolestiae.bmp?size=50x50&set=set1', 'Administrative Assistant I', 'Toys', null) +,(202, 'Hayes' , 'Rachel' , 'rhayes1@si.edu', '1-(971)797-2729', '30 Anhalt Street', null, 'Portland', 'Oregon', '97232', 'United States', 'https://robohash.org/seddistinctiodolorem.jpg?size=50x50&set=set1', 'Design Engineer', 'Books', null) +,(203, 'Palmer' , 'Anthony', 'apalmer2@posterous.com', '1-(702)984-2108', '02809 4th Pass', null, 'North Las Vegas', 'Nevada', '89036', 'United States', 'https://robohash.org/vitaererumdolore.png?size=50x50&set=set1', 'Health Coach II', 'Toys', null) +,(204, 'Alvarez' , 'Laura' , 'lalvarez3@time.com', '1-(518)328-2658', '647 Lakeland Road', null, 'Albany', 'New York', '12210', 'United States', 'https://robohash.org/nobisplaceatquisquam.jpg?size=50x50&set=set1', 'Computer Systems Analyst II', 'Health', null) +,(205, 'Reynolds', 'Annie' , 'areynolds4@nasa.gov', '1-(775)838-2203', '163 Carey Street', null, 'Reno', 'Nevada', '89550', 'United States', 'https://robohash.org/praesentiumdoloremrerum.png?size=50x50&set=set1', 'Senior Quality Engineer', 'Kids', null) +,(206, 'Henry' , 'Joe' , 'jhenry5@bbb.org', '1-(682)563-2229', '1 Harper Circle', null, 'Fort Worth', 'Texas', '76178', 'United States', 'https://robohash.org/earumiurevoluptas.jpg?size=50x50&set=set1', 'Chief Design Engineer', 'Electronics', null) +,(207, 'Willis' , 'Willie' , 'wwillis6@berkeley.edu', '1-(317)654-6888', '641 Kropf Parkway', null, 'Indianapolis', 'Indiana', '46216', 'United States', 'https://robohash.org/suntsitnecessitatibus.png?size=50x50&set=set1', 'Structural Analysis Engineer', 'Shoes', null) +,(208, 'Lawrence', 'Keith' , 'klawrence7@discovery.com', '1-(501)583-8851', '2184 Melby Crossing', null, 'Little Rock', 'Arkansas', '72222', 'United States', 'https://robohash.org/delenitiomnisconsequatur.jpg?size=50x50&set=set1', 'VP Quality Control', 'Outdoors', null) +,(209, 'Johnston', 'Tina' , 'tjohnston8@alexa.com', '1-(901)128-9976', '72 Hauk Road', null, 'Memphis', 'Tennessee', '38114', 'United States', 'https://robohash.org/voluptasautmaiores.png?size=50x50&set=set1', 'Assistant Media Planner', 'Electronics', null) +,(210, 'Burns' , 'Lisa' , 'lburns9@taobao.com', '1-(585)113-8402', '99 Manufacturers Drive', null, 'Rochester', 'New York', '14624', 'United States', 'https://robohash.org/illumsinttempore.jpg?size=50x50&set=set1', 'Operator', 'Industrial', null) +,(211, 'Stone' , 'Howard' , 'hstonea@ucsd.edu', '1-(202)958-2516', '03 Anthes Center', null, 'Washington', 'District of Columbia', '20425', 'United States', 'https://robohash.org/eautet.bmp?size=50x50&set=set1', 'Account Executive', 'Electronics', null) +,(212, 'Brown' , 'Julie' , 'jbrownb@squidoo.com', '1-(217)741-6449', '37574 4th Drive', null, 'Springfield', 'Illinois', '62705', 'United States', 'https://robohash.org/laborumtotameveniet.png?size=50x50&set=set1', 'Analog Circuit Design manager', 'Electronics', null) +,(213, 'Turner' , 'Edward' , 'eturnerc@theatlantic.com', '1-(701)353-1996', '3 Bultman Circle', null, 'Fargo', 'North Dakota', '58122', 'United States', 'https://robohash.org/sedutporro.png?size=50x50&set=set1', 'Structural Engineer', 'Computers', null) +,(214, 'Nichols' , 'Douglas', 'dnicholsd@fda.gov', '1-(302)771-6486', '5150 Holmberg Way', null, 'Wilmington', 'Delaware', '19805', 'United States', 'https://robohash.org/blanditiiscommodiet.png?size=50x50&set=set1', 'Editor', 'Outdoors', null) +,(215, 'Gilbert' , 'Jessica', 'jgilberte@infoseek.co.jp', '1-(320)607-0289', '32 Summit Park', null, 'Saint Cloud', 'Minnesota', '56372', 'United States', 'https://robohash.org/providentaccusamussed.bmp?size=50x50&set=set1', 'Account Executive', 'Baby', null) +,(216, 'Hernandez', 'Kathy' , 'khernandezf@shinystat.com', '1-(210)733-3380', '24 Merrick Way', null, 'San Antonio', 'Texas', '78225', 'United States', 'https://robohash.org/utfaciliset.png?size=50x50&set=set1', 'Junior Executive', 'Movies', null) +,(217, 'Sullivan', 'Lillian', 'lsullivang@flavors.me', '1-(904)885-2053', '42 Manufacturers Pass', null, 'Jacksonville', 'Florida', '32215', 'United States', 'https://robohash.org/quiaetaut.jpg?size=50x50&set=set1', 'Engineer I', 'Sports', null) +,(218, 'Jenkins' , 'Frances', 'fjenkinsh@huffingtonpost.com', '1-(512)764-3809', '69255 Dakota Plaza', null, 'Austin', 'Texas', '78769', 'United States', 'https://robohash.org/voluptatemnamaliquam.bmp?size=50x50&set=set1', 'Developer IV', 'Baby', null) +,(219, 'Myers' , 'Roger' , 'rmyersi@alexa.com', '1-(480)583-9583', '3 Eagle Crest Place', null, 'Gilbert', 'Arizona', '85297', 'United States', 'https://robohash.org/consequaturutquo.png?size=50x50&set=set1', 'Account Executive', 'Beauty', null) +,(220, 'Hunter' , 'Bonnie' , 'bhunterj@ucsd.edu', '1-(320)933-5140', '99 Arapahoe Terrace', null, 'Saint Cloud', 'Minnesota', '56372', 'United States', 'https://robohash.org/etfacilisquo.bmp?size=50x50&set=set1', 'Analog Circuit Design manager', 'Baby', null); + +/* Products */ +insert into products (id, product_code, product_name, description, standard_cost, list_price, target_level, reorder_level, minimum_reorder_quantity, quantity_per_unit, discontinued, category) values + (601, 'P1' , 'Nikon D810' , null, 1167.09, 1123.39, 75 , 10, 10, 50, 1, 'Camera') +,(602, 'P2' , 'Canon EOS 5D Mark IV' , null, 1382.83, 1293.84, 90 , 15, 15, 56, 0, 'Camera') +,(603, 'P3' , 'Dell XPS 13' , null, 1482.83, 1393.84, 95 , 20, 30, 56, 0, 'Laptop') +,(604, 'P4' , 'iPad Air' , null, 382.83 , 293.84 , 180, 75, 50, 56, 0, 'Tablet') +,(605, 'P5' , 'Acer Aspire S 13' , null, 882.83 , 793.84 , 40 , 15, 15, 56, 0, 'Laptop') +,(606, 'P6' , 'Nexus 6' , null, 633.88 , 511.7 , 75 , 10, 20, 79, 1, 'Phone' ) +,(607, 'P7' , 'ThinkPad T365' , null, 1441.02, 1308.98, 100, 30, 10, 92, 1, 'Laptop') +,(608, 'P8' , 'Moto Z' , null, 538.44 , 462.34 , 75 , 20, 20, 54, 1, 'Phone' ) +,(609, 'P9' , 'HTC 10' , null, 547.58 , 481.83 , 50 , 5 , 15, 58, 1, 'Tablet') +,(610, 'P10', 'MacBook Pro 13.3' , null, 1625.81, 1576.61, 120, 40, 30, 11, 1, 'Laptop') +,(611, 'P11', 'Nikon D500' , null, 867.09 , 723.39 , 75 , 25, 15, 50, 1, 'Camera') +,(612, 'P12', 'Pentax K-1' , null, 882.83 , 793.84 , 50 , 10, 5 , 56, 0, 'Camera') +,(613, 'P13', 'Asus Zenbook Ux305' , null, 1182.83, 1093.84, 55 , 10, 5 , 56, 0, 'Laptop') +,(614, 'P14', 'HP Envy m7-n109dx 17.3', null, 1382.83, 1293.84, 50 , 10, 10, 56, 0, 'Laptop') +,(615, 'P15', 'Microsft Surface Book' , null, 1682.83, 1593.84, 200, 80, 50, 56, 0, 'Tablet') +,(616, 'P16', 'Apple iPhone 7' , null, 833.88 , 711.76 , 250, 100,50, 79, 1, 'Phone' ) +,(617, 'P17', 'Google Pixel' , null, 641.02 , 608.98 , 100, 30 ,20, 92, 1, 'Phone' ) +,(618, 'P18', 'Samsung Galaxy S7' , null, 538.44 , 562.34 , 75 , 15, 10, 54, 1, 'Phone' ) +,(619, 'P19', 'Samasung Note' , null, 547.58 , 481.83 , 75 , 15, 15, 58, 1, 'Tablet') +,(620, 'P20', 'Chromebook 11.6' , null, 1078.81, 1008.61, 80 , 14, 10, 11, 1, 'Laptop'); + +/* Customers */ +insert into customers (id, last_name, first_name, email, company, phone, address1, address2, city, state, postal_code, country) values + (1 , 'Gray' , 'Clarence' , 'cgray0@rambler.ru' , 'Jetpulse' , '1-(260)615-5114', '02937 Merrick Avenue' , null, 'Fort Wayne', 'Indiana', '46805', 'United States') +,(2 , 'Cooper' , 'Emily' , 'ecooper1@macromedia.com' , 'Skippad' , '1-(251)614-5034', '60 Forster Crossing' , null, 'Mobile', 'Alabama', '36605', 'United States') +,(3 , 'Wilson' , 'George' , 'gwilson2@xinhuanet.com' , 'Riffpath' , '1-(901)445-9881', '52 Browning Center' , null, 'Memphis', 'Tennessee', '38181', 'United States') +,(4 , 'Mcdonald', 'Michael' , 'mmcdonald3@twitter.com' , 'Feedfire' , '1-(419)743-7314', '85093 Jackson Park' , null, 'Toledo', 'Ohio', '43610', 'United States') +,(5 , 'Tucker' , 'Lori' , 'ltucker4@etsy.com' , 'Oyondu' , '1-(202)381-2663', '0706 Heffernan Pass' , null, 'Washington', 'District of Columbia', '20380', 'United States') +,(6 , 'Hansen' , 'Lois' , 'lhansen5@stumbleupon.com', 'Yozio' , '1-(315)385-6866', '2 Ruskin Pass' , null, 'Syracuse', 'New York', '13251', 'United States') +,(7 , 'Grant' , 'Frances' , 'fgrant6@yale.edu' , 'Eire' , '1-(863)799-9068', '61402 Morning Court' , null, 'Lakeland', 'Florida', '33811', 'United States') +,(8 , 'Lewis' , 'Catherine', 'clewis7@unesco.org' , 'Realpoint', '1-(915)208-4997', '775 Messerschmidt Junction', null, 'El Paso', 'Texas', '88563', 'United States') +,(9 , 'Rogers' , 'Edward' , 'erogers8@guardian.co.uk' , 'Quinu' , '1-(971)934-2404', '7074 Montana Place' , null, 'Portland', 'Oregon', '97271', 'United States') +,(10, 'Owens' , 'Tina' , 'towens9@earthlink.net' , 'Blogtag' , '1-(712)989-9002', '59039 Sachtjen Street', null, 'Sioux City', 'Iowa', '51105', 'United States') +,(11, 'Peterson', 'Fred' , 'fpetersona@home.pl' , 'Meedoo' , '1-(202)228-9380', '55 Knutson Street', null, 'Washington', 'District of Columbia', '20099', 'United States') +,(12, 'Cox' , 'Jason' , 'jcoxb@slashdot.org' , 'Tagcat' , '1-(651)991-0172', '19 Hoffman Avenue', null, 'Saint Paul', 'Minnesota', '55114', 'United States') +,(13, 'Perez' , 'Paul' , 'pperezc@ask.com' , 'Kazu' , '1-(405)290-7944', '6336 Continental Circle', null, 'Oklahoma City', 'Oklahoma', '73167', 'United States') +,(14, 'Duncan' , 'Anthony' , 'aduncand@disqus.com' , 'Aibox' , '1-(727)705-8400', '17794 Northport Point', null, 'Clearwater', 'Florida', '33763', 'United States') +,(15, 'Graham' , 'Sean' , 'sgrahame@google.com.br' , 'Tekfly' , '1-(901)443-0731', '47493 Reinke Drive', null, 'Memphis', 'Tennessee', '38131', 'United States') +,(16, 'Simpson' , 'Jose' , 'jsimpsonf@youtube.com' , 'Youspan' , '1-(518)381-4659', '498 Carey Lane', null, 'Albany', 'New York', '12262', 'United States') +,(17, 'Simmons' , 'Frances' , 'fsimmonsg@webster.com' ,'Feednation', '1-(251)473-1327', '44102 Montana Crossing', null, 'Mobile', 'Alabama', '36641', 'United States') +,(18, 'Schmidt' , 'John' , 'jschmidth@vinaora.com' , 'Topicblab', '1-(202)945-2079', '384 Goodland Pass', null, 'Washington', 'District of Columbia', '20210', 'United States') +,(19, 'West' , 'Roger' , 'rwesti@cornell.edu' , 'Skilith' , '1-(716)707-3907', '74 Nancy Pass', null, 'Buffalo', 'New York', '14215', 'United States') +,(20, 'Fields' , 'Jesse' , 'jfieldsj@shop-pro.jp' , 'Vinte' , '1-(617)810-9493', '602 Laurel Park', null, 'Boston', 'Massachusetts', '02203', 'United States') +,(21, 'Patterson', 'Kathy' , 'kpattersonk@machines.org', 'Brainverse', '1-(806)803-9725', '67063 Spenser Junction', null, 'Amarillo', 'Texas', '79188', 'United States') +,(22, 'Bell' , 'Stephanie', 'sbelll@gravatar.com' , 'DabZ' , '1-(801)924-1975', '05 Gina Crossing', null, 'Salt Lake City', 'Utah', '84145', 'United States') +,(23, 'Turner' , 'Martha' , 'mturnerm@hp.com' , 'Yadel' , '1-(225)880-9134', '97789 Scofield Point', null, 'Baton Rouge', 'Louisiana', '70894', 'United States') +,(24, 'Ross' , 'Richard' , 'rrossn@weebly.com' , 'Voolith' , '1-(415)690-1916', '19 Briar Crest Alley', null, 'San Francisco', 'California', '94164', 'United States') +,(25, 'Stephens', 'Stephanie', 'sstephenso@times.co.uk' , 'BlogXS' , '1-(501)827-1408', '63291 Huxley Drive', null, 'North Little Rock', 'Arkansas', '72118', 'United States') +,(26, 'Sanchez' , 'Diane' , 'dsanchezp@sun.com' , 'Tagtune' , '1-(315)979-6793', '13 Oneill Junction', null, 'Syracuse', 'New York', '13224', 'United States') +,(27, 'Lawrence', 'Douglas' , 'dlawrenceq@flickr.com' , 'Browsetype', '1-(610)622-4045', '83224 Mallard Center', null, 'Philadelphia', 'Pennsylvania', '19109', 'United States') +,(28, 'Hansen' , 'Lori' , 'lhansenr@patch.com' , 'Einti' , '1-(915)266-1989', '48410 Westport Circle', null, 'El Paso', 'Texas', '88546', 'United States') +,(29, 'Medina' , 'Robert' , 'rmedinas@uiuc.edu' , 'Tambee' , '1-(216)752-7216', '0562 Muir Trail', null, 'Cleveland', 'Ohio', '44197', 'United States') +,(30, 'Harrison', 'Shawn' , 'sharrisont@webnode.com' , 'Youopia' , '1-(205)595-8085', '20 Mayer Center', null, 'Birmingham', 'Alabama', '35205', 'United States') +,(31, 'Alexander', 'Julia' , 'jalexanderu@netsol.com' , 'Oodoo' , '1-(864)349-2185', '61859 West Point', null, 'Greenville', 'South Carolina', '29610', 'United States') +,(32, 'Stanley', 'Victor' , 'vstanleyv@wikipedia.org' , 'Centimia' , '1-(561)507-7317', '08229 Glacier Hill Avenue', null, 'Boynton Beach', 'Florida', '33436', 'United States') +,(33, 'Wheeler', 'Dennis' , 'dwheelerw@indiatimes.com', 'Dynabox' , '1-(419)889-2883', '409 American Ash Plaza', null, 'Lima', 'Ohio', '45807', 'United States') +,(34, 'Frazier', 'Rachel' , 'rfrazierx@sfgate.com' , 'Skivee' , '1-(314)249-1796', '7 Waxwing Court', null, 'Saint Louis', 'Missouri', '63131', 'United States') +,(35, 'Brooks' , 'Shawn' , 'sbrooksy@mediafire.com' , 'Omba' , '1-(971)854-8478', '614 Monica Terrace', null, 'Portland', 'Oregon', '97240', 'United States') +,(36, 'Coleman', 'Frank' , 'fcolemanz@un.org' , 'Agimba' , '1-(318)446-4337', '4 Browning Park', null, 'Shreveport', 'Louisiana', '71151', 'United States') +,(37, 'Wright' , 'Frank' , 'fwright10@flickr.com' , 'Meedoo' , '1-(504)852-2553', '03446 Sheridan Trail', null, 'New Orleans', 'Louisiana', '70183', 'United States') +,(38, 'Perkins', 'Tina' , 'tperkins11@va.gov' , 'Rhybox' , '1-(571)497-0755', '62 Grayhawk Lane', null, 'Fairfax', 'Virginia', '22036', 'United States') +,(39, 'Griffin', 'Ruth' , 'rgriffin12@pcworld.com' , 'Trudoo' , '1-(504)312-7448', '29701 Jenifer Junction', null, 'Metairie', 'Louisiana', '70033', 'United States') +,(40, 'Sanchez', 'Sean' , 'ssanchez13@bandcamp.com' , 'Chatterpoint', '1-(316)535-7647', '10 Stuart Road', null, 'Wichita', 'Kansas', '67260', 'United States') +,(41, 'Harris' , 'Linda' , 'lharris14@ask.com' , 'Blogpad' , '1-(913)258-6547', '17635 Elka Alley', null, 'Shawnee Mission', 'Kansas', '66205', 'United States') +,(42, 'Wood' , 'George' , 'gwood15@imdb.com' , 'Feednation' , '1-(865)482-7169', '210 Anhalt Drive', null, 'Knoxville', 'Tennessee', '37924', 'United States') +,(43, 'Bennett', 'Nancy' , 'nbennett16@netsol.com' , 'Yodo' , '1-(210)749-3167', '97861 Harper Pass', null, 'San Antonio', 'Texas', '78260', 'United States') +,(44, 'Pierce' , 'Jesse' , 'jpierce17@cyberchimps.com', 'Divanoodle' , '1-(501)518-2300', '0 Columbus Terrace', null, 'Little Rock', 'Arkansas', '72231', 'United States') +,(45, 'Larson' , 'Jerry' , 'jlarson18@ustream.tv' , 'Kazu' , '1-(916)702-0977', '0422 Merry Court', null, 'Sacramento', 'California', '95852', 'United States') +,(46, 'Williams', 'Norma' , 'nwilliams19@spiegel.de' , 'Yacero' , '1-(562)631-4036', '5779 Burning Wood Crossing', null, 'Long Beach', 'California', '90847', 'United States') +,(47, 'Kelley' , 'Louis' , 'lkelley1a@wsj.com' , 'Linkbuzz' , '1-(432)286-2200', '04321 Northport Pass', null, 'Odessa', 'Texas', '79764', 'United States') +,(48, 'Mason' , 'Ruby' , 'rmason1b@census.gov' , 'Trudeo' , '1-(763)835-7627', '99219 5th Place', null, 'Monticello', 'Minnesota', '55565', 'United States') +,(49, 'Carr' , 'Nicole' , 'ncarr1c@yellowbook.com' , 'Plajo' , '1-(330)154-9245', '41 Monica Parkway', null, 'Youngstown', 'Ohio', '44511', 'United States') +,(50, 'Franklin', 'Michelle' , 'mfranklin1d@ucoz.com' , 'Wikivu' , '1-(405)751-8906', '62 Rutledge Alley', null, 'Oklahoma City', 'Oklahoma', '73147', 'United States') +,(51, 'Hawkins', 'Larry' , 'lhawkins1e@typepad.com' , 'Tagpad' , '1-(240)796-9270', '48 Columbus Road', null, 'Hagerstown', 'Maryland', '21747', 'United States') +,(52, 'Adams' , 'Lillian' , 'ladams1f@smugmug.com' , 'Avamm' , '1-(419)394-2363', '69708 West Avenue', null, 'Toledo', 'Ohio', '43605', 'United States') +,(53, 'Williamson', 'Janice' , 'jwilliamson1g@sbwire.com', 'Wordware' , '1-(212)576-0309', '311 Clemons Crossing', null, 'New York City', 'New York', '10090', 'United States') +,(54, 'Mitchell', 'Lisa' , 'lmitchell1h@live.com' , 'Trudoo' , '1-(225)794-6979', '17242 Eagan Terrace', null, 'Baton Rouge', 'Louisiana', '70820', 'United States') +,(55, 'Lawrence', 'Anna' , 'alawrence1i@manage.com' , 'Pixope' , '1-(818)505-8262', '51241 Tennessee Point', null, 'Santa Monica', 'California', '90405', 'United States') +,(56, 'Scott' , 'Margaret' , 'mscott1j@arizona.edu' , 'Mynte' , '1-(202)265-0994', '117 Arapahoe Crossing', null, 'Washington', 'District of Columbia', '20051', 'United States') +,(57, 'Harper' , 'Timothy' , 'tharper1k@loc.gov' , 'Trudoo' , '1-(212)348-5025', '137 Commercial Court', null, 'New York City', 'New York', '10175', 'United States') +,(58, 'Frazier' , 'Mary' , 'mfrazier1l@mapy.cz' , 'Photobug' , '1-(214)939-0299', '281 Briar Crest Way', null, 'Garland', 'Texas', '75049', 'United States') +,(59, 'Young' , 'Margaret' , 'myoung1m@ehow.com' , 'Realmix' , '1-(318)144-2666', '537 Memorial Way', null, 'Shreveport', 'Louisiana', '71105', 'United States') +,(60, 'Sullivan', 'Phyllis' , 'psullivan1n@jiathis.com' , 'Demivee' , '1-(518)361-7505', '117 Onsgard Crossing', null, 'Albany', 'New York', '12227', 'United States') +,(61, 'Knight' , 'Roy' , 'rknight1o@qq.com' , 'Meezzy' , '1-(478)438-2599', '60 Kinsman Drive', null, 'Macon', 'United Kingdom', '31210', 'United States') +,(62, 'Ruiz' , 'Andrea' , 'aruiz1p@domainmarket.com', 'Fivespan' , '1-(415)374-7204', '55455 Heffernan Plaza', null, 'San Francisco', 'California', '94142', 'United States') +,(63, 'Hayes' , 'Heather' , 'hhayes1q@odnoklasniki.ru', 'Twitternation', '1-(615)919-6350', '31 Banding Plaza', null, 'Jackson', 'Mississippi', '39296', 'United States') +,(64, 'Chapman' , 'Roy' , 'rchapman1r@theguardian.com', 'BlogXS' , '1-(941)329-4488', '27487 Fair Oaks Crossing', null, 'Sarasota', 'Florida', '34233', 'United States') +,(65, 'Moore' , 'Daniel' , 'dmoore1s@google.co.uk' , 'Twitterbridge', '1-(408)838-8747', '52377 Everett Court', null, 'San Jose', 'California', '95194', 'United States') +,(66, 'Day' , 'Amy' , 'aday1t@indiegogo.com' , 'Brainverse' , '1-(336)903-6679', '50107 Northport Circle', null, 'Winston Salem', 'North Carolina', '27157', 'United States') +,(67, 'Kelley' , 'Jesse' , 'jkelley1u@who.int' , 'Zoomzone' , '1-(304)183-6041', '31740 Bayside Trail', null, 'Huntington', 'West Virginia', '25711', 'United States') +,(68, 'Andrews' , 'Andrea' , 'aandrews1v@patch.com' , 'Fanoodle' , '1-(206)996-3516', '544 Lakewood Gardens Alley', null, 'Seattle', 'Washington', '98148', 'United States') +,(69, 'Willis' , 'Robert' , 'rwillis1w@si.edu' , 'Tazz' , '1-(678)738-3382', '0998 Bellgrove Circle', null, 'Duluth', 'United Kingdom', '30195', 'United States') +,(70, 'Reid' , 'Daniel' , 'dreid1x@miitbeian.gov.cn', 'Babbleblab', '1-(786)539-0220', '2 New Castle Avenue', null, 'Miami', 'Florida', '33111', 'United States') +,(71, 'Roberts' , 'Louise' , 'lroberts1y@cpanel.net' , 'Skippad' , '1-(316)418-5043', '598 Mayfield Road', null, 'Wichita', 'Kansas', '67210', 'United States') +,(72, 'Harrison', 'Margaret' , 'mharrison1z@globe.ne.jp' , 'Zoovu' , '1-(775)625-5357', '636 Maple Point', null, 'Reno', 'Nevada', '89550', 'United States') +,(73, 'Chapman' , 'Peter' , 'pchapman20@eventbrite.com', 'Linkbuzz' , '1-(574)707-4449', '1 Vermont Plaza', null, 'South Bend', 'Indiana', '46620', 'United States') +,(74, 'Tucker' , 'Willie' , 'wtucker21@hubpages.com' , 'Eazzy' , '1-(814)593-2963', '3 Dryden Trail', null, 'Erie', 'Pennsylvania', '16505', 'United States') +,(75, 'Bradley' , 'Adam' , 'abradley22@cnet.com' , 'Yabox' , '1-(903)334-0845', '15 Veith Center', null, 'Tyler', 'Texas', '75705', 'United States') +,(76, 'Armstrong', 'Juan' , 'jarmstrong23@archive.org', 'Gevee' , '1-(916)285-8157', '95 Claremont Crossing', null, 'Sacramento', 'California', '95865', 'United States') +,(77, 'Payne' , 'Kenneth' , 'kpayne24@com.com' , 'Skinte' , '1-(770)150-8423', '75 Beilfuss Court', null, 'Alpharetta', 'United Kingdom', '30022', 'United States') +,(78, 'Jacobs' , 'Louis' , 'ljacobs25@intel.com' , 'Photolist' , '1-(404)386-3449', '542 Browning Park', null, 'Atlanta', 'United Kingdom', '30343', 'United States') +,(79, 'Cooper' , 'Marilyn' , 'mcooper26@whitehouse.gov', 'Yotz' , '1-(520)875-3539', '03 Transport Point', null, 'Tucson', 'Arizona', '85710', 'United States') +,(80, 'Watkins' , 'William' , 'wwatkins27@pbs.org' , 'Brightbean', '1-(719)568-3678', '0316 La Follette Drive', null, 'Colorado Springs', 'Colorado', '80920', 'United States') +,(81, 'Baker' , 'Douglas' , 'dbaker28@exblog.jp' , 'Voonix' , '1-(619)121-6070', '99 Kedzie Terrace', null, 'Chula Vista', 'California', '91913', 'United States') +,(82, 'Cunningham','Daniel' , 'dcunningham29@oakley.com', 'Leexo' , '1-(619)609-6206', '53540 Hallows Place', null, 'San Diego', 'California', '92137', 'United States') +,(83, 'Mitchell', 'Edward' , 'emitchell2a@amazon.com' , 'Jatri' , '1-(502)427-5275', '3 Jana Junction', null, 'Louisville', 'Kentucky', '40280', 'United States') +,(84, 'Matthews', 'Adam' , 'amatthews2b@live.com' , 'Muxo' , '1-(316)764-9074', '5 Arapahoe Plaza', null, 'Wichita', 'Kansas', '67220', 'United States') +,(85, 'Jacobs' , 'Diane' , 'djacobs2c@jimdo.com' , 'Youspan' , '1-(804)398-4775', '6 Moose Street', null, 'Richmond', 'Virginia', '23285', 'United States') +,(86, 'Frazier' , 'Mary' , 'mfrazier2d@forbes.com' , 'Zoomdog' , '1-(716)502-4243', '713 Continental Trail', null, 'Buffalo', 'New York', '14210', 'United States') +,(87, 'Howard' , 'Anthony' , 'ahoward2e@disqus.com' , 'Katz' , '1-(805)800-7968', '006 Elka Center', null, 'Bakersfield', 'California', '93311', 'United States') +,(88, 'Kelly' , 'Anna' , 'akelly2f@unc.edu' , 'Trilia' , '1-(804)117-9707', '292 Browning Circle', null, 'Richmond', 'Virginia', '23228', 'United States') +,(89, 'Clark' , 'Kathy' , 'kclark2g@businesswire.com' , 'Gigabox' , '1-(831)755-4869', '45 Walton Parkway', null, 'Salinas', 'California', '93907', 'United States') +,(90, 'Carpenter', 'Gerald' , 'gcarpenter2h@foxnews.com' , 'Yakidoo' , '1-(213)344-9608', '84560 Stephen Parkway', null, 'Los Angeles', 'California', '90055', 'United States') +,(91, 'Hart' , 'Albert' , 'ahart2i@scribd.com' , 'Jaloo' , '1-(415)201-5281', '0 Washington Place', null, 'Oakland', 'California', '94611', 'United States') +,(92, 'Young' , 'Julia' , 'jyoung2j@craigslist.org' , 'Oloo' , '1-(615)660-1203', '0623 Gale Drive', null, 'Jackson', 'Mississippi', '39210', 'United States') +,(93, 'Pierce' , 'Tammy' , 'tpierce2k@psu.edu' , 'Ntags' , '1-(703)772-3155', '501 Leroy Parkway', null, 'Washington', 'District of Columbia', '20041', 'United States') +,(94, 'Washington', 'Ronald' , 'rwashington2l@drupal.org' , 'Livetube' , '1-(202)828-6093', '6220 Del Sol Alley', null, 'Washington', 'District of Columbia', '20551', 'United States') +,(95, 'Carter' , 'Alan' , 'acarter2m@simplemachines.org', 'Centizu' , '1-(952)234-1678', '043 Sunnyside Center', null, 'Young America', 'Minnesota', '55551', 'United States') +,(96, 'Freeman' , 'Stephanie', 'sfreeman2n@redcross.org' , 'Feednation' , '1-(504)126-8245', '1120 Veith Parkway', null, 'New Orleans', 'Louisiana', '70165', 'United States') +,(97, 'Price' , 'Sara' , 'sprice2o@irs.gov' , 'Izio' , '1-(415)668-5714', '96394 Bonner Hill', null, 'San Francisco', 'California', '94116', 'United States') +,(98, 'Parker' , 'Emily' , 'eparker2p@4shared.com' , 'Skalith' , '1-(330)637-4894', '0 Old Shore Center', null, 'Akron', 'Ohio', '44310', 'United States') +,(99, 'Chavez' , 'Jeremy' , 'jchavez2q@businessweek.com' , 'Topicware' , '1-(515)769-2045', '8584 Jay Street', null, 'Des Moines', 'Iowa', '50335', 'United States') +,(100, 'Kim' , 'Pamela' , 'pkim2r@stumbleupon.com' , 'Photolist' , '1-(510)144-4318', '3688 Gerald Trail', null, 'Sacramento', 'California', '95823', 'United States'); + +/* LOOK UP VALUES */ + + +/* orders */ +insert into orders (id, employee_id, customer_id, order_date, shipped_date, ship_name, ship_address1, ship_address2, ship_city, ship_state, ship_postal_code, ship_country, shipping_fee, payment_type, paid_date, order_status) values + (4001, 204, 40, '2016-04-05', '2016-11-06', 'Jean Fuller', '93 Spohn Place', null, 'Manggekompo', null, null, 'Indonesia', 8.14, 'Card', '2016-10-12', 'On Hold') +,(4002, 204, 95, '2017-01-29', '2016-05-28', 'Diane Holmes', '46 Eliot Trail', null, 'Virginia Beach', 'Virginia', '23459', 'United States', 1.55, 'Check', '2016-06-27', 'Shipped') +,(4003, 218, 54, '2016-08-19', '2016-12-08', 'Jerry Frazier', '23 Sundown Junction', null, 'Obodivka', null, null, 'Ukraine', 2.29, 'Cash', '2016-09-27', 'On Hold') +,(4004, 204, 69, '2016-09-25', '2016-12-24', 'Denise Freeman', '4909 Beilfuss Hill', null, 'Nova Venécia', null, '29830-000', 'Brazil', 4.77, 'Check', '2016-07-04', 'New') +,(4005, 215, 10, '2017-03-14', '2016-03-19', 'Jonathan Gordon', '7 Ludington Court', null, 'Sukamaju', null, null, 'Indonesia', 8.78, 'Check', '2016-03-22', 'On Hold') +,(4006, 211, 23, '2016-08-14', '2016-12-05', 'Sean Carter', '859 Dahle Plaza', null, 'Dayou', null, null, 'China', 9.43, 'Cash', '2016-08-21', 'New') +,(4007, 204, 92, '2017-01-02', '2016-07-09', 'Alice Warren', '5 Fuller Center', null, 'Log pri Brezovici', null, '1358', 'India', 3.25, 'Cash', '2016-03-24', 'Shipped') +,(4008, 205, 20, '2016-05-15', '2016-09-12', 'Andrea Hamilton', '99 Blue Bill Park Junction', null, 'Liangshui', null, null, 'China', 7.04, 'Check', '2016-09-02', 'On Hold') +,(4009, 219, 58, '2016-11-27', '2017-03-02', 'Wanda Hill', '907 Sundown Court', null, 'Pedra Azul', null, '39970-000', 'Brazil', 4.35, 'Cash', '2016-09-27', 'On Hold') +,(4010, 218, 57, '2016-09-11', '2017-02-26', 'Carolyn Foster', '0 Charing Cross Court', null, 'Chicago', 'Illinois', '60609', 'United States', 1.23, 'Cash', '2016-08-09', 'Complete') +,(4011, 207, 3 , '2017-03-01', '2016-08-04', 'Timothy Warren', '19 John Wall Parkway', null, 'Lyon', 'Rhône-Alpes', '69362 CEDEX 07', 'France', 9.57, 'Card', '2016-05-08', 'Complete') +,(4012, 210, 59, '2016-12-31', '2016-08-08', 'Kathleen Marshall', '2 Swallow Circle', null, 'Cunliji', null, null, 'China', 9.03, 'Cash', '2016-04-23', 'On Hold') +,(4013, 204, 57, '2017-01-11', '2017-02-13', 'Jane Ortiz', '1136 Kedzie Alley', null, 'Eirado', 'Viana do Castelo', '4990-540', 'Portugal', 8.9, 'Check', '2016-10-26', 'Shipped') +,(4014, 212, 26, '2016-09-23', '2016-05-13', 'Carolyn Martinez', '954 Kropf Court', null, 'Ibitinga', null, '14940-000', 'Brazil', 4.57, 'Card', '2016-09-11', 'New') +,(4015, 201, 86, '2016-11-04', '2016-10-03', 'Debra Willis', '89 Grasskamp Road', null, 'San Francisco', null, '8501', 'Philippines', 3.53, 'Card', '2016-10-05', 'New') +,(4016, 208, 17, '2016-04-17', '2016-03-22', 'Sharon Little', '27501 Sommers Junction', null, 'San Juan Opico', null, null, 'India', 6.87, 'Card', '2017-01-08', 'Complete') +,(4017, 205, 73, '2016-07-03', '2016-09-26', 'Nancy Hughes', '1 John Wall Avenue', null, 'La Libertad', null, null, 'Argentina', 4.67, 'Check', '2017-02-01', 'New') +,(4018, 213, 16, '2016-12-01', '2016-06-08', 'Sara Knight', '98248 Tony Pass', null, 'Val-d''Or', 'Québec', 'J9P', 'Canada', 9.52, 'Card', '2016-08-06', 'New') +,(4019, 209, 10, '2016-04-18', '2016-04-25', 'Russell Wood', '3 Commercial Point', null, 'Rokietnica', null, '62-090', 'Poland', 6.8, 'Card', '2017-01-20', 'On Hold') +,(4020, 216, 1 , '2016-07-23', '2017-02-23', 'Aaron Grant', '15477 Farwell Circle', null, 'Yongyang', null, null, 'China', 3.17, 'Cash', '2016-08-11', 'Complete') +,(4021, 209, 38, '2016-12-16', '2017-02-14', 'Ryan Foster', '9218 Leroy Avenue', null, 'Mogapinyana', null, null, 'India', 3.34, 'Cash', '2016-06-21', 'On Hold') +,(4022, 207, 91, '2016-07-18', '2016-04-06', 'Peter Montgomery', '570 Londonderry Pass', null, 'Mathakola', null, null, 'India', 8.11, 'Card', '2016-10-27', 'New') +,(4023, 209, 39, '2016-07-15', '2017-02-02', 'Lawrence Schmidt', '371 Acker Drive', null, 'Mesa', 'Arizona', '85205', 'United States', 1.39, 'Cash', '2016-10-27', 'Complete') +,(4024, 219, 51, '2016-12-08', '2017-01-03', 'Eric Gray', '4608 Farmco Point', null, 'Gemblengmulyo', null, null, 'Indonesia', 8.76, 'Card', '2016-05-13', 'Complete') +,(4025, 204, 77, '2016-09-24', '2017-01-20', 'Gloria Green', '62 Sunnyside Park', null, 'Itararé', null, '18460-000', 'Brazil', 7.75, 'Cash', '2017-02-06', 'On Hold') +,(4026, 215, 73, '2016-09-15', '2016-12-24', 'Nicholas Price', '5672 Ruskin Hill', null, 'Maimará', null, '4624', 'Argentina', 9.11, 'Card', '2016-07-22', 'On Hold') +,(4027, 208, 98, '2016-05-31', '2016-07-14', 'Doris Watson', '133 Gina Street', null, 'Bantiran', null, null, 'Indonesia', 3.0, 'Cash', '2016-10-08', 'Complete') +,(4028, 217, 39, '2016-05-10', '2016-04-07', 'Linda Foster', '40382 4th Terrace', null, 'Agrelo', 'Braga', '4730-300', 'Portugal', 2.39, 'Cash', '2016-09-11', 'Complete') +,(4029, 212, 52, '2016-09-14', '2016-12-21', 'Anthony Spencer', '02 Esker Junction', null, 'El Ocotón', null, null, 'Canada', 7.72, 'Check', '2016-09-23', 'Shipped') +,(4030, 218, 74, '2016-05-08', '2016-07-21', 'James Kennedy', '7460 Westport Hill', null, 'Köln', 'Nordrhein-Westfalen', '51107', 'Germany', 6.16, 'Cash', '2016-11-27', 'Shipped') +,(4031, 214, 4 , '2016-05-31', '2017-03-03', 'Theresa Robinson', '44 Havey Way', null, 'Qingtong', null, null, 'China', 5.02, 'Check', '2017-03-15', 'New') +,(4032, 201, 81, '2016-07-05', '2016-11-18', 'Jesse Ray', '68 Derek Hill', null, 'Azogues', null, null, 'Argentina', 5.41, 'Check', '2016-10-16', 'New') +,(4033, 203, 15, '2016-09-07', '2016-06-09', 'Harold Fields', '2 Vermont Terrace', null, 'Mogocha', null, '673732', 'Russia', 2.38, 'Check', '2016-03-30', 'Complete') +,(4034, 217, 11, '2016-08-19', '2016-12-08', 'Larry Watkins', '629 Waxwing Avenue', null, 'Krasnyy Oktyabr’', null, '398526', 'Russia', 5.23, 'Cash', '2016-07-01', 'On Hold') +,(4035, 205, 51, '2016-11-29', '2016-09-02', 'Debra Marshall', '23578 Arizona Junction', null, 'Juhut', null, null, 'Indonesia', 1.59, 'Card', '2016-06-17', 'Shipped') +,(4036, 217, 56, '2016-10-21', '2017-02-13', 'Todd Stephens', '63633 Columbus Avenue', null, 'Paccho', null, null, 'Peru', 5.09, 'Cash', '2016-04-25', 'New') +,(4037, 219, 60, '2016-09-22', '2016-11-08', 'Jean Webb', '0916 Grover Way', null, 'Kuršėnai', null, '81001', 'Denmark', 8.66, 'Cash', '2016-09-30', 'Shipped') +,(4038, 213, 3 , '2016-06-01', '2016-10-07', 'Heather Snyder', '44 Grayhawk Court', null, 'Haenam', null, null, 'Finland', 5.33, 'Cash', '2016-06-30', 'Complete') +,(4039, 201, 28, '2017-02-19', '2016-11-25', 'Janet Howard', '5351 Barby Trail', null, 'Shanghu', null, null, 'China', 9.18, 'Check', '2017-03-16', 'On Hold') +,(4040, 215, 74, '2016-09-14', '2016-06-23', 'Aaron Wheeler', '08 Burrows Avenue', null, 'Tân Sơn', null, null, 'Vietnam', 3.36, 'Card', '2017-03-05', 'New') +,(4041, 204, 79, '2016-09-27', '2017-02-15', 'Lori Watkins', '3 Pennsylvania Court', null, 'Victoria', null, 'VCT', 'India', 9.41, 'Card', '2016-08-12', 'New') +,(4042, 205, 92, '2016-11-03', '2016-05-11', 'Alice Miller', '7895 Amoth Avenue', null, 'Mae Lao', null, '57250', 'Thailand', 2.11, 'Cash', '2016-08-06', 'Shipped') +,(4043, 212, 82, '2016-11-17', '2016-04-19', 'Marilyn Nguyen', '25203 Meadow Ridge Plaza', null, 'Nine', 'Braga', '4775-446', 'Portugal', 6.03, 'Cash', '2016-05-07', 'On Hold') +,(4044, 218, 55, '2016-06-26', '2016-08-15', 'Ashley West', '08621 Porter Lane', null, 'Kingsport', 'Tennessee', '37665', 'United States', 8.23, 'Cash', '2016-12-17', 'New') +,(4045, 217, 53, '2016-05-07', '2017-02-25', 'Julia Fernandez', '91519 Harbort Way', null, 'Issoire', 'Auvergne', '63504 CEDEX', 'France', 1.14, 'Check', '2016-10-27', 'Complete') +,(4046, 211, 78, '2016-12-11', '2017-02-15', 'Willie Sims', '683 Caliangt Parkway', null, 'Balazar', 'Braga', '4805-005', 'Portugal', 6.57, 'Card', '2017-02-13', 'On Hold') +,(4047, 201, 77, '2016-05-20', '2017-02-19', 'Samuel Burke', '25 Grover Lane', null, 'Housuo', null, null, 'China', 6.99, 'Cash', '2016-08-12', 'New') +,(4048, 217, 72, '2016-11-06', '2016-09-29', 'Patricia Green', '29791 Thierer Street', null, 'Campamento', null, '052027', 'Argentina', 3.33, 'Check', '2016-03-24', 'Complete') +,(4049, 210, 98, '2016-08-24', '2016-04-16', 'Nicole Washington', '68 Monica Point', null, 'Cikaung', null, null, 'Indonesia', 5.78, 'Check', '2016-04-30', 'Complete') +,(4050, 215, 26, '2016-10-07', '2016-11-03', 'Marie Bryant', '36611 Schlimgen Place', null, 'Villa Francisca', null, '10215', 'Canada', 4.11, 'Check', '2016-07-29', 'Complete') +,(4051, 212, 51, '2016-05-19', '2017-03-16', 'Brandon Lane', '5 Duke Center', null, 'Soutinho', 'Porto', '4650-530', 'Portugal', 9.62, 'Check', '2016-11-28', 'Shipped') +,(4052, 205, 9 , '2016-07-19', '2016-09-05', 'Pamela Ferguson', '0 Mockingbird Crossing', null, 'Jefferson City', 'Missouri', '65105', 'United States', 9.98, 'Card', '2016-12-08', 'Shipped') +,(4053, 210, 42, '2016-04-09', '2017-02-05', 'Gloria Edwards', '8275 Sage Plaza', null, 'Yilkiqi', null, null, 'China', 5.21, 'Cash', '2016-11-10', 'On Hold') +,(4054, 211, 70, '2017-02-28', '2017-02-11', 'John Cole', '4679 Trailsway Circle', null, 'Sanlanbahai', null, null, 'China', 4.42, 'Card', '2017-01-06', 'Complete') +,(4055, 208, 65, '2017-01-11', '2017-02-14', 'Bobby Butler', '314 Jenna Crossing', null, 'Malusac', null, '2005', 'Philippines', 7.37, 'Cash', '2017-03-15', 'Shipped') +,(4056, 220, 15, '2016-07-12', '2016-09-06', 'Anthony Lane', '1 Packers Avenue', null, 'Batambak', null, null, 'Indonesia', 5.41, 'Card', '2016-11-21', 'On Hold') +,(4057, 220, 76, '2016-05-05', '2016-04-19', 'Karen Ray', '891 Raven Street', null, 'Chinju', null, null, 'Finland', 4.71, 'Cash', '2017-02-11', 'On Hold') +,(4058, 216, 90, '2017-01-26', '2016-12-19', 'Martha Gonzalez', '8695 Mandrake Place', null, 'Maythalūn', null, null, 'India', 1.75, 'Card', '2017-03-16', 'On Hold') +,(4059, 212, 43, '2016-09-20', '2017-02-11', 'Judy Daniels', '154 Lukken Court', null, 'Luoqiao', null, null, 'China', 4.63, 'Check', '2016-11-09', 'On Hold') +,(4060, 207, 80, '2016-04-29', '2016-07-01', 'Jane Stevens', '43 Kingsford Pass', null, 'Dobruševo', null, '7514', 'Denmark', 1.96, 'Cash', '2016-09-02', 'On Hold') +,(4061, 214, 89, '2016-10-09', '2016-09-09', 'Emily Miller', '5 Pearson Lane', null, 'East London', null, '5688', 'South Africa', 2.14, 'Card', '2016-06-10', 'Complete') +,(4062, 220, 8 , '2016-12-01', '2017-03-09', 'Sarah Johnson', '30 Chinook Lane', null, 'Selishche', null, '180536', 'Russia', 3.76, 'Card', '2016-11-18', 'On Hold') +,(4063, 220, 48, '2017-03-05', '2016-11-30', 'Carolyn Reyes', '72 Michigan Pass', null, 'Sukasenang', null, null, 'Indonesia', 6.52, 'Cash', '2016-05-20', 'Shipped') +,(4064, 214, 31, '2016-07-19', '2016-08-16', 'Kathryn Coleman', '43358 Packers Court', null, 'Przystajń', null, '42-141', 'Poland', 1.68, 'Card', '2016-12-13', 'Complete') +,(4065, 205, 41, '2016-12-09', '2016-03-20', 'Clarence Graham', '1675 Starling Point', null, 'Zangbawa', null, null, 'China', 5.82, 'Cash', '2016-07-08', 'Complete') +,(4066, 205, 41, '2016-05-25', '2016-11-15', 'David Harris', '00 Warner Court', null, 'Kabba', null, null, 'Netherlands', 7.24, 'Cash', '2016-09-24', 'New') +,(4067, 218, 13, '2016-07-24', '2016-12-06', 'Ruth Fields', '88567 Golf Course Plaza', null, 'Mauá', null, '09300-000', 'Brazil', 6.82, 'Cash', '2017-01-26', 'New') +,(4068, 206, 11, '2016-05-04', '2016-07-10', 'Todd Butler', '88 Graedel Point', null, 'Jablah', null, null, 'India', 3.83, 'Cash', '2016-06-17', 'On Hold') +,(4069, 215, 55, '2016-12-22', '2016-03-28', 'Catherine Perkins', '95 Troy Parkway', null, 'Frampol', null, '23-440', 'Poland', 7.6, 'Check', '2016-08-24', 'Shipped') +,(4070, 220, 40, '2016-10-17', '2016-12-01', 'Jeffrey Rodriguez', '3393 Weeping Birch Court', null, 'Burunday', null, null, 'Denmark', 2.52, 'Cash', '2016-09-06', 'Shipped') +,(4071, 218, 70, '2017-03-16', '2016-12-09', 'Rachel Butler', '79327 Ridgeway Circle', null, 'Dupnitsa', null, '2680', 'Denmark', 6.25, 'Check', '2016-04-02', 'Complete') +,(4072, 205, 45, '2017-01-22', '2016-05-15', 'Robin Fisher', '0 Susan Court', null, 'Morohongō', null, '357-0211', 'Japan', 4.42, 'Card', '2017-03-06', 'Complete') +,(4073, 217, 94, '2017-01-25', '2016-04-11', 'Ruth Carpenter', '4 Glacier Hill Road', null, 'Ngrejo', null, null, 'Indonesia', 4.9, 'Cash', '2016-08-13', 'On Hold') +,(4074, 219, 27, '2017-01-06', '2017-01-03', 'Irene Kelly', '0 Comanche Junction', null, 'Chao', null, null, 'Peru', 5.32, 'Check', '2016-11-20', 'On Hold') +,(4075, 214, 44, '2016-06-24', '2016-12-20', 'Douglas Sims', '81709 Helena Park', null, 'Dongmaku', null, null, 'China', 3.35, 'Card', '2017-02-27', 'Complete') +,(4076, 216, 27, '2016-09-23', '2016-10-05', 'Kenneth Rose', '5316 Dottie Way', null, 'Olszówka', null, '62-641', 'Poland', 2.63, 'Cash', '2016-05-27', 'Shipped') +,(4077, 211, 84, '2016-11-24', '2016-08-04', 'Jimmy Morgan', '42187 Shoshone Center', null, 'Saltsjöbaden', 'Stockholm', '133 41', 'Sweden', 1.11, 'Cash', '2016-09-09', 'On Hold') +,(4078, 202, 57, '2016-05-28', '2016-06-02', 'Annie Vasquez', '5 Lien Junction', null, 'Al Qaţn', null, null, 'South Africa', 2.73, 'Check', '2016-11-14', 'On Hold') +,(4079, 202, 64, '2016-07-05', '2016-05-20', 'Henry Mccoy', '58 Nelson Circle', null, 'Tsaghkahovit', null, null, 'India', 3.29, 'Card', '2016-08-18', 'Shipped') +,(4080, 216, 44, '2017-02-20', '2016-10-08', 'Norma Graham', '27 Heffernan Pass', null, 'Cairima', null, null, 'China', 7.02, 'Check', '2017-03-06', 'Complete') +,(4081, 218, 60, '2017-03-16', '2016-08-06', 'Albert Wright', '572 Vahlen Place', null, 'Drahovo', null, null, 'Ukraine', 4.92, 'Check', '2017-01-29', 'New') +,(4082, 219, 15, '2016-12-26', '2017-02-17', 'Jane Wells', '21 Merchant Way', null, 'Acacías', null, '507009', 'Argentina', 6.53, 'Card', '2016-06-04', 'Complete') +,(4083, 212, 61, '2016-06-24', '2016-03-23', 'Jesse Mitchell', '4060 Carioca Drive', null, 'Ntoroko', null, null, 'South Africa', 9.41, 'Cash', '2016-10-19', 'On Hold') +,(4084, 216, 3 , '2016-08-20', '2017-02-15', 'Carlos Brooks', '868 Pankratz Trail', null, 'Bat Khela', null, '18351', 'Iran', 1.0, 'Check', '2016-12-22', 'On Hold') +,(4085, 209, 25, '2016-12-03', '2016-06-01', 'Christopher Williamson', '8874 Starling Plaza', null, 'Tarbes', 'Midi-Pyrénées', '65951 CEDEX 9', 'France', 4.15, 'Card', '2017-02-04', 'New') +,(4086, 205, 2 , '2016-06-19', '2016-08-26', 'Joseph Wells', '7223 Carpenter Road', null, 'Chitral', null, '17200', 'Iran', 5.31, 'Card', '2016-07-22', 'Shipped') +,(4087, 216, 96, '2016-06-04', '2016-12-31', 'Teresa Thomas', '908 Ramsey Junction', null, 'Dzerzhinskiy', null, '140083', 'Russia', 4.29, 'Cash', '2017-03-03', 'Shipped') +,(4088, 203, 35, '2016-09-21', '2017-01-08', 'Scott Gomez', '70537 Tennessee Crossing', null, 'Bồng Sơn', null, null, 'Vietnam', 6.93, 'Cash', '2017-01-01', 'New') +,(4089, 210, 18, '2017-02-17', '2016-10-28', 'Nicole Miller', '0 Jackson Place', null, 'Šilheřovice', null, '747 15', 'Czech Republic', 5.64, 'Card', '2016-11-17', 'On Hold') +,(4090, 201, 8 , '2016-11-12', '2016-06-02', 'Donald Nguyen', '7320 Bunting Pass', null, 'Namioka', null, '953-0062', 'Japan', 7.07, 'Cash', '2016-09-29', 'Complete') +,(4091, 212, 67, '2016-04-08', '2016-11-21', 'Shawn Myers', '1844 Esch Plaza', null, 'Gračec', null, '10370', 'Canada', 4.84, 'Card', '2016-03-17', 'New') +,(4092, 220, 16, '2017-01-12', '2016-08-04', 'Daniel Armstrong', '2 Donald Alley', null, 'La Colorada', null, null, 'Denmark', 2.98, 'Check', '2016-12-08', 'Shipped') +,(4093, 203, 60, '2016-04-17', '2016-05-10', 'Henry Gonzales', '23848 6th Center', null, 'Guayatá', null, '153047', 'Argentina', 1.54, 'Check', '2016-04-18', 'New') +,(4094, 209, 37, '2016-08-07', '2016-04-26', 'Stephanie Snyder', '1152 Morning Park', null, 'Zhitan', null, null, 'China', 9.76, 'Card', '2016-05-23', 'New') +,(4095, 205, 46, '2016-09-01', '2017-02-25', 'Joan Butler', '98050 Mitchell Point', null, 'Bun Barat', null, null, 'Indonesia', 9.57, 'Card', '2017-01-25', 'Shipped') +,(4096, 211, 92, '2017-01-02', '2016-12-06', 'Gloria Murray', '8 Vidon Terrace', null, 'Rumenka', null, null, 'India', 5.33, 'Card', '2016-12-28', 'Shipped') +,(4097, 210, 66, '2016-07-04', '2016-05-30', 'Dorothy Simpson', '0 Pearson Point', null, 'Yevpatoriya', null, null, 'Ukraine', 3.52, 'Check', '2016-04-28', 'Complete') +,(4098, 219, 59, '2016-09-27', '2016-12-17', 'Katherine Brooks', '921 Anhalt Place', null, 'Rietavas', null, '90018', 'Denmark', 5.29, 'Check', '2016-12-19', 'Complete') +,(4099, 207, 65, '2016-07-06', '2016-10-11', 'Linda Reid', '89712 Dryden Point', null, 'Bronnitsy', null, '142451', 'Russia', 5.68, 'Card', '2016-07-08', 'New') +,(4100, 212, 61, '2016-04-14', '2016-05-02', 'Richard Carpenter', '17032 Melrose Crossing', null, 'White River', null, '1256', 'South Africa', 7.22, 'Card', '2016-08-03', 'Shipped') +,(4101, 206, 23, '2016-03-28', '2016-12-01', 'Clarence Coleman', '9167 Valley Edge Point', null, 'Guocun', null, null, 'China', 5.86, 'Check', '2016-08-19', 'Shipped') +,(4102, 202, 16, '2016-07-26', '2017-01-18', 'Kevin Dunn', '178 Park Meadow Avenue', null, 'Mlonggo', null, null, 'Indonesia', 4.15, 'Check', '2016-08-03', 'Complete') +,(4103, 211, 65, '2017-01-17', '2016-11-09', 'Keith Lopez', '689 Anthes Pass', null, 'Cibanten', null, null, 'Indonesia', 8.25, 'Check', '2016-10-15', 'Shipped') +,(4104, 218, 86, '2017-03-12', '2016-05-25', 'Chris Wright', '57974 Riverside Junction', null, 'Ban Mai', null, '80000', 'Thailand', 4.85, 'Cash', '2016-05-08', 'New') +,(4105, 215, 57, '2016-07-03', '2016-05-03', 'Michael Snyder', '93 Ohio Hill', null, 'Bryan', 'Texas', '77806', 'United States', 3.54, 'Card', '2016-08-10', 'Shipped') +,(4106, 210, 2 , '2017-03-07', '2016-09-18', 'David Day', '5024 Summerview Circle', null, 'Itapira', null, '13970-000', 'Brazil', 3.6, 'Cash', '2017-01-20', 'On Hold') +,(4107, 218, 4 , '2016-10-10', '2016-09-02', 'Lisa Kim', '4892 Huxley Center', null, 'Tanjungagung', null, null, 'Indonesia', 6.23, 'Cash', '2016-06-11', 'On Hold') +,(4108, 214, 26, '2016-06-02', '2016-10-05', 'Teresa Ellis', '1569 Mariners Cove Terrace', null, 'Maszkienice', null, '32-854', 'Poland', 7.65, 'Check', '2016-04-14', 'On Hold') +,(4109, 201, 51, '2016-10-07', '2017-02-02', 'Jimmy Lawson', '2165 Bluestem Center', null, 'Kampungbaru', null, null, 'Indonesia', 1.73, 'Check', '2016-09-30', 'Shipped') +,(4110, 215, 4 , '2016-08-21', '2017-02-05', 'Jerry Murray', '40070 Anderson Court', null, 'Vicente Guerrero', 'Veracruz Llave', '92440', 'Mexico', 1.57, 'Card', '2016-06-26', 'New') +,(4111, 210, 56, '2016-07-06', '2016-09-19', 'Joan Adams', '5322 Goodland Avenue', null, 'Paris 17', 'Île-de-France', '75853 CEDEX 17', 'France', 7.52, 'Cash', '2016-05-07', 'New') +,(4112, 214, 77, '2016-09-04', '2016-10-19', 'Chris Young', '7 Clove Center', null, 'Gongjiahe', null, null, 'China', 3.31, 'Card', '2016-11-06', 'New') +,(4113, 217, 62, '2016-07-18', '2016-09-30', 'Norma Oliver', '6002 Rieder Road', null, 'Lingbei', null, null, 'China', 8.85, 'Check', '2016-09-25', 'Complete') +,(4114, 213, 72, '2016-08-01', '2016-09-12', 'Douglas Day', '88 Helena Drive', null, 'Alcoutim', 'Faro', '8970-055', 'Portugal', 5.52, 'Card', '2016-12-19', 'New') +,(4115, 220, 6 , '2016-11-13', '2017-02-22', 'Janet James', '820 Westend Place', null, 'Springfield', 'Massachusetts', '01129', 'United States', 4.72, 'Cash', '2016-03-21', 'On Hold') +,(4116, 201, 72, '2016-09-01', '2016-09-07', 'Martha Lee', '2 Donald Hill', null, 'Majiang', null, null, 'China', 4.39, 'Cash', '2016-12-10', 'Shipped') +,(4117, 202, 40, '2017-02-04', '2016-12-09', 'Benjamin Cruz', '02989 Morningstar Avenue', null, 'Gīvī', null, null, 'Iran', 1.77, 'Check', '2017-01-29', 'Complete') +,(4118, 213, 48, '2016-12-24', '2017-01-06', 'Diane Porter', '7 Kensington Center', null, 'Pingyi', null, null, 'China', 4.69, 'Check', '2016-05-31', 'On Hold') +,(4119, 205, 69, '2016-06-30', '2016-05-01', 'Brandon Myers', '80411 Victoria Center', null, 'Punsu', null, null, 'Indonesia', 7.8, 'Cash', '2016-12-28', 'New') +,(4120, 220, 63, '2016-11-11', '2016-10-30', 'Beverly Garza', '2750 Sullivan Place', null, 'San Jose', null, '8427', 'Philippines', 8.15, 'Check', '2016-09-23', 'Shipped') +,(4121, 220, 32, '2016-05-05', '2016-09-05', 'Cynthia Simpson', '0731 Clarendon Point', null, 'Pomichna', null, null, 'Ukraine', 5.56, 'Card', '2017-02-23', 'On Hold') +,(4122, 201, 38, '2016-04-24', '2016-07-30', 'Janet West', '4800 Dottie Parkway', null, 'Tân Kỳ', null, null, 'Vietnam', 2.63, 'Cash', '2016-06-17', 'On Hold') +,(4123, 214, 24, '2016-04-04', '2016-06-11', 'Kevin Stone', '85 Duke Avenue', null, 'Shemonaīkha', null, null, 'Denmark', 9.99, 'Card', '2016-09-24', 'On Hold') +,(4124, 210, 9 , '2016-09-01', '2016-06-18', 'Amy Austin', '80663 Almo Park', null, 'Zaječov', null, '267 63', 'Czech Republic', 3.58, 'Card', '2016-08-29', 'Complete') +,(4125, 206, 78, '2017-02-09', '2016-07-07', 'Gregory Greene', '6 Commercial Junction', null, 'Hudong', null, null, 'China', 7.34, 'Cash', '2016-12-26', 'New') +,(4126, 215, 48, '2016-07-30', '2016-12-25', 'Laura Woods', '115 Ramsey Plaza', null, 'Allentown', 'Pennsylvania', '18105', 'United States', 4.92, 'Check', '2016-09-28', 'On Hold') +,(4127, 220, 19, '2016-03-29', '2016-05-27', 'Stephanie Reed', '452 Grayhawk Way', null, 'Sicheng', null, null, 'China', 1.1, 'Card', '2017-03-14', 'Shipped') +,(4128, 208, 64, '2016-06-03', '2016-08-13', 'Craig Gonzalez', '6028 West Street', null, 'Kliteh', null, null, 'Indonesia', 1.73, 'Cash', '2016-06-23', 'Complete') +,(4129, 201, 28, '2016-09-05', '2016-04-03', 'Raymond Gomez', '4 Stone Corner Place', null, 'Chechenglu', null, null, 'China', 4.32, 'Card', '2016-06-29', 'Complete') +,(4130, 215, 83, '2016-11-14', '2016-09-13', 'Kenneth Taylor', '7 Nevada Way', null, 'Alīpur', null, '34451', 'Iran', 5.07, 'Card', '2016-11-28', 'Complete') +,(4131, 203, 76, '2017-02-01', '2017-01-04', 'Jose Peters', '2493 Saint Paul Crossing', null, 'Bofuer', null, null, 'Indonesia', 9.85, 'Card', '2016-11-18', 'New') +,(4132, 207, 67, '2016-09-02', '2017-03-10', 'Martin West', '7251 Prairieview Place', null, 'Espinillo', null, '3460', 'Argentina', 7.9, 'Card', '2017-02-05', 'New') +,(4133, 208, 78, '2016-08-27', '2016-12-26', 'Louise Dunn', '4076 East Trail', null, 'Caramanta', null, '056047', 'Argentina', 1.28, 'Cash', '2016-12-22', 'Shipped') +,(4134, 209, 93, '2016-06-27', '2016-04-10', 'Gregory Stanley', '67 Namekagon Crossing', null, 'Pasarkayu', null, null, 'Indonesia', 2.83, 'Check', '2016-09-17', 'Complete') +,(4135, 206, 60, '2016-03-23', '2016-06-19', 'Ronald Palmer', '21 Old Shore Place', null, 'Tujing', null, null, 'China', 9.01, 'Check', '2016-12-22', 'New') +,(4136, 209, 10, '2016-11-07', '2016-11-21', 'Harry Robinson', '740 Toban Court', null, 'Liujiage', null, null, 'China', 7.13, 'Card', '2016-09-20', 'New') +,(4137, 214, 83, '2016-05-20', '2016-04-08', 'Joan Torres', '5167 Laurel Drive', null, 'Nirji', null, null, 'China', 9.81, 'Card', '2016-09-13', 'Complete') +,(4138, 207, 47, '2016-07-17', '2016-10-03', 'Carlos Jones', '4 Fuller Lane', null, 'Detroit', 'Michigan', '48258', 'United States', 8.02, 'Card', '2016-11-16', 'On Hold') +,(4139, 214, 92, '2016-07-17', '2017-01-23', 'Terry Freeman', '738 Vernon Road', null, 'Veverská Bítýška', null, '664 71', 'Czech Republic', 1.93, 'Check', '2016-04-04', 'Complete') +,(4140, 204, 92, '2016-06-09', '2016-05-06', 'Rose Hunt', '3242 Bunting Trail', null, 'Schaumburg', 'Illinois', '60193', 'United States', 7.65, 'Check', '2016-07-03', 'On Hold') +,(4141, 214, 12, '2016-11-19', '2017-03-16', 'Harry Reid', '395 Hauk Road', null, 'Rudky', null, null, 'Ukraine', 5.23, 'Card', '2017-01-18', 'On Hold') +,(4142, 212, 88, '2016-12-25', '2016-12-14', 'Fred Olson', '9311 Old Gate Park', null, 'Hejiabao', null, null, 'China', 4.02, 'Check', '2016-05-16', 'New') +,(4143, 217, 79, '2016-06-14', '2016-08-25', 'Paul Arnold', '08347 Comanche Pass', null, 'Bukovec', null, '739 84', 'Czech Republic', 6.02, 'Card', '2016-05-08', 'New') +,(4144, 216, 56, '2016-06-03', '2016-07-22', 'Carolyn Woods', '55 Stoughton Pass', null, 'Shengmi', null, null, 'China', 7.32, 'Card', '2016-07-27', 'New') +,(4145, 218, 84, '2016-07-02', '2016-11-05', 'Craig Schmidt', '2 Stephen Plaza', null, 'Arhust', null, null, 'Japan', 3.31, 'Check', '2016-06-17', 'New') +,(4146, 219, 13, '2016-09-02', '2017-01-29', 'Antonio Jordan', '452 Clemons Court', null, 'København', 'Region Hovedstaden', '1787', 'Denmark', 4.84, 'Card', '2016-11-10', 'Complete') +,(4147, 212, 51, '2016-10-19', '2017-01-20', 'Carol Evans', '1649 Crescent Oaks Road', null, 'Roubaix', 'Nord-Pas-de-Calais', '59100', 'France', 7.71, 'Card', '2017-03-08', 'On Hold') +,(4148, 217, 26, '2016-04-16', '2016-11-28', 'Steven Torres', '73679 Morning Drive', null, 'Ayotupas', null, null, 'Japan', 7.0, 'Card', '2016-06-12', 'On Hold') +,(4149, 215, 1 , '2017-02-06', '2016-10-27', 'Louis Watson', '03 Golf View Way', null, 'Madaoua', null, null, 'United Kingdom', 4.45, 'Check', '2016-07-22', 'Complete') +,(4150, 210, 100,'2017-01-14', '2016-11-12', 'Robin Reynolds', '5 Hagan Hill', null, 'Huacaschuque', null, null, 'Peru', 7.37, 'Check', '2017-02-09', 'New') +,(4151, 217, 24, '2016-09-06', '2016-10-11', 'Julia Gilbert', '3 Manitowish Avenue', null, 'Passos', 'Viana do Castelo', '4990-770', 'Portugal', 1.76, 'Card', '2016-07-16', 'New') +,(4152, 210, 90, '2016-05-26', '2016-07-14', 'Chris Chavez', '0 Birchwood Plaza', null, 'Odivelas', 'Lisboa', '2675-080', 'Portugal', 8.35, 'Cash', '2017-02-05', 'On Hold') +,(4153, 220, 79, '2016-10-27', '2016-08-14', 'Adam Morrison', '04510 West Circle', null, 'Weda', null, null, 'Japan', 8.84, 'Check', '2016-10-05', 'On Hold') +,(4154, 210, 57, '2017-02-21', '2016-09-28', 'Doris Snyder', '37027 Hintze Parkway', null, 'Vakhrushi', null, '613110', 'Russia', 2.75, 'Cash', '2016-12-02', 'Complete') +,(4155, 202, 24, '2017-02-03', '2016-08-03', 'Lisa Fisher', '919 Warner Circle', null, 'Kanbe', null, null, 'India', 2.48, 'Check', '2016-12-23', 'New') +,(4156, 213, 89, '2017-01-26', '2016-06-25', 'Gloria Murphy', '6750 Hansons Center', null, 'Saint Petersburg', null, '190990', 'Russia', 2.88, 'Cash', '2017-01-31', 'On Hold') +,(4157, 219, 83, '2016-08-03', '2016-06-15', 'Sara Mcdonald', '88365 Namekagon Park', null, 'Maofan', null, null, 'China', 4.69, 'Cash', '2016-09-22', 'New') +,(4158, 202, 79, '2016-08-13', '2016-10-08', 'John Barnes', '41 Springs Plaza', null, 'Carangola', null, '36800-000', 'Brazil', 4.84, 'Check', '2016-11-25', 'New') +,(4159, 215, 84, '2016-11-30', '2017-02-27', 'Bobby Matthews', '39153 Kipling Trail', null, 'Now Zād', null, null, 'Germany', 7.56, 'Cash', '2016-09-25', 'Shipped') +,(4160, 216, 40, '2016-07-27', '2016-12-05', 'Robin Greene', '899 Waubesa Alley', null, 'Vellinge', 'Skåne', '235 93', 'Sweden', 4.17, 'Card', '2016-12-22', 'New') +,(4161, 211, 91, '2017-03-12', '2016-09-11', 'Joseph Long', '3 Nobel Terrace', null, 'Bukabu', null, null, 'Japan', 2.26, 'Card', '2016-10-26', 'On Hold') +,(4162, 204, 94, '2016-10-08', '2016-09-26', 'Lisa Rodriguez', '880 Arizona Terrace', null, 'Elena', null, '5815', 'Argentina', 3.13, 'Cash', '2016-06-15', 'Shipped') +,(4163, 208, 49, '2017-02-23', '2016-06-05', 'Douglas Parker', '79 Mariners Cove Plaza', null, 'Şafāshahr', null, null, 'Iran', 1.83, 'Cash', '2016-10-26', 'On Hold') +,(4164, 201, 23, '2016-10-31', '2017-01-07', 'Laura Stewart', '97911 Meadow Ridge Road', null, 'Hexi', null, null, 'China', 1.24, 'Check', '2017-03-08', 'Shipped') +,(4165, 202, 27, '2017-01-07', '2016-10-05', 'Matthew Jordan', '29 Lakewood Trail', null, 'Kalkal Barat', null, null, 'Japan', 9.19, 'Card', '2016-09-03', 'Shipped') +,(4166, 218, 61, '2016-03-31', '2017-03-03', 'Denise Mason', '79 Carberry Alley', null, 'Vạn Giã', null, null, 'Vietnam', 7.78, 'Card', '2016-03-23', 'New') +,(4167, 220, 56, '2016-11-12', '2016-06-18', 'Phillip Castillo', '9910 Reindahl Parkway', null, 'Shangyanzhuang', null, null, 'China', 2.48, 'Card', '2016-07-14', 'Complete') +,(4168, 201, 41, '2016-07-10', '2016-07-29', 'Dorothy Nelson', '8 Hermina Terrace', null, 'Petrolina', null, '56300-000', 'Brazil', 1.52, 'Check', '2016-11-11', 'Shipped') +,(4169, 218, 100,'2016-12-18', '2016-12-02', 'Lawrence Willis', '21 Northland Trail', null, 'Bukor', null, null, 'India', 2.28, 'Card', '2017-01-06', 'New') +,(4170, 218, 6 , '2016-10-31', '2016-10-20', 'Jonathan Banks', '5748 Kings Hill', null, 'Tianning', null, null, 'China', 5.71, 'Check', '2016-06-02', 'Shipped') +,(4171, 211, 93, '2016-11-16', '2017-01-20', 'Gary Green', '001 Straubel Point', null, 'Huangshapu', null, null, 'China', 3.6, 'Cash', '2016-12-12', 'Complete') +,(4172, 203, 46, '2016-10-16', '2016-09-08', 'Nancy Bryant', '367 Gateway Park', null, 'Zhutang', null, null, 'China', 2.19, 'Cash', '2017-02-15', 'Shipped') +,(4173, 208, 72, '2016-08-27', '2016-04-09', 'Jeremy Rose', '8 Service Lane', null, 'Jinshandian', null, null, 'China', 8.09, 'Check', '2017-01-18', 'On Hold') +,(4174, 212, 88, '2016-06-25', '2016-08-21', 'Rebecca Gibson', '74 American Crossing', null, 'Canmang', null, null, 'China', 1.31, 'Card', '2017-02-08', 'New') +,(4175, 208, 75, '2017-02-28', '2017-01-03', 'Marilyn Hanson', '676 Service Crossing', null, 'Racławice', null, '32-222', 'Poland', 2.88, 'Check', '2017-02-18', 'New') +,(4176, 204, 1 , '2016-09-23', '2016-08-16', 'Denise Hanson', '8 Lakewood Crossing', null, 'Huaizhong', null, null, 'China', 9.48, 'Card', '2016-12-30', 'On Hold') +,(4177, 204, 20, '2017-03-02', '2016-12-27', 'John Shaw', '4752 Meadow Ridge Lane', null, 'Sosnovo-Ozerskoye', null, '612955', 'Russia', 7.17, 'Check', '2016-06-21', 'On Hold') +,(4178, 202, 30, '2016-03-20', '2016-10-17', 'Russell Fernandez', '5941 Esch Lane', null, 'Shuiyang', null, null, 'China', 1.04, 'Check', '2017-01-05', 'On Hold') +,(4179, 202, 27, '2017-01-14', '2016-07-31', 'Annie Ruiz', '67778 Butterfield Trail', null, 'Qalyūb', null, null, 'Germany', 5.51, 'Card', '2016-05-12', 'Shipped') +,(4180, 208, 1 , '2017-03-16', '2016-04-04', 'Ashley Gonzales', '88504 Johnson Street', null, 'Salingogan', null, '6417', 'Philippines', 7.56, 'Check', '2016-07-26', 'Shipped') +,(4181, 203, 70, '2016-03-25', '2016-11-06', 'Richard George', '54 3rd Circle', null, 'Haibeitou', null, null, 'China', 1.99, 'Cash', '2016-09-05', 'New') +,(4182, 219, 69, '2016-04-11', '2017-02-03', 'David Harris', '2 Menomonie Pass', null, 'Oslo', 'Oslo', '0188', 'Greece', 1.93, 'Check', '2016-11-30', 'Shipped') +,(4183, 211, 25, '2016-12-08', '2016-11-16', 'Catherine Reynolds', '302 Autumn Leaf Parkway', null, 'Lameiras', 'Lisboa', '2715-145', 'Portugal', 6.68, 'Cash', '2016-04-02', 'Shipped') +,(4184, 217, 73, '2016-06-19', '2016-11-29', 'Donald Moreno', '690 Laurel Park', null, 'Sinisian', null, '4212', 'Philippines', 3.1, 'Check', '2017-01-06', 'New') +,(4185, 210, 34, '2016-07-03', '2016-05-23', 'Ryan Thomas', '45044 Harper Place', null, 'Madīnat Lab‘ūs', null, null, 'South Africa', 6.31, 'Cash', '2016-06-27', 'Complete') +,(4186, 206, 91, '2016-05-26', '2016-09-09', 'Ruby Lynch', '8350 Karstens Parkway', null, 'Puyo', null, null, 'Argentina', 6.07, 'Check', '2016-05-10', 'Shipped') +,(4187, 208, 64, '2016-05-31', '2016-10-16', 'Linda Robinson', '6069 Chive Plaza', null, 'Joutseno', null, '54101', 'Finland', 3.11, 'Card', '2016-05-15', 'Shipped') +,(4188, 216, 41, '2017-02-07', '2016-03-28', 'Bonnie Morris', '2611 Comanche Junction', null, 'Lacombe', 'Alberta', 'T4L', 'Canada', 2.53, 'Check', '2016-08-31', 'New') +,(4189, 206, 51, '2016-12-20', '2016-12-08', 'Dennis Gardner', '2348 Blue Bill Park Crossing', null, 'Ngkiong', null, null, 'Japan', 5.1, 'Check', '2016-11-28', 'New') +,(4190, 220, 54, '2016-08-06', '2016-08-27', 'Carolyn Matthews', '817 Ohio Point', null, 'Orekhovo-Zuyevo', null, '142609', 'Russia', 7.52, 'Card', '2016-03-22', 'On Hold') +,(4191, 207, 96, '2016-07-03', '2016-06-18', 'Jesse Parker', '3 Eastwood Terrace', null, 'Berezovo', null, null, 'Ukraine', 6.64, 'Check', '2016-05-07', 'New') +,(4192, 216, 18, '2016-06-05', '2017-01-11', 'Ann Gilbert', '6 Oak Valley Lane', null, 'Caijiang', null, null, 'China', 3.72, 'Cash', '2016-11-17', 'On Hold') +,(4193, 208, 22, '2016-06-26', '2017-02-22', 'Martha Hawkins', '57581 Union Road', null, 'Ilinden', null, '1041', 'Denmark', 5.64, 'Cash', '2016-05-23', 'On Hold') +,(4194, 207, 42, '2017-02-03', '2017-01-08', 'Jeffrey Hart', '83 Green Ridge Point', null, 'Wangcheng', null, null, 'China', 1.15, 'Check', '2016-12-07', 'Shipped') +,(4195, 217, 28, '2016-10-18', '2016-05-01', 'Joseph Riley', '54373 Coleman Street', null, 'Karangbungur', null, null, 'Japan', 5.9, 'Cash', '2016-04-23', 'Complete') +,(4196, 207, 78, '2016-07-09', '2016-07-15', 'Brian Dean', '9 Stone Corner Hill', null, 'Dambulla', null, '21100', 'United Kingdom', 5.15, 'Check', '2016-07-09', 'On Hold') +,(4197, 204, 38, '2016-07-19', '2016-04-13', 'Christine Campbell', '47302 Porter Junction', null, 'Dananshan', null, null, 'China', 6.74, 'Card', '2016-11-07', 'Complete') +,(4198, 201, 7 , '2017-03-02', '2016-08-16', 'Ruth Mcdonald', '401 Erie Avenue', null, 'Borkowice', null, '26-422', 'Poland', 3.24, 'Cash', '2016-04-17', 'New') +,(4199, 216, 87, '2016-12-14', '2017-03-05', 'Jean Armstrong', '450 Sullivan Avenue', null, 'Carpenter', null, '2009', 'Philippines', 4.25, 'Cash', '2016-07-11', 'Complete') +,(4200, 218, 8 , '2017-02-01', '2016-04-17', 'Gary Price', '775 Butterfield Lane', null, 'Vaasa', null, '66999', 'Finland', 5.36, 'Card', '2016-07-09', 'Shipped') +,(4201, 217, 77, '2016-11-10', '2016-11-13', 'Carolyn Scott', '5878 Badeau Lane', null, 'Kazanskaya', null, '396614', 'Russia', 7.94, 'Card', '2016-12-09', 'New') +,(4202, 204, 10, '2016-08-12', '2016-03-21', 'Earl Anderson', '9 Roth Court', null, 'Governor’s Harbour', null, null, 'Canada', 2.47, 'Card', '2016-08-06', 'Complete') +,(4203, 204, 54, '2016-05-26', '2016-04-18', 'Elizabeth Kelley', '70 Burrows Street', null, 'Fucheng', null, null, 'China', 9.94, 'Cash', '2016-08-24', 'Shipped') +,(4204, 208, 58, '2017-03-09', '2016-04-17', 'Julia Wilson', '46476 Burning Wood Crossing', null, 'Koper', null, '6600', 'India', 3.82, 'Card', '2016-08-26', 'New') +,(4205, 208, 85, '2016-05-04', '2016-03-18', 'Jeffrey Oliver', '39 Tennessee Avenue', null, 'Jejkowice', null, '44-290', 'Poland', 7.22, 'Card', '2016-09-23', 'Shipped') +,(4206, 220, 8 , '2016-06-16', '2017-01-03', 'Angela Walker', '579 Miller Street', null, 'Hà Tĩnh', null, null, 'Vietnam', 1.04, 'Check', '2016-05-18', 'Complete') +,(4207, 212, 55, '2016-07-04', '2016-11-09', 'Karen Hansen', '953 Manufacturers Pass', null, 'Lysekil', 'Västra Götaland', '453 35', 'Sweden', 8.81, 'Check', '2016-03-18', 'New') +,(4208, 217, 96, '2016-10-26', '2016-07-11', 'Patricia West', '1 Browning Alley', null, 'Huayang', null, null, 'China', 7.54, 'Card', '2016-09-15', 'New') +,(4209, 203, 71, '2016-08-04', '2017-01-01', 'Phillip Gardner', '30438 Mariners Cove Way', null, 'Phu Khiao', null, '36110', 'Thailand', 3.03, 'Check', '2016-03-31', 'Shipped') +,(4210, 207, 30, '2017-03-08', '2016-07-21', 'Fred Howard', '45981 Hovde Trail', null, 'Suncheon', null, null, 'Finland', 1.13, 'Check', '2016-07-14', 'On Hold') +,(4211, 217, 57, '2016-05-28', '2017-03-11', 'George Wagner', '24863 Messerschmidt Road', null, 'Ningzhong', null, null, 'China', 6.5, 'Check', '2016-07-26', 'New') +,(4212, 213, 19, '2016-11-28', '2016-06-09', 'Clarence Russell', '85 Kropf Circle', null, 'Ouro Branco', null, '59347-000', 'Brazil', 6.88, 'Check', '2016-04-02', 'On Hold') +,(4213, 217, 51, '2016-06-25', '2016-05-25', 'Jane Johnston', '1708 Corscot Pass', null, 'Şafāshahr', null, null, 'Iran', 9.16, 'Cash', '2016-10-12', 'Complete') +,(4214, 203, 88, '2017-02-19', '2016-03-25', 'John Adams', '100 Hollow Ridge Way', null, 'Satita', null, null, 'India', 3.01, 'Cash', '2016-11-19', 'Shipped') +,(4215, 202, 12, '2017-01-26', '2016-10-07', 'Diana Graham', '12 Esch Park', null, 'Krasnokamensk', null, '662955', 'Russia', 9.29, 'Check', '2016-06-10', 'Shipped') +,(4216, 211, 66, '2016-07-19', '2016-11-30', 'John Henry', '448 Hanover Trail', null, 'Phitsanulok', null, '65000', 'Thailand', 7.23, 'Card', '2016-09-22', 'Shipped') +,(4217, 218, 98, '2016-11-20', '2016-11-12', 'Donna Bradley', '92136 Arkansas Avenue', null, 'Balong Wetan', null, null, 'Japan', 7.79, 'Card', '2016-12-18', 'New') +,(4218, 206, 5 , '2016-05-04', '2016-08-19', 'Kevin Harper', '2911 Laurel Point', null, 'Patapan', null, null, 'Japan', 1.52, 'Card', '2016-03-20', 'On Hold') +,(4219, 205, 76, '2016-11-15', '2016-12-12', 'Margaret Hanson', '9603 Northridge Junction', null, 'Mwembe', null, null, 'India', 4.76, 'Cash', '2017-03-14', 'Shipped') +,(4220, 206, 62, '2016-12-30', '2016-10-23', 'Henry Bradley', '84 Lake View Plaza', null, 'Zheleznovodsk', null, '357408', 'Russia', 8.08, 'Cash', '2017-02-23', 'Complete') +,(4221, 218, 91, '2016-08-07', '2016-08-31', 'Jane Fowler', '2484 Hoepker Hill', null, 'Huangcun', null, null, 'China', 9.34, 'Card', '2017-01-10', 'Complete') +,(4222, 207, 19, '2016-05-22', '2016-06-25', 'Kimberly Peterson', '5851 Carey Crossing', null, 'Pochuta', null, '04008', 'Japan', 9.16, 'Card', '2016-04-25', 'Shipped') +,(4223, 203, 69, '2017-02-13', '2016-09-18', 'Nicholas Simpson', '9 Hudson Way', null, 'Chashan', null, null, 'China', 5.37, 'Check', '2017-01-01', 'On Hold') +,(4224, 214, 71, '2017-02-28', '2016-06-18', 'Carol Rodriguez', '78 Grayhawk Place', null, 'Luntas', null, null, 'Indonesia', 1.76, 'Card', '2016-10-06', 'Shipped') +,(4225, 207, 34, '2017-03-06', '2016-07-20', 'Jessica Mason', '65 Merrick Lane', null, 'Křižanov', null, '789 01', 'Czech Republic', 9.75, 'Card', '2016-12-28', 'New') +,(4226, 209, 74, '2016-06-04', '2017-01-15', 'Jeffrey Sims', '05441 Wayridge Pass', null, 'Rennes', 'Bretagne', '35047 CEDEX 9', 'France', 9.09, 'Check', '2016-05-19', 'Shipped') +,(4227, 205, 74, '2016-09-09', '2017-01-06', 'Arthur Simmons', '733 Logan Circle', null, 'Dzhankoy', null, null, 'Ukraine', 2.51, 'Check', '2017-01-25', 'New') +,(4228, 207, 52, '2017-01-30', '2017-01-08', 'Kevin Williams', '3561 6th Trail', null, 'Narganá', null, null, 'Denmark', 7.32, 'Cash', '2016-06-24', 'On Hold') +,(4229, 209, 76, '2016-05-05', '2016-07-11', 'Joe Stewart', '0314 Ryan Parkway', null, 'San Jose', 'Oaxaca', '69570', 'Mexico', 9.28, 'Check', '2016-05-06', 'Shipped') +,(4230, 214, 2 , '2016-09-19', '2016-09-08', 'Walter Barnes', '80695 Stone Corner Road', null, 'Busdi', null, '6210', 'Philippines', 5.97, 'Check', '2016-07-19', 'Shipped') +,(4231, 211, 55, '2016-08-27', '2016-10-04', 'Sean Holmes', '91 Becker Drive', null, 'Gezan', null, null, 'China', 3.81, 'Check', '2016-06-14', 'Shipped') +,(4232, 209, 14, '2016-04-01', '2017-03-06', 'Sandra Perez', '45373 Buhler Park', null, 'Ust’-Kut', null, '162176', 'Russia', 4.25, 'Cash', '2017-01-22', 'Shipped') +,(4233, 205, 96, '2016-09-27', '2016-07-03', 'Sara Kelly', '73457 Buhler Court', null, 'Sima', null, null, 'Canada', 7.2, 'Card', '2016-12-14', 'Complete') +,(4234, 217, 74, '2016-11-22', '2017-01-18', 'Edward Reid', '02 Westport Trail', null, 'Tchaourou', null, null, 'India', 3.5, 'Cash', '2016-12-25', 'New') +,(4235, 206, 69, '2016-03-17', '2016-10-29', 'Betty Cook', '83578 Ohio Avenue', null, 'Stockholm', 'Stockholm', '101 22', 'Sweden', 6.17, 'Check', '2016-09-02', 'On Hold') +,(4236, 217, 97, '2017-02-06', '2016-07-01', 'Diana Ellis', '49 Jenna Circle', null, 'Yanshan', null, null, 'China', 6.06, 'Check', '2016-07-16', 'Complete') +,(4237, 216, 17, '2016-11-30', '2016-10-02', 'Donald Miller', '8581 Farragut Junction', null, 'Yosowilangun', null, null, 'Indonesia', 8.9, 'Check', '2016-11-01', 'Complete') +,(4238, 203, 21, '2017-02-09', '2016-12-14', 'Eric Coleman', '9242 Badeau Street', null, 'Caiyuan', null, null, 'China', 4.1, 'Check', '2016-06-07', 'Shipped') +,(4239, 213, 23, '2016-09-15', '2016-11-04', 'Heather Vasquez', '454 Gale Hill', null, 'Susoh', null, null, 'Indonesia', 1.59, 'Check', '2016-10-25', 'New') +,(4240, 208, 2 , '2016-05-28', '2016-05-21', 'Martin Sims', '30 Bunting Center', null, 'Efeng', null, null, 'China', 1.92, 'Cash', '2016-12-15', 'Complete') +,(4241, 202, 85, '2017-02-05', '2016-08-13', 'Catherine Washington', '637 Hermina Court', null, 'San Francisco', 'Jalisco', '46175', 'Mexico', 6.49, 'Card', '2016-12-20', 'On Hold') +,(4242, 204, 17, '2016-10-04', '2016-05-13', 'Gary Kennedy', '2 Grasskamp Point', null, 'Famaillá', null, '4132', 'Argentina', 9.78, 'Card', '2016-12-03', 'Complete') +,(4243, 205, 86, '2016-04-15', '2016-05-25', 'Pamela Parker', '43642 Utah Point', null, 'Santa Rosa', 'Nuevo Leon', '67803', 'Mexico', 1.78, 'Card', '2017-02-16', 'Shipped') +,(4244, 208, 3 , '2016-08-02', '2017-03-13', 'Michelle Russell', '947 Jenna Place', null, 'Kinshasa', null, null, 'Canada', 8.43, 'Cash', '2016-04-13', 'New') +,(4245, 210, 32, '2016-06-16', '2016-07-14', 'Lois Jenkins', '1 Pepper Wood Road', null, 'Kallinge', 'Blekinge', '372 53', 'Sweden', 4.77, 'Cash', '2016-03-17', 'On Hold') +,(4246, 203, 39, '2017-02-04', '2016-08-08', 'Kelly Ramirez', '20490 Eagle Crest Circle', null, 'Baraba', null, '623509', 'Russia', 8.65, 'Cash', '2016-10-04', 'Complete') +,(4247, 202, 24, '2016-05-05', '2016-11-26', 'Harold Gray', '9033 Elmside Plaza', null, 'N’dalatando', null, null, 'Netherlands', 2.78, 'Cash', '2016-07-24', 'New') +,(4248, 210, 16, '2017-01-27', '2017-03-14', 'Dennis Fisher', '4 Sage Road', null, 'Niederanven', null, 'L-6948', 'United Kingdom', 1.26, 'Check', '2016-05-12', 'On Hold') +,(4249, 203, 20, '2016-07-21', '2016-12-08', 'Antonio Wells', '99743 Algoma Hill', null, 'Mūdīyah', null, null, 'South Africa', 4.36, 'Card', '2016-05-28', 'Complete') +,(4250, 217, 88, '2016-05-31', '2016-10-17', 'William Gonzales', '3258 Holy Cross Way', null, 'Yangdun', null, null, 'China', 7.06, 'Check', '2016-04-13', 'New') +,(4251, 211, 1 , '2017-03-04', '2016-10-27', 'Ronald Ward', '5 Logan Terrace', null, 'Tanahmerah', null, null, 'Indonesia', 4.38, 'Card', '2016-09-22', 'On Hold') +,(4252, 217, 87, '2016-12-29', '2016-09-18', 'Gloria Boyd', '10 Grayhawk Hill', null, 'Boromlya', null, null, 'Ukraine', 4.84, 'Cash', '2016-08-01', 'On Hold') +,(4253, 212, 99, '2017-02-02', '2016-04-28', 'Raymond Scott', '3 Donald Trail', null, 'Lakshmīpur', null, '1553', 'Canada', 8.37, 'Cash', '2016-12-06', 'On Hold') +,(4254, 201, 7 , '2016-11-28', '2016-04-11', 'Arthur Hamilton', '95 Doe Crossing Avenue', null, 'Purwosari', null, null, 'Indonesia', 6.84, 'Card', '2016-06-14', 'Shipped') +,(4255, 220, 100,'2016-09-30', '2016-10-08', 'Jean Wagner', '5690 Meadow Valley Alley', null, 'Svedala', 'Skåne', '233 94', 'Sweden', 8.57, 'Check', '2017-01-06', 'Shipped') +,(4256, 218, 78, '2016-04-28', '2016-04-03', 'Kimberly Rose', '6067 Twin Pines Hill', null, 'Capinzal', null, '89665-000', 'Brazil', 6.07, 'Check', '2016-05-18', 'New') +,(4257, 213, 44, '2016-11-04', '2016-03-28', 'Doris Foster', '170 Chive Court', null, 'Lang', null, null, 'China', 1.72, 'Card', '2016-10-20', 'Shipped') +,(4258, 208, 46, '2017-01-11', '2016-09-25', 'Teresa Reynolds', '3 Prairie Rose Alley', null, 'Tashang', null, null, 'China', 4.84, 'Card', '2016-10-16', 'On Hold') +,(4259, 215, 89, '2016-07-07', '2016-12-29', 'Christine Turner', '0746 Heffernan Center', null, 'Henggang', null, null, 'China', 6.81, 'Cash', '2016-08-21', 'New') +,(4260, 210, 23, '2016-10-26', '2017-02-10', 'Jimmy Jordan', '903 Anniversary Trail', null, 'Elaiochóri', null, null, 'Greece', 9.66, 'Cash', '2017-01-10', 'Complete') +,(4261, 207, 20, '2016-11-07', '2017-02-17', 'Andrew Baker', '3 Pennsylvania Park', null, 'Kansas City', 'Missouri', '64130', 'United States', 5.46, 'Cash', '2016-11-20', 'Complete') +,(4262, 203, 32, '2017-02-21', '2016-11-17', 'Diana Dixon', '18520 Maryland Drive', null, 'Santa Catalina', null, '2701', 'Philippines', 4.66, 'Card', '2017-01-09', 'On Hold') +,(4263, 210, 10, '2017-02-28', '2017-02-26', 'Karen Miller', '5608 Moose Court', null, 'Torres Vedras', 'Lisboa', '2560-234', 'Portugal', 5.71, 'Card', '2016-11-30', 'New') +,(4264, 214, 39, '2017-01-09', '2016-10-24', 'Angela Austin', '9659 Vera Point', null, 'Santiaoshi', null, null, 'China', 6.59, 'Check', '2016-05-07', 'Shipped') +,(4265, 203, 3 , '2016-11-11', '2016-11-22', 'Steve Snyder', '7626 Hoepker Junction', null, 'Wulan Hada', null, null, 'China', 5.67, 'Cash', '2017-01-01', 'New') +,(4266, 218, 94, '2016-04-06', '2016-10-02', 'Kevin Daniels', '24 Chinook Point', null, 'Bhairāhawā', null, null, 'United Kingdom', 8.21, 'Card', '2016-05-12', 'Shipped') +,(4267, 203, 58, '2016-11-14', '2016-03-28', 'Patricia Welch', '60375 Corry Street', null, 'Solidaridad', 'Veracruz Llave', '94330', 'Mexico', 2.77, 'Card', '2017-02-02', 'On Hold') +,(4268, 218, 2 , '2016-07-02', '2016-08-14', 'Wanda Reynolds', '965 Calypso Circle', null, 'Dera Bugti', null, '80100', 'Iran', 8.86, 'Check', '2017-01-30', 'On Hold') +,(4269, 216, 47, '2017-03-11', '2016-07-16', 'Harold Williamson', '14332 Texas Junction', null, 'Mzimba', null, null, 'India', 2.47, 'Cash', '2016-06-01', 'Shipped') +,(4270, 213, 62, '2016-11-09', '2017-02-07', 'Juan Fox', '17 Eagan Crossing', null, 'Xiayang', null, null, 'China', 7.63, 'Card', '2017-02-17', 'Shipped') +,(4271, 211, 70, '2016-04-16', '2016-04-26', 'Ryan Long', '0 Harper Circle', null, 'Blagoveshchenka', null, '658670', 'Russia', 3.2, 'Card', '2016-09-10', 'Complete') +,(4272, 206, 29, '2016-03-25', '2016-10-07', 'Frank Cole', '07 Westend Place', null, 'Laixi', null, null, 'China', 1.93, 'Cash', '2016-05-01', 'New') +,(4273, 209, 25, '2016-05-06', '2016-04-13', 'Tammy Wilson', '74278 Grim Pass', null, 'Åkersberga', 'Stockholm', '184 70', 'Sweden', 2.83, 'Card', '2016-10-29', 'Complete') +,(4274, 206, 82, '2017-02-07', '2017-03-06', 'Joan Gonzales', '40 Stephen Street', null, 'Tlogoagung', null, null, 'Indonesia', 3.44, 'Check', '2016-10-14', 'Complete') +,(4275, 203, 91, '2016-10-10', '2016-11-04', 'Jeffrey Hughes', '38 Toban Plaza', null, 'Privas', 'Rhône-Alpes', '07004 CEDEX', 'France', 8.33, 'Card', '2016-04-23', 'On Hold') +,(4276, 210, 89, '2016-05-14', '2016-09-03', 'Rachel Martin', '08 Lake View Hill', null, 'Sandgerði', null, '245', 'India', 2.07, 'Cash', '2016-06-07', 'Complete') +,(4277, 208, 97, '2016-04-06', '2016-07-02', 'Laura Harper', '1 Dexter Street', null, 'Xintaimen', null, null, 'China', 8.08, 'Check', '2016-05-11', 'Shipped') +,(4278, 215, 3 , '2017-03-04', '2017-03-08', 'Annie Rivera', '5975 Debra Park', null, 'Canchaque', null, null, 'Peru', 5.65, 'Check', '2016-04-09', 'Complete') +,(4279, 201, 6 , '2017-03-01', '2016-08-06', 'Pamela Graham', '2 Monument Avenue', null, 'Danxi', null, null, 'China', 2.05, 'Check', '2016-05-23', 'New') +,(4280, 202, 35, '2017-02-04', '2016-06-09', 'Joseph Jenkins', '00001 Fairfield Center', null, 'Mashtūl as Sūq', null, null, 'Germany', 5.32, 'Card', '2016-12-28', 'New') +,(4281, 203, 76, '2016-05-19', '2016-07-29', 'Eugene Garcia', '8308 Onsgard Lane', null, 'Limoncito', null, null, 'India', 4.07, 'Card', '2016-10-20', 'Shipped') +,(4282, 204, 27, '2016-07-20', '2016-09-26', 'Kevin Anderson', '8 Thierer Center', null, 'Saint-Étienne', 'Rhône-Alpes', '42963 CEDEX 9', 'France', 4.88, 'Card', '2016-07-21', 'Complete') +,(4283, 214, 50, '2016-11-27', '2016-06-14', 'Robin Parker', '51949 Forster Parkway', null, 'Laval', 'Pays de la Loire', '53009 CEDEX', 'France', 1.04, 'Check', '2016-04-20', 'Complete') +,(4284, 214, 74, '2016-11-29', '2016-12-08', 'Kelly Palmer', '2 Hauk Hill', null, 'Östersund', 'Jämtland', '831 17', 'Sweden', 4.26, 'Card', '2016-10-08', 'Complete') +,(4285, 214, 76, '2016-10-22', '2016-05-05', 'Diane Freeman', '5441 Petterle Way', null, 'El Tambo', null, null, 'Peru', 7.17, 'Check', '2016-09-27', 'New') +,(4286, 209, 96, '2016-11-08', '2016-08-26', 'Kathleen Adams', '423 Talisman Point', null, 'Kurume', null, '963-8846', 'Japan', 1.99, 'Cash', '2016-05-19', 'On Hold') +,(4287, 204, 76, '2016-10-18', '2017-01-15', 'Teresa Mendoza', '818 Atwood Lane', null, 'Mosteiro', 'Viana do Castelo', '4980-125', 'Portugal', 3.29, 'Cash', '2016-10-03', 'On Hold') +,(4288, 210, 45, '2016-10-15', '2016-12-14', 'Irene Anderson', '4 Rutledge Alley', null, 'Saparua', null, null, 'Indonesia', 4.35, 'Card', '2016-10-13', 'On Hold') +,(4289, 209, 61, '2017-02-12', '2016-07-15', 'Terry Bennett', '351 Johnson Circle', null, 'Quiling', null, '2902', 'Philippines', 6.77, 'Card', '2016-07-20', 'New') +,(4290, 203, 1 , '2017-03-02', '2016-08-25', 'Ronald Mccoy', '73609 Waywood Center', null, 'Zheleznodorozhnyy', null, '238411', 'Russia', 1.05, 'Cash', '2016-06-10', 'New') +,(4291, 211, 73, '2016-09-13', '2016-04-17', 'Andrew Matthews', '820 Lawn Crossing', null, 'Japeri', null, '26400-000', 'Brazil', 1.22, 'Cash', '2016-09-08', 'New') +,(4292, 215, 15, '2016-12-26', '2016-10-04', 'Melissa Chapman', '88384 Ohio Park', null, 'Dayr al Ghuşūn', null, null, 'India', 9.89, 'Check', '2016-08-14', 'Shipped') +,(4293, 210, 18, '2016-11-23', '2016-12-12', 'Russell Griffin', '6 Eliot Lane', null, 'Changshu City', null, null, 'China', 9.37, 'Check', '2016-05-10', 'On Hold') +,(4294, 206, 95, '2016-06-24', '2017-01-21', 'Jeffrey Gray', '04078 Hudson Drive', null, 'Luangwa', null, null, 'India', 2.58, 'Cash', '2016-06-15', 'Shipped') +,(4295, 215, 85, '2016-10-23', '2017-01-29', 'Lori Frazier', '724 Logan Drive', null, 'Gent', 'Vlaanderen', '9052', 'Denmark', 8.59, 'Cash', '2017-01-01', 'New') +,(4296, 217, 83, '2016-04-08', '2017-02-07', 'Joan Ortiz', '90 Merchant Avenue', null, 'Irasan', null, '3120', 'Philippines', 4.64, 'Card', '2016-09-01', 'Complete') +,(4297, 211, 29, '2016-07-13', '2017-02-06', 'John Stanley', '680 Artisan Pass', null, 'Borås', 'Västra Götaland', '504 75', 'Sweden', 1.77, 'Cash', '2016-07-12', 'On Hold') +,(4298, 208, 65, '2016-12-28', '2016-04-19', 'Dorothy Bell', '397 Kim Place', null, 'Zhongxin', null, null, 'China', 1.2, 'Check', '2017-01-28', 'On Hold') +,(4299, 201, 43, '2017-01-12', '2016-08-07', 'Doris Ramirez', '181 Prentice Terrace', null, 'Severnyy', null, '141707', 'Russia', 2.65, 'Card', '2016-08-13', 'Shipped') +,(4300, 207, 27, '2016-11-10', '2016-11-01', 'Elizabeth Harrison', '067 Talisman Trail', null, 'Guangang', null, null, 'China', 4.78, 'Check', '2016-04-30', 'On Hold') +,(4301, 206, 64, '2016-08-14', '2017-01-13', 'Judith Howard', '55095 Sloan Alley', null, 'Longhua', null, null, 'China', 1.93, 'Card', '2016-10-29', 'New') +,(4302, 213, 33, '2017-01-19', '2016-05-23', 'Julia Simpson', '87375 Londonderry Parkway', null, 'Fufang', null, null, 'China', 9.23, 'Card', '2016-11-15', 'Shipped') +,(4303, 220, 49, '2016-08-01', '2016-04-23', 'Elizabeth Bell', '60 Ridgeview Trail', null, 'Infantas', 'Braga', '4810-578', 'Portugal', 3.22, 'Check', '2017-02-01', 'Complete') +,(4304, 217, 56, '2016-09-07', '2016-08-13', 'Ernest Andrews', '231 Graceland Terrace', null, 'Pindamonhangaba', null, '12400-000', 'Brazil', 2.77, 'Card', '2016-04-04', 'On Hold') +,(4305, 219, 44, '2016-06-11', '2016-03-27', 'Jeffrey Lopez', '76434 Havey Court', null, 'Khvalovo', null, '187435', 'Russia', 8.84, 'Cash', '2016-04-14', 'Shipped') +,(4306, 212, 16, '2016-05-29', '2016-12-31', 'Ralph Weaver', '15 Armistice Alley', null, 'Odienné', null, null, 'Canada', 7.1, 'Card', '2017-01-09', 'Shipped') +,(4307, 210, 16, '2016-10-19', '2017-01-10', 'Mary Stevens', '1928 Aberg Park', null, 'Dzwola', null, '23-304', 'Poland', 4.04, 'Card', '2016-08-24', 'Complete') +,(4308, 220, 50, '2016-09-23', '2016-09-16', 'Douglas Welch', '9 Ryan Circle', null, 'Babakanloa', null, null, 'Indonesia', 1.11, 'Card', '2016-10-13', 'Shipped') +,(4309, 217, 99, '2016-10-17', '2017-01-01', 'Raymond Cruz', '0402 Burning Wood Alley', null, 'Bucay', null, '2805', 'Philippines', 9.27, 'Cash', '2016-06-02', 'Complete') +,(4310, 219, 65, '2016-04-14', '2016-05-14', 'Sara Frazier', '43 Truax Terrace', null, 'Halton', 'England', 'LS9', 'United Kingdom', 5.56, 'Check', '2016-12-04', 'New') +,(4311, 220, 17, '2017-02-03', '2016-07-09', 'Sarah Lane', '414 Gina Point', null, 'Fulong', null, null, 'China', 3.35, 'Cash', '2016-12-27', 'New') +,(4312, 205, 77, '2017-02-27', '2016-04-10', 'Michelle Bradley', '16664 Towne Point', null, 'Yangchun', null, null, 'China', 8.64, 'Cash', '2017-01-28', 'Complete') +,(4313, 210, 68, '2016-08-29', '2016-10-27', 'Marie Porter', '7802 Hovde Plaza', null, 'Redakodi', null, null, 'Indonesia', 1.97, 'Cash', '2016-11-08', 'Complete') +,(4314, 207, 41, '2016-08-08', '2016-08-31', 'Melissa Moore', '438 Mendota Way', null, 'Bensonville', null, null, 'United Kingdom', 7.97, 'Cash', '2017-01-17', 'New') +,(4315, 212, 96, '2016-08-08', '2016-07-27', 'Katherine Bell', '76 Manley Park', null, 'Xagmakajor', null, null, 'China', 7.49, 'Cash', '2016-03-29', 'New') +,(4316, 209, 67, '2016-09-26', '2017-02-03', 'Katherine Elliott', '86 Nelson Point', null, 'Boavista', 'Aveiro', '4520-104', 'Portugal', 1.92, 'Card', '2016-04-28', 'Complete') +,(4317, 219, 40, '2016-10-09', '2016-12-21', 'Dorothy Rose', '75962 Basil Drive', null, 'Pécs', 'Baranya', '7610', 'Denmark', 3.23, 'Card', '2017-02-21', 'Shipped') +,(4318, 209, 68, '2017-01-15', '2017-01-03', 'Larry Hicks', '5985 Crest Line Road', null, 'Lingqiao', null, null, 'China', 2.77, 'Check', '2017-01-20', 'Complete') +,(4319, 214, 55, '2016-07-14', '2017-03-05', 'Paula Rodriguez', '6 Lawn Court', null, 'Simajia', null, null, 'China', 6.33, 'Check', '2016-04-08', 'Shipped') +,(4320, 203, 83, '2016-12-26', '2016-10-07', 'Sharon Richards', '43297 Rigney Avenue', null, 'Salto', null, null, 'India', 7.32, 'Check', '2016-09-14', 'Complete') +,(4321, 215, 29, '2016-12-27', '2016-07-21', 'Craig Day', '22 Thierer Center', null, 'Alberton', 'Prince Edward Island', 'P7K', 'Canada', 5.32, 'Check', '2016-04-02', 'On Hold') +,(4322, 207, 80, '2016-12-06', '2016-05-21', 'Donna Butler', '4149 Bartelt Point', null, 'Carbonear', 'Newfoundland and Labrador', 'A1Y', 'Canada', 3.1, 'Check', '2016-10-03', 'New') +,(4323, 216, 31, '2016-06-27', '2017-03-13', 'Carolyn Ferguson', '97225 Bartelt Avenue', null, 'Tinalmud', null, '1531', 'Philippines', 7.11, 'Cash', '2016-05-22', 'Complete') +,(4324, 212, 78, '2016-05-19', '2016-11-14', 'Peter Romero', '22977 Westridge Terrace', null, 'Toulouse', 'Midi-Pyrénées', '31029 CEDEX 4', 'France', 2.97, 'Check', '2016-09-09', 'Shipped') +,(4325, 213, 73, '2017-02-18', '2016-09-22', 'Jose Greene', '40351 Rusk Place', null, 'Vila Nova de Gaia', 'Porto', '4400-005', 'Portugal', 5.76, 'Cash', '2016-12-12', 'Shipped') +,(4326, 208, 62, '2017-02-14', '2016-11-13', 'Betty Anderson', '8403 Melody Center', null, 'Būsh', null, null, 'Germany', 9.56, 'Check', '2016-10-08', 'Shipped') +,(4327, 220, 56, '2016-09-06', '2016-08-17', 'Amanda Frazier', '47 Dapin Center', null, 'Pasirmanggu', null, null, 'Indonesia', 2.25, 'Card', '2016-07-11', 'On Hold') +,(4328, 201, 24, '2016-10-29', '2017-01-25', 'Douglas Foster', '6953 Stoughton Avenue', null, 'Bokhan', null, '669310', 'Russia', 1.26, 'Card', '2016-07-06', 'Complete') +,(4329, 206, 33, '2017-03-09', '2017-03-12', 'Louis Brown', '76 Little Fleur Park', null, 'Shazhenxi', null, null, 'China', 3.4, 'Check', '2016-08-09', 'Complete') +,(4330, 205, 61, '2016-04-14', '2016-09-26', 'Elizabeth Butler', '82 Springview Road', null, 'Kimito', null, '11710', 'Finland', 1.92, 'Card', '2016-10-18', 'Shipped') +,(4331, 220, 39, '2016-06-10', '2016-04-07', 'Albert Flores', '19 Talmadge Hill', null, 'Almelo', 'Provincie Overijssel', '7604', 'Netherlands', 4.23, 'Check', '2016-12-15', 'Shipped') +,(4332, 217, 47, '2016-10-25', '2016-09-28', 'Kimberly Fowler', '0 Trailsway Crossing', null, 'Iwata', null, '925-0145', 'Japan', 8.14, 'Check', '2016-06-06', 'On Hold') +,(4333, 209, 12, '2016-12-25', '2016-10-31', 'Joe Powell', '5 Everett Drive', null, 'Bergen', 'Hordaland', '5895', 'Greece', 8.02, 'Cash', '2016-09-05', 'Shipped') +,(4334, 219, 1 , '2016-08-12', '2017-02-18', 'Virginia Collins', '78693 Cordelia Point', null, 'San Benito', null, '8423', 'Philippines', 8.4, 'Cash', '2017-01-06', 'Complete') +,(4335, 220, 59, '2017-02-26', '2016-11-05', 'Mary Howard', '5 Golf View Street', null, 'Gjinkar', null, null, 'Canada', 3.54, 'Card', '2016-06-09', 'Complete') +,(4336, 220, 19, '2017-02-09', '2017-01-26', 'Ronald Stevens', '57 Old Shore Crossing', null, 'Bureng', null, null, 'United Kingdom', 8.21, 'Card', '2016-12-21', 'On Hold') +,(4337, 204, 59, '2016-05-14', '2016-07-08', 'James Evans', '44078 Warner Drive', null, 'Amurzet', null, '679230', 'Russia', 9.35, 'Card', '2016-07-22', 'Complete') +,(4338, 213, 96, '2016-09-02', '2016-11-10', 'Willie Snyder', '361 Stone Corner Pass', null, 'Sindangsari', null, null, 'Indonesia', 9.32, 'Check', '2016-04-10', 'Complete') +,(4339, 220, 30, '2017-03-04', '2016-08-16', 'Julie Black', '2922 Grasskamp Alley', null, 'Cotonou', null, null, 'India', 9.14, 'Cash', '2017-03-07', 'Shipped') +,(4340, 206, 17, '2016-11-18', '2016-11-24', 'Roy Olson', '4 Shopko Hill', null, 'Binagadi', null, null, 'India', 5.22, 'Check', '2016-10-14', 'Shipped') +,(4341, 202, 28, '2016-11-18', '2017-02-18', 'Evelyn Lawrence', '90 Crownhardt Center', null, 'Bayshint', null, null, 'Japan', 7.25, 'Check', '2016-12-16', 'On Hold') +,(4342, 209, 37, '2016-10-30', '2016-06-07', 'John Rodriguez', '69 Golf View Avenue', null, 'Hezuoqiao', null, null, 'China', 8.23, 'Cash', '2016-11-05', 'On Hold') +,(4343, 203, 51, '2016-04-09', '2016-12-17', 'Ruth Kim', '0027 Dunning Pass', null, 'Kuteynykove', null, null, 'Ukraine', 2.46, 'Cash', '2016-03-28', 'New') +,(4344, 217, 34, '2016-12-16', '2016-10-11', 'Shawn Patterson', '36 Little Fleur Circle', null, 'Xiekou', null, null, 'China', 6.43, 'Cash', '2016-03-27', 'New') +,(4345, 213, 59, '2016-10-30', '2016-07-10', 'Nancy Jones', '47088 Crowley Junction', null, 'Promna', null, '26-803', 'Poland', 5.67, 'Cash', '2016-12-02', 'Complete') +,(4346, 217, 70, '2016-12-27', '2016-10-06', 'Deborah Bishop', '1 Summer Ridge Circle', null, 'Bunobogu', null, null, 'Indonesia', 7.57, 'Cash', '2016-09-19', 'New') +,(4347, 203, 30, '2016-05-26', '2016-08-14', 'Steve Hunt', '4393 Summer Ridge Crossing', null, 'Hošťka', null, '348 06', 'Czech Republic', 5.78, 'Cash', '2016-12-30', 'Shipped') +,(4348, 203, 9 , '2016-04-14', '2016-10-19', 'Betty Black', '23 Nova Junction', null, 'Sępólno Krajeńskie', null, '89-400', 'Poland', 8.55, 'Cash', '2016-09-23', 'New') +,(4349, 211, 95, '2017-01-28', '2016-04-13', 'Gregory Wood', '96 Grasskamp Point', null, 'Psará', null, null, 'Greece', 8.47, 'Cash', '2016-12-18', 'Shipped') +,(4350, 218, 97, '2016-03-22', '2016-04-13', 'Martin Martinez', '5 Towne Crossing', null, 'Kista', 'Stockholm', '164 45', 'Sweden', 8.07, 'Check', '2016-05-15', 'On Hold') +,(4351, 215, 80, '2016-06-20', '2016-11-05', 'Margaret Cook', '82 Eggendart Junction', null, 'Omuthiya', null, null, 'India', 9.71, 'Cash', '2016-09-18', 'Shipped') +,(4352, 211, 15, '2016-09-02', '2017-01-23', 'Justin Myers', '6734 Continental Drive', null, 'Tadabliro', null, null, 'Indonesia', 2.23, 'Cash', '2016-05-12', 'New') +,(4353, 216, 77, '2016-10-09', '2016-07-31', 'Jane Ruiz', '2743 Harbort Center', null, 'Pasar', null, null, 'Indonesia', 4.88, 'Cash', '2016-06-04', 'New') +,(4354, 202, 53, '2017-03-15', '2016-06-21', 'Philip Bradley', '6 Bartillon Park', null, 'Aimorés', null, '35200-000', 'Brazil', 5.01, 'Cash', '2016-05-16', 'New') +,(4355, 220, 14, '2017-01-03', '2016-05-07', 'Phillip White', '1 Schurz Crossing', null, 'Tuzhai', null, null, 'China', 7.06, 'Check', '2016-10-18', 'New') +,(4356, 208, 85, '2016-12-26', '2016-07-28', 'George Ryan', '92 Morrow Road', null, 'Nijmegen', 'Provincie Gelderland', '6519', 'Netherlands', 5.76, 'Cash', '2016-12-14', 'New') +,(4357, 208, 73, '2016-04-06', '2016-04-01', 'Evelyn Rose', '134 Milwaukee Lane', null, 'Tiechang', null, null, 'China', 5.37, 'Cash', '2016-12-19', 'Shipped') +,(4358, 202, 77, '2016-04-14', '2016-10-21', 'Janet Robertson', '09309 Dottie Park', null, 'Ljubešćica', null, '42222', 'Canada', 5.27, 'Cash', '2016-06-07', 'On Hold') +,(4359, 202, 35, '2016-05-08', '2017-01-27', 'Diana Perry', '95535 Lotheville Center', null, 'Kvasice', null, '768 21', 'Czech Republic', 7.1, 'Card', '2016-07-27', 'New') +,(4360, 210, 86, '2016-11-23', '2016-10-12', 'Todd Elliott', '6737 Melrose Road', null, 'Catumbela', null, null, 'Netherlands', 2.19, 'Check', '2016-04-05', 'Shipped') +,(4361, 209, 45, '2016-04-07', '2016-06-30', 'Emily Dean', '143 Ridge Oak Alley', null, 'Diriá', null, null, 'United Kingdom', 1.33, 'Cash', '2016-12-31', 'Complete') +,(4362, 208, 88, '2016-05-08', '2016-04-14', 'Eric Simpson', '8113 Graceland Junction', null, 'Borovoy', null, '309135', 'Russia', 3.81, 'Card', '2016-06-21', 'Shipped') +,(4363, 211, 84, '2016-12-31', '2016-06-05', 'Alan Chapman', '461 Westport Center', null, 'Inayauan', null, '3336', 'Philippines', 8.62, 'Card', '2017-03-03', 'Complete') +,(4364, 205, 100,'2016-09-10', '2017-02-19', 'Denise Dixon', '066 Gerald Avenue', null, 'Venëv', null, '301320', 'Russia', 4.82, 'Check', '2016-04-22', 'Shipped') +,(4365, 211, 7 , '2017-03-09', '2017-03-16', 'Douglas Nelson', '03051 Grasskamp Way', null, 'Póvoa', 'Vila Real', '4870-130', 'Portugal', 1.67, 'Check', '2016-08-30', 'Complete') +,(4366, 213, 24, '2016-04-25', '2016-06-06', 'Louis Frazier', '65 Buhler Circle', null, 'Bīleh Savār', null, null, 'Iran', 9.53, 'Check', '2016-12-20', 'Complete') +,(4367, 207, 8 , '2016-09-24', '2016-04-06', 'Theresa Stanley', '487 Birchwood Point', null, 'T’et’ri Tsqaro', null, null, 'United Kingdom', 5.06, 'Cash', '2016-04-08', 'New') +,(4368, 207, 76, '2016-12-21', '2016-05-03', 'Sean Chapman', '3917 Miller Pass', null, 'Andaray', null, null, 'Peru', 4.36, 'Check', '2016-07-25', 'New') +,(4369, 215, 90, '2016-03-30', '2017-01-03', 'Eugene Brooks', '137 1st Hill', null, 'Independencia', 'Tamaulipas', '89888', 'Mexico', 9.56, 'Check', '2017-01-23', 'Shipped') +,(4370, 204, 33, '2016-12-17', '2016-10-22', 'Joan Martin', '24 Hayes Point', null, 'Dobrzeń Wielki', null, '46-081', 'Poland', 8.87, 'Cash', '2016-07-09', 'Shipped') +,(4371, 204, 13, '2016-12-11', '2016-05-07', 'Martha Mendoza', '0 Sommers Point', null, 'Jiamachi', null, null, 'China', 1.53, 'Check', '2016-08-05', 'On Hold') +,(4372, 211, 90, '2016-10-27', '2017-02-14', 'Joan Allen', '64 Bluestem Drive', null, 'Conde', 'Braga', '4815-019', 'Portugal', 2.66, 'Card', '2016-09-25', 'Shipped') +,(4373, 208, 81, '2016-08-20', '2017-03-16', 'Tammy Richards', '15541 Ramsey Alley', null, 'Gunungkendeng', null, null, 'Indonesia', 5.66, 'Cash', '2016-05-03', 'Shipped') +,(4374, 216, 19, '2017-01-22', '2016-09-10', 'Andrea Medina', '3 Goodland Pass', null, 'Ḩarīb', null, null, 'South Africa', 1.03, 'Card', '2016-10-12', 'Shipped') +,(4375, 213, 8 , '2016-09-13', '2016-12-21', 'Antonio Carpenter', '453 Duke Point', null, 'Rouen', 'Haute-Normandie', '76029 CEDEX', 'France', 5.11, 'Cash', '2017-01-26', 'Complete') +,(4376, 207, 83, '2016-11-29', '2016-04-13', 'Jeffrey Smith', '7 Old Shore Center', null, 'Licuan', null, '2500', 'Philippines', 8.55, 'Cash', '2016-11-08', 'New') +,(4377, 216, 13, '2016-11-06', '2016-10-08', 'Mark Perkins', '57 Troy Court', null, 'Mojimán', null, null, 'Canada', 2.03, 'Card', '2017-01-06', 'Shipped') +,(4378, 219, 4 , '2016-08-05', '2017-03-04', 'Louis Jordan', '5 Armistice Street', null, 'Labège', 'Midi-Pyrénées', '31673 CEDEX', 'France', 3.61, 'Cash', '2016-12-07', 'New') +,(4379, 218, 66, '2017-02-26', '2016-11-18', 'Fred Johnson', '4 Dovetail Crossing', null, 'Santa Cruz', null, null, 'India', 1.08, 'Cash', '2016-04-02', 'Complete') +,(4380, 201, 27, '2016-09-01', '2016-05-08', 'Rose Harvey', '8 Canary Plaza', null, 'Pingtan', null, null, 'China', 6.9, 'Check', '2016-12-09', 'Complete') +,(4381, 209, 89, '2017-02-04', '2016-08-30', 'Christine Thomas', '008 Carberry Alley', null, 'Logung', null, null, 'Indonesia', 6.13, 'Card', '2016-05-09', 'On Hold') +,(4382, 204, 47, '2016-08-11', '2016-12-27', 'Juan Reed', '4337 Del Sol Hill', null, 'Dayeuhluhur', null, null, 'Indonesia', 7.76, 'Card', '2016-06-15', 'New') +,(4383, 215, 30, '2016-08-07', '2016-07-22', 'Diane Gray', '899 Oneill Pass', null, 'Alegrete', null, '97540-000', 'Brazil', 5.62, 'Cash', '2016-12-26', 'Complete') +,(4384, 212, 88, '2016-07-23', '2016-05-07', 'Louise Baker', '46092 Kedzie Court', null, 'Ban Mo', null, '18130', 'Thailand', 4.0, 'Card', '2016-07-11', 'Complete') +,(4385, 203, 62, '2017-02-20', '2016-10-01', 'Paul Thompson', '77444 Northwestern Pass', null, 'Francisco I Madero', 'Coahuila De Zaragoza', '26010', 'Mexico', 3.99, 'Check', '2016-12-23', 'Shipped') +,(4386, 218, 26, '2016-09-02', '2016-06-10', 'Anne Kim', '67814 Buena Vista Court', null, 'Sanjie', null, null, 'China', 9.61, 'Card', '2016-04-05', 'New') +,(4387, 219, 20, '2017-03-05', '2016-12-19', 'Matthew Gutierrez', '33055 Evergreen Crossing', null, 'Cusco', null, null, 'Peru', 6.52, 'Check', '2017-02-17', 'Shipped') +,(4388, 219, 71, '2016-09-06', '2016-05-24', 'Janet Hernandez', '9243 Forest Run Parkway', null, 'Ulanov', null, null, 'Ukraine', 3.04, 'Cash', '2016-09-20', 'New') +,(4389, 207, 2 , '2016-04-25', '2017-02-16', 'Louis Chapman', '878 Roth Alley', null, 'Kusak', null, '423430', 'Russia', 5.78, 'Cash', '2017-02-18', 'On Hold') +,(4390, 218, 64, '2016-09-25', '2016-09-22', 'Joe Carpenter', '56 Artisan Park', null, 'Xinjiang', null, null, 'China', 8.2, 'Card', '2016-12-01', 'On Hold') +,(4391, 218, 64, '2016-07-30', '2016-07-23', 'Charles Harper', '7 Sutherland Road', null, 'Tatarbunary', null, null, 'Ukraine', 4.62, 'Cash', '2016-06-29', 'Shipped') +,(4392, 206, 92, '2016-05-05', '2016-07-17', 'Craig Reynolds', '3 Erie Park', null, 'East End', null, null, 'Canada', 2.03, 'Check', '2017-02-03', 'New') +,(4393, 212, 45, '2016-06-29', '2016-06-17', 'Raymond Mcdonald', '792 Brown Trail', null, 'Yangfang', null, null, 'China', 4.44, 'Card', '2017-02-27', 'Complete') +,(4394, 211, 87, '2016-09-28', '2016-04-03', 'Sandra Medina', '7 Eagan Circle', null, 'Baratleke', null, null, 'Indonesia', 4.34, 'Cash', '2017-01-05', 'Complete') +,(4395, 203, 57, '2016-08-18', '2017-03-05', 'Sean Carpenter', '33 Dottie Park', null, 'Sokal’', null, null, 'Ukraine', 5.39, 'Cash', '2017-02-22', 'On Hold') +,(4396, 203, 87, '2016-06-19', '2016-07-10', 'Alice Ferguson', '0399 Dixon Hill', null, 'Privolzhskiy', null, '413138', 'Russia', 8.74, 'Cash', '2016-12-23', 'New') +,(4397, 216, 61, '2016-08-01', '2016-12-25', 'Diana Nguyen', '5052 Rigney Junction', null, 'Guaynabo', 'Pr', '00971', 'Germany', 5.36, 'Check', '2016-07-12', 'On Hold') +,(4398, 211, 52, '2016-12-04', '2016-05-11', 'Earl Gutierrez', '32 Summit Avenue', null, 'Maqbanah', null, null, 'South Africa', 5.82, 'Cash', '2016-07-21', 'New') +,(4399, 208, 71, '2016-05-16', '2017-02-25', 'Gloria Gordon', '5 Prentice Trail', null, 'Xichang', null, null, 'China', 3.2, 'Card', '2016-05-24', 'Complete') +,(4400, 218, 7 , '2016-09-06', '2016-03-21', 'Robert Wheeler', '83 Logan Circle', null, 'Zhongshan', null, null, 'China', 9.15, 'Cash', '2016-08-16', 'Shipped') +,(4401, 210, 53, '2016-09-05', '2016-05-01', 'Walter Williamson', '8459 American Plaza', null, 'Santo Rosario', null, '3114', 'Philippines', 7.71, 'Check', '2017-01-25', 'New') +,(4402, 216, 92, '2016-10-10', '2016-03-28', 'Jonathan James', '164 Bonner Hill', null, 'Vale de Mendiz', 'Vila Real', '5085-105', 'Portugal', 2.96, 'Card', '2016-07-15', 'Shipped') +,(4403, 212, 12, '2016-09-15', '2016-11-11', 'Judy Williams', '207 Scofield Place', null, 'Lawa-an', null, '5706', 'Philippines', 9.68, 'Check', '2016-04-30', 'On Hold') +,(4404, 213, 83, '2016-04-25', '2016-05-14', 'Amy Olson', '84189 Schurz Circle', null, 'Ogoja', null, null, 'Netherlands', 5.18, 'Card', '2016-11-02', 'Complete') +,(4405, 209, 7 , '2016-12-01', '2016-08-30', 'Donna Vasquez', '82460 Ridgeway Hill', null, 'La Guacamaya', null, null, 'Canada', 5.32, 'Card', '2017-02-11', 'Complete') +,(4406, 209, 66, '2016-09-14', '2016-05-13', 'Susan Jacobs', '17 Morningstar Lane', null, 'Chedao', null, null, 'China', 4.12, 'Cash', '2016-11-11', 'New') +,(4407, 214, 57, '2016-05-04', '2016-06-03', 'Kathryn Burns', '116 Hollow Ridge Park', null, 'Comagascas', null, '1950', 'Philippines', 1.05, 'Cash', '2017-01-28', 'New') +,(4408, 201, 64, '2017-02-11', '2016-06-08', 'Doris Bennett', '090 Lien Place', null, 'Luotang', null, null, 'China', 1.35, 'Cash', '2016-12-16', 'Complete') +,(4409, 209, 41, '2017-02-28', '2016-09-05', 'Cynthia Robertson', '6 Eliot Center', null, 'Abu Dhabi', null, null, 'Denmark', 4.21, 'Check', '2017-01-01', 'New') +,(4410, 215, 24, '2016-08-28', '2016-10-30', 'Jonathan Parker', '0 Weeping Birch Hill', null, 'Cienfuegos', null, null, 'Denmark', 1.69, 'Card', '2017-01-21', 'Shipped') +,(4411, 206, 10, '2016-08-30', '2016-12-06', 'Bobby Foster', '8279 Ridgeview Place', null, 'Cruz Alta', null, '98000-000', 'Brazil', 7.5, 'Cash', '2016-09-09', 'On Hold') +,(4412, 205, 65, '2016-12-13', '2017-02-27', 'Phyllis Moore', '806 Acker Drive', null, 'Paoay', null, '2902', 'Philippines', 4.63, 'Cash', '2017-01-11', 'Shipped') +,(4413, 211, 2 , '2016-12-05', '2016-12-07', 'Kevin Gordon', '00875 Sherman Lane', null, 'Wansheng', null, null, 'China', 2.7, 'Card', '2016-07-31', 'New') +,(4414, 219, 25, '2017-02-08', '2016-06-22', 'Jack Mccoy', '2 Killdeer Center', null, 'Gresik', null, null, 'Indonesia', 4.1, 'Check', '2017-03-05', 'On Hold') +,(4415, 220, 9 , '2017-01-02', '2016-08-28', 'Margaret Fuller', '1960 Parkside Hill', null, 'Kafr Zaytā', null, null, 'India', 1.09, 'Cash', '2016-08-07', 'New') +,(4416, 214, 100,'2017-01-07', '2017-02-07', 'Melissa Nichols', '6 Lakewood Gardens Avenue', null, 'Stockholm', 'Stockholm', '113 90', 'Sweden', 4.1, 'Cash', '2016-03-31', 'On Hold') +,(4417, 210, 87, '2017-01-23', '2016-12-14', 'William Webb', '84 Mifflin Junction', null, 'Kanungu', null, null, 'South Africa', 4.38, 'Card', '2016-05-05', 'Complete') +,(4418, 213, 29, '2017-01-05', '2017-02-07', 'Anne Gonzales', '7 Myrtle Plaza', null, 'Davila', null, '2012', 'Philippines', 5.45, 'Cash', '2016-05-23', 'Shipped') +,(4419, 212, 94, '2016-10-19', '2016-12-20', 'Kathleen Graham', '22 Forest Run Hill', null, 'Mollepampa', null, null, 'Peru', 5.86, 'Check', '2016-07-31', 'Shipped') +,(4420, 201, 32, '2016-11-29', '2016-09-24', 'Diana Sanders', '8925 Kennedy Parkway', null, 'San Miguel de Tucumán', null, '4137', 'Argentina', 3.71, 'Cash', '2016-08-10', 'Complete') +,(4421, 208, 58, '2017-03-02', '2016-04-03', 'Willie Wright', '60 Old Shore Alley', null, 'Jinjiang', null, null, 'China', 6.72, 'Card', '2016-10-09', 'Shipped') +,(4422, 206, 59, '2016-04-19', '2016-12-29', 'Frank Evans', '785 Little Fleur Center', null, 'El Triunfo', null, null, 'Argentina', 9.43, 'Check', '2016-05-13', 'New') +,(4423, 209, 68, '2016-08-22', '2016-11-20', 'Phillip Carter', '6398 John Wall Center', null, 'Shouxihu', null, null, 'China', 4.22, 'Check', '2016-10-18', 'New') +,(4424, 205, 31, '2016-10-05', '2016-10-09', 'Lillian Gomez', '17560 Melrose Point', null, 'Milwaukee', 'Wisconsin', '53205', 'United States', 1.16, 'Check', '2016-04-17', 'On Hold') +,(4425, 202, 7 , '2016-07-24', '2017-02-22', 'John Ortiz', '45 Vera Place', null, 'Kiel', 'Schleswig-Holstein', '24109', 'Germany', 5.86, 'Cash', '2016-10-13', 'On Hold') +,(4426, 214, 80, '2016-10-04', '2016-09-01', 'Brandon Fields', '94792 Jackson Hill', null, 'San Juan', 'Pr', '00918', 'Germany', 2.54, 'Check', '2016-12-19', 'On Hold') +,(4427, 209, 23, '2016-06-23', '2016-04-29', 'Willie Hart', '20 Sloan Terrace', null, 'Mount Darwin', null, null, 'India', 3.71, 'Cash', '2016-09-22', 'Complete') +,(4428, 211, 7 , '2016-09-07', '2016-10-28', 'Walter Montgomery', '67285 Crowley Road', null, 'Wailolong', null, null, 'Indonesia', 9.79, 'Check', '2016-04-05', 'Complete') +,(4429, 217, 10, '2017-03-02', '2016-11-27', 'Sara Williamson', '72 Monterey Circle', null, 'Salvacion', null, '1114', 'Philippines', 3.33, 'Card', '2016-05-18', 'On Hold') +,(4430, 210, 12, '2017-02-18', '2016-03-17', 'Wayne Sanders', '21302 Valley Edge Pass', null, 'Balakasap', null, null, 'Indonesia', 2.18, 'Card', '2016-06-02', 'New') +,(4431, 220, 80, '2016-10-01', '2016-09-28', 'Cynthia Allen', '1 Karstens Avenue', null, 'Santo António das Areias', 'Portalegre', '7330-254', 'Portugal', 3.4, 'Cash', '2016-08-21', 'New') +,(4432, 211, 95, '2017-02-04', '2016-03-17', 'Jonathan Hughes', '93993 Fairview Junction', null, 'Buje', null, '52460', 'Canada', 5.19, 'Cash', '2016-10-01', 'New') +,(4433, 208, 67, '2017-02-11', '2016-06-01', 'Gerald Wright', '77811 Dennis Point', null, 'Hohoe', null, null, 'United Kingdom', 3.25, 'Card', '2016-07-15', 'New') +,(4434, 201, 53, '2016-12-25', '2017-01-07', 'Roy Anderson', '182 High Crossing Terrace', null, 'Bajiazi', null, null, 'China', 8.8, 'Card', '2017-02-11', 'Shipped') +,(4435, 207, 3 , '2016-05-30', '2016-04-07', 'Brenda Wright', '98 Kim Drive', null, 'Lillehammer', 'Oppland', '2605', 'Greece', 5.76, 'Cash', '2017-02-02', 'On Hold') +,(4436, 204, 29, '2016-07-19', '2016-07-05', 'Philip Price', '16 Brown Plaza', null, 'Čapljina', null, null, 'India', 9.62, 'Cash', '2016-11-05', 'On Hold') +,(4437, 210, 80, '2016-10-13', '2016-04-24', 'Michelle Webb', '4160 Everett Point', null, 'Waepana', null, null, 'Indonesia', 9.54, 'Cash', '2016-07-11', 'Complete') +,(4438, 209, 6 , '2016-12-31', '2017-01-27', 'Heather Fields', '10 Fairview Center', null, 'Złotniki Kujawskie', null, '88-180', 'Poland', 1.81, 'Cash', '2017-03-15', 'Shipped') +,(4439, 216, 53, '2017-02-01', '2016-09-12', 'Ryan Long', '0 Gateway Avenue', null, 'Pizhanka', null, '613380', 'Russia', 9.34, 'Cash', '2016-07-02', 'New') +,(4440, 211, 25, '2017-02-03', '2016-10-13', 'Joyce Stewart', '61 Burrows Street', null, 'Kushelevka', null, '658381', 'Russia', 6.4, 'Cash', '2017-01-29', 'On Hold') +,(4441, 215, 93, '2016-03-21', '2016-11-17', 'Walter Arnold', '97613 Pond Avenue', null, 'Looc', null, '5507', 'Philippines', 1.09, 'Cash', '2016-10-05', 'Shipped') +,(4442, 214, 10, '2016-05-10', '2016-05-31', 'Irene Simmons', '36 Larry Court', null, 'Rozhdestveno', null, '399768', 'Russia', 4.82, 'Check', '2017-01-13', 'Complete') +,(4443, 208, 19, '2017-02-09', '2017-02-05', 'Christina Mccoy', '1482 Rockefeller Point', null, 'Rybatskoye', null, '196851', 'Russia', 1.62, 'Cash', '2016-09-14', 'Shipped') +,(4444, 210, 98, '2017-02-15', '2016-05-17', 'Marie Fowler', '04 Prairie Rose Junction', null, 'Chicago', 'Illinois', '60604', 'United States', 7.47, 'Card', '2017-02-22', 'Complete') +,(4445, 218, 32, '2017-02-12', '2016-05-20', 'Louise Bell', '3 Charing Cross Pass', null, 'Selce', null, '1219', 'Denmark', 4.47, 'Cash', '2016-04-01', 'New') +,(4446, 209, 25, '2016-09-22', '2016-12-03', 'Barbara Black', '697 Oneill Drive', null, 'Shanghang', null, null, 'China', 4.66, 'Check', '2016-11-09', 'On Hold') +,(4447, 209, 100,'2016-08-26', '2017-01-16', 'James Holmes', '77 Marcy Court', null, 'Estreito', null, '65975-000', 'Brazil', 9.85, 'Check', '2016-12-04', 'On Hold') +,(4448, 210, 72, '2016-06-25', '2016-12-07', 'Kenneth Williams', '6400 Milwaukee Hill', null, 'Wanshan', null, null, 'China', 3.66, 'Card', '2016-06-09', 'On Hold') +,(4449, 213, 16, '2016-12-13', '2016-08-07', 'Joshua Jacobs', '8 Judy Park', null, 'Ágios Andréas', null, null, 'Greece', 3.81, 'Cash', '2016-07-07', 'Complete') +,(4450, 216, 100,'2016-12-21', '2017-02-13', 'Aaron Sanders', '1 Dakota Court', null, 'Huayllo', null, null, 'Peru', 7.59, 'Cash', '2016-04-22', 'On Hold') +,(4451, 211, 50, '2016-08-22', '2016-06-05', 'Eugene Scott', '03 Golden Leaf Point', null, 'Stírion', null, null, 'Greece', 8.99, 'Card', '2017-02-25', 'New') +,(4452, 220, 86, '2016-05-07', '2016-07-20', 'Cynthia Phillips', '820 Merchant Way', null, 'Mrongi Daja', null, null, 'Indonesia', 2.21, 'Check', '2016-04-27', 'On Hold') +,(4453, 213, 58, '2016-10-30', '2016-03-22', 'Martin Reed', '14 Meadow Vale Alley', null, 'Jiangdong', null, null, 'China', 3.58, 'Cash', '2017-02-12', 'Complete') +,(4454, 206, 98, '2016-05-14', '2016-11-07', 'Janet Porter', '74391 Ronald Regan Park', null, 'Lamakera Dua', null, null, 'Indonesia', 9.86, 'Check', '2016-06-12', 'New') +,(4455, 204, 2 , '2016-03-28', '2016-04-11', 'Amanda Duncan', '047 Jenna Road', null, 'Tungawan', null, '7018', 'Philippines', 2.04, 'Card', '2016-07-09', 'New') +,(4456, 211, 58, '2016-08-05', '2016-11-19', 'Joseph Henderson', '14 Morningstar Pass', null, 'Kolobolon', null, null, 'Indonesia', 6.44, 'Check', '2016-05-24', 'New') +,(4457, 215, 21, '2017-02-15', '2016-06-11', 'Cynthia Bishop', '066 Surrey Pass', null, 'Hưng Yên', null, null, 'Vietnam', 1.61, 'Check', '2016-07-05', 'Shipped') +,(4458, 211, 10, '2016-08-08', '2016-08-06', 'Craig Andrews', '7 Mariners Cove Court', null, 'Tuanchengshan', null, null, 'China', 8.4, 'Cash', '2016-12-15', 'New') +,(4459, 211, 71, '2016-05-13', '2017-02-19', 'Steve Warren', '6702 Delladonna Point', null, 'Pražmo', null, '739 04', 'Czech Republic', 8.29, 'Card', '2016-06-29', 'New') +,(4460, 214, 5 , '2016-12-21', '2016-06-21', 'Brenda Mills', '77934 Prairieview Way', null, 'Huafeng', null, null, 'China', 6.76, 'Cash', '2016-07-08', 'New') +,(4461, 212, 34, '2016-04-27', '2016-07-22', 'Randy Wright', '9 Thackeray Way', null, 'Dvůr Králové nad Labem', null, '544 01', 'Czech Republic', 9.45, 'Card', '2016-03-20', 'Shipped') +,(4462, 202, 47, '2016-10-31', '2016-06-30', 'Michelle Ramirez', '0152 Old Shore Road', null, 'Pulaupinang', null, null, 'Indonesia', 2.42, 'Card', '2016-09-05', 'New') +,(4463, 209, 86, '2016-07-30', '2016-04-29', 'Frank Duncan', '67 Buell Terrace', null, 'Krasne', null, null, 'Ukraine', 2.71, 'Card', '2016-06-22', 'Complete') +,(4464, 204, 62, '2017-03-01', '2017-03-11', 'Carlos Warren', '978 Merrick Circle', null, 'Penghua', null, null, 'China', 7.29, 'Cash', '2016-03-22', 'Shipped') +,(4465, 202, 87, '2016-06-23', '2016-11-15', 'Tina Gardner', '0 Mcguire Terrace', null, 'Cangqian', null, null, 'China', 2.17, 'Card', '2016-06-01', 'New') +,(4466, 220, 31, '2016-06-04', '2016-06-08', 'Stephen Turner', '17 Leroy Plaza', null, 'Pedaringan', null, null, 'Indonesia', 8.89, 'Check', '2016-05-09', 'Shipped') +,(4467, 210, 35, '2016-05-21', '2016-09-26', 'Melissa Wilson', '61199 Forest Center', null, 'Krmelín', null, '739 24', 'Czech Republic', 2.35, 'Card', '2016-06-20', 'On Hold') +,(4468, 216, 50, '2016-09-10', '2016-12-02', 'Billy Harper', '8940 Fisk Parkway', null, 'San Jose', 'California', '95113', 'United States', 3.98, 'Cash', '2016-10-04', 'Complete') +,(4469, 207, 22, '2016-06-03', '2016-11-06', 'Carl Davis', '5 Lindbergh Street', null, 'Taling Chan', null, '10170', 'Thailand', 4.71, 'Card', '2017-02-03', 'New') +,(4470, 211, 64, '2016-06-16', '2016-05-26', 'Gerald Henry', '2221 Porter Crossing', null, 'Mozdok', null, '363759', 'Russia', 9.57, 'Cash', '2016-10-11', 'Shipped') +,(4471, 206, 25, '2016-07-27', '2016-08-24', 'Debra Garza', '65379 Sunnyside Trail', null, 'Jiadingzhen', null, null, 'China', 1.06, 'Check', '2016-06-23', 'On Hold') +,(4472, 204, 18, '2016-08-30', '2016-10-09', 'Margaret Rodriguez', '3202 Marquette Point', null, 'Oranzherei', null, '416368', 'Russia', 3.35, 'Check', '2016-06-18', 'On Hold') +,(4473, 212, 88, '2016-10-29', '2016-05-25', 'William Burke', '46 Kingsford Center', null, 'San Juan', null, '11301', 'Denmark', 3.85, 'Check', '2017-02-12', 'Shipped') +,(4474, 217, 9 , '2017-02-19', '2016-05-29', 'Larry Myers', '731 Packers Point', null, 'Trelleborg', 'Skåne', '231 68', 'Sweden', 4.46, 'Card', '2016-06-19', 'New') +,(4475, 202, 40, '2016-11-03', '2016-04-25', 'Virginia Hall', '141 Rowland Way', null, 'Aoji-ri', null, null, 'Denmark', 7.58, 'Check', '2016-11-13', 'Shipped') +,(4476, 211, 16, '2017-03-07', '2016-10-14', 'Doris Berry', '60 Rusk Lane', null, 'Al Qamşīyah', null, null, 'India', 1.8, 'Check', '2016-03-19', 'On Hold') +,(4477, 210, 87, '2016-12-04', '2016-03-22', 'Juan Richards', '3830 Randy Parkway', null, 'Nakhon Nayok', null, '26120', 'Thailand', 1.22, 'Card', '2016-08-05', 'Complete') +,(4478, 203, 34, '2017-01-28', '2016-09-27', 'Kimberly Fox', '34957 Elka Way', null, 'Santiago', null, '97700-000', 'Brazil', 3.99, 'Check', '2016-07-06', 'On Hold') +,(4479, 219, 89, '2016-07-01', '2016-05-31', 'Ruby Ruiz', '90581 American Hill', null, 'Agudos', null, '17120-000', 'Brazil', 5.97, 'Cash', '2016-06-03', 'On Hold') +,(4480, 203, 53, '2016-10-17', '2016-11-07', 'Ruby Robinson', '385 Carioca Plaza', null, 'Kalangan', null, null, 'Indonesia', 8.71, 'Card', '2016-12-01', 'Complete') +,(4481, 207, 91, '2017-02-25', '2016-03-31', 'Victor Lopez', '170 Mariners Cove Circle', null, 'Bressuire', 'Poitou-Charentes', '79304 CEDEX', 'France', 8.59, 'Check', '2016-07-30', 'Complete') +,(4482, 215, 58, '2017-02-15', '2016-07-25', 'Kimberly Marshall', '647 Summerview Circle', null, 'Timahankrajan', null, null, 'Indonesia', 3.07, 'Check', '2016-04-21', 'On Hold') +,(4483, 207, 76, '2016-06-27', '2016-10-15', 'Pamela Matthews', '9379 Summit Trail', null, 'Brangsi', null, null, 'Indonesia', 1.35, 'Card', '2016-05-27', 'New') +,(4484, 210, 98, '2017-02-03', '2016-11-04', 'Randy Patterson', '6641 American Ash Point', null, 'Ivanec', null, '42240', 'Canada', 2.36, 'Card', '2016-10-31', 'Shipped') +,(4485, 205, 71, '2017-01-01', '2017-02-16', 'Carolyn Garza', '281 Raven Lane', null, 'Jingyang', null, null, 'China', 6.85, 'Check', '2016-04-27', 'Shipped') +,(4486, 202, 20, '2016-07-24', '2016-07-06', 'Ruth Perkins', '5656 Northview Lane', null, 'Burevestnik', null, '607612', 'Russia', 9.29, 'Cash', '2017-03-16', 'On Hold') +,(4487, 203, 49, '2017-02-20', '2017-01-12', 'Kelly Oliver', '249 Londonderry Pass', null, 'Grande Rivière du Nord', null, null, 'Canada', 7.65, 'Check', '2016-12-04', 'Shipped') +,(4488, 203, 67, '2016-11-09', '2016-07-19', 'Shirley Henry', '3045 Rowland Lane', null, 'Midlands', null, null, 'Germany', 5.35, 'Check', '2016-06-14', 'Complete') +,(4489, 209, 100,'2017-01-24', '2016-05-30', 'Marie Ferguson', '629 Crownhardt Junction', null, 'El Paso', 'Texas', '88546', 'United States', 5.18, 'Check', '2016-04-20', 'Shipped') +,(4490, 202, 87, '2016-06-27', '2016-09-05', 'Rachel Scott', '343 Schurz Road', null, 'Cabiguan', null, '1144', 'Philippines', 1.05, 'Cash', '2016-07-24', 'Shipped') +,(4491, 211, 93, '2017-01-16', '2016-09-29', 'Henry Fields', '26143 Del Sol Avenue', null, 'Huangduobu', null, null, 'China', 6.15, 'Card', '2016-06-02', 'Shipped') +,(4492, 217, 10, '2016-12-08', '2016-10-01', 'Harold Jones', '2 Oak Avenue', null, 'Surkhakhi', null, '386147', 'Russia', 9.96, 'Card', '2016-04-07', 'New') +,(4493, 217, 35, '2016-05-05', '2016-05-01', 'Walter Wright', '12 Paget Road', null, 'Siluman', null, null, 'Indonesia', 2.1, 'Cash', '2016-10-26', 'On Hold') +,(4494, 206, 51, '2017-02-25', '2016-10-24', 'Marilyn Hayes', '4 5th Way', null, 'Punkaharju', null, '58501', 'Finland', 3.57, 'Cash', '2016-06-22', 'New') +,(4495, 208, 3 , '2016-12-27', '2016-09-09', 'Sandra West', '0384 Bowman Center', null, 'Tagta', null, null, 'India', 6.45, 'Cash', '2016-08-25', 'New') +,(4496, 218, 41, '2017-01-10', '2016-12-11', 'Dennis Meyer', '4 Cambridge Alley', null, 'Cariamanga', null, null, 'Argentina', 5.33, 'Check', '2016-09-28', 'New') +,(4497, 216, 76, '2016-09-28', '2016-05-12', 'Frank Dean', '23227 Veith Park', null, 'Fengqiao', null, null, 'China', 6.72, 'Cash', '2016-04-12', 'Complete') +,(4498, 204, 3 , '2016-11-11', '2016-12-01', 'Amy Palmer', '7735 Maple Wood Road', null, 'Działoszyce', null, '28-440', 'Poland', 3.08, 'Card', '2016-09-07', 'Shipped') +,(4499, 211, 96, '2017-02-04', '2016-03-27', 'Emily Nelson', '3 Crownhardt Plaza', null, 'Oslob', null, '6025', 'Philippines', 6.41, 'Card', '2016-09-25', 'On Hold') +,(4500, 204, 7 , '2016-04-29', '2017-01-20', 'Randy Hanson', '687 Drewry Place', null, 'Barberena', null, '06002', 'Japan', 2.51, 'Card', '2016-12-12', 'Complete') +,(4501, 215, 92, '2017-02-27', '2016-09-26', 'Raymond Banks', '826 Mendota Pass', null, 'Chicago', 'Illinois', '60681', 'United States', 3.34, 'Card', '2016-10-30', 'Complete') +,(4502, 220, 24, '2016-10-01', '2016-09-26', 'Kimberly Robertson', '2643 Becker Trail', null, 'Columbus', 'United Kingdom', '31904', 'United States', 3.07, 'Check', '2016-04-27', 'Complete') +,(4503, 215, 52, '2017-02-25', '2016-08-08', 'Marilyn Miller', '1 Tennessee Park', null, 'Spokane', 'Washington', '99252', 'United States', 5.34, 'Check', '2016-08-16', 'On Hold') +,(4504, 220, 35, '2017-01-27', '2016-09-08', 'Marie Carpenter', '4575 Fair Oaks Hill', null, 'Richmond', 'Virginia', '23293', 'United States', 7.01, 'Cash', '2016-04-06', 'Shipped') +,(4505, 203, 10, '2016-06-24', '2017-02-22', 'Nicholas Wells', '823 Duke Center', null, 'Irvine', 'California', '92710', 'United States', 1.4, 'Check', '2016-06-17', 'On Hold') +,(4506, 207, 26, '2016-12-26', '2017-03-14', 'John Dean', '06 Spenser Place', null, 'Charleston', 'South Carolina', '29403', 'United States', 1.31, 'Cash', '2016-10-25', 'Shipped') +,(4507, 216, 28, '2016-08-22', '2016-12-13', 'Diana Spencer', '26 Ridgeway Plaza', null, 'Ogden', 'Utah', '84403', 'United States', 9.42, 'Cash', '2016-04-13', 'Shipped') +,(4508, 213, 90, '2016-08-31', '2017-01-13', 'Wanda Bowman', '862 Iowa Avenue', null, 'Kansas City', 'Kansas', '66160', 'United States', 7.1, 'Cash', '2016-10-19', 'Complete') +,(4509, 204, 93, '2016-07-07', '2016-05-31', 'Andrew Garrett', '27066 Gina Road', null, 'El Paso', 'Texas', '88558', 'United States', 6.88, 'Check', '2016-04-23', 'Complete') +,(4510, 202, 56, '2017-02-06', '2016-10-29', 'Juan Webb', '6233 South Junction', null, 'Lafayette', 'Louisiana', '70505', 'United States', 1.07, 'Cash', '2016-05-20', 'New') +,(4511, 219, 54, '2016-11-08', '2016-06-17', 'William Gardner', '5 Meadow Ridge Terrace', null, 'Tacoma', 'Washington', '98447', 'United States', 4.46, 'Check', '2016-05-25', 'Complete') +,(4512, 215, 4 , '2016-09-09', '2016-08-21', 'Fred Fernandez', '15 Ludington Junction', null, 'San Rafael', 'California', '94913', 'United States', 4.3, 'Cash', '2016-09-02', 'New') +,(4513, 206, 54, '2016-10-28', '2016-06-30', 'Ruth Ellis', '41196 Rieder Avenue', null, 'Baltimore', 'Maryland', '21211', 'United States', 8.39, 'Card', '2016-05-29', 'Complete') +,(4514, 215, 73, '2017-02-26', '2016-09-17', 'David Ferguson', '5813 Brown Parkway', null, 'Shawnee Mission', 'Kansas', '66286', 'United States', 2.71, 'Card', '2016-04-18', 'Shipped') +,(4515, 216, 23, '2016-11-08', '2016-06-27', 'Susan Freeman', '0 Bashford Parkway', null, 'Tucson', 'Arizona', '85720', 'United States', 5.5, 'Check', '2017-02-01', 'Shipped') +,(4516, 212, 9 , '2016-04-30', '2016-12-31', 'Alan Hunt', '193 Declaration Plaza', null, 'Louisville', 'Kentucky', '40256', 'United States', 9.74, 'Cash', '2017-01-20', 'On Hold') +,(4517, 202, 46, '2017-02-01', '2016-07-22', 'Phillip Romero', '1860 Thompson Crossing', null, 'Biloxi', 'Mississippi', '39534', 'United States', 3.02, 'Card', '2016-11-04', 'Complete') +,(4518, 203, 75, '2016-09-07', '2016-11-14', 'George Diaz', '6 Mcguire Center', null, 'Mesa', 'Arizona', '85210', 'United States', 7.84, 'Check', '2016-06-21', 'Shipped') +,(4519, 217, 68, '2016-10-07', '2016-08-15', 'Virginia King', '7405 High Crossing Alley', null, 'Sioux City', 'Iowa', '51105', 'United States', 4.03, 'Check', '2016-05-09', 'Complete') +,(4520, 216, 6 , '2017-02-18', '2017-02-17', 'Brenda Ruiz', '224 Badeau Street', null, 'Corpus Christi', 'Texas', '78426', 'United States', 9.11, 'Check', '2016-11-13', 'New') +,(4521, 201, 84, '2016-09-17', '2016-06-15', 'Debra Brown', '94 Morningstar Center', null, 'San Francisco', 'California', '94177', 'United States', 6.59, 'Check', '2017-03-10', 'Shipped') +,(4522, 205, 89, '2016-10-22', '2017-03-13', 'Emily Henry', '79 Manufacturers Center', null, 'Los Angeles', 'California', '90020', 'United States', 4.11, 'Cash', '2016-10-27', 'Complete') +,(4523, 211, 67, '2016-04-17', '2017-02-12', 'Aaron Peterson', '504 Schlimgen Terrace', null, 'Bethesda', 'Maryland', '20892', 'United States', 5.42, 'Card', '2016-08-25', 'Shipped') +,(4524, 215, 83, '2016-08-22', '2016-07-31', 'Janice Burke', '3 Mcbride Lane', null, 'Washington', 'District of Columbia', '20073', 'United States', 3.76, 'Card', '2016-08-09', 'Shipped') +,(4525, 217, 100,'2016-03-31', '2016-12-09', 'Debra Kelley', '18155 Northview Plaza', null, 'Detroit', 'Michigan', '48267', 'United States', 2.26, 'Cash', '2016-12-29', 'On Hold') +,(4526, 214, 32, '2016-11-24', '2016-03-28', 'Donald Sims', '86 Michigan Avenue', null, 'Brooklyn', 'New York', '11231', 'United States', 5.05, 'Check', '2016-08-07', 'Shipped') +,(4527, 205, 100,'2016-05-13', '2016-06-17', 'Daniel Mason', '4 Hanover Road', null, 'Reno', 'Nevada', '89595', 'United States', 4.81, 'Check', '2016-10-22', 'Shipped') +,(4528, 201, 32, '2016-11-15', '2016-11-16', 'Howard Knight', '5 Weeping Birch Alley', null, 'Jacksonville', 'Florida', '32225', 'United States', 5.99, 'Check', '2016-11-07', 'New') +,(4529, 213, 99, '2016-12-02', '2016-07-09', 'Virginia Hughes', '629 Manufacturers Point', null, 'Syracuse', 'New York', '13224', 'United States', 5.6, 'Card', '2016-12-02', 'Complete') +,(4530, 219, 18, '2016-12-07', '2017-02-07', 'Carl Graham', '90 Heffernan Pass', null, 'Saint Petersburg', 'Florida', '33737', 'United States', 9.35, 'Check', '2016-10-18', 'Complete') +,(4531, 201, 57, '2016-12-26', '2016-12-29', 'Joan Murray', '38 Bellgrove Crossing', null, 'Tacoma', 'Washington', '98447', 'United States', 6.69, 'Card', '2016-12-05', 'On Hold') +,(4532, 202, 58, '2016-04-02', '2016-07-01', 'Robert Williams', '09407 Northfield Circle', null, 'Cedar Rapids', 'Iowa', '52410', 'United States', 6.56, 'Card', '2016-04-16', 'On Hold') +,(4533, 218, 36, '2017-02-07', '2016-05-05', 'Ryan Black', '57199 Hoffman Place', null, 'Jacksonville', 'Florida', '32204', 'United States', 8.54, 'Check', '2017-01-24', 'Shipped') +,(4534, 208, 92, '2016-07-09', '2016-06-20', 'Brenda Hunter', '16179 Ludington Court', null, 'Birmingham', 'Alabama', '35263', 'United States', 9.82, 'Cash', '2016-09-30', 'New') +,(4535, 214, 70, '2016-08-04', '2016-06-29', 'Anne Warren', '08161 Barnett Parkway', null, 'Van Nuys', 'California', '91411', 'United States', 7.04, 'Cash', '2017-02-24', 'Complete') +,(4536, 213, 99, '2017-01-11', '2017-01-21', 'Betty Snyder', '9 Badeau Court', null, 'Davenport', 'Iowa', '52804', 'United States', 8.72, 'Card', '2016-09-03', 'Shipped') +,(4537, 217, 76, '2016-07-31', '2017-02-13', 'Edward Wilson', '1031 Esch Drive', null, 'Fresno', 'California', '93750', 'United States', 1.64, 'Check', '2016-04-21', 'On Hold') +,(4538, 210, 60, '2016-06-22', '2016-04-10', 'Terry Butler', '124 Hoepker Pass', null, 'San Antonio', 'Texas', '78255', 'United States', 2.35, 'Check', '2017-01-31', 'Complete') +,(4539, 220, 5 , '2016-11-12', '2016-04-25', 'Emily Hawkins', '990 Quincy Drive', null, 'Richmond', 'Virginia', '23289', 'United States', 4.36, 'Card', '2016-09-17', 'Complete') +,(4540, 213, 42, '2017-02-28', '2017-02-11', 'Cynthia Rose', '8881 Packers Trail', null, 'Berkeley', 'California', '94712', 'United States', 6.09, 'Check', '2016-04-14', 'New') +,(4541, 204, 27, '2016-09-30', '2017-01-28', 'Lisa Turner', '83 Graedel Terrace', null, 'Oakland', 'California', '94611', 'United States', 9.61, 'Card', '2016-05-07', 'Shipped') +,(4542, 219, 26, '2016-07-13', '2016-03-23', 'Jason Price', '475 Meadow Valley Point', null, 'Annapolis', 'Maryland', '21405', 'United States', 2.93, 'Check', '2016-06-10', 'New') +,(4543, 202, 63, '2016-07-29', '2016-05-20', 'Joan Hayes', '7 Upham Center', null, 'Temple', 'Texas', '76505', 'United States', 7.39, 'Card', '2016-09-20', 'Complete') +,(4544, 212, 97, '2016-10-31', '2017-01-16', 'Paula Torres', '443 Debs Terrace', null, 'Racine', 'Wisconsin', '53405', 'United States', 3.93, 'Card', '2016-07-07', 'Shipped') +,(4545, 201, 33, '2017-03-08', '2016-08-21', 'Theresa Watkins', '85395 Rusk Center', null, 'Jackson', 'Mississippi', '39210', 'United States', 5.32, 'Card', '2016-11-19', 'Complete') +,(4546, 211, 68, '2016-05-25', '2016-07-17', 'Clarence Nguyen', '155 Northport Road', null, 'Greensboro', 'North Carolina', '27455', 'United States', 7.06, 'Cash', '2016-08-24', 'Shipped') +,(4547, 203, 73, '2016-05-03', '2016-10-23', 'Jean Mason', '03 Eagle Crest Lane', null, 'Colorado Springs', 'Colorado', '80935', 'United States', 4.2, 'Cash', '2016-04-07', 'New') +,(4548, 217, 2 , '2016-05-20', '2016-08-07', 'Nicole Brown', '364 Debra Lane', null, 'Washington', 'District of Columbia', '20046', 'United States', 7.97, 'Cash', '2016-04-30', 'New') +,(4549, 220, 89, '2016-04-11', '2016-12-11', 'Carol Chapman', '756 Muir Point', null, 'Washington', 'District of Columbia', '20397', 'United States', 2.21, 'Card', '2017-02-05', 'Shipped') +,(4550, 211, 13, '2016-04-16', '2016-08-03', 'Roy George', '8 Anhalt Terrace', null, 'Indianapolis', 'Indiana', '46207', 'United States', 4.5, 'Check', '2017-03-06', 'New') +,(4551, 219, 37, '2016-04-14', '2017-03-01', 'Heather Bishop', '0901 Tennessee Street', null, 'Kingsport', 'Tennessee', '37665', 'United States', 1.92, 'Card', '2017-01-02', 'Shipped') +,(4552, 218, 94, '2017-03-05', '2016-06-01', 'Wayne Mason', '90645 Carberry Drive', null, 'Madison', 'Wisconsin', '53716', 'United States', 6.96, 'Card', '2016-12-31', 'Complete') +,(4553, 212, 37, '2016-10-16', '2016-10-13', 'Gloria Elliott', '100 Granby Junction', null, 'Miami', 'Florida', '33153', 'United States', 9.25, 'Cash', '2016-06-09', 'Shipped') +,(4554, 217, 4 , '2016-06-05', '2016-07-26', 'Timothy Hayes', '6001 Elgar Circle', null, 'Pensacola', 'Florida', '32575', 'United States', 6.5, 'Cash', '2016-03-30', 'Complete') +,(4555, 207, 49, '2016-08-19', '2016-08-15', 'Judith Baker', '3436 Briar Crest Park', null, 'Newark', 'New Jersey', '07188', 'United States', 2.33, 'Check', '2016-09-17', 'Complete') +,(4556, 217, 17, '2016-11-18', '2016-12-10', 'Roy Russell', '6401 Graedel Court', null, 'Alexandria', 'Virginia', '22301', 'United States', 3.24, 'Check', '2016-04-08', 'Complete') +,(4557, 216, 35, '2016-09-11', '2016-05-07', 'Jacqueline Davis', '864 Cherokee Lane', null, 'Columbus', 'Ohio', '43226', 'United States', 4.7, 'Card', '2016-08-06', 'Shipped') +,(4558, 211, 20, '2016-10-06', '2016-07-15', 'Eugene Castillo', '03090 Northland Circle', null, 'Salt Lake City', 'Utah', '84199', 'United States', 9.36, 'Card', '2016-10-06', 'Complete') +,(4559, 216, 13, '2017-01-13', '2016-03-28', 'Janice Mills', '522 Holmberg Alley', null, 'Scottsdale', 'Arizona', '85271', 'United States', 7.31, 'Cash', '2016-05-15', 'On Hold') +,(4560, 211, 77, '2016-08-24', '2017-03-13', 'Ruby White', '0070 Corben Way', null, 'Naples', 'Florida', '34114', 'United States', 3.71, 'Check', '2016-07-17', 'On Hold') +,(4561, 219, 55, '2016-08-13', '2016-11-19', 'Frank Jackson', '25 Rigney Point', null, 'Washington', 'District of Columbia', '20420', 'United States', 1.94, 'Cash', '2016-06-12', 'Shipped') +,(4562, 207, 96, '2016-10-12', '2016-12-04', 'Pamela Peterson', '830 Loftsgordon Junction', null, 'Houston', 'Texas', '77281', 'United States', 1.45, 'Check', '2017-03-06', 'New') +,(4563, 204, 70, '2016-07-23', '2017-02-06', 'Martha Frazier', '3 Gerald Lane', null, 'Scottsdale', 'Arizona', '85260', 'United States', 2.74, 'Cash', '2017-01-19', 'New') +,(4564, 204, 59, '2017-02-26', '2016-10-23', 'Kenneth Hawkins', '27305 Maple Crossing', null, 'San Diego', 'California', '92145', 'United States', 9.41, 'Cash', '2017-02-09', 'On Hold') +,(4565, 203, 66, '2016-08-06', '2017-02-03', 'Barbara Collins', '8 Norway Maple Junction', null, 'Fort Worth', 'Texas', '76198', 'United States', 1.08, 'Card', '2016-06-24', 'New') +,(4566, 217, 83, '2016-09-14', '2016-03-29', 'Gary Ellis', '97 Nobel Avenue', null, 'Alexandria', 'Louisiana', '71307', 'United States', 5.05, 'Card', '2016-06-13', 'Shipped') +,(4567, 214, 63, '2017-03-04', '2016-11-05', 'Douglas Hughes', '98309 Mccormick Park', null, 'Kansas City', 'Kansas', '66160', 'United States', 1.4, 'Card', '2017-02-13', 'Shipped') +,(4568, 208, 12, '2016-10-31', '2017-02-27', 'Harold Flores', '1 Merchant Lane', null, 'Duluth', 'United Kingdom', '30096', 'United States', 4.84, 'Check', '2016-04-30', 'On Hold') +,(4569, 201, 96, '2016-08-20', '2016-10-03', 'Marie Nguyen', '084 Stuart Hill', null, 'Arlington', 'Texas', '76004', 'United States', 5.95, 'Cash', '2016-04-25', 'On Hold') +,(4570, 203, 1 , '2016-10-13', '2016-03-21', 'Judy Fowler', '7541 Golf Course Way', null, 'Kansas City', 'Missouri', '64109', 'United States', 8.02, 'Check', '2016-05-05', 'New') +,(4571, 219, 49, '2016-11-04', '2016-09-02', 'Howard Rogers', '5 Scott Hill', null, 'Brooklyn', 'New York', '11215', 'United States', 5.21, 'Cash', '2016-10-28', 'Complete') +,(4572, 215, 5 , '2016-03-24', '2016-08-31', 'Stephanie Martinez', '0022 Reinke Trail', null, 'Baton Rouge', 'Louisiana', '70894', 'United States', 7.74, 'Card', '2016-08-14', 'On Hold') +,(4573, 206, 61, '2016-08-31', '2016-07-10', 'Jacqueline Lane', '780 Elka Place', null, 'Cleveland', 'Ohio', '44105', 'United States', 9.12, 'Check', '2016-11-30', 'On Hold') +,(4574, 220, 65, '2016-06-26', '2016-06-25', 'Betty Harrison', '23089 Kensington Junction', null, 'Greensboro', 'North Carolina', '27404', 'United States', 5.63, 'Check', '2016-03-30', 'Complete') +,(4575, 212, 81, '2016-04-28', '2016-10-19', 'Robin Bradley', '7895 Weeping Birch Plaza', null, 'Waterbury', 'Connecticut', '06721', 'United States', 7.34, 'Cash', '2017-01-25', 'On Hold') +,(4576, 216, 13, '2017-02-24', '2016-07-18', 'Ralph Bailey', '4019 Harper Park', null, 'Sacramento', 'California', '94291', 'United States', 6.77, 'Cash', '2017-02-02', 'New') +,(4577, 203, 43, '2016-09-24', '2016-11-18', 'Melissa Ross', '775 Lyons Road', null, 'Bridgeport', 'Connecticut', '06606', 'United States', 1.64, 'Check', '2016-07-23', 'Shipped') +,(4578, 212, 53, '2016-07-05', '2016-06-19', 'Joan Russell', '0 Kings Terrace', null, 'Bloomington', 'Illinois', '61709', 'United States', 4.66, 'Card', '2016-04-09', 'New') +,(4579, 214, 17, '2016-10-01', '2016-10-18', 'Benjamin George', '40131 Ronald Regan Road', null, 'Washington', 'District of Columbia', '20525', 'United States', 8.04, 'Check', '2016-06-16', 'Complete') +,(4580, 207, 69, '2016-04-19', '2017-02-09', 'Katherine Stone', '37483 Melrose Parkway', null, 'Fresno', 'California', '93794', 'United States', 6.7, 'Check', '2017-02-08', 'Complete') +,(4581, 218, 28, '2017-03-04', '2016-11-25', 'Ernest Cruz', '872 Nancy Street', null, 'Pompano Beach', 'Florida', '33069', 'United States', 5.81, 'Cash', '2016-04-21', 'On Hold') +,(4582, 217, 32, '2017-03-16', '2016-06-08', 'Joshua Edwards', '72309 Elmside Point', null, 'San Francisco', 'California', '94110', 'United States', 2.49, 'Cash', '2016-04-01', 'On Hold') +,(4583, 219, 83, '2017-01-24', '2016-07-25', 'Justin Mills', '88350 Wayridge Hill', null, 'Charleston', 'West Virginia', '25326', 'United States', 6.03, 'Card', '2016-10-07', 'New') +,(4584, 208, 45, '2016-10-18', '2016-05-13', 'Kathleen Gibson', '25 Carpenter Lane', null, 'Reno', 'Nevada', '89505', 'United States', 5.41, 'Check', '2016-08-21', 'Shipped') +,(4585, 216, 71, '2016-09-19', '2016-10-15', 'Ruby Bennett', '1 Muir Pass', null, 'Las Vegas', 'Nevada', '89135', 'United States', 2.5, 'Cash', '2016-11-29', 'On Hold') +,(4586, 214, 48, '2016-08-07', '2016-08-12', 'Richard Robinson', '1125 Melvin Terrace', null, 'Bethesda', 'Maryland', '20816', 'United States', 4.02, 'Card', '2017-01-09', 'Complete') +,(4587, 212, 62, '2016-12-17', '2017-01-23', 'Debra Sanchez', '534 Stoughton Lane', null, 'Johnstown', 'Pennsylvania', '15906', 'United States', 8.78, 'Cash', '2016-08-07', 'Shipped') +,(4588, 216, 30, '2016-10-24', '2016-12-21', 'Willie Dean', '680 Northview Circle', null, 'Huntington', 'West Virginia', '25775', 'United States', 8.43, 'Card', '2017-03-12', 'New') +,(4589, 210, 10, '2017-01-01', '2016-09-22', 'Christina Kelley', '8706 Sundown Street', null, 'Peoria', 'Illinois', '61635', 'United States', 4.24, 'Cash', '2017-02-08', 'On Hold') +,(4590, 205, 6 , '2016-11-29', '2017-02-23', 'Russell Montgomery', '977 Packers Drive', null, 'Charlotte', 'North Carolina', '28247', 'United States', 2.87, 'Cash', '2016-05-30', 'Complete') +,(4591, 206, 15, '2016-03-28', '2017-02-23', 'Edward Cunningham', '283 Bultman Way', null, 'Jacksonville', 'Florida', '32277', 'United States', 6.55, 'Check', '2017-03-10', 'Shipped') +,(4592, 209, 82, '2016-12-20', '2016-09-07', 'Michael Chavez', '00 Oak Avenue', null, 'Young America', 'Minnesota', '55551', 'United States', 8.22, 'Check', '2016-04-19', 'On Hold') +,(4593, 204, 24, '2017-03-13', '2016-08-30', 'David White', '506 Nevada Circle', null, 'Portland', 'Maine', '04109', 'United States', 1.11, 'Card', '2017-01-13', 'On Hold') +,(4594, 206, 27, '2016-09-13', '2017-03-12', 'Cheryl Vasquez', '9070 Di Loreto Court', null, 'Van Nuys', 'California', '91499', 'United States', 7.42, 'Card', '2017-02-25', 'On Hold') +,(4595, 211, 94, '2016-07-03', '2016-05-08', 'Charles Garrett', '1337 Hooker Trail', null, 'Honolulu', 'Hawaii', '96810', 'United States', 9.57, 'Check', '2016-10-04', 'Shipped') +,(4596, 216, 56, '2016-07-08', '2017-02-28', 'Michelle Butler', '1 Magdeline Lane', null, 'Orlando', 'Florida', '32813', 'United States', 7.05, 'Check', '2016-07-12', 'New') +,(4597, 217, 26, '2016-09-24', '2016-10-05', 'Howard Reyes', '3677 Donald Alley', null, 'Carol Stream', 'Illinois', '60351', 'United States', 7.62, 'Cash', '2017-02-08', 'Complete') +,(4598, 212, 76, '2016-04-13', '2016-08-10', 'Eugene Kelly', '838 Becker Plaza', null, 'Laredo', 'Texas', '78044', 'United States', 4.9, 'Check', '2016-10-23', 'New') +,(4599, 208, 29, '2016-04-16', '2016-05-15', 'Jimmy Mcdonald', '0 Dayton Place', null, 'Rochester', 'New York', '14646', 'United States', 1.56, 'Check', '2017-01-14', 'Complete') +,(4600, 208, 2 , '2016-04-26', '2016-04-06', 'Stephen Jacobs', '7131 Scoville Terrace', null, 'Phoenix', 'Arizona', '85020', 'United States', 4.52, 'Cash', '2017-01-22', 'On Hold'); + + + + +/* Order details */ +insert into order_items (order_id, product_id, quantity, unit_price, discount, order_item_status, date_allocated) values + (4001, 608, 1 , 97.34, 8.73, 'Allocated', '2017-01-15') +,(4001, 611, 2 , 58.46, 4.36, 'No Stock' , '2016-09-21') +,(4001, 616, 2 , 58.46, 4.36, 'No Stock' , '2016-09-21') +,(4001, 613, 2 , 58.46, 4.36, 'No Stock' , '2016-09-21') +,(4001, 615, 2 , 58.46, 4.36, 'No Stock' , '2016-09-21') +,(4002, 604, 3 , 88.97, 2.86, 'On Order' , '2016-12-15') +,(4002, 610, 4 , 37.19, 8.65, 'Allocated', '2016-10-12') +,(4002, 615, 4 , 37.19, 8.65, 'Allocated', '2016-10-12') +,(4003, 609, 8 , 92.87, 4.01, 'No Stock' , '2016-06-15') +,(4003, 612, 7 , 87.15, 3.54, 'No Stock' , '2017-02-09') +,(4004, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4004, 620, 2 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4004, 611, 4 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4004, 612, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4005, 618, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4005, 619, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4005, 620, 2 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4006, 617, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4006, 618, 2 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4006, 607, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4007, 617, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4007, 610, 2 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4007, 612, 5 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4008, 612, 1 , 57.2 , 8.94, 'Allocated', '2017-01-13') +,(4008, 615, 3 , 57.2 , 8.94, 'Allocated', '2017-01-13') +,(4008, 611, 1 , 57.2 , 8.94, 'Allocated', '2017-01-13') +,(4009, 605, 6 , 62.16, 5.68, 'No Stock' , '2017-02-13') +,(4009, 610, 6 , 19.31, 5.0 , 'No Stock' , '2016-09-16') +,(4009, 615, 9 , 51.21, 4.48, 'Allocated', '2016-10-18') +,(4010, 601, 1 , 32.18, 9.41, 'On Order' , '2016-03-17') +,(4010, 602, 1 , 31.35, 7.18, 'No Stock' , '2016-12-30') +,(4010, 603, 10, 24.24, 2.76, 'Allocated', '2016-07-05') +,(4010, 610, 6 , 9.09 , 3.02, 'On Order' , '2016-07-17') +,(4011, 604, 10, 58.25, 9.3 , 'No Stock' , '2016-04-04') +,(4011, 606, 5 , 73.34, 1.76, 'Allocated', '2016-06-30') +,(4011, 608, 3 , 95.07, 4.6 , 'On Order' , '2016-06-04') +,(4011, 615, 9 , 20.84, 3.93, 'Allocated', '2016-06-10') +,(4012, 604, 5 , 19.82, 9.97, 'No Stock' , '2016-09-21') +,(4012, 601, 3 , 19.82, 9.97, 'No Stock' , '2016-09-21') +,(4012, 610, 3 , 19.82, 9.97, 'No Stock' , '2016-09-21') +,(4013, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4013, 604, 2 , 19.82, 9.97, 'No Stock' , '2016-09-21') +,(4013, 606, 5 , 19.82, 9.97, 'No Stock' , '2016-09-21') +,(4014, 601, 3 , 37.57, 4.99, 'Allocated', '2016-08-21') +,(4015, 611, 8 , 95.27, 6.62, 'Allocated', '2017-03-13') +,(4015, 612, 2 , 89.63, 4.14, 'Allocated', '2016-04-07') +,(4015, 615, 8 , 69.03, 1.11, 'On Order' , '2016-08-15') +,(4016, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4016, 611, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4016, 612, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4017, 605, 6 , 75.88, 2.1 , 'On Order' , '2017-02-15') +,(4017, 610, 4 , 26.43, 7.18, 'On Order' , '2016-04-30') +,(4017, 619, 6 , 77.91, 9.26, 'No Stock' , '2016-04-02') +,(4018, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4019, 615, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4020, 614, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4021, 604, 3 , 20.14, 8.54, 'No Stock' , '2016-06-26') +,(4022, 614, 7 , 41.61, 4.62, 'On Order' , '2016-09-09') +,(4022, 619, 1 , 10.45, 2.56, 'On Order' , '2016-10-18') +,(4023, 607, 6 , 7.68 , 5.59, 'On Order' , '2016-11-15') +,(4023, 611, 7 , 89.4 , 1.71, 'No Stock' , '2016-04-03') +,(4024, 613, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4024, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4024, 608, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4024, 609, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4025, 612, 6 , 81.24, 3.52, 'Allocated', '2016-04-25') +,(4025, 614, 4 , 14.07, 2.58, 'On Order' , '2016-09-11') +,(4026, 617, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4026, 618, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4027, 611, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4027, 612, 3 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4027, 613, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4028, 605, 5 , 95.04, 7.82, 'On Order' , '2016-07-24') +,(4028, 615, 8 , 74.56, 1.78, 'Allocated', '2016-12-09') +,(4029, 604, 1 , 11.06, 5.37, 'On Order' , '2016-11-26') +,(4029, 603, 1 , 11.06, 5.37, 'On Order' , '2016-11-26') +,(4029, 607, 1 , 11.06, 5.37, 'On Order' , '2016-11-26') +,(4030, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4030, 620, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4030, 619, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4031, 605, 7 , 75.42, 2.92, 'No Stock' , '2017-02-12') +,(4031, 608, 7 , 75.42, 2.92, 'No Stock' , '2017-02-12') +,(4031, 609, 7 , 75.42, 2.92, 'No Stock' , '2017-02-12') +,(4031, 615, 7 , 75.42, 2.92, 'No Stock' , '2017-02-12') +,(4032, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4032, 612, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4032, 611, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4032, 619, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4033, 615, 4 , 45.55, 6.19, 'Allocated', '2016-05-09') +,(4033, 609, 3 , 45.55, 6.19, 'Allocated', '2016-05-09') +,(4033, 620, 1 , 45.55, 6.19, 'Allocated', '2016-05-09') +,(4034, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4034, 620, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4034, 609, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4035, 613, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4035, 614, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4035, 619, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4036, 604, 1 , 46.63, 4.25, 'No Stock' , '2016-05-04') +,(4036, 605, 6 , 66.75, 9.97, 'Allocated', '2017-02-25') +,(4037, 615, 2 , 44.76, 7.22, 'On Order' , '2017-03-01') +,(4037, 612, 2 , 44.76, 7.22, 'On Order' , '2017-03-01') +,(4038, 602, 2 , 13.25, 7.66, 'On Order' , '2016-07-13') +,(4038, 620, 3 , 13.25, 7.66, 'On Order' , '2016-07-13') +,(4039, 609, 1 , 99.68, 6.09, 'No Stock' , '2016-07-24') +,(4039, 619, 3 , 99.68, 6.09, 'No Stock' , '2016-07-24') +,(4039, 620, 1 , 99.68, 6.09, 'No Stock' , '2016-07-24') +,(4040, 612, 2 , 79.64, 6.72, 'Allocated', '2016-04-24') +,(4040, 620, 2 , 79.64, 6.72, 'Allocated', '2016-04-24') +,(4041, 615, 9 , 42.79, 8.92, 'No Stock' , '2016-03-31') +,(4041, 612, 2 , 42.79, 8.92, 'No Stock' , '2016-03-31') +,(4041, 620, 1 , 42.79, 8.92, 'No Stock' , '2016-03-31') +,(4042, 617, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4042, 613, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4042, 620, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4043, 611, 7 , 87.95, 8.57, 'No Stock' , '2016-06-18') +,(4043, 619, 3 , 87.95, 8.57, 'No Stock' , '2016-06-18') +,(4043, 620, 1 , 87.95, 8.57, 'No Stock' , '2016-06-18') +,(4044, 602, 8 , 47.3 , 3.26, 'On Order' , '2016-11-05') +,(4044, 612, 3 , 79.42, 6.56, 'On Order' , '2017-02-11') +,(4045, 603, 3 , 31.01, 7.2 , 'No Stock' , '2016-11-11') +,(4045, 604, 10, 43.54, 6.8 , 'Allocated', '2016-11-13') +,(4045, 608, 7 , 15.2 , 3.58, 'Allocated', '2017-01-18') +,(4046, 611, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4047, 619, 2 , 81.11, 8.77, 'No Stock' , '2016-06-17') +,(4047, 620, 8 , 1.54 , 6.85, 'No Stock' , '2016-05-05') +,(4048, 605, 7 , 13.52, 2.44, 'On Order' , '2016-07-06') +,(4049, 603, 7 , 40.99, 5.77, 'Allocated', '2017-02-22') +,(4049, 609, 10, 90.45, 2.75, 'Allocated', '2017-01-26') +,(4049, 612, 10, 24.28, 9.85, 'No Stock' , '2016-10-01') +,(4050, 606, 4 , 27.84, 1.49, 'No Stock' , '2016-12-18') +,(4050, 607, 2 , 72.72, 3.08, 'On Order' , '2016-04-24') +,(4050, 612, 2 , 76.85, 5.15, 'No Stock' , '2017-02-25') +,(4051, 603, 1 , 57.6 , 1.77, 'Allocated', '2016-07-02') +,(4052, 605, 9 , 50.74, 6.47, 'No Stock' , '2016-05-22') +,(4053, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4054, 601, 10, 55.48, 9.19, 'On Order' , '2016-07-12') +,(4055, 606, 10, 57.17, 3.06, 'No Stock' , '2016-11-20') +,(4056, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4057, 609, 1 , 79.3 , 9.42, 'On Order' , '2016-10-01') +,(4057, 610, 5 , 41.21, 5.55, 'No Stock' , '2016-07-20') +,(4057, 618, 3 , 68.99, 6.42, 'On Order' , '2016-08-19') +,(4058, 604, 6 , 36.78, 6.96, 'Allocated', '2016-05-20') +,(4058, 619, 6 , 79.01, 4.3 , 'Allocated', '2016-06-19') +,(4059, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4060, 603, 10, 40.38, 2.1 , 'On Order' , '2017-02-05') +,(4060, 604, 9 , 41.98, 1.46, 'Allocated', '2017-01-17') +,(4061, 605, 1 , 41.12, 2.51, 'On Order' , '2016-09-05') +,(4061, 602, 1 , 41.12, 2.51, 'On Order' , '2016-09-05') +,(4061, 603, 1 , 41.12, 2.51, 'On Order' , '2016-09-05') +,(4062, 604, 1 , 71.77, 4.91, 'No Stock' , '2016-11-20') +,(4062, 605, 2 , 41.12, 2.51, 'On Order' , '2016-09-05') +,(4062, 607, 1 , 41.12, 2.51, 'On Order' , '2016-09-05') +,(4063, 608, 1 , 62.85, 4.62, 'Allocated', '2016-03-25') +,(4063, 605, 4 , 41.12, 2.51, 'On Order' , '2016-09-05') +,(4063, 607, 1 , 41.12, 2.51, 'On Order' , '2016-09-05') +,(4064, 615, 1 , 68.27, 6.79, 'No Stock' , '2016-07-06') +,(4064, 602, 2 , 41.12, 2.51, 'On Order' , '2016-09-05') +,(4064, 603, 5 , 41.12, 2.51, 'On Order' , '2016-09-05') +,(4064, 605, 1 , 41.12, 2.51, 'On Order' , '2016-09-05') +,(4065, 610, 5 , 99.76, 1.78, 'Allocated', '2016-09-23') +,(4066, 605, 1 , 41.12, 2.51, 'On Order' , '2016-09-05') +,(4066, 604, 9 , 2.63 , 7.42, 'Allocated', '2016-08-12') +,(4066, 615, 7 , 25.14, 7.22, 'No Stock' , '2016-03-27') +,(4067, 618, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4068, 602, 4 , 12.67, 5.17, 'Allocated', '2016-08-30') +,(4068, 603, 1 , 87.81, 1.02, 'On Order' , '2016-10-12') +,(4069, 620, 7 , 89.85, 3.49, 'Allocated', '2017-02-22') +,(4070, 615, 5 , 94.08, 4.09, 'On Order' , '2017-01-31') +,(4071, 616, 1, 10.00, 1.00, 'Allocated', '2016-12-14') +,(4072, 601, 3 , 89.95, 9.61, 'No Stock' , '2016-11-25') +,(4072, 612, 5 , 34.51, 5.99, 'No Stock' , '2016-05-25') +,(4073, 613, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4074, 606, 10, 98.2 , 3.63, 'On Order' , '2016-04-30') +,(4075, 605, 8 , 69.36, 9.16, 'On Order' , '2016-07-19') +,(4075, 606, 1 , 3.95 , 8.66, 'On Order' , '2016-04-09') +,(4076, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4077, 602, 10, 90.58, 5.92, 'No Stock' , '2016-06-23') +,(4077, 609, 1 , 8.25 , 3.74, 'No Stock' , '2016-12-07') +,(4077, 615, 9 , 86.2 , 4.5 , 'Allocated', '2017-03-10') +,(4078, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4078, 612, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4078, 618, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4079, 615, 7 , 1.95 , 1.76, 'On Order' , '2017-03-04') +,(4079, 613, 2 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4079, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4080, 608, 5 , 26.84, 9.03, 'On Order' , '2016-11-13') +,(4080, 609, 3 , 41.76, 4.08, 'Allocated', '2016-09-10') +,(4081, 604, 9 , 5.49 , 8.45, 'On Order' , '2016-10-21') +,(4082, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4083, 602, 1 , 44.85, 5.16, 'No Stock' , '2016-09-16') +,(4084, 604, 4 , 58.27, 4.09, 'Allocated', '2016-08-12') +,(4085, 605, 8 , 93.54, 7.49, 'On Order' , '2016-11-24') +,(4086, 615, 2 , 94.02, 1.63, 'No Stock' , '2016-09-01') +,(4087, 601, 2 , 79.39, 3.86, 'No Stock' , '2016-07-13') +,(4088, 615, 3 , 14.03, 3.74, 'Allocated', '2016-11-15') +,(4089, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4090, 611, 4 , 46.11, 1.53, 'No Stock' , '2016-07-25') +,(4091, 613, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4092, 602, 5 , 42.68, 7.92, 'On Order' , '2016-09-09') +,(4093, 615, 8 , 75.27, 5.92, 'No Stock' , '2016-07-09') +,(4094, 605, 7 , 91.05, 4.52, 'On Order' , '2017-02-21') +,(4095, 602, 6 , 58.5 , 9.62, 'On Order' , '2017-02-26') +,(4095, 604, 3 , 80.13, 4.11, 'No Stock' , '2016-12-01') +,(4095, 608, 1 , 23.96, 5.54, 'No Stock' , '2016-03-27') +,(4096, 601, 4 , 9.84 , 5.33, 'No Stock' , '2016-04-18') +,(4097, 605, 4 , 45.03, 5.61, 'On Order' , '2016-05-13') +,(4097, 606, 3 , 41.39, 3.59, 'On Order' , '2016-11-29') +,(4098, 607, 8 , 11.86, 2.74, 'No Stock' , '2016-11-23') +,(4099, 606, 2 , 54.09, 5.84, 'On Order' , '2016-10-08') +,(4100, 608, 3 , 6.62 , 1.25, 'Allocated', '2016-11-16') +,(4101, 617, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4102, 608, 1 , 2.54 , 9.62, 'On Order' , '2016-10-01') +,(4102, 609, 9 , 92.56, 5.98, 'On Order' , '2016-10-14') +,(4102, 610, 10, 26.81, 5.9 , 'On Order' , '2016-08-20') +,(4103, 606, 6 , 71.32, 9.88, 'No Stock' , '2016-09-10') +,(4103, 608, 1 , 73.91, 9.79, 'No Stock' , '2016-12-26') +,(4104, 603, 9 , 33.85, 4.08, 'Allocated', '2017-03-02') +,(4105, 601, 5 , 49.17, 1.99, 'On Order' , '2016-11-11') +,(4105, 606, 9 , 93.8 , 4.48, 'Allocated', '2017-01-06') +,(4106, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4107, 603, 2 , 24.95, 3.71, 'On Order' , '2016-07-20') +,(4107, 604, 5 , 43.75, 1.39, 'No Stock' , '2017-01-03') +,(4107, 608, 1 , 49.09, 8.72, 'Allocated', '2016-12-19') +,(4107, 616, 8 , 26.78, 1.21, 'On Order' , '2016-09-23') +,(4108, 604, 8 , 36.89, 3.04, 'On Order' , '2017-01-01') +,(4108, 619, 1 , 6.43 , 6.66, 'Allocated', '2016-05-03') +,(4109, 604, 9 , 89.19, 9.43, 'No Stock' , '2016-10-21') +,(4109, 609, 2 , 3.71 , 9.12, 'No Stock' , '2016-10-23') +,(4110, 605, 3 , 61.65, 7.86, 'On Order' , '2016-08-05') +,(4110, 606, 2 , 63.62, 7.4 , 'Allocated', '2016-06-07') +,(4111, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4111, 612, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4111, 613, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4112, 607, 5 , 63.7 , 9.44, 'On Order' , '2017-01-01') +,(4112, 610, 1 , 22.54, 8.3 , 'On Order' , '2016-04-09') +,(4113, 604, 6 , 86.01, 4.4 , 'Allocated', '2017-01-05') +,(4113, 611, 5 , 39.64, 4.58, 'Allocated', '2017-02-26') +,(4113, 615, 3 , 22.49, 3.61, 'Allocated', '2016-08-24') +,(4113, 619, 6 , 7.6 , 6.63, 'On Order' , '2016-05-01') +,(4114, 610, 6 , 3.77 , 4.79, 'Allocated', '2017-01-18') +,(4114, 608, 2 , 3.77 , 4.79, 'Allocated', '2017-01-18') +,(4114, 609, 3 , 3.77 , 4.79, 'Allocated', '2017-01-18') +,(4115, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4115, 620, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4116, 610, 5 , 54.21, 9.53, 'On Order' , '2016-05-11') +,(4116, 620, 3 , 54.21, 9.53, 'On Order' , '2016-05-11') +,(4116, 615, 1 , 54.21, 9.53, 'On Order' , '2016-05-11') +,(4117, 603, 7 , 91.81, 4.35, 'On Order' , '2016-04-18') +,(4117, 610, 9 , 79.15, 6.8 , 'Allocated', '2017-02-09') +,(4118, 611, 8 , 1.55 , 8.73, 'On Order' , '2016-08-18') +,(4118, 615, 3 , 1.55 , 8.73, 'On Order' , '2016-08-18') +,(4118, 612, 1 , 1.55 , 8.73, 'On Order' , '2016-08-18') +,(4119, 611, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4119, 615, 8 , 1.55 , 8.73, 'On Order' , '2016-08-18') +,(4119, 612, 4 , 1.55 , 8.73, 'On Order' , '2016-08-18') +,(4120, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4120, 612, 2 , 1.55 , 8.73, 'On Order' , '2016-08-18') +,(4120, 611, 8 , 1.55 , 8.73, 'On Order' , '2016-08-18') +,(4121, 602, 3 , 7.09 , 6.48, 'No Stock' , '2016-06-03') +,(4121, 612, 2 , 1.55 , 8.73, 'On Order' , '2016-08-18') +,(4121, 611, 1 , 1.55 , 8.73, 'On Order' , '2016-08-18') +,(4122, 606, 5 , 44.99, 1.66, 'No Stock' , '2016-05-08') +,(4122, 611, 2 , 1.55 , 8.73, 'On Order' , '2016-08-18') +,(4122, 612, 6 , 1.55 , 8.73, 'On Order' , '2016-08-18') +,(4123, 607, 10, 4.78 , 1.32, 'Allocated', '2016-12-28') +,(4124, 604, 1 , 18.79, 6.75, 'On Order' , '2017-01-05') +,(4125, 605, 9 , 59.37, 1.61, 'On Order' , '2016-07-24') +,(4125, 608, 1 , 72.49, 2.72, 'On Order' , '2016-08-22') +,(4126, 610, 10, 13.83, 1.15, 'On Order' , '2016-09-29') +,(4126, 615, 10, 71.77, 9.08, 'No Stock' , '2017-02-24') +,(4127, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4128, 605, 6 , 94.61, 7.16, 'No Stock' , '2017-02-09') +,(4128, 616, 3 , 4.67 , 2.72, 'On Order' , '2016-04-06') +,(4129, 610, 5 , 73.89, 8.17, 'On Order' , '2016-04-30') +,(4130, 608, 6 , 47.42, 8.39, 'No Stock' , '2017-02-27') +,(4131, 602, 5 , 28.62, 6.07, 'No Stock' , '2016-03-21') +,(4132, 602, 7 , 38.86, 3.58, 'Allocated', '2016-06-21') +,(4132, 604, 4 , 89.39, 2.36, 'No Stock' , '2016-12-20') +,(4132, 605, 5 , 29.97, 9.78, 'No Stock' , '2016-08-03') +,(4133, 611, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4133, 613, 2 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4133, 615, 4 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4134, 606, 1 , 73.57, 3.21, 'Allocated', '2016-04-07') +,(4134, 608, 1 , 65.61, 8.68, 'On Order' , '2017-01-14') +,(4135, 603, 2 , 7.24 , 2.61, 'Allocated', '2017-01-02') +,(4135, 607, 6 , 15.99, 6.23, 'No Stock' , '2016-12-16') +,(4135, 609, 6 , 26.55, 2.9 , 'On Order' , '2016-11-25') +,(4135, 612, 8 , 17.99, 9.59, 'No Stock' , '2016-03-25') +,(4136, 606, 10, 16.82, 8.15, 'On Order' , '2016-06-22') +,(4137, 605, 2 , 39.96, 6.08, 'On Order' , '2016-05-22') +,(4138, 620, 6 , 4.6 , 3.68, 'Allocated', '2016-09-17') +,(4139, 601, 4 , 87.74, 7.37, 'No Stock' , '2016-11-25') +,(4140, 603, 10, 90.31, 6.8 , 'On Order' , '2016-05-23') +,(4140, 615, 8 , 82.86, 2.49, 'On Order' , '2016-12-24') +,(4141, 609, 7 , 20.28, 1.51, 'Allocated', '2017-02-10') +,(4142, 608, 7 , 55.47, 8.32, 'No Stock' , '2016-07-07') +,(4142, 619, 5 , 75.63, 1.64, 'Allocated', '2016-08-02') +,(4143, 606, 3 , 99.61, 4.9 , 'No Stock' , '2016-10-25') +,(4144, 604, 6 , 80.75, 3.9 , 'Allocated', '2016-09-09') +,(4145, 603, 3 , 57.97, 8.04, 'On Order' , '2016-06-17') +,(4146, 611, 8 , 69.7 , 6.14, 'On Order' , '2016-04-15') +,(4147, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4148, 602, 4 , 67.89, 1.73, 'Allocated', '2016-03-26') +,(4149, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4150, 615, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4151, 617, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4151, 618, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4152, 608, 10, 97.82, 9.97, 'No Stock' , '2016-07-11') +,(4152, 620, 10, 97.82, 9.97, 'No Stock' , '2016-07-11') +,(4153, 615, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4153, 618, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4153, 601, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4153, 613, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4154, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4154, 604, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4155, 606, 7 , 42.62, 2.57, 'No Stock' , '2017-02-11') +,(4155, 607, 2 , 83.04, 5.25, 'On Order' , '2016-09-01') +,(4155, 610, 6 , 90.56, 6.31, 'On Order' , '2016-10-18') +,(4156, 615, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4156, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4156, 601, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4157, 603, 9 , 93.09, 5.35, 'Allocated', '2016-08-03') +,(4157, 607, 6 , 40.05, 3.9 , 'On Order' , '2017-01-13') +,(4158, 612, 1 , 17.5 , 6.29, 'Allocated', '2016-04-14') +,(4158, 611, 1 , 17.5 , 6.29, 'Allocated', '2016-04-14') +,(4159, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4159, 612, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4160, 610, 8 , 42.67, 5.88, 'No Stock' , '2017-01-04') +,(4160, 620, 10, 87.78, 4.28, 'Allocated', '2016-11-20') +,(4161, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4161, 611, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4162, 613, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4162, 620, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4163, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4163, 612, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4163, 611, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4164, 607, 6 , 80.56, 4.32, 'On Order' , '2016-08-17') +,(4164, 608, 6 , 80.56, 4.32, 'On Order' , '2016-08-17') +,(4164, 617, 6 , 80.56, 4.32, 'On Order' , '2016-08-17') +,(4165, 604, 8 , 72.67, 7.56, 'On Order' , '2016-08-09') +,(4165, 603, 8 , 72.67, 7.56, 'On Order' , '2016-08-09') +,(4165, 614, 8 , 72.67, 7.56, 'On Order' , '2016-08-09') +,(4166, 601, 3 , 34.36, 9.92, 'No Stock' , '2016-09-01') +,(4166, 602, 10, 33.99, 5.76, 'Allocated', '2016-05-26') +,(4167, 603, 5 , 58.2 , 1.14, 'Allocated', '2016-06-20') +,(4167, 608, 1 , 20.01, 6.24, 'No Stock' , '2017-01-05') +,(4168, 601, 1 , 59.45, 7.44, 'On Order' , '2016-09-06') +,(4168, 605, 1 , 59.45, 7.44, 'On Order' , '2016-09-06') +,(4169, 604, 2 , 93.43, 2.26, 'No Stock' , '2017-01-16') +,(4169, 609, 2 , 93.43, 2.26, 'No Stock' , '2017-01-16') +,(4169, 607, 2 , 93.43, 2.26, 'No Stock' , '2017-01-16') +,(4170, 607, 10, 68.27, 9.02, 'No Stock' , '2017-02-11') +,(4170, 620, 10, 68.27, 9.02, 'No Stock' , '2017-02-11') +,(4171, 610, 10, 49.38, 3.71, 'Allocated', '2016-04-25') +,(4171, 601, 10, 49.38, 3.71, 'Allocated', '2016-04-25') +,(4171, 611, 10, 49.38, 3.71, 'Allocated', '2016-04-25') +,(4171, 613, 10, 49.38, 3.71, 'Allocated', '2016-04-25') +,(4171, 615, 10, 49.38, 3.71, 'Allocated', '2016-04-25') +,(4172, 606, 6 , 88.26, 2.95, 'No Stock' , '2016-04-11') +,(4172, 609, 7 , 60.97, 1.12, 'Allocated', '2016-10-14') +,(4173, 601, 10, 11.22, 9.03, 'On Order' , '2017-01-26') +,(4173, 603, 10, 11.22, 9.03, 'On Order' , '2017-01-26') +,(4173, 605, 10, 11.22, 9.03, 'On Order' , '2017-01-26') +,(4174, 607, 8 , 53.95, 6.31, 'No Stock' , '2016-04-30') +,(4174, 612, 2 , 13.56, 7.15, 'No Stock' , '2016-07-08') +,(4175, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4175, 617, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4175, 620, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4176, 615, 2 , 70.24, 1.09, 'Allocated', '2017-01-21') +,(4176, 616, 2 , 70.24, 1.09, 'Allocated', '2017-01-21') +,(4177, 601, 2 , 17.86, 2.99, 'Allocated', '2016-05-07') +,(4177, 604, 8 , 18.39, 6.73, 'On Order' , '2016-04-05') +,(4178, 605, 9 , 23.59, 8.82, 'Allocated', '2016-09-11') +,(4178, 607, 9 , 62.59, 7.88, 'No Stock' , '2016-04-18') +,(4179, 614, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4180, 602, 7 , 48.19, 6.05, 'Allocated', '2016-11-30') +,(4180, 603, 1 , 48.19, 6.05, 'Allocated', '2016-11-30') +,(4181, 602, 2 , 64.2 , 4.74, 'Allocated', '2016-08-16') +,(4181, 603, 3 , 41.45, 2.49, 'Allocated', '2016-04-18') +,(4181, 604, 5 , 86.42, 6.42, 'No Stock' , '2016-05-03') +,(4182, 611, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4183, 615, 1 , 68.34, 8.16, 'On Order' , '2016-12-22') +,(4184, 601, 2 , 95.18, 2.74, 'Allocated', '2016-09-16') +,(4184, 603, 9 , 99.41, 9.44, 'No Stock' , '2016-07-01') +,(4184, 604, 1 , 29.52, 3.48, 'Allocated', '2016-04-02') +,(4185, 602, 2 , 22.84, 5.5 , 'On Order' , '2016-10-20') +,(4185, 611, 10, 34.57, 4.27, 'Allocated', '2017-02-05') +,(4185, 612, 4 , 85.32, 5.03, 'Allocated', '2017-03-14') +,(4185, 619, 9 , 64.97, 1.57, 'No Stock' , '2016-10-19') +,(4186, 605, 2 , 80.08, 7.63, 'On Order' , '2017-01-31') +,(4187, 602, 9 , 87.92, 7.74, 'On Order' , '2016-11-13') +,(4187, 616, 3 , 73.39, 6.52, 'On Order' , '2016-09-15') +,(4188, 604, 8 , 30.36, 1.97, 'No Stock' , '2016-06-05') +,(4188, 605, 5 , 70.95, 6.11, 'On Order' , '2016-03-31') +,(4188, 611, 3 , 23.18, 8.76, 'On Order' , '2016-03-30') +,(4189, 608, 4 , 52.23, 3.08, 'No Stock' , '2016-04-12') +,(4190, 602, 10, 17.3 , 4.18, 'No Stock' , '2016-03-29') +,(4190, 615, 6 , 34.29, 9.45, 'Allocated', '2016-11-01') +,(4191, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4192, 602, 4 , 90.29, 5.09, 'Allocated', '2017-02-14') +,(4192, 605, 8 , 1.03 , 1.28, 'On Order' , '2017-02-14') +,(4192, 615, 1 , 11.61, 7.49, 'No Stock' , '2016-08-11') +,(4193, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4194, 618, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4195, 617, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4196, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4197, 608, 10, 60.36, 3.99, 'On Order' , '2016-10-30') +,(4198, 606, 1 , 58.71, 2.32, 'No Stock' , '2016-06-26') +,(4199, 602, 8 , 12.59, 9.45, 'Allocated', '2016-04-16') +,(4199, 603, 7 , 5.5 , 2.26, 'No Stock' , '2016-11-28') +,(4200, 605, 10, 92.81, 1.0 , 'No Stock' , '2017-03-07') +,(4201, 606, 3 , 46.48, 5.94, 'Allocated', '2016-12-15') +,(4201, 608, 2 , 97.29, 5.87, 'No Stock' , '2016-09-12') +,(4202, 609, 4 , 56.7 , 2.07, 'No Stock' , '2017-03-11') +,(4202, 608, 4 , 56.7 , 2.07, 'No Stock' , '2017-03-11') +,(4203, 610, 2 , 29.12, 6.46, 'No Stock' , '2016-10-27') +,(4203, 609, 4 , 56.7 , 2.07, 'No Stock' , '2017-03-11') +,(4204, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4204, 609, 4 , 56.7 , 2.07, 'No Stock' , '2017-03-11') +,(4205, 610, 4 , 78.23, 5.95, 'No Stock' , '2016-06-21') +,(4205, 609, 4 , 56.7 , 2.07, 'No Stock' , '2017-03-11') +,(4206, 603, 2 , 40.49, 6.94, 'On Order' , '2017-02-23') +,(4206, 619, 6 , 80.19, 3.28, 'No Stock' , '2017-01-21') +,(4207, 604, 9 , 84.48, 7.01, 'No Stock' , '2016-08-17') +,(4207, 605, 9 , 41.79, 1.55, 'On Order' , '2016-06-27') +,(4207, 610, 5 , 12.3 , 9.51, 'On Order' , '2016-05-17') +,(4208, 603, 7 , 37.26, 3.68, 'Allocated', '2016-03-30') +,(4208, 605, 5 , 82.65, 2.76, 'On Order' , '2016-12-11') +,(4208, 607, 1 , 84.88, 8.67, 'No Stock' , '2016-04-28') +,(4208, 609, 1 , 88.01, 1.98, 'Allocated', '2016-10-04') +,(4208, 610, 6 , 88.85, 4.2 , 'No Stock' , '2016-04-19') +,(4209, 606, 6 , 46.31, 8.98, 'Allocated', '2016-04-20') +,(4210, 603, 2 , 92.12, 8.78, 'No Stock' , '2016-12-11') +,(4210, 609, 7 , 70.37, 6.89, 'Allocated', '2016-06-23') +,(4211, 614, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4212, 613, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4213, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4214, 608, 3 , 37.43, 5.18, 'Allocated', '2016-05-15') +,(4214, 610, 9 , 35.48, 7.16, 'On Order' , '2017-02-13') +,(4214, 611, 7 , 84.99, 8.17, 'No Stock' , '2016-07-08') +,(4215, 610, 5 , 4.35 , 2.65, 'Allocated', '2016-07-24') +,(4216, 606, 3 , 79.91, 8.92, 'Allocated', '2016-05-02') +,(4216, 608, 8 , 45.75, 3.7 , 'Allocated', '2017-02-24') +,(4216, 615, 1 , 55.11, 8.94, 'No Stock' , '2016-05-06') +,(4217, 605, 5 , 40.67, 3.31, 'On Order' , '2016-11-09') +,(4217, 610, 5 , 20.0 , 8.58, 'On Order' , '2016-07-27') +,(4218, 615, 7 , 34.14, 8.03, 'Allocated', '2016-11-12') +,(4218, 619, 9 , 62.61, 5.74, 'On Order' , '2016-11-08') +,(4219, 604, 9 , 46.24, 2.42, 'No Stock' , '2016-10-31') +,(4219, 613, 7 , 26.63, 3.9 , 'No Stock' , '2016-12-04') +,(4219, 619, 1 , 98.58, 7.38, 'No Stock' , '2016-08-06') +,(4220, 604, 5 , 66.78, 9.28, 'No Stock' , '2016-10-09') +,(4220, 609, 6 , 62.82, 9.71, 'No Stock' , '2016-04-06') +,(4221, 602, 8 , 8.44 , 1.85, 'Allocated', '2016-11-25') +,(4222, 601, 10, 84.14, 2.59, 'No Stock' , '2016-06-25') +,(4222, 604, 9 , 39.15, 8.12, 'No Stock' , '2016-09-27') +,(4223, 602, 2 , 74.35, 9.94, 'Allocated', '2016-04-18') +,(4223, 611, 4 , 58.85, 6.75, 'No Stock' , '2017-03-04') +,(4224, 618, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4225, 605, 7 , 88.08, 8.69, 'On Order' , '2016-11-13') +,(4226, 606, 1 , 84.22, 3.54, 'On Order' , '2017-01-19') +,(4226, 608, 4 , 97.1 , 4.73, 'On Order' , '2016-04-25') +,(4227, 606, 9 , 74.37, 1.85, 'On Order' , '2016-12-19') +,(4227, 607, 9 , 74.37, 1.85, 'On Order' , '2016-12-19') +,(4228, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4228, 618, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4228, 610, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4229, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4229, 618, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4230, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4230, 618, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4230, 619, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4231, 611, 6 , 36.05, 2.56, 'On Order' , '2017-02-12') +,(4231, 618, 6 , 36.05, 2.56, 'On Order' , '2017-02-12') +,(4232, 615, 8 , 16.99, 7.26, 'No Stock' , '2016-11-28') +,(4232, 618, 8 , 16.99, 7.26, 'No Stock' , '2016-11-28') +,(4233, 608, 6 , 70.71, 1.75, 'Allocated', '2016-09-29') +,(4233, 610, 6 , 70.71, 1.75, 'Allocated', '2016-09-29') +,(4233, 618, 6 , 70.71, 1.75, 'Allocated', '2016-09-29') +,(4234, 604, 5 , 15.26, 9.54, 'No Stock' , '2016-04-06') +,(4234, 619, 5 , 15.26, 9.54, 'No Stock' , '2016-04-06') +,(4235, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4235, 619, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4236, 607, 8 , 46.97, 4.9 , 'Allocated', '2017-02-16') +,(4236, 617, 8 , 46.97, 4.9 , 'Allocated', '2017-02-16') +,(4236, 620, 8 , 46.97, 4.9 , 'Allocated', '2017-02-16') +,(4237, 602, 1 , 27.79, 8.84, 'No Stock' , '2016-11-07') +,(4237, 620, 1 , 27.79, 8.84, 'No Stock' , '2016-11-07') +,(4238, 602, 3 , 32.5 , 2.63, 'No Stock' , '2016-04-09') +,(4238, 608, 8 , 88.3 , 7.59, 'On Order' , '2016-08-18') +,(4239, 606, 7 , 99.65, 2.31, 'Allocated', '2017-03-04') +,(4239, 616, 7 , 99.65, 2.31, 'Allocated', '2017-03-04') +,(4240, 606, 10, 43.66, 2.48, 'No Stock' , '2017-02-05') +,(4240, 609, 2 , 56.95, 2.11, 'No Stock' , '2016-11-15') +,(4241, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4241, 618, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4241, 620, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4242, 605, 6 , 52.37, 8.56, 'No Stock' , '2016-06-10') +,(4242, 606, 6 , 52.37, 8.56, 'No Stock' , '2016-06-10') +,(4242, 607, 6 , 52.37, 8.56, 'No Stock' , '2016-06-10') +,(4243, 604, 2 , 6.33 , 1.16, 'No Stock' , '2016-04-09') +,(4243, 614, 2 , 6.33 , 1.16, 'No Stock' , '2016-04-09') +,(4243, 610, 2 , 6.33 , 1.16, 'No Stock' , '2016-04-09') +,(4244, 609, 4 , 67.62, 7.49, 'On Order' , '2016-09-03') +,(4244, 619, 4 , 67.62, 7.49, 'On Order' , '2016-09-03') +,(4244, 620, 4 , 67.62, 7.49, 'On Order' , '2016-09-03') +,(4245, 608, 1 , 32.47, 9.9 , 'Allocated', '2017-03-14') +,(4245, 618, 1 , 32.47, 9.9 , 'Allocated', '2017-03-14') +,(4245, 620, 1 , 32.47, 9.9 , 'Allocated', '2017-03-14') +,(4246, 603, 10, 53.94, 3.85, 'No Stock' , '2016-06-04') +,(4246, 606, 7 , 6.16 , 9.37, 'No Stock' , '2016-07-05') +,(4246, 607, 3 , 27.34, 1.97, 'Allocated', '2016-11-15') +,(4246, 611, 4 , 73.06, 1.26, 'No Stock' , '2017-02-28') +,(4247, 601, 4 , 66.41, 4.54, 'On Order' , '2017-02-26') +,(4247, 605, 2 , 61.24, 5.9 , 'Allocated', '2016-12-15') +,(4248, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4248, 620, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4249, 615, 2 , 74.52, 3.88, 'On Order' , '2016-06-09') +,(4249, 620, 2 , 74.52, 3.88, 'On Order' , '2016-06-09') +,(4249, 609, 2 , 74.52, 3.88, 'On Order' , '2016-06-09') +,(4250, 606, 7 , 63.89, 3.39, 'On Order' , '2016-12-31') +,(4250, 612, 8 , 75.06, 4.19, 'Allocated', '2016-06-26') +,(4251, 602, 1 , 1.75 , 1.73, 'No Stock' , '2016-12-07') +,(4251, 604, 8 , 43.98, 1.58, 'Allocated', '2016-07-28') +,(4252, 606, 4 , 94.24, 1.31, 'No Stock' , '2017-03-14') +,(4252, 619, 10, 41.46, 4.18, 'No Stock' , '2017-03-03') +,(4252, 620, 3 , 29.91, 4.91, 'On Order' , '2016-12-28') +,(4253, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4253, 610, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4254, 610, 3 , 5.01 , 9.93, 'On Order' , '2017-02-03') +,(4254, 620, 2 , 5.01 , 9.93, 'On Order' , '2017-02-03') +,(4254, 612, 3 , 5.01 , 9.93, 'On Order' , '2017-02-03') +,(4255, 610, 7 , 45.49, 8.0 , 'Allocated', '2016-08-01') +,(4255, 611, 7 , 45.49, 8.0 , 'Allocated', '2016-08-01') +,(4256, 604, 9 , 6.74 , 1.84, 'No Stock' , '2016-06-13') +,(4256, 612, 4 , 42.02, 2.86, 'Allocated', '2016-09-19') +,(4256, 620, 2 , 31.71, 4.97, 'Allocated', '2016-10-02') +,(4257, 617, 1, 10.00, 1.00, 'On Order' , '2016-12-14') +,(4257, 610, 1, 10.00, 1.00, 'On Order' , '2016-12-14') +,(4257, 611, 1, 10.00, 1.00, 'On Order' , '2016-12-14') +,(4258, 605, 7 , 22.45, 8.41, 'On Order' , '2016-06-02') +,(4258, 615, 3 , 69.12, 3.65, 'Allocated', '2017-02-27') +,(4258, 619, 4 , 62.32, 2.23, 'Allocated', '2017-02-20') +,(4259, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4260, 603, 1 , 27.68, 1.99, 'Allocated', '2016-09-20') +,(4260, 604, 3 , 59.65, 3.05, 'No Stock' , '2016-12-31') +,(4261, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4262, 602, 4 , 51.73, 3.06, 'Allocated', '2017-01-17') +,(4263, 612, 4 , 18.46, 7.86, 'Allocated', '2016-08-12') +,(4263, 615, 4 , 18.46, 7.86, 'Allocated', '2016-08-12') +,(4263, 616, 4 , 18.46, 7.86, 'Allocated', '2016-08-12') +,(4264, 604, 8 , 82.02, 9.19, 'Allocated', '2016-11-28') +,(4264, 614, 8 , 82.02, 9.19, 'Allocated', '2016-11-28') +,(4265, 618, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4265, 620, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4266, 601, 2 , 66.57, 6.27, 'Allocated', '2016-09-19') +,(4266, 602, 2 , 66.57, 6.27, 'Allocated', '2016-09-19') +,(4267, 601, 4 , 44.78, 6.86, 'No Stock' , '2016-09-27') +,(4267, 610, 4 , 19.08, 6.41, 'No Stock' , '2016-12-24') +,(4268, 611, 1 , 24.72, 8.14, 'Allocated', '2016-06-08') +,(4268, 612, 1 , 24.72, 8.14, 'Allocated', '2016-06-08') +,(4269, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4269, 617, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4269, 618, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4270, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4270, 612, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4270, 620, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4271, 603, 2 , 80.47, 4.81, 'Allocated', '2016-05-25') +,(4271, 604, 8 , 38.65, 4.02, 'No Stock' , '2016-05-09') +,(4272, 610, 7 , 66.28, 2.85, 'No Stock' , '2016-09-17') +,(4273, 612, 10, 85.38, 8.44, 'No Stock' , '2016-12-19') +,(4274, 613, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4275, 610, 8 , 1.12 , 8.65, 'Allocated', '2016-10-28') +,(4275, 615, 1 , 24.01, 5.55, 'No Stock' , '2016-12-30') +,(4276, 603, 3 , 44.76, 7.28, 'No Stock' , '2016-12-28') +,(4277, 610, 9 , 40.01, 8.62, 'No Stock' , '2016-11-10') +,(4278, 603, 6 , 32.0 , 1.23, 'Allocated', '2016-12-23') +,(4278, 608, 4 , 38.01, 9.45, 'Allocated', '2016-10-05') +,(4278, 609, 5 , 31.99, 5.41, 'No Stock' , '2016-10-23') +,(4279, 613, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4280, 606, 5 , 7.52 , 2.76, 'Allocated', '2016-05-27') +,(4280, 609, 4 , 37.09, 4.44, 'On Order' , '2016-08-10') +,(4281, 610, 9 , 37.07, 8.7 , 'On Order' , '2016-12-28') +,(4281, 611, 2 , 37.07, 8.7 , 'On Order' , '2016-12-28') +,(4281, 612, 1 , 37.07, 8.7 , 'On Order' , '2016-12-28') +,(4282, 601, 1 , 19.14, 3.98, 'On Order' , '2016-11-09') +,(4282, 606, 3 , 88.94, 6.79, 'On Order' , '2016-09-29') +,(4282, 609, 6 , 25.35, 5.22, 'Allocated', '2016-10-05') +,(4283, 601, 1 , 14.78, 3.31, 'On Order' , '2016-10-07') +,(4284, 606, 5 , 32.57, 7.22, 'On Order' , '2016-08-24') +,(4285, 604, 5 , 47.88, 3.77, 'No Stock' , '2016-12-09') +,(4285, 615, 8 , 9.28 , 2.13, 'Allocated', '2016-03-27') +,(4286, 620, 5 , 63.24, 7.62, 'Allocated', '2016-12-06') +,(4287, 602, 6 , 2.9 , 9.5 , 'On Order' , '2016-10-06') +,(4287, 605, 5 , 7.63 , 2.78, 'Allocated', '2016-08-22') +,(4287, 611, 1 , 8.98 , 3.39, 'Allocated', '2016-07-18') +,(4287, 614, 3 , 34.4 , 7.12, 'On Order' , '2017-03-04') +,(4288, 604, 6 , 57.67, 3.25, 'Allocated', '2016-05-18') +,(4289, 601, 7 , 19.32, 7.31, 'On Order' , '2017-01-21') +,(4289, 615, 10, 89.16, 2.08, 'No Stock' , '2016-06-03') +,(4290, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4291, 601, 1 , 68.5 , 2.58, 'Allocated', '2016-11-05') +,(4291, 603, 5 , 11.27, 5.56, 'Allocated', '2016-06-10') +,(4291, 606, 1 , 76.82, 3.31, 'Allocated', '2016-09-27') +,(4292, 608, 10, 27.45, 4.8 , 'On Order' , '2016-05-12') +,(4292, 610, 9 , 16.78, 5.96, 'No Stock' , '2016-05-05') +,(4293, 612, 4 , 69.21, 2.07, 'Allocated', '2016-08-23') +,(4294, 619, 4 , 81.5 , 9.13, 'Allocated', '2017-01-20') +,(4295, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4296, 613, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4297, 604, 4 , 19.21, 1.7 , 'Allocated', '2016-08-20') +,(4297, 606, 4 , 71.24, 5.74, 'No Stock' , '2016-10-11') +,(4298, 613, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4299, 603, 8 , 81.7 , 5.69, 'Allocated', '2016-07-06') +,(4300, 601, 5 , 35.51, 8.38, 'On Order' , '2016-12-23') +,(4300, 607, 5 , 46.94, 6.82, 'No Stock' , '2016-07-29') +,(4301, 605, 6 , 99.32, 1.22, 'Allocated', '2016-09-02') +,(4301, 620, 7 , 96.67, 6.9 , 'Allocated', '2016-11-24') +,(4302, 617, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4303, 605, 8 , 31.92, 5.62, 'On Order' , '2016-04-09') +,(4304, 615, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4305, 606, 1 , 2.53 , 1.15, 'On Order' , '2016-12-03') +,(4305, 609, 6 , 76.41, 7.87, 'Allocated', '2016-07-05') +,(4305, 612, 3 , 31.58, 5.53, 'On Order' , '2016-10-01') +,(4306, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4307, 601, 7 , 36.63, 3.9 , 'On Order' , '2016-09-16') +,(4307, 606, 10, 56.47, 8.96, 'No Stock' , '2017-02-25') +,(4308, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4309, 606, 6 , 84.25, 2.28, 'On Order' , '2016-04-07') +,(4310, 605, 7 , 15.88, 2.48, 'Allocated', '2017-02-17') +,(4311, 603, 2 , 67.26, 6.18, 'No Stock' , '2016-05-06') +,(4312, 619, 4 , 87.5 , 6.57, 'Allocated', '2017-03-14') +,(4313, 602, 3 , 87.01, 4.45, 'On Order' , '2016-08-30') +,(4313, 610, 7 , 54.92, 8.87, 'No Stock' , '2017-01-20') +,(4314, 602, 9 , 49.19, 2.67, 'Allocated', '2016-07-24') +,(4314, 607, 10, 32.19, 8.12, 'On Order' , '2016-11-23') +,(4315, 602, 7 , 9.25 , 3.78, 'On Order' , '2017-01-04') +,(4316, 613, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4317, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4318, 609, 5 , 29.17, 3.35, 'No Stock' , '2016-11-28') +,(4318, 610, 4 , 41.75, 3.7 , 'On Order' , '2016-09-09') +,(4318, 620, 5 , 81.63, 1.49, 'On Order' , '2016-04-16') +,(4319, 614, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4320, 613, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4321, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4322, 603, 2 , 21.09, 9.37, 'No Stock' , '2016-11-29') +,(4323, 608, 8 , 24.05, 9.49, 'On Order' , '2016-08-12') +,(4324, 607, 7 , 83.23, 1.48, 'On Order' , '2016-07-10') +,(4325, 608, 10, 35.28, 1.8 , 'Allocated', '2016-09-01') +,(4326, 602, 8 , 69.18, 4.43, 'No Stock' , '2016-07-31') +,(4326, 610, 2 , 24.44, 8.1 , 'No Stock' , '2016-03-29') +,(4327, 608, 3 , 22.57, 4.64, 'Allocated', '2016-03-23') +,(4328, 604, 1 , 55.53, 3.16, 'On Order' , '2016-12-14') +,(4328, 605, 2 , 38.78, 6.97, 'Allocated', '2017-03-04') +,(4328, 607, 5 , 28.94, 3.59, 'Allocated', '2016-08-01') +,(4329, 603, 6 , 65.93, 2.86, 'On Order' , '2016-10-25') +,(4330, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4331, 602, 5 , 37.37, 6.39, 'No Stock' , '2016-03-19') +,(4332, 606, 5 , 93.96, 3.31, 'No Stock' , '2016-08-09') +,(4332, 610, 5 , 3.77 , 6.74, 'Allocated', '2016-06-23') +,(4333, 608, 7 , 14.29, 3.95, 'On Order' , '2016-06-16') +,(4334, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4335, 609, 6 , 63.15, 9.3 , 'Allocated', '2016-08-31') +,(4336, 613, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4337, 610, 1 , 52.98, 5.68, 'Allocated', '2016-03-19') +,(4338, 610, 1 , 83.94, 3.56, 'Allocated', '2016-11-03') +,(4339, 604, 10, 78.06, 5.32, 'No Stock' , '2016-11-19') +,(4340, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4341, 609, 6 , 52.04, 7.63, 'No Stock' , '2016-11-25') +,(4341, 615, 1 , 9.44 , 8.66, 'No Stock' , '2016-09-06') +,(4342, 615, 6 , 67.41, 8.5 , 'Allocated', '2016-08-28') +,(4343, 615, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4344, 610, 10, 61.53, 5.36, 'On Order' , '2016-04-30') +,(4345, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4346, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4347, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4348, 608, 1 , 96.42, 4.57, 'On Order' , '2016-05-14') +,(4348, 610, 3 , 38.0 , 5.74, 'On Order' , '2016-05-30') +,(4348, 611, 6 , 38.59, 6.7 , 'On Order' , '2016-08-16') +,(4349, 613, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4350, 602, 8 , 81.72, 7.57, 'Allocated', '2016-08-18') +,(4350, 604, 6 , 95.31, 9.43, 'On Order' , '2016-12-29') +,(4350, 608, 9 , 43.57, 6.54, 'No Stock' , '2016-08-24') +,(4351, 602, 1 , 37.63, 3.31, 'No Stock' , '2016-08-26') +,(4351, 607, 9 , 83.22, 2.44, 'No Stock' , '2016-04-11') +,(4352, 602, 3 , 13.09, 3.98, 'No Stock' , '2016-10-03') +,(4352, 603, 9 , 88.58, 4.87, 'On Order' , '2017-03-05') +,(4352, 614, 4 , 47.62, 5.05, 'Allocated', '2016-05-30') +,(4353, 612, 9 , 28.8 , 1.77, 'Allocated', '2016-03-28') +,(4354, 618, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4355, 607, 4 , 20.25, 3.18, 'No Stock' , '2016-04-27') +,(4355, 608, 9 , 73.3 , 5.95, 'Allocated', '2016-12-08') +,(4355, 609, 7 , 26.16, 6.88, 'Allocated', '2016-12-09') +,(4356, 614, 8 , 93.97, 2.88, 'No Stock' , '2016-06-14') +,(4357, 605, 6 , 24.39, 5.53, 'No Stock' , '2016-07-31') +,(4357, 612, 4 , 71.28, 1.94, 'No Stock' , '2016-07-08') +,(4358, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4359, 617, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4360, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4361, 601, 6 , 45.27, 1.05, 'Allocated', '2016-03-29') +,(4361, 609, 10, 39.75, 1.28, 'On Order' , '2016-07-15') +,(4362, 603, 4 , 42.92, 5.17, 'No Stock' , '2016-09-24') +,(4363, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4364, 602, 8 , 90.01, 4.2 , 'On Order' , '2017-02-09') +,(4365, 601, 2 , 92.96, 3.73, 'Allocated', '2016-06-10') +,(4365, 603, 7 , 86.67, 9.6 , 'On Order' , '2016-07-31') +,(4366, 604, 6 , 52.01, 2.02, 'No Stock' , '2016-09-23') +,(4366, 605, 9 , 88.21, 3.68, 'On Order' , '2016-08-10') +,(4366, 609, 8 , 80.78, 3.99, 'No Stock' , '2016-05-07') +,(4367, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4368, 604, 4 , 53.46, 4.56, 'No Stock' , '2016-09-07') +,(4369, 612, 2 , 8.5 , 3.86, 'Allocated', '2017-01-20') +,(4370, 603, 9 , 46.22, 8.2 , 'On Order' , '2016-09-02') +,(4370, 604, 10, 10.38, 2.29, 'Allocated', '2016-06-03') +,(4371, 610, 10, 23.33, 4.07, 'On Order' , '2016-08-25') +,(4372, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4373, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4374, 604, 3 , 29.51, 2.34, 'No Stock' , '2017-03-07') +,(4375, 618, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4376, 608, 10, 5.55 , 3.21, 'No Stock' , '2016-09-14') +,(4377, 602, 9 , 91.62, 8.57, 'On Order' , '2016-08-26') +,(4378, 603, 8 , 74.83, 5.38, 'On Order' , '2016-04-11') +,(4379, 605, 9 , 53.7 , 5.65, 'On Order' , '2016-10-29') +,(4380, 618, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4381, 619, 1 , 35.54, 3.78, 'Allocated', '2016-07-27') +,(4382, 602, 8 , 33.64, 7.95, 'Allocated', '2016-11-05') +,(4382, 606, 4 , 68.17, 6.06, 'On Order' , '2017-01-22') +,(4383, 613, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4384, 615, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4385, 609, 1 , 18.13, 8.94, 'On Order' , '2016-03-25') +,(4386, 613, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4387, 602, 8 , 86.06, 9.74, 'Allocated', '2016-12-01') +,(4387, 606, 8 , 87.31, 7.53, 'No Stock' , '2016-06-12') +,(4387, 610, 3 , 47.55, 5.2 , 'Allocated', '2016-10-06') +,(4388, 602, 4 , 5.86 , 3.52, 'On Order' , '2016-05-09') +,(4388, 603, 8 , 24.25, 6.18, 'Allocated', '2016-09-22') +,(4388, 606, 6 , 29.46, 2.93, 'Allocated', '2016-09-11') +,(4388, 619, 1 , 36.76, 7.37, 'No Stock' , '2016-12-29') +,(4389, 602, 1 , 94.23, 9.35, 'Allocated', '2016-06-13') +,(4389, 603, 2 , 40.15, 8.39, 'No Stock' , '2016-08-09') +,(4390, 609, 4 , 7.02 , 5.61, 'On Order' , '2016-11-29') +,(4391, 607, 1 , 48.41, 8.97, 'On Order' , '2016-07-10') +,(4392, 603, 8 , 74.91, 8.23, 'No Stock' , '2016-04-07') +,(4393, 611, 4 , 55.83, 4.56, 'Allocated', '2016-04-13') +,(4394, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4395, 610, 7 , 82.73, 5.09, 'No Stock' , '2016-09-27') +,(4395, 617, 6 , 26.05, 6.29, 'On Order' , '2016-07-24') +,(4396, 605, 9 , 66.19, 1.32, 'No Stock' , '2017-02-05') +,(4396, 619, 4 , 3.15 , 1.04, 'On Order' , '2016-07-08') +,(4397, 619, 9 , 78.52, 7.64, 'No Stock' , '2016-08-19') +,(4398, 618, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4399, 610, 7 , 85.03, 4.71, 'No Stock' , '2016-05-04') +,(4400, 612, 9 , 36.85, 6.54, 'On Order' , '2016-10-31') +,(4400, 620, 2 , 15.9 , 5.62, 'On Order' , '2016-06-18') +,(4401, 602, 1 , 91.01, 4.13, 'No Stock' , '2016-09-27') +,(4401, 604, 10, 98.7 , 5.27, 'Allocated', '2016-06-03') +,(4402, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4403, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4404, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4405, 604, 3 , 46.99, 9.31, 'No Stock' , '2016-09-08') +,(4405, 610, 10, 4.94 , 1.68, 'On Order' , '2016-11-15') +,(4406, 602, 7 , 25.84, 7.67, 'On Order' , '2016-10-28') +,(4406, 606, 2 , 96.43, 5.64, 'No Stock' , '2016-11-14') +,(4406, 607, 10, 14.91, 3.88, 'No Stock' , '2016-06-18') +,(4407, 606, 9 , 20.82, 6.82, 'No Stock' , '2016-10-08') +,(4407, 608, 4 , 29.19, 7.26, 'No Stock' , '2016-12-15') +,(4408, 605, 4 , 12.83, 9.29, 'No Stock' , '2016-11-20') +,(4408, 615, 4 , 89.77, 2.7 , 'No Stock' , '2017-03-07') +,(4408, 619, 3 , 36.44, 8.86, 'No Stock' , '2016-12-17') +,(4409, 602, 2 , 36.96, 9.73, 'Allocated', '2016-08-19') +,(4409, 611, 7 , 94.98, 4.11, 'On Order' , '2016-05-17') +,(4410, 603, 7 , 13.79, 5.05, 'No Stock' , '2016-09-28') +,(4410, 604, 10, 70.24, 4.07, 'No Stock' , '2016-10-27') +,(4410, 607, 6 , 26.39, 7.8 , 'No Stock' , '2016-03-21') +,(4411, 602, 7 , 3.47 , 3.86, 'No Stock' , '2017-03-14') +,(4411, 611, 3 , 10.43, 3.67, 'On Order' , '2016-12-27') +,(4412, 605, 10, 26.07, 6.78, 'Allocated', '2017-02-16') +,(4412, 607, 7 , 76.81, 5.67, 'No Stock' , '2016-11-26') +,(4412, 610, 3 , 98.77, 3.34, 'On Order' , '2016-09-29') +,(4413, 617, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4414, 606, 5 , 26.01, 4.54, 'On Order' , '2016-03-23') +,(4415, 605, 5 , 74.86, 1.68, 'No Stock' , '2016-09-18') +,(4416, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4417, 601, 6 , 66.38, 5.22, 'No Stock' , '2016-07-07') +,(4417, 604, 7 , 96.99, 4.89, 'No Stock' , '2016-09-30') +,(4418, 609, 8 , 59.88, 5.52, 'Allocated', '2016-09-03') +,(4419, 604, 4 , 54.04, 4.95, 'On Order' , '2017-01-05') +,(4420, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4421, 605, 2 , 96.34, 1.7 , 'On Order' , '2016-06-10') +,(4422, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4423, 602, 3 , 25.88, 5.34, 'Allocated', '2016-04-19') +,(4423, 605, 5 , 4.06 , 2.22, 'On Order' , '2016-06-21') +,(4423, 608, 9 , 20.4 , 4.26, 'On Order' , '2016-08-17') +,(4424, 605, 8 , 44.66, 4.23, 'Allocated', '2016-11-06') +,(4425, 607, 7 , 18.91, 6.75, 'On Order' , '2016-11-28') +,(4425, 608, 4 , 60.11, 4.46, 'No Stock' , '2017-02-15') +,(4426, 606, 8 , 44.98, 6.5 , 'On Order' , '2016-11-13') +,(4426, 607, 4 , 78.46, 2.91, 'Allocated', '2017-01-26') +,(4427, 604, 2 , 61.91, 3.08, 'On Order' , '2016-09-01') +,(4427, 607, 10, 53.82, 8.17, 'No Stock' , '2016-11-09') +,(4428, 603, 2 , 81.15, 5.94, 'Allocated', '2016-12-01') +,(4428, 605, 9 , 48.38, 5.26, 'On Order' , '2016-07-08') +,(4429, 606, 10, 28.8 , 2.75, 'Allocated', '2017-03-03') +,(4430, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4431, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4432, 603, 9 , 52.12, 4.42, 'No Stock' , '2016-09-03') +,(4433, 601, 4 , 34.09, 9.94, 'No Stock' , '2016-04-18') +,(4433, 605, 1 , 65.04, 7.32, 'On Order' , '2016-04-04') +,(4434, 601, 2 , 61.28, 1.15, 'On Order' , '2016-03-18') +,(4434, 605, 2 , 61.28, 1.15, 'On Order' , '2016-03-18') +,(4434, 607, 2 , 61.28, 1.15, 'On Order' , '2016-03-18') +,(4435, 610, 10, 9.19 , 7.18, 'On Order' , '2016-12-08') +,(4435, 612, 10, 9.19 , 7.18, 'On Order' , '2016-12-08') +,(4435, 614, 10, 9.19 , 7.18, 'On Order' , '2016-12-08') +,(4436, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4436, 618, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4436, 620, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4437, 601, 7 , 56.48, 9.07, 'Allocated', '2016-05-05') +,(4437, 602, 1 , 98.71, 8.08, 'On Order' , '2017-03-16') +,(4437, 609, 7 , 12.69, 5.56, 'On Order' , '2016-12-16') +,(4438, 604, 1 , 97.24, 5.43, 'Allocated', '2016-10-22') +,(4438, 605, 1 , 97.24, 5.43, 'Allocated', '2016-10-22') +,(4438, 606, 1 , 97.24, 5.43, 'Allocated', '2016-10-22') +,(4439, 615, 5 , 11.46, 3.07, 'Allocated', '2016-06-10') +,(4439, 618, 1 , 97.24, 5.43, 'Allocated', '2016-10-22') +,(4439, 620, 1 , 97.24, 5.43, 'Allocated', '2016-10-22') +,(4440, 603, 9 , 66.05, 8.7 , 'No Stock' , '2016-11-08') +,(4440, 616, 1 , 97.24, 5.43, 'Allocated', '2016-10-22') +,(4440, 620, 1 , 97.24, 5.43, 'Allocated', '2016-10-22') +,(4441, 602, 4 , 79.49, 2.54, 'Allocated', '2017-02-19') +,(4441, 609, 4 , 88.86, 9.63, 'Allocated', '2016-06-06') +,(4442, 608, 1 , 55.66, 2.52, 'Allocated', '2016-09-08') +,(4443, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4444, 602, 4 , 52.6 , 9.83, 'On Order' , '2017-01-18') +,(4444, 605, 8 , 81.63, 9.58, 'On Order' , '2017-01-27') +,(4445, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4445, 601, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4445, 607, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4446, 602, 3 , 76.28, 1.52, 'On Order' , '2017-02-17') +,(4446, 606, 5 , 18.52, 2.13, 'On Order' , '2016-06-28') +,(4447, 609, 9 , 54.61, 4.47, 'Allocated', '2016-07-08') +,(4447, 608, 9 , 54.61, 4.47, 'Allocated', '2016-07-08') +,(4447, 607, 9 , 54.61, 4.47, 'Allocated', '2016-07-08') +,(4448, 605, 2 , 69.71, 2.05, 'No Stock' , '2016-09-17') +,(4448, 606, 2 , 69.71, 2.05, 'No Stock' , '2016-09-17') +,(4448, 607, 2 , 69.71, 2.05, 'No Stock' , '2016-09-17') +,(4449, 618, 6 , 35.62, 5.23, 'On Order' , '2016-04-15') +,(4449, 619, 10, 86.97, 4.63, 'No Stock' , '2016-09-29') +,(4450, 619, 8 , 26.14, 4.87, 'On Order' , '2016-12-09') +,(4450, 620, 8 , 26.14, 4.87, 'On Order' , '2016-12-09') +,(4450, 601, 8 , 26.14, 4.87, 'On Order' , '2016-12-09') +,(4451, 604, 3 , 47.48, 1.4 , 'Allocated', '2016-09-12') +,(4452, 615, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4453, 606, 2 , 4.03 , 8.07, 'On Order' , '2016-12-10') +,(4454, 619, 7 , 55.92, 9.0 , 'On Order' , '2016-10-07') +,(4455, 602, 10, 50.3 , 9.33, 'On Order' , '2017-01-11') +,(4455, 603, 1 , 7.68 , 7.77, 'Allocated', '2016-12-09') +,(4455, 605, 1 , 98.23, 3.73, 'Allocated', '2016-07-07') +,(4456, 607, 8 , 54.83, 9.57, 'No Stock' , '2016-08-16') +,(4456, 612, 7 , 97.34, 1.24, 'Allocated', '2016-05-13') +,(4457, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4458, 615, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4459, 617, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4460, 602, 8 , 37.95, 8.36, 'No Stock' , '2017-01-03') +,(4461, 620, 6 , 73.77, 2.02, 'Allocated', '2016-03-27') +,(4462, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4463, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4464, 606, 1 , 31.6 , 1.18, 'On Order' , '2016-09-05') +,(4465, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4466, 620, 10, 37.79, 1.76, 'Allocated', '2016-12-14') +,(4467, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4468, 610, 3 , 80.77, 6.87, 'Allocated', '2016-12-30') +,(4469, 602, 3 , 19.99, 5.21, 'No Stock' , '2016-08-11') +,(4469, 612, 3 , 73.21, 4.85, 'On Order' , '2017-02-19') +,(4470, 607, 4 , 7.7 , 5.78, 'No Stock' , '2016-04-22') +,(4471, 617, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4472, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4473, 609, 2 , 97.6 , 1.84, 'Allocated', '2016-05-12') +,(4474, 611, 7 , 12.5 , 6.31, 'Allocated', '2016-04-18') +,(4475, 603, 2 , 44.42, 7.21, 'No Stock' , '2017-03-10') +,(4476, 603, 4 , 43.47, 5.63, 'No Stock' , '2016-09-17') +,(4477, 603, 4 , 24.99, 4.46, 'No Stock' , '2016-09-10') +,(4478, 606, 1 , 29.13, 4.59, 'On Order' , '2017-03-04') +,(4478, 619, 4 , 58.05, 2.9 , 'Allocated', '2017-01-26') +,(4479, 603, 10, 93.2 , 7.79, 'On Order' , '2016-03-21') +,(4479, 609, 4 , 70.36, 9.01, 'Allocated', '2017-02-03') +,(4479, 610, 6 , 49.48, 6.79, 'Allocated', '2017-03-01') +,(4480, 608, 9 , 11.03, 6.26, 'On Order' , '2016-12-10') +,(4481, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4482, 603, 10, 28.92, 8.1 , 'No Stock' , '2016-05-27') +,(4482, 607, 6 , 90.11, 5.74, 'On Order' , '2016-04-29') +,(4482, 610, 4 , 7.12 , 2.89, 'On Order' , '2017-01-12') +,(4482, 611, 1 , 12.48, 8.56, 'No Stock' , '2016-08-16') +,(4482, 614, 10, 55.93, 1.63, 'On Order' , '2016-07-09') +,(4482, 618, 1 , 33.9 , 2.46, 'Allocated', '2016-07-11') +,(4483, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4484, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4485, 605, 7 , 99.92, 1.31, 'No Stock' , '2016-05-11') +,(4486, 615, 7 , 4.39 , 3.61, 'Allocated', '2016-06-24') +,(4487, 602, 9 , 69.78, 7.96, 'No Stock' , '2016-12-29') +,(4487, 607, 5 , 24.92, 8.97, 'On Order' , '2016-08-15') +,(4487, 615, 4 , 72.16, 8.97, 'On Order' , '2016-07-28') +,(4488, 601, 9 , 64.29, 1.52, 'On Order' , '2016-03-30') +,(4488, 609, 10, 66.79, 5.3 , 'On Order' , '2016-07-11') +,(4489, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4490, 615, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4491, 602, 3 , 16.8 , 5.22, 'On Order' , '2016-09-16') +,(4492, 607, 4 , 99.59, 2.45, 'On Order' , '2017-03-04') +,(4493, 615, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4494, 615, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4495, 607, 7 , 86.05, 5.4 , 'Allocated', '2016-10-03') +,(4496, 603, 10, 55.12, 3.71, 'Allocated', '2016-07-06') +,(4497, 607, 7 , 27.3 , 4.26, 'Allocated', '2017-01-29') +,(4498, 604, 10, 89.58, 1.25, 'Allocated', '2016-03-19') +,(4498, 610, 10, 69.32, 2.48, 'No Stock' , '2016-06-24') +,(4499, 601, 4 , 56.58, 6.73, 'No Stock' , '2017-02-21') +,(4499, 602, 4 , 56.58, 6.73, 'No Stock' , '2017-02-21') +,(4499, 603, 4 , 56.58, 6.73, 'No Stock' , '2017-02-21') +,(4500, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4500, 620, 10, 54.41, 7.02, 'No Stock' , '2016-11-30') +,(4500, 619, 10, 54.41, 7.02, 'No Stock' , '2016-11-30') +,(4501, 620, 10, 54.41, 7.02, 'No Stock' , '2016-11-30') +,(4501, 619, 10, 54.41, 7.02, 'No Stock' , '2016-11-30') +,(4501, 618, 10, 54.41, 7.02, 'No Stock' , '2016-11-30') +,(4502, 603, 2 , 27.21, 1.12, 'No Stock' , '2016-07-27') +,(4502, 605, 9 , 39.93, 3.2 , 'On Order' , '2016-11-21') +,(4503, 615, 6 , 85.1 , 8.26, 'No Stock' , '2016-05-03') +,(4503, 611, 6 , 85.1 , 8.26, 'No Stock' , '2016-05-03') +,(4503, 612, 6 , 85.1 , 8.26, 'No Stock' , '2016-05-03') +,(4504, 615, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4504, 618, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4504, 619, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4505, 612, 3 , 10.99, 1.62, 'Allocated', '2016-09-04') +,(4505, 609, 3 , 10.99, 1.62, 'Allocated', '2016-09-04') +,(4505, 601, 3 , 10.99, 1.62, 'Allocated', '2016-09-04') +,(4506, 602, 7 , 88.03, 1.0 , 'On Order' , '2016-09-23') +,(4506, 603, 9 , 66.78, 1.18, 'Allocated', '2017-02-03') +,(4506, 606, 10, 85.37, 2.21, 'Allocated', '2016-10-03') +,(4506, 609, 9 , 84.3 , 4.06, 'Allocated', '2016-12-08') +,(4507, 617, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4508, 611, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4509, 611, 2 , 99.24, 8.51, 'Allocated', '2016-08-12') +,(4509, 612, 8 , 2.41 , 3.81, 'On Order' , '2016-08-30') +,(4510, 614, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4511, 610, 3 , 73.48, 8.4 , 'Allocated', '2016-12-06') +,(4511, 611, 4 , 7.29 , 6.91, 'Allocated', '2016-12-23') +,(4511, 616, 5 , 26.16, 6.26, 'On Order' , '2016-12-09') +,(4512, 614, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4513, 614, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4514, 605, 6 , 86.17, 7.08, 'No Stock' , '2017-01-25') +,(4514, 610, 6 , 71.51, 6.3 , 'No Stock' , '2017-01-23') +,(4515, 617, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4516, 618, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4517, 604, 10, 55.76, 7.34, 'Allocated', '2016-10-23') +,(4517, 619, 2 , 1.09 , 7.07, 'Allocated', '2016-08-19') +,(4518, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4519, 609, 9 , 61.39, 7.83, 'On Order' , '2016-07-01') +,(4520, 619, 9 , 72.61, 9.55, 'No Stock' , '2016-10-08') +,(4521, 610, 10, 19.38, 3.54, 'Allocated', '2016-12-08') +,(4521, 615, 8 , 54.35, 7.77, 'No Stock' , '2017-01-31') +,(4522, 602, 9 , 68.98, 6.79, 'No Stock' , '2016-11-28') +,(4523, 606, 9 , 79.86, 1.63, 'No Stock' , '2016-05-25') +,(4524, 602, 9 , 91.58, 3.46, 'On Order' , '2017-03-12') +,(4525, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4526, 603, 9 , 56.56, 7.64, 'On Order' , '2016-10-14') +,(4526, 604, 4 , 80.67, 2.83, 'No Stock' , '2016-07-29') +,(4526, 610, 5 , 88.8 , 2.86, 'On Order' , '2017-02-25') +,(4527, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4528, 605, 4 , 73.64, 8.81, 'Allocated', '2017-01-26') +,(4528, 609, 4 , 64.56, 4.09, 'On Order' , '2016-10-03') +,(4529, 616, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4530, 602, 9 , 70.97, 4.73, 'On Order' , '2016-12-07') +,(4531, 606, 10, 26.53, 2.83, 'No Stock' , '2016-03-25') +,(4531, 615, 5 , 79.05, 6.82, 'Allocated', '2016-08-04') +,(4531, 619, 4 , 36.14, 7.09, 'No Stock' , '2016-03-26') +,(4532, 605, 5 , 6.28 , 9.94, 'No Stock' , '2017-03-13') +,(4532, 610, 8 , 17.25, 3.68, 'Allocated', '2016-05-28') +,(4533, 615, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4534, 606, 8 , 60.95, 9.33, 'Allocated', '2016-07-15') +,(4534, 607, 10, 49.84, 8.32, 'No Stock' , '2016-04-24') +,(4535, 610, 6 , 17.67, 1.81, 'On Order' , '2017-03-01') +,(4535, 619, 3 , 88.0 , 3.12, 'Allocated', '2016-07-11') +,(4536, 615, 5 , 88.08, 4.93, 'Allocated', '2016-12-04') +,(4537, 611, 2 , 14.77, 4.04, 'No Stock' , '2016-03-25') +,(4538, 603, 6 , 3.51 , 4.54, 'Allocated', '2016-04-21') +,(4539, 603, 7 , 6.58 , 4.8 , 'Allocated', '2016-05-14') +,(4540, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4540, 617, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4540, 618, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4541, 603, 5 , 37.47, 2.89, 'On Order' , '2016-04-07') +,(4541, 607, 4 , 35.17, 5.44, 'No Stock' , '2017-01-07') +,(4541, 615, 2 , 83.62, 4.01, 'Allocated', '2016-11-22') +,(4542, 605, 10, 92.43, 3.27, 'On Order' , '2017-01-23') +,(4542, 601, 10, 92.43, 3.27, 'On Order' , '2017-01-23') +,(4542, 603, 10, 92.43, 3.27, 'On Order' , '2017-01-23') +,(4543, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4543, 617, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4543, 619, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4544, 611, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4544, 610, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4544, 609, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4545, 617, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4545, 604, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4545, 606, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4546, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4546, 606, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4546, 608, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4547, 606, 4 , 81.81, 9.44, 'No Stock' , '2016-05-14') +,(4547, 602, 4 , 81.81, 9.44, 'No Stock' , '2016-05-14') +,(4547, 603, 4 , 81.81, 9.44, 'No Stock' , '2016-05-14') +,(4548, 614, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4548, 611, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4548, 615, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4549, 605, 9 , 24.12, 7.26, 'No Stock' , '2016-08-22') +,(4549, 606, 7 , 6.19 , 4.68, 'Allocated', '2016-09-02') +,(4550, 609, 8 , 49.04, 7.62, 'On Order' , '2016-06-10') +,(4550, 610, 10, 92.51, 4.84, 'No Stock' , '2017-02-24') +,(4551, 601, 3 , 85.1 , 2.45, 'Allocated', '2016-07-08') +,(4551, 602, 3 , 69.43, 1.31, 'No Stock' , '2017-03-15') +,(4551, 610, 1 , 19.38, 8.43, 'No Stock' , '2016-11-09') +,(4552, 601, 2 , 91.69, 8.12, 'On Order' , '2016-06-03') +,(4552, 613, 3 , 41.15, 6.38, 'No Stock' , '2016-04-11') +,(4553, 603, 1 , 5.22 , 8.43, 'On Order' , '2016-10-28') +,(4554, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4555, 607, 6 , 77.16, 3.07, 'No Stock' , '2016-04-29') +,(4555, 612, 9 , 81.31, 9.81, 'On Order' , '2017-01-24') +,(4556, 615, 10, 65.81, 7.25, 'Allocated', '2016-11-07') +,(4557, 603, 1 , 5.01 , 4.57, 'No Stock' , '2016-09-05') +,(4557, 606, 3 , 29.35, 8.67, 'On Order' , '2016-09-14') +,(4558, 601, 3 , 29.62, 7.16, 'No Stock' , '2016-11-06') +,(4559, 620, 2 , 87.83, 7.93, 'On Order' , '2016-11-09') +,(4560, 610, 7 , 9.51 , 8.01, 'On Order' , '2016-08-22') +,(4561, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4562, 610, 9 , 15.1 , 6.8 , 'Allocated', '2016-08-27') +,(4562, 611, 3 , 71.09, 1.26, 'No Stock' , '2016-07-12') +,(4563, 618, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4564, 602, 2 , 6.68 , 6.29, 'Allocated', '2016-03-19') +,(4565, 603, 7 , 81.01, 2.82, 'Allocated', '2017-03-06') +,(4565, 606, 8 , 99.68, 6.28, 'No Stock' , '2016-04-27') +,(4566, 614, 7 , 57.79, 4.48, 'No Stock' , '2016-11-02') +,(4567, 604, 7 , 94.42, 5.46, 'No Stock' , '2016-05-18') +,(4567, 605, 1 , 61.75, 1.31, 'Allocated', '2016-04-14') +,(4567, 608, 10, 25.99, 4.85, 'On Order' , '2016-05-01') +,(4567, 620, 9 , 62.17, 4.66, 'Allocated', '2016-06-11') +,(4568, 606, 8 , 66.92, 1.1 , 'Allocated', '2016-10-02') +,(4568, 607, 10, 95.6 , 9.17, 'On Order' , '2016-05-04') +,(4568, 608, 6 , 81.57, 6.24, 'No Stock' , '2017-01-24') +,(4569, 601, 10, 96.56, 6.33, 'Allocated', '2016-07-22') +,(4570, 610, 6 , 98.15, 2.57, 'No Stock' , '2016-06-28') +,(4571, 604, 8 , 5.15 , 2.51, 'No Stock' , '2016-07-11') +,(4572, 603, 2 , 59.21, 2.46, 'Allocated', '2016-11-18') +,(4573, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4574, 615, 3 , 14.81, 9.61, 'On Order' , '2016-05-04') +,(4575, 608, 10, 79.25, 7.08, 'On Order' , '2016-11-19') +,(4575, 611, 10, 79.25, 7.08, 'On Order' , '2016-11-19') +,(4575, 615, 10, 79.25, 7.08, 'On Order' , '2016-11-19') +,(4576, 607, 7 , 31.78, 2.05, 'On Order' , '2016-03-17') +,(4576, 608, 7 , 31.78, 2.05, 'On Order' , '2016-03-17') +,(4576, 610, 7 , 31.78, 2.05, 'On Order' , '2016-03-17') +,(4577, 604, 5 , 92.54, 6.26, 'On Order' , '2016-04-22') +,(4577, 603, 5 , 92.54, 6.26, 'On Order' , '2016-04-22') +,(4577, 601, 5 , 92.54, 6.26, 'On Order' , '2016-04-22') +,(4578, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4578, 602, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4578, 603, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4579, 615, 10, 70.19, 5.85, 'No Stock' , '2016-09-11') +,(4579, 616, 10, 70.19, 5.85, 'No Stock' , '2016-09-11') +,(4579, 620, 10, 70.19, 5.85, 'No Stock' , '2016-09-11') +,(4580, 601, 1 , 15.44, 3.76, 'No Stock' , '2016-04-08') +,(4580, 603, 1 , 15.44, 3.76, 'No Stock' , '2016-04-08') +,(4580, 605, 1 , 15.44, 3.76, 'No Stock' , '2016-04-08') +,(4580, 609, 1 , 15.44, 3.76, 'No Stock' , '2016-04-08') +,(4581, 607, 8 , 42.4 , 9.73, 'On Order' , '2016-06-04') +,(4581, 610, 9 , 79.73, 3.87, 'On Order' , '2016-04-20') +,(4581, 611, 5 , 78.01, 3.65, 'On Order' , '2016-03-17') +,(4581, 616, 5 , 50.56, 5.24, 'No Stock' , '2016-07-06') +,(4582, 609, 7 , 65.99, 9.4 , 'No Stock' , '2016-05-22') +,(4582, 607, 7 , 65.99, 9.4 , 'No Stock' , '2016-05-22') +,(4582, 606, 7 , 65.99, 9.4 , 'No Stock' , '2016-05-22') +,(4583, 604, 9 , 19.92, 6.51, 'Allocated', '2016-04-13') +,(4583, 610, 1 , 19.4 , 8.3 , 'On Order' , '2016-12-08') +,(4584, 617, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4584, 620, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4584, 613, 1 , 10.00, 1.00, 'No Stock' , '2016-12-14') +,(4585, 602, 2 , 90.57, 2.52, 'Allocated', '2016-05-22') +,(4585, 610, 10, 44.26, 3.84, 'On Order' , '2016-12-27') +,(4586, 604, 2 , 56.61, 9.64, 'Allocated', '2017-02-23') +,(4586, 612, 7 , 24.24, 7.68, 'On Order' , '2016-04-04') +,(4587, 615, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4587, 611, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4587, 612, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4588, 616, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4588, 601, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4588, 602, 1 , 10.00, 1.00, 'Allocated', '2016-12-14') +,(4589, 601, 5 , 52.25, 4.47, 'Allocated', '2016-07-02') +,(4589, 603, 9 , 72.27, 4.97, 'On Order' , '2016-04-03') +,(4590, 610, 3 , 46.2 , 6.71, 'Allocated', '2016-12-16') +,(4590, 615, 5 , 52.0 , 5.26, 'On Order' , '2016-06-01') +,(4591, 601, 1 , 96.52, 2.39, 'No Stock' , '2017-01-16') +,(4591, 605, 8 , 19.56, 9.68, 'On Order' , '2016-09-15') +,(4592, 609, 10, 30.76, 3.2 , 'No Stock' , '2016-05-02') +,(4592, 619, 1 , 48.47, 6.13, 'On Order' , '2016-07-19') +,(4593, 617, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4593, 619, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4593, 620, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4594, 616, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4594, 617, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4594, 618, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4594, 620, 1 , 10.00, 1.00, 'On Order' , '2016-12-14') +,(4595, 605, 1 , 50.28, 8.15, 'Allocated', '2017-02-19') +,(4595, 601, 1 , 50.28, 8.15, 'Allocated', '2017-02-19') +,(4595, 602, 1 , 50.28, 8.15, 'Allocated', '2017-02-19') +,(4596, 605, 6 , 95.17, 7.53, 'On Order' , '2016-09-11') +,(4596, 609, 10, 82.11, 4.38, 'No Stock' , '2016-11-17') +,(4597, 608, 9 , 96.25, 4.8 , 'No Stock' , '2016-07-02') +,(4597, 605, 9 , 96.25, 4.8 , 'No Stock' , '2016-07-02') +,(4597, 601, 9 , 96.25, 4.8 , 'No Stock' , '2016-07-02') +,(4598, 603, 5 , 69.02, 6.1 , 'No Stock' , '2016-12-23') +,(4598, 608, 5 , 69.02, 6.1 , 'No Stock' , '2016-12-23') +,(4598, 610, 5 , 69.02, 6.1 , 'No Stock' , '2016-12-23') +,(4599, 603, 9 , 40.91, 6.68, 'On Order' , '2016-12-27') +,(4599, 607, 9 , 40.91, 6.68, 'On Order' , '2016-12-27') +,(4599, 609, 9 , 40.91, 6.68, 'On Order' , '2016-12-27') +,(4600, 611, 5 , 22.93, 8.87, 'Allocated', '2016-06-16') +,(4600, 615, 5 , 22.93, 8.87, 'Allocated', '2016-06-16') +,(4600, 612, 5 , 22.93, 8.87, 'Allocated', '2016-06-16'); diff --git a/backend/target/classes/logback.xml b/backend/target/classes/logback.xml new file mode 100644 index 0000000..12fa9be --- /dev/null +++ b/backend/target/classes/logback.xml @@ -0,0 +1,108 @@ + + + + + + + + + ${LOG_PATTERN} + + + + + ${APP_LOG_ROOT}/ExceptionLogs/Error.log + + ${LOG_PATTERN} + + + ${APP_LOG_ROOT}/ExceptionLogs/Error-%d{yyyy-MM-dd}.%i.log + 1 + 10 + + + 10MB + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/backend/target/classes/messages.properties b/backend/target/classes/messages.properties new file mode 100644 index 0000000..b015c87 --- /dev/null +++ b/backend/target/classes/messages.properties @@ -0,0 +1,5 @@ + +email.notempty=Please provide valid email id. +email.valid=Email should be valid +email.regex=Enter a valid email +name.minsize=Name should have minimum 3 characters diff --git a/backend/target/classes/note.txt b/backend/target/classes/note.txt new file mode 100644 index 0000000..dd9fbe6 --- /dev/null +++ b/backend/target/classes/note.txt @@ -0,0 +1,57 @@ +HEADER-LINE FORM : + +GET: http://localhost:9119/api/teacher +GET: http://localhost:9119/api/teacher/{id} +PUT: http://localhost:9119/api/teacher/{id} +DELETE: http://localhost:9119/api/teacher/{id} : NEED TO MODIFY THE INCORRECT ID INPUT ERROR HANDLING +POST: http://localhost:9119/api/teacher +===EX1=== +{ + "name": "niladri", + "email": "sen.niladri6@gmail.com", + "phoneNumber": 6291, + "salary": 1000.0, + "students": [{ + "name": "paku", + "depertment": "CSE", + "rollNumber": 108 + }] +} +===EX2===: +{ + "name": "sandipan", + "email": "sandy@gmail.com", + "phoneNumber": 9038, + "salary": 2000.0, + "students": [ + { + "name": "sahil", + "depertment": "CSE", + "rollNumber": 111 + }, + { + "name": "tarun", + "depertment": "CSE", + "rollNumber": 121 + } + ] +} + +===== 6.11.36 +user.java class code changed +@Getter @Setter private List role; +TokenUtil class code change + +===== 9.11.20 +1.8 +=== SWAGGER UI ==== +http://localhost:9119/swagger-ui.html + +========= +GIT HUB COMMAND +========= +$ git commit -m "your mesage" +$ git push origin main +$ git status + +$ git push origin main diff --git a/backend/target/classes/schema.sql b/backend/target/classes/schema.sql new file mode 100644 index 0000000..573e44a --- /dev/null +++ b/backend/target/classes/schema.sql @@ -0,0 +1,303 @@ +/** + Model : NorthWind +**/ + +DROP SCHEMA IF EXISTS northwind; + +CREATE SCHEMA northwind; +USE northwind; + +/* Table: user (Application Users) */ +CREATE TABLE user ( + user_id NVARCHAR(20) NOT NULL, + password NVARCHAR(255) NOT NULL, + first_name NVARCHAR(50) , + last_name NVARCHAR(50) , + email NVARCHAR(70) , + security_provider_id INT , + default_customer_id INT , + company NVARCHAR(50) , + phone NVARCHAR(20) , + address1 NVARCHAR(100), + address2 NVARCHAR(100), + country NVARCHAR(20) , + postal NVARCHAR(20) , + role NVARCHAR(20) , + other_roles NVARCHAR(80) , + is_active TINYINT , + is_blocked TINYINT , + secret_question NVARCHAR(100), + secret_answer NVARCHAR(100), + enable_beta_testing TINYINT, + enable_renewal TINYINT, + CONSTRAINT user_id PRIMARY KEY(user_id) +); + +/* Table: customers */ +CREATE TABLE customers ( + id INT NOT NULL, + last_name VARCHAR(50) , + first_name VARCHAR(50) , + email VARCHAR(50) , + company VARCHAR(50) , + phone VARCHAR(25) , + address1 VARCHAR(150), + address2 VARCHAR(150), + city VARCHAR(50) , + state VARCHAR(50) , + postal_code VARCHAR(15) , + country VARCHAR(50) , + PRIMARY KEY (id) +); + +/* Table: employees */ +CREATE TABLE employees ( + id INT NOT NULL, + last_name VARCHAR(50) , + first_name VARCHAR(50) , + email VARCHAR(50) , + avatar VARCHAR(250) , + job_title VARCHAR(50) , + department VARCHAR(50) , + manager_id INT , + phone VARCHAR(25) , + address1 VARCHAR(150), + address2 VARCHAR(150), + city VARCHAR(50) , + state VARCHAR(50) , + postal_code VARCHAR(15) , + country VARCHAR(50) , + PRIMARY KEY (id) +); + +/* Table: orders */ +CREATE TABLE orders ( + id INT NOT NULL, + employee_id INT , + customer_id INT , + order_date DATETIME , + shipped_date DATETIME , + ship_name VARCHAR(50) , + ship_address1 VARCHAR(150) , + ship_address2 VARCHAR(150) , + ship_city VARCHAR(50) , + ship_state VARCHAR(50) , + ship_postal_code VARCHAR(50) , + ship_country VARCHAR(50) , + shipping_fee DECIMAL(19,4) NULL DEFAULT '0.0000', + payment_type VARCHAR(50) , + paid_date DATETIME , + order_status VARCHAR(25), + PRIMARY KEY (id) +); + +/* Table: order_details */ +CREATE TABLE order_items ( + order_id INT NOT NULL, + product_id INT , + quantity DECIMAL(18,4) NOT NULL DEFAULT '0.0000', + unit_price DECIMAL(19,4) NULL DEFAULT '0.0000', + discount DECIMAL(19,4) NULL DEFAULT '0.0000', + order_item_status VARCHAR(25), + date_allocated DATETIME , + PRIMARY KEY (order_id, product_id) +); + +/* Table: products */ +CREATE TABLE products ( + id INT NOT NULL, + product_code VARCHAR(25) , + product_name VARCHAR(50) , + description VARCHAR(250), + standard_cost DECIMAL(19,4) NULL DEFAULT '0.0000', + list_price DECIMAL(19,4) NOT NULL DEFAULT '0.0000', + target_level INT , + reorder_level INT , + minimum_reorder_quantity INT , + quantity_per_unit VARCHAR(50) , + discontinued TINYINT NOT NULL DEFAULT '0', + category VARCHAR(50), + PRIMARY KEY (id) +); + + +/* Foreign Key: orders */ +ALTER TABLE orders ADD CONSTRAINT fk_orders__customers FOREIGN KEY (customer_id) REFERENCES customers(id); +ALTER TABLE orders ADD CONSTRAINT fk_orders__employees FOREIGN KEY (employee_id) REFERENCES employees(id); +/* Foreign Key: order_items */ +ALTER TABLE order_items ADD CONSTRAINT fk_order_items__orders FOREIGN KEY (order_id) REFERENCES orders(id); +ALTER TABLE order_items ADD CONSTRAINT fk_order_items__products FOREIGN KEY (product_id) REFERENCES products(id); + +/* Views */ +CREATE OR REPLACE VIEW order_info AS +select o.id as order_id + , o.order_date + , o.order_status + , o.paid_date + , o.payment_type + , o.shipped_date + , o.shipping_fee + , o.ship_name + , o.ship_address1 + , o.ship_address2 + , o.ship_city + , o.ship_state + , o.ship_postal_code + , o.ship_country + , o.customer_id + , o.employee_id + , concat(c.first_name, ' ', c.last_name) as customer_name + , c.phone customer_phone + , c.email customer_email + , c.company as customer_company + , concat(e.first_name, ' ', e.last_name) as employee_name + , e.department employee_department + , e.job_title employee_job_title + From orders o + , employees e + , customers c + where o.employee_id = e.id + and o.customer_id = c.id; + +CREATE OR REPLACE VIEW order_details AS +select oi.order_id + , oi.product_id + , oi.quantity + , oi.unit_price + , oi.discount + , oi.date_allocated + , oi.order_item_status + , o.order_date + , o.order_status + , o.paid_date + , o.payment_type + , o.shipped_date + , o.shipping_fee + , o.ship_name + , o.ship_address1 + , o.ship_address2 + , o.ship_city + , o.ship_state + , o.ship_postal_code + , o.ship_country + , p.product_code + , p.product_name + , p.category + , p.description + , p.list_price + , o.customer_id + , concat(c.first_name, ' ', c.last_name) as customer_name + , c.phone as customer_phone + , c.email as customer_email + , c.company as customer_company + , o.employee_id + , concat(e.first_name, ' ', e.last_name) as employee_name + , e.department as employee_department + , e.job_title as employee_job_title + From orders o + , products p + , order_items oi + , employees e + , customers c + where oi.order_id = o.id + and oi.product_id = p.id + and o.employee_id = e.id + and o.customer_id = c.id; + +CREATE OR REPLACE VIEW customer_orders AS +select o.order_date, o.order_status, o.paid_date, o.payment_type, o.shipping_fee, o.customer_id + , c.first_name customer_first_name, c.last_name customer_last_name, c.phone customer_phone, c.email customer_email, c.company + from orders o,customers c + where o.customer_id = c.id; + +CREATE OR REPLACE VIEW employee_orders AS +select o.order_date, o.order_status, o.paid_date, o.payment_type, o.shipping_fee, o.employee_id + , e.first_name employee_first_name, e.last_name employee_last_name, e.email employee_email, e.department + from orders o,employees e + where o.customer_id = e.id; + + + /* REAL_NET */ + CREATE TABLE RN_INSTRUCTOR ( + ID VARCHAR(20) NOT NULL AUTO_INCREMENT, + FIRST_NAME VARCHAR(20) NOT NULL, + LAST_NAME VARCHAR(20) NOT NULL, + EMAIL VARCHAR(20) NOT NULL, + CREATED_AT DATETIME, + UPDATED_AT DATETIME, + PRIMARY KEY (id) + ); + + /*==== EXTENSION FIELD ===*/ + CREATE TABLE RN_EXT_FIELD_T ( + ID int(11) NOT NULL AUTO_INCREMENT, + TYPE VARCHAR(20), + DATA_TYPE VARCHAR(20), + FIELD_NAME VARCHAR(20), + MAPPING VARCHAR(20), + FORM_CODE VARCHAR(20), + IS_ACTIVE BOOLEAN, + ACCOUNT_ID VARCHAR(20), + CREATED_AT DATETIME, + UPDATED_AT DATETIME, + CREATED_BY VARCHAR(20), + UPDATED_BY VARCHAR(20), + PRIMARY KEY (ID) +); + +/*========= lookup ======== +CREATE TABLE `rn_lookup_values_t` ( + `ID` int(11) NOT NULL AUTO_INCREMENT, + `LOOKUP_CODE` longtext, + `MEANING` longtext, + `DESCRIPTION` longtext, + `LOOKUP_TYPE` longtext, + `ACTIVE_START_DATE` datetime DEFAULT NULL, + `ACTIVE_END_DATE` datetime DEFAULT NULL, + `ENABLED_FLAG` longtext, + `CREATED_BY` int(11) DEFAULT NULL, + `CREATION_DATE` datetime DEFAULT NULL, + `LAST_UPDATED_BY` int(11) DEFAULT NULL, + `LAST_UPDATE_DATE` datetime DEFAULT NULL + PRIMARY KEY (`ID`) +); */ + + + +/*========= LOGGING ======== + +DROP TABLE logging_event_exception IF EXISTS; +DROP TABLE logging_event_property IF EXISTS; +DROP TABLE logging_event IF EXISTS; + +CREATE TABLE logging_event ( + timestmp BIGINT NOT NULL, + formatted_message LONGVARCHAR NOT NULL, + logger_name VARCHAR(256) NOT NULL, + level_string VARCHAR(256) NOT NULL, + thread_name VARCHAR(256), + reference_flag SMALLINT, + arg0 VARCHAR(256), + arg1 VARCHAR(256), + arg2 VARCHAR(256), + arg3 VARCHAR(256), + caller_filename VARCHAR(256), + caller_class VARCHAR(256), + caller_method VARCHAR(256), + caller_line CHAR(4), + event_id IDENTITY NOT NULL); + + +CREATE TABLE logging_event_property ( + event_id BIGINT NOT NULL, + mapped_key VARCHAR(254) NOT NULL, + mapped_value LONGVARCHAR, + PRIMARY KEY(event_id, mapped_key), + FOREIGN KEY (event_id) REFERENCES logging_event(event_id)); + +CREATE TABLE logging_event_exception ( + event_id BIGINT NOT NULL, + i SMALLINT NOT NULL, + trace_line VARCHAR(256) NOT NULL, + PRIMARY KEY(event_id, i), + FOREIGN KEY (event_id) REFERENCES logging_event(event_id)); */ \ No newline at end of file diff --git a/backend/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/backend/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst new file mode 100644 index 0000000..e69de29 diff --git a/backend/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/backend/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst new file mode 100644 index 0000000..51d6ebc --- /dev/null +++ b/backend/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst @@ -0,0 +1,208 @@ +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\response\Rn_Function_Register_Response.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\logging1\ExceptionLoggingController.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\session\response\SessionResponse.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\Rn_Forms_Component_Setup.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\service1\MenuDetServiceImpl.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\userDTO\LoginUser.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\service1\AppUserServiceImpl.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity1\GrpMenuAccesscompositeKey.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\controller\Rn_Menu_Group_Controller.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\service\Rn_Main_Menu_ServiceImpl.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\response\OperationResponse.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\repository\SysAccountRepo.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\repository\RnGroupLineRepository.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\response\CustomResponse.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\controller\Rn_Menu_Group_Line_Controller.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\repository1\AppUserRepository.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\config\SwaggerConfig.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\Rn_Ext_Fields.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\service\RnGroupMenuLineServiec.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\userlist\service\impl\UserListServiceImpl.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\controller1\SysAccountController.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\service1\AppUserRoleServiceImpl.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\service\AboutServiceImple.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\config\JwtAuthenticationEntryPoint.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity\ERole.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\userDTO\Rn_Who_AccId_Column.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\repository\Rn_Menu_Group_Repository.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\logging1\repository\AppUserLogginRepository.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\controller1\LoadMenuController.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\response\ServiceResponse.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\ProjectMini.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\response\Rn_Menu_Group_Response.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\userDTO\Sys_Accounts.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity1\AppUserRole.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\Rn_FlexEntity.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\Rn_AuditEntity.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\service\Rn_Forms_Setup_ServiceImpl.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\Rn_Forms_Setup.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\response\SingleDataSeriseResponse.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity1\GrpMenuAccess.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\repository1\MenuDetRepository.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity1\AppUserPrinciple.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\service\Rn_Menu_Group_Service.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\logging1\SessionConverter.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\DropDownDTO.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\projectCopyDTO.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\config\AppConfig.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\repository\LookUpRepository.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\config\MessageSourceConfig.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity1\MenuDet.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity1\AppUserSessions.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\repository\ExtFieldRepository.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\Rn_Sub_Menu.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\exceptions\InvalidUserDataException.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\Error.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity\LoginUser.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\logging1\PatternLayoutWithUserContext.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\logging1\entity\AppUserLog.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\logging\NoLogging.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\repository\Rn_InstanceTypeRepository.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\config\TokenProvider.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\Rn_ExtensionEntity.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\repository1\passwordTokenRepository.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\service1\AppUserSessionsServiceImpl.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\userDTO\Rn_Who_Columns.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\config\CorsFilter.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\service1\AppUserService.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\repository\RoleRepo.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\userDTO\Email.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\controller1\AppUserController.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\repository\AboutWorkRepo.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\repository\Rn_LookUpRepository.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\repository1\AppUserDepartmentRepository.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\controller\Rn_Forms_Setup_Controller.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\Rn_Menu_Register.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\WireFrameCopyDTO.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\session\entity\AboutWork.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\userDTO\EmailRequest.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\service1\GrpMenuAccessServiceImpl.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\service\Rn_Forms_Setup_Service.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\Rn_Who_Columns.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\repository\Rn_Menu_Register_Repository.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\service\AboutWorkService.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity1\AppUserPasswlogCompositeKey.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\repository1\AppUserRoleRepository.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\Rn_Menu_Group_Line.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\controller\MainController.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\Rn_Who_AccId_Column.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\service\Rn_Main_Menu_Service.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\ModuleCopyDTO.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\repository\Rn_Forms_Setup_Repository.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\Version.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\controller\UserController.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\session\controller\SessionController.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity\CustomUserDetails.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity1\Registration.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\userlist\controller\UserListController.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity1\MIXMENUN.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\repository\CompanyRepo.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\service\Rn_Function_Register_Service.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity1\AppUser_who_column.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\service\RoleServiceImpl.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity1\ExtensionModel.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity1\AppUserDto.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\repository\Rn_Function_Register_Repository.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity\Email.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\logging1\service\LoggingService.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\service\Rn_DynamicTransactionService.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\config\JWTConstant.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\userDTO\Role.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity\Sys_Accounts.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\config\HttpLoggingFilter.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\utils\Port_Constant.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\userDTO\UserProfileDTO.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\userlist\entity\UserImage.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\logging\LogExecutionTime.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\logging\SecurityNoLogging.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\session\entity\SessionItem.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\session\entity\VersionModel.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\service\Rn_Menu_Register_ServiceImpl.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\Modulemini.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\config\JwtAuthenticationFilter.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\config\SecurityConfig.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity\UserProfileDTO.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\Rn_Dynamic_Transaction.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\logging\LogEntity.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\repository\UserRepo.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity1\MixMenu.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\repository1\GrpMenuAccessRepository.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\controller1\WorkSpaceController1.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\userDTO\User.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\Rn_Instance_Type.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity1\AppUserDepartment.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity1\AppUserSessionsCompositeKey.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\response\Rn_Forms_SetupResponse.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\Rn_Menu_Group_Header.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\service\Rn_DynamicTransactionServiceImpl.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\userlist\entity\UserList.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\Rn_Function_Register.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\controller\Rn_Function_Register_Controller.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\Rn_Lookup_Values.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\ErrorPojo.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity1\SignUp.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\controller1\AppuserSessionController.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\utils\WireFrameConstant.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity\Role.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\logging1\controller\AppUserLogController.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\service\CompanyServiceImpl.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\service\Rn_Function_Register_ServiceImpl.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\repository\Rn_Main_Menu_Repository.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\service\RnGroupMenuLineServiecImpl.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\response\Rn_Main_Menu_Response.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\controller\Rn_DynamicTransactionController.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\controller\Rn_Main_Menu_Controller.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity1\MixMenuNew.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity\GenericResponse.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\response\MessageResponse.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\userlist\repository\UserImageRepository.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity1\AppUser.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\response\UserItem.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\userDTO\Login.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\response\UserResponse.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\service\Rn_Menu_Register_Service.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\service\UserService.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\SuccessPojo.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\RealNetApp.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\repository\Rn_DynamicTransactionRepository.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\userDTO\PasswordResetRequest.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity\UserDto.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\userDTO\Provider.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\SingleSerise.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\exceptions\ResourceNotFoundException.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity\PasswordResetToken.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\Success.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\config\EmailService.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\service\Rn_Menu_Group_ServiceImpl.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\repository1\AppUserPositionRepository.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\repository1\AppUserSessionsRepository.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\controller1\MenuController.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity\Rn_Main_Menu.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\controller1\AppUserGrpController.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\logging1\UserConverter.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\service1\PositionAndDepartmentServiceImpl.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\service\RoleService.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity\RoleUpdateDto.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\userDTO\UserDto.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\controller\RoleController.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity\PasswordResetRequest.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\userDTO\RoleUpdateDto.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\service\CompanyService.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\utils\Constant.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity1\AppUserLoginHist.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\userDTO\CompanyDto.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity\CompanyDto.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity\Login.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\controller\Rn_Menu_Register_Controller.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity\EmailRequest.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\response\Rn_Menu_Register_Response.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\userlist\repository\UserListRepository.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\logging\LoggingAspect.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\response\PageResponse.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\logging1\controller\AppUserLogController2.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity1\AppUserPasswlog.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\entity1\AppUserPosition.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\entity1\menudet_who.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\userlist\service\UserListService.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\fnd\response\Rn_DynamicTransactionResponse.java +C:\Users\Gyanadipta Pahi\Desktop\AuthsecNew\authsec-be-main\backend\src\main\java\com\realnet\users\controller1\PositonAndDepartmentController.java