package com.bankaudit.rest.process.dao;

import java.time.LocalDate;
import java.util.List;
import java.util.Map;

import com.bankaudit.dao.Dao;
import com.bankaudit.dto.DataTableResponse;
import com.bankaudit.dto.process.AuditLettersDto;
import com.bankaudit.dto.process.AuditObservationLetterDto;
import com.bankaudit.dto.process.LettersDto;
import com.bankaudit.dto.process.LettersSystemDataDto;
import com.bankaudit.process.model.AuditLetterUserInputsWrk; 

public interface LettersDao extends Dao{
	
	List<LettersDto> getLettersByAuditId(int legalEntityCode, String auditTypeCode,String auditId,String role); 
	
	AuditLettersDto getLetterByAuditIdAndLetterCode(int legalEntityCode, String auditId,String letterCode, String status, String auditTypeCode);
	
	AuditLettersDto getBiLingualLetterByAuditIdAndLetterCode(int legalEntityCode, String auditTypeCode, String auditId,String letterCode, String status);
	
	AuditLetterUserInputsWrk getAuditLetterUserInputsWrk(int legalEntityCode, String auditId,String letterCode, String status);
	
	void deleteAuditLetterInput(Integer legalEntityCode, String auditId,String letterCode, String status );
	
	LettersSystemDataDto getSystemDataByAuditIdAndLetterCode(int legalEntityCode, String auditId,String letterCode, String status);
	
	Boolean isAuthAllowed(Integer legalEntityCode, String auditId,String letterCode, String userId);
	
	Map<String, AuditObservationLetterDto> getChklstStmnts(int legalEntityCode, String auditId,String letterCode, String status, String auditTypeCode);
	
	Map<String, AuditObservationLetterDto> getDeriveStmnts(int legalEntityCode, String auditId,String letterCode, String status, String auditTypeCode);
	
	void deleteAuditLetterByIdCode(int legalEntityCode, String auditId,String letterCode, String status);

	String getDocReferencePath(int legalEntityCode, String auditId, String letterCode, String auditTypeCode);
	
	List<String> getLettersPdfFiles(Integer legalEntityCode, String auditId, String auditTypeCode, String letterDocumentTypeCode);
	
	DataTableResponse getLetterForReviewer(int legalEntityCode, String userId, String search,Integer orderColumn,
			String orderDirection, Integer page, Integer size, String role, String userUnitType);
	
	Integer isRatingCompleted(Integer legalEntityCode, String auditTypeCode, String auditId);
	
	Integer isLetterAuthorised(Integer legalEntityCode, String auditTypeCode, String auditId, String letterCode);
	
	Map<String, String> getAuditRatingCompositeCategoryScoreByAuditId(Integer legalEntityCode, String auditTypeCode, String auditId);
	
	DataTableResponse getAllLetterForReviewer(int legalEntityCode, String userId, String search,Integer orderColumn, String orderDirection, Integer page, 
			Integer size, String role, String userUnitType, List<String> unitList, LocalDate financialYear, String auditTypeCode, List<LocalDate>  financialYearStrtEndList);
	 
	DataTableResponse getLetterForReviewerGradingCompliance(int legalEntityCode, String userId, String search,Integer orderColumn, String orderDirection, 
			Integer page, Integer size, String role, String userUnitType, LocalDate financialYear, String auditTypeCode, List<LocalDate>  financialYearStrtEndList);
}
