diff --git a/src/main/java/com/gcc/coworkspace/configuration/DataSourceConfig.java b/src/main/java/com/gcc/coworkspace/configuration/DataSourceConfig.java index bdb26a0..fab2952 100644 --- a/src/main/java/com/gcc/coworkspace/configuration/DataSourceConfig.java +++ b/src/main/java/com/gcc/coworkspace/configuration/DataSourceConfig.java @@ -1,5 +1,9 @@ package com.gcc.coworkspace.configuration; +import java.util.Properties; + +import javax.sql.DataSource; + import org.hibernate.jpa.HibernatePersistenceProvider; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.context.annotation.Bean; @@ -13,9 +17,6 @@ import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.annotation.EnableTransactionManagement; import org.springframework.web.client.RestTemplate; -import javax.sql.DataSource; -import java.util.Properties; - @Configuration @EnableTransactionManagement public class DataSourceConfig { @@ -28,11 +29,11 @@ public class DataSourceConfig { //private static String dbpassword = "Bonton#2K24"; // AWS - //private static String host = "gcc-facial-db-instance-1.cf48eqcciziq.ap-south-1.rds.amazonaws.com:3306"; - //private static String dbpassword = "gcc-facial-password"; + private static String host = "gcc-facial-db-instance-1.cf48eqcciziq.ap-south-1.rds.amazonaws.com:3306"; + private static String dbpassword = "gcc-facial-password"; - private static String host ="localhost:3306"; - private static String dbpassword = "root"; + //private static String host ="localhost:3306"; + //private static String dbpassword = "root"; //private static String dbpassword = ""; // Sampath Local diff --git a/src/main/java/com/gcc/coworkspace/constants/AppConstants.java b/src/main/java/com/gcc/coworkspace/constants/AppConstants.java index 5130acf..804f8a7 100644 --- a/src/main/java/com/gcc/coworkspace/constants/AppConstants.java +++ b/src/main/java/com/gcc/coworkspace/constants/AppConstants.java @@ -1,11 +1,11 @@ package com.gcc.coworkspace.constants; public final class AppConstants { - // public static String key_id="rzp_live_ySI5Ns54Y7qOcJ"; - // public static String key_secret="Nwf1TjhUtaskof8vePkRR8Sb"; + public static String key_id="rzp_live_ySI5Ns54Y7qOcJ"; + public static String key_secret="Nwf1TjhUtaskof8vePkRR8Sb"; //uncomment for testing payment - public static String key_id="rzp_test_tDkHFEqWXmuEi8"; - public static String key_secret="cBQUjMcKZ4J6vmOKSyNZ92py"; + //public static String key_id="rzp_test_tDkHFEqWXmuEi8"; + //public static String key_secret="cBQUjMcKZ4J6vmOKSyNZ92py"; } diff --git a/src/main/java/com/gcc/coworkspace/service/BookingService.java b/src/main/java/com/gcc/coworkspace/service/BookingService.java index 4ec721b..2845189 100644 --- a/src/main/java/com/gcc/coworkspace/service/BookingService.java +++ b/src/main/java/com/gcc/coworkspace/service/BookingService.java @@ -487,6 +487,12 @@ public class BookingService { if (affectedRows > 0) { Number generatedId = keyHolder.getKey(); bookingId = (generatedId != null) ? generatedId.intValue() : 0; + //ak + + Map buildingDetails = getBuildingDetails(bid); + System.out.println("buildingDetails :"+buildingDetails); + String smsename = buildingDetails.get("smsename").toString(); + // String smstname = buildingDetails.get("smstname").toString(); paymentService.updateBookingIdInPayment( tempBooking.get("mobile").toString(), @@ -500,8 +506,11 @@ public class BookingService { tempBooking.get("cid").toString(), tempBooking.get("sid").toString() ); + + - sendMessage(user_name,mobile,slotIds,from_date,to_date,no_of_person,amount,cid,bid,sid,bookingId+""); // Sending Message to public + //sendMessage(user_name,mobile,slotIds,from_date,to_date,no_of_person,amount,cid,bid,sid,bookingId+""); // Sending Message to public + sendMessage(user_name,mobile,slotIds,from_date,to_date,no_of_person,amount,cid,bid,sid,smsename,bookingId+""); // Sending Message to public return bookingId; } else { @@ -523,19 +532,30 @@ public class BookingService { } } } + //ak + public Map getBuildingDetails(String bid) { + String sql = "SELECT smsename FROM buildings WHERE bid = ?"; + return jdbcTemplate.queryForMap(sql, bid); +} + @Transactional public void sendMessage(String user_name,String mobile,String slotIds,String from_date,String to_date, - String no_of_person,String amount,String cid,String bid,String sid, String bookingId) { + String no_of_person,String amount,String cid,String bid,String sid,String smsename,String bookingId) { + // System.out.println("smsename :"+smsename); String slottxt = ""; slottxt = calendarService.getSlotText(slotIds); slottxt = slottxt.replace(" ", "%20"); + //System.out.println("cid :"+cid); //System.out.println("sid :"+sid); + // convert dates here + String fromDateFormatted = convertToDDMMYYYY(from_date); + String toDateFormatted = convertToDDMMYYYY(to_date); - if(cid.equals("1")|| cid.equals("4")) { + /*if(cid.equals("1")|| cid.equals("4")) { whatsAppService.sendELearnNmsg(mobile, no_of_person, from_date, slottxt, amount, bookingId); whatsAppService.sendTLearnNmsg(mobile, no_of_person, from_date, slottxt, amount, bookingId); } @@ -552,8 +572,34 @@ public class BookingService { else if(cid.equals("3")) { whatsAppService.sendEConfeNmsg(mobile, from_date, slottxt, amount,bookingId); whatsAppService.sendTConfeNmsg(mobile, from_date, slottxt, amount,bookingId); + }*/ + if(cid.equals("1")|| cid.equals("4")) { + whatsAppService.sendELearnNmsg(mobile, no_of_person, fromDateFormatted, slottxt,smsename, amount, bookingId); + whatsAppService.sendTLearnNmsg(mobile, no_of_person, fromDateFormatted, slottxt, amount, bookingId); + } + else if(cid.equals("2")) { + if(sid.equals("4")) { + whatsAppService.sendEMonthDeskspaceNmsg(mobile, no_of_person, fromDateFormatted, toDateFormatted, slottxt,smsename, amount, bookingId); + whatsAppService.sendTMonthDeskspaceNmsg(mobile, no_of_person, fromDateFormatted, toDateFormatted, slottxt, amount, bookingId); + } else { + whatsAppService.sendEDeskspaceNmsg(mobile, no_of_person, fromDateFormatted, slottxt,smsename, amount, bookingId); + whatsAppService.sendTDeskspaceNmsg(mobile, no_of_person, fromDateFormatted, slottxt, amount, bookingId); } } + else if(cid.equals("3")) { + whatsAppService.sendEConfeNmsg(mobile, fromDateFormatted, slottxt,smsename, amount, bookingId); + whatsAppService.sendTConfeNmsg(mobile, fromDateFormatted, slottxt, amount, bookingId); + } + } + //ak + private String convertToDDMMYYYY(String date) { + try { + LocalDate parsed = LocalDate.parse(date); // expects yyyy-MM-dd + return parsed.format(DateTimeFormatter.ofPattern("dd-MM-yyyy")); + } catch (Exception e) { + return date; // fallback if format is unexpected + } +} @Transactional public void saveInBookingInCalendar(int bookingId,String fromDat,String toDat,String persons,String slotIds,String bid,String cid,String sid){ diff --git a/src/main/java/com/gcc/coworkspace/service/NormalSMS.java b/src/main/java/com/gcc/coworkspace/service/NormalSMS.java index 69e43af..7457da9 100644 --- a/src/main/java/com/gcc/coworkspace/service/NormalSMS.java +++ b/src/main/java/com/gcc/coworkspace/service/NormalSMS.java @@ -1,9 +1,10 @@ package com.gcc.coworkspace.service; -import com.gcc.coworkspace.configuration.AppConfig; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import com.gcc.coworkspace.configuration.AppConfig; + @Service public class NormalSMS { @@ -22,14 +23,18 @@ public class NormalSMS { } public String sendELearnNsms(String MobileNo, String noOfPerson, String bdate, String slot, String amount) { - String generatedToken = "Dear Patron, \n" + + + + + String generatedToken = "Dear Patrons \n" + "Welcome to Muthalvar Padaippagam. \n" + "You have booked our Learning Centre for " + noOfPerson + " number of persons on " + bdate + " at time slot " + slot + ". Payment for the booking is Rs." + amount + " received. Please show your QR Code at Reception Desk for accessing Muthalvar Padaippagam. Have a Nice Day - GCC"; String urlString = appConfig.getGetOtpUrl() + "from=GCCCRP&key=" + key + "&sender=GCCCRP&to=" + MobileNo + "&body=" + generatedToken + "&entityid=1401572690000011081&templateid=1407173027552104564"; return whatsappMsgService.sendSMS(urlString); } - + public String sendTLearnNsms(String MobileNo, String noOfPerson, String bdate, String slot, String amount) { + slot = "கொத்தூர்"+slot; String generatedToken = "அன்பான வாடிக்கையாளரே,\n" + "முதல்வர் படைப்பகம் தங்களை அன்புடன் வரவேற்கின்றது. தாங்கள் எங்களின் கற்றல் மையத்தை "+ noOfPerson +" எண்ணிக்கை நபர்களுக்கு "+bdate+" அன்று நேர இடைவெளி "+bdate+" ல் பயன்படுத்திக்கொள்ள முன்பதிவு செய்துள்ளீர்கள். இதற்கான கட்டணம் ரூ. "+amount+" பெறப்பட்டுள்ளது. முதல்வர் படைப்பகம் பயன்படுத்த உங்கள் QR குறியீட்டை வரவேற்பறையில் காட்டுங்கள் இந்நாள் இனிய நாளாய் அமையட்டும் - பெ.செ.மா"; String urlString = appConfig.getGetOtpUrl() + "from=GCCCRP&key=" + key + "&sender=GCCCRP&to=" + MobileNo + "&body=" + generatedToken + "&entityid=1401572690000011081&templateid=1407173027534475535"; diff --git a/src/main/java/com/gcc/coworkspace/service/WhatsAppService.java b/src/main/java/com/gcc/coworkspace/service/WhatsAppService.java index 4390c09..d3be7b7 100644 --- a/src/main/java/com/gcc/coworkspace/service/WhatsAppService.java +++ b/src/main/java/com/gcc/coworkspace/service/WhatsAppService.java @@ -17,19 +17,29 @@ public class WhatsAppService { return whatsappMsgService.sendMsg(msgContent); } - public String sendELearnNmsg(String MobileNo, String noOfPerson, String bdate, String slot, String amount, String bookingId) { + public String sendELearnNmsg(String MobileNo, String noOfPerson, String bdate, String slot, String smsename,String amount, String bookingId) { + //slot = smsename+"+" + slot; + smsename = smsename.replace(" ", "%20"); + + slot = slot + "+(" + smsename + ")"; + System.out.println("slot...12"+slot); + // String msgContent = "https://media.smsgupshup.com/GatewayAPI/rest?userid=2000233507&password="+password+"&send_to="+MobileNo+"&v=1.1&format=json&msg_type=TEXT&method=SENDMESSAGE&msg=Dear+Patron%2C%0AWelcome+to+Muthalvar+Padaippagam%F0%9F%99%8F++%0A%0AYou+have+booked+our+Learning+Centre+for+%2A"+noOfPerson+"%2A+number+of+persons+on+%2A"+bdate+"%2A+at+%0Atime+slot+%2A"+slot+"%2A+.%0A%0APayment+for+the+booking+is+%2ARs.+"+amount+"%2A+received.+%0A%0APlease+show+your+QR+Code+at+Reception+Desk+for+accessing+Muthalvar+Padaippagam.%0A%0AHave+a+Nice+Day%F0%9F%98%8A&isTemplate=true&buttonUrlParam=muthalvarpadaippagam%2FbookingQRCode%3Fbooking_id%3D"+bookingId; String msgContent = "https://media.smsgupshup.com/GatewayAPI/rest?userid=2000233507&password="+password+"&send_to="+MobileNo+"&v=1.1&format=json&msg_type=TEXT&method=SENDMESSAGE&msg=Dear+Patron%2C%0AWelcome+to+Muthalvar+Padaippagam%F0%9F%99%8F++%0A%0AYou+have+booked+our+Learning+Centre+for+%2A"+noOfPerson+"%2A+number+of+persons+on+%2A"+bdate+"%2A+at+%0Atime+slot+%2A"+slot+"%2A+.%0A%0APayment+for+the+booking+is+%2ARs.+"+amount+"%2A+received.+%0A%0APlease+show+your+QR+Code+at+Reception+Desk+for+accessing+Muthalvar+Padaippagam.%0A%0AHave+a+Nice+Day%F0%9F%98%8A&isTemplate=true&buttonUrlParam=muthalvarpadaippagam%2FbookingQRCode%3Fbooking_id%3D"+bookingId; System.out.println(msgContent); return whatsappMsgService.sendMsg(msgContent); } - public String sendTLearnNmsg(String MobileNo, String noOfPerson, String bdate, String slot, String amount, String bookingId) { + public String sendTLearnNmsg(String MobileNo, String noOfPerson, String bdate, String slot,String amount, String bookingId) { + // slot = smstname+"+" + slot; String msgContent = "https://media.smsgupshup.com/GatewayAPI/rest?userid=2000233507&password="+password+"&send_to="+MobileNo+"&v=1.1&format=json&msg_type=TEXT&method=SENDMESSAGE&msg=%E0%AE%85%E0%AE%A9%E0%AF%8D%E0%AE%AA%E0%AE%BE%E0%AE%A9+%E0%AE%B5%E0%AE%BE%E0%AE%9F%E0%AE%BF%E0%AE%95%E0%AF%8D%E0%AE%95%E0%AF%88%E0%AE%AF%E0%AE%BE%E0%AE%B3%E0%AE%B0%E0%AF%87%2C+%0A%E0%AE%AE%E0%AF%81%E0%AE%A4%E0%AE%B2%E0%AF%8D%E0%AE%B5%E0%AE%B0%E0%AF%8D+%E0%AE%AA%E0%AE%9F%E0%AF%88%E0%AE%AA%E0%AF%8D%E0%AE%AA%E0%AE%95%E0%AE%AE%E0%AF%8D+%E0%AE%A4%E0%AE%99%E0%AF%8D%E0%AE%95%E0%AE%B3%E0%AF%88+%E0%AE%85%E0%AE%A9%E0%AF%8D%E0%AE%AA%E0%AF%81%E0%AE%9F%E0%AE%A9%E0%AF%8D+%E0%AE%B5%E0%AE%B0%E0%AE%B5%E0%AF%87%E0%AE%B1%E0%AF%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87%E0%AE%A9%E0%AE%BF%E0%AE%AF+%E0%AE%A8%E0%AE%BE%E0%AE%B3%E0%AE%BE%E0%AE%AF%E0%AF%8D+%E0%AE%85%E0%AE%AE%E0%AF%88%E0%AE%AF%E0%AE%9F%E0%AF%8D%E0%AE%9F%E0%AF%81%E0%AE%AE%E0%AF%8D%F0%9F%98%8A&isTemplate=true&buttonUrlParam=muthalvarpadaippagam%2FbookingQRCode%3Fbooking_id%3D"+bookingId; System.out.println(msgContent); return whatsappMsgService.sendMsg(msgContent); } - public String sendEDeskspaceNmsg(String MobileNo, String noOfPerson, String bdate, String slot, String amount, String bookingId) { + public String sendEDeskspaceNmsg(String MobileNo, String noOfPerson, String bdate, String slot,String smsename, String amount, String bookingId) { + // slot = smsename+"+" + slot; + smsename = smsename.replace(" ", "%20"); + slot = slot + "+(" + smsename + ")"; String msgContent = "https://media.smsgupshup.com/GatewayAPI/rest?userid=2000233507&password="+password+"&send_to="+MobileNo+"&v=1.1&format=json&msg_type=TEXT&method=SENDMESSAGE&msg=Dear+Patron%2C%0AWelcome+to+Muthalvar+Padaippagam%F0%9F%99%8F++%0A%0AYou+have+booked+our+Desk+space+for+%2A"+noOfPerson+"%2A+number+of+persons+on+%2A"+bdate+"%2A+at+time+slot+%2A"+slot+"%2A+.%0A%0APayment+for+the+booking+is+%2ARs.+"+amount+"%2A+received.+%0A%0APlease+show+your+QR+Code+at+Reception+Desk+for+accessing+Muthalvar+Padaippagam.%0A%0AHave+a+Nice+Day%F0%9F%98%8A&isTemplate=true&buttonUrlParam=muthalvarpadaippagam%2FbookingQRCode%3Fbooking_id%3D"+bookingId; System.out.println(msgContent); return whatsappMsgService.sendMsg(msgContent); @@ -41,7 +51,10 @@ public class WhatsAppService { return whatsappMsgService.sendMsg(msgContent); } - public String sendEMonthDeskspaceNmsg(String MobileNo, String noOfPerson, String bFromdate,String bTodate, String slot, String amount, String bookingId) { + public String sendEMonthDeskspaceNmsg(String MobileNo, String noOfPerson, String bFromdate,String bTodate, String slot,String smsename, String amount, String bookingId) { + // slot = smsename+"+" + slot; + smsename = smsename.replace(" ", "%20"); + slot = slot + "+(" + smsename + ")"; String msgContent = "https://media.smsgupshup.com/GatewayAPI/rest?userid=2000233507&password="+password+"&send_to="+MobileNo+"&v=1.1&format=json&msg_type=TEXT&method=SENDMESSAGE&msg=Dear+Patron%2C%0AWelcome+to+Muthalvar+Padaippagam%F0%9F%99%8F++%0A%0AYou+have+booked+our+Desk+space+for+%2A"+noOfPerson+"%2A+number+of+persons+for+30+days+from+%2A"+bFromdate+"+to+"+bTodate+"%2A+at+time+slot+%2A"+slot+"%2A.%0A%0APayment+for+the+booking+is+%2ARs.+"+amount+"%2A+received.+%0A%0APlease+show+your+QR+Code+at+Reception+Desk+for+accessing+Muthalvar+Padaippagam.%0A%0AHave+a+Nice+Day%F0%9F%98%8A&isTemplate=true&buttonUrlParam=muthalvarpadaippagam%2FbookingQRCode%3Fbooking_id%3D"+bookingId; System.out.println(msgContent); return whatsappMsgService.sendMsg(msgContent); @@ -53,7 +66,12 @@ public class WhatsAppService { return whatsappMsgService.sendMsg(msgContent); } - public String sendEConfeNmsg(String mobileNo, String bdate, String slot, String amount,String bookingId) { + public String sendEConfeNmsg(String mobileNo, String bdate, String slot,String smsename, String amount,String bookingId) { + // slot = smsename+"+" + slot; + smsename = smsename.replace(" ", "%20"); + slot = slot + "+(" + smsename + ")"; + + System.out.println("Final Slot :"+slot); String msgContent= "https://media.smsgupshup.com/GatewayAPI/rest?userid=2000233507&password=h2YjFNcJ&send_to="+mobileNo+"&v=1.1&format=json&msg_type=TEXT&method=SENDMESSAGE&msg=Dear+Patron%2C%0AWelcome+to+Muthalvar+Padaippagam%F0%9F%99%8F++%0A%0AYou+have+booked+our+Conference+Hall+on+%2A"+bdate+"%2A+at+time+slot+%2A"+slot+"%2A+.%0A%0APayment+for+the+booking+is+%2ARs.+"+amount+"%2A+received.+%0A%0APlease+show+your+QR+Code+at+Reception+Desk+for+accessing+Muthalvar+Padaippagam.%0A%0AHave+a+Nice+Day%F0%9F%98%8A&isTemplate=true&buttonUrlParam=muthalvarpadaippagam%2FbookingQRCode%3Fbooking_id%3D"+bookingId; System.out.println(msgContent); return whatsappMsgService.sendMsg(msgContent); diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index d802b20..1f00896 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,6 +1,6 @@ spring.application.name=conferencehall -spring.profiles.active=dev -#spring.profiles.active=prod +#spring.profiles.active=dev +spring.profiles.active=prod server.port=8074 diff --git a/src/main/resources/templates/caretaker/abstract.html b/src/main/resources/templates/caretaker/abstract.html index 41f73c9..3d66bd7 100644 --- a/src/main/resources/templates/caretaker/abstract.html +++ b/src/main/resources/templates/caretaker/abstract.html @@ -276,10 +276,11 @@ }); // Handle Reset Button - $('#filterForm').on('reset', function () { + $('#filterForm').on('reset', function (e) { + e.preventDefault(); // Reset dates - $('#fromDate').val(currentDate); - $('#toDate').val(currentDate); + $('#fromDate').val(currentDate); + $('#toDate').val(currentDate); // Reset filters $('#typeFilter').val(''); @@ -311,7 +312,7 @@ totalPersons += parseInt(row.NO_of_person || 0); }); - excelData.push(['', '', 'Total', totalAmount.toFixed(2), totalPersons]); + excelData.push(['', '', '','','Total', totalAmount.toFixed(2), totalPersons]); const ws = XLSX.utils.aoa_to_sheet(excelData); const wb = XLSX.utils.book_new(); diff --git a/src/main/resources/templates/caretaker/bookingdetails.html b/src/main/resources/templates/caretaker/bookingdetails.html index 683a889..a25365d 100644 --- a/src/main/resources/templates/caretaker/bookingdetails.html +++ b/src/main/resources/templates/caretaker/bookingdetails.html @@ -16,6 +16,9 @@ padding-left: 10px; /* Adjust padding to position icon */ padding-right: 10px; } + .modal-xl-custom { + max-width: 95%; /* or any size you prefer */ +} #mobileNo { border-left: none; /* Remove left border to merge with icon */ @@ -216,14 +219,16 @@ -