package com.sifang.modules.flowable.dao;

import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Record;
import com.sifang.modules.sys.common.persistence.BaseDao;
import org.springframework.stereotype.Repository;
import com.sifang.modules.flowable.entity.ProcessDefAuditStep;

import java.util.List;

/**
 * @author Generate Tools
 * @version
 */
@Repository
public class ProcessDefAuditStepDao extends BaseDao<ProcessDefAuditStep> {


    public List<Record> processStep(String processId) {
        StringBuffer sb = new StringBuffer();
        sb.append(" SELECT a.name,a.visible_fields AS visibleFields,a.operate_fields AS operateFields,a.cc_user_id AS ccUserId,a.audit_note AS auditNote ,");
        sb.append(" a.role_id AS roleId, a.sort, a.trans_department as transDepartment ,a.reject_step_name as rejectStepName  ");
        sb.append(" ,a.item_name,a.audit_type ,a.emp_user_id ,a.audit_method ,a.reject_step_id,a.reject_step_type ,a.cc_user_id ");
        sb.append(" FROM `crm_process_def_audit_step` a");
        sb.append(" WHERE a.proc_def_id=? ORDER BY a.sort ASC ");
        List<Record> list = Db.find(sb.toString(), processId);
        return list;
    }

}
