package com.bankaudit.rest.process.dao;

import java.util.List;
import java.util.Map;

import com.bankaudit.dao.Dao;
import com.bankaudit.dto.ChecklistDto;
import com.bankaudit.dto.DataTableResponse;
import com.bankaudit.process.model.AuditLevelDocumentDetails;
import com.bankaudit.process.model.AuditObservation;
import com.bankaudit.process.model.ChecklistOfflineInspectionTmp;
import com.bankaudit.process.model.IfcEnsureBaasDataTmp;

public interface IfcEnsureBaasDataDao extends Dao {

	Integer getMaxReferenceNumber();
	
	String getBaasParameterName(Integer legalEntityCode,  String auditTypeCode, String nabardParameterName);	
	
	String copyDataToTempFromCSV(IfcEnsureBaasDataTmp ifcEnsureBaasDataTmp);
	
	String copyDataToMasterFromTemp(AuditLevelDocumentDetails auditLevelDocumentDetails);		 
	
	void deleteDataFromTmp(AuditLevelDocumentDetails auditLevelDocumentDetails);
	
	List<AuditLevelDocumentDetails> getAuditLevelDocuments(Integer legalEntityCode, String auditTypeCode,
			  String auditId, String planId,  String documentType, String role);
	
	List<String>  checkDuplicateAuditLevelDocuments(Integer legalEntityCode, String auditTypeCode,
			  String auditId, String planId,  String documentType, String documentSubType, String documentFetchType, List<String> filesNamesList);
	
	String deleteDuplicateDocument(Integer legalEntityCode, String auditTypeCode,
			  String auditId, String planId,  String documentType, String documentSubType, String documentFetchType, List<String> filesNamesList );
	
	String deletePdfDocument(Integer legalEntityCode, String auditTypeCode,  String auditId, String planId, String documentType, Integer id);
	 
	String getDocReferencePath(Integer legalEntityCode, String auditTypeCode,  String auditId, String documentType, Integer id);
	 
	Map<String, String[]> getParameterMappingVelues(Integer legalEntityCode, String auditId, String auditTypeCode);
 
	DataTableResponse viewOfflineInspection(Integer id, Integer legalEntityCode, String auditTypeCode,  String auditId, String search,
 			Integer orderColumn, String orderDirection, Integer page, Integer size);
	
	/**************/
	List<AuditLevelDocumentDetails> getAuditLevelCSVDocument(Integer legalEntityCode, String auditTypeCode,
			  String auditId,  String documentType);
	 
	DataTableResponse viewAuditLevelCSVDocument(Integer legalEntityCode, String auditTypeCode,  String auditId, String stageOfFile, Integer referenceNo,
	    		String search, Integer orderColumn, String orderDirection, Integer page, Integer size);	 
	 
	 List<AuditLevelDocumentDetails> getAuditLevelPdfDocument(Integer legalEntityCode, String auditTypeCode,
			  String auditId,  String documentType);
	 
	 /******** Offline Observation New code Start*******/
	 AuditObservation getAuditObservation(ChecklistOfflineInspectionTmp  checklistUploadDto);
	 String  getStandardStatementForReportTable(ChecklistOfflineInspectionTmp  checklistUploadDto, String reportLanguage);
	 void updateReportStandardStmtFormOfflineUpload(Integer legalEntityCode,  String auditId,  String auditTypeCode, String reportLanguage, Integer docId, List<Integer> idsList );
	 void updateReportRemarkFormOfflineUpload(Integer legalEntityCode,  String auditId,  String auditTypeCode, String reportLanguage, Integer docId, List<Integer> idsList, 
			 String statementType, String role);
	 void updateResponseReviewRemarksFormOfflineUpload(Integer legalEntityCode,  String auditId,  String auditTypeCode, 
				Integer docId ,  String role, String maker);
	 void insertResponseReviewRemarksFormOfflineUpload(Integer legalEntityCode, String auditTypeCode,  String auditId, String planId, 
				Integer docId , String role, String maker, List<String> idsResponseReviewRemarks);
	 void updateReportChecklistFormOfflineUpload(Integer legalEntityCode,  String auditId,  String auditTypeCode, String reportLanguage, Integer docId, List<Integer> idsList);
	 void updateAuditObservationFormOfflineUpload(Integer legalEntityCode,  String auditId,  String auditTypeCode, String reportLanguage, Integer docId, String role, String maker, String reviewStatus);
	 void insertIntoChecklistOfflineInspectionFromTempToMaster(Integer legalEntityCode,  String auditId,  String auditTypeCode, String reportLanguage, Integer docId);
	 
	 void updateDeskComplinaceRatingFromOfflineUpload(Integer legalEntityCode,  String auditId,  String auditTypeCode, String reportLanguage, Integer docId, String role, String maker);
	 
	 void updateUploadStatus(Integer legalEntityCode,  String auditId,  String auditTypeCode, String reportLanguage, Integer docId);
	 void deleteChecklistOfflineInspectionTmp(Integer legalEntityCode,  String auditId,  String auditTypeCode, String reportLanguage, Integer docId);
	 //Integer[] getMinMaxReportTableId(Integer legalEntityCode,  String auditId,  String auditTypeCode);	
	 List<Integer> getListofIdsFormReportTable(Integer legalEntityCode,  String auditId,  String auditTypeCode, 
				String applicableFor, String statementType, String complianceCategory);
	 Map<String, AuditObservation> getAllAuditObservation(Integer legalEntityCode, String auditTypeCode, String auditId);
	 Map<String, ChecklistDto>  getAllStandardStmtMap(Integer legalEntityCode, String auditId, String auditTypeCode);
	 List<String> getAllNonComplianceBehavior(Integer legalEntityCode, String auditId, String auditTypeCode, String unitId, List<String> mappingIds);
	 public List<String> getAllResponseReviewRemarks(Integer legalEntityCode, String auditTypeCode, String auditId,   String role);
	 void updateAllNonComplianceBehaviorToTemp(Integer legalEntityCode, String auditId, String auditTypeCode, List<String> persistenceMappingIds, Integer docId);
	 
	 /******** Offline Observation New code End*******/
	 
	 /** Rating CSV upload **/
	 void deleteRatingDataFromTmp(AuditLevelDocumentDetails auditLevelDocumentDetails);
	 String copyRatingDataToMasterFromTemp(AuditLevelDocumentDetails auditLevelDocumentDetails);
	 /** Rating CSV upload, end here **/
	 
	 /******* Audit Rating parameter score********/
	 void updateRatingParameterScoresToMaster(Integer legalEntityCode, String auditTypeCode, String auditId, Integer docId, 
				String rmCode,  String role, String userType);
	 void deleteAuditRatingParameterScoreTmp(Integer legalEntityCode, String auditTypeCode, String auditId, Integer docId );

	 /******* Audit Audit Rating Compliance Score score********/
	 void updateAuditRatingComplianceObsScoreToMaster(Integer legalEntityCode, String auditTypeCode, String auditId, Integer docId, 
			   String role, String ratingComplianceStatus);
	 void deleteAuditRatingComplianceObsScoreTmp(Integer legalEntityCode, String auditTypeCode, String auditId, Integer docId );
	 
	 boolean isAuditBiAnnual(Integer legalEntityCode, String auditId , String auditTypeCode);
	 
	 boolean isScheduledStcb(Integer legalEntityCode, String auditId , String auditTypeCode);
}
