package com.bankaudit.report.v3.dao;

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

import org.hibernate.Session;

import com.bankaudit.dao.Dao;
//import com.bankaudit.model.AuditReportCoverPage;
import com.bankaudit.report.v3.dto.ChapterDto;
import com.bankaudit.report.v3.dto.CheckListDto;
import com.bankaudit.report.v3.dto.ProcessDto;
import com.bankaudit.report.v3.dto.ProductDto;
import com.bankaudit.report.v3.dto.SectionDto;
import com.bankaudit.report.v3.dto.StaticDerivedStatementDTO;
import com.bankaudit.report.v3.dto.TableDataColumnNumberDto;

public interface AuditBookReportDaoV3 extends Dao {
 	 
	
	/**************** TO Insert data into Jasper  report Start **************/
	Object[] getCoverPageDynamicData(Integer legalEntityCode, String auditId);	
	
	List<ChapterDto> getChapter(Integer legalEntityCode, String auditId);	
	List<SectionDto> getSection(Integer legalEntityCode, String auditId, String auditGroupCode );
	List<ProductDto> getProduct(Integer legalEntityCode, String auditId, String auditGroupCode, String auditSubGroupCode);
	List<ProcessDto> getProcess(Integer legalEntityCode, String auditId, String auditGroupCode, String auditSubGroupCode, String activityCode);
	List<CheckListDto> getChecklist(Integer legalEntityCode, String auditId, String auditGroupCode, String auditSubGroupCode, 
			String activityCode, String processCode, String isComplied);
	
	
	List<String> getDerivedAndStaticStatementForChapter(Integer legalEntityCode, String auditId, String auditGroupCode);
	List<String> getDerivedAndStaticStatementForSection(Integer legalEntityCode, String auditId, String auditGroupCode, String auditSubGroupCode);
	List<String> getDerivedAndStaticStatementForProduct(Integer legalEntityCode, String auditId, String auditGroupCode, String auditSubGroupCode, String activityCode);
	List<String> getDerivedAndStaticStatementForProcess(Integer legalEntityCode, String auditId, String auditGroupCode, String auditSubGroupCode, String activityCode, String processCode);
	List<String> getDerivedAndStaticStatementForchecklist(Integer legalEntityCode,  String auditId, String auditGroupCode, String auditSubGroupCode, String activityCode, String processCode, String findingCode);
	List<String> getDerivedAndStaticStatementForIntroduction(Integer legalEntityCode,  String auditId,  String auditTypeCode);
	
		
	List<String>  getStandardStatement(Integer legalEntityCode, String auditId, String auditTypeCode, String auditGroupCode, 
			String auditSubGroupCode, String activityCode, String processCode, String findingCode,  String isComplied);
	
	List<String> getRemarksForchecklist(Integer legalEntityCode, String auditId, String auditGroupCode,
			String auditSubGroupCode, String activityCode, String processCode, String findingCode,  String isComplied);
	
	List<String> getBankRemarksForchecklist(Integer legalEntityCode, String auditId, String auditGroupCode,
			String auditSubGroupCode, String activityCode, String processCode, String findingCode,  String isComplied);
	
	List<String> getBankRemarksForchecklistHindi(Integer legalEntityCode, String auditId, String auditGroupCode,
			String auditSubGroupCode, String activityCode, String processCode, String findingCode,  String isComplied);
	
	List<String> getScrutinyRemarksForchecklist(Integer legalEntityCode, String auditId, String auditGroupCode,
			String auditSubGroupCode, String activityCode, String processCode, String findingCode,  String isComplied);
	
	List<String> getScrutinyRemarksForchecklistHindi(Integer legalEntityCode, String auditId, String auditGroupCode,
			String auditSubGroupCode, String activityCode, String processCode, String findingCode,  String isComplied);
 
	List<CheckListDto> getChecklistForPartB(Integer legalEntityCode, String auditId, String auditGroupCode, String auditSubGroupCode,
			String activityCode, String processCode, String isComplied );
	/**************** TO Insert data into Jasper  report End **************/
	
	
	/**************** TO Insert Report related data to master table Start **************/
	void deleteExistingBeforeInitiate(Integer legalEntityCode,   String auditId, String auditTypeCode);
	
	List<ChapterDto> getChapterForReportTable(Integer legalEntityCode, String auditId, String auditTypeCode);

	List<SectionDto>  getSectionForReportTable(Integer legalEntityCode, String auditId, String auditTypeCode, String auditGroupCode);
	
	List<ProductDto>  getProductForReportTable(Integer legalEntityCode, String auditId, String auditTypeCode, String auditGroupCode, 
			String auditSubGroupCode);
	
	List<ProcessDto>  getProcessForReportTable(Integer legalEntityCode, String auditId, String auditTypeCode, String auditGroupCode, 
			String auditSubGroupCode, String activityCode);
	
	List<CheckListDto>  getChecklistForReportTable(Integer legalEntityCode, String auditId, String auditTypeCode, String auditGroupCode, 
			String auditSubGroupCode, String activityCode, String processCode, String isComplied);
		
	List<StaticDerivedStatementDTO> getDerivedAndStaticStatementForChapterForReportTable(Integer legalEntityCode, String auditId,  String auditTypeCode, String auditGroupCode);

	List<StaticDerivedStatementDTO> getDerivedAndStaticStatementForSectionForReportTable(Integer legalEntityCode,String auditId,  String auditTypeCode, String auditGroupCode,
			String auditSubGroupCode);

	List<StaticDerivedStatementDTO> getDerivedAndStaticStatementForProductForReportTable(Integer legalEntityCode, String auditId,  String auditTypeCode, String auditGroupCode,
			String auditSubGroupCode, String activityCode);

	List<StaticDerivedStatementDTO> getDerivedAndStaticStatementForProcessForReportTable(Integer legalEntityCode, String auditId,  String auditTypeCode, String auditGroupCode,
			String auditSubGroupCode, String activityCode, String processCode);
	
	List<StaticDerivedStatementDTO> getDerivedAndStaticStatementForChecklistForReportTable(Integer legalEntityCode, String auditId,  String auditTypeCode, String auditGroupCode,
			String auditSubGroupCode, String activityCode, String processCode, String findingCode); 	
		
	List<CheckListDto>  getStandardStatementForReportTable(Integer legalEntityCode, String auditId, String auditTypeCode, String auditGroupCode, 
			String auditSubGroupCode, String activityCode, String processCode, String findingCode);
	
	List<CheckListDto> getRemarksForChecklistForReportTable(Integer legalEntityCode, String auditId, String auditGroupCode,
			String auditSubGroupCode, String activityCode, String processCode, String findingCode, String isComplied);
	
	void insertIntoReportTable(String reportQuery);
	
	public ChapterDto getIntroductionChapterForReportTable(Integer legalEntityCode,   String auditId, String auditTypeCode);
	
	/**************** TO Insert Report related data to master table End **************/
	
	
	/**************** TO update Report related data to master table from UI  (from capture/inspection screen) Start **************/
	
    void updateChecklistForReportTable(Integer legalEntityCode, String mappingId, String auditId, String auditTypeCode, String auditGroupCode, 
				String auditSubGroupCode, String activityCode, String processCode, String findingCode, String isComplied, String reportLanguage, 
				String nonCompliancePersistence, String criticality);
	 
	void updateStandardStatementForReportTable(Integer legalEntityCode, String mappingId,  String auditId, String auditTypeCode, String auditGroupCode, 
			String auditSubGroupCode, String activityCode, String processCode, String findingCode, String isComplied, String statement,
			String statementHindi, String reportLanguage);
	
	void updateRemarksForReportTable(Integer legalEntityCode,  String mappingId, String auditId, String auditTypeCode, String auditGroupCode, 
			String auditSubGroupCode, String activityCode, String processCode, String findingCode, String isComplied, String statement, String reportLanguage);	
	
	void updateBankRemarksForReportTable(Integer legalEntityCode, String mappingId,  String auditId, String auditTypeCode, String auditGroupCode, 
			String auditSubGroupCode, String activityCode, String processCode, String findingCode, String isComplied, String statement, String reportLanguage);
	
	void updateScrutinyRemarksForReportTable(Integer legalEntityCode, String mappingId,  String auditId, String auditTypeCode, String auditGroupCode, 
			String auditSubGroupCode, String activityCode, String processCode, String findingCode, String isComplied, String statement, String reportLanguage);
	/**************** TO update Report related data to master table from UI  (from capture/inspection screen) End **************/
	
	/**************** get Finalized Report **************/
	String getFinalizedReport(Integer legalEntityCode, String auditId, String auditTypeCode, String reportCode);
	void updateFinalizedReportStatus(Integer legalEntityCode, String auditId, String auditTypeCode, String reportCode);
	
	/**************** For Cover Page Start **************/
	
	//AuditReportCoverPage getCoverPage(Integer legalEntityCode, String auditId, String auditTypeCode);
	
	
	/**************** For Cover Page End **************/
	
	/*********Part C start********/	
	
	 List<TableDataColumnNumberDto> getTableDataForPartC(Integer legalEntityCode, String auditId, String auditTypeCode);
	 
	 List<String> getPartCPdfFiles(Integer legalEntityCode, String auditId, String auditTypeCode, String reportTypePartC);
		
   /********* Part C End ********/
	 
	 Map<String, String[]> getParameterVeluesForProfile(Integer legalEntityCode, String auditId, String auditTypeCode);	
	 
	 Map<String, String> getProfileParameterMap(Integer legalEntityCode, String auditId, String auditTypeCode);	
	 
	 
	 /******************** Start New Code to Get Chapter/Section/Product/process and All Statements *********************/
	 
	 Session getIRSession();
	  
	 List<ChapterDto>  getChapter(String legalEntityCode, String auditId, String auditTypeCode);
	 
	 Map<String, String> getSection(String legalEntityCode, String auditId, String auditTypeCode);
	 
	 Map<String, String> getProduct(String legalEntityCode, String auditId, String auditTypeCode);
	 
	 Map<String, String> getProcess(String legalEntityCode, String auditId, String auditTypeCode);
	 
	 Map<String, String> getChecklist(String legalEntityCode, String auditId, String auditTypeCode, String isComplied);
	 
	 Map<String, String> getStandardStatement(String legalEntityCode, String auditId, String auditTypeCode, String isComplied);
	 
	 Map<String, String> getRemarks(String legalEntityCode, String auditId, String auditTypeCode, String isComplied, String remarksFor);
	 
	 Map<String, String> getRemarksClosure(String legalEntityCode, String auditId, String auditTypeCode, String isComplied, String remarksFor, String status);
	 
	 Map<String, String> getDerivedStaticStatementAll(String legalEntityCode, String auditId,  String auditTypeCode);
	 
	 Map<String, String> getDerivedAndStaticStatementForIntroduction(String legalEntityCode,  String auditId,  String auditTypeCode);
	 
	 List<CheckListDto>getAllMajorChecklist(String legalEntityCode, String auditId, String auditTypeCode, String isComplied, String remarksFor);
	  
	 List<CheckListDto> getAllGrpSubGrpActProcForReportTable(Integer legalEntityCode,  String auditTypeCode);
	 
	 Map<String, String> getAllGrpSubGrpActProcForReportTableForStatementTablesAndIOInput(Integer legalEntityCode,  String auditTypeCode);
	 
	 /******************** Get dynamic table/remarks/picture details for IR  ********************/
	 List<String> getAuditReportDynamicTable(Integer legalEntityCode, String auditId, String auditTypeCode, String auditGroupCode, String auditSubGroupCode,
	 			String activityCode,  String processCode, String findingCode, String applicableFor, String statementType, String statementId);
	 
	 /******************** Start Get Out-Standing report  ********************/	 
	 List<SectionDto> getOutstandingSection(String legalEntityCode, String auditTypeCode, String auditId);
	 
	 Map<String, String> getOutstandingChecklist(String legalEntityCode, String auditTypeCode, String auditId);
	 
	 Map<String, String> getOutstandingStandardStmt(String legalEntityCode, String auditTypeCode, String auditId);
	 
	 Map<String, String> getOutstandingRemarks(String legalEntityCode, String auditTypeCode, String auditId);
	 /******************** END Get Out-Standing report  ********************/
}
