diff --git a/.classpath b/.classpath
new file mode 100644
index 0000000..83a3b6f
--- /dev/null
+++ b/.classpath
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.project b/.project
new file mode 100644
index 0000000..b01d263
--- /dev/null
+++ b/.project
@@ -0,0 +1,23 @@
+
+
+ gccoffice
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ org.eclipse.m2e.core.maven2Builder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+ org.eclipse.m2e.core.maven2Nature
+
+
diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..abdea9a
--- /dev/null
+++ b/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,4 @@
+eclipse.preferences.version=1
+encoding//src/main/java=UTF-8
+encoding//src/main/resources=UTF-8
+encoding/=UTF-8
diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..67cd90e
--- /dev/null
+++ b/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,9 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.methodParameters=generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
+org.eclipse.jdt.core.compiler.compliance=17
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
+org.eclipse.jdt.core.compiler.release=disabled
+org.eclipse.jdt.core.compiler.source=17
diff --git a/.settings/org.eclipse.m2e.core.prefs b/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000..f897a7f
--- /dev/null
+++ b/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/gccoffice_uploads/socialmedia_1913_regcompfiles/2026/08/resolved_img_06082026175501_Screenshot(11).png b/gccoffice_uploads/socialmedia_1913_regcompfiles/2026/08/resolved_img_06082026175501_Screenshot(11).png
new file mode 100644
index 0000000..c97dd93
Binary files /dev/null and b/gccoffice_uploads/socialmedia_1913_regcompfiles/2026/08/resolved_img_06082026175501_Screenshot(11).png differ
diff --git a/src/main/java/in/gov/chennaicorporation/gccoffice/callcenterqaqc/controller/SocialMediaApiController.java b/src/main/java/in/gov/chennaicorporation/gccoffice/callcenterqaqc/controller/SocialMediaApiController.java
index 79dd379..c530437 100644
--- a/src/main/java/in/gov/chennaicorporation/gccoffice/callcenterqaqc/controller/SocialMediaApiController.java
+++ b/src/main/java/in/gov/chennaicorporation/gccoffice/callcenterqaqc/controller/SocialMediaApiController.java
@@ -433,6 +433,11 @@ public class SocialMediaApiController {
return socialservice.getFilteredRegComps();
}
+ @GetMapping("/getcompstatus")
+ public Map getcompstatus(String complaintNumber) {
+ return socialservice.getcompstatus(complaintNumber);
+ }
+
@PostMapping("/approveComplaint")
@ResponseBody
public Map approveComplaint(
diff --git a/src/main/java/in/gov/chennaicorporation/gccoffice/callcenterqaqc/service/SocialMediaService.java b/src/main/java/in/gov/chennaicorporation/gccoffice/callcenterqaqc/service/SocialMediaService.java
index 325b41f..12f54e6 100644
--- a/src/main/java/in/gov/chennaicorporation/gccoffice/callcenterqaqc/service/SocialMediaService.java
+++ b/src/main/java/in/gov/chennaicorporation/gccoffice/callcenterqaqc/service/SocialMediaService.java
@@ -6,6 +6,8 @@ import java.util.Base64;
import java.util.Date;
import java.util.List;
import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
import java.awt.image.BufferedImage;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
@@ -373,16 +375,19 @@ public class SocialMediaService {
// Get the bytes of the file
byte[] bytes = file.getBytes();
+ String originalFileName = file.getOriginalFilename();
+ String extension = originalFileName.substring(originalFileName.lastIndexOf('.') + 1).toLowerCase();
- BufferedImage image = ImageIO.read(new ByteArrayInputStream(bytes));
- byte[] compressedBytes = compressImage(image, 0.5f); // Compress with 50%quality
+ if ("jpg".equals(extension) || "jpeg".equals(extension)) {
+ BufferedImage image = ImageIO.read(new ByteArrayInputStream(bytes));
+ byte[] compressedBytes = compressImage(image, 0.5f); // Compress with 50% quality
- // Write the bytes to the file
- Files.write(path, bytes);
-
- // Write the bytes to the file
- Files.write(path, compressedBytes);
-
+ // Write the compressed bytes to the file
+ Files.write(path, compressedBytes);
+ } else {
+ // Write the original bytes to the file
+ Files.write(path, bytes);
+ }
//System.out.println(filePath);
return filepath_txt;
@@ -428,52 +433,60 @@ public class SocialMediaService {
if (responseEntity.getStatusCode().is2xxSuccessful()) {
String responseBody = responseEntity.getBody();
- //System.out.println("Response Body: " + responseBody);
-
+
+ //System.out.println("RAW Response Body: " + responseBody);
+
+ // Fix malformed fields
+ responseBody = fixMalformedField(responseBody, "complaintdetails", "OfficialMobile");
+ responseBody = fixMalformedField(responseBody, "mediaLink", "COMP_MODE");
+//
+// System.out.println("Altered Response Body: " + responseBody);
+
+
ObjectMapper mapper = new ObjectMapper();
JsonNode rootNode = mapper.readTree(responseBody);
JsonNode complaintDetails = rootNode.path(0).path("ComplaintListHistory").path(0);
- String registerDate=complaintDetails.path("complaintopendate").asText("N/A");
- //System.out.println("registerdate====="+registerDate);
-
- String formattedDate = "N/A"; // Default value if parsing fails
-
- if (!registerDate.equals("N/A") && !registerDate.isEmpty()) {
- try {
- // Parse the input date string
- SimpleDateFormat inputFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.S");
- Date date = inputFormat.parse(registerDate);
-
- // Format the date to dd-MM-yyyy
- SimpleDateFormat outputFormat = new SimpleDateFormat("dd-MM-yyyy");
- formattedDate = outputFormat.format(date);
- } catch (Exception e) {
- e.printStackTrace(); // Log exception for debugging
- }
- }
+// String registerDate=complaintDetails.path("complaintopendate").asText("N/A");
+// //System.out.println("registerdate====="+registerDate);
+//
+// String formattedDate = "N/A"; // Default value if parsing fails
+//
+// if (!registerDate.equals("N/A") && !registerDate.isEmpty()) {
+// try {
+// // Parse the input date string
+// SimpleDateFormat inputFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.S");
+// Date date = inputFormat.parse(registerDate);
+//
+// // Format the date to dd-MM-yyyy
+// SimpleDateFormat outputFormat = new SimpleDateFormat("dd-MM-yyyy");
+// formattedDate = outputFormat.format(date);
+// } catch (Exception e) {
+// e.printStackTrace(); // Log exception for debugging
+// }
+// }
if (!complaintDetails.isMissingNode()) {
// Existing fields
- resultMap.put("complaintid", complaintDetails.path("complaintid").asText("N/A"));
- resultMap.put("complaintdate", formattedDate);
- resultMap.put("complainantName", complaintDetails.path("CustomerName").asText("N/A"));
- resultMap.put("mobileNumber", complaintDetails.path("CustomerMobile").asText("N/A"));
- resultMap.put("complaintType", complaintDetails.path("complainttype").asText("N/A"));
- resultMap.put("description", complaintDetails.path("complaintdetails").asText("N/A"));
+// resultMap.put("complaintid", complaintDetails.path("complaintid").asText("N/A"));
+// resultMap.put("complaintdate", formattedDate);
+// resultMap.put("complainantName", complaintDetails.path("CustomerName").asText("N/A"));
+// resultMap.put("mobileNumber", complaintDetails.path("CustomerMobile").asText("N/A"));
+// resultMap.put("complaintType", complaintDetails.path("complainttype").asText("N/A"));
+ //resultMap.put("description", complaintDetails.path("complaintdetails").asText("N/A"));
resultMap.put("currentStatus", complaintDetails.path("complaintcurrentstatus").asText("N/A"));
- resultMap.put("Street", complaintDetails.path("Street").asText("N/A"));
- resultMap.put("Area", complaintDetails.path("Area").asText("N/A"));
- resultMap.put("Landmark", complaintDetails.path("Landmark").asText("N/A"));
- resultMap.put("Location", complaintDetails.path("Location").asText("N/A"));
- resultMap.put("Zone", complaintDetails.path("Zone").asText("N/A"));
- resultMap.put("Division", complaintDetails.path("Division").asText("N/A"));
- resultMap.put("OfficialMobile", complaintDetails.path("OfficialMobile").asText("N/A"));
- resultMap.put("gender", complaintDetails.path("GENDER").asText("N/A"));
- resultMap.put("deptname",complaintDetails.path("DEPT_NAME").asText("N/A"));
- resultMap.put("compmode", complaintDetails.path("COMP_MODE").asText("N/A"));
- resultMap.put("Officialname", complaintDetails.path("Officialname").asText("N/A"));
+// resultMap.put("Street", complaintDetails.path("Street").asText("N/A"));
+// resultMap.put("Area", complaintDetails.path("Area").asText("N/A"));
+// resultMap.put("Landmark", complaintDetails.path("Landmark").asText("N/A"));
+// resultMap.put("Location", complaintDetails.path("Location").asText("N/A"));
+// resultMap.put("Zone", complaintDetails.path("Zone").asText("N/A"));
+// resultMap.put("Division", complaintDetails.path("Division").asText("N/A"));
+// resultMap.put("OfficialMobile", complaintDetails.path("OfficialMobile").asText("N/A"));
+// resultMap.put("gender", complaintDetails.path("GENDER").asText("N/A"));
+// resultMap.put("deptname",complaintDetails.path("DEPT_NAME").asText("N/A"));
+// resultMap.put("compmode", complaintDetails.path("COMP_MODE").asText("N/A"));
+// resultMap.put("Officialname", complaintDetails.path("Officialname").asText("N/A"));
}
@@ -487,6 +500,29 @@ public class SocialMediaService {
return resultMap;
}
+
+ private String fixMalformedField(String json, String fieldName, String nextFieldName) {
+
+ Pattern pattern = Pattern.compile(
+ "\"" + Pattern.quote(fieldName) + "\":\"\"(.*?)\"\",\"" + Pattern.quote(nextFieldName) + "\"",
+ Pattern.DOTALL);
+
+ Matcher matcher = pattern.matcher(json);
+
+ if (matcher.find()) {
+ String value = matcher.group(1);
+
+ // Escape any quotes inside the value
+ value = value.replace("\"", "\\\"");
+
+ json = matcher.replaceFirst(
+ "\"" + fieldName + "\":\"" +
+ Matcher.quoteReplacement(value) +
+ "\",\"" + nextFieldName + "\"");
+ }
+
+ return json;
+ }
public Map getFilteredRegComps() {
@@ -495,7 +531,7 @@ public class SocialMediaService {
try {
String sql =
- "SELECT src.complaint_number, src.created_date,CONCAT('" + fileBaseUrl + "/gcc/files',src.resolved_img) AS img_full_path,al.agent_name as agent_name,src.remarks as remarks" +
+ "SELECT src.complaint_number as complaintnumber, date_format(src.created_date,'%d-%m-%Y %H:%i') as submitted_date,CONCAT('" + fileBaseUrl + "/gcc/files',src.resolved_img) AS img_full_path,al.agent_name as agent_name,src.remarks as remarks" +
" FROM socialmedia_reg_completed src "
+ " LEFT JOIN agents_list al ON al.agent_id=src.cby " +
"WHERE src.is_processed = 0 " +
@@ -504,70 +540,70 @@ public class SocialMediaService {
List
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | S.No |
+ Zone |
+ Ward |
+ Vendor Name |
+ Mobile Number |
+ Street |
+ View |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Loading...
+
+
+
Please wait...
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/main/resources/templates/modules/vendors/approvedcertificates.html b/src/main/resources/templates/modules/vendors/approvedcertificates.html
new file mode 100644
index 0000000..5a72afb
--- /dev/null
+++ b/src/main/resources/templates/modules/vendors/approvedcertificates.html
@@ -0,0 +1,891 @@
+
+
+
+
+