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

import com.jeeplus.common.persistence.Page;
import com.jeeplus.common.service.CrudService;
import com.jeeplus.modules.alterinfo.dao.AlterInfoDao;
import com.jeeplus.modules.alterinfo.entity.AlterInfo;
import com.jeeplus.modules.workcontractinfo.entity.WorkContractInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 变更作废明细Service
 * @author lw
 * @version 2018-04-13
 */
@Service
@Transactional(readOnly = true)
public class AlterInfoService extends CrudService<AlterInfoDao, AlterInfo> {

	@Autowired
	private AlterInfoDao alterInfoDao;

	public AlterInfo get(String id) {
		return super.get(id);
	}
	
	public List<AlterInfo> findList(AlterInfo alterInfo) {
		return super.findList(alterInfo);
	}
	
	public Page<AlterInfo> findPage(Page<AlterInfo> page, AlterInfo alterInfo) {
		return super.findPage(page, alterInfo);
	}
	
	@Transactional(readOnly = false)
	public void save(AlterInfo alterInfo) {
		super.save(alterInfo);
	}
	
	@Transactional(readOnly = false)
	public void delete(AlterInfo alterInfo) {
		super.delete(alterInfo);
	}


	//作废申请理由
	public AlterInfo getByContractInfo(WorkContractInfo workContractInfo) {
		return alterInfoDao.getByContractInfo(workContractInfo);
	}
}