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

import java.util.List;

import com.jeeplus.modules.sg.advence.activiti.entity.Advance;
import com.jeeplus.modules.sg.advence.activiti.mapper.AdvanceMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeeplus.core.persistence.Page;
import com.jeeplus.core.service.CrudService;

/**
 * 请假表单Service
 * @author lgf
 * @version 2018-06-12
 */
@Service
@Transactional(readOnly = true)
public class AdvanceService extends CrudService<AdvanceMapper, Advance> {
    @Autowired
	private AdvanceMapper advanceMapper;

	public Advance get(String id) {
		Advance advance = super.get(id);
		return advance;
	}

	@Override
	public List<Advance> findList(Advance advance) {
		return super.findList(advance);
	}

	@Override
	public Page<Advance> findPage(Page<Advance> page, Advance advance) {
		return super.findPage(page,advance);
	}

	@Override
	@Transactional(readOnly = false)
	public void save(Advance advance) {
		super.save(advance);
	}

	@Override
	@Transactional(readOnly = false)
	public void delete(Advance advance) {
		super.delete(advance);
	}

	//修改提前施工状态0-未提前施工 2-提前施工
	@Transactional(readOnly = false)
	public void updatePreConstruction(Advance advance){
		advanceMapper.updatePreConstruction(advance);
	}
}