/**
 * Copyright © 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.deductionshowdetails.service;

import java.util.List;

import com.jeeplus.modules.deductionshowdetails.entity.*;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeeplus.core.persistence.Page;
import com.jeeplus.core.service.CrudService;
import com.jeeplus.modules.deductionshowdetails.mapper.DeductionShowDetailsMapper;

/**
 * DeductionShowDetailsService
 *
 * @author 邱悦
 * @version 2022-01-02
 */
@Service
@Transactional(readOnly = true)
public class DeductionShowDetailsService extends CrudService<DeductionShowDetailsMapper, DeductionShowDetails> {

	public DeductionShowDetails get(String id) {
		return super.get(id);
	}

	public List<DeductionShowDetails> findList(DeductionShowDetails deductionShowDetails) {
		return super.findList(deductionShowDetails);
	}

	public Page<DeductionShowDetails> findPage(Page<DeductionShowDetails> page, DeductionShowDetails deductionShowDetails) {
		return super.findPage(page, deductionShowDetails);
	}

	@Transactional(readOnly = false)
	public void save(DeductionShowDetails deductionShowDetails) {
		super.save(deductionShowDetails);
	}

	@Transactional(readOnly = false)
	public void update(DeductionShowDetails deductionShowDetails) {
		deductionShowDetails.preUpdate();
		mapper.update(deductionShowDetails);
	}

	@Transactional(readOnly = false)
	public void delete(DeductionShowDetails deductionShowDetails) {
		super.delete(deductionShowDetails);
	}


	public Page<SiteSafety> findSiteSafetyList(Page<SiteSafety> page, SiteSafety siteSafety) {
		dataRuleFilter(siteSafety);
		siteSafety.setPage(page);
		page.setList(mapper.findSiteSafetyList(siteSafety));
		return page;
	}

	public Page<SiteQuality> findSiteQualityList(Page<SiteQuality> page, SiteQuality siteQuality) {
		dataRuleFilter(siteQuality);
		siteQuality.setPage(page);
		page.setList(mapper.findSiteQualityList(siteQuality));
		return page;
	}

	public Page<CostCompletion> findCostCompletionList(Page<CostCompletion> page, CostCompletion costCompletion) {
		dataRuleFilter(costCompletion);
		costCompletion.setPage(page);
		page.setList(mapper.findCostCompletionList(costCompletion));
		return page;
	}

	public Page<QualityCivilized> findQualityCivilizedList(Page<QualityCivilized> page, QualityCivilized qualityCivilized) {
		dataRuleFilter(qualityCivilized);
		qualityCivilized.setPage(page);
		page.setList(mapper.findQualityCivilizedList(qualityCivilized));
		return page;
	}

	public String  getName(String id) {
		return mapper.getName(id);
	}

	public Page<OtherPoints> findOtherPointsList(Page<OtherPoints> page, OtherPoints otherPoints) {
		dataRuleFilter(otherPoints);
		otherPoints.setPage(page);
		page.setList(mapper.findOtherPointsList(otherPoints));
		return page;
	}

	@Transactional(readOnly = false)
	public void deleteDetails(String id) {
		mapper.deleteDetails(id);
	}
}