package com.bankaudit.rest.process.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.bankaudit.dto.DataTableResponse;
import com.bankaudit.process.model.AuditSchedule;
import com.bankaudit.rest.process.dao.AuditReviewDao;
import com.bankaudit.rest.process.dao.AuditViewJurisditionDao;

@Service
@Transactional("transactionManager")
public class AuditViewJurisdictionServiceImpl implements AuditViewJurisdictionService{
	@Autowired(required=true)
	AuditViewJurisditionDao auditViewJurisditionDao;

	@Override
	public DataTableResponse getAuditsViewforjurisdiction(int legalEntityCode, String userId, String search, Integer orderColumn,
			String orderDirection, Integer page, Integer size) {
		DataTableResponse ds = auditViewJurisditionDao.getAuditsViewforjurisdiction(legalEntityCode, userId, search, orderColumn, orderDirection, page, size);
		return ds;
	}
	
	@Override
	public AuditSchedule getJurisdictionAuditByPlanIdAndAuditId(int legalEntityCode, String auditTypeCode, String planId,
			String auditId) {
		AuditSchedule auditDtls=auditViewJurisditionDao.getJurisdictionAuditByPlanIdAndAuditId(legalEntityCode,auditTypeCode,planId,auditId); 
		 return auditDtls; 
	}
	
	
	@Override
	public DataTableResponse getAuditObservationList(int legalEntityCode,String planId,String auditId, String search, Integer orderColumn,
			String orderDirection, Integer page, Integer size) {
		DataTableResponse ds=auditViewJurisditionDao.getAuditObservationList(legalEntityCode,planId,auditId,search,orderColumn,
				orderDirection,page,size);
		return ds;
	}
}
