commit 9eaaaa8b0765f6fca19b7d9d39d578da14264a5d Author: Hariprasath S <113695067+Hariprasath4022@users.noreply.github.com> Date: Wed Oct 15 11:10:47 2025 +0530 first commit diff --git a/src/main/java/com/gcc/commissionerreview/DashboardserviceApplication.java b/src/main/java/com/gcc/commissionerreview/DashboardserviceApplication.java new file mode 100644 index 0000000..cf7a1b5 --- /dev/null +++ b/src/main/java/com/gcc/commissionerreview/DashboardserviceApplication.java @@ -0,0 +1,13 @@ +package com.gcc.commissionerreview; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class DashboardserviceApplication { + + public static void main(String[] args) { + SpringApplication.run(DashboardserviceApplication.class, args); + } + +} diff --git a/src/main/java/com/gcc/commissionerreview/configuration/DataSourceConfig.java b/src/main/java/com/gcc/commissionerreview/configuration/DataSourceConfig.java new file mode 100644 index 0000000..86ab374 --- /dev/null +++ b/src/main/java/com/gcc/commissionerreview/configuration/DataSourceConfig.java @@ -0,0 +1,83 @@ +package com.gcc.commissionerreview.configuration; + + +import com.zaxxer.hikari.HikariConfig; +import com.zaxxer.hikari.HikariDataSource; + +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Primary; +import org.springframework.jdbc.datasource.DataSourceTransactionManager; +import org.springframework.jdbc.datasource.DriverManagerDataSource; +import org.springframework.transaction.PlatformTransactionManager; +import org.springframework.transaction.annotation.EnableTransactionManagement; + +import javax.sql.DataSource; + +@Configuration +@EnableTransactionManagement +public class DataSourceConfig { + + + 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"; + + + public static class MyDataSourceConfig { + @Primary + @Bean(name = "mydatasource") + public DataSource MyDataSource() { +// DriverManagerDataSource dataSource = new DriverManagerDataSource(); +// dataSource.setDriverClassName("com.mysql.cj.jdbc.Driver"); +// dataSource.setUrl("jdbc:mysql://"+host+"/dashboard_service"); +// dataSource.setUsername("root"); +// dataSource.setPassword("root"); +// return dataSource; + + DriverManagerDataSource dataSource = new DriverManagerDataSource(); + dataSource.setUrl("jdbc:mysql://"+host+"/commissioner_review"); + dataSource.setUsername("root"); + dataSource.setPassword(dbpassword); + dataSource.setDriverClassName("com.mysql.cj.jdbc.Driver"); + return dataSource; + + + } + + @Primary + @Bean(name = "myTransactionManager") + public PlatformTransactionManager myTransactionManager(@Qualifier("mydatasource") DataSource dataSource) { + return new DataSourceTransactionManager(dataSource); + } + } + + ////////////////////////////// Domestic Waste Management //////////////////////// + @Bean(name = "mysqlSofaBedCollectionDataSource") + public DataSource mysqlSofaBedCollectionDataSource() { + DriverManagerDataSource dataSource = new DriverManagerDataSource(); + dataSource.setDriverClassName("com.mysql.cj.jdbc.Driver"); + dataSource.setUrl("jdbc:mysql://"+host+"/domestic_waste_management"); + dataSource.setUsername("root"); + dataSource.setPassword(dbpassword); + return dataSource; + } + + + //////////////////////////////ORACLE //////////////////////// + @Bean(name = "oracleDataSource") + public DataSource oracleDataSource() { + DriverManagerDataSource dataSource = new DriverManagerDataSource(); + dataSource.setDriverClassName("oracle.jdbc.OracleDriver"); + dataSource.setUrl("jdbc:oracle:thin:@10.1.0.14:1521:chncorp"); + dataSource.setUsername("FAS"); + dataSource.setPassword("FAS"); + return dataSource; + } +} + diff --git a/src/main/java/com/gcc/commissionerreview/configuration/PrimaryDataSourceConfig.java b/src/main/java/com/gcc/commissionerreview/configuration/PrimaryDataSourceConfig.java new file mode 100644 index 0000000..23322e6 --- /dev/null +++ b/src/main/java/com/gcc/commissionerreview/configuration/PrimaryDataSourceConfig.java @@ -0,0 +1,38 @@ +package com.gcc.commissionerreview.configuration; + +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.boot.jdbc.DataSourceBuilder; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Primary; +import org.springframework.data.jdbc.repository.config.EnableJdbcRepositories; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.transaction.annotation.EnableTransactionManagement; + +import javax.sql.DataSource; + + +@Configuration + @EnableTransactionManagement +// @EnableJdbcRepositories( +// basePackages = "com.gcc.commissionerreview.configuration", +// jdbcOperationsRef = "primaryJdbcTemplate" +// ) + public class PrimaryDataSourceConfig { + + @Primary + @Bean(name = "primaryDataSource") + @ConfigurationProperties(prefix = "spring.datasource") + public DataSource primaryDataSource() { + return DataSourceBuilder.create().build(); + } + + @Primary + @Bean(name = "primaryJdbcTemplate") + public JdbcTemplate primaryJdbcTemplate(@Qualifier("primaryDataSource") DataSource ds) { + return new JdbcTemplate(ds); + } + } + + diff --git a/src/main/java/com/gcc/commissionerreview/configuration/SecondaryDataSourceConfig.java b/src/main/java/com/gcc/commissionerreview/configuration/SecondaryDataSourceConfig.java new file mode 100644 index 0000000..f06a324 --- /dev/null +++ b/src/main/java/com/gcc/commissionerreview/configuration/SecondaryDataSourceConfig.java @@ -0,0 +1,31 @@ +package com.gcc.commissionerreview.configuration; + +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.boot.jdbc.DataSourceBuilder; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.data.jdbc.repository.config.EnableJdbcRepositories; +import org.springframework.jdbc.core.JdbcTemplate; + +import javax.sql.DataSource; + +@Configuration +//@EnableJdbcRepositories( +// basePackages = "com.gcc.commissionerreview.configuration", +// jdbcOperationsRef = "secondaryJdbcTemplate" +//) +public class SecondaryDataSourceConfig { + + @Bean(name = "secondaryDataSource") + @ConfigurationProperties(prefix = "secondary.datasource") + public DataSource secondaryDataSource() { + return DataSourceBuilder.create().build(); + } + + @Bean(name = "secondaryJdbcTemplate") + public JdbcTemplate secondaryJdbcTemplate(@Qualifier("secondaryDataSource") DataSource ds) { + return new JdbcTemplate(ds); + } +} + diff --git a/src/main/java/com/gcc/commissionerreview/controller/CompoundWallController.java b/src/main/java/com/gcc/commissionerreview/controller/CompoundWallController.java new file mode 100644 index 0000000..d583b64 --- /dev/null +++ b/src/main/java/com/gcc/commissionerreview/controller/CompoundWallController.java @@ -0,0 +1,26 @@ +package com.gcc.commissionerreview.controller; + +import com.gcc.commissionerreview.service.CompoundWallService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; +import java.util.Map; + +@RestController +@RequestMapping("/commissionerreview/api/compoundwall") +public class CompoundWallController { + + @Autowired + private CompoundWallService compoundWallService; + + @GetMapping("/getCompoundWall") + public List> getCompoundWall() { + return compoundWallService.getCompoundWallSummaryByZone(); + } + + @GetMapping("/issues/{zone}") + public List> getCompoundWallIssuesByZone(@PathVariable int zone) { + return compoundWallService.getPlayfieldsWithCompoundWallIssuesByZone(zone); + } +} diff --git a/src/main/java/com/gcc/commissionerreview/controller/EnforcementApiController.java b/src/main/java/com/gcc/commissionerreview/controller/EnforcementApiController.java new file mode 100644 index 0000000..f3abaf7 --- /dev/null +++ b/src/main/java/com/gcc/commissionerreview/controller/EnforcementApiController.java @@ -0,0 +1,54 @@ +package com.gcc.commissionerreview.controller; + +import java.util.List; +import java.util.Map; + +import org.springframework.beans.factory.annotation.Autowired; +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.gcc.commissionerreview.service.EnforcementService; + +@RestController +@RequestMapping("/commissionerreview/api/enforcement") +public class EnforcementApiController { + + @Autowired + private EnforcementService enforcementService; + + + @GetMapping("/getZoneWiseDetails") + public List> getZonewisedetails() + { + return enforcementService.getzonewisedetails(); + } + + @GetMapping("/getWardWiseDetails") + public List> getWardwisedetails(@RequestParam String zone) + { + return enforcementService.getwardwisedetails(zone); + } + + @GetMapping("/getFormDetails") + public List> getFormdetails(@RequestParam String ward,@RequestParam String zone,@RequestParam String formtype,@RequestParam String status) + { + return enforcementService.getformdetailswithzone(zone,ward,formtype,status); + } + + @GetMapping("/getFormDetailsWithoutWard") + public List> getFormdetailsWithoutWard(@RequestParam String zone,@RequestParam String formtype,@RequestParam String status) + { + return enforcementService.getformdetailswithoutward(zone,formtype,status); + } + + + @GetMapping("/getFormId") + public List> getFormIddetails(@RequestParam String formid) + { + return enforcementService.getformiddetails(formid); + } + + +} diff --git a/src/main/java/com/gcc/commissionerreview/controller/MainController.java b/src/main/java/com/gcc/commissionerreview/controller/MainController.java new file mode 100644 index 0000000..85ff925 --- /dev/null +++ b/src/main/java/com/gcc/commissionerreview/controller/MainController.java @@ -0,0 +1,152 @@ +package com.gcc.commissionerreview.controller; + +import org.springframework.ui.Model; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; + +@Controller +@RequestMapping(value = {"/commissionerreview"}) +public class MainController { + + @GetMapping("/uphcreport") + public String uphcreport(Model model) { + return "modules/uphcreport"; + } + + @GetMapping("/perungudibiomining") + public String perungudibiomining(Model model) { + return "modules/perungudibiomining"; + } + + @GetMapping("/streetnameprogress") + public String streetnameprogress(Model model) { + return "modules/streetnameprogress"; + } + + @GetMapping("/mobileDiagonostic") + public String mobileDiagonostic(Model model) { + return "modules/mobileDiagonosticreports"; + } + + @GetMapping("/cattlecatch") + public String viewcattlecatchpage(Model model) { + return "modules/veterinary/cattlecatch"; + } + + @GetMapping("/petclinic") + public String veterinarypetclinic(Model model) { + return "modules/veterinary/petclinic"; + } + + @GetMapping("/abccenters") + public String veterinaryabccenters(Model model) { + return "modules/veterinary/abccenters"; + } + + @GetMapping("/makkaludanmudhalvar") + public String viewmakkaludanmudhalvar(Model model) { + return "modules/makkaludanmudhalvar"; + } + + @GetMapping("/mudhalvarinmugavari") + public String viewmudhalvarinmugavari(Model model) { + return "modules/mudhalvarinmugavari"; + } + + @GetMapping("/combinedbiomining") + public String viewcombinedbiomining(Model model) { + return "modules/combined_bio_mining_report"; + } + + @GetMapping("/microcompostcentre") + public String viewmicrocompostcentre(Model model) { + return "modules/micro_compost_centre"; + } + + @GetMapping("/srgmprojectsprogress") + public String srgmprojectsprogress(Model model) { + return "modules/srgmprojectsprogress"; + } + + @GetMapping("/landacquisitionprogress") + public String landacquisitionprogress(Model model) { + return "modules/landacquisitionprogress"; + } + + @GetMapping("/CDWasteProcessing") + public String cdWasteProcessing(Model model) { + return "modules/C&DWasteProcessing"; + } + + @GetMapping("/GardenandTenderCoconutWaste") + public String GardenandTenderCoconutWaste(Model model) { + return "modules/GardenandTenderCoconutWaste"; + } + + @GetMapping("/ReviewofBioCNGPlants") + public String ReviewofBioCNGPlants(Model model) { + return "modules/ReviewofBioCNGPlants"; + } + + @GetMapping("/trafficsystems") + public String trafficsystems(Model model) { + return "modules/trafficsystems"; + } + + @GetMapping("/slaughterhouse") + public String slaughterhouse(Model model) { + return "modules/slaughterhouse"; + } + + @GetMapping("/meatraid") + public String viewmeatraid(Model model) { + return "modules/veterinary/meatraidreport"; + } + + @GetMapping("/solidwastemanagement") + public String viewswdpage(Model model) { + return "modules/solidwastemanagement"; + } + + @GetMapping("/toilet") + public String toilet(Model model) { + return "modules/toilet"; + } + + @GetMapping("/playfield") + public String playfield(Model model) { + return "modules/playfield"; + } + + @GetMapping("/urbangreen") + public String viewurbangreen(Model model) { + return "modules/urbangreenreport"; + } + + @GetMapping("/compoundwall") + public String compoundwall(Model model) { + return "modules/compoundwall"; + } + + @GetMapping("/parks") + public String viewparkspage(Model model) { + return "modules/parks"; + } + + + //////////////////////////////////// + + + @GetMapping("/enforcement") + public String viewenforcementpage(Model model) { + return "modules/enforcement/Zonewise"; + } + + @GetMapping("/sofacollection") + public String sofaZoneReport(Model model) { + return "modules/sofa_bed/zonewise1"; + } + + +} diff --git a/src/main/java/com/gcc/commissionerreview/controller/ParksApiController.java b/src/main/java/com/gcc/commissionerreview/controller/ParksApiController.java new file mode 100644 index 0000000..c96d1d2 --- /dev/null +++ b/src/main/java/com/gcc/commissionerreview/controller/ParksApiController.java @@ -0,0 +1,31 @@ +package com.gcc.commissionerreview.controller; + +import java.util.List; +import java.util.Map; + +import org.springframework.beans.factory.annotation.Autowired; +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.gcc.commissionerreview.service.ParksService; + +@RestController +@RequestMapping("/commissionerreview/api/parks") +public class ParksApiController { + + @Autowired + public ParksService parksService; + + @GetMapping("/getParkData") + public List> getParkData(){ + return parksService.getParkData(); + } + + @GetMapping("/getParkDataByZone") + public List> getParkDataByZone(@RequestParam String zone, @RequestParam String type){ + return parksService.getParkDataByZone(zone, type); + } + +} diff --git a/src/main/java/com/gcc/commissionerreview/controller/PlayFieldController.java b/src/main/java/com/gcc/commissionerreview/controller/PlayFieldController.java new file mode 100644 index 0000000..0748571 --- /dev/null +++ b/src/main/java/com/gcc/commissionerreview/controller/PlayFieldController.java @@ -0,0 +1,31 @@ +package com.gcc.commissionerreview.controller; + +import com.gcc.commissionerreview.service.PlayFieldService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +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 java.util.List; +import java.util.Map; + + +@RestController +@RequestMapping("/commissionerreview/api/playfield") +public class PlayFieldController { + @Autowired + private PlayFieldService playFieldService; + + @GetMapping("/count-by-zone") + public List> getPlayFieldCountsByZone() { + return playFieldService.getPlayFieldCountsByZone(); + } + + @GetMapping("/without-guards/{zone}") + public List> getPlayFieldsWithoutGuardsByZone(@PathVariable int zone) { + return playFieldService.getPlayFieldsWithoutGuards(zone); + } + +} diff --git a/src/main/java/com/gcc/commissionerreview/controller/SofaBedCollectionApiController.java b/src/main/java/com/gcc/commissionerreview/controller/SofaBedCollectionApiController.java new file mode 100644 index 0000000..cf880ea --- /dev/null +++ b/src/main/java/com/gcc/commissionerreview/controller/SofaBedCollectionApiController.java @@ -0,0 +1,41 @@ +package com.gcc.commissionerreview.controller; + +import java.util.List; +import java.util.Map; + +import org.springframework.beans.factory.annotation.Autowired; +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.gcc.commissionerreview.service.SofaBedCollectionService; + +@RestController +@RequestMapping("/commissionerreview/api/sofabedcollection") +public class SofaBedCollectionApiController { + + + @Autowired + private SofaBedCollectionService sofaBedCollectionService; + + @GetMapping("/getZoneReport") + public List> getZoneReport() + { + return sofaBedCollectionService.getZoneReport(); + } + + + @GetMapping("/getWardReport") + public List> getWardReport(@RequestParam String zone) + { + return sofaBedCollectionService.getWardReport(zone); + } + + + @GetMapping("/getWardStatusReport") + public List> getWardStatusDetail(@RequestParam String ward,@RequestParam String status) + { + return sofaBedCollectionService.getWardStatusDetails(ward,status); + } +} diff --git a/src/main/java/com/gcc/commissionerreview/controller/ToiletController.java b/src/main/java/com/gcc/commissionerreview/controller/ToiletController.java new file mode 100644 index 0000000..f6a7a00 --- /dev/null +++ b/src/main/java/com/gcc/commissionerreview/controller/ToiletController.java @@ -0,0 +1,29 @@ +package com.gcc.commissionerreview.controller; + +import com.gcc.commissionerreview.service.ToiletService; +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.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; +import java.util.Map; + +@RestController +@RequestMapping("/commissionerreview/toilet/api") +public class ToiletController { + + @Autowired + ToiletService toileService; + + @GetMapping("/getSFDData") + public Map getSFDData(){ + return toileService.getSFDData(); + } + @GetMapping("/getSFDPack1") + public List> getSFDPack1(@RequestParam String pack){ + return toileService.getSFDPack1(pack); + } +} diff --git a/src/main/java/com/gcc/commissionerreview/controller/UphcReportController.java b/src/main/java/com/gcc/commissionerreview/controller/UphcReportController.java new file mode 100644 index 0000000..381a8d7 --- /dev/null +++ b/src/main/java/com/gcc/commissionerreview/controller/UphcReportController.java @@ -0,0 +1,29 @@ +package com.gcc.commissionerreview.controller; + + +import com.gcc.commissionerreview.service.UphcReportService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; +import java.util.Map; + +@RestController +@RequestMapping("/commissionerreview/uphc/usercontroller") +public class UphcReportController { + + @Autowired + private UphcReportService uphcReportService; + + @GetMapping("/zone-wise-op-summary") + public List> getZoneWiseOpSummary() { + return uphcReportService.getZoneWiseOpSummary(); + } + + + @GetMapping("/uphc-details/{zone}") + public List> getUphcDetails(@PathVariable String zone) { + return uphcReportService.getUphcDetailsByZone(zone); + } + +} diff --git a/src/main/java/com/gcc/commissionerreview/controller/VeterinaryPetClinicApiController.java b/src/main/java/com/gcc/commissionerreview/controller/VeterinaryPetClinicApiController.java new file mode 100644 index 0000000..d2bf698 --- /dev/null +++ b/src/main/java/com/gcc/commissionerreview/controller/VeterinaryPetClinicApiController.java @@ -0,0 +1,73 @@ +package com.gcc.commissionerreview.controller; + +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import com.gcc.commissionerreview.service.VeterinaryPetClinicService; +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; + + +@RestController +@RequestMapping("/commissionerreview/api/veterinarypetclinic") +public class VeterinaryPetClinicApiController { + + @Autowired + private VeterinaryPetClinicService veterinaryPetClinicService; + + + @GetMapping("/petclinicsummary") + public List> getPetClinicSummary() { + return veterinaryPetClinicService.getPetClinicSummary(); + } + + + @GetMapping("/months") + public List getMonths() { + return veterinaryPetClinicService.getDistinctMonths(); + } + + @GetMapping("/monthly-summary") + public ResponseEntity>> getMonthlySummary() { + List> summary = veterinaryPetClinicService.fetchYearlySummary(); + return ResponseEntity.ok(summary); + } + + + @GetMapping("/abcsummary") + public ResponseEntity>> getAbcSummary() { + List> summary = veterinaryPetClinicService.AbcReportSummary(); + return ResponseEntity.ok(summary); + } + + @GetMapping("/overallcattledata") + public ResponseEntity getOverallData() { + return veterinaryPetClinicService.getZoneWiseCattleData(); + } + + @GetMapping("/slaughterdata") + public List> getSlaughterData() { + return veterinaryPetClinicService.getData(); + } + + @GetMapping("/meatraid-report") + public ResponseEntity>> getMeatReport() { + try { + List> result = veterinaryPetClinicService.ViewMeatRaidReport(); + return ResponseEntity.ok(result); + } catch (Exception e) { + Map error = new HashMap<>(); + error.put("error", "Unable to fetch progress report"); + error.put("details", e.getMessage()); + return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR) + .body(Collections.singletonList(error)); + } + } +} diff --git a/src/main/java/com/gcc/commissionerreview/controller/makkaludanMudalvarController.java b/src/main/java/com/gcc/commissionerreview/controller/makkaludanMudalvarController.java new file mode 100644 index 0000000..62493a6 --- /dev/null +++ b/src/main/java/com/gcc/commissionerreview/controller/makkaludanMudalvarController.java @@ -0,0 +1,50 @@ +package com.gcc.commissionerreview.controller; + +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.jdbc.core.JdbcTemplate; +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.gcc.commissionerreview.service.makkaludanMudalvarService; + +@RestController +@RequestMapping("/commissionerreview/makkaludanMudalvar/api") +public class makkaludanMudalvarController { + + @Autowired + private makkaludanMudalvarService makkaludanmudalvarservice; + + @GetMapping("/progress-report") + public ResponseEntity>> getProgressReport() { + try { + List> result = makkaludanmudalvarservice.ViewProgressReport(); + return ResponseEntity.ok(result); + } catch (Exception e) { + Map error = new HashMap<>(); + error.put("error", "Unable to fetch progress report"); + error.put("details", e.getMessage()); + return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR) + .body(Collections.singletonList(error)); + } + } + + @GetMapping("/progress-report-list") + public ResponseEntity>> getPendencyReport( + @RequestParam String ticket_owner_name, + @RequestParam String status_display) { + + List> reportList = makkaludanmudalvarservice.viewProgressReportList(ticket_owner_name, status_display); + return new ResponseEntity<>(reportList, HttpStatus.OK); + } + + +} diff --git a/src/main/java/com/gcc/commissionerreview/controller/mobileDiagonosticController.java b/src/main/java/com/gcc/commissionerreview/controller/mobileDiagonosticController.java new file mode 100644 index 0000000..3e2b862 --- /dev/null +++ b/src/main/java/com/gcc/commissionerreview/controller/mobileDiagonosticController.java @@ -0,0 +1,36 @@ +package com.gcc.commissionerreview.controller; + + +import java.util.List; +import java.util.Map; + +import com.gcc.commissionerreview.service.mobileDiagonosticService; +import org.springframework.beans.factory.annotation.Autowired; +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.RequestParam; +import org.springframework.web.bind.annotation.RestController; + + +@RestController +@RequestMapping("/commissionerreview/mobileDiagonostic/api/reports") + +public class mobileDiagonosticController { + @Autowired + private mobileDiagonosticService mobileDiagonosticService; + + @GetMapping("getzonedata") + public List> getMonthlyCampData() { + return mobileDiagonosticService.fetchMonthlyCampData(); + } + + @GetMapping("/getZoneDetailData/{zone}") + public List> getZoneDetailData(@PathVariable("zone") String zone) { + System.out.println("zone: " + zone); + return mobileDiagonosticService.fetchZoneDetails(zone); + } + + +} + diff --git a/src/main/java/com/gcc/commissionerreview/controller/mudhalvarinMugavariController.java b/src/main/java/com/gcc/commissionerreview/controller/mudhalvarinMugavariController.java new file mode 100644 index 0000000..f08e375 --- /dev/null +++ b/src/main/java/com/gcc/commissionerreview/controller/mudhalvarinMugavariController.java @@ -0,0 +1,50 @@ +package com.gcc.commissionerreview.controller; + +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.jdbc.core.JdbcTemplate; +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.gcc.commissionerreview.service.mudhalvarinMugavariService; + +@RestController +@RequestMapping("/commissionerreview/mudhalvarinMugavari/api") +public class mudhalvarinMugavariController { + + @Autowired + private mudhalvarinMugavariService mudhalvarinmugavariservice; + + @GetMapping("/pendency-report") + public ResponseEntity>> getProgressReport() { + try { + List> result = mudhalvarinmugavariservice.ViewPendencyReport(); + return ResponseEntity.ok(result); + } catch (Exception e) { + Map error = new HashMap<>(); + error.put("error", "Unable to fetch progress report"); + error.put("details", e.getMessage()); + return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR) + .body(Collections.singletonList(error)); + } + } + + @GetMapping("/pendency-report-list") + public ResponseEntity>> getPendencyReport( + @RequestParam String ticket_owner_name, + @RequestParam String status_display) { + + List> reportList = mudhalvarinmugavariservice.viewPendencyReportList(ticket_owner_name, status_display); + return new ResponseEntity<>(reportList, HttpStatus.OK); + } + + +} diff --git a/src/main/java/com/gcc/commissionerreview/controller/urbangreenController.java b/src/main/java/com/gcc/commissionerreview/controller/urbangreenController.java new file mode 100644 index 0000000..9afa662 --- /dev/null +++ b/src/main/java/com/gcc/commissionerreview/controller/urbangreenController.java @@ -0,0 +1,53 @@ +package com.gcc.commissionerreview.controller; + +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +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.gcc.commissionerreview.service.urbangreenService; + +@RestController +@RequestMapping("/commissionerreview/urbangreen/api") +public class urbangreenController { + + @Autowired + private urbangreenService urbangreenservice; + + @GetMapping("/urbangreen-report") + public ResponseEntity>> getUrbanGreenReport() { + try { + List> result = urbangreenservice.ViewUrbanGreenReport(); + return ResponseEntity.ok(result); + } catch (Exception e) { + Map error = new HashMap<>(); + error.put("error", "Unable to fetch progress report"); + error.put("details", e.getMessage()); + return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR) + .body(Collections.singletonList(error)); + } + } + + @GetMapping("/urbangreen-report-list") + public ResponseEntity getUrbanGreenReportList(@RequestParam String zone, String phase) { + try { + List> result = urbangreenservice.ViewUrbanGreenReportList(zone, phase); + return ResponseEntity.ok(result); + } catch (Exception e) { + Map error = new HashMap<>(); + error.put("error", "Unable to fetch progress report"); + error.put("details", e.getMessage()); + return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(error); + } + } + + +} diff --git a/src/main/java/com/gcc/commissionerreview/service/CompoundWallService.java b/src/main/java/com/gcc/commissionerreview/service/CompoundWallService.java new file mode 100644 index 0000000..06cf022 --- /dev/null +++ b/src/main/java/com/gcc/commissionerreview/service/CompoundWallService.java @@ -0,0 +1,61 @@ +package com.gcc.commissionerreview.service; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.Map; + +import javax.sql.DataSource; + +@Service +public class CompoundWallService { + @Autowired + private JdbcTemplate jdbcTemplate; + + @Autowired + public void setDataSource(@Qualifier("mydatasource") DataSource dataSource) { + this.jdbcTemplate = new JdbcTemplate(dataSource); + } + + public List> getCompoundWallSummaryByZone() { + String sql = """ + SELECT + zone, + COUNT(*) AS total_playfields, + SUM(CASE + WHEN LOWER(COALESCE(compound_wall, '')) <> 'good' THEN 1 + ELSE 0 + END) AS with_issue + FROM ( + SELECT *, + ROW_NUMBER() OVER (PARTITION BY zone, playfield_name ORDER BY id) AS rn + FROM playfield + ) t + WHERE t.rn = 1 + GROUP BY zone + ORDER BY CAST(zone AS UNSIGNED) + """; + + return jdbcTemplate.queryForList(sql); + } + + public List> getPlayfieldsWithCompoundWallIssuesByZone(int zone) { + String sql = """ + SELECT + id, zone, division, playfield_name, maintained_by, playfield_condition, compound_wall + FROM ( + SELECT *, + ROW_NUMBER() OVER (PARTITION BY playfield_name ORDER BY id) AS rn + FROM playfield + WHERE zone = ? + AND LOWER(COALESCE(compound_wall, '')) <> 'good' + ) t + WHERE t.rn = 1 + """; + + return jdbcTemplate.queryForList(sql, zone); + } +} diff --git a/src/main/java/com/gcc/commissionerreview/service/EnforcementService.java b/src/main/java/com/gcc/commissionerreview/service/EnforcementService.java new file mode 100644 index 0000000..3d5718d --- /dev/null +++ b/src/main/java/com/gcc/commissionerreview/service/EnforcementService.java @@ -0,0 +1,300 @@ +package com.gcc.commissionerreview.service; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import javax.sql.DataSource; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.http.ResponseEntity; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.stereotype.Service; + +@Service +public class EnforcementService { + + @Autowired + private JdbcTemplate jdbcTemplate; + + @Autowired + public void setDataSource(@Qualifier("oracleDataSource") DataSource dataSource) { + this.jdbcTemplate = new JdbcTemplate(dataSource); + } + + public List> getzonewisedetails() + { + + String sql="select zone.name zone,\r\n" + + "sum(case when formtype='Form 1' then 1 else 0 end) form1_recieved,\r\n" + + "sum(case when formtype='Form 1' and b.value!='END' then 1 else 0 end) form1_inprogress,\r\n" + + "sum(case when formtype='Form 1' and b.value='END' then 1 else 0 end) form1_completed,\r\n" + + "sum(case when formtype='Form 2' then 1 else 0 end) form2_recieved,\r\n" + + "sum(case when formtype='Form 2' and b.value!='END' then 1 else 0 end) form2_inprogress,\r\n" + + "sum(case when formtype='Form 2' and b.value='END' then 1 else 0 end) form2_completed,\r\n" + + "sum(case when formtype='Form 3' then 1 else 0 end) form3_recieved,\r\n" + + "sum(case when formtype='Form 3' and b.value!='END' then 1 else 0 end) form3_inprogress,\r\n" + + "sum(case when formtype='Form 3' and b.value='END' then 1 else 0 end) form3_completed,\r\n" + + "sum(case when formtype='Form 4' then 1 else 0 end) form4_recieved,\r\n" + + "sum(case when formtype='Form 4' and b.value!='END' then 1 else 0 end) form4_inprogress,\r\n" + + "sum(case when formtype='Form 4' and b.value='END' then 1 else 0 end) form4_completed,\r\n" + + "sum(case when formtype='Form 5' then 1 else 0 end) form5_recieved,\r\n" + + "sum(case when formtype='Form 5' and b.value!='END' then 1 else 0 end) form5_inprogress,\r\n" + + "sum(case when formtype='Form 5' and b.value='END' then 1 else 0 end) form5_completed,\r\n" + + "sum(case when formtype='Form 6' then 1 else 0 end) form6_recieved,\r\n" + + "sum(case when formtype='Form 6' and b.value!='END' then 1 else 0 end) form6_inprogress,\r\n" + + "sum(case when formtype='Form 6' and b.value='END' then 1 else 0 end) form6_completed,\r\n" + + "sum(case when formtype='Form 7' then 1 else 0 end) form7_recieved,\r\n" + + "sum(case when formtype='Form 7' and b.value!='END' then 1 else 0 end) form7_inprogress,\r\n" + + "sum(case when formtype='Form 7' and b.value='END' then 1 else 0 end) form7_completed\r\n" + + "from EGBPA_FORM_RULES@erp a,eg_wf_states@erp b,eg_boundary@erp zone\r\n" + + "where a.state_id=b.id and zone.id_bndry=a.zoneid and\r\n" + + " a.id = (SELECT MAX(id) FROM EGBPA_FORM_RULES@erp WHERE form_parentid = a.form_parentid)\r\n" + + "group by zone.name order by name"; + + + + return jdbcTemplate.queryForList(sql); + + } + + + public List> getwardwisedetails(String zone) + { + String sql="select zone.name zone,ward.name ward,\r\n" + + "sum(case when formtype='Form 1' then 1 else 0 end) form1_recieved,\r\n" + + "sum(case when formtype='Form 1' and b.value!='END' then 1 else 0 end) form1_inprogress,\r\n" + + "sum(case when formtype='Form 1' and b.value='END' then 1 else 0 end) form1_completed,\r\n" + + "sum(case when formtype='Form 2' then 1 else 0 end) form2_recieved,\r\n" + + "sum(case when formtype='Form 2' and b.value!='END' then 1 else 0 end) form2_inprogress,\r\n" + + "sum(case when formtype='Form 2' and b.value='END' then 1 else 0 end) form2_completed,\r\n" + + "sum(case when formtype='Form 3' then 1 else 0 end) form3_recieved,\r\n" + + "sum(case when formtype='Form 3' and b.value!='END' then 1 else 0 end) form3_inprogress,\r\n" + + "sum(case when formtype='Form 3' and b.value='END' then 1 else 0 end) form3_completed,\r\n" + + "sum(case when formtype='Form 4' then 1 else 0 end) form4_recieved,\r\n" + + "sum(case when formtype='Form 4' and b.value!='END' then 1 else 0 end) form4_inprogress,\r\n" + + "sum(case when formtype='Form 4' and b.value='END' then 1 else 0 end) form4_completed,\r\n" + + "sum(case when formtype='Form 5' then 1 else 0 end) form5_recieved,\r\n" + + "sum(case when formtype='Form 5' and b.value!='END' then 1 else 0 end) form5_inprogress,\r\n" + + "sum(case when formtype='Form 5' and b.value='END' then 1 else 0 end) form5_completed,\r\n" + + "sum(case when formtype='Form 6' then 1 else 0 end) form6_recieved,\r\n" + + "sum(case when formtype='Form 6' and b.value!='END' then 1 else 0 end) form6_inprogress,\r\n" + + "sum(case when formtype='Form 6' and b.value='END' then 1 else 0 end) form6_completed,\r\n" + + "sum(case when formtype='Form 7' then 1 else 0 end) form7_recieved,\r\n" + + "sum(case when formtype='Form 7' and b.value!='END' then 1 else 0 end) form7_inprogress,\r\n" + + "sum(case when formtype='Form 7' and b.value='END' then 1 else 0 end) form7_completed\r\n" + + "from EGBPA_FORM_RULES@erp a,eg_wf_states@erp b,eg_boundary@erp zone,eg_boundary@erp ward\r\n" + + "where a.state_id=b.id and zone.id_bndry=a.zoneid and ward.id_bndry=a.wardid and\r\n" + + " a.id = (SELECT MAX(id) FROM EGBPA_FORM_RULES@erp WHERE form_parentid = a.form_parentid) and zone.name=? \r\n" + + "group by zone.name,ward.name order by zone.name,ward.name"; + + return jdbcTemplate.queryForList(sql,zone); + } + + public List> getformdetailswithzone(String zone, String ward, String formtype, String status) { + + String sql=""; + List> result = new ArrayList<>();; + + if("Received".equalsIgnoreCase(status)) { + sql="SELECT " + + " zone.name zone,ward.name ward," + + " addr.applicant_name," + + " addr.formid," + + " addr.area," + + " addr.address," + + " addr.pincode " + + "FROM" + + " EGBPA_FORM_RULES@erp a" + + " JOIN eg_wf_states@erp b ON a.state_id = b.id" + + " JOIN eg_boundary@erp zone ON zone.id_bndry = a.zoneid" + + " JOIN eg_boundary@erp ward ON ward.id_bndry = a.wardid" + + " LEFT JOIN EGBPA_ENF_APP_ADDRESS@erp addr ON addr.formid = a.form_parentid " + + "WHERE" + + " a.id = (" + + " SELECT MAX(id)" + + " FROM EGBPA_FORM_RULES@erp" + + " WHERE form_parentid = a.form_parentid" + + " )" + + " AND a.formtype = ? " + + " AND zone.name = ? " + + " AND ward.name = ? "; + + result = jdbcTemplate.queryForList(sql, formtype, zone, ward); + } + + if("Inprogress".equalsIgnoreCase(status)) { + + sql="SELECT" + + " zone.name zone,ward.name ward," + + " addr.applicant_name," + + " addr.formid," + + " addr.area," + + " addr.address," + + " addr.pincode " + + "FROM" + + " EGBPA_FORM_RULES@erp a" + + " JOIN eg_wf_states@erp b ON a.state_id = b.id" + + " JOIN eg_boundary@erp zone ON zone.id_bndry = a.zoneid" + + " JOIN eg_boundary@erp ward ON ward.id_bndry = a.wardid" + + " LEFT JOIN EGBPA_ENF_APP_ADDRESS@erp addr ON addr.formid = a.form_parentid" + + " WHERE" + + " a.id = (" + + " SELECT MAX(id)" + + " FROM EGBPA_FORM_RULES@erp" + + " WHERE form_parentid = a.form_parentid" + + " )" + + " AND a.formtype = ?" + + " AND zone.name = ?" + + " AND ward.name = ?" + + " and formtype=? and b.value!='END'"; + + result=jdbcTemplate.queryForList(sql,formtype,zone,ward,formtype); + } + + if("Completed".equalsIgnoreCase(status)) { + + sql="SELECT" + + " zone.name zone,ward.name ward," + + " addr.applicant_name," + + " addr.formid," + + " addr.area," + + " addr.address," + + " addr.pincode " + + "FROM " + + " EGBPA_FORM_RULES@erp a" + + " JOIN eg_wf_states@erp b ON a.state_id = b.id" + + " JOIN eg_boundary@erp zone ON zone.id_bndry = a.zoneid" + + " JOIN eg_boundary@erp ward ON ward.id_bndry = a.wardid" + + " LEFT JOIN EGBPA_ENF_APP_ADDRESS@erp addr ON addr.formid = a.form_parentid " + + "WHERE" + + " a.id = (" + + " SELECT MAX(id)" + + " FROM EGBPA_FORM_RULES@erp" + + " WHERE form_parentid = a.form_parentid" + + " )" + + " AND a.formtype = ? " + + " AND zone.name = ? " + + " AND ward.name = ? " + + " and formtype=? and b.value='END'"; + + result=jdbcTemplate.queryForList(sql,formtype,zone,ward,formtype); + } + + return result; + } + + public List> getformiddetails(String formid) { + + String sql="SELECT" + + " m.ENCLOSEMENTNAME," + + " TO_CHAR(f.CREATEDDATE, 'YYYY/MM/DD HH24:MI') || ' 00:00:00.0' AS cdate," + + " 'https://erp.chennaicorporation.gov.in/bpa/search/registrationForm!viewFile.action?formParentId=' || d.FORMID ||" + + " CHR(38) || 'fileName=' || d.DOCNAME ||" + + " CHR(38) || 'contentType=' || d.DOCTYPE ||" + + " CHR(38) || 'fileCreatedDate=' || TO_CHAR(f.CREATEDDATE, 'YYYY-MM-DD') || ' 00:00:00.0' AS fileUrl" + + " FROM" + + " EGBPA_FORM_ENCLOSEMENT_DET@erp d " + + "INNER JOIN " + + " EGBPA_FORM_ENCLOSEMENT@erp m ON d.TYPEID = m.ID " + + "INNER JOIN" + + " EGBPA_FORM_RULES@erp f ON f.ID = d.APPID " + + "WHERE" + + " d.FORMID = ? " + + "ORDER BY" + + " m.FORMTYPE DESC"; + + return jdbcTemplate.queryForList(sql,formid); + } + + public List> getformdetailswithoutward(String zone, String formtype, String status) { + String sql=""; + List> result = new ArrayList<>();; + + if("Received".equalsIgnoreCase(status)) { + sql="SELECT " + + " zone.name zone,ward.name ward," + + " addr.applicant_name," + + " addr.formid," + + " addr.area," + + " addr.address," + + " addr.pincode " + + "FROM" + + " EGBPA_FORM_RULES@erp a" + + " JOIN eg_wf_states@erp b ON a.state_id = b.id" + + " JOIN eg_boundary@erp zone ON zone.id_bndry = a.zoneid" + + " JOIN eg_boundary@erp ward ON ward.id_bndry = a.wardid" + + " LEFT JOIN EGBPA_ENF_APP_ADDRESS@erp addr ON addr.formid = a.form_parentid " + + "WHERE" + + " a.id = (" + + " SELECT MAX(id)" + + " FROM EGBPA_FORM_RULES@erp" + + " WHERE form_parentid = a.form_parentid" + + " )" + + " AND a.formtype = ? " + + " AND zone.name = ? "; + + result = jdbcTemplate.queryForList(sql, formtype, zone); + } + + if("Inprogress".equalsIgnoreCase(status)) { + + sql="SELECT" + + " zone.name zone,ward.name ward," + + " addr.applicant_name," + + " addr.formid," + + " addr.area," + + " addr.address," + + " addr.pincode " + + "FROM" + + " EGBPA_FORM_RULES@erp a" + + " JOIN eg_wf_states@erp b ON a.state_id = b.id" + + " JOIN eg_boundary@erp zone ON zone.id_bndry = a.zoneid" + + " JOIN eg_boundary@erp ward ON ward.id_bndry = a.wardid" + + " LEFT JOIN EGBPA_ENF_APP_ADDRESS@erp addr ON addr.formid = a.form_parentid" + + " WHERE" + + " a.id = (" + + " SELECT MAX(id)" + + " FROM EGBPA_FORM_RULES@erp" + + " WHERE form_parentid = a.form_parentid" + + " )" + + " AND a.formtype = ?" + + " AND zone.name = ?" + + " and formtype=? and b.value!='END'"; + + result=jdbcTemplate.queryForList(sql,formtype,zone,formtype); + } + + if("Completed".equalsIgnoreCase(status)) { + + sql="SELECT" + + " zone.name zone,ward.name ward," + + " addr.applicant_name," + + " addr.formid," + + " addr.area," + + " addr.address," + + " addr.pincode " + + "FROM " + + " EGBPA_FORM_RULES@erp a" + + " JOIN eg_wf_states@erp b ON a.state_id = b.id" + + " JOIN eg_boundary@erp zone ON zone.id_bndry = a.zoneid" + + " JOIN eg_boundary@erp ward ON ward.id_bndry = a.wardid" + + " LEFT JOIN EGBPA_ENF_APP_ADDRESS@erp addr ON addr.formid = a.form_parentid " + + "WHERE" + + " a.id = (" + + " SELECT MAX(id)" + + " FROM EGBPA_FORM_RULES@erp" + + " WHERE form_parentid = a.form_parentid" + + " )" + + " AND a.formtype = ? " + + " AND zone.name = ? " + + " and formtype=? and b.value='END'"; + + result=jdbcTemplate.queryForList(sql,formtype,zone,formtype); + } + + return result; + } + +} diff --git a/src/main/java/com/gcc/commissionerreview/service/ParksService.java b/src/main/java/com/gcc/commissionerreview/service/ParksService.java new file mode 100644 index 0000000..ea4857f --- /dev/null +++ b/src/main/java/com/gcc/commissionerreview/service/ParksService.java @@ -0,0 +1,65 @@ +package com.gcc.commissionerreview.service; + +import java.util.List; +import java.util.Map; + +import javax.sql.DataSource; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.stereotype.Service; + +@Service +public class ParksService { + + + @Autowired + private JdbcTemplate jdbcTemplate; + + @Autowired + public void setDataSource(@Qualifier("mydatasource") DataSource dataSource) { + this.jdbcTemplate = new JdbcTemplate(dataSource); + } + + public List> getParkData() { + String sql = "SELECT zone,count(*) as parks_count, " + + " SUM(CASE WHEN maintained_by = 'GCC' THEN 1 ELSE 0 END) AS parksby_gcc, " + + " SUM(CASE WHEN maintained_by = 'Outsourced Parks' THEN 1 ELSE 0 END) AS parksby_out, " + + " SUM(CASE WHEN maintained_by = 'Adoption' THEN 1 ELSE 0 END) AS parksby_adoption, " + + " SUM(CASE WHEN maintained_by = 'SHG' THEN 1 ELSE 0 END) AS parksby_shg, " + + " SUM(CASE WHEN maintained_by = 'CMRL' THEN 1 ELSE 0 END) AS parksby_cmrl, " + + " SUM(CASE WHEN repair_work = 'Yes' THEN 1 ELSE 0 END) AS repair_needed, " + + " SUM(labours_allocated) as labours_appointed FROM parks group by zone"; + try { + return jdbcTemplate.queryForList(sql); + + } catch (Exception e) { + e.printStackTrace(); + return List.of(); + } + } + + public List> getParkDataByZone(String zone, String type) { + String sql = ""; + if(type.equalsIgnoreCase("GCC")) { + sql="select park_name, maintained_by, labours_allocated, park_condition from parks where maintained_by = 'GCC' and zone=? "; + } else if(type.equalsIgnoreCase("Outsourced Parks")) { + sql="select park_name, maintained_by, labours_allocated, park_condition from parks where maintained_by = 'Outsourced Parks' and zone=? "; + } else if(type.equalsIgnoreCase("Adoption")) { + sql="select park_name, maintained_by, labours_allocated, park_condition from parks where maintained_by = 'Adoption' and zone=? "; + } else if(type.equalsIgnoreCase("SHG")) { + sql="select park_name, maintained_by, labours_allocated, park_condition from parks where maintained_by = 'SHG' and zone=? "; + } else if(type.equalsIgnoreCase("Repair Needed")) { + sql="select park_name from parks where repair_work = 'Yes' and zone=? "; + } + try { + return jdbcTemplate.queryForList(sql, zone); + + } catch (Exception e) { + e.printStackTrace(); + return List.of(); + } + } + +} diff --git a/src/main/java/com/gcc/commissionerreview/service/PlayFieldService.java b/src/main/java/com/gcc/commissionerreview/service/PlayFieldService.java new file mode 100644 index 0000000..5e0803b --- /dev/null +++ b/src/main/java/com/gcc/commissionerreview/service/PlayFieldService.java @@ -0,0 +1,56 @@ +package com.gcc.commissionerreview.service; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.Map; + +import javax.sql.DataSource; + +@Service +public class PlayFieldService { + @Autowired + private JdbcTemplate jdbcTemplate; + + @Autowired + public void setDataSource(@Qualifier("mydatasource") DataSource dataSource) { + this.jdbcTemplate = new JdbcTemplate(dataSource); + } + + public List> getPlayFieldCountsByZone() { + String sql = "SELECT \n" + + " zone,\n" + + " COUNT(*) AS total_playfields,\n" + + " SUM(CASE WHEN LOWER(security_guard) = 'no' THEN 1 ELSE 0 END) AS without_security\n" + + " FROM (\n" + + " SELECT \n" + + " *,\n" + + " ROW_NUMBER() OVER (PARTITION BY zone, playfield_name ORDER BY id) AS rn\n" + + " FROM playfield\n" + + " ) t\n" + + " WHERE t.rn = 1\n" + + " GROUP BY zone\n" + + " ORDER BY CAST(zone AS UNSIGNED)"; + + return jdbcTemplate.queryForList(sql); + } + + + public List> getPlayFieldsWithoutGuards(int zone) { + String sql = "SELECT *\n" + + " FROM (\n" + + " SELECT \n" + + " id, zone, division, playfield_name, maintained_by, playfield_condition, security_guard, compound_wall,\n" + + " ROW_NUMBER() OVER (PARTITION BY playfield_name ORDER BY id) AS rn\n" + + " FROM playfield\n" + + " WHERE LOWER(security_guard) = 'no' AND zone = ?\n" + + " ) t\n" + + " WHERE t.rn = 1"; + + return jdbcTemplate.queryForList(sql, zone); + } + +} diff --git a/src/main/java/com/gcc/commissionerreview/service/SofaBedCollectionService.java b/src/main/java/com/gcc/commissionerreview/service/SofaBedCollectionService.java new file mode 100644 index 0000000..3d0b189 --- /dev/null +++ b/src/main/java/com/gcc/commissionerreview/service/SofaBedCollectionService.java @@ -0,0 +1,395 @@ +package com.gcc.commissionerreview.service; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +import javax.sql.DataSource; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +@Service +public class SofaBedCollectionService { + + @Autowired + private JdbcTemplate jdbcDomesticWasteTemplate; + + @Autowired + public void setDatasource(@Qualifier("mysqlSofaBedCollectionDataSource") DataSource datasource) { + this.jdbcDomesticWasteTemplate=new JdbcTemplate(datasource); + } + + + @Transactional(readOnly = true) + public List> getZoneReport() { + + String sql = """ + WITH date_limits AS ( + SELECT + DATE_SUB(CURDATE(), INTERVAL (DAYOFWEEK(CURDATE()) - 1) DAY) AS week_start, + DATE_ADD(DATE_SUB(CURDATE(), INTERVAL (DAYOFWEEK(CURDATE()) - 1) DAY), INTERVAL 7 DAY) AS week_end + ) + SELECT + COALESCE(ur.zone, 'TOTAL') AS zone, + COUNT(*) AS total_request, + + -- Requests created this week + SUM(CASE WHEN ur.cdate >= d.week_start AND ur.cdate < d.week_end THEN 1 ELSE 0 END) AS this_week_requests, + + -- Older requests + SUM(CASE WHEN ur.cdate < d.week_start THEN 1 ELSE 0 END) AS older_requests, + + -- Status-based counts + SUM(CASE WHEN ur.status = 2 THEN 1 ELSE 0 END) AS completed, + SUM(CASE WHEN ur.status = 4 THEN 1 ELSE 0 END) AS user_cancel, + SUM(CASE WHEN ur.status = 5 THEN 1 ELSE 0 END) AS officer_cancel, + + -- Pending = older_requests - (completed + cancels) + ( + SUM(CASE WHEN ur.cdate < d.week_start THEN 1 ELSE 0 END) + - SUM(CASE WHEN ur.status IN (2,4,5) THEN 1 ELSE 0 END) + ) AS pending + + FROM + user_request_table ur + CROSS JOIN date_limits d + WHERE + ur.is_active = 1 + AND ur.is_delete = 0 + GROUP BY + ur.zone WITH ROLLUP + ORDER BY + CASE WHEN ur.zone IS NULL THEN 999 ELSE ur.zone END; + """; + + List> reportList = jdbcDomesticWasteTemplate.queryForList(sql); + + Map response = new LinkedHashMap<>(); + response.put("status", "Success"); + response.put("message", "Zone-wise Report (All Dates)"); + response.put("data", reportList); + + return Collections.singletonList(response); + } + + + +// @Transactional + // public List> getZoneReport(String fromDate, String toDate) { + +// String sql = """ +// WITH date_limits AS ( +// SELECT +// STR_TO_DATE(?, '%d-%m-%Y') AS start_date, +// STR_TO_DATE(?, '%d-%m-%Y') AS end_date, +// DATE_SUB(CURDATE(), INTERVAL (DAYOFWEEK(CURDATE()) - 1) DAY) AS week_start, +// DATE_ADD(DATE_SUB(CURDATE(), INTERVAL (DAYOFWEEK(CURDATE()) - 1) DAY), INTERVAL 7 DAY) AS week_end +// ) +// SELECT +// COALESCE(ur.zone, 'TOTAL') AS zone, +// COUNT(*) AS total_request, + +// -- Requests created this week +// SUM(CASE WHEN ur.cdate >= d.week_start AND ur.cdate < d.week_end THEN 1 ELSE 0 END) AS this_week_requests, + +// -- Older requests +// SUM(CASE WHEN ur.cdate < d.week_start THEN 1 ELSE 0 END) AS older_requests, + +// -- Status-based counts +// SUM(CASE WHEN ur.status = 2 THEN 1 ELSE 0 END) AS completed, +// SUM(CASE WHEN ur.status = 4 THEN 1 ELSE 0 END) AS user_cancel, +// SUM(CASE WHEN ur.status = 5 THEN 1 ELSE 0 END) AS officer_cancel, + +// -- Pending = older_requests - (completed + cancels) +// ( +// SUM(CASE WHEN ur.cdate < d.week_start THEN 1 ELSE 0 END) +// - SUM(CASE WHEN ur.status IN (2,4,5) THEN 1 ELSE 0 END) +// ) AS pending + +// FROM +// user_request_table ur +// CROSS JOIN date_limits d +// WHERE +// ur.is_active = 1 +// AND ur.is_delete = 0 +// AND ur.cdate BETWEEN d.start_date AND d.end_date +// GROUP BY +// ur.zone WITH ROLLUP +// ORDER BY +// CASE WHEN ur.zone IS NULL THEN 999 ELSE ur.zone END; +// """; + +// List> reportList = jdbcDomesticWasteTemplate.queryForList(sql, fromDate, toDate); + +// Map response = new LinkedHashMap<>(); +// response.put("status", "Success"); +// response.put("message", "Zone-wise Report"); +// response.put("data", reportList); + +// return Collections.singletonList(response); + // } + + + + // @Transactional(readOnly = true) + // public List> getWardReport(String fromDate, String toDate, String zone) { + // String sql = + // "(" + // + " SELECT " + // + " ur.division AS division, " + // + " COUNT(*) AS total_request, " + // + " SUM(CASE WHEN ur.status = 1 THEN 1 ELSE 0 END) AS open, " + // + " SUM(CASE WHEN ur.status = 2 THEN 1 ELSE 0 END) AS completed, " + // + " SUM(CASE WHEN ur.status = 3 THEN 1 ELSE 0 END) AS pending, " + // + " SUM(CASE WHEN ur.status = 4 THEN 1 ELSE 0 END) AS user_cancel, " + // + " SUM(CASE WHEN ur.status = 5 THEN 1 ELSE 0 END) AS officer_cancel " + // + " FROM user_request_table ur " + // + " WHERE ur.is_active = 1 AND ur.is_delete = 0 AND ur.zone = ? " + // + " GROUP BY ur.division " + // + ") " + // + "UNION ALL " + // + "(" + // + " SELECT " + // + " 'TOTAL' AS division, " + // + " COUNT(*) AS total_request, " + // + " SUM(CASE WHEN ur.status = 1 THEN 1 ELSE 0 END) AS open, " + // + " SUM(CASE WHEN ur.status = 2 THEN 1 ELSE 0 END) AS completed, " + // + " SUM(CASE WHEN ur.status = 3 THEN 1 ELSE 0 END) AS pending, " + // + " SUM(CASE WHEN ur.status = 4 THEN 1 ELSE 0 END) AS user_cancel, " + // + " SUM(CASE WHEN ur.status = 5 THEN 1 ELSE 0 END) AS officer_cancel " + // + " FROM user_request_table ur " + // + " WHERE ur.is_active = 1 AND ur.is_delete = 0 AND ur.zone = ? " + // + ") " + // + "ORDER BY " + // + " CASE WHEN division = 'TOTAL' THEN 999 ELSE CAST(division AS UNSIGNED) END"; + + // List> reportList = jdbcDomesticWasteTemplate.queryForList(sql, zone, zone); + + // Map response = new LinkedHashMap<>(); + // response.put("status", "Success"); + // response.put("message", "Ward-wise Report"); + // response.put("data", reportList); + + // return Collections.singletonList(response); + // } + + + + @Transactional(readOnly = true) + public List> getWardReport(String zone) { + + String sql = """ + WITH date_limits AS ( + SELECT + DATE_SUB(CURDATE(), INTERVAL (DAYOFWEEK(CURDATE()) - 1) DAY) AS week_start, + DATE_ADD(DATE_SUB(CURDATE(), INTERVAL (DAYOFWEEK(CURDATE()) - 1) DAY), INTERVAL 7 DAY) AS week_end + ) + SELECT + COALESCE(ur.division, 'TOTAL') AS division, + COUNT(*) AS total_request, + + -- Requests created this week + SUM(CASE WHEN ur.cdate >= d.week_start AND ur.cdate < d.week_end THEN 1 ELSE 0 END) AS this_week_requests, + + -- Older requests + SUM(CASE WHEN ur.cdate < d.week_start THEN 1 ELSE 0 END) AS older_requests, + + -- Status-based counts + SUM(CASE WHEN ur.status = 2 THEN 1 ELSE 0 END) AS completed, + SUM(CASE WHEN ur.status = 4 THEN 1 ELSE 0 END) AS user_cancel, + SUM(CASE WHEN ur.status = 5 THEN 1 ELSE 0 END) AS officer_cancel, + + -- Pending = older_requests - (completed + cancels) + ( + SUM(CASE WHEN ur.cdate < d.week_start THEN 1 ELSE 0 END) + - SUM(CASE WHEN ur.status IN (2,4,5) THEN 1 ELSE 0 END) + ) AS pending + + FROM + user_request_table ur + CROSS JOIN date_limits d + WHERE + ur.is_active = 1 + AND ur.is_delete = 0 + AND ur.zone = ? + GROUP BY + ur.division WITH ROLLUP + ORDER BY + CASE WHEN ur.division IS NULL THEN 999 ELSE CAST(ur.division AS UNSIGNED) END; + """; + + List> reportList = jdbcDomesticWasteTemplate.queryForList(sql, zone); + + Map response = new LinkedHashMap<>(); + response.put("status", "Success"); + response.put("message", "Ward-wise Report with Weekly and Pending Breakdown"); + response.put("data", reportList); + + return Collections.singletonList(response); + } + + + + // @Transactional(readOnly = true) + // public List> getWardStatusDetails( + // String fromDate, String toDate, + // String ward, String status) { + + // // ✅ Base URL for images + // String fileBaseUrl = "https://gccservices.in"; // or your configured value + + // // ✅ SQL query with ward + status filters + // String sql = + // "SELECT " + + // " u.id, u.request_id, u.user_name, u.mobile, u.address, " + + // " u.latitude, u.longitude, u.zone, u.division, u.street_name, " + + // " u.quantity AS main_quantity, u.remarks, " + + // " CONCAT('" + fileBaseUrl + "/gccofficialapp/files', u.image_url) AS image_url, " + + // " DATE_FORMAT(u.cdate, '%d-%m-%Y') AS cdate, " + + // " sm.status_master AS status, " + + // " DATE_FORMAT(u.close_date, '%d-%m-%Y') AS close_date, " + + // " CONCAT('" + fileBaseUrl + "/gccofficialapp/files', u.officer_upload_url) AS officer_upload_url, " + + // " im.item_name, itm.quantity " + + // "FROM user_request_table u " + + // "LEFT JOIN items itm ON u.id = itm.req_table_id " + + // "LEFT JOIN item_master im ON itm.iteam_id = im.id AND im.is_active = 1 " + + // "LEFT JOIN status_master sm ON sm.id = u.status AND sm.is_active = 1 AND sm.is_delete = 0 " + + // "WHERE u.is_active = 1 AND u.is_delete = 0 " + + // " AND u.division = ? " + + // " AND u.status = ? " + + // "ORDER BY u.cdate DESC"; + + // // ✅ Execute query + // List> reportList = jdbcDomesticWasteTemplate.queryForList(sql, ward, status); + + + // Map response = new LinkedHashMap<>(); + // response.put("status", "Success"); + // response.put("message", "Ward-status-wise - Report"); + // response.put("data", reportList); + + // return Collections.singletonList(response); + + // //return groupRequestsWithItems(reportList); + + // } + + + + @Transactional(readOnly = true) + public List> getWardStatusDetails(String ward, String status) { + + // ✅ Base URL for images (you can move to application.properties later) + String fileBaseUrl = "https://gccservices.in"; + + // ✅ SQL query using only ward + status + String sql = """ + SELECT + u.id, + u.request_id, + u.user_name, + u.mobile, + u.address, + u.latitude, + u.longitude, + u.zone, + u.division, + u.street_name, + u.quantity AS main_quantity, + u.remarks, + CONCAT(?, u.image_url) AS image_url, + DATE_FORMAT(u.cdate, '%d-%m-%Y') AS cdate, + sm.status_master AS status, + DATE_FORMAT(u.close_date, '%d-%m-%Y') AS close_date, + CONCAT(?, u.officer_upload_url) AS officer_upload_url, + itm.iteam_id, + im.item_name, + itm.quantity + FROM user_request_table u + LEFT JOIN items itm ON u.id = itm.req_table_id + LEFT JOIN item_master im ON itm.iteam_id = im.id AND im.is_active = 1 + LEFT JOIN status_master sm ON sm.id = u.status AND sm.is_active = 1 AND sm.is_delete = 0 + WHERE + u.is_active = 1 + AND u.is_delete = 0 + AND u.division = ? + AND u.status = ? + ORDER BY u.cdate DESC + """; + + // ✅ Execute query + List> reportList = jdbcDomesticWasteTemplate.queryForList( + sql, + fileBaseUrl + "/gccofficialapp/files", + fileBaseUrl + "/gccofficialapp/files", + ward, + status + ); + + Map> groupedMap = new LinkedHashMap<>(); + + for (Map row : reportList) { + Integer id = (Integer) row.get("id"); + + Map item = null; + if (row.get("item_name") != null) { + item = new LinkedHashMap<>(); + item.put("item_name", row.get("item_name")); + item.put("quantity", row.get("quantity")); + } + + if (groupedMap.containsKey(id)) { + if (item != null) { + ((List>) groupedMap.get(id).get("items")).add(item); + } + } else { + Map newEntry = new LinkedHashMap<>(); + newEntry.put("id", id); + newEntry.put("request_id", row.get("request_id")); + newEntry.put("user_name", row.get("user_name")); + newEntry.put("mobile", row.get("mobile")); + newEntry.put("address", row.get("address")); + newEntry.put("latitude", row.get("latitude")); + newEntry.put("longitude", row.get("longitude")); + newEntry.put("zone", row.get("zone")); + newEntry.put("division", row.get("division")); + newEntry.put("street_name", row.get("street_name")); + newEntry.put("main_quantity", row.get("main_quantity")); + newEntry.put("remarks", row.get("remarks")); + newEntry.put("image_url", row.get("image_url")); + newEntry.put("cdate", row.get("cdate")); + newEntry.put("is_active", row.get("is_active")); + newEntry.put("is_delete", row.get("is_delete")); + newEntry.put("street_id", row.get("street_id")); + newEntry.put("status", row.get("status")); // Now this is human-readable + newEntry.put("is_app", row.get("is_app")); + newEntry.put("close_date", row.get("close_date")); + newEntry.put("officer_upload_url", row.get("officer_upload_url")); + + List> items = new ArrayList<>(); + if (item != null) { + items.add(item); + } + newEntry.put("items", items); + + groupedMap.put(id, newEntry); + } + } + + + // ✅ Wrap response + Map response = new LinkedHashMap<>(); + response.put("status", "Success"); + response.put("message", "Ward-status-wise Report"); + response.put("data", groupedMap.values()); + + return Collections.singletonList(response); + } + +} diff --git a/src/main/java/com/gcc/commissionerreview/service/ToiletService.java b/src/main/java/com/gcc/commissionerreview/service/ToiletService.java new file mode 100644 index 0000000..306fb37 --- /dev/null +++ b/src/main/java/com/gcc/commissionerreview/service/ToiletService.java @@ -0,0 +1,142 @@ +package com.gcc.commissionerreview.service; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.http.ResponseEntity; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.sql.DataSource; + +@Service +public class ToiletService { + + @Autowired + private JdbcTemplate jdbcTemplate; + + @Autowired + public void setDataSource(@Qualifier("mydatasource") DataSource dataSource) { + this.jdbcTemplate = new JdbcTemplate(dataSource); + } + + public Map getPack1Summary() { + String sql = "SELECT count(toilet_location) as pack1_toilet_location, " + + "sum(total_seats) as pack1_total_seat, " + + "SUM(CASE WHEN category = 'Major' THEN 1 ELSE 0 END) AS pack1_major_count, " + + "SUM(CASE WHEN category = 'Minor' THEN 1 ELSE 0 END) AS pack1_minor_count, " + + "SUM(CASE WHEN category = 'New' THEN 1 ELSE 0 END) AS pack1_new_count " + + "FROM spd_pack_1"; + + return jdbcTemplate.queryForMap(sql); + } + + public Map getSFDData() { + Map response = new HashMap<>(); + + List> data = new ArrayList>(); + Map pack1 = getPack1(); + data.add(pack1); + Map pack2 = getPack2(); + data.add(pack2); + Map pack3 = getPack3(); + data.add(pack3); + Map pack4 = getPack4(); + data.add(pack4); + response.put("Message", "Sucess"); + response.put("data", data); + return response; + } + + + private Map getPack4() { + String sql = "SELECT count(toilet_location) as pack4_toilet_location, sum(total_seats) as pack4_total_seat, " + + " SUM(CASE WHEN toilet_status = 'Major' THEN 1 ELSE 0 END) AS pack4_major_count, " + + " SUM(CASE WHEN toilet_status = 'Minor' THEN 1 ELSE 0 END) AS pack4_minor_count, " + + " SUM(CASE WHEN toilet_status = 'New' THEN 1 ELSE 0 END) AS pack4_new_count " + + " FROM " + + " spd_pack_4 "; + try { + return jdbcTemplate.queryForMap(sql); + + } catch (Exception e) { + e.printStackTrace(); + return Map.of(); + } + } + + + private Map getPack3() { + String sql = "SELECT count(toilet_location) as pack3_toilet_location, sum(total_seats) as pack3_total_seat, " + + " SUM(CASE WHEN toilet_status = 'Major' THEN 1 ELSE 0 END) AS pack3_major_count, " + + " SUM(CASE WHEN toilet_status = 'Minor' THEN 1 ELSE 0 END) AS pack3_minor_count, " + + " SUM(CASE WHEN toilet_status = 'New' THEN 1 ELSE 0 END) AS pack3_new_count " + + " FROM " + + " spd_pack_3 "; + try { + return jdbcTemplate.queryForMap(sql); + + } catch (Exception e) { + e.printStackTrace(); + return Map.of(); + } + } + + + private Map getPack2() { + String sql = "SELECT count(toilet_location) as pack2_toilet_location, sum(total_seats) as pack2_total_seat, " + + " SUM(CASE WHEN toilet_status = 'Major' THEN 1 ELSE 0 END) AS pack2_major_count, " + + " SUM(CASE WHEN toilet_status = 'Minor' THEN 1 ELSE 0 END) AS pack2_minor_count, " + + " SUM(CASE WHEN toilet_status = 'New' THEN 1 ELSE 0 END) AS pack2_new_count " + + " FROM " + + " spd_pack_2 "; + try { + return jdbcTemplate.queryForMap(sql); + + } catch (Exception e) { + e.printStackTrace(); + return Map.of(); + } + } + + + private Map getPack1() { + String sql = "SELECT count(toilet_location) as pack1_toilet_location, sum(total_seats) as pack1_total_seat, " + + " SUM(CASE WHEN category = 'Major' THEN 1 ELSE 0 END) AS pack1_major_count, " + + " SUM(CASE WHEN category = 'Minor' THEN 1 ELSE 0 END) AS pack1_minor_count, " + + " SUM(CASE WHEN category = 'New' THEN 1 ELSE 0 END) AS pack1_new_count " + + " FROM " + + " spd_pack_1 "; + try { + return jdbcTemplate.queryForMap(sql); + + } catch (Exception e) { + e.printStackTrace(); + return Map.of(); + } + } + + public List> getSFDPack1(String pack) { + String sql = ""; + if(pack.equalsIgnoreCase("pack1")) { + sql="SELECT * FROM spd_pack_1"; + } else if(pack.equalsIgnoreCase("pack2")) { + sql="SELECT * FROM spd_pack_2"; + } else if(pack.equalsIgnoreCase("pack3")) { + sql="SELECT * FROM spd_pack_3"; + } else if(pack.equalsIgnoreCase("pack4")) { + sql="SELECT * FROM spd_pack_4"; + } + try { + return jdbcTemplate.queryForList(sql); + + } catch (Exception e) { + e.printStackTrace(); + return List.of(); + } + } +} diff --git a/src/main/java/com/gcc/commissionerreview/service/UphcReportService.java b/src/main/java/com/gcc/commissionerreview/service/UphcReportService.java new file mode 100644 index 0000000..4752db7 --- /dev/null +++ b/src/main/java/com/gcc/commissionerreview/service/UphcReportService.java @@ -0,0 +1,54 @@ +package com.gcc.commissionerreview.service; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.stereotype.Service; + +import javax.sql.DataSource; +import java.util.List; +import java.util.Map; + +@Service +public class UphcReportService { + + @Autowired + private JdbcTemplate jdbcTemplate; + + @Autowired + public void setDataSource(@Qualifier("mydatasource") DataSource dataSource) { + this.jdbcTemplate = new JdbcTemplate(dataSource); + } + + + public List> getZoneWiseOpSummary() { + String sql = "SELECT " + + " zone, " + + " COUNT(DISTINCT phc) AS no_of_uphcs, " + + " SUM(jan_2025) AS jan_total_op, " + + " ROUND(SUM(jan_2025)/26, 2) AS jan_avg_op_day, " + + " SUM(feb_2025) AS feb_total_op, " + + " ROUND(SUM(feb_2025)/24, 2) AS feb_avg_op_day, " + + " SUM(mar_2025) AS mar_total_op, " + + " ROUND(SUM(mar_2025)/26, 2) AS mar_avg_op_day, " + + " SUM(apr_2025) AS apr_total_op, " + + " ROUND(SUM(apr_2025)/25, 2) AS apr_avg_op_day " + + " FROM uphc_performance " + + " GROUP BY zone " + + " ORDER BY CAST(zone AS UNSIGNED)"; + + return jdbcTemplate.queryForList(sql); + } + + + public List> getUphcDetailsByZone(String zone) { + String sql = "SELECT phc, jan_2025, feb_2025, mar_2025, apr_2025 " + + " FROM uphc_performance " + + " WHERE zone = ? " + + " ORDER BY phc"; + + return jdbcTemplate.queryForList(sql, zone); + } + + +} diff --git a/src/main/java/com/gcc/commissionerreview/service/VeterinaryPetClinicService.java b/src/main/java/com/gcc/commissionerreview/service/VeterinaryPetClinicService.java new file mode 100644 index 0000000..9362f6f --- /dev/null +++ b/src/main/java/com/gcc/commissionerreview/service/VeterinaryPetClinicService.java @@ -0,0 +1,267 @@ +package com.gcc.commissionerreview.service; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.boot.web.client.RestTemplateBuilder; +import org.springframework.dao.DataAccessException; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.stereotype.Service; +import org.springframework.web.client.RestTemplate; + +import javax.sql.DataSource; + +@Service +public class VeterinaryPetClinicService { + + @Autowired + private JdbcTemplate jdbcTemplate; + + @Autowired + public void setDataSource(@Qualifier("mydatasource") DataSource dataSource) { + this.jdbcTemplate = new JdbcTemplate(dataSource); + } + + + public List> getPetClinicSummary() throws DataAccessException { + String sql = """ + SELECT + date, + day, + center_name, + SUM(cases_treated) AS cases_treated, + SUM(arv) AS arv + FROM + veterinary_petclinic + WHERE + MONTH(STR_TO_DATE(date, '%d-%m-%Y')) = 2 + AND YEAR(STR_TO_DATE(date, '%d-%m-%Y')) = 2025 + GROUP BY + date, day, center_name + ORDER BY + STR_TO_DATE(date, '%d-%m-%Y'), center_name + """; + + return jdbcTemplate.queryForList(sql); + } + + + public List getDistinctMonths() { + String sql = "SELECT DISTINCT(month) FROM veterinary_petclinic"; + return jdbcTemplate.queryForList(sql, String.class); + } + + public List getDistinctCenters() { + String sql = "SELECT DISTINCT(center_name) FROM veterinary_petclinic"; + return jdbcTemplate.queryForList(sql, String.class); + } + + public List> getFilteredReport(String month, String centerName) { + String sql = "SELECT * FROM veterinary_petclinic WHERE 1=1"; + + List params = new ArrayList(); + if (month != null && !month.isEmpty()) { + sql += " AND month = ?"; + params.add(month); + } + if (centerName != null && !centerName.isEmpty()) { + sql += " AND center_name = ?"; + params.add(centerName); + } + + return jdbcTemplate.queryForList(sql, params.toArray()); + } + + + public List> fetchYearlySummary() { + String sql = """ + SELECT + center_name, + + -- November 2024 + SUM(CASE WHEN RIGHT(date, 7) = '11-2024' THEN cases_treated ELSE 0 END) AS `Nov-24 Treated`, + SUM(CASE WHEN RIGHT(date, 7) = '11-2024' THEN arv ELSE 0 END) AS `Nov-24 ARV`, + + -- December 2024 + SUM(CASE WHEN RIGHT(date, 7) = '12-2024' THEN cases_treated ELSE 0 END) AS `Dec-24 Treated`, + SUM(CASE WHEN RIGHT(date, 7) = '12-2024' THEN arv ELSE 0 END) AS `Dec-24 ARV`, + + -- January 2025 + SUM(CASE WHEN RIGHT(date, 7) = '01-2025' THEN cases_treated ELSE 0 END) AS `Jan-25 Treated`, + SUM(CASE WHEN RIGHT(date, 7) = '01-2025' THEN arv ELSE 0 END) AS `Jan-25 ARV`, + + -- February 2025 + SUM(CASE WHEN RIGHT(date, 7) = '02-2025' THEN cases_treated ELSE 0 END) AS `Feb-25 Treated`, + SUM(CASE WHEN RIGHT(date, 7) = '02-2025' THEN arv ELSE 0 END) AS `Feb-25 ARV`, + + -- March 2025 + SUM(CASE WHEN RIGHT(date, 7) = '03-2025' THEN cases_treated ELSE 0 END) AS `Mar-25 Treated`, + SUM(CASE WHEN RIGHT(date, 7) = '03-2025' THEN arv ELSE 0 END) AS `Mar-25 ARV`, + + -- April 2025 + SUM(CASE WHEN RIGHT(date, 7) = '04-2025' THEN cases_treated ELSE 0 END) AS `Apr-25 Treated`, + SUM(CASE WHEN RIGHT(date, 7) = '04-2025' THEN arv ELSE 0 END) AS `Apr-25 ARV` + + FROM veterinary_petclinic + WHERE is_active = 1 AND is_delete = 0 + GROUP BY center_name + ORDER BY center_name; + + """; + + return jdbcTemplate.queryForList(sql); + } + + + public List> AbcReportSummary() { + String sql = """ + SELECT + month, + + SUM(pulianthope) AS 'Pulianthope Sterilized', + SUM(llyods_colony) AS 'Llyods Colony Sterilized', + SUM(kannammapet) AS 'Kannammapet Sterilized', + SUM(meenambakkam) AS 'Meenambakkam Sterilized', + SUM(sholinganallur) AS 'Sholinganallur Sterilized', + SUM(total) AS 'Total Sterilized' + + FROM veterinary_abc + WHERE is_active = 1 AND is_delete = 0 + GROUP BY month + ORDER BY FIELD(month, 'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'); + """; + + return jdbcTemplate.queryForList(sql); + } + + + public List> getPetClinicConsolidatedReport() { + String sql = "SELECT date AS reportdate, center_name, cases_treated, arv FROM veterinary_petclinic"; + return jdbcTemplate.queryForList(sql); + } + + + public ResponseEntity getZoneWiseCattleData() { + + Map response = new HashMap<>(); + + try { + String[] zoneColumns = new String[15]; + String[] zoneNames = new String[15]; + + int[] totalvalue = new int[8]; + for (int i = 0; i < 15; i++) { + zoneColumns[i] = "zone_" + (i + 1); + zoneNames[i] = "Zone " + (i + 1); + } + + List> resultList = new ArrayList<>(); + List> totalresult = new ArrayList<>(); + + for (int i = 0; i < 15; i++) { + String zoneCol = zoneColumns[i]; + String displayName = zoneNames[i]; + + String sql = "SELECT " + + "SUM(CASE WHEN month = 'Nov-24' THEN CAST(" + zoneCol + " AS UNSIGNED) ELSE 0 END) AS Nov2024, " + + "SUM(CASE WHEN month = 'Dec-24' THEN CAST(" + zoneCol + " AS UNSIGNED) ELSE 0 END) AS Dec2024, " + + "SUM(CASE WHEN month = 'Jan-25' THEN CAST(" + zoneCol + " AS UNSIGNED) ELSE 0 END) AS Jan2025, " + + "SUM(CASE WHEN month = 'Feb-25' THEN CAST(" + zoneCol + " AS UNSIGNED) ELSE 0 END) AS Feb2025, " + + "SUM(CASE WHEN month = 'Mar-25' THEN CAST(" + zoneCol + " AS UNSIGNED) ELSE 0 END) AS Mar2025, " + + "SUM(CASE WHEN month = 'Apr-25' THEN CAST(" + zoneCol + " AS UNSIGNED) ELSE 0 END) AS Apr2025 " + + "FROM veterinary_cattle"; + + Map row = jdbcTemplate.queryForMap(sql); + row.put("zone", displayName); + row.put("zoneIndex", i + 1); + + resultList.add(row); + } + + String tsql = "SELECT " + + " month," + + " SUM(zone_1) + SUM(zone_2) + SUM(zone_3) + SUM(zone_4) + SUM(zone_5) + " + + " SUM(zone_6) + SUM(zone_7) + SUM(zone_8) + SUM(zone_9) + SUM(zone_10) + " + + " SUM(zone_11) + SUM(zone_12) + SUM(zone_13) + SUM(zone_14) + SUM(zone_15) AS total_zone_sum " + + "FROM veterinary_cattle " + + "WHERE month IN ('Nov-24', 'Dec-24', 'Jan-25', 'Feb-25', 'Mar-25', 'Apr-25') " + + "GROUP BY month " + + "ORDER BY FIELD(month, 'totalNov', 'totalDec', 'totalJan', 'totalFeb', 'totalMar', 'totalApr')"; + + // Execute the total sum query and get the results as a list of maps + totalresult = jdbcTemplate.queryForList(tsql); + + if (resultList.isEmpty()) { + response.put("status", "nodata"); + response.put("message", "No data found"); + response.put("data", "No Data"); + } else { + response.put("status", "success"); + response.put("message", "Data retrieved successfully"); + response.put("data", resultList); + response.put("total", totalresult); + } + + return ResponseEntity.ok(response); + + } catch (Exception e) { + response.put("status", "error"); + response.put("message", "Backend error: " + e.getMessage()); + response.put("data", null); + return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(response); + } + } + + public List> getData() { + String sql = """ + ( + SELECT + month, + perambur, + villivakkam, + kallikuppam, + saidapet, + (COALESCE(perambur,0) + COALESCE(villivakkam,0) + COALESCE(kallikuppam,0) + COALESCE(saidapet,0)) AS total + FROM veterinary_slaughter + WHERE year > 2024 + ) + UNION ALL + ( + SELECT + 'Total' AS month, + SUM(perambur) AS perambur, + SUM(villivakkam) AS villivakkam, + SUM(kallikuppam) AS kallikuppam, + SUM(saidapet) AS saidapet, + SUM(COALESCE(perambur,0) + COALESCE(villivakkam,0) + COALESCE(kallikuppam,0) + COALESCE(saidapet,0)) AS total + FROM veterinary_slaughter + WHERE year > 2024 + ) + """; + + return jdbcTemplate.queryForList(sql); + } + + public List> ViewMeatRaidReport() { + String sql = "SELECT zone, " + + "MAX(CASE WHEN month = 'January' THEN visited_2025 END) AS jan_visited, " + + "MAX(CASE WHEN month = 'January' THEN seized_2025 END) AS jan_seized, " + + "MAX(CASE WHEN month = 'February' THEN visited_2025 END) AS feb_visited, " + + "MAX(CASE WHEN month = 'February' THEN seized_2025 END) AS feb_seized, " + + "MAX(CASE WHEN month = 'March' THEN visited_2025 END) AS mar_visited, " + + "MAX(CASE WHEN month = 'March' THEN seized_2025 END) AS mar_seized, " + + "MAX(CASE WHEN month = 'April' THEN visited_2025 END) AS apr_visited, " + + "MAX(CASE WHEN month = 'April' THEN seized_2025 END) AS apr_seized " + + "FROM meat_raid " + + "WHERE month IN ('January', 'February', 'March', 'April') " + + "GROUP BY zone "; + + return jdbcTemplate.queryForList(sql); + } +} diff --git a/src/main/java/com/gcc/commissionerreview/service/makkaludanMudalvarService.java b/src/main/java/com/gcc/commissionerreview/service/makkaludanMudalvarService.java new file mode 100644 index 0000000..d3fd8cf --- /dev/null +++ b/src/main/java/com/gcc/commissionerreview/service/makkaludanMudalvarService.java @@ -0,0 +1,46 @@ +package com.gcc.commissionerreview.service; + +import java.util.List; +import java.util.Map; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.stereotype.Service; + +import javax.sql.DataSource; + +@Service +public class makkaludanMudalvarService { + + @Autowired + private JdbcTemplate jdbcTemplate; + @Autowired + public void setDataSource(@Qualifier("mydatasource") DataSource dataSource) { + this.jdbcTemplate = new JdbcTemplate(dataSource); + } + + public List> ViewProgressReport() { + String sql = "SELECT ticket_owner_name,\r\n" + + "COUNT(CASE WHEN status_display = 'Accepted' THEN 1 END) AS Accepted,\r\n" + + "COUNT(CASE WHEN status_display = 'Accepted and Waitlisted' THEN 1 END) AS Accepted_Waitlisted,\r\n" + + "COUNT(CASE WHEN status_display = 'Pending Action' THEN 1 END) AS Pending_Action,\r\n" + + "COUNT(CASE WHEN status_display = 'Received' THEN 1 END) AS Received,\r\n" + + "COUNT(CASE WHEN status_display = 'Rejected' THEN 1 END) AS Rejected,\r\n" + + "COUNT(*) AS grand_total\r\n" + + "FROM grievance_details\r\n" + + "GROUP BY ticket_owner_name\r\n" + + "ORDER BY ticket_owner_name;"; + + return jdbcTemplate.queryForList(sql); + } + + public List> viewProgressReportList(String ticketOwnerName, String statusDisplay) { + String sql = "SELECT petitioner,ticket_owner_name,status_display,grievance_subtype,petition_details,ticket_age,close_days,status_1 " + + "FROM grievance_details " + + "WHERE ticket_owner_name = ? AND status_display = ?"; + return jdbcTemplate.queryForList(sql, ticketOwnerName, statusDisplay); + } + + +} diff --git a/src/main/java/com/gcc/commissionerreview/service/mobileDiagonosticService.java b/src/main/java/com/gcc/commissionerreview/service/mobileDiagonosticService.java new file mode 100644 index 0000000..57b88ed --- /dev/null +++ b/src/main/java/com/gcc/commissionerreview/service/mobileDiagonosticService.java @@ -0,0 +1,75 @@ +package com.gcc.commissionerreview.service; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.stereotype.Service; + +import javax.sql.DataSource; +import java.util.List; +import java.util.Map; + + +@Service +public class mobileDiagonosticService { + + @Autowired + private JdbcTemplate jdbcTemplate; + + @Autowired + public void setDataSource(@Qualifier("mydatasource") DataSource dataSource) { + this.jdbcTemplate = new JdbcTemplate(dataSource); + } + + public List> fetchMonthlyCampData() { + String sql = """ + SELECT + zone, + + SUM(CASE WHEN month = 'Jan-25' THEN camps_conducted ELSE 0 END) AS jan_camps, + SUM(CASE WHEN month = 'Jan-25' THEN target_population ELSE 0 END) AS jan_target, + SUM(CASE WHEN month = 'Jan-25' THEN screened ELSE 0 END) AS jan_screened, + + SUM(CASE WHEN month = 'Feb-25' THEN camps_conducted ELSE 0 END) AS feb_camps, + SUM(CASE WHEN month = 'Feb-25' THEN target_population ELSE 0 END) AS feb_target, + SUM(CASE WHEN month = 'Feb-25' THEN screened ELSE 0 END) AS feb_screened, + + SUM(CASE WHEN month = 'Mar-25' THEN camps_conducted ELSE 0 END) AS mar_camps, + SUM(CASE WHEN month = 'Mar-25' THEN target_population ELSE 0 END) AS mar_target, + SUM(CASE WHEN month = 'Mar-25' THEN screened ELSE 0 END) AS mar_screened, + + SUM(CASE WHEN month = 'Apr-25' THEN camps_conducted ELSE 0 END) AS apr_camps, + SUM(CASE WHEN month = 'Apr-25' THEN target_population ELSE 0 END) AS apr_target, + SUM(CASE WHEN month = 'Apr-25' THEN screened ELSE 0 END) AS apr_screened + + FROM mobile_diagonostic + GROUP BY zone + ORDER BY zone + """; + + return jdbcTemplate.queryForList(sql); + } + + public List> fetchZoneDetails(String zone) { + String sql = """ + SELECT + zone, + month, + target_population, + screened AS no_screened, + presumptive_identified, + x_rays_taken, + normal_x_rays, + abnormal_x_rays, + sputum_collected, + sputum_positive, + mc_tb, + cd_tb, + total_positive + FROM mobile_diagonostic + WHERE zone = ? """; + + return jdbcTemplate.queryForList(sql, zone); + } + +} diff --git a/src/main/java/com/gcc/commissionerreview/service/mudhalvarinMugavariService.java b/src/main/java/com/gcc/commissionerreview/service/mudhalvarinMugavariService.java new file mode 100644 index 0000000..c9e70cb --- /dev/null +++ b/src/main/java/com/gcc/commissionerreview/service/mudhalvarinMugavariService.java @@ -0,0 +1,44 @@ +package com.gcc.commissionerreview.service; + +import java.util.List; +import java.util.Map; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.stereotype.Service; + +import javax.sql.DataSource; + +@Service +public class mudhalvarinMugavariService { + + @Autowired + private JdbcTemplate jdbcTemplate; + + @Autowired + public void setDataSource(@Qualifier("mydatasource") DataSource dataSource) { + this.jdbcTemplate = new JdbcTemplate(dataSource); + } + + public List> ViewPendencyReport() { + String sql = "SELECT ticket_owner_name,\r\n" + + "COUNT(CASE WHEN status_display = 'In Process' THEN 1 END) AS In_Process, \r\n" + + "COUNT(CASE WHEN status_display = 'Pending Action' THEN 1 END) AS Pending_Action,\r\n" + + "COUNT(CASE WHEN status_display = 'Received' THEN 1 END) AS Received,\r\n" + + "COUNT(*) AS grand_total\r\n" + + "FROM mudhalvarin_mugavari\r\n" + + "GROUP BY ticket_owner_name\r\n" + + "ORDER BY ticket_owner_name;"; + + return jdbcTemplate.queryForList(sql); + } + + public List> viewPendencyReportList(String ticketOwnerName, String statusDisplay) { + String sql = "SELECT petitioner, ticket_owner_name, status_display, grievance_subtype, ticket_age " + + "FROM mudhalvarin_mugavari " + + "WHERE ticket_owner_name = ? AND status_display = ?"; + return jdbcTemplate.queryForList(sql, ticketOwnerName, statusDisplay); + } + +} diff --git a/src/main/java/com/gcc/commissionerreview/service/urbangreenService.java b/src/main/java/com/gcc/commissionerreview/service/urbangreenService.java new file mode 100644 index 0000000..f4e420b --- /dev/null +++ b/src/main/java/com/gcc/commissionerreview/service/urbangreenService.java @@ -0,0 +1,39 @@ +package com.gcc.commissionerreview.service; + +import java.util.List; +import java.util.Map; + +import javax.sql.DataSource; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.stereotype.Service; + +@Service +public class urbangreenService { + + @Autowired + private JdbcTemplate jdbcTemplate; + + @Autowired + public void setDataSource(@Qualifier("mydatasource") DataSource dataSource) { + this.jdbcTemplate = new JdbcTemplate(dataSource); + } + + public List> ViewUrbanGreenReport() { + String sql = "SELECT zone, phase, sum(saplings_planted) as saplings_planted, " + + "sum(saplings_survived) as saplings_survived " + + "FROM urbangreen group by zone, phase order by CAST(zone AS UNSIGNED) ASC;\r\n"; + + return jdbcTemplate.queryForList(sql); + } + + + public List> ViewUrbanGreenReportList(String zone, String phase) { + String sql = "SELECT zone, phase, location, saplings_planted, saplings_survived " + + "FROM urbangreen where zone=? and phase=?;"; + return jdbcTemplate.queryForList(sql, zone, phase); + } + +} diff --git a/src/main/resources/application-dev.properties b/src/main/resources/application-dev.properties new file mode 100644 index 0000000..36b2f7d --- /dev/null +++ b/src/main/resources/application-dev.properties @@ -0,0 +1,18 @@ +spring.application.name=commissionerreview + + +#spring.datasource.url=jdbc:mysql://localhost:3306/commssioner_review +#spring.datasource.username=root +#spring.datasource.password=root +#spring.jpa.show-sql=true +#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver +server.port=8078 + +# === Secondary Database === +#secondary.datasource.url=jdbc:oracle:thin:@10.1.0.14:1521:chncorp +#secondary.datasource.username=FAS +#secondary.datasource.password=FAS +#secondary.datasource.driver-class-name=oracle.jdbc.OracleDriver + + + diff --git a/src/main/resources/application-prod.properties b/src/main/resources/application-prod.properties new file mode 100644 index 0000000..a5e670a --- /dev/null +++ b/src/main/resources/application-prod.properties @@ -0,0 +1,36 @@ +spring.application.name=commissionerreview + + +#spring.datasource.url=jdbc:mysql://gcc-facial-db-instance-1.cf48eqcciziq.ap-south-1.rds.amazonaws.com:3306/commissioner_review +#spring.datasource.username=root +#spring.datasource.password=gcc-facial-password +#spring.jpa.show-sql=true +#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver + +server.port=8078 + + +# JDBC URL +spring.datasource.url=jdbc:mysql://gcc-facial-db-instance-1.cf48eqcciziq.ap-south-1.rds.amazonaws.com:3306/commissioner_review + +# Database username +spring.datasource.username=root + +# Database password +spring.datasource.password=gcc-facial-password + +# HikariCP settings (optional but recommended) +spring.datasource.hikari.maximum-pool-size=10 +spring.datasource.hikari.minimum-idle=5 +spring.datasource.hikari.idle-timeout=30000 +spring.datasource.hikari.connection-timeout=30000 +spring.datasource.hikari.max-lifetime=1800000 + +# JDBC driver class name +spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver + +# Log level for root (everything) +#logging.level.root= + +# OR for detailed debugging: + logging.level.root=DEBUG \ No newline at end of file diff --git a/src/main/resources/application-test.properties b/src/main/resources/application-test.properties new file mode 100644 index 0000000..f88bad7 --- /dev/null +++ b/src/main/resources/application-test.properties @@ -0,0 +1,36 @@ +spring.application.name=commissionerreview + + +#spring.datasource.url=jdbc:mysql://gcc-facial-db-instance-1.cf48eqcciziq.ap-south-1.rds.amazonaws.com:3306/commissioner_review +#spring.datasource.username=root +#spring.datasource.password=gcc-facial-password +#spring.jpa.show-sql=true +#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver + +server.port=8080 + + +# JDBC URL +spring.datasource.url=jdbc:mysql://127.0.0.1:3306/commissioner_review + +# Database username +spring.datasource.username=root + +# Database password +spring.datasource.password=Bonton#2K24 + +# HikariCP settings (optional but recommended) +spring.datasource.hikari.maximum-pool-size=10 +spring.datasource.hikari.minimum-idle=5 +spring.datasource.hikari.idle-timeout=30000 +spring.datasource.hikari.connection-timeout=30000 +spring.datasource.hikari.max-lifetime=1800000 + +# JDBC driver class name +spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver + +# Log level for root (everything) +logging.level.root=ERROR + +# OR for detailed debugging: +# logging.level.root=DEBUG \ No newline at end of file diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties new file mode 100644 index 0000000..257b306 --- /dev/null +++ b/src/main/resources/application.properties @@ -0,0 +1 @@ +spring.profiles.active=dev \ No newline at end of file diff --git a/src/main/resources/templates/fragments/script.html b/src/main/resources/templates/fragments/script.html new file mode 100644 index 0000000..4d87f1a --- /dev/null +++ b/src/main/resources/templates/fragments/script.html @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/modules/C&DWasteProcessing.html b/src/main/resources/templates/modules/C&DWasteProcessing.html new file mode 100644 index 0000000..dfd4e13 --- /dev/null +++ b/src/main/resources/templates/modules/C&DWasteProcessing.html @@ -0,0 +1,91 @@ + + + + + Construction and Demolition Waste Report + + + + +

Construction and Demolition waste Processing (01.05.2025 to 15.05.2025) - Conditional COD 20.04.2022

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
S.No.LocationInward quantity in MTProcessed quantity in MTPerformance %Dispatched Quantity (MT)Backlog quantity (MT) as on 15.05.2025
1KDG7291.7912975178%409515127
2PDG7197.4413816192%298628403
TOTAL1448926791708143530
+ + diff --git a/src/main/resources/templates/modules/GardenandTenderCoconutWaste.html b/src/main/resources/templates/modules/GardenandTenderCoconutWaste.html new file mode 100644 index 0000000..3963703 --- /dev/null +++ b/src/main/resources/templates/modules/GardenandTenderCoconutWaste.html @@ -0,0 +1,113 @@ + + + + + Garden Waste & Tender Coconut Report + + + + +

Garden Waste and Tender Coconut Processing (01.05.2025 to 15.05.2025) - COD 23.12.2021

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
S.NoLocationInward in MTProcessed in MTPerformance %Backlog quantity (MT) as on 15.05.2025
Garden wasteTender CoconutTotalGarden wasteTender CoconutTotalGarden wasteTender CoconutTotal
1KDG15720235921414035499%3799924113040
2PDG3846791063283723100695%86321026118893
Total5418811422497863136096%124311950231933
+ + diff --git a/src/main/resources/templates/modules/ReviewofBioCNGPlants.html b/src/main/resources/templates/modules/ReviewofBioCNGPlants.html new file mode 100644 index 0000000..e0f43d3 --- /dev/null +++ b/src/main/resources/templates/modules/ReviewofBioCNGPlants.html @@ -0,0 +1,82 @@ + + + + + Bio-CNG Chetpet Report + + + + +

Bio-CNG Chetpet (01.05.2025 to 15.05.2025) - COD 15.11.2021

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
S.NoLocationInward in MTRejects in MTProcessed in MTGas produced in MT% of pure gas producedDispatched Quantity (MT)
1Chetpet2248.53114.252134.28361.70%32
2Madhavaram281.8312.46269.3700%0
+ + diff --git a/src/main/resources/templates/modules/combined_bio_mining_report.html b/src/main/resources/templates/modules/combined_bio_mining_report.html new file mode 100644 index 0000000..bb84453 --- /dev/null +++ b/src/main/resources/templates/modules/combined_bio_mining_report.html @@ -0,0 +1,209 @@ + + + + + Combined Bio-Mining Project Report + + + + +

Perungudi Bio-mining Project (as on 12.05.2025)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PackageName of the ContractorVolume of Legacy waste to be processed in Cu.mVolume of Legacy waste processed in Cu.m% of completionTotal volume disposed till 12-05-2025 (m3)% of volume Disposed in the revised volumeRemarksPayment Released as on date in Crores.
Package IWestart3,74,2362,78,64374%15761843%Pre termination Notice issued. Under Arbitration21.8 (-54.23%)
Package IIWestart4,24,0153,07,56273%20593050%Pre termination Notice issued. Under Arbitration24.2 (-53.04%)
Package IIIZigma5,91,1335,91,133100%591133100%completed62.88 (-100%)
Package IVZigma5,52,3215,52,321100%672873100%completed58.8 (-100%)
Package VZigma5,87,1305,87,130100%627332100%completed62.49 (-100%)
Package VIWestart5,32,7501,88,93835%8995317%Termination notice issued Under Arbitration14.22 (-33%)
TOTAL30,61,58525,05,72782%23,55,10477%244.39 (-74%)
+ +

Bio Mining - Kodungaiyur (as on 16.05.2025)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PackageName of the ContractorVolume of Legacy waste to be processed in MTVolume of Legacy waste processed in MT% of completionDisposal in MTPayment Released as on date in Crores.
Package IZigma Global Environ Solutions21,20,090.764,90,747.2823.14%2,77,802.33 (-13.10%)18.61 (-9.11%)
Package IIRamky Infrastructure Limited4,14,213.0842,592.9110.28%15,950.17 (-3.85%)-
Package IIIAscent E digit Solution Pvt. Ltd11,35,376.552,51,103.0222.11%98,945.65 (-8.71%)8.02 (-7.33%)
Package IVZigma Global Environ Solutions4,41,202.951,27,342.1928.88%65,661.94 (-14.88%)2.94 (-6.97%)
Package VRamky Infrastructure Limited18,35,204.1812,295.110.66%1855.29 (-0.1%)-
Package VIZigma Global Environ Solutions7,06,418.152,19,070.4431.01%94,891.36 (-13.43%)6.08 (-8.93%)
TOTAL66,52,50511,43,150.9519.34%5,55,106.74 (-9.01%)25.65 (-5.39%)
+ + + diff --git a/src/main/resources/templates/modules/compoundwall.html b/src/main/resources/templates/modules/compoundwall.html new file mode 100644 index 0000000..fd22970 --- /dev/null +++ b/src/main/resources/templates/modules/compoundwall.html @@ -0,0 +1,143 @@ + + + + + Compound Wall for Playfields + + + + + +

Compound wall for playfield

+
+ + + + + + + + + +
Zone No.No. of playfieldsNo. of playfields with damaged or repaired compound wall
+
+ + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/modules/enforcement/Zonewise.html b/src/main/resources/templates/modules/enforcement/Zonewise.html new file mode 100644 index 0000000..dc34c2c --- /dev/null +++ b/src/main/resources/templates/modules/enforcement/Zonewise.html @@ -0,0 +1,759 @@ + + + + Enforcement Zonwise Report Summary + + + + + + + + + + + + +
+

Enforcement - Zonewise Report

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ZONENOTICE 1NOTICE 2NOTICE 3NOTICE 4NOTICE 5NOTICE 6NOTICE 7
Received InprogessCompleted Received InprogessCompleted Received InprogessCompleted Received InprogessCompleted Received InprogessCompleted Received InprogessCompleted Received InprogessCompleted
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/modules/landacquisitionprogress.html b/src/main/resources/templates/modules/landacquisitionprogress.html new file mode 100644 index 0000000..320b6a0 --- /dev/null +++ b/src/main/resources/templates/modules/landacquisitionprogress.html @@ -0,0 +1,108 @@ + + + + + Land Acquisition Progress + + + + +

Land Acquisition Progress

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Zone No.Name of the ProjectExtent of Private Land to be Acquired (sqm)StatusStatus of Acquisition
1ROB over the existing subway at Ganesapuram @ km 4/1-3 near Vyasarpadi Jeeva Railway Station2437Yet to be Acquired11 (1) preliminary notification published by the Chennai Collectorate 29.12.2024. Gazette published in news + paper on 8.1.2025. 15(2) enquiry conducted on 10.03.2025. out of 37 land owners, 32 land owners given + consent for private negotiation, remaining one land owner given objection and 4 land owners dispute. Addl. + AS Proposal Sent to CLA on 24.04.2025. Rehabilitation and resettlement Nil report received from ICO file + under circulation. +
2High level bridge across Coovum river at Chinna Nolambur connecting Poonamallee High Road and Union Road in + dn.143 & 144, Zone-11 + 4396Yet to be AcquiredLand acquisition is being dealt by Highways Department. Land acquisition G.O obtained vide G.O. (Ms) No. 113 + dated 24.08.2023. Revised Land acquisition G.O obtained vide G.O. (Ms) No. 41 dated 28.02.2025. Maduravoyal + -II Final Award passed for extent of 491 sq.m and CCD completed. Maduravoyal -I : Draft Award for an extent + of 3905 sq.m under preparation. The compensation amount to be disbursed by the Highways Department. +
3High Level bridge across Coovum River at Sannathi 1st Cross Street connecting Poonamallee High Road to Union + Road in dn.143 & 144, Zone-11 + 1532Yet to be AcquiredAbout 1532 sq.m of land required for this project. Private land - 392 sq.m. ULC land -922 sq.m and + Government land -218 sq.m. G.O. has been obtained from the Government vide G.O.Ms.No.05 dated 09.09.2024. + Letter sent to the Government on 31.12.2024 for obtaining revised A.S due to revision in LA. Action to be + initiated by LAO/Spl.DRO(LA), Highways to publish 11(1) preliminary notification. +
4Construction of Bridge across Puzhal Surplus Water canal at Vadaperumbakkam in Dn-17, Zone-II1228Yet to be Acquired11 (1) notification published on 18.10.2024. Objections 15(2) have been enquired on 18.12.2024 by LAO. out + of 13 land owners, 8 land owners given consent for private negotiation, remaining 5 land owners yet to be + give. Rehabilitation and resettlement Nil report received from RDO(North) and sent to CLA for approval on + 04.04.2025. approval awaited from CLA. +
5Flyover at Valluvar Kottam junction in Dn 110 & 113, Zone-IX10879Yet to be AcquiredAbout 10879 sq.m of land required for this project. Private land - 2860 sq.m and Government land -8019 sq.m. + Public hearing on SIA report has been conducted on 26.2.2024 The objection raised in the public hearing and + the reply for the objections received from the requisition boy and sent to District Collector, vide this + office Lr No. 390/2023/A1, dated. 15.3.2024 Expert Committee Report received on 19.03.2025 & Report + published on 09.04.205. Expert Committee published report awaited from GCC, RDO's(Central & South), Spl. + DRO, (H) & Tahsildar of Egmore, Mylapore& Guindy Taluks Collector Proceedings for LAO has initiate + the land acquisition process is under Circulation. +
+ + diff --git a/src/main/resources/templates/modules/makkaludanmudhalvar.html b/src/main/resources/templates/modules/makkaludanmudhalvar.html new file mode 100644 index 0000000..94de644 --- /dev/null +++ b/src/main/resources/templates/modules/makkaludanmudhalvar.html @@ -0,0 +1,274 @@ + + + + Makkaludan Mudhalvar Summary + + + + + + + + + + + + +
+

Makkaludan Mudhalvar Progress Summary

+
+ +
+ + + + + + + + + + + + + + + + +
S.NoTicket Owner NameAcceptedAccepted and WaitlistedPending ActionReceivedRejectedGrand Total
+
+ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/modules/micro_compost_centre.html b/src/main/resources/templates/modules/micro_compost_centre.html new file mode 100644 index 0000000..aaf86bd --- /dev/null +++ b/src/main/resources/templates/modules/micro_compost_centre.html @@ -0,0 +1,184 @@ + + + + + MCC Status Report + + + + +

Micro Compost Centre

+

MCC Status (Before 07.01.2025 and Presently Working)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
S.NoZoneMCC (Before 07.01.2025)Presently working MCCs
No of MCCDesign Capacity in MTNo of MCCDesign Capacity in MT
11533.23128.26
22422.4828.5
33417.2400
443064.6926.34
55957.73219.38
662827.4433.01
772242.0723.58
883960.3924.95
991224.6325.23
1010718.411.94
1111413.0500
1212931.6926.94
1313627.2100
1414663.7223.8
1515527.813.85
TOTAL190531.7522115.77
+ + diff --git a/src/main/resources/templates/modules/mobileDiagonosticreports.html b/src/main/resources/templates/modules/mobileDiagonosticreports.html new file mode 100644 index 0000000..11cf8e6 --- /dev/null +++ b/src/main/resources/templates/modules/mobileDiagonosticreports.html @@ -0,0 +1,224 @@ + + + + Audit Report Summary + + + + + + + + + + + + +
+

Mobile Diagnostics Unit-Zone wise Report

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
ZoneJan, 2025Feb, 2025Mar, 2025
No. of Camps ConductedTarget PopulationNo. ScreenedNo. of Camps ConductedTarget PopulationNo. ScreenedNo. of Camps ConductedTarget PopulationNo. Screened
+
+ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/modules/mudhalvarinmugavari.html b/src/main/resources/templates/modules/mudhalvarinmugavari.html new file mode 100644 index 0000000..9ab7b8e --- /dev/null +++ b/src/main/resources/templates/modules/mudhalvarinmugavari.html @@ -0,0 +1,228 @@ + + + + Mudhalvarin Mugavari Summary + + + + + + + + + + + + +
+

Mudhalvarin Mugavari Pendency Summary

+
+ +
+ + + + + + + + + + + + + + + +
S.NoTicket Owner NameIn ProcessPending ActionReceivedGrand Total
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/modules/parks.html b/src/main/resources/templates/modules/parks.html new file mode 100644 index 0000000..3386785 --- /dev/null +++ b/src/main/resources/templates/modules/parks.html @@ -0,0 +1,215 @@ + + + + + Parks Report + + + + + + + + + +
+

Cleaning of Parks & Playfields - Parks

+
+ +
+ + + + + + + + + + + + + + +
ZoneNo. of ParksNo. of Parks maintained by GCCNo. of Parks outsourced for maintenanceNo. of Parks maintained by adoptionNo. of Parks maintained by SHGsNo. of parks needing repairNo. of labourers appointed
+
+ + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/modules/perungudibiomining.html b/src/main/resources/templates/modules/perungudibiomining.html new file mode 100644 index 0000000..264a147 --- /dev/null +++ b/src/main/resources/templates/modules/perungudibiomining.html @@ -0,0 +1,229 @@ + + + + + Perungudi Bio-mining Project + + + +

Perungudi Bio-mining Project (Ongoing) under SBM 1.0 – Rs.350 crores – as on 12.05.2025

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PackageName of the ContractorVolume of Legacy waste to be processed in Cu.mVolume of Legacy waste processed in Cu.m% of completionTotal volume disposed till 12-05-2025 (m3)% of volume Disposed in the revised volumeRemarksPayment Released as on date in Crores
Package IWestart3,74,2362,78,64374%15761843%Pre termination Notice issued. Under Arbitration21.80 (54.23%)
Package IIWestart4,24,0153,07,56273%20593050%Pre termination Notice issued. Under Arbitration24.20 (53.04%)
Package IIIZigma5,91,1335,91,133100%591133100%completed62.88 (100%)
Package IVZigma5,52,3215,52,321100%672873100%completed58.80 (100%)
Package VZigma5,87,1305,87,130100%627332100%completed62.49 (100%)
Package VIWestart5,32,7501,88,93835%8995317%Termination notice issued Under Arbitration14.22 (33%)
TOTAL30,61,58525,05,72782%23,55,10477%244.39 (74%)
+

Kodungaiyur Bio-Mining Project under SBM (U) 2.0 Rs.640.83 Crores

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PackageName of the ContractorVolume of Legacy waste to be processed in MTVolume of Legacy waste processed in MT as on 16.05.2025% of completionDisposal in MT as on 16.05.2025Payment Released as on date in Crores
Package IZigma Global Environ Solutions21,20,090.764,90,747.2823.14%2,77,802.33 (13.10%)18.61 (9.11%)
Package IIRamky Infrastructure Limited4,14,213.0842,592.9110.28%15,950.17 (3.85%)-
Package IIIAscent E digit Solution Pvt. Ltd11,35,376.552,51,103.0222.11%98,945.65 (8.71%)8.02 (7.33%)
Package IVZigma Global Environ Solutions4,41,202.951,27,342.1928.88%65,661.94 (14.88%)2.94 (6.97%)
Package VRamky Infrastructure Limited18,35,204.1812,295.110.66%1,855.29 (0.10%)-
Package VIZigma Global Environ Solutions7,06,418.152,19,070.4431.01%94,891.36 (13.43%)6.08 (8.93%)
TOTAL66,52,50511,43,150.9519.34%5,55,106.74 (9.01%)25.65 (5.39%)
+ + diff --git a/src/main/resources/templates/modules/playfield.html b/src/main/resources/templates/modules/playfield.html new file mode 100644 index 0000000..c723c54 --- /dev/null +++ b/src/main/resources/templates/modules/playfield.html @@ -0,0 +1,154 @@ + + + + + Security Guards for Playgrounds + + + + + + +

Security Guards to be appointed for Playgrounds

+
+ + + + + + + + + +
Zone No.No. of playfieldsNo. of playfields without security guards
+
+ + + + + + + + + diff --git a/src/main/resources/templates/modules/slaughterhouse.html b/src/main/resources/templates/modules/slaughterhouse.html new file mode 100644 index 0000000..523400c --- /dev/null +++ b/src/main/resources/templates/modules/slaughterhouse.html @@ -0,0 +1,119 @@ + + + + Audit Report Summary + + + + + + + + + + + + +
+

Slaughter House Summary

+
+ +
+ + + + + + + + + + + + + + + +
MonthperamburVillivakkamKallikuppamSaidapet
+
+ + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/modules/sofa_bed/zonewise.html b/src/main/resources/templates/modules/sofa_bed/zonewise.html new file mode 100644 index 0000000..148a4a5 --- /dev/null +++ b/src/main/resources/templates/modules/sofa_bed/zonewise.html @@ -0,0 +1,662 @@ + + + + Sofa Bed collection Zonewise Report Summary + + + + + + + + + + + + +
+

Sofa and Bed Collection - Zonewise Report

+
+ +
+ + + + + + + + + + + + + + + + + + +
ZoneTotal RequestThis weekCompletedUser Cancelled Officer CancelledOver The week
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/modules/sofa_bed/zonewise1.html b/src/main/resources/templates/modules/sofa_bed/zonewise1.html new file mode 100644 index 0000000..05fe897 --- /dev/null +++ b/src/main/resources/templates/modules/sofa_bed/zonewise1.html @@ -0,0 +1,687 @@ + + + + Sofa Bed collection Zonewise Report Summary + + + + + + + + + + + + +
+

Sofa and Bed Collection - Zonewise Report

+
+ +
+ + + + + + + + + + + + + + + + + + +
ZoneTotal RequestThis week RequestsOlder RequestsCompletedUser Cancelled Officer CancelledPending
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/modules/solidwastemanagement.html b/src/main/resources/templates/modules/solidwastemanagement.html new file mode 100644 index 0000000..064ae36 --- /dev/null +++ b/src/main/resources/templates/modules/solidwastemanagement.html @@ -0,0 +1,281 @@ + + + + + Solid Waste Management + + + + +

DETAILS OF WET WASTE AND DRY WASTE PROCESSING AGAINST DESIGN CAPACITY (MT)
+(01.05.2025 to 14.05.2025) (AVERAGE)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ZoneTOTAL WET WASTE (MT)TOTAL DRY WASTE (MT)
Design Capacity (MT)Processing (TPD)
Last Fortnight
Percentage %Processing (TPD)
This Fortnight
Percentage %Target (MT)Processing (TPD)
Last Fortnight
Percentage %Processing (TPD)
This Fortnight
Percentage %
178.2351.686651.31669.973.51352.8328
240.4826.326525.726416.981.4281.368
374.0839.585337.165029.245.85204.7116
4126.0941.793337.593093.355.5865.146
5130.2315.441212.91083.358.58106.17
648.948.04167.621624.430.8130.984
757.4724.474322.533938.492.1151.674
847.5511.112310.562225.464.82195.8423
957.6350.388746.218036.436.4510033.1991
104314.643419.374525.464.19169.0235
113120.176518.16592111.01529.6546
1250.4424.924923.394632.7510319.2428
1346.2917.443815.293331.217.57246.4121
1455.818.283317.4931229.12417.9936
1513.8516.6210016.2410000000
Total901.08380.8942361.5440490.1132.8727104.1121
+ +

WET WASTE PROCESSING REPORT (MCC & BIO-CNG)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ZoneMCC (MT)BIO-CNG (MT)
Design Capacity (MT)Processing (TPD)
Last fortnight
Percentage %Processing (TPD)
This fortnight
Percentage %Target (MT)Processing (TPD)
Last fortnight
Percentage %Processing (TPD)
This fortnight
Percentage %
128.2619.977119.81709.973.51352.8328
28.58.761008.7310016.981.4281.368
30000029.245.85204.7116
46.3411.61008.6510093.355.5865.146
519.383.83204.312283.358.58106.17
63.012.89962.458224.430.8130.984
73.583.571003.5810038.492.1151.674
84.952.01410.851725.464.82195.8423
95.233.04582.825436.436.4510033.1991
101.94000025.464.19169.0235
11000002111.01529.6546
126.946.72976.549432.7510319.2428
130000031.217.57246.4121
1423.80000229.12417.9936
153.853.971004.1310000000
Total115.7766.375761.8753490.1132.8727104.1121
+ + + +

WET WASTE – BIO GAS & BIO-METHANATION

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ZoneBIO GAS (MT)BIO-METHANATION (MT)
Design Capacity (MT)Processing (TPD)
Last fortnight
Percentage %Processing (TPD)
This fortnight
Percentage %Target (MT)Processing (TPD)
Last fortnight
Percentage %Processing (TPD)
This fortnight
Percentage %
10000000000
20000000000
30.1000000000
41.4000000000
50.5000200000
61.50001000000
72.40.5210.52130000
81.14000060000
91000000000
100.6000.04700000
110000000000
120.750.99100110000000
130.080.02250.022300000
140000000000
150000000000
Total9.471.51161.5617210000
+ + + +

WET WASTE – WINDROW & HORTICULTURAL WASTE

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ZoneWINDROW (MT)HORTICULTURAL WASTE (MT)
Design Capacity (MT)Processing (TPD)
Last fortnight
Percentage %Processing (TPD)
This fortnight
Percentage %Target (MT)Processing (TPD)
Last fortnight
Percentage %Processing (TPD)
This fortnight
Percentage %
13025.048325.6586103.16323.0130
21014.910015.1410051.24250.510
334.7429.948629.8186103.78382.6527
41522.2110021.68100102.4242.1321
5151.0270.614102.01201.8919
601.331001.48100103.01302.727
7011.9210011.52100106.37645.2653
800000104.28433.8839
9000001510.887310.268
10000001510.457010.3169
1100000109.17928.5185
1200000107.21726.666
1300000159.85668.8659
1400000109.16929.595
15000001012.6510012.11100
Total104.7479.7876105.8810116092.065888.1255
+ + + + +

DRY WASTE – PLASTIC BALING CENTER & INCINERATOR

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ZonePlastic waste sent to Baling Center (MT)Incinerator (MT)
Design Capacity (MT)Processing (TPD)
Last fortnight
Percentage %Processing (TPD)
This fortnight
Percentage %Target (MT)Processing (TPD)
Last fortnight
Percentage %Processing (TPD)
This fortnight
Percentage %
14000023.7118611.79100
24000012.222225.83100
34000020.73364.57100
43000062.24372.3439
54000060.2300
64000050.95191.326
740.43111.293250.97193.0260
840.1130.12360.1730.091
94000062.45412.3840
10400005.51.82330.8115
113000031.58532.6789
123000020.92460.7839
134000051.09221.0321
143000030.2270.6923
15300002.51.13450.8835
Total550.5411.4136020.423438.1864
+ + + diff --git a/src/main/resources/templates/modules/srgmprojectsprogress.html b/src/main/resources/templates/modules/srgmprojectsprogress.html new file mode 100644 index 0000000..1c96499 --- /dev/null +++ b/src/main/resources/templates/modules/srgmprojectsprogress.html @@ -0,0 +1,114 @@ + + + + + SR GM Projects Progress + + + + +

SR GM Projects Progress

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
S.NoZone No.Name of the ProjectIssuesCurrent Status
14LC-2B - Manali ROB (Honarable Minister Announcement 2022-23)Railway portion of work to be expedited fastly.90% of GCC portion has been completed. Railway portion of work to be expedited fastly.
24LC-2A - Ennore High road (Honarable Minister Announcement 2024-25)GAD to be approved by SR.Tender to be called by the Railways for the Railway portion. GCC called tender and work order to be + issued. +
34Ganesapuram ROB (Honarable Minister Announcement 2021-22)To depute an official for Railway portion of work.Railway portion of ROB: 32/36 Pile, 1/4 Pile cap and 0/4 Pier. Pile work is in progress.
44Ganesapuram ROB Push through CulvertTo issue Caution Order permission to carry out the Cluster work.As requested by the Railways Rs. 1,06,84,410/- has been remitted to Railways towards Departmental and Way + leave charges on 19.06.2024 & 17.08.2024 respectively. It was requested the Railways on 08.08.2024 to + provide rails of 1600m for the cluster work and to accord permission for the line block. 4th unit casted on + 21.08.2024. Letter has been sent to the Railways on 28.01.2025 to accord Caution Order permission. Cluster + work will be commenced immediately after the obtaining Caution Order permission from the Railways +
57Ambattur LC6 SubwayRailways to deposit the balance amount of Rs.5,39,90,520/- to GCC.Letter sent to Railways on 19.06.2024 to remit the amount Rs.5,39,90,520/- to GCC.
612LC-14- FOBClarification requested from the Railways. Earlier Railways informed this project will be taken up by their + own fund (100% by Railways) except the Lift cost. Now Railways requested for 50:50 cost sharing basis. + GCC has given the approval for the Revised GAD on 19.08.2024.
75LC11A- Bojaraja Nagar SubwayUtilization Certificate to be issued by the Railways.Letter sent to the SR to accord permission to demolish Railway's Compound wall on 23.09.2024. Requested + the Railways to issue Utilisation Certificate, the Sr.DEN/Co-ordination, Southern Railway has requested the + GCC to deposit the balance amount of Rs.8,05,844 to Railways. The balance amount has been remitted to + Railways on 30.09.2024 . Utilization Certificate yet to issue by the Railways. +
84LC-2 ROB- Korukkupet (Honarable Minister Announcement 2025-26)Railways to approve the GADAlignment drawing has been sent to the Railways on 22.10.2024.
+ + diff --git a/src/main/resources/templates/modules/streetnameprogress.html b/src/main/resources/templates/modules/streetnameprogress.html new file mode 100644 index 0000000..c7da0b6 --- /dev/null +++ b/src/main/resources/templates/modules/streetnameprogress.html @@ -0,0 +1,310 @@ + + + + + Facia Replacement Progress Report + + + +

Facia Replacement Progress Report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
S.NoPack NoZoneReplacing FaciaEst. Amt (Rs. in Lakhs)CompletedProgressTo be taken
Single ArrowDouble ArrowSingle ArrowDouble ArrowSingle ArrowDouble ArrowSingle ArrowDouble Arrow
11I2382549.3148016202825
2II172131.8900001721
3III64433124.891700062733
4IV125072245.9626615653033157
5V196036.09
6VI60582129.41002060382
7VII113321.4600113300
8VIII77734149.32000077734
92IX3024465.2712900017344
10X2161242.4000021612
11XI2761554.1180102551710
12XII399073.4600003990
13XIII159876359.311110158675
14XIV1741936.21500016919
15XV454785.1225901001857
16BRR1845044.87000018450
TOTAL78305101549.07
+ + diff --git a/src/main/resources/templates/modules/toilet.html b/src/main/resources/templates/modules/toilet.html new file mode 100644 index 0000000..9d03ba5 --- /dev/null +++ b/src/main/resources/templates/modules/toilet.html @@ -0,0 +1,197 @@ + + + + + DBFOT of Public Toilets + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + +
DBFOT of Public Toilets
Package No.Target No. of LocationsTarget No. of SeatsNo. of locations Construction completedNo. of seats completedNo. of New ToiletsNo. of Minor RepairsNo. of Major Repairs
+
+ + + + + + + + + + + + + diff --git a/src/main/resources/templates/modules/trafficsystems.html b/src/main/resources/templates/modules/trafficsystems.html new file mode 100644 index 0000000..ee04e63 --- /dev/null +++ b/src/main/resources/templates/modules/trafficsystems.html @@ -0,0 +1,158 @@ + + + + + Smart Traffic Project Status + + + + + + + + + + + +
+

Intelligent Traffic System - Summary

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SystemTotal LocationsPilot CompletedPlan Till May’ 25Current Status
Adaptive Traffic Signal System (ATCS)165597 Junctions54 junction major works completed & 31 location installation work in progress +
Traffic Incident Detection System (TIDS)58145 Locations34 Locations major works completed & 9 Location work in progress
Automatic Traffic Counter and Classifier (ATCC)115140 Locations30 Location major works completed & 5 Locations work is in progress
Red Light Violation Detection System (RLVD)50132 Junctions29 Junction Work is in Progress
Speed Limit Violation System (SLVD)1016 Locations3 Location in progress
Variable Message Sign (VMS)13-6 Locations3 Location in Progress
On Board Bus Unit (OBU)2600502600 NosOBU Installation completed in 2600 Buses
Passenger Information System (PIS)6168608 Nos2-Line - 211 Locations Work in Progress + 4-Line - 23 Locations work in Progress + 10-Line - 3 Location work in Progress +
Depot Management System (DMS)32325 Nos28 Depot Configuration completed
+
+
+ + + + + + + + + diff --git a/src/main/resources/templates/modules/uphcreport.html b/src/main/resources/templates/modules/uphcreport.html new file mode 100644 index 0000000..2f19294 --- /dev/null +++ b/src/main/resources/templates/modules/uphcreport.html @@ -0,0 +1,300 @@ + + + + Audit Report Summary + + + + + + + + + + + + + + + +
+

UPHC-Zone-wise Report

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
ZoneNo. of UPHCsJan, 2025Feb, 2025Mar, 2025Apr, 2025
Total OPAvg. OP/DayTotal OPAvg. OP/DayTotal OPAvg. OP/DayTotal OPAvg. OP/Day
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/modules/urbangreenreport.html b/src/main/resources/templates/modules/urbangreenreport.html new file mode 100644 index 0000000..b3ac917 --- /dev/null +++ b/src/main/resources/templates/modules/urbangreenreport.html @@ -0,0 +1,203 @@ + + + + Urban Green Summary + + + + + + + + + + + +
+
+

Urban Green Summary

+
+ +
+ + + + + + + + + + + + +
Sl.NoZone NoPhase NoNo of saplings plantedNo of survived
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/modules/veterinary/abccenters.html b/src/main/resources/templates/modules/veterinary/abccenters.html new file mode 100644 index 0000000..60fdc3a --- /dev/null +++ b/src/main/resources/templates/modules/veterinary/abccenters.html @@ -0,0 +1,93 @@ + + + + + Veterinary ABC Monthly Summary + + + + + + + + + + + + +
+

ABC Centres - Sterilization Summary

+ + + + + + + + + + + + + + + +
MonthPulianthopeLlyods ColonyKannammapetMeenambakkamSholinganallurTotal
+
+ + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/modules/veterinary/cattlecatch.html b/src/main/resources/templates/modules/veterinary/cattlecatch.html new file mode 100644 index 0000000..b62e57d --- /dev/null +++ b/src/main/resources/templates/modules/veterinary/cattlecatch.html @@ -0,0 +1,196 @@ + + + + Veterinary Cattle Catch Report Summary + + + + + + + + + + + + +
+

Cattle Catch - Zonewise Report

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +
ZoneNov, 2024Dec, 2024Jan, 2025Feb, 2025Mar, 2025Apr, 2025
Cattle Caught Cattle Caught Cattle Caught Cattle Caught Cattle Caught Cattle Caught
+
+ + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/modules/veterinary/meatraidreport.html b/src/main/resources/templates/modules/veterinary/meatraidreport.html new file mode 100644 index 0000000..8b7d008 --- /dev/null +++ b/src/main/resources/templates/modules/veterinary/meatraidreport.html @@ -0,0 +1,132 @@ + + + + Meat Raid Summary + + + + + + + + + + + +
+
+

Meat Raid Summary

+
+ +
+ + + + + + + + + + + + + + + + + + + + + + +
Sl.NoZoneJan 2025Feb 2025Mar 2025Apr 2025
InspectedSeized (KG)InspectedSeized (KG)InspectedSeized (KG)InspectedSeized (KG)
+
+
+ + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/templates/modules/veterinary/petclinic.html b/src/main/resources/templates/modules/veterinary/petclinic.html new file mode 100644 index 0000000..a243fc9 --- /dev/null +++ b/src/main/resources/templates/modules/veterinary/petclinic.html @@ -0,0 +1,126 @@ + + + + + Pet Clinic Summary + + + + + + + +
+

Pet Clinics Summary

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
CentreNov 2024Dec 2024Jan 2025Feb 2025Mar 2025Apr 2025
TreatedARVTreatedARVTreatedARVTreatedARVTreatedARVTreatedARV
+
+
+ + + + + + + + + + diff --git a/src/test/java/com/gcc/commissionerreview/DashboardserviceApplicationTests.java b/src/test/java/com/gcc/commissionerreview/DashboardserviceApplicationTests.java new file mode 100644 index 0000000..03789f1 --- /dev/null +++ b/src/test/java/com/gcc/commissionerreview/DashboardserviceApplicationTests.java @@ -0,0 +1,13 @@ +package com.gcc.commissionerreview; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +class DashboardserviceApplicationTests { + + @Test + void contextLoads() { + } + +}