diff --git a/entertainmenttax/src/main/java/com/gcc/entertainmenttax/configuration/DataSourceConfig.java b/entertainmenttax/src/main/java/com/gcc/entertainmenttax/configuration/DataSourceConfig.java index c4eb192..e71cf14 100644 --- a/entertainmenttax/src/main/java/com/gcc/entertainmenttax/configuration/DataSourceConfig.java +++ b/entertainmenttax/src/main/java/com/gcc/entertainmenttax/configuration/DataSourceConfig.java @@ -19,12 +19,11 @@ import org.springframework.transaction.annotation.EnableTransactionManagement; @EnableTransactionManagement public class DataSourceConfig { - private static String host = "localhost:3306"; - private static String dbpassword = "root"; + // private static String host = "localhost:3306"; + // private static String dbpassword = "root"; - // private static String host = - // "gcc-facial-db-instance-1.cf48eqcciziq.ap-south-1.rds.amazonaws.com:3306"; - // private static String dbpassword = "gcc-facial-password"; + private static String host = "gcc-facial-db-instance-1.cf48eqcciziq.ap-south-1.rds.amazonaws.com:3306"; + private static String dbpassword = "gcc-facial-password"; public static class MyDataSourceConfig { @Primary diff --git a/entertainmenttax/src/main/java/com/gcc/entertainmenttax/controller/Apicontroller.java b/entertainmenttax/src/main/java/com/gcc/entertainmenttax/controller/Apicontroller.java index 950965a..059e3c8 100644 --- a/entertainmenttax/src/main/java/com/gcc/entertainmenttax/controller/Apicontroller.java +++ b/entertainmenttax/src/main/java/com/gcc/entertainmenttax/controller/Apicontroller.java @@ -124,6 +124,8 @@ public class Apicontroller { @RequestParam(required = false) String gstno, @RequestParam(required = false) String panno, @RequestParam Integer programCheck, + @RequestParam(required = false) String website_url, + @RequestParam(required = false) String personName, @RequestParam(required = false) String designation, @RequestParam(required = false) Long personContactno) { @@ -141,8 +143,16 @@ public class Apicontroller { programCheck, personName, designation, - personContactno); + personContactno, website_url); + + } + + @GetMapping("/report") + public List> getReport( + @RequestParam String fromDate, + @RequestParam String toDate) { + return entertainmentTaxService.getReport(fromDate, toDate); } } diff --git a/entertainmenttax/src/main/java/com/gcc/entertainmenttax/controller/Maincontroller.java b/entertainmenttax/src/main/java/com/gcc/entertainmenttax/controller/Maincontroller.java index dd45b85..b53d42a 100644 --- a/entertainmenttax/src/main/java/com/gcc/entertainmenttax/controller/Maincontroller.java +++ b/entertainmenttax/src/main/java/com/gcc/entertainmenttax/controller/Maincontroller.java @@ -8,9 +8,14 @@ import org.springframework.web.bind.annotation.RequestMapping; @Controller("entertainmenttaxMainController") public class Maincontroller { - @GetMapping(value = { "", "/", "/register" }) + @GetMapping("/register") public String homepage() { return "modules/form"; } + @GetMapping("/report") + public String report() { + return "modules/report"; + } + } diff --git a/entertainmenttax/src/main/java/com/gcc/entertainmenttax/service/Entertainmentservice.java b/entertainmenttax/src/main/java/com/gcc/entertainmenttax/service/Entertainmentservice.java index 5474725..8ad3e91 100644 --- a/entertainmenttax/src/main/java/com/gcc/entertainmenttax/service/Entertainmentservice.java +++ b/entertainmenttax/src/main/java/com/gcc/entertainmenttax/service/Entertainmentservice.java @@ -72,7 +72,7 @@ public class Entertainmentservice { Integer programCheck, String personName, String designation, - Long personContactno) { + Long personContactno, String website_url) { Map map = new HashMap<>(); @@ -82,8 +82,8 @@ public class Entertainmentservice { + "venue,concertby,organizer_name,address,mailid," + "contactno,program_date,gstno,panno," + "program_check,person_name,Designation," - + "person_contactno)" - + " VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?)"; + + "person_contactno,website_url)" + + " VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; KeyHolder keyHolder = new GeneratedKeyHolder(); @@ -111,6 +111,8 @@ public class Entertainmentservice { } else { ps.setNull(13, Types.BIGINT); } + ; + ps.setString(14, website_url); return ps; @@ -295,4 +297,39 @@ public class Entertainmentservice { } + public List> getReport( + String fromDate, + String toDate) { + + String sql = "SELECT " + + "entertainment_id, " + + "venue, " + + "concertby, " + + "organizer_name, " + + "address, " + + "mailid, " + + "contactno, " + + "cdate, " + + "program_date, " + + "gstno, " + + "panno, " + + "program_check, " + + "person_name, " + + "Designation, " + + "person_contactno, " + + "ref_id, " + + "website_url " + + "FROM register " + + "WHERE DATE(cdate) BETWEEN ? AND ? " + + "ORDER BY cdate "; + + // System.out.println("From Date : " + fromDate); + // System.out.println("To Date : " + toDate); + + return jdbcTemplate.queryForList( + sql, + fromDate, + toDate); + } + } diff --git a/entertainmenttax/src/main/resources/application.properties b/entertainmenttax/src/main/resources/application.properties index cbb42d2..6f5c167 100644 --- a/entertainmenttax/src/main/resources/application.properties +++ b/entertainmenttax/src/main/resources/application.properties @@ -1 +1 @@ -spring.profiles.active=dev +spring.profiles.active=prod diff --git a/entertainmenttax/src/main/resources/templates/modules/form.html b/entertainmenttax/src/main/resources/templates/modules/form.html index 2698e88..65ce627 100644 --- a/entertainmenttax/src/main/resources/templates/modules/form.html +++ b/entertainmenttax/src/main/resources/templates/modules/form.html @@ -288,10 +288,10 @@
- + + placeholder="Enter website url">
@@ -921,7 +921,8 @@ programCheck: $("#program_check").is(":checked") ? 1 : 0, personName: $("#person_name").val(), designation: $("#designation").val(), - personContactno: $("#person_contactno").val() + personContactno: $("#person_contactno").val(), + website_url: $("#website_url").val() }, success: function (response) { diff --git a/entertainmenttax/src/main/resources/templates/modules/report.html b/entertainmenttax/src/main/resources/templates/modules/report.html new file mode 100644 index 0000000..a981ce8 --- /dev/null +++ b/entertainmenttax/src/main/resources/templates/modules/report.html @@ -0,0 +1,736 @@ + + + + + + + + Entertainment Tax Registration Report + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ GREATER CHENNAI CORPORATION +
+ +
+ +
+ +
+ + +
+ +
+ +
+ + + +
+ +
+ ENTERTAINMENT TAX REGISTRATION REPORT +
+ +
+ + + + +
+ +
+ +
+ + + + + +
+ + +
+ + + + + +
+ + +
+ + + + + +
+ +
+ +
+ + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
S.NoReference IDVenueConcert ByOrganizer NameAddressEmail IDContact
Number
Registration
Date
Programme
Date
Website UrlGST NumberPAN NumberOrganization located
Other Than Chennai
Authorized
Person Name
DesignationAuthorized
Person Contact
+ +
+ +
+ +
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file