From eae6a144061ce4d979cd9af8248cc8a3a4ccd8dc Mon Sep 17 00:00:00 2001 From: yoganandhank Date: Wed, 21 May 2025 12:03:00 +0530 Subject: [PATCH] added in mixed waste amount --- Dump20250423.sql | 383 ++++++ .../DumpRegistrationAPIController.java | 174 +++ .../cdwaste/controller/MainController.java | 75 ++ backend/cdwaste/service/OfficerService.java | 161 +++ backend/cdwaste/service/SMSService.java | 40 + frontend/cdwastecollect/lessoneton.html | 430 +++++++ frontend/cdwastecollect/officer.html | 1122 +++++++++++++++++ frontend/cdwastecollect/reports.html | 411 ++++++ 8 files changed, 2796 insertions(+) create mode 100644 Dump20250423.sql create mode 100644 backend/cdwaste/controller/DumpRegistrationAPIController.java create mode 100644 backend/cdwaste/controller/MainController.java create mode 100644 backend/cdwaste/service/OfficerService.java create mode 100644 backend/cdwaste/service/SMSService.java create mode 100644 frontend/cdwastecollect/lessoneton.html create mode 100644 frontend/cdwastecollect/officer.html create mode 100644 frontend/cdwastecollect/reports.html diff --git a/Dump20250423.sql b/Dump20250423.sql new file mode 100644 index 0000000..2246b9a --- /dev/null +++ b/Dump20250423.sql @@ -0,0 +1,383 @@ +-- MySQL dump 10.13 Distrib 8.0.40, for Win64 (x86_64) +-- +-- Host: localhost Database: dumpwastecollector +-- ------------------------------------------------------ +-- Server version 8.0.40 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!50503 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `dumping_location` +-- + +DROP TABLE IF EXISTS `dumping_location`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `dumping_location` ( + `id` int NOT NULL AUTO_INCREMENT, + `location` varchar(255) DEFAULT NULL, + `is_active` tinyint(1) DEFAULT '1', + `is_delete` tinyint(1) DEFAULT '0', + `cdate` datetime DEFAULT CURRENT_TIMESTAMP, + `quantity_id` varchar(20) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=101 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `dumping_location` +-- + +LOCK TABLES `dumping_location` WRITE; +/*!40000 ALTER TABLE `dumping_location` DISABLE KEYS */; +INSERT INTO `dumping_location` VALUES (1,'Kodungaiyur',1,0,'2025-03-25 15:24:21','2'),(2,'perungudi',1,0,'2025-03-25 15:24:21','2'),(3,'Buckingam canal road, Sathangadu, Thiruvottriyur. (Adjacent to lorry station, Zone-1)',1,0,'2025-04-03 16:13:19','1'),(4,'Unit-5, Kamaraj Salai (Near zonal office)',1,0,'2025-04-03 16:13:19','1'),(5,'CMDA Truck Terminal near Night Shelter (Back side of Madhavaram Bus Terminus)',1,0,'2025-04-03 16:13:19','1'),(6,'Kodungaiyur Dumping ground, Tondiarpet High Road (3rd gate)',1,0,'2025-04-03 16:13:19','1'),(7,'Part of old Cattle depot, Avadhanam Pappier Road, Choolai (Opposite to Corporation School)',1,0,'2025-04-03 16:13:19','1'),(8,'Part of old Cattle depot, Avadhanam Pappier Road, Choolai (Opposite to Corporation School)',0,1,'2025-04-03 16:13:19','1'),(9,'Vanagaram Road, Athipet dumping yard',1,0,'2025-04-03 16:13:19','1'),(10,'1st Main Road, Shenoy Nagar (Near Gajalakshmi Colony)',1,0,'2025-04-03 16:13:19','1'),(11,'Lloyds Colony (Near Corporation ITI Institute)',1,0,'2025-04-03 16:13:19','1'),(12,'Gurusiva Street, S.M Block, Jafferkhanpet, Kodambakkam (Near R-10 MGR Nagar Police Station)',1,0,'2025-04-03 16:13:19','1'),(13,'Nolambur Phase II, 2nd main road (Near Madhuravoyal Taluk office)',1,0,'2025-04-03 16:13:19','1'),(14,'Nandambakkam TPF near Adyar river bund in Dn - 158',1,0,'2025-04-03 16:13:19','1'),(15,'Velechery Main Road, Near to Gurunanak college, Velecherry Burial Ground',1,0,'2025-04-03 16:13:19','1'),(16,'200 Ft Radial Road, Perungudi Dumping Ground',1,0,'2025-04-03 16:13:19','1'),(17,'Gangaiamman Kovil Street extn., Karapakkam (Near to Tamilnadu Teacher Education University)',1,0,'2025-04-03 16:13:19','1'),(18,'Kodungaiyur',1,0,'2025-04-04 13:28:42','3'),(19,'perungudi',1,0,'2025-04-04 13:28:42','3'),(100,'aLL',0,1,'2025-04-04 13:28:42','1'); +/*!40000 ALTER TABLE `dumping_location` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `order_log` +-- + +DROP TABLE IF EXISTS `order_log`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `order_log` ( + `id` int NOT NULL AUTO_INCREMENT, + `order_info` varchar(1000) DEFAULT NULL, + `order_id` varchar(45) DEFAULT NULL, + `ref_id` varchar(45) DEFAULT NULL, + `cdate` datetime DEFAULT CURRENT_TIMESTAMP, + `order_status` varchar(45) DEFAULT NULL, + `pay_attempt` int DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `order_log` +-- + +LOCK TABLES `order_log` WRITE; +/*!40000 ALTER TABLE `order_log` DISABLE KEYS */; +/*!40000 ALTER TABLE `order_log` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `payment` +-- + +DROP TABLE IF EXISTS `payment`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `payment` ( + `id` int NOT NULL AUTO_INCREMENT, + `mobile_no` varchar(25) DEFAULT NULL, + `order_id` varchar(100) DEFAULT NULL, + `payment_id` varchar(100) DEFAULT NULL, + `paymentstatus` varchar(45) DEFAULT NULL, + `payment_date` datetime DEFAULT CURRENT_TIMESTAMP, + `ref_id` varchar(45) DEFAULT NULL, + `amount` double DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `payment` +-- + +LOCK TABLES `payment` WRITE; +/*!40000 ALTER TABLE `payment` DISABLE KEYS */; +/*!40000 ALTER TABLE `payment` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `payment_failure_log` +-- + +DROP TABLE IF EXISTS `payment_failure_log`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `payment_failure_log` ( + `id` int NOT NULL AUTO_INCREMENT, + `payment_id` varchar(100) DEFAULT NULL, + `order_id` varchar(100) DEFAULT NULL, + `ref_id` varchar(45) DEFAULT NULL, + `reason` varchar(45) DEFAULT NULL, + `cdate` datetime DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `payment_failure_log` +-- + +LOCK TABLES `payment_failure_log` WRITE; +/*!40000 ALTER TABLE `payment_failure_log` DISABLE KEYS */; +/*!40000 ALTER TABLE `payment_failure_log` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `quantity_master` +-- + +DROP TABLE IF EXISTS `quantity_master`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `quantity_master` ( + `id` int NOT NULL AUTO_INCREMENT, + `quantity` varchar(255) DEFAULT NULL, + `is_active` tinyint(1) DEFAULT '1', + `is_delete` tinyint(1) DEFAULT '0', + `cdate` datetime DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `quantity_master` +-- + +LOCK TABLES `quantity_master` WRITE; +/*!40000 ALTER TABLE `quantity_master` DISABLE KEYS */; +INSERT INTO `quantity_master` VALUES (1,'Less Than 1 Ton',1,0,'2025-03-25 15:26:18'),(2,'1 Ton to 20 Ton',1,0,'2025-03-25 15:26:18'),(3,'More Than 20 Ton',1,0,'2025-03-25 15:26:18'); +/*!40000 ALTER TABLE `quantity_master` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `refund_info` +-- + +DROP TABLE IF EXISTS `refund_info`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `refund_info` ( + `id` int NOT NULL AUTO_INCREMENT, + `ref_id` varchar(255) DEFAULT NULL, + `refund_amt` double DEFAULT NULL, + `balance_amt` double DEFAULT NULL, + `pid` int DEFAULT NULL, + `refund_id` varchar(255) DEFAULT NULL, + `refund_status` varchar(100) DEFAULT NULL, + `cdate` datetime DEFAULT CURRENT_TIMESTAMP, + `r_desc` varchar(2000) DEFAULT NULL, + `rrn` varchar(55) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `refund_info` +-- + +LOCK TABLES `refund_info` WRITE; +/*!40000 ALTER TABLE `refund_info` DISABLE KEYS */; +/*!40000 ALTER TABLE `refund_info` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `vehicle_master` +-- + +DROP TABLE IF EXISTS `vehicle_master`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `vehicle_master` ( + `id` int NOT NULL AUTO_INCREMENT, + `vehicle_name` varchar(255) DEFAULT NULL, + `is_active` tinyint(1) DEFAULT '1', + `is_delete` tinyint(1) DEFAULT '0', + `cdate` datetime DEFAULT CURRENT_TIMESTAMP, + `quantity_id` int DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `vehicle_master` +-- + +LOCK TABLES `vehicle_master` WRITE; +/*!40000 ALTER TABLE `vehicle_master` DISABLE KEYS */; +INSERT INTO `vehicle_master` VALUES (1,'GCC Service',1,0,'2025-04-03 22:01:45',1),(2,'GCC Authorized C&D Waste Collectors',1,0,'2025-04-03 22:01:45',2),(3,'Self Arranged Vehicles',1,0,'2025-04-03 22:01:45',1),(4,'GCC Service',1,0,'2025-04-04 13:18:37',2),(5,'Self Arranged Vehicles',1,0,'2025-04-04 13:18:37',2),(6,'GCC Authorized C&D Waste Collectors',1,0,'2025-04-04 13:18:37',3),(7,'Self Arranged Vehicles',1,0,'2025-04-04 13:18:37',3); +/*!40000 ALTER TABLE `vehicle_master` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `wards` +-- + +DROP TABLE IF EXISTS `wards`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `wards` ( + `id` int NOT NULL AUTO_INCREMENT, + `ward_name` varchar(50) DEFAULT NULL, + `is_active` tinyint(1) DEFAULT '1', + `is_delete` tinyint(1) DEFAULT '0', + `cdate` datetime DEFAULT CURRENT_TIMESTAMP, + `zone_id` int DEFAULT NULL, + `zone_name` varchar(45) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=144 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `wards` +-- + +LOCK TABLES `wards` WRITE; +/*!40000 ALTER TABLE `wards` DISABLE KEYS */; +INSERT INTO `wards` VALUES (1,'001',1,0,'2025-04-12 16:55:46',1,'01'),(2,'002',1,0,'2025-04-12 16:55:46',1,'01'),(3,'003',1,0,'2025-04-12 16:55:46',1,'01'),(4,'004',1,0,'2025-04-15 01:14:30',1,'01'),(5,'005',1,0,'2025-04-15 01:14:30',1,'01'),(6,'006',1,0,'2025-04-15 01:14:30',1,'01'),(7,'007',1,0,'2025-04-15 01:14:30',1,'01'),(8,'008',1,0,'2025-04-15 01:14:30',1,'01'),(9,'009',1,0,'2025-04-15 01:14:30',1,'01'),(10,'010',1,0,'2025-04-15 01:14:30',1,'01'),(11,'011',1,0,'2025-04-15 01:14:30',1,'01'),(12,'012',1,0,'2025-04-15 01:14:30',1,'01'),(13,'013',1,0,'2025-04-15 01:14:30',1,'01'),(14,'014',1,0,'2025-04-15 01:14:30',1,'01'),(15,'015',1,0,'2025-04-15 01:14:30',2,'02'),(16,'016',1,0,'2025-04-15 01:14:30',2,'02'),(17,'017',1,0,'2025-04-15 01:14:30',2,'02'),(18,'018',1,0,'2025-04-15 01:14:30',2,'02'),(19,'019',1,0,'2025-04-15 01:14:30',2,'02'),(20,'020',1,0,'2025-04-15 01:14:30',2,'02'),(21,'021',1,0,'2025-04-15 01:14:30',2,'02'),(22,'022',1,0,'2025-04-15 01:14:30',2,'02'),(23,'023',1,0,'2025-04-15 01:14:30',3,'03'),(24,'024',1,0,'2025-04-15 01:14:30',3,'03'),(25,'025',1,0,'2025-04-15 01:14:30',3,'03'),(26,'026',1,0,'2025-04-15 01:14:30',3,'03'),(27,'027',1,0,'2025-04-15 01:14:30',3,'03'),(28,'028',1,0,'2025-04-15 01:14:30',3,'03'),(29,'029',1,0,'2025-04-15 01:14:30',3,'03'),(30,'030',1,0,'2025-04-15 01:14:30',3,'03'),(31,'031',1,0,'2025-04-15 01:14:30',3,'03'),(32,'032',1,0,'2025-04-15 01:14:30',3,'03'),(33,'033',1,0,'2025-04-15 01:14:30',3,'03'),(34,'034',1,0,'2025-04-15 01:14:30',4,'04'),(35,'035',1,0,'2025-04-15 01:14:30',4,'04'),(36,'036',1,0,'2025-04-15 01:14:30',4,'04'),(37,'037',1,0,'2025-04-15 01:14:30',4,'04'),(38,'038',1,0,'2025-04-15 01:14:30',4,'04'),(39,'039',1,0,'2025-04-15 01:14:30',4,'04'),(40,'040',1,0,'2025-04-15 01:14:30',4,'04'),(41,'041',1,0,'2025-04-15 01:14:30',4,'04'),(42,'042',1,0,'2025-04-15 01:14:30',4,'04'),(43,'043',1,0,'2025-04-15 01:14:30',4,'04'),(44,'044',1,0,'2025-04-15 01:14:30',4,'04'),(45,'045',1,0,'2025-04-15 01:14:30',4,'04'),(46,'046',1,0,'2025-04-15 01:14:30',4,'04'),(47,'047',1,0,'2025-04-15 01:14:30',4,'04'),(48,'048',1,0,'2025-04-15 01:14:30',4,'04'),(49,'049',1,0,'2025-04-15 01:14:30',5,'04'),(50,'050',1,0,'2025-04-15 01:14:30',5,'05'),(51,'051',1,0,'2025-04-15 01:14:30',5,'05'),(52,'052',1,0,'2025-04-15 01:14:30',5,'05'),(53,'053',1,0,'2025-04-15 01:14:30',5,'05'),(54,'054',1,0,'2025-04-15 01:14:30',5,'05'),(55,'055',1,0,'2025-04-15 01:14:30',5,'05'),(56,'056',1,0,'2025-04-15 01:14:30',5,'05'),(57,'057',1,0,'2025-04-15 01:14:30',5,'05'),(58,'058',1,0,'2025-04-15 01:14:30',5,'05'),(59,'059',1,0,'2025-04-15 01:14:30',5,'05'),(60,'060',1,0,'2025-04-15 01:14:30',5,'05'),(61,'061',1,0,'2025-04-15 01:14:30',5,'05'),(62,'062',1,0,'2025-04-15 01:14:30',5,'05'),(63,'063',1,0,'2025-04-15 01:14:30',5,'05'),(64,'064',1,0,'2025-04-15 01:14:30',6,'06'),(65,'065',1,0,'2025-04-15 01:14:30',6,'06'),(66,'066',1,0,'2025-04-15 01:14:30',6,'06'),(67,'067',1,0,'2025-04-15 01:14:30',6,'06'),(68,'068',1,0,'2025-04-15 01:14:30',6,'06'),(69,'069',1,0,'2025-04-15 01:14:30',6,'06'),(70,'070',1,0,'2025-04-15 01:14:30',6,'06'),(71,'071',1,0,'2025-04-15 01:14:30',6,'06'),(72,'072',1,0,'2025-04-15 01:14:30',6,'06'),(73,'073',1,0,'2025-04-15 01:14:30',6,'06'),(74,'074',1,0,'2025-04-15 01:14:30',6,'06'),(75,'075',1,0,'2025-04-15 01:14:30',6,'06'),(76,'076',1,0,'2025-04-15 01:14:30',6,'06'),(77,'077',1,0,'2025-04-15 01:14:30',6,'06'),(78,'078',1,0,'2025-04-15 01:14:30',6,'06'),(79,'079',1,0,'2025-04-15 01:14:30',7,'07'),(80,'080',1,0,'2025-04-15 01:14:30',7,'07'),(81,'081',1,0,'2025-04-15 01:14:30',7,'07'),(82,'082',1,0,'2025-04-15 01:14:30',7,'07'),(83,'083',1,0,'2025-04-15 01:14:30',7,'07'),(84,'084',1,0,'2025-04-15 01:14:30',7,'07'),(85,'085',1,0,'2025-04-15 01:14:30',7,'07'),(86,'086',1,0,'2025-04-15 01:14:30',7,'07'),(87,'087',1,0,'2025-04-15 01:14:30',7,'07'),(88,'088',1,0,'2025-04-15 01:14:30',7,'07'),(89,'089',1,0,'2025-04-15 01:14:30',7,'07'),(90,'090',1,0,'2025-04-15 01:14:30',7,'07'),(91,'091',1,0,'2025-04-15 01:14:30',7,'07'),(92,'092',1,0,'2025-04-15 01:14:30',7,'07'),(93,'093',1,0,'2025-04-15 01:14:30',7,'07'),(94,'094',1,0,'2025-04-15 01:23:02',8,'08'),(95,'095',1,0,'2025-04-15 01:23:02',8,'08'),(96,'096',1,0,'2025-04-15 01:23:02',8,'08'),(97,'097',1,0,'2025-04-15 01:23:02',8,'08'),(98,'098',1,0,'2025-04-15 01:23:02',8,'08'),(99,'099',1,0,'2025-04-15 01:23:02',8,'08'),(100,'100',1,0,'2025-04-15 01:23:02',8,'08'),(101,'101',1,0,'2025-04-15 01:23:02',8,'08'),(102,'102',1,0,'2025-04-15 01:23:02',8,'08'),(103,'103',1,0,'2025-04-15 01:23:02',8,'08'),(104,'104',1,0,'2025-04-15 01:23:02',8,'08'),(105,'105',1,0,'2025-04-15 01:23:02',8,'08'),(106,'106',1,0,'2025-04-15 01:23:02',8,'08'),(107,'107',1,0,'2025-04-15 01:23:02',8,'08'),(108,'108',1,0,'2025-04-15 01:23:02',8,'08'),(109,'109',1,0,'2025-04-15 01:23:02',9,'09'),(110,'110',1,0,'2025-04-15 01:23:02',9,'09'),(111,'111',1,0,'2025-04-15 01:23:02',9,'09'),(112,'112',1,0,'2025-04-15 01:23:02',9,'09'),(113,'113',1,0,'2025-04-15 01:23:02',9,'09'),(114,'114',1,0,'2025-04-15 01:23:02',9,'09'),(115,'115',1,0,'2025-04-15 01:23:02',9,'09'),(116,'116',1,0,'2025-04-15 01:23:02',9,'09'),(117,'117',1,0,'2025-04-15 01:23:02',9,'09'),(118,'118',1,0,'2025-04-15 01:23:02',9,'09'),(119,'119',1,0,'2025-04-15 01:23:02',9,'09'),(120,'120',1,0,'2025-04-15 01:23:02',9,'09'),(121,'121',1,0,'2025-04-15 01:23:02',9,'09'),(122,'122',1,0,'2025-04-15 01:23:02',9,'09'),(123,'123',1,0,'2025-04-15 01:23:02',9,'09'),(124,'124',1,0,'2025-04-15 01:23:02',9,'09'),(125,'125',1,0,'2025-04-15 01:23:02',9,'09'),(126,'126',1,0,'2025-04-15 01:23:02',9,'09'),(127,'127',1,0,'2025-04-15 01:23:02',10,'10'),(128,'128',1,0,'2025-04-15 01:23:02',10,'10'),(129,'129',1,0,'2025-04-15 01:23:02',10,'10'),(130,'130',1,0,'2025-04-15 01:23:02',10,'10'),(131,'131',1,0,'2025-04-15 01:23:02',10,'10'),(132,'132',1,0,'2025-04-15 01:23:02',10,'10'),(133,'133',1,0,'2025-04-15 01:23:02',10,'10'),(134,'134',1,0,'2025-04-15 01:23:02',10,'10'),(135,'135',1,0,'2025-04-15 01:23:02',10,'10'),(136,'136',1,0,'2025-04-15 01:23:02',10,'10'),(137,'137',1,0,'2025-04-15 01:23:02',10,'10'),(138,'138',1,0,'2025-04-15 01:23:02',10,'10'),(139,'139',1,0,'2025-04-15 01:23:02',10,'10'),(140,'140',1,0,'2025-04-15 01:23:02',10,'10'),(141,'141',1,0,'2025-04-15 01:23:02',10,'10'),(142,'142',1,0,'2025-04-15 01:23:02',10,'10'),(143,NULL,1,0,'2025-04-15 01:23:02',NULL,''); +/*!40000 ALTER TABLE `wards` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `waste_collection_charges` +-- + +DROP TABLE IF EXISTS `waste_collection_charges`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `waste_collection_charges` ( + `id` int NOT NULL AUTO_INCREMENT, + `amount_type` varchar(45) DEFAULT NULL, + `amount` double DEFAULT NULL, + `is_active` tinyint(1) DEFAULT '1', + `is_delete` tinyint(1) DEFAULT '0', + `cdate` datetime DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `waste_collection_charges` +-- + +LOCK TABLES `waste_collection_charges` WRITE; +/*!40000 ALTER TABLE `waste_collection_charges` DISABLE KEYS */; +INSERT INTO `waste_collection_charges` VALUES (1,'Processing Charges per ton',800,1,0,'2025-04-04 11:12:18'),(2,'Waste Collection Charges per ton',2500,1,0,'2025-04-04 11:12:18'); +/*!40000 ALTER TABLE `waste_collection_charges` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `waste_collectors_request` +-- + +DROP TABLE IF EXISTS `waste_collectors_request`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `waste_collectors_request` ( + `id` int NOT NULL AUTO_INCREMENT, + `name` varchar(255) DEFAULT NULL, + `mobile_no` varchar(15) DEFAULT NULL, + `zone` varchar(20) DEFAULT NULL, + `ward` varchar(20) DEFAULT NULL, + `waste_quantity_id` int DEFAULT NULL, + `dump_location_id` int DEFAULT NULL, + `waste_type_id` int DEFAULT NULL, + `vehicle_id` int DEFAULT NULL, + `upload_image_url` varchar(255) DEFAULT NULL, + `is_active` tinyint(1) DEFAULT '1', + `is_delete` tinyint(1) DEFAULT '0', + `cdate` datetime DEFAULT CURRENT_TIMESTAMP, + `payment_status` varchar(45) DEFAULT NULL, + `refid` varchar(50) DEFAULT NULL, + `actual_weight` varchar(45) DEFAULT NULL, + `payment_type` varchar(45) DEFAULT NULL, + `processing_charge` double DEFAULT NULL, + `waste_collection_charge` double DEFAULT NULL, + `total_charge` double DEFAULT NULL, + `payment_mobile_no` varchar(45) DEFAULT NULL, + `door_number` varchar(45) DEFAULT NULL, + `street_name` varchar(50) DEFAULT NULL, + `area` varchar(50) DEFAULT NULL, + `city` varchar(45) DEFAULT NULL, + `pincode` varchar(45) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `waste_collectors_request` +-- + +LOCK TABLES `waste_collectors_request` WRITE; +/*!40000 ALTER TABLE `waste_collectors_request` DISABLE KEYS */; +/*!40000 ALTER TABLE `waste_collectors_request` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `waste_type_master` +-- + +DROP TABLE IF EXISTS `waste_type_master`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `waste_type_master` ( + `id` int NOT NULL AUTO_INCREMENT, + `waste_type` varchar(45) DEFAULT NULL, + `is_active` tinyint(1) DEFAULT '1', + `is_delete` tinyint(1) DEFAULT '0', + `cdate` datetime DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `waste_type_master` +-- + +LOCK TABLES `waste_type_master` WRITE; +/*!40000 ALTER TABLE `waste_type_master` DISABLE KEYS */; +INSERT INTO `waste_type_master` VALUES (1,'Concrete',1,0,'2025-04-03 17:10:17'),(2,'Wood & Plastic ',0,1,'2025-04-03 17:10:17'),(3,'Bricks and Mortars',1,0,'2025-04-03 17:10:17'),(4,'Mixed Waste',1,0,'2025-04-12 20:35:11'); +/*!40000 ALTER TABLE `waste_type_master` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `zones` +-- + +DROP TABLE IF EXISTS `zones`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `zones` ( + `id` int NOT NULL AUTO_INCREMENT, + `zone_name` varchar(50) DEFAULT NULL, + `is_active` tinyint(1) DEFAULT '1', + `is_delete` tinyint(1) DEFAULT '0', + `cdate` datetime DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `zones` +-- + +LOCK TABLES `zones` WRITE; +/*!40000 ALTER TABLE `zones` DISABLE KEYS */; +INSERT INTO `zones` VALUES (1,'01',1,0,'2025-04-12 16:53:38'),(2,'02',1,0,'2025-04-12 16:53:38'),(3,'03',1,0,'2025-04-15 00:57:19'),(4,'04',1,0,'2025-04-15 00:57:19'),(5,'05',1,0,'2025-04-15 00:57:19'),(6,'06',1,0,'2025-04-15 00:57:19'),(7,'07',1,0,'2025-04-15 00:57:19'),(8,'08',1,0,'2025-04-15 00:57:19'),(9,'09',1,0,'2025-04-15 00:57:19'),(10,'10',1,0,'2025-04-15 00:57:19'),(11,'11',1,0,'2025-04-15 00:57:19'),(12,'12',1,0,'2025-04-15 00:57:19'),(13,'13',1,0,'2025-04-15 00:57:19'),(14,'14',1,0,'2025-04-15 00:57:19'),(15,'15',1,0,'2025-04-15 00:57:19'); +/*!40000 ALTER TABLE `zones` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2025-04-23 12:51:34 diff --git a/backend/cdwaste/controller/DumpRegistrationAPIController.java b/backend/cdwaste/controller/DumpRegistrationAPIController.java new file mode 100644 index 0000000..cd42e59 --- /dev/null +++ b/backend/cdwaste/controller/DumpRegistrationAPIController.java @@ -0,0 +1,174 @@ +package in.gov.chennaicorporation.gccoffice.cdwaste.controller; + +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.format.annotation.DateTimeFormat; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.client.RestTemplate; + +import in.gov.chennaicorporation.gccoffice.cdwaste.service.OfficerService; +import in.gov.chennaicorporation.gccoffice.configuration.AppConfig; + + +@RestController +@RequestMapping("/gcc/api/dumpregistration") +public class DumpRegistrationAPIController { + + + @Autowired + private OfficerService officerService; + + private final RestTemplate restTemplate; + private final AppConfig appConfig; + + @Autowired + public DumpRegistrationAPIController(RestTemplate restTemplate, AppConfig appConfig) { + this.restTemplate = restTemplate; + this.appConfig = appConfig; + } + + + + @GetMapping("/wastecollectorlist") + public ResponseEntity getWasteCollectorList( + @RequestParam(required = false) Long mobileNo, + @RequestParam(required = false) Long refId) { + + StringBuilder apiUrl = new StringBuilder(appConfig.dumpregister + "/dumpregistration/api/wastecollectorlist"); + + // If at least one param is present, append '?' + if (mobileNo != null || refId != null) { + apiUrl.append("?"); + } + + // Append parameters + List params = new ArrayList<>(); + if (mobileNo != null) { + params.add("mobileNo=" + mobileNo); + } + if (refId != null) { + params.add("refId=" + refId); + } + + apiUrl.append(String.join("&", params)); + + try { + ResponseEntity responseEntity = restTemplate.getForEntity(apiUrl.toString(), String.class); + return ResponseEntity.ok(responseEntity.getBody()); + } catch (Exception e) { + return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR) + .body("Failed to fetch data: " + e.getMessage()); + } + } + + @GetMapping("/getallcharges") + public ResponseEntity getpaymentcharges() { + String apiUrl = appConfig.dumpregister + "/dumpregistration/dropdown/api/getallcharges"; + + try { + ResponseEntity responseEntity = restTemplate.getForEntity(apiUrl, String.class); + return ResponseEntity.ok(responseEntity.getBody()); // Return the real response, not a fixed string + } catch (Exception e) { + return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR) + .body("Failed to fetch data: " + e.getMessage()); + } + } + + + + @PostMapping("/saveWasteRequest") + public ResponseEntity saveWasteRequest(@RequestBody Map payload) { + try { + officerService.saveRequestDetails(payload); + return ResponseEntity.ok("Saved successfully"); + } catch (Exception e) { + e.printStackTrace(); + return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("Error saving request"); + } + } + + + + + @GetMapping("/getless1tonlist") + public ResponseEntity getWasteCollectorLess1TonList() { + StringBuilder apiUrl = new StringBuilder(appConfig.dumpregister + "/dumpregistration/api/getless1tonlist"); + + try { + ResponseEntity responseEntity = restTemplate.getForEntity(apiUrl.toString(), String.class); + return ResponseEntity.ok(responseEntity.getBody()); + } catch (Exception e) { + return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR) + .body("Failed to fetch data: " + e.getMessage()); + } + } + + @GetMapping("/getless1tonlistbyId") + public ResponseEntity getWasteCollectorLess1TonListbyId(@RequestParam(required = true) Long refId) { + if (refId == null) { + return ResponseEntity.badRequest().body("refId is required"); + } + + try { + String apiUrl = appConfig.dumpregister + "/dumpregistration/api/getless1tonlistbyid?refId=" + refId; + + ResponseEntity responseEntity = restTemplate.getForEntity(apiUrl, String.class); + return ResponseEntity.ok(responseEntity.getBody()); + + } catch (Exception e) { + return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR) + .body("Failed to fetch data: " + e.getMessage()); + } + } + + + + @GetMapping("/getAllDetails") + public ResponseEntity getAllRequestDetails( + @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate fromDate, + @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate toDate, + @RequestParam(required = false) String wastequantity, + @RequestParam(required = false) String zone) { + try { + + List> response = officerService.getAllRequestDetails(fromDate, toDate, wastequantity, zone); + return ResponseEntity.ok(response); + } catch (Exception e) { + return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR) + .body(Collections.singletonMap("error", "Failed to fetch data: " + e.getMessage())); + } + } + + + @GetMapping("/getquantity") + public List> getwastequantity() { + return officerService.getAllwastequantity(); + } + +//fetch all zones + + @GetMapping("/getzones") + public ResponseEntity getAllZones() { + try { + List> response = officerService.getZonesList(); + return ResponseEntity.ok(response); + } catch (Exception e) { + return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR) + .body(Collections.singletonMap("error", "Failed to fetch data: " + e.getMessage())); + } + } + +} + diff --git a/backend/cdwaste/controller/MainController.java b/backend/cdwaste/controller/MainController.java new file mode 100644 index 0000000..e086376 --- /dev/null +++ b/backend/cdwaste/controller/MainController.java @@ -0,0 +1,75 @@ +package in.gov.chennaicorporation.gccoffice.cdwaste.controller; + + + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.client.RestTemplate; + + +import in.gov.chennaicorporation.gccoffice.configuration.AppConfig; +import in.gov.chennaicorporation.gccoffice.service.LoginUserInfo; + +@RequestMapping("/gcc/dumpregistration") +@Controller("dumpregistrationMainController") +public class MainController { + + private final LoginUserInfo loginUserInfo; + private final RestTemplate restTemplate; + private final AppConfig appConfig; + + @Autowired + public MainController(RestTemplate restTemplate,LoginUserInfo loginUserInfo, + AppConfig appConfig) { + this.restTemplate = restTemplate; + this.appConfig = appConfig; + this.loginUserInfo = loginUserInfo; + } + + @GetMapping("/officer") + public String viewOfficer(Model model) + { + String LoginUserId = LoginUserInfo.getLoginUserId(); + model.addAttribute("LoginUserId",LoginUserId); + + String UserRole = LoginUserInfo.getUserRole(); + model.addAttribute("UserRole", UserRole); + + + return "modules/cdwastecollect/officer"; + } + + + + @GetMapping("/lessthanoneton") + public String viewLessoneTonList(Model model) + { + String LoginUserId = LoginUserInfo.getLoginUserId(); + model.addAttribute("LoginUserId",LoginUserId); + + String UserRole = LoginUserInfo.getUserRole(); + model.addAttribute("UserRole", UserRole); + + return "modules/cdwastecollect/lessoneton"; + } + + + @GetMapping("/overallreport") + public String wasteCollectionReports(Model model) + { + String LoginUserId = LoginUserInfo.getLoginUserId(); + model.addAttribute("LoginUserId",LoginUserId); + + String UserRole = LoginUserInfo.getUserRole(); + model.addAttribute("UserRole", UserRole); + return "modules/cdwastecollect/reports"; + } + + + + + +} diff --git a/backend/cdwaste/service/OfficerService.java b/backend/cdwaste/service/OfficerService.java new file mode 100644 index 0000000..9263538 --- /dev/null +++ b/backend/cdwaste/service/OfficerService.java @@ -0,0 +1,161 @@ +package in.gov.chennaicorporation.gccoffice.cdwaste.service; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.LocalTime; +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.jdbc.core.JdbcTemplate; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.client.RestTemplate; + +@Service +public class OfficerService { + + @Autowired + private JdbcTemplate jdbcTemplate; + + @Autowired + private RestTemplate restTemplate; + + @Autowired + private SMSService smsService; + + @Autowired + public void setDataSourcemysql(@Qualifier("mysqlCDManagerSystemDataSource") DataSource dataSource) { + this.jdbcTemplate = new JdbcTemplate(dataSource); + } + + + @Transactional + public void saveRequestDetails(Map payload) { + double actualWeight = Double.parseDouble(payload.get("actualWeight").toString()); + String paymentType = payload.get("paymentType").toString(); + /* + * double processingCharge = + * Double.parseDouble(payload.get("processingCharge").toString()); double + * wasteCharge = Double.parseDouble(payload.get("wasteCharge").toString()); + */ + + double processingCharge = payload.get("processingCharge") != null + ? Double.parseDouble(payload.get("processingCharge").toString()) + : 0.0; + + double wasteCharge = payload.get("wasteCharge") != null + ? Double.parseDouble(payload.get("wasteCharge").toString()) + : 0.0; + double totalCharge = Double.parseDouble(payload.get("totalCharge").toString()); + String paymentMobNo = payload.get("paymentMobileNo") != null ? payload.get("paymentMobileNo").toString() : null; + String refId = payload.get("refId") != null ? payload.get("refId").toString() : null; + + // ✅ Check if record exists + String checkSql = "SELECT COUNT(*) FROM waste_collectors_request WHERE refid = ?"; + Integer count = jdbcTemplate.queryForObject(checkSql, new Object[]{refId}, Integer.class); + + if (count != null && count > 0) { + // ✅ Update the existing record + String updateSql = "UPDATE waste_collectors_request SET actual_weight = ?, payment_type = ?, processing_charge = ?, waste_collection_charge = ?, total_charge = ?, payment_mobile_no = ? WHERE refid = ?"; + jdbcTemplate.update(updateSql, actualWeight, paymentType, processingCharge, wasteCharge, totalCharge, paymentMobNo, refId); + + // ✅ Send WhatsApp message if payment type is 'generateLink' and mobile number is provided + if ("generateLink".equalsIgnoreCase(paymentType) && paymentMobNo != null && !paymentMobNo.isBlank()) { + sendWhatsappMessage(refId, actualWeight, totalCharge, paymentMobNo); + } + } else { + throw new RuntimeException("No request found for Ref ID: " + refId); + } + } + + + + public void sendWhatsappMessage(String refId, double actualWeight, double totalCharge, String mobileNumber) { + try { + String message = String.format( + "Your request (Request ID: *%s*) has been processed. Please proceed with the payment.\n\nActual Weight: *%.0f kg*\nAmount Payable: *%.0f*", + refId, actualWeight, totalCharge + ); + + String encodedMessage = URLEncoder.encode(message, StandardCharsets.UTF_8); + String encodedHeader = URLEncoder.encode("C&D Waste Collection – Payment Request", StandardCharsets.UTF_8); + String encodedFooter = URLEncoder.encode("Greater Chennai Corporation", StandardCharsets.UTF_8); + + String redirectUrlParam = URLEncoder.encode("dumpregistration/paymentform?requestId=" + refId, StandardCharsets.UTF_8); + + String apiUrl = "https://media.smsgupshup.com/GatewayAPI/rest?userid=2000233507" + + "&password=h2YjFNcJ" + + "&send_to=" + mobileNumber + + "&v=1.1&format=json&msg_type=TEXT&method=SENDMESSAGE" + + "&msg=" + encodedMessage + + "&isTemplate=true" + + "&header=" + encodedHeader + + "&footer=" + encodedFooter + + "&buttonUrlParam=" + redirectUrlParam; + + // Optional: log URL before hitting for debugging + System.out.println("WhatsApp API URL: " + apiUrl); + + // Make API call + // restTemplate.getForObject(apiUrl, String.class); + smsService.sendMsg(apiUrl); + } catch (Exception e) { + e.printStackTrace(); + // Optionally log or alert failure + } + } + + + public List> getAllRequestDetails(LocalDate fromDate, LocalDate toDate, String wastequantity, String zone) { + StringBuilder query = new StringBuilder( + "SELECT wcr.id, wcr.name, wcr.mobile_no, wcr.area, wcr.zone, qm.quantity, " + + "wtm.waste_type, dl.location, wcr.actual_weight, wcr.payment_status,wcr.waste_collection_charge, " + + "wcr.processing_charge, wcr.total_charge, DATE_FORMAT(wcr.cdate, '%d-%m-%Y') AS request_date, wcr.refid " + + "FROM waste_collectors_request wcr " + + "JOIN dumping_location dl ON wcr.dump_location_id = dl.id " + + "JOIN waste_type_master wtm ON wcr.waste_type_id = wtm.id " + + "JOIN quantity_master qm ON wcr.waste_quantity_id = qm.id " + + "WHERE wcr.cdate BETWEEN ? AND ?"); + + LocalDateTime fromDateTime = fromDate.atStartOfDay(); + LocalDateTime toDateTime = toDate.atTime(LocalTime.MAX); + + List params = new ArrayList<>(); + params.add(fromDateTime); + params.add(toDateTime); + + if (wastequantity != null && !wastequantity.isEmpty()) { + query.append(" AND qm.quantity = ?"); + params.add(wastequantity); + } + + if (zone != null && !zone.isEmpty()) { + query.append(" AND wcr.zone = ?"); + params.add(zone); + } + + return jdbcTemplate.queryForList(query.toString(), params.toArray()); + } + + + + + public List> getAllwastequantity() { + String sql = " SELECT id,quantity FROM quantity_master where is_active = 1 "; + return jdbcTemplate.queryForList(sql); + } + + + public List> getZonesList() { + String sql = " SELECT id,zone_name from zones where is_active = 1 "; + return jdbcTemplate.queryForList(sql); + } + +} diff --git a/backend/cdwaste/service/SMSService.java b/backend/cdwaste/service/SMSService.java new file mode 100644 index 0000000..a7e5a13 --- /dev/null +++ b/backend/cdwaste/service/SMSService.java @@ -0,0 +1,40 @@ +package in.gov.chennaicorporation.gccoffice.cdwaste.service; + + +import org.springframework.stereotype.Service; +import org.springframework.web.client.RestTemplate; + +import java.net.HttpURLConnection; +import java.net.URL; + +@Service +public class SMSService { + public String sendMsg(String msgUrl) { + System.out.println("Whatsapp URL :-"+msgUrl); + + String response =""; + try{ + HttpURLConnection connection =null; + + URL url = new URL(msgUrl); + connection = (HttpURLConnection) url.openConnection(); + connection.setRequestMethod("GET"); + + int responseCode = connection.getResponseCode(); + response=responseCode+""; + System.out.println("Response Code: " + responseCode); + + }catch (Exception e){ + e.printStackTrace(); + } + + return response; + } + + public String sendSMS(String SMS_Url) { + System.out.println("SMS URL:- "+ SMS_Url); + RestTemplate restTemplate = new RestTemplate(); + String response =restTemplate.getForObject(SMS_Url,String.class); + return response; + } +} diff --git a/frontend/cdwastecollect/lessoneton.html b/frontend/cdwastecollect/lessoneton.html new file mode 100644 index 0000000..5d8fd27 --- /dev/null +++ b/frontend/cdwastecollect/lessoneton.html @@ -0,0 +1,430 @@ + + + + + + + +
+ +
+ +
+ +
+ +
+
+ + +
+ +
+
+
+

Less 1 Ton List

+
+ + + +
+ + + + + + + + + + + + + + + + + +
S.NoReference IDNameRequest DateQuantityMobile No
+ +
+
+
+ +
+
+ + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/frontend/cdwastecollect/officer.html b/frontend/cdwastecollect/officer.html new file mode 100644 index 0000000..bf0206a --- /dev/null +++ b/frontend/cdwastecollect/officer.html @@ -0,0 +1,1122 @@ + + + + + + + + + +
+ +
+ + +
+ +
+ +
+
+ +

+ Auto refresh in 00 seconds +

+ +
+ +
+
+ +
+
+
Request + Information
+
+
+
+
Find the + Request Details
+
+
+ + +
+
+ +
+ +
+ +
+ +
+ +
+
+ +
+
+
+
+ + + +
+ + +
+ +
+ +
+ +
+
+ + + + + + + +
+ + + + + + + + + \ No newline at end of file diff --git a/frontend/cdwastecollect/reports.html b/frontend/cdwastecollect/reports.html new file mode 100644 index 0000000..6e829bd --- /dev/null +++ b/frontend/cdwastecollect/reports.html @@ -0,0 +1,411 @@ + + + + + + + +
+ + +
+ +
+ +
+ + + +
+
+ + + +
+
+
+
+ Reports Filters +
+
+
+ +
+ + +
+ +
+ + +
+ +
+ +
+ +
+ + + +
+ +
+
+ + + + +
+
+ +
+
+
+
+ +
+
+
+ Reports List +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
S.NoRequest IDRequest DateNameMobile NumberAreaZoneWeight QuantityWaste TypeDumping LocationActual WeightPayment StatusTotal Amount
+
+
+
+
+ +
+ +
+ + +
+ + +
+ +
+
+ + + + + + + + + + + + + + + + + \ No newline at end of file