package com.bankaudit.rest.process.dao;

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

import com.bankaudit.dao.Dao;
import com.bankaudit.dto.process.AuditRatingScoreDto;
import com.bankaudit.model.MaintRatingEscalationMatrix;
import com.bankaudit.process.model.AuditRatingCompositeCategoryScore;
import com.bankaudit.process.model.AuditRatingCompositeOverlay;
import com.bankaudit.process.model.AuditRatingCompositeScore;

public interface AuditRatingCompositeDao extends Dao {
	
	boolean verifyDataPresentForCompositeScore(int legalEntityCode,String auditId);
	
	boolean verifyCSVUpload(int legalEntityCode,String auditId);
	
	boolean createAndGetAuditRatingCompositeScore(int legalEntityCode,String auditId, String auditTypeCode, String unitId, String userId);
	
	boolean createAuditRatingCompositeCategoryScore(int legalEntityCode,String auditId,  String auditTypeCode, String unitId, String userId);
	
	boolean createAuditRatingCompositeOverlay(int legalEntityCode,String auditId,  String auditTypeCode, String userId);
	
	void updateExceptionAuditRatingCompositeScores(int legalEntityCode, String auditId, String auditTypeCode, String userType); 
    
	//AuditRatingCompositeScoreDto getAuditRatingCompositeScoreGroupedOnCategoryByAuditId(int legalEntityCode,String auditId, String auditTypeCode, String userType);
	
	List<AuditRatingCompositeScore> getAuditRatingCompositeScoreByAuditId(int legalEntityCode,String auditId, String auditTypeCode, String userType);
	
	List<AuditRatingCompositeScore> getAuditRatingCompositeScoreOnlyByAuditId(int legalEntityCode,String auditId, String auditTypeCode, String userType);
	
	List<AuditRatingCompositeCategoryScore> getAuditRatingCompositeCategoryScoreByAuditId(int legalEntityCode,String auditId, String auditTypeCode, String userType);
	
	List<AuditRatingCompositeOverlay> getAuditRatingCompositeOverlayByAuditId(int legalEntityCode,String auditId, String auditTypeCode, String userType);
	
	boolean isRatingCompositeOverlayApplied(Integer legalEntityCode, String auditId );
	
	void executeAndUpdateAuditCompositeScoresFromIRCSV(int legalEntityCode, String auditId, String userType);
	
	void executeAndUpdateAuditCompositeOverlayFromIRCSV(int legalEntityCode, String auditId, String userType);
	
	void fetchAndUpdateAuditCompositeScoresFromSupervisoryRating(int legalEntityCode, String auditId, String userType);
	
	void updateAuditRatingCompositeScores(List<AuditRatingCompositeScore> auditRatingCompositeScores, int legalEntityCode, String auditId, String userType); // When updating from Screen
	
	void updateAuditRatingCompositeCategoryScores(List<AuditRatingCompositeCategoryScore> auditRatingCompositeCategoryScores, int legalEntityCode, String auditId, String userType);
	
	void updateAuditRatingCompositeOverlay(List<AuditRatingCompositeOverlay> auditRatingCompositeOverlay, int legalEntityCode, String auditId, String userId, String userType);
	
	Map<String, String> getParamScoreMapByAuditId(int legalEntityCode,String auditId, String auditTypeCode, String userType);
	
	MaintRatingEscalationMatrix getRatingEscalationMatrixByAuditId(int legalEntityCode,String auditId, String auditTypeCode, String categoryValue);
	
	void updateAuditRatingScores(AuditRatingScoreDto auditRatingScoreDto, int legalEntityCode, String auditId, String userId, String userType);
	
	/*AuditRatingComplianceScoreDto getAuditRatingComplianceScores(int legalEntityCode, String auditId, String ratingType, String userType);
	
	String getRatingFromScore(Integer legalEntityCode, String auditId, String ratingName, String ratingSubType, String ratingScr );
	
	List<AuditRatingComplianceObsScore> getComplianceObsScoreReportByAuditId(int legalEntityCode,String auditId, String userType, String compRatingStatus);	
	*/
	//AuditRatingComplianceObsScoreReportDto getComplianceObsScoreReportByAuditIdAndRatingType(int legalEntityCode,String auditId, String ratingType, String userType, String compRatingStatus, String recordsNA);
}
