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

import com.sifang.modules.sys.common.persistence.BaseDao;
import org.hibernate.Query;
import org.springframework.stereotype.Repository;


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

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

/**
 * 审批业务过程信息DAO接口
 * @author lzp
 * @version 
 */
@Repository
public class ExamineInfoDao extends BaseDao<ExamineInfo> {

    public void saveExamineInfo(String formId, String detail, Date operateTime, String operateName,String formTypeId){
        ExamineInfo info=new ExamineInfo();
        info.setFormId(formId);
        info.setDetail(detail);
        info.setOperateName(operateName);
        info.setOperateTime(operateTime);
        info.setFormId(formId);
        info.setFormTypeId(formTypeId);
        save(info);
    }

    public List<ExamineInfo> getByApplyId(String applyId,String formTypeId){
        Query query = getSession().createQuery("from ExamineInfo where formId=:formId and formTypeId=:formTypeId order BY operate_time asc ");
        query.setParameter("formId", applyId);
        query.setParameter("formTypeId",formTypeId);
        List<ExamineInfo> list=query.list();
        return list;
    }
	
}
