/**
 */
package com.sifang.modules.flowpath.service;

import com.sifang.modules.sys.common.service.BaseService;
import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;


import com.sifang.modules.flowpath.entity.ExamineInfo;
import com.sifang.modules.flowpath.dao.ExamineInfoDao;

import java.util.Date;
import java.util.List;

/**
 * 审批业务过程信息Service
 * @author lzp
 * @version 
 */
@Component
@Transactional(readOnly = true)
public class ExamineInfoService extends BaseService {

	@Autowired
	private ExamineInfoDao examineInfoDao;
	
	public ExamineInfo get(String id) {
		return examineInfoDao.get(id);
	}
	


	/**
	 * @param fromId  表单id
	 * @param operate  操作内容
	 * @param operateName 操作人
	*/
	public void save(String fromId,String operateName,String operate) {
		ExamineInfo info = new ExamineInfo();
		info.setFormId(fromId);
		info.setDetail(operate);
		info.setOperateName(operateName);
		info.setOperateTime(new Date());
		examineInfoDao.save(info);
	}

	//获取过程信息
	public List<ExamineInfo>  getByApplyId(String applyId,String formTypeId){
		List<ExamineInfo> list=examineInfoDao.getByApplyId(applyId,formTypeId);
		return list;
	}
	

	
}
