Browse Source

new UI and query changes in gccadjustment management project and payment tracker , gcc manpower

master
yoganandhank 3 months ago
parent
commit
549411efa0
  1. 5
      src/main/java/com/gcc_manpower/config/WebConfig.java
  2. 132
      src/main/java/com/gcc_manpower/gccadjustmentmanagement/controller/AdjustmentController.java
  3. 48
      src/main/java/com/gcc_manpower/gccadjustmentmanagement/service/AdjustmentService.java
  4. 15
      src/main/java/com/gcc_manpower/service/AppUserService.java
  5. 14
      src/main/resources/application-local.properties
  6. 14
      src/main/resources/application-prod.properties
  7. 2093
      src/main/resources/templates/gccadjustmentmanagement/dashboard.html
  8. 4
      src/main/resources/templates/gccservicepaymenttracker/dashboard.html

5
src/main/java/com/gcc_manpower/config/WebConfig.java

@ -57,5 +57,10 @@ public class WebConfig implements WebMvcConfigurer {
.toString(); .toString();
registry.addResourceHandler("/gccadjustmentmanagementfiles/**") registry.addResourceHandler("/gccadjustmentmanagementfiles/**")
.addResourceLocations(adjustmentUploadPath); .addResourceLocations(adjustmentUploadPath);
// Map URL path /uploads/** to the physical uploads folder in the project root
String rootUploadPath = Paths.get("uploads").toAbsolutePath().toUri().toString();
registry.addResourceHandler("/uploads/**")
.addResourceLocations(rootUploadPath);
} }
} }

132
src/main/java/com/gcc_manpower/gccadjustmentmanagement/controller/AdjustmentController.java

@ -149,6 +149,7 @@ public class AdjustmentController {
@RequestParam(value = "id", required = false) Integer id, @RequestParam(value = "id", required = false) Integer id,
@RequestParam(value = "vend_name", required = false) String vendName, @RequestParam(value = "vend_name", required = false) String vendName,
@RequestParam(value = "fin_year", required = false) String finYear, @RequestParam(value = "fin_year", required = false) String finYear,
@RequestParam(value = "subject", required = false) String subject,
@RequestParam(value = "adv_type_id", required = false) String advTypeId, @RequestParam(value = "adv_type_id", required = false) String advTypeId,
@RequestParam(value = "fund_type_id", required = false) String fundTypeId, @RequestParam(value = "fund_type_id", required = false) String fundTypeId,
@RequestParam(value = "bal_amt", required = false) Double balAmt, @RequestParam(value = "bal_amt", required = false) Double balAmt,
@ -163,6 +164,10 @@ public class AdjustmentController {
@RequestParam(value = "ejv_num_file_gen_date", required = false) String ejvNumFileGenDate, @RequestParam(value = "ejv_num_file_gen_date", required = false) String ejvNumFileGenDate,
@RequestParam(value = "as_file_gen_date", required = false) String asFileGenDate, @RequestParam(value = "as_file_gen_date", required = false) String asFileGenDate,
@RequestParam(value = "as_final_file_gen_date", required = false) String asFinalFileGenDate, @RequestParam(value = "as_final_file_gen_date", required = false) String asFinalFileGenDate,
@RequestParam(value = "ac_code", required = false) String acCode,
@RequestParam(value = "file_available_status", required = false) String fileAvailableStatus,
@RequestParam(value = "rtgs_date", required = false) String rtgsDate,
@RequestParam(value = "dc_completed_date", required = false) String dcCompletedDate,
@RequestParam(value = "file", required = false) MultipartFile file, @RequestParam(value = "file", required = false) MultipartFile file,
@RequestParam(value = "poFile", required = false) MultipartFile poFile, @RequestParam(value = "poFile", required = false) MultipartFile poFile,
@RequestParam(value = "dcFile", required = false) MultipartFile dcFile, @RequestParam(value = "dcFile", required = false) MultipartFile dcFile,
@ -202,24 +207,38 @@ public class AdjustmentController {
} }
// Save files or keep existing // Save files or keep existing
String filePath = saveFile(file, "file", uploadDir, existing != null ? (String) existing.get("file_path") : null);
String poPath = saveFile(poFile, "po", uploadDir, existing != null ? (String) existing.get("po_file_path") : null);
String dcPath = saveFile(dcFile, "dc", uploadDir, existing != null ? (String) existing.get("dc_file_path") : null);
String irPath = saveFile(irFile, "ir", uploadDir, existing != null ? (String) existing.get("ir_file_path") : null);
String srPath = saveFile(srFile, "sr", uploadDir, existing != null ? (String) existing.get("sr_filepath") : null);
String piPath = saveFile(piFile, "pi", uploadDir, existing != null ? (String) existing.get("pi_file_path") : null);
String fiPath = saveFile(fiFile, "fi", uploadDir, existing != null ? (String) existing.get("fi_file_path") : null);
String tcPath = saveFile(tcFile, "tc", uploadDir, existing != null ? (String) existing.get("tc_file_path") : null);
String rtgsPath = saveFile(rtgsFile, "rtgs", uploadDir, existing != null ? (String) existing.get("rtgs_file_path") : null);
String ejvPath = saveFile(ejvFile, "ejv", uploadDir, existing != null ? (String) existing.get("ejv_num_file_path") : null);
String asPath = saveFile(asFile, "as", uploadDir, existing != null ? (String) existing.get("as_file_path") : null);
String asFinalPath = saveFile(asFinalFile, "as_final", uploadDir, existing != null ? (String) existing.get("as_final_file_path") : null);
String filePath = saveFile(file, "file", fileDataNum, uploadDir,
existing != null ? (String) existing.get("file_path") : null);
String poPath = saveFile(poFile, "po", fileDataNum, uploadDir,
existing != null ? (String) existing.get("po_file_path") : null);
String dcPath = saveFile(dcFile, "dc", fileDataNum, uploadDir,
existing != null ? (String) existing.get("dc_file_path") : null);
String irPath = saveFile(irFile, "ir", fileDataNum, uploadDir,
existing != null ? (String) existing.get("ir_file_path") : null);
String srPath = saveFile(srFile, "sr", fileDataNum, uploadDir,
existing != null ? (String) existing.get("sr_filepath") : null);
String piPath = saveFile(piFile, "pi", fileDataNum, uploadDir,
existing != null ? (String) existing.get("pi_file_path") : null);
String fiPath = saveFile(fiFile, "fi", fileDataNum, uploadDir,
existing != null ? (String) existing.get("fi_file_path") : null);
String tcPath = saveFile(tcFile, "tc", fileDataNum, uploadDir,
existing != null ? (String) existing.get("tc_file_path") : null);
String rtgsPath = saveFile(rtgsFile, "rtgs", fileDataNum, uploadDir,
existing != null ? (String) existing.get("rtgs_file_path") : null);
String ejvPath = saveFile(ejvFile, "ejv", fileDataNum, uploadDir,
existing != null ? (String) existing.get("ejv_num_file_path") : null);
String asPath = saveFile(asFile, "as", fileDataNum, uploadDir,
existing != null ? (String) existing.get("as_file_path") : null);
String asFinalPath = saveFile(asFinalFile, "as_final", fileDataNum, uploadDir,
existing != null ? (String) existing.get("as_final_file_path") : null);
// Build data map // Build data map
Map<String, Object> data = new HashMap<>(); Map<String, Object> data = new HashMap<>();
if (id != null) data.put("id", id);
if (id != null)
data.put("id", id);
data.put("vend_name", vendName); data.put("vend_name", vendName);
data.put("fin_year", finYear); data.put("fin_year", finYear);
data.put("subject", subject);
data.put("adv_type_id", advTypeId); data.put("adv_type_id", advTypeId);
data.put("fund_type_id", fundTypeId); data.put("fund_type_id", fundTypeId);
data.put("bal_amt", balAmt); data.put("bal_amt", balAmt);
@ -234,6 +253,10 @@ public class AdjustmentController {
data.put("ejv_num_file_gen_date", ejvNumFileGenDate); data.put("ejv_num_file_gen_date", ejvNumFileGenDate);
data.put("as_file_gen_date", asFileGenDate); data.put("as_file_gen_date", asFileGenDate);
data.put("as_final_file_gen_date", asFinalFileGenDate); data.put("as_final_file_gen_date", asFinalFileGenDate);
data.put("ac_code", acCode);
data.put("file_available_status", fileAvailableStatus);
data.put("rtgs_date", rtgsDate);
data.put("dc_completed_date", dcCompletedDate);
// Paths // Paths
data.put("file_path", filePath); data.put("file_path", filePath);
@ -281,7 +304,8 @@ public class AdjustmentController {
return response; return response;
} }
boolean deleted = adjustmentService.deleteAdjustmentFile(id, remarks != null ? remarks : "Deleted by user", username);
boolean deleted = adjustmentService.deleteAdjustmentFile(id, remarks != null ? remarks : "Deleted by user",
username);
if (deleted) { if (deleted) {
response.put("success", true); response.put("success", true);
response.put("message", "Record deleted successfully."); response.put("message", "Record deleted successfully.");
@ -293,15 +317,87 @@ public class AdjustmentController {
return response; return response;
} }
private String saveFile(MultipartFile f, String prefix, File dir, String currentPath) throws Exception {
@PostMapping("/api/update-ejv")
@ResponseBody
public Map<String, Object> updateEJV(
@RequestParam("id") Integer id,
@RequestParam("ejv_num") String ejvNum,
@RequestParam(value = "ejvFile", required = false) MultipartFile ejvFile,
HttpSession session) {
Map<String, Object> response = new HashMap<>();
String username = (String) session.getAttribute("adj_usrName");
if (username == null) {
response.put("success", false);
response.put("error", "Unauthorized access. Please log in.");
return response;
}
try {
Map<String, Object> existing = adjustmentService.getAdjustmentFileById(id);
if (existing == null) {
response.put("success", false);
response.put("error", "Record not found.");
return response;
}
File uploadDir = new File(adjustmentUploadPathConfig).getAbsoluteFile();
if (!uploadDir.exists()) {
uploadDir.mkdirs();
}
String fileDataNum = (String) existing.get("file_data_num");
String ejvPath = saveFile(ejvFile, "ejv", fileDataNum, uploadDir,
existing != null ? (String) existing.get("ejv_num_file_path") : null);
boolean updated = adjustmentService.updateEJV(id, ejvNum, ejvPath, username);
if (updated) {
response.put("success", true);
response.put("message", "EJV details updated successfully.");
} else {
response.put("success", false);
response.put("error", "Failed to update EJV details in database.");
}
} catch (Exception e) {
response.put("success", false);
response.put("error", "Error occurred: " + e.getMessage());
e.printStackTrace();
}
return response;
}
private String saveFile(MultipartFile f, String category, String fileNum, File dir, String currentPath)
throws Exception {
if (f == null || f.isEmpty()) { if (f == null || f.isEmpty()) {
return currentPath; return currentPath;
} }
// Clean fileNum
String cleanFileNum = "unknown";
if (fileNum != null && !fileNum.trim().isEmpty()) {
// Remove illegal characters, but allow slashes / and \ for hierarchy
cleanFileNum = fileNum.trim().replaceAll("[^a-zA-Z0-9.\\/\\\\_-]", "_");
// Normalize path separators to forward slash /
cleanFileNum = cleanFileNum.replace('\\', '/');
}
// Save files inside the physical "uploads" directory in the project root
File projectRoot = new File(".").getAbsoluteFile();
String subPath = "uploads/file-data/" + cleanFileNum + "/" + category.toUpperCase();
File folder = new File(projectRoot, subPath).getAbsoluteFile();
if (!folder.exists()) {
folder.mkdirs();
}
String orig = f.getOriginalFilename(); String orig = f.getOriginalFilename();
String ext = orig != null && orig.lastIndexOf('.') > 0 ? orig.substring(orig.lastIndexOf('.')) : ".pdf"; String ext = orig != null && orig.lastIndexOf('.') > 0 ? orig.substring(orig.lastIndexOf('.')) : ".pdf";
String filename = prefix + "_" + System.currentTimeMillis() + ext;
File dest = new File(dir, filename).getAbsoluteFile();
String cleanName = orig != null
? orig.substring(0, orig.lastIndexOf('.')).replaceAll("[^a-zA-Z0-9.-]", "_") + ext
: (category + "_" + System.currentTimeMillis() + ext);
File dest = new File(folder, cleanName).getAbsoluteFile();
f.transferTo(dest); f.transferTo(dest);
return "gccadjustmentmanagementfiles/" + filename;
return "uploads/file-data/" + cleanFileNum + "/" + category.toUpperCase() + "/" + cleanName;
} }
} }

48
src/main/java/com/gcc_manpower/gccadjustmentmanagement/service/AdjustmentService.java

@ -45,10 +45,12 @@ public class AdjustmentService {
public List<Map<String, Object>> getAllFiles() { public List<Map<String, Object>> getAllFiles() {
String sql = "SELECT a.*, " + String sql = "SELECT a.*, " +
"adv.adv_type AS resolved_adv_type, " + "adv.adv_type AS resolved_adv_type, " +
"f.fund_type AS resolved_fund_type " +
"f.fund_type AS resolved_fund_type, " +
"u.usr_name AS updated_by_name " +
"FROM adjustment_file_details a " + "FROM adjustment_file_details a " +
"LEFT JOIN advance_type_list adv ON TRIM(a.adv_type_id) REGEXP '^[0-9]+$' AND adv.id = CAST(TRIM(a.adv_type_id) AS UNSIGNED) " + "LEFT JOIN advance_type_list adv ON TRIM(a.adv_type_id) REGEXP '^[0-9]+$' AND adv.id = CAST(TRIM(a.adv_type_id) AS UNSIGNED) " +
"LEFT JOIN fund_type_list f ON TRIM(a.fund_type_id) REGEXP '^[0-9]+$' AND f.id = CAST(TRIM(a.fund_type_id) AS UNSIGNED) " + "LEFT JOIN fund_type_list f ON TRIM(a.fund_type_id) REGEXP '^[0-9]+$' AND f.id = CAST(TRIM(a.fund_type_id) AS UNSIGNED) " +
"LEFT JOIN gcc_manpower.app_user u ON (a.updated_by = CAST(u.usr_id AS CHAR) OR a.updated_by = u.usr_name) " +
"WHERE a.is_active = 1 AND a.is_delete = 0 " + "WHERE a.is_active = 1 AND a.is_delete = 0 " +
"ORDER BY a.updated_date DESC, a.id DESC"; "ORDER BY a.updated_date DESC, a.id DESC";
try { try {
@ -79,10 +81,10 @@ public class AdjustmentService {
"as_file_gen_date = ?, as_file_path = ?, as_final_file_gen_date = ?, as_final_file_path = ?, " + "as_file_gen_date = ?, as_file_path = ?, as_final_file_gen_date = ?, as_final_file_path = ?, " +
"bal_amt = ?, dc_file_path = ?, ejv_num = ?, ejv_num_file_gen_date = ?, ejv_num_file_path = ?, " + "bal_amt = ?, dc_file_path = ?, ejv_num = ?, ejv_num_file_gen_date = ?, ejv_num_file_path = ?, " +
"fi_amt = ?, fi_file_gen_date = ?, fi_file_path = ?, file_data_num = ?, file_path = ?, " + "fi_amt = ?, fi_file_gen_date = ?, fi_file_path = ?, file_data_num = ?, file_path = ?, " +
"file_remark = ?, fin_year = ?, ir_file_path = ?, pi_amt = ?, pi_file_gen_date = ?, " +
"file_remark = ?, fin_year = ?, subject = ?, ir_file_path = ?, pi_amt = ?, pi_file_gen_date = ?, " +
"pi_file_path = ?, po_file_path = ?, rtgs_file_path = ?, sr_filepath = ?, tc_file_gen_date = ?, " + "pi_file_path = ?, po_file_path = ?, rtgs_file_path = ?, sr_filepath = ?, tc_file_gen_date = ?, " +
"tc_file_path = ?, vend_name = ?, adv_type_id = ?, fund_type_id = ?, updated_date = ?, " +
"updated_by = ? WHERE id = ?";
"tc_file_path = ?, vend_name = ?, adv_type_id = ?, fund_type_id = ?, ac_code = ?, " +
"file_available_status = ?, dc_completed_date = ?, rtgs_date = ?, updated_date = ?, updated_by = ? WHERE id = ?";
try { try {
int rows = jdbcTemplate.update(sql, int rows = jdbcTemplate.update(sql,
parseDate(data.get("as_file_gen_date")), parseDate(data.get("as_file_gen_date")),
@ -101,6 +103,7 @@ public class AdjustmentService {
data.get("file_path"), data.get("file_path"),
data.get("file_remark"), data.get("file_remark"),
data.get("fin_year"), data.get("fin_year"),
data.get("subject"),
data.get("ir_file_path"), data.get("ir_file_path"),
parseDouble(data.get("pi_amt")), parseDouble(data.get("pi_amt")),
parseDate(data.get("pi_file_gen_date")), parseDate(data.get("pi_file_gen_date")),
@ -113,10 +116,13 @@ public class AdjustmentService {
data.get("vend_name"), data.get("vend_name"),
data.get("adv_type_id"), data.get("adv_type_id"),
data.get("fund_type_id"), data.get("fund_type_id"),
data.get("ac_code"),
data.get("file_available_status"),
parseDate(data.get("dc_completed_date")),
parseDate(data.get("rtgs_date")),
now, now,
username, username,
id
);
id);
return rows > 0; return rows > 0;
} catch (Exception e) { } catch (Exception e) {
System.err.println("Error updating adjustment file: " + e.getMessage()); System.err.println("Error updating adjustment file: " + e.getMessage());
@ -129,11 +135,11 @@ public class AdjustmentService {
"as_file_gen_date, as_file_path, as_final_file_gen_date, as_final_file_path, " + "as_file_gen_date, as_file_path, as_final_file_gen_date, as_final_file_path, " +
"bal_amt, dc_file_path, ejv_num, ejv_num_file_gen_date, ejv_num_file_path, " + "bal_amt, dc_file_path, ejv_num, ejv_num_file_gen_date, ejv_num_file_path, " +
"fi_amt, fi_file_gen_date, fi_file_path, file_data_num, file_path, " + "fi_amt, fi_file_gen_date, fi_file_path, file_data_num, file_path, " +
"file_remark, fin_year, ir_file_path, pi_amt, pi_file_gen_date, " +
"file_remark, fin_year, subject, ir_file_path, pi_amt, pi_file_gen_date, " +
"pi_file_path, po_file_path, rtgs_file_path, sr_filepath, tc_file_gen_date, " + "pi_file_path, po_file_path, rtgs_file_path, sr_filepath, tc_file_gen_date, " +
"tc_file_path, vend_name, adv_type_id, fund_type_id, cdate, updated_date, " +
"updated_by, is_active, is_delete) VALUES " +
"(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 1, 0)";
"tc_file_path, vend_name, adv_type_id, fund_type_id, ac_code, file_available_status, " +
"dc_completed_date, rtgs_date, cdate, updated_date, updated_by, is_active, is_delete) VALUES " +
"(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 1, 0)";
try { try {
int rows = jdbcTemplate.update(sql, int rows = jdbcTemplate.update(sql,
parseDate(data.get("as_file_gen_date")), parseDate(data.get("as_file_gen_date")),
@ -152,6 +158,7 @@ public class AdjustmentService {
data.get("file_path"), data.get("file_path"),
data.get("file_remark"), data.get("file_remark"),
data.get("fin_year"), data.get("fin_year"),
data.get("subject"),
data.get("ir_file_path"), data.get("ir_file_path"),
parseDouble(data.get("pi_amt")), parseDouble(data.get("pi_amt")),
parseDate(data.get("pi_file_gen_date")), parseDate(data.get("pi_file_gen_date")),
@ -164,10 +171,13 @@ public class AdjustmentService {
data.get("vend_name"), data.get("vend_name"),
data.get("adv_type_id"), data.get("adv_type_id"),
data.get("fund_type_id"), data.get("fund_type_id"),
data.get("ac_code"),
data.get("file_available_status"),
parseDate(data.get("dc_completed_date")),
parseDate(data.get("rtgs_date")),
now, now,
now, now,
username
);
username);
return rows > 0; return rows > 0;
} catch (Exception e) { } catch (Exception e) {
System.err.println("Error saving adjustment file: " + e.getMessage()); System.err.println("Error saving adjustment file: " + e.getMessage());
@ -190,6 +200,20 @@ public class AdjustmentService {
} }
} }
public boolean updateEJV(int id, String ejvNum, String ejvFilePath, String username) {
java.sql.Timestamp now = new java.sql.Timestamp(System.currentTimeMillis());
java.sql.Date today = new java.sql.Date(System.currentTimeMillis());
String sql = "UPDATE adjustment_file_details SET ejv_num = ?, ejv_num_file_path = ?, ejv_num_file_gen_date = ?, updated_date = ?, updated_by = ? WHERE id = ?";
try {
int rows = jdbcTemplate.update(sql, ejvNum, ejvFilePath, today, now, username, id);
return rows > 0;
} catch (Exception e) {
System.err.println("Error updating EJV: " + e.getMessage());
e.printStackTrace();
return false;
}
}
private java.sql.Date parseDate(Object val) { private java.sql.Date parseDate(Object val) {
if (val == null || String.valueOf(val).trim().isEmpty()) { if (val == null || String.valueOf(val).trim().isEmpty()) {
return null; return null;

15
src/main/java/com/gcc_manpower/service/AppUserService.java

@ -311,6 +311,9 @@ public class AppUserService {
} }
public Map<String, Object> getEmployeeByCode(String empCode) { public Map<String, Object> getEmployeeByCode(String empCode) {
if (empCode != null) {
empCode = empCode.trim();
}
String sql = "SELECT id, emp_code, name, email, mobile, user_type, designation, location, vendor_id, joined_date, isactive, isdelete " String sql = "SELECT id, emp_code, name, email, mobile, user_type, designation, location, vendor_id, joined_date, isactive, isdelete "
+ +
"FROM employee_details " + "FROM employee_details " +
@ -327,6 +330,9 @@ public class AppUserService {
} }
public boolean addEmployee(Map<String, Object> emp, String updatedByUsername) { public boolean addEmployee(Map<String, Object> emp, String updatedByUsername) {
if (emp != null && emp.get("emp_code") != null) {
emp.put("emp_code", String.valueOf(emp.get("emp_code")).trim());
}
String checkSql = "SELECT COUNT(*) FROM employee_details WHERE emp_code = ? AND isdelete = 0"; String checkSql = "SELECT COUNT(*) FROM employee_details WHERE emp_code = ? AND isdelete = 0";
try { try {
Integer count = jdbcManpowerTemplate.queryForObject(checkSql, Integer.class, emp.get("emp_code")); Integer count = jdbcManpowerTemplate.queryForObject(checkSql, Integer.class, emp.get("emp_code"));
@ -415,6 +421,9 @@ public class AppUserService {
} }
public boolean updateEmployee(Map<String, Object> emp, String updatedByUsername) { public boolean updateEmployee(Map<String, Object> emp, String updatedByUsername) {
if (emp != null && emp.get("emp_code") != null) {
emp.put("emp_code", String.valueOf(emp.get("emp_code")).trim());
}
String empCode = (String) emp.get("emp_code"); String empCode = (String) emp.get("emp_code");
String selectSql = "SELECT emp_code, name, email, mobile, user_type, designation, location, vendor_id, isactive, isdelete, updated_by, cdate " String selectSql = "SELECT emp_code, name, email, mobile, user_type, designation, location, vendor_id, isactive, isdelete, updated_by, cdate "
+ +
@ -758,6 +767,9 @@ public class AppUserService {
} }
public boolean deleteEmployee(String empCode, String updatedByUsername) { public boolean deleteEmployee(String empCode, String updatedByUsername) {
if (empCode != null) {
empCode = empCode.trim();
}
String selectSql = "SELECT designation, vendor_id FROM employee_details WHERE emp_code = ? AND isdelete = 0"; String selectSql = "SELECT designation, vendor_id FROM employee_details WHERE emp_code = ? AND isdelete = 0";
try { try {
List<Map<String, Object>> list = jdbcManpowerTemplate.queryForList(selectSql, empCode); List<Map<String, Object>> list = jdbcManpowerTemplate.queryForList(selectSql, empCode);
@ -860,6 +872,9 @@ public class AppUserService {
} }
public boolean restoreEmployee(String empCode, String updatedByUsername) { public boolean restoreEmployee(String empCode, String updatedByUsername) {
if (empCode != null) {
empCode = empCode.trim();
}
String selectSql = "SELECT designation, vendor_id FROM employee_details WHERE emp_code = ?"; String selectSql = "SELECT designation, vendor_id FROM employee_details WHERE emp_code = ?";
try { try {
List<Map<String, Object>> list = jdbcManpowerTemplate.queryForList(selectSql, empCode); List<Map<String, Object>> list = jdbcManpowerTemplate.queryForList(selectSql, empCode);

14
src/main/resources/application-local.properties

@ -21,11 +21,19 @@ spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
# =============================== # ===============================
spring.jpa.hibernate.ddl-auto=update spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=true spring.jpa.show-sql=true
# spring.jpa.properties.hibernate.format_sql=true
spring.jpa.properties.hibernate.format_sql=true
spring.jpa.open-in-view=true spring.jpa.open-in-view=true
logging.level.org.hibernate.SQL=DEBUG logging.level.org.hibernate.SQL=DEBUG
# logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE
logging.level.org.hibernate.type.descriptor.sql=TRACE
# Log bind parameters in Hibernate 6 / Spring Boot 3
logging.level.org.hibernate.orm.jdbc.bind=TRACE
# ===============================
# Spring JDBC / JdbcTemplate Logging
# ===============================
# Log queries executed by JdbcTemplate
logging.level.org.springframework.jdbc.core.JdbcTemplate=DEBUG
# Log values bound as placeholders in JdbcTemplate queries
logging.level.org.springframework.jdbc.core.StatementCreatorUtils=TRACE
# Production context path # Production context path
server.servlet.context-path=/gcc_manpower server.servlet.context-path=/gcc_manpower

14
src/main/resources/application-prod.properties

@ -31,11 +31,19 @@ spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
# =============================== # ===============================
spring.jpa.hibernate.ddl-auto=update spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=true spring.jpa.show-sql=true
# spring.jpa.properties.hibernate.format_sql=true
spring.jpa.properties.hibernate.format_sql=true
spring.jpa.open-in-view=true spring.jpa.open-in-view=true
logging.level.org.hibernate.SQL=DEBUG logging.level.org.hibernate.SQL=DEBUG
# logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE
logging.level.org.hibernate.type.descriptor.sql=TRACE
# Log bind parameters in Hibernate 6 / Spring Boot 3
logging.level.org.hibernate.orm.jdbc.bind=TRACE
# ===============================
# Spring JDBC / JdbcTemplate Logging
# ===============================
# Log queries executed by JdbcTemplate
logging.level.org.springframework.jdbc.core.JdbcTemplate=DEBUG
# Log values bound as placeholders in JdbcTemplate queries
logging.level.org.springframework.jdbc.core.StatementCreatorUtils=TRACE
# Production context path # Production context path
server.servlet.context-path=/gcc_manpower server.servlet.context-path=/gcc_manpower

2093
src/main/resources/templates/gccadjustmentmanagement/dashboard.html
File diff suppressed because it is too large
View File

4
src/main/resources/templates/gccservicepaymenttracker/dashboard.html

@ -1087,7 +1087,7 @@
<div class="card-header bg-white py-3 border-0"> <div class="card-header bg-white py-3 border-0">
<h4 class="card-title mb-0 fw-bold" <h4 class="card-title mb-0 fw-bold"
style="font-family: 'Outfit', sans-serif; color: #09303d; font-size: 1.15rem;"> style="font-family: 'Outfit', sans-serif; color: #09303d; font-size: 1.15rem;">
<i class="fa-solid fa-chart-line me-2 text-primary"></i>Total No of Pedning Bills days wise
<i class="fa-solid fa-chart-line me-2 text-primary"></i>Total No of Pending Bills days wise
count count
</h4> </h4>
</div> </div>
@ -4530,7 +4530,7 @@
const pad = n => String(n).padStart(2, '0'); const pad = n => String(n).padStart(2, '0');
dateDisplay = `${pad(d.getDate())}/${pad(d.getMonth() + 1)}/${d.getFullYear()}`; dateDisplay = `${pad(d.getDate())}/${pad(d.getMonth() + 1)}/${d.getFullYear()}`;
} }
} catch (e) {}
} catch (e) { }
openModalForCount('latest_updates', latestDate, `Latest Updates (${dateDisplay})`); openModalForCount('latest_updates', latestDate, `Latest Updates (${dateDisplay})`);
} }

Loading…
Cancel
Save