forked from mosip/resident-services
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of https://github.com/kameshsr/resident-services…
… into MOSIP-21674 � Conflicts: � resident/resident-service/src/main/java/io/mosip/resident/constant/ApiName.java
- Loading branch information
Showing
63 changed files
with
1,547 additions
and
544 deletions.
There are no files selected for viewing
50 changes: 50 additions & 0 deletions
50
db_release_scripts/mosip_resident/ddl/resident_grievance_ticket.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
-- ------------------------------------------------------------------------------------------------- | ||
-- Database Name: resident_grievance_ticket | ||
-- Release Version : 1.2.1 | ||
-- Purpose : Database scripts for Resident Service DB. | ||
-- Create By : Kamesh Shekhar Prasad | ||
-- Created Date : December-2022 | ||
-- | ||
-- Modified Date Modified By Comments / Remarks | ||
-- -------------------------------------------------------------------------------------------------- | ||
-- | ||
----------------------------------------------------------------------------------------------------- | ||
|
||
-- This Table is used to save the resident_grievance_ticket table values. | ||
CREATE TABLE resident.resident_grievance_ticket( | ||
id VARCHAR(64) NOT NULL, | ||
eventId VARCHAR(64) NOT NULL, | ||
name VARCHAR(256) NOT NULL, | ||
emailId VARCHAR(128), | ||
alternateEmailId VARCHAR(128), | ||
phoneNo VARCHAR(64), | ||
alternatePhoneNo VARCHAR(64), | ||
message character varying(1024) NOT NULL, | ||
hasAttachment boolean NOT NULL DEFAULT false, | ||
status character varying(64) NOT NULL, | ||
cr_by character varying(256) NOT NULL, | ||
cr_dtimes timestamp NOT NULL, | ||
upd_by character varying(256), | ||
upd_dtimes timestamp, | ||
is_deleted boolean NOT NULL DEFAULT false, | ||
del_dtimes timestamp, | ||
CONSTRAINT pk_resgrev_id PRIMARY KEY (id) | ||
); | ||
|
||
COMMENT ON TABLE resident.resident_grievance_ticket IS 'This Table is used to save the resident_grievance_ticket table values.'; | ||
COMMENT ON COLUMN resident.resident_grievance_ticket.id IS 'Unique Id.'; | ||
COMMENT ON COLUMN resident.resident_grievance_ticket.event_id IS 'Unique event id.'; | ||
COMMENT ON COLUMN resident.resident_grievance_ticket.emailId IS 'Unique email id.'; | ||
COMMENT ON COLUMN resident.resident_grievance_ticket.alternateEmailId IS 'Alternate email id.'; | ||
COMMENT ON COLUMN resident.resident_grievance_ticket.phoneNo IS 'Phone number.'; | ||
COMMENT ON COLUMN resident.resident_grievance_ticket.altrenatePhoneNo IS 'Alternate Phone number.'; | ||
COMMENT ON COLUMN resident.resident_grievance_ticket.message IS 'Message.'; | ||
COMMENT ON COLUMN resident.resident_grievance_ticket.status IS 'status.'; | ||
COMMENT ON COLUMN resident.resident_grievance_ticket.cr_by IS 'created by.'; | ||
COMMENT ON COLUMN resident.resident_grievance_ticket.cr_dtimes IS 'created date and time.'; | ||
COMMENT ON COLUMN resident.resident_grievance_ticket.upd_by IS 'updated by.'; | ||
COMMENT ON COLUMN resident.resident_grievance_ticket.upd_dtimes IS 'updated date and time.'; | ||
COMMENT ON COLUMN resident.resident_grievance_ticket.is_deleted IS 'is deleted.'; | ||
COMMENT ON COLUMN resident.resident_grievance_ticket.del_dtimes IS 'Deleted time-stamp.'; | ||
|
||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
50 changes: 50 additions & 0 deletions
50
db_scripts/mosip_resident/ddl/resident_grievance_ticket.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
-- ------------------------------------------------------------------------------------------------- | ||
-- Database Name: resident_grievance_ticket | ||
-- Release Version : 1.2.1 | ||
-- Purpose : Database scripts for Resident Service DB. | ||
-- Create By : Kamesh Shekhar Prasad | ||
-- Created Date : December-2022 | ||
-- | ||
-- Modified Date Modified By Comments / Remarks | ||
-- -------------------------------------------------------------------------------------------------- | ||
-- | ||
----------------------------------------------------------------------------------------------------- | ||
|
||
-- This Table is used to save the resident_grievance_ticket table values. | ||
CREATE TABLE resident.resident_grievance_ticket( | ||
id VARCHAR(64) NOT NULL, | ||
eventId VARCHAR(64) NOT NULL, | ||
name VARCHAR(256) NOT NULL, | ||
emailId VARCHAR(128), | ||
alternateEmailId VARCHAR(128), | ||
phoneNo VARCHAR(64), | ||
alternatePhoneNo VARCHAR(64), | ||
message character varying(1024) NOT NULL, | ||
hasAttachment boolean NOT NULL DEFAULT false, | ||
status character varying(64) NOT NULL, | ||
cr_by character varying(256) NOT NULL, | ||
cr_dtimes timestamp NOT NULL, | ||
upd_by character varying(256), | ||
upd_dtimes timestamp, | ||
is_deleted boolean NOT NULL DEFAULT false, | ||
del_dtimes timestamp, | ||
CONSTRAINT pk_resgrev_id PRIMARY KEY (id) | ||
); | ||
|
||
COMMENT ON TABLE resident.resident_grievance_ticket IS 'This Table is used to save the resident_grievance_ticket table values.'; | ||
COMMENT ON COLUMN resident.resident_grievance_ticket.id IS 'Unique Id.'; | ||
COMMENT ON COLUMN resident.resident_grievance_ticket.event_id IS 'Unique event id.'; | ||
COMMENT ON COLUMN resident.resident_grievance_ticket.emailId IS 'Unique email id.'; | ||
COMMENT ON COLUMN resident.resident_grievance_ticket.alternateEmailId IS 'Alternate email id.'; | ||
COMMENT ON COLUMN resident.resident_grievance_ticket.phoneNo IS 'Phone number.'; | ||
COMMENT ON COLUMN resident.resident_grievance_ticket.altrenatePhoneNo IS 'Alternate Phone number.'; | ||
COMMENT ON COLUMN resident.resident_grievance_ticket.message IS 'Message.'; | ||
COMMENT ON COLUMN resident.resident_grievance_ticket.status IS 'status.'; | ||
COMMENT ON COLUMN resident.resident_grievance_ticket.cr_by IS 'created by.'; | ||
COMMENT ON COLUMN resident.resident_grievance_ticket.cr_dtimes IS 'created date and time.'; | ||
COMMENT ON COLUMN resident.resident_grievance_ticket.upd_by IS 'updated by.'; | ||
COMMENT ON COLUMN resident.resident_grievance_ticket.upd_dtimes IS 'updated date and time.'; | ||
COMMENT ON COLUMN resident.resident_grievance_ticket.is_deleted IS 'is deleted.'; | ||
COMMENT ON COLUMN resident.resident_grievance_ticket.del_dtimes IS 'Deleted time-stamp.'; | ||
|
||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 3 additions & 4 deletions
7
resident/resident-service/src/main/java/io/mosip/resident/constant/RequestType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
...dent/resident-service/src/main/java/io/mosip/resident/controller/GrievanceController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
package io.mosip.resident.controller; | ||
|
||
import io.mosip.kernel.core.http.ResponseWrapper; | ||
import io.mosip.kernel.core.logger.spi.Logger; | ||
import io.mosip.resident.config.LoggerConfiguration; | ||
import io.mosip.resident.dto.GrievanceRequestDTO; | ||
import io.mosip.resident.dto.MainRequestDTO; | ||
import io.mosip.resident.exception.ApisResourceAccessException; | ||
import io.mosip.resident.exception.ResidentServiceCheckedException; | ||
import io.mosip.resident.service.GrievanceService; | ||
import io.mosip.resident.util.AuditUtil; | ||
import io.mosip.resident.util.EventEnum; | ||
import io.mosip.resident.validator.RequestValidator; | ||
import io.swagger.v3.oas.annotations.tags.Tag; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.validation.annotation.Validated; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.RequestBody; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
import java.io.IOException; | ||
|
||
/** | ||
* @author Kamesh Shekhar Prasad | ||
* This class is used to generate ticket of grievance. | ||
*/ | ||
|
||
@RestController | ||
@Tag(name = "GrievanceController", description = "Grievance-Controller") | ||
public class GrievanceController { | ||
|
||
@Autowired | ||
AuditUtil auditUtil; | ||
|
||
@Autowired | ||
RequestValidator requestValidator; | ||
|
||
@Autowired | ||
GrievanceService grievanceService; | ||
|
||
private static final Logger logger = LoggerConfiguration.logConfig(GrievanceController.class); | ||
|
||
@PostMapping("/grievance/ticket") | ||
public ResponseWrapper<Object> grievanceTicket(@Validated @RequestBody MainRequestDTO<GrievanceRequestDTO> | ||
grievanceRequestDTOMainRequestDTO) throws ResidentServiceCheckedException, | ||
ApisResourceAccessException, IOException { | ||
logger.debug("DownloadCardController::grievanceTicket()::entry"); | ||
auditUtil.setAuditRequestDto(EventEnum.GRIEVANCE_TICKET_REQUEST); | ||
requestValidator.validateGrievanceRequestDto(grievanceRequestDTOMainRequestDTO); | ||
return grievanceService.getGrievanceTicket(grievanceRequestDTOMainRequestDTO); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.