From e1dfa1c52fc20c0374c42da193548912b0f4a91e Mon Sep 17 00:00:00 2001 From: AJITHKUMAR12 <48044092+AJITHKUMAR12@users.noreply.github.com> Date: Sat, 16 May 2026 16:07:47 +0530 Subject: [PATCH] added master enable concept on child survey --- .../Controller/ChildrenSurveyController.java | 324 ++++++ .../Controller/MainController.java | 71 ++ .../Service/ChildrenSurveyService.java | 1036 +++++++++++++++++ .../modules/childrensurvey/castemaster.html | 531 +++++++++ .../modules/childrensurvey/childlist.html | 129 ++ .../documentcorrectionmaster.html | 531 +++++++++ .../childrensurvey/documentreasonmaster.html | 531 +++++++++ .../childrensurvey/dropoutreasonmaster.html | 531 +++++++++ .../childrensurvey/educationmaster.html | 531 +++++++++ .../modules/childrensurvey/gendermaster.html | 531 +++++++++ .../modules/childrensurvey/incomemaster.html | 531 +++++++++ .../childrensurvey/interestfieldmaster.html | 531 +++++++++ .../modules/childrensurvey/livingmaster.html | 531 +++++++++ .../childrensurvey/locationmaster.html | 531 +++++++++ .../modules/childrensurvey/ownermaster.html | 531 +++++++++ .../childrensurvey/religionmaster.html | 531 +++++++++ .../childrensurvey/surveyorsreports.html | 15 + .../childrensurvey/vulnerabilitymaster.html | 531 +++++++++ .../childrensurvey/whereaboutmaster.html | 531 +++++++++ 19 files changed, 9009 insertions(+) create mode 100644 gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/castemaster.html create mode 100644 gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/documentcorrectionmaster.html create mode 100644 gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/documentreasonmaster.html create mode 100644 gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/dropoutreasonmaster.html create mode 100644 gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/educationmaster.html create mode 100644 gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/gendermaster.html create mode 100644 gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/incomemaster.html create mode 100644 gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/interestfieldmaster.html create mode 100644 gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/livingmaster.html create mode 100644 gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/locationmaster.html create mode 100644 gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/ownermaster.html create mode 100644 gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/religionmaster.html create mode 100644 gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/vulnerabilitymaster.html create mode 100644 gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/whereaboutmaster.html diff --git a/gcc_officer_portal/src/main/java/in/gov/chennaicorporation/gccoffice/childrensurvey/Controller/ChildrenSurveyController.java b/gcc_officer_portal/src/main/java/in/gov/chennaicorporation/gccoffice/childrensurvey/Controller/ChildrenSurveyController.java index e9935372..3e77993e 100644 --- a/gcc_officer_portal/src/main/java/in/gov/chennaicorporation/gccoffice/childrensurvey/Controller/ChildrenSurveyController.java +++ b/gcc_officer_portal/src/main/java/in/gov/chennaicorporation/gccoffice/childrensurvey/Controller/ChildrenSurveyController.java @@ -6,6 +6,8 @@ import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.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.ResponseBody; @@ -86,4 +88,326 @@ public class ChildrenSurveyController { return service.getDashboardData(); } + @GetMapping("/educationmasterlist") + public List> list() { + + return service.getEducationList(); + } + + @PostMapping("/save") + public String save( + @RequestBody Map req) { + + service.saveEducation(req); + + return "SUCCESS"; + } + + @PostMapping("/status") + public String updateStatus( + @RequestBody Map req) { + + service.updateStatus(req); + + return "SUCCESS"; + } + + @GetMapping("/locationmasterlist") + public List> getLocationList() { + return service.getLocationList(); + } + + @PostMapping("/locationsave") + public String saveLocation( + @RequestBody Map req) { + + service.saveLocation(req); + + return "SUCCESS"; + } + + @PostMapping("/location-status") + public String updateLocationStatus( + @RequestBody Map req) { + + service.updateLocationStatus(req); + + return "SUCCESS"; + } + + @GetMapping("/gendermasterlist") + public List> getGenderList() { + return service.getGenderList(); + } + + @PostMapping("/gendersave") + public String saveGender( + @RequestBody Map req) { + + service.saveGender(req); + + return "SUCCESS"; + } + + @PostMapping("/gender-status") + public String updateGenderStatus( + @RequestBody Map req) { + + service.updateGenderStatus(req); + + return "SUCCESS"; + } + + @GetMapping("/castemasterlist") + public List> getCasteList() { + return service.getCasteList(); + } + + @PostMapping("/savecaste") + public String saveCaste( + @RequestBody Map req) { + + service.saveCaste(req); + + return "SUCCESS"; + } + + @PostMapping("/caste-status") + public String updateCasteStatus( + @RequestBody Map req) { + + service.updateCasteStatus(req); + + return "SUCCESS"; + } + + @GetMapping("/livingmasterlist") + public List> getLivingList() { + return service.getLivingList(); + } + + @PostMapping("/livingsave") + public String saveLiving( + @RequestBody Map req) { + + service.saveLiving(req); + + return "SUCCESS"; + } + + @PostMapping("/living-status") + public String updateLivingStatus( + @RequestBody Map req) { + + service.updateLivingStatus(req); + + return "SUCCESS"; + } + + @GetMapping("/documentcreationmasterlist") + public List> getDocumentCreationList() { + return service.getDocumentCreationList(); + } + + @PostMapping("/documentcreationsave") + public String saveDocumentCreation( + @RequestBody Map req) { + + service.saveDocumentCreation(req); + + return "SUCCESS"; + } + + @PostMapping("/documentcreationstatus") + public String updateDocumentCreationStatus( + @RequestBody Map req) { + + service.updateDocumentCreationStatus(req); + + return "SUCCESS"; + } + + @GetMapping("/dropoutreasonmasterlist") + public List> getDropoutReasonList() { + return service.getDropoutReasonList(); + } + + @PostMapping("/dropoutreasonsave") + public String saveDropoutReason( + @RequestBody Map req) { + + service.saveDropoutReason(req); + + return "SUCCESS"; + } + + @PostMapping("/dropoutreasonstatus") + public String updateDropoutReasonStatus( + @RequestBody Map req) { + + service.updateDropoutReasonStatus(req); + + return "SUCCESS"; + } + + @GetMapping("/incomemasterlist") + public List> getIncomeList() { + return service.getIncomeList(); + } + + @PostMapping("/incomesave") + public String saveIncome( + @RequestBody Map req) { + + service.saveIncome(req); + + return "SUCCESS"; + } + + @PostMapping("/incomemasterstatus") + public String updateIncomeStatus( + @RequestBody Map req) { + + service.updateIncomeStatus(req); + + return "SUCCESS"; + } + + @GetMapping("/interestfieldmasterlist") + public List> getInterestFieldList() { + return service.getInterestFieldList(); + } + + @PostMapping("/interestfieldsave") + public String saveInterestField( + @RequestBody Map req) { + + service.saveInterestField(req); + + return "SUCCESS"; + } + + @PostMapping("/interestfieldmaster-status") + public String updateInterestFieldStatus( + @RequestBody Map req) { + + service.updateInterestFieldStatus(req); + + return "SUCCESS"; + } + + @GetMapping("/ownermasterlist") + public List> getOwnerList() { + return service.getOwnerList(); + } + + @PostMapping("/ownermastersave") + public String saveOwner( + @RequestBody Map req) { + + service.saveOwner(req); + + return "SUCCESS"; + } + + @PostMapping("/ownermasterstatus") + public String updateOwnerStatus( + @RequestBody Map req) { + + service.updateOwnerStatus(req); + + return "SUCCESS"; + } + + @GetMapping("/religionmasterlist") + public List> getReligionList() { + return service.getReligionList(); + } + + @PostMapping("/religionsave") + public String saveReligion( + @RequestBody Map req) { + + service.saveReligion(req); + + return "SUCCESS"; + } + + @PostMapping("/religion-status") + public String updateReligionStatus( + @RequestBody Map req) { + + service.updateReligionStatus(req); + + return "SUCCESS"; + } + + @GetMapping("/vulnerabilitymasterlist") + public List> getVulnerabilityList() { + return service.getVulnerabilityList(); + } + + @PostMapping("/vulnerabilitysave") + public String saveVulnerability( + @RequestBody Map req) { + + service.saveVulnerability(req); + + return "SUCCESS"; + } + + @PostMapping("/vulnerabilitymasterstatus") + public String updateVulnerabilityStatus( + @RequestBody Map req) { + + service.updateVulnerabilityStatus(req); + + return "SUCCESS"; + } + + @GetMapping("/whereaboutmasterlist") + public List> getWhereaboutList() { + return service.getWhereaboutList(); + } + + @PostMapping("/whereaboutsave") + public String saveWhereabout( + @RequestBody Map req) { + + service.saveWhereabout(req); + + return "SUCCESS"; + } + + @PostMapping("/whereaboutstatus") + public String updateWhereaboutStatus( + @RequestBody Map req) { + + service.updateWhereaboutStatus(req); + + return "SUCCESS"; + } + + @GetMapping("/documentreasonmasterlist") + public List> getDocumentReasonList() { + return service.getDocumentReasonList(); + } + + @PostMapping("/documentreasonmaster") + public String saveDocumentReason( + @RequestBody Map req) { + + service.saveDocumentReason(req); + + return "SUCCESS"; + } + + @PostMapping("/documentreasonmasterstatus") + public String updateDocumentReasonStatus( + @RequestBody Map req) { + + service.updateDocumentReasonStatus(req); + + return "SUCCESS"; + } } diff --git a/gcc_officer_portal/src/main/java/in/gov/chennaicorporation/gccoffice/childrensurvey/Controller/MainController.java b/gcc_officer_portal/src/main/java/in/gov/chennaicorporation/gccoffice/childrensurvey/Controller/MainController.java index f0d13fd0..bd523852 100644 --- a/gcc_officer_portal/src/main/java/in/gov/chennaicorporation/gccoffice/childrensurvey/Controller/MainController.java +++ b/gcc_officer_portal/src/main/java/in/gov/chennaicorporation/gccoffice/childrensurvey/Controller/MainController.java @@ -23,4 +23,75 @@ public class MainController { return "modules/childrensurvey/surveyorsreports"; } + @GetMapping("/mastersubmenu/educationmaster") + public String educationmaster() { + return "modules/childrensurvey/educationmaster"; + } + + @GetMapping("/mastersubmenu/locationmaster") + public String locationmaster() { + return "modules/childrensurvey/locationmaster"; + } + + @GetMapping("/mastersubmenu/gendermaster") + public String gendermaster() { + return "modules/childrensurvey/gendermaster"; + } + + @GetMapping("/mastersubmenu/castemaster") + public String castemaster() { + return "modules/childrensurvey/castemaster"; + } + + @GetMapping("/mastersubmenu/livingmaster") + public String livingmaster() { + return "modules/childrensurvey/livingmaster"; + } + + // documentation + @GetMapping("/mastersubmenu/documentcorrectionmaster") + public String documentcorrectionmaster() { + return "modules/childrensurvey/documentcorrectionmaster"; + } + + @GetMapping("/mastersubmenu/dropoutreasonmaster") + public String dropoutreasonmaster() { + return "modules/childrensurvey/dropoutreasonmaster"; + } + + @GetMapping("/mastersubmenu/incomemaster") + public String incomemaster() { + return "modules/childrensurvey/incomemaster"; + } + + @GetMapping("/mastersubmenu/religionmaster") + public String religionmaster() { + return "modules/childrensurvey/religionmaster"; + } + + @GetMapping("/mastersubmenu/interestfieldmaster") + public String interestfieldmaster() { + return "modules/childrensurvey/interestfieldmaster"; + } + + @GetMapping("/mastersubmenu/ownershipmaster") + public String ownermaster() { + return "modules/childrensurvey/ownermaster"; + } + + @GetMapping("/mastersubmenu/vulnerabilitymaster") + public String vulnerabilitymaster() { + return "modules/childrensurvey/vulnerabilitymaster"; + } + + @GetMapping("/mastersubmenu/whereaboutmaster") + public String whereaboutmaster() { + return "modules/childrensurvey/whereaboutmaster"; + } + + @GetMapping("/mastersubmenu/documentreasonmaster") + public String documentreasonmaster() { + return "modules/childrensurvey/documentreasonmaster"; + } + } diff --git a/gcc_officer_portal/src/main/java/in/gov/chennaicorporation/gccoffice/childrensurvey/Service/ChildrenSurveyService.java b/gcc_officer_portal/src/main/java/in/gov/chennaicorporation/gccoffice/childrensurvey/Service/ChildrenSurveyService.java index f77189c5..ced26691 100644 --- a/gcc_officer_portal/src/main/java/in/gov/chennaicorporation/gccoffice/childrensurvey/Service/ChildrenSurveyService.java +++ b/gcc_officer_portal/src/main/java/in/gov/chennaicorporation/gccoffice/childrensurvey/Service/ChildrenSurveyService.java @@ -831,6 +831,19 @@ public class ChildrenSurveyService { "femaleCount", jdbcTemplate.queryForObject(femaleSql, Integer.class)); + // OTHERS + + String othersSql = """ + SELECT COUNT(DISTINCT survey_id) + FROM child_survey_response + WHERE qid = 7 + AND answer = 3 + """; + + response.put( + "othersCount", + jdbcTemplate.queryForObject(othersSql, Integer.class)); + // CURRENTLY STUDYING /* @@ -1110,4 +1123,1027 @@ public class ChildrenSurveyService { return response; } + + public List> getEducationList() { + + String sql = """ + SELECT + id, + english_name, + isactive, + isdelete + FROM education_master + ORDER BY orderby + """; + + return jdbcTemplate.queryForList(sql); + } + + public void saveEducation(Map req) { + + Integer nextOrder = jdbcTemplate.queryForObject( + """ + SELECT IFNULL(MAX(orderby),0) + 1 + FROM education_master + """, + Integer.class); + + String sql = """ + INSERT INTO education_master + ( + english_name, + orderby, + cdate, + isactive, + isdelete + ) + VALUES + ( + ?, + ?, + NOW(), + 1, + 0 + ) + """; + + jdbcTemplate.update( + sql, + req.get("english_name"), + nextOrder); + } + + public void updateStatus( + Map req) { + + Integer id = Integer.parseInt( + req.get("id").toString()); + + Integer status = Integer.parseInt( + req.get("status").toString()); + + String sql = """ + UPDATE education_master + SET + isactive = ?, + isdelete = ? + WHERE id = ? + """; + + jdbcTemplate.update( + sql, + status, + status == 1 ? 0 : 1, + id); + } + + public List> getLocationList() { + + String sql = """ + SELECT + id, + english_name, + isactive, + isdelete + FROM location_master + ORDER BY orderby + """; + + return jdbcTemplate.queryForList(sql); + } + + public void saveLocation(Map req) { + + Integer nextOrder = jdbcTemplate.queryForObject( + """ + SELECT IFNULL(MAX(orderby),0) + 1 + FROM location_master + """, + Integer.class); + + String sql = """ + INSERT INTO location_master + ( + english_name, + orderby, + cdate, + isactive, + isdelete + ) + VALUES + ( + ?, + ?, + NOW(), + 1, + 0 + ) + """; + + jdbcTemplate.update( + sql, + req.get("english_name"), + nextOrder); + } + + public void updateLocationStatus( + Map req) { + + Integer id = Integer.parseInt( + req.get("id").toString()); + + Integer status = Integer.parseInt( + req.get("status").toString()); + + String sql = """ + UPDATE location_master + SET + isactive = ?, + isdelete = ? + WHERE id = ? + """; + + jdbcTemplate.update( + sql, + status, + status == 1 ? 0 : 1, + id); + } + + public List> getGenderList() { + + String sql = """ + SELECT + id, + english_name, + isactive, + isdelete + FROM gender_master + ORDER BY orderby + """; + + return jdbcTemplate.queryForList(sql); + } + + public void saveGender(Map req) { + + Integer nextOrder = jdbcTemplate.queryForObject( + """ + SELECT IFNULL(MAX(orderby),0) + 1 + FROM gender_master + """, + Integer.class); + + String sql = """ + INSERT INTO gender_master + ( + english_name, + orderby, + cdate, + isactive, + isdelete + ) + VALUES + ( + ?, + ?, + NOW(), + 1, + 0 + ) + """; + + jdbcTemplate.update( + sql, + req.get("english_name"), + nextOrder); + } + + public void updateGenderStatus( + Map req) { + + Integer id = Integer.parseInt( + req.get("id").toString()); + + Integer status = Integer.parseInt( + req.get("status").toString()); + + String sql = """ + UPDATE gender_master + SET + isactive = ?, + isdelete = ? + WHERE id = ? + """; + + jdbcTemplate.update( + sql, + status, + status == 1 ? 0 : 1, + id); + } + + public List> getCasteList() { + + String sql = """ + SELECT + id, + english_name, + isactive, + isdelete + FROM caste_master + ORDER BY orderby + """; + + return jdbcTemplate.queryForList(sql); + } + + public void saveCaste(Map req) { + + Integer nextOrder = jdbcTemplate.queryForObject( + """ + SELECT IFNULL(MAX(orderby),0) + 1 + FROM caste_master + """, + Integer.class); + + String sql = """ + INSERT INTO caste_master + ( + english_name, + orderby, + cdate, + isactive, + isdelete + ) + VALUES + ( + ?, + ?, + NOW(), + 1, + 0 + ) + """; + + jdbcTemplate.update( + sql, + req.get("english_name"), + nextOrder); + } + + public void updateCasteStatus( + Map req) { + + Integer id = Integer.parseInt( + req.get("id").toString()); + + Integer status = Integer.parseInt( + req.get("status").toString()); + + String sql = """ + UPDATE caste_master + SET + isactive = ?, + isdelete = ? + WHERE id = ? + """; + + jdbcTemplate.update( + sql, + status, + status == 1 ? 0 : 1, + id); + } + + public List> getLivingList() { + + String sql = """ + SELECT + id, + english_name, + isactive, + isdelete + FROM child_living_master + ORDER BY orderby + """; + + return jdbcTemplate.queryForList(sql); + } + + public void saveLiving(Map req) { + + Integer nextOrder = jdbcTemplate.queryForObject( + """ + SELECT IFNULL(MAX(orderby),0) + 1 + FROM child_living_master + """, + Integer.class); + + String sql = """ + INSERT INTO child_living_master + ( + english_name, + orderby, + cdate, + isactive, + isdelete + ) + VALUES + ( + ?, + ?, + NOW(), + 1, + 0 + ) + """; + + jdbcTemplate.update( + sql, + req.get("english_name"), + nextOrder); + } + + public void updateLivingStatus( + Map req) { + + Integer id = Integer.parseInt( + req.get("id").toString()); + + Integer status = Integer.parseInt( + req.get("status").toString()); + + String sql = """ + UPDATE child_living_master + SET + isactive = ?, + isdelete = ? + WHERE id = ? + """; + + jdbcTemplate.update( + sql, + status, + status == 1 ? 0 : 1, + id); + } + + public List> getDocumentCreationList() { + + String sql = """ + SELECT + id, + english_name, + isactive, + isdelete + FROM document_correction_master + ORDER BY orderby + """; + + return jdbcTemplate.queryForList(sql); + } + + public void saveDocumentCreation(Map req) { + + Integer nextOrder = jdbcTemplate.queryForObject( + """ + SELECT IFNULL(MAX(orderby),0) + 1 + FROM document_correction_master + """, + Integer.class); + + String sql = """ + INSERT INTO document_correction_master + ( + english_name, + orderby, + cdate, + isactive, + isdelete + ) + VALUES + ( + ?, + ?, + NOW(), + 1, + 0 + ) + """; + + jdbcTemplate.update( + sql, + req.get("english_name"), + nextOrder); + } + + public void updateDocumentCreationStatus( + Map req) { + + Integer id = Integer.parseInt( + req.get("id").toString()); + + Integer status = Integer.parseInt( + req.get("status").toString()); + + String sql = """ + UPDATE document_correction_master + SET + isactive = ?, + isdelete = ? + WHERE id = ? + """; + + jdbcTemplate.update( + sql, + status, + status == 1 ? 0 : 1, + id); + } + + public List> getDropoutReasonList() { + + String sql = """ + SELECT + id, + english_name, + isactive, + isdelete + FROM dropout_reason_master + ORDER BY orderby + """; + + return jdbcTemplate.queryForList(sql); + } + + public void saveDropoutReason(Map req) { + + Integer nextOrder = jdbcTemplate.queryForObject( + """ + SELECT IFNULL(MAX(orderby),0) + 1 + FROM dropout_reason_master + """, + Integer.class); + + String sql = """ + INSERT INTO dropout_reason_master + ( + english_name, + orderby, + cdate, + isactive, + isdelete + ) + VALUES + ( + ?, + ?, + NOW(), + 1, + 0 + ) + """; + + jdbcTemplate.update( + sql, + req.get("english_name"), + nextOrder); + } + + public void updateDropoutReasonStatus( + Map req) { + + Integer id = Integer.parseInt( + req.get("id").toString()); + + Integer status = Integer.parseInt( + req.get("status").toString()); + + String sql = """ + UPDATE dropout_reason_master + SET + isactive = ?, + isdelete = ? + WHERE id = ? + """; + + jdbcTemplate.update( + sql, + status, + status == 1 ? 0 : 1, + id); + } + + public List> getIncomeList() { + + String sql = """ + SELECT + id, + english_name, + isactive, + isdelete + FROM income_master + ORDER BY orderby + """; + + return jdbcTemplate.queryForList(sql); + } + + public void saveIncome(Map req) { + + Integer nextOrder = jdbcTemplate.queryForObject( + """ + SELECT IFNULL(MAX(orderby),0) + 1 + FROM income_master + """, + Integer.class); + + String sql = """ + INSERT INTO income_master + ( + english_name, + orderby, + cdate, + isactive, + isdelete + ) + VALUES + ( + ?, + ?, + NOW(), + 1, + 0 + ) + """; + + jdbcTemplate.update( + sql, + req.get("english_name"), + nextOrder); + } + + public void updateIncomeStatus( + Map req) { + + Integer id = Integer.parseInt( + req.get("id").toString()); + + Integer status = Integer.parseInt( + req.get("status").toString()); + + String sql = """ + UPDATE income_master + SET + isactive = ?, + isdelete = ? + WHERE id = ? + """; + + jdbcTemplate.update( + sql, + status, + status == 1 ? 0 : 1, + id); + } + + public List> getInterestFieldList() { + + String sql = """ + SELECT + id, + english_name, + isactive, + isdelete + FROM interest_field_master + ORDER BY orderby + """; + + return jdbcTemplate.queryForList(sql); + } + + public void saveInterestField(Map req) { + + Integer nextOrder = jdbcTemplate.queryForObject( + """ + SELECT IFNULL(MAX(orderby),0) + 1 + FROM interest_field_master + """, + Integer.class); + + String sql = """ + INSERT INTO interest_field_master + ( + english_name, + orderby, + cdate, + isactive, + isdelete + ) + VALUES + ( + ?, + ?, + NOW(), + 1, + 0 + ) + """; + + jdbcTemplate.update( + sql, + req.get("english_name"), + nextOrder); + } + + public void updateInterestFieldStatus( + Map req) { + + Integer id = Integer.parseInt( + req.get("id").toString()); + + Integer status = Integer.parseInt( + req.get("status").toString()); + + String sql = """ + UPDATE interest_field_master + SET + isactive = ?, + isdelete = ? + WHERE id = ? + """; + + jdbcTemplate.update( + sql, + status, + status == 1 ? 0 : 1, + id); + } + + public List> getOwnerList() { + + String sql = """ + SELECT + id, + english_name, + isactive, + isdelete + FROM ownership_master + ORDER BY orderby + """; + + return jdbcTemplate.queryForList(sql); + } + + public void saveOwner(Map req) { + + Integer nextOrder = jdbcTemplate.queryForObject( + """ + SELECT IFNULL(MAX(orderby),0) + 1 + FROM ownership_master + """, + Integer.class); + + String sql = """ + INSERT INTO ownership_master + ( + english_name, + orderby, + cdate, + isactive, + isdelete + ) + VALUES + ( + ?, + ?, + NOW(), + 1, + 0 + ) + """; + + jdbcTemplate.update( + sql, + req.get("english_name"), + nextOrder); + } + + public void updateOwnerStatus( + Map req) { + + Integer id = Integer.parseInt( + req.get("id").toString()); + + Integer status = Integer.parseInt( + req.get("status").toString()); + + String sql = """ + UPDATE ownership_master + SET + isactive = ?, + isdelete = ? + WHERE id = ? + """; + + jdbcTemplate.update( + sql, + status, + status == 1 ? 0 : 1, + id); + } + + public List> getReligionList() { + + String sql = """ + SELECT + id, + english_name, + isactive, + isdelete + FROM religion_master + ORDER BY orderby + """; + + return jdbcTemplate.queryForList(sql); + } + + public void saveReligion(Map req) { + + Integer nextOrder = jdbcTemplate.queryForObject( + """ + SELECT IFNULL(MAX(orderby),0) + 1 + FROM religion_master + """, + Integer.class); + + String sql = """ + INSERT INTO religion_master + ( + english_name, + orderby, + cdate, + isactive, + isdelete + ) + VALUES + ( + ?, + ?, + NOW(), + 1, + 0 + ) + """; + + jdbcTemplate.update( + sql, + req.get("english_name"), + nextOrder); + } + + public void updateReligionStatus( + Map req) { + + Integer id = Integer.parseInt( + req.get("id").toString()); + + Integer status = Integer.parseInt( + req.get("status").toString()); + + String sql = """ + UPDATE religion_master + SET + isactive = ?, + isdelete = ? + WHERE id = ? + """; + + jdbcTemplate.update( + sql, + status, + status == 1 ? 0 : 1, + id); + } + + public List> getVulnerabilityList() { + + String sql = """ + SELECT + id, + english_name, + isactive, + isdelete + FROM vulnerability_master + ORDER BY orderby + """; + + return jdbcTemplate.queryForList(sql); + } + + public void saveVulnerability(Map req) { + + Integer nextOrder = jdbcTemplate.queryForObject( + """ + SELECT IFNULL(MAX(orderby),0) + 1 + FROM vulnerability_master + """, + Integer.class); + + String sql = """ + INSERT INTO vulnerability_master + ( + english_name, + orderby, + cdate, + isactive, + isdelete + ) + VALUES + ( + ?, + ?, + NOW(), + 1, + 0 + ) + """; + + jdbcTemplate.update( + sql, + req.get("english_name"), + nextOrder); + } + + public void updateVulnerabilityStatus( + Map req) { + + Integer id = Integer.parseInt( + req.get("id").toString()); + + Integer status = Integer.parseInt( + req.get("status").toString()); + + String sql = """ + UPDATE vulnerability_master + SET + isactive = ?, + isdelete = ? + WHERE id = ? + """; + + jdbcTemplate.update( + sql, + status, + status == 1 ? 0 : 1, + id); + } + + public List> getWhereaboutList() { + + String sql = """ + SELECT + id, + english_name, + isactive, + isdelete + FROM where_about_master + ORDER BY orderby + """; + + return jdbcTemplate.queryForList(sql); + } + + public void saveWhereabout(Map req) { + + Integer nextOrder = jdbcTemplate.queryForObject( + """ + SELECT IFNULL(MAX(orderby),0) + 1 + FROM where_about_master + """, + Integer.class); + + String sql = """ + INSERT INTO where_about_master + ( + english_name, + orderby, + cdate, + isactive, + isdelete + ) + VALUES + ( + ?, + ?, + NOW(), + 1, + 0 + ) + """; + + jdbcTemplate.update( + sql, + req.get("english_name"), + nextOrder); + } + + public void updateWhereaboutStatus( + Map req) { + + Integer id = Integer.parseInt( + req.get("id").toString()); + + Integer status = Integer.parseInt( + req.get("status").toString()); + + String sql = """ + UPDATE where_about_master + SET + isactive = ?, + isdelete = ? + WHERE id = ? + """; + + jdbcTemplate.update( + sql, + status, + status == 1 ? 0 : 1, + id); + } + + public List> getDocumentReasonList() { + + String sql = """ + SELECT + id, + english_name, + isactive, + isdelete + FROM document_reason_master + ORDER BY orderby + """; + + return jdbcTemplate.queryForList(sql); + } + + public void saveDocumentReason(Map req) { + + Integer nextOrder = jdbcTemplate.queryForObject( + """ + SELECT IFNULL(MAX(orderby),0) + 1 + FROM document_reason_master + """, + Integer.class); + + String sql = """ + INSERT INTO document_reason_master + ( + english_name, + orderby, + cdate, + isactive, + isdelete + ) + VALUES + ( + ?, + ?, + NOW(), + 1, + 0 + ) + """; + + jdbcTemplate.update( + sql, + req.get("english_name"), + nextOrder); + } + + public void updateDocumentReasonStatus( + Map req) { + + Integer id = Integer.parseInt( + req.get("id").toString()); + + Integer status = Integer.parseInt( + req.get("status").toString()); + + String sql = """ + UPDATE document_reason_master + SET + isactive = ?, + isdelete = ? + WHERE id = ? + """; + + jdbcTemplate.update( + sql, + status, + status == 1 ? 0 : 1, + id); + } + } diff --git a/gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/castemaster.html b/gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/castemaster.html new file mode 100644 index 00000000..5e45275b --- /dev/null +++ b/gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/castemaster.html @@ -0,0 +1,531 @@ + + + + + + + + + +
+
+ +
+
+
+
+ + + +
+ +
+ + + + + + + + + + + + + + +
ID Caste NameStatusAction
+ +
+ + + + + + + +
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/childlist.html b/gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/childlist.html index 8c46523e..b2f87500 100644 --- a/gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/childlist.html +++ b/gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/childlist.html @@ -358,6 +358,16 @@
+
+ + + +
@@ -430,6 +440,7 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/documentreasonmaster.html b/gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/documentreasonmaster.html new file mode 100644 index 00000000..27e942fc --- /dev/null +++ b/gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/documentreasonmaster.html @@ -0,0 +1,531 @@ + + + + + + + + + +
+
+ +
+
+
+
+ + + +
+ +
+ +
Date
+ + + + + + + + + + + + +
IDDocument Reason NameStatusAction
+ +
+ + + + + + + +
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/dropoutreasonmaster.html b/gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/dropoutreasonmaster.html new file mode 100644 index 00000000..8ead6461 --- /dev/null +++ b/gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/dropoutreasonmaster.html @@ -0,0 +1,531 @@ + + + + + + + + + +
+
+ +
+
+
+
+ + + +
+ +
+ + + + + + + + + + + + + + +
IDDropout Reason NameStatusAction
+ +
+ + + + + + + +
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/educationmaster.html b/gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/educationmaster.html new file mode 100644 index 00000000..595a59ae --- /dev/null +++ b/gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/educationmaster.html @@ -0,0 +1,531 @@ + + + + + + + + + +
+
+ +
+
+
+
+ + + +
+ +
+ + + + + + + + + + + + + + +
IDEducation NameStatusAction
+ +
+ + + + + + + +
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/gendermaster.html b/gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/gendermaster.html new file mode 100644 index 00000000..77e0afa8 --- /dev/null +++ b/gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/gendermaster.html @@ -0,0 +1,531 @@ + + + + + + + + + +
+
+ +
+
+
+
+ + + +
+ +
+ + + + + + + + + + + + + + +
IDGender NameStatusAction
+ +
+ + + + + + + +
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/incomemaster.html b/gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/incomemaster.html new file mode 100644 index 00000000..4ff6a883 --- /dev/null +++ b/gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/incomemaster.html @@ -0,0 +1,531 @@ + + + + + + + + + +
+
+ +
+
+
+
+ + + +
+ +
+ + + + + + + + + + + + + + +
IDIncome NameStatusAction
+ +
+ + + + + + + +
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/interestfieldmaster.html b/gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/interestfieldmaster.html new file mode 100644 index 00000000..e7d27498 --- /dev/null +++ b/gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/interestfieldmaster.html @@ -0,0 +1,531 @@ + + + + + + + + + +
+
+ +
+
+
+
+ + + +
+ +
+ + + + + + + + + + + + + + +
IDInterest Field NameStatusAction
+ +
+ + + + + + + +
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/livingmaster.html b/gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/livingmaster.html new file mode 100644 index 00000000..61fe1217 --- /dev/null +++ b/gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/livingmaster.html @@ -0,0 +1,531 @@ + + + + + + + + + +
+
+ +
+
+
+
+ + + +
+ +
+ + + + + + + + + + + + + + +
IDLiving Type NameStatusAction
+ +
+ + + + + + + +
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/locationmaster.html b/gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/locationmaster.html new file mode 100644 index 00000000..1da35c78 --- /dev/null +++ b/gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/locationmaster.html @@ -0,0 +1,531 @@ + + + + + + + + + +
+
+ +
+
+
+
+ + + +
+ +
+ + + + + + + + + + + + + + +
IDLocation NameStatusAction
+ +
+ + + + + + + +
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/ownermaster.html b/gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/ownermaster.html new file mode 100644 index 00000000..21fc0e92 --- /dev/null +++ b/gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/ownermaster.html @@ -0,0 +1,531 @@ + + + + + + + + + +
+
+ +
+
+
+
+ + + +
+ +
+ + + + + + + + + + + + + + +
IDOwner NameStatusAction
+ +
+ + + + + + + +
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/religionmaster.html b/gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/religionmaster.html new file mode 100644 index 00000000..cce275fd --- /dev/null +++ b/gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/religionmaster.html @@ -0,0 +1,531 @@ + + + + + + + + + +
+
+ +
+
+
+
+ + + +
+ +
+ + + + + + + + + + + + + + +
IDReligion NameStatusAction
+ +
+ + + + + + + +
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/surveyorsreports.html b/gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/surveyorsreports.html index ab727c18..d0a27d60 100644 --- a/gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/surveyorsreports.html +++ b/gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/surveyorsreports.html @@ -393,6 +393,20 @@
+
+
+
+
+ Gender - Others +
+ +

+ 0 +

+
+
+
+
@@ -718,6 +732,7 @@ $("#maleCount").text(data.maleCount); $("#femaleCount").text(data.femaleCount); + $("#othersCount").text(data.othersCount); //$("#currentlyStudying").text(data.currentlyStudying); $("#currentlyStudying").text( diff --git a/gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/vulnerabilitymaster.html b/gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/vulnerabilitymaster.html new file mode 100644 index 00000000..3cea475a --- /dev/null +++ b/gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/vulnerabilitymaster.html @@ -0,0 +1,531 @@ + + + + + + + + + +
+
+ +
+
+
+
+ + + +
+ +
+ + + + + + + + + + + + + + +
IDVulnerability NameStatusAction
+ +
+ + + + + + + +
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/whereaboutmaster.html b/gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/whereaboutmaster.html new file mode 100644 index 00000000..49d8df20 --- /dev/null +++ b/gcc_officer_portal/src/main/resources/templates/modules/childrensurvey/whereaboutmaster.html @@ -0,0 +1,531 @@ + + + + + + + + + +
+
+ +
+
+
+
+ + + +
+ +
+ + + + + + + + + + + + + + +
IDWhere About NameStatusAction
+ +
+ + + + + + + +
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file