package com.engine.kq.wfset.attendance.dao;

import java.util.ArrayList;
import java.util.List;
import java.util.HashMap;
import java.util.Map;

import weaver.common.StringUtil;
import com.engine.kq.wfset.attendance.framework.BaseConnection;
import com.engine.kq.wfset.attendance.framework.BaseDao;
import com.engine.kq.wfset.attendance.domain.WorkflowBase;
import weaver.conn.RecordSet;

/**
 * WorkflowBaseDao
 * <p>Generated from 长东设计 www.mfstyle.cn</p> 
 * 
 * @author wcd
 * @version 1.0 2015-09-10
 */
public class WorkflowBaseDao extends BaseConnection implements BaseDao<WorkflowBase> {

	public Comparable insert(WorkflowBase bean) {
		return 0;
	}

	public void update(WorkflowBase bean) {
		if(bean == null) return;
	}

	public List<WorkflowBase> find(Map<String, Comparable> map) {
    RecordSet rs = new RecordSet();
		List<WorkflowBase> list = new ArrayList<WorkflowBase>();
		StringBuffer sql = new StringBuffer()
		.append(" select t.*")
		.append(" from workflow_base t")
		.append(" where 1 = 1");
		if(map != null) {
			if(map.containsKey("id")){
				sql.append(" and t.id = ").append(StringUtil.vString(map.get("id")));
			}
			if(map.containsKey("begin_id")){
				sql.append(" and t.id >= ").append(StringUtil.vString(map.get("begin_id")));
			}
			if(map.containsKey("end_id")){
				sql.append(" and t.id < ").append(StringUtil.vString(map.get("end_id")));
			}
			if(map.containsKey("sql_id")){
				sql.append(" " + StringUtil.vString(map.get("sql_id")));
			}
			if(map.containsKey("workflowtype")){
				sql.append(" and t.workflowtype = ").append(StringUtil.vString(map.get("workflowtype")));
			}
			if(map.containsKey("begin_workflowtype")){
				sql.append(" and t.workflowtype >= ").append(StringUtil.vString(map.get("begin_workflowtype")));
			}
			if(map.containsKey("end_workflowtype")){
				sql.append(" and t.workflowtype < ").append(StringUtil.vString(map.get("end_workflowtype")));
			}
			if(map.containsKey("sql_workflowtype")){
				sql.append(" " + StringUtil.vString(map.get("sql_workflowtype")));
			}
			if(map.containsKey("formid")){
				sql.append(" and t.formid = ").append(StringUtil.vString(map.get("formid")));
			}
			if(map.containsKey("begin_formid")){
				sql.append(" and t.formid >= ").append(StringUtil.vString(map.get("begin_formid")));
			}
			if(map.containsKey("end_formid")){
				sql.append(" and t.formid < ").append(StringUtil.vString(map.get("end_formid")));
			}
			if(map.containsKey("sql_formid")){
				sql.append(" " + StringUtil.vString(map.get("sql_formid")));
			}
			if(map.containsKey("userid")){
				sql.append(" and t.userid = ").append(StringUtil.vString(map.get("userid")));
			}
			if(map.containsKey("begin_userid")){
				sql.append(" and t.userid >= ").append(StringUtil.vString(map.get("begin_userid")));
			}
			if(map.containsKey("end_userid")){
				sql.append(" and t.userid < ").append(StringUtil.vString(map.get("end_userid")));
			}
			if(map.containsKey("sql_userid")){
				sql.append(" " + StringUtil.vString(map.get("sql_userid")));
			}
			if(map.containsKey("iscust")){
				sql.append(" and t.iscust = ").append(StringUtil.vString(map.get("iscust")));
			}
			if(map.containsKey("begin_iscust")){
				sql.append(" and t.iscust >= ").append(StringUtil.vString(map.get("begin_iscust")));
			}
			if(map.containsKey("end_iscust")){
				sql.append(" and t.iscust < ").append(StringUtil.vString(map.get("end_iscust")));
			}
			if(map.containsKey("sql_iscust")){
				sql.append(" " + StringUtil.vString(map.get("sql_iscust")));
			}
			if(map.containsKey("helpdocid")){
				sql.append(" and t.helpdocid = ").append(StringUtil.vString(map.get("helpdocid")));
			}
			if(map.containsKey("begin_helpdocid")){
				sql.append(" and t.helpdocid >= ").append(StringUtil.vString(map.get("begin_helpdocid")));
			}
			if(map.containsKey("end_helpdocid")){
				sql.append(" and t.helpdocid < ").append(StringUtil.vString(map.get("end_helpdocid")));
			}
			if(map.containsKey("sql_helpdocid")){
				sql.append(" " + StringUtil.vString(map.get("sql_helpdocid")));
			}
			if(map.containsKey("messageType")){
				sql.append(" and t.messageType = ").append(StringUtil.vString(map.get("messageType")));
			}
			if(map.containsKey("begin_messageType")){
				sql.append(" and t.messageType >= ").append(StringUtil.vString(map.get("begin_messageType")));
			}
			if(map.containsKey("end_messageType")){
				sql.append(" and t.messageType < ").append(StringUtil.vString(map.get("end_messageType")));
			}
			if(map.containsKey("sql_messageType")){
				sql.append(" " + StringUtil.vString(map.get("sql_messageType")));
			}
			if(map.containsKey("multiSubmit")){
				sql.append(" and t.multiSubmit = ").append(StringUtil.vString(map.get("multiSubmit")));
			}
			if(map.containsKey("begin_multiSubmit")){
				sql.append(" and t.multiSubmit >= ").append(StringUtil.vString(map.get("begin_multiSubmit")));
			}
			if(map.containsKey("end_multiSubmit")){
				sql.append(" and t.multiSubmit < ").append(StringUtil.vString(map.get("end_multiSubmit")));
			}
			if(map.containsKey("sql_multiSubmit")){
				sql.append(" " + StringUtil.vString(map.get("sql_multiSubmit")));
			}
			if(map.containsKey("defaultName")){
				sql.append(" and t.defaultName = ").append(StringUtil.vString(map.get("defaultName")));
			}
			if(map.containsKey("begin_defaultName")){
				sql.append(" and t.defaultName >= ").append(StringUtil.vString(map.get("begin_defaultName")));
			}
			if(map.containsKey("end_defaultName")){
				sql.append(" and t.defaultName < ").append(StringUtil.vString(map.get("end_defaultName")));
			}
			if(map.containsKey("sql_defaultName")){
				sql.append(" " + StringUtil.vString(map.get("sql_defaultName")));
			}
			if(map.containsKey("subcompanyid")){
				sql.append(" and t.subcompanyid = ").append(StringUtil.vString(map.get("subcompanyid")));
			}
			if(map.containsKey("begin_subcompanyid")){
				sql.append(" and t.subcompanyid >= ").append(StringUtil.vString(map.get("begin_subcompanyid")));
			}
			if(map.containsKey("end_subcompanyid")){
				sql.append(" and t.subcompanyid < ").append(StringUtil.vString(map.get("end_subcompanyid")));
			}
			if(map.containsKey("sql_subcompanyid")){
				sql.append(" " + StringUtil.vString(map.get("sql_subcompanyid")));
			}
			if(map.containsKey("mailMessageType")){
				sql.append(" and t.mailMessageType = ").append(StringUtil.vString(map.get("mailMessageType")));
			}
			if(map.containsKey("begin_mailMessageType")){
				sql.append(" and t.mailMessageType >= ").append(StringUtil.vString(map.get("begin_mailMessageType")));
			}
			if(map.containsKey("end_mailMessageType")){
				sql.append(" and t.mailMessageType < ").append(StringUtil.vString(map.get("end_mailMessageType")));
			}
			if(map.containsKey("sql_mailMessageType")){
				sql.append(" " + StringUtil.vString(map.get("sql_mailMessageType")));
			}
			if(map.containsKey("docRightByOperator")){
				sql.append(" and t.docRightByOperator = ").append(StringUtil.vString(map.get("docRightByOperator")));
			}
			if(map.containsKey("begin_docRightByOperator")){
				sql.append(" and t.docRightByOperator >= ").append(StringUtil.vString(map.get("begin_docRightByOperator")));
			}
			if(map.containsKey("end_docRightByOperator")){
				sql.append(" and t.docRightByOperator < ").append(StringUtil.vString(map.get("end_docRightByOperator")));
			}
			if(map.containsKey("sql_docRightByOperator")){
				sql.append(" " + StringUtil.vString(map.get("sql_docRightByOperator")));
			}
			if(map.containsKey("templateid")){
				sql.append(" and t.templateid = ").append(StringUtil.vString(map.get("templateid")));
			}
			if(map.containsKey("begin_templateid")){
				sql.append(" and t.templateid >= ").append(StringUtil.vString(map.get("begin_templateid")));
			}
			if(map.containsKey("end_templateid")){
				sql.append(" and t.templateid < ").append(StringUtil.vString(map.get("end_templateid")));
			}
			if(map.containsKey("sql_templateid")){
				sql.append(" " + StringUtil.vString(map.get("sql_templateid")));
			}
			if(map.containsKey("catelogType")){
				sql.append(" and t.catelogType = ").append(StringUtil.vString(map.get("catelogType")));
			}
			if(map.containsKey("begin_catelogType")){
				sql.append(" and t.catelogType >= ").append(StringUtil.vString(map.get("begin_catelogType")));
			}
			if(map.containsKey("end_catelogType")){
				sql.append(" and t.catelogType < ").append(StringUtil.vString(map.get("end_catelogType")));
			}
			if(map.containsKey("sql_catelogType")){
				sql.append(" " + StringUtil.vString(map.get("sql_catelogType")));
			}
			if(map.containsKey("selectedCateLog")){
				sql.append(" and t.selectedCateLog = ").append(StringUtil.vString(map.get("selectedCateLog")));
			}
			if(map.containsKey("begin_selectedCateLog")){
				sql.append(" and t.selectedCateLog >= ").append(StringUtil.vString(map.get("begin_selectedCateLog")));
			}
			if(map.containsKey("end_selectedCateLog")){
				sql.append(" and t.selectedCateLog < ").append(StringUtil.vString(map.get("end_selectedCateLog")));
			}
			if(map.containsKey("sql_selectedCateLog")){
				sql.append(" " + StringUtil.vString(map.get("sql_selectedCateLog")));
			}
			if(map.containsKey("docRightByHrmResource")){
				sql.append(" and t.docRightByHrmResource = ").append(StringUtil.vString(map.get("docRightByHrmResource")));
			}
			if(map.containsKey("begin_docRightByHrmResource")){
				sql.append(" and t.docRightByHrmResource >= ").append(StringUtil.vString(map.get("begin_docRightByHrmResource")));
			}
			if(map.containsKey("end_docRightByHrmResource")){
				sql.append(" and t.docRightByHrmResource < ").append(StringUtil.vString(map.get("end_docRightByHrmResource")));
			}
			if(map.containsKey("sql_docRightByHrmResource")){
				sql.append(" " + StringUtil.vString(map.get("sql_docRightByHrmResource")));
			}
			if(map.containsKey("titleFieldId")){
				sql.append(" and t.titleFieldId = ").append(StringUtil.vString(map.get("titleFieldId")));
			}
			if(map.containsKey("begin_titleFieldId")){
				sql.append(" and t.titleFieldId >= ").append(StringUtil.vString(map.get("begin_titleFieldId")));
			}
			if(map.containsKey("end_titleFieldId")){
				sql.append(" and t.titleFieldId < ").append(StringUtil.vString(map.get("end_titleFieldId")));
			}
			if(map.containsKey("sql_titleFieldId")){
				sql.append(" " + StringUtil.vString(map.get("sql_titleFieldId")));
			}
			if(map.containsKey("keywordFieldId")){
				sql.append(" and t.keywordFieldId = ").append(StringUtil.vString(map.get("keywordFieldId")));
			}
			if(map.containsKey("begin_keywordFieldId")){
				sql.append(" and t.keywordFieldId >= ").append(StringUtil.vString(map.get("begin_keywordFieldId")));
			}
			if(map.containsKey("end_keywordFieldId")){
				sql.append(" and t.keywordFieldId < ").append(StringUtil.vString(map.get("end_keywordFieldId")));
			}
			if(map.containsKey("sql_keywordFieldId")){
				sql.append(" " + StringUtil.vString(map.get("sql_keywordFieldId")));
			}
			if(map.containsKey("editor")){
				sql.append(" and t.editor = ").append(StringUtil.vString(map.get("editor")));
			}
			if(map.containsKey("begin_editor")){
				sql.append(" and t.editor >= ").append(StringUtil.vString(map.get("begin_editor")));
			}
			if(map.containsKey("end_editor")){
				sql.append(" and t.editor < ").append(StringUtil.vString(map.get("end_editor")));
			}
			if(map.containsKey("sql_editor")){
				sql.append(" " + StringUtil.vString(map.get("sql_editor")));
			}
			if(map.containsKey("wfdocownertype")){
				sql.append(" and t.wfdocownertype = ").append(StringUtil.vString(map.get("wfdocownertype")));
			}
			if(map.containsKey("begin_wfdocownertype")){
				sql.append(" and t.wfdocownertype >= ").append(StringUtil.vString(map.get("begin_wfdocownertype")));
			}
			if(map.containsKey("end_wfdocownertype")){
				sql.append(" and t.wfdocownertype < ").append(StringUtil.vString(map.get("end_wfdocownertype")));
			}
			if(map.containsKey("sql_wfdocownertype")){
				sql.append(" " + StringUtil.vString(map.get("sql_wfdocownertype")));
			}
			if(map.containsKey("wfdocownerfieldid")){
				sql.append(" and t.wfdocownerfieldid = ").append(StringUtil.vString(map.get("wfdocownerfieldid")));
			}
			if(map.containsKey("begin_wfdocownerfieldid")){
				sql.append(" and t.wfdocownerfieldid >= ").append(StringUtil.vString(map.get("begin_wfdocownerfieldid")));
			}
			if(map.containsKey("end_wfdocownerfieldid")){
				sql.append(" and t.wfdocownerfieldid < ").append(StringUtil.vString(map.get("end_wfdocownerfieldid")));
			}
			if(map.containsKey("sql_wfdocownerfieldid")){
				sql.append(" " + StringUtil.vString(map.get("sql_wfdocownerfieldid")));
			}
			if(map.containsKey("keepsign")){
				sql.append(" and t.keepsign = ").append(StringUtil.vString(map.get("keepsign")));
			}
			if(map.containsKey("begin_keepsign")){
				sql.append(" and t.keepsign >= ").append(StringUtil.vString(map.get("begin_keepsign")));
			}
			if(map.containsKey("end_keepsign")){
				sql.append(" and t.keepsign < ").append(StringUtil.vString(map.get("end_keepsign")));
			}
			if(map.containsKey("sql_keepsign")){
				sql.append(" " + StringUtil.vString(map.get("sql_keepsign")));
			}
			if(map.containsKey("secCategoryId")){
				sql.append(" and t.secCategoryId = ").append(StringUtil.vString(map.get("secCategoryId")));
			}
			if(map.containsKey("begin_secCategoryId")){
				sql.append(" and t.secCategoryId >= ").append(StringUtil.vString(map.get("begin_secCategoryId")));
			}
			if(map.containsKey("end_secCategoryId")){
				sql.append(" and t.secCategoryId < ").append(StringUtil.vString(map.get("end_secCategoryId")));
			}
			if(map.containsKey("sql_secCategoryId")){
				sql.append(" " + StringUtil.vString(map.get("sql_secCategoryId")));
			}
			if(map.containsKey("issignview")){
				sql.append(" and t.issignview = ").append(StringUtil.vString(map.get("issignview")));
			}
			if(map.containsKey("begin_issignview")){
				sql.append(" and t.issignview >= ").append(StringUtil.vString(map.get("begin_issignview")));
			}
			if(map.containsKey("end_issignview")){
				sql.append(" and t.issignview < ").append(StringUtil.vString(map.get("end_issignview")));
			}
			if(map.containsKey("sql_issignview")){
				sql.append(" " + StringUtil.vString(map.get("sql_issignview")));
			}
			if(map.containsKey("forbidAttDownload")){
				sql.append(" and t.forbidAttDownload = ").append(StringUtil.vString(map.get("forbidAttDownload")));
			}
			if(map.containsKey("begin_forbidAttDownload")){
				sql.append(" and t.forbidAttDownload >= ").append(StringUtil.vString(map.get("begin_forbidAttDownload")));
			}
			if(map.containsKey("end_forbidAttDownload")){
				sql.append(" and t.forbidAttDownload < ").append(StringUtil.vString(map.get("end_forbidAttDownload")));
			}
			if(map.containsKey("sql_forbidAttDownload")){
				sql.append(" " + StringUtil.vString(map.get("sql_forbidAttDownload")));
			}
			if(map.containsKey("Frequency")){
				sql.append(" and t.Frequency = ").append(StringUtil.vString(map.get("Frequency")));
			}
			if(map.containsKey("begin_Frequency")){
				sql.append(" and t.Frequency >= ").append(StringUtil.vString(map.get("begin_Frequency")));
			}
			if(map.containsKey("end_Frequency")){
				sql.append(" and t.Frequency < ").append(StringUtil.vString(map.get("end_Frequency")));
			}
			if(map.containsKey("sql_Frequency")){
				sql.append(" " + StringUtil.vString(map.get("sql_Frequency")));
			}
			if(map.containsKey("isWorkflowDoc")){
				sql.append(" and t.isWorkflowDoc = ").append(StringUtil.vString(map.get("isWorkflowDoc")));
			}
			if(map.containsKey("begin_isWorkflowDoc")){
				sql.append(" and t.isWorkflowDoc >= ").append(StringUtil.vString(map.get("begin_isWorkflowDoc")));
			}
			if(map.containsKey("end_isWorkflowDoc")){
				sql.append(" and t.isWorkflowDoc < ").append(StringUtil.vString(map.get("end_isWorkflowDoc")));
			}
			if(map.containsKey("sql_isWorkflowDoc")){
				sql.append(" " + StringUtil.vString(map.get("sql_isWorkflowDoc")));
			}
			if(map.containsKey("officalType")){
				sql.append(" and t.officalType = ").append(StringUtil.vString(map.get("officalType")));
			}
			if(map.containsKey("begin_officalType")){
				sql.append(" and t.officalType >= ").append(StringUtil.vString(map.get("begin_officalType")));
			}
			if(map.containsKey("end_officalType")){
				sql.append(" and t.officalType < ").append(StringUtil.vString(map.get("end_officalType")));
			}
			if(map.containsKey("sql_officalType")){
				sql.append(" " + StringUtil.vString(map.get("sql_officalType")));
			}
			if(map.containsKey("version")){
				sql.append(" and t.version = ").append(StringUtil.vString(map.get("version")));
			}
			if(map.containsKey("begin_version")){
				sql.append(" and t.version >= ").append(StringUtil.vString(map.get("begin_version")));
			}
			if(map.containsKey("end_version")){
				sql.append(" and t.version < ").append(StringUtil.vString(map.get("end_version")));
			}
			if(map.containsKey("sql_version")){
				sql.append(" " + StringUtil.vString(map.get("sql_version")));
			}
			if(map.containsKey("activeVersionID")){
				sql.append(" and t.activeVersionID = ").append(StringUtil.vString(map.get("activeVersionID")));
			}
			if(map.containsKey("begin_activeVersionID")){
				sql.append(" and t.activeVersionID >= ").append(StringUtil.vString(map.get("begin_activeVersionID")));
			}
			if(map.containsKey("end_activeVersionID")){
				sql.append(" and t.activeVersionID < ").append(StringUtil.vString(map.get("end_activeVersionID")));
			}
			if(map.containsKey("sql_activeVersionID")){
				sql.append(" " + StringUtil.vString(map.get("sql_activeVersionID")));
			}
			if(map.containsKey("VersionCreater")){
				sql.append(" and t.VersionCreater = ").append(StringUtil.vString(map.get("VersionCreater")));
			}
			if(map.containsKey("begin_VersionCreater")){
				sql.append(" and t.VersionCreater >= ").append(StringUtil.vString(map.get("begin_VersionCreater")));
			}
			if(map.containsKey("end_VersionCreater")){
				sql.append(" and t.VersionCreater < ").append(StringUtil.vString(map.get("end_VersionCreater")));
			}
			if(map.containsKey("sql_VersionCreater")){
				sql.append(" " + StringUtil.vString(map.get("sql_VersionCreater")));
			}
			if(map.containsKey("dsporder")){
				sql.append(" and t.dsporder = ").append(StringUtil.vString(map.get("dsporder")));
			}
			if(map.containsKey("begin_dsporder")){
				sql.append(" and t.dsporder >= ").append(StringUtil.vString(map.get("begin_dsporder")));
			}
			if(map.containsKey("end_dsporder")){
				sql.append(" and t.dsporder < ").append(StringUtil.vString(map.get("end_dsporder")));
			}
			if(map.containsKey("sql_dsporder")){
				sql.append(" " + StringUtil.vString(map.get("sql_dsporder")));
			}
			if(map.containsKey("chatsType")){
				sql.append(" and t.chatsType = ").append(StringUtil.vString(map.get("chatsType")));
			}
			if(map.containsKey("begin_chatsType")){
				sql.append(" and t.chatsType >= ").append(StringUtil.vString(map.get("begin_chatsType")));
			}
			if(map.containsKey("end_chatsType")){
				sql.append(" and t.chatsType < ").append(StringUtil.vString(map.get("end_chatsType")));
			}
			if(map.containsKey("sql_chatsType")){
				sql.append(" " + StringUtil.vString(map.get("sql_chatsType")));
			}
			if(map.containsKey("chatsAlertType")){
				sql.append(" and t.chatsAlertType = ").append(StringUtil.vString(map.get("chatsAlertType")));
			}
			if(map.containsKey("begin_chatsAlertType")){
				sql.append(" and t.chatsAlertType >= ").append(StringUtil.vString(map.get("begin_chatsAlertType")));
			}
			if(map.containsKey("end_chatsAlertType")){
				sql.append(" and t.chatsAlertType < ").append(StringUtil.vString(map.get("end_chatsAlertType")));
			}
			if(map.containsKey("sql_chatsAlertType")){
				sql.append(" " + StringUtil.vString(map.get("sql_chatsAlertType")));
			}
			if(map.containsKey("notRemindifArchived")){
				sql.append(" and t.notRemindifArchived = ").append(StringUtil.vString(map.get("notRemindifArchived")));
			}
			if(map.containsKey("begin_notRemindifArchived")){
				sql.append(" and t.notRemindifArchived >= ").append(StringUtil.vString(map.get("begin_notRemindifArchived")));
			}
			if(map.containsKey("end_notRemindifArchived")){
				sql.append(" and t.notRemindifArchived < ").append(StringUtil.vString(map.get("end_notRemindifArchived")));
			}
			if(map.containsKey("sql_notRemindifArchived")){
				sql.append(" " + StringUtil.vString(map.get("sql_notRemindifArchived")));
			}
			if(map.containsKey("isupdatetitle")){
				sql.append(" and t.isupdatetitle = ").append(StringUtil.vString(map.get("isupdatetitle")));
			}
			if(map.containsKey("begin_isupdatetitle")){
				sql.append(" and t.isupdatetitle >= ").append(StringUtil.vString(map.get("begin_isupdatetitle")));
			}
			if(map.containsKey("end_isupdatetitle")){
				sql.append(" and t.isupdatetitle < ").append(StringUtil.vString(map.get("end_isupdatetitle")));
			}
			if(map.containsKey("sql_isupdatetitle")){
				sql.append(" " + StringUtil.vString(map.get("sql_isupdatetitle")));
			}
			if(map.containsKey("workflowname")){
				sql.append(" and t.workflowname = '").append(StringUtil.vString(map.get("workflowname"))).append("'");
			}
			if(map.containsKey("like_workflowname")){
				sql.append(" and t.workflowname like '%").append(StringUtil.vString(map.get("like_workflowname"))).append("%'");
			}
			if(map.containsKey("sql_workflowname")){
				sql.append(" " + StringUtil.vString(map.get("sql_workflowname")));
			}
			if(map.containsKey("workflowdesc")){
				sql.append(" and t.workflowdesc = '").append(StringUtil.vString(map.get("workflowdesc"))).append("'");
			}
			if(map.containsKey("like_workflowdesc")){
				sql.append(" and t.workflowdesc like '%").append(StringUtil.vString(map.get("like_workflowdesc"))).append("%'");
			}
			if(map.containsKey("sql_workflowdesc")){
				sql.append(" " + StringUtil.vString(map.get("sql_workflowdesc")));
			}
			if(map.containsKey("securelevel")){
				sql.append(" and t.securelevel = '").append(StringUtil.vString(map.get("securelevel"))).append("'");
			}
			if(map.containsKey("like_securelevel")){
				sql.append(" and t.securelevel like '%").append(StringUtil.vString(map.get("like_securelevel"))).append("%'");
			}
			if(map.containsKey("sql_securelevel")){
				sql.append(" " + StringUtil.vString(map.get("sql_securelevel")));
			}
			if(map.containsKey("isbill")){
				sql.append(" and t.isbill = '").append(StringUtil.vString(map.get("isbill"))).append("'");
			}
			if(map.containsKey("like_isbill")){
				sql.append(" and t.isbill like '%").append(StringUtil.vString(map.get("like_isbill"))).append("%'");
			}
			if(map.containsKey("sql_isbill")){
				sql.append(" " + StringUtil.vString(map.get("sql_isbill")));
			}
			if(map.containsKey("isvalid")){
				sql.append(" and t.isvalid = '").append(StringUtil.vString(map.get("isvalid"))).append("'");
			}
			if(map.containsKey("like_isvalid")){
				sql.append(" and t.isvalid like '%").append(StringUtil.vString(map.get("like_isvalid"))).append("%'");
			}
			if(map.containsKey("sql_isvalid")){
				sql.append(" " + StringUtil.vString(map.get("sql_isvalid")));
			}
			if(map.containsKey("needmark")){
				sql.append(" and t.needmark = '").append(StringUtil.vString(map.get("needmark"))).append("'");
			}
			if(map.containsKey("like_needmark")){
				sql.append(" and t.needmark like '%").append(StringUtil.vString(map.get("like_needmark"))).append("%'");
			}
			if(map.containsKey("sql_needmark")){
				sql.append(" " + StringUtil.vString(map.get("sql_needmark")));
			}
			if(map.containsKey("docPath")){
				sql.append(" and t.docPath = '").append(StringUtil.vString(map.get("docPath"))).append("'");
			}
			if(map.containsKey("like_docPath")){
				sql.append(" and t.docPath like '%").append(StringUtil.vString(map.get("like_docPath"))).append("%'");
			}
			if(map.containsKey("sql_docPath")){
				sql.append(" " + StringUtil.vString(map.get("sql_docPath")));
			}
			if(map.containsKey("docCategory")){
				sql.append(" and t.docCategory = '").append(StringUtil.vString(map.get("docCategory"))).append("'");
			}
			if(map.containsKey("like_docCategory")){
				sql.append(" and t.docCategory like '%").append(StringUtil.vString(map.get("like_docCategory"))).append("%'");
			}
			if(map.containsKey("sql_docCategory")){
				sql.append(" " + StringUtil.vString(map.get("sql_docCategory")));
			}
			if(map.containsKey("istemplate")){
				sql.append(" and t.istemplate = '").append(StringUtil.vString(map.get("istemplate"))).append("'");
			}
			if(map.containsKey("like_istemplate")){
				sql.append(" and t.istemplate like '%").append(StringUtil.vString(map.get("like_istemplate"))).append("%'");
			}
			if(map.containsKey("sql_istemplate")){
				sql.append(" " + StringUtil.vString(map.get("sql_istemplate")));
			}
			if(map.containsKey("needAffirmance")){
				sql.append(" and t.needAffirmance = '").append(StringUtil.vString(map.get("needAffirmance"))).append("'");
			}
			if(map.containsKey("like_needAffirmance")){
				sql.append(" and t.needAffirmance like '%").append(StringUtil.vString(map.get("like_needAffirmance"))).append("%'");
			}
			if(map.containsKey("sql_needAffirmance")){
				sql.append(" " + StringUtil.vString(map.get("sql_needAffirmance")));
			}
			if(map.containsKey("isremarks")){
				sql.append(" and t.isremarks = '").append(StringUtil.vString(map.get("isremarks"))).append("'");
			}
			if(map.containsKey("like_isremarks")){
				sql.append(" and t.isremarks like '%").append(StringUtil.vString(map.get("like_isremarks"))).append("%'");
			}
			if(map.containsKey("sql_isremarks")){
				sql.append(" " + StringUtil.vString(map.get("sql_isremarks")));
			}
			if(map.containsKey("isannexUpload")){
				sql.append(" and t.isannexUpload = '").append(StringUtil.vString(map.get("isannexUpload"))).append("'");
			}
			if(map.containsKey("like_isannexUpload")){
				sql.append(" and t.isannexUpload like '%").append(StringUtil.vString(map.get("like_isannexUpload"))).append("%'");
			}
			if(map.containsKey("sql_isannexUpload")){
				sql.append(" " + StringUtil.vString(map.get("sql_isannexUpload")));
			}
			if(map.containsKey("annexdoccategory")){
				sql.append(" and t.annexdoccategory = '").append(StringUtil.vString(map.get("annexdoccategory"))).append("'");
			}
			if(map.containsKey("like_annexdoccategory")){
				sql.append(" and t.annexdoccategory like '%").append(StringUtil.vString(map.get("like_annexdoccategory"))).append("%'");
			}
			if(map.containsKey("sql_annexdoccategory")){
				sql.append(" " + StringUtil.vString(map.get("sql_annexdoccategory")));
			}
			if(map.containsKey("isShowOnReportInput")){
				sql.append(" and t.isShowOnReportInput = '").append(StringUtil.vString(map.get("isShowOnReportInput"))).append("'");
			}
			if(map.containsKey("like_isShowOnReportInput")){
				sql.append(" and t.isShowOnReportInput like '%").append(StringUtil.vString(map.get("like_isShowOnReportInput"))).append("%'");
			}
			if(map.containsKey("sql_isShowOnReportInput")){
				sql.append(" " + StringUtil.vString(map.get("sql_isShowOnReportInput")));
			}
			if(map.containsKey("isshowchart")){
				sql.append(" and t.isshowchart = '").append(StringUtil.vString(map.get("isshowchart"))).append("'");
			}
			if(map.containsKey("like_isshowchart")){
				sql.append(" and t.isshowchart like '%").append(StringUtil.vString(map.get("like_isshowchart"))).append("%'");
			}
			if(map.containsKey("sql_isshowchart")){
				sql.append(" " + StringUtil.vString(map.get("sql_isshowchart")));
			}
			if(map.containsKey("orderbytype")){
				sql.append(" and t.orderbytype = '").append(StringUtil.vString(map.get("orderbytype"))).append("'");
			}
			if(map.containsKey("like_orderbytype")){
				sql.append(" and t.orderbytype like '%").append(StringUtil.vString(map.get("like_orderbytype"))).append("%'");
			}
			if(map.containsKey("sql_orderbytype")){
				sql.append(" " + StringUtil.vString(map.get("sql_orderbytype")));
			}
			if(map.containsKey("isTriDiffWorkflow")){
				sql.append(" and t.isTriDiffWorkflow = '").append(StringUtil.vString(map.get("isTriDiffWorkflow"))).append("'");
			}
			if(map.containsKey("like_isTriDiffWorkflow")){
				sql.append(" and t.isTriDiffWorkflow like '%").append(StringUtil.vString(map.get("like_isTriDiffWorkflow"))).append("%'");
			}
			if(map.containsKey("sql_isTriDiffWorkflow")){
				sql.append(" " + StringUtil.vString(map.get("sql_isTriDiffWorkflow")));
			}
			if(map.containsKey("isModifyLog")){
				sql.append(" and t.isModifyLog = '").append(StringUtil.vString(map.get("isModifyLog"))).append("'");
			}
			if(map.containsKey("like_isModifyLog")){
				sql.append(" and t.isModifyLog like '%").append(StringUtil.vString(map.get("like_isModifyLog"))).append("%'");
			}
			if(map.containsKey("sql_isModifyLog")){
				sql.append(" " + StringUtil.vString(map.get("sql_isModifyLog")));
			}
			if(map.containsKey("ifVersion")){
				sql.append(" and t.ifVersion = '").append(StringUtil.vString(map.get("ifVersion"))).append("'");
			}
			if(map.containsKey("like_ifVersion")){
				sql.append(" and t.ifVersion like '%").append(StringUtil.vString(map.get("like_ifVersion"))).append("%'");
			}
			if(map.containsKey("sql_ifVersion")){
				sql.append(" " + StringUtil.vString(map.get("sql_ifVersion")));
			}
			if(map.containsKey("wfdocpath")){
				sql.append(" and t.wfdocpath = '").append(StringUtil.vString(map.get("wfdocpath"))).append("'");
			}
			if(map.containsKey("like_wfdocpath")){
				sql.append(" and t.wfdocpath like '%").append(StringUtil.vString(map.get("like_wfdocpath"))).append("%'");
			}
			if(map.containsKey("sql_wfdocpath")){
				sql.append(" " + StringUtil.vString(map.get("sql_wfdocpath")));
			}
			if(map.containsKey("wfdocowner")){
				sql.append(" and t.wfdocowner = '").append(StringUtil.vString(map.get("wfdocowner"))).append("'");
			}
			if(map.containsKey("like_wfdocowner")){
				sql.append(" and t.wfdocowner like '%").append(StringUtil.vString(map.get("like_wfdocowner"))).append("%'");
			}
			if(map.containsKey("sql_wfdocowner")){
				sql.append(" " + StringUtil.vString(map.get("sql_wfdocowner")));
			}
			if(map.containsKey("isEdit")){
				sql.append(" and t.isEdit = '").append(StringUtil.vString(map.get("isEdit"))).append("'");
			}
			if(map.containsKey("like_isEdit")){
				sql.append(" and t.isEdit like '%").append(StringUtil.vString(map.get("like_isEdit"))).append("%'");
			}
			if(map.containsKey("sql_isEdit")){
				sql.append(" " + StringUtil.vString(map.get("sql_isEdit")));
			}
			if(map.containsKey("editdate")){
				sql.append(" and t.editdate = '").append(StringUtil.vString(map.get("editdate"))).append("'");
			}
			if(map.containsKey("like_editdate")){
				sql.append(" and t.editdate like '%").append(StringUtil.vString(map.get("like_editdate"))).append("%'");
			}
			if(map.containsKey("sql_editdate")){
				sql.append(" " + StringUtil.vString(map.get("sql_editdate")));
			}
			if(map.containsKey("edittime")){
				sql.append(" and t.edittime = '").append(StringUtil.vString(map.get("edittime"))).append("'");
			}
			if(map.containsKey("like_edittime")){
				sql.append(" and t.edittime like '%").append(StringUtil.vString(map.get("like_edittime"))).append("%'");
			}
			if(map.containsKey("sql_edittime")){
				sql.append(" " + StringUtil.vString(map.get("sql_edittime")));
			}
			if(map.containsKey("ShowDelButtonByReject")){
				sql.append(" and t.ShowDelButtonByReject = '").append(StringUtil.vString(map.get("ShowDelButtonByReject"))).append("'");
			}
			if(map.containsKey("like_ShowDelButtonByReject")){
				sql.append(" and t.ShowDelButtonByReject like '%").append(StringUtil.vString(map.get("like_ShowDelButtonByReject"))).append("%'");
			}
			if(map.containsKey("sql_ShowDelButtonByReject")){
				sql.append(" " + StringUtil.vString(map.get("sql_ShowDelButtonByReject")));
			}
			if(map.containsKey("showUploadTab")){
				sql.append(" and t.showUploadTab = '").append(StringUtil.vString(map.get("showUploadTab"))).append("'");
			}
			if(map.containsKey("like_showUploadTab")){
				sql.append(" and t.showUploadTab like '%").append(StringUtil.vString(map.get("like_showUploadTab"))).append("%'");
			}
			if(map.containsKey("sql_showUploadTab")){
				sql.append(" " + StringUtil.vString(map.get("sql_showUploadTab")));
			}
			if(map.containsKey("isSignDoc")){
				sql.append(" and t.isSignDoc = '").append(StringUtil.vString(map.get("isSignDoc"))).append("'");
			}
			if(map.containsKey("like_isSignDoc")){
				sql.append(" and t.isSignDoc like '%").append(StringUtil.vString(map.get("like_isSignDoc"))).append("%'");
			}
			if(map.containsKey("sql_isSignDoc")){
				sql.append(" " + StringUtil.vString(map.get("sql_isSignDoc")));
			}
			if(map.containsKey("showDocTab")){
				sql.append(" and t.showDocTab = '").append(StringUtil.vString(map.get("showDocTab"))).append("'");
			}
			if(map.containsKey("like_showDocTab")){
				sql.append(" and t.showDocTab like '%").append(StringUtil.vString(map.get("like_showDocTab"))).append("%'");
			}
			if(map.containsKey("sql_showDocTab")){
				sql.append(" " + StringUtil.vString(map.get("sql_showDocTab")));
			}
			if(map.containsKey("isSignWorkflow")){
				sql.append(" and t.isSignWorkflow = '").append(StringUtil.vString(map.get("isSignWorkflow"))).append("'");
			}
			if(map.containsKey("like_isSignWorkflow")){
				sql.append(" and t.isSignWorkflow like '%").append(StringUtil.vString(map.get("like_isSignWorkflow"))).append("%'");
			}
			if(map.containsKey("sql_isSignWorkflow")){
				sql.append(" " + StringUtil.vString(map.get("sql_isSignWorkflow")));
			}
			if(map.containsKey("showWorkflowTab")){
				sql.append(" and t.showWorkflowTab = '").append(StringUtil.vString(map.get("showWorkflowTab"))).append("'");
			}
			if(map.containsKey("like_showWorkflowTab")){
				sql.append(" and t.showWorkflowTab like '%").append(StringUtil.vString(map.get("like_showWorkflowTab"))).append("%'");
			}
			if(map.containsKey("sql_showWorkflowTab")){
				sql.append(" " + StringUtil.vString(map.get("sql_showWorkflowTab")));
			}
			if(map.containsKey("candelacc")){
				sql.append(" and t.candelacc = '").append(StringUtil.vString(map.get("candelacc"))).append("'");
			}
			if(map.containsKey("like_candelacc")){
				sql.append(" and t.candelacc like '%").append(StringUtil.vString(map.get("like_candelacc"))).append("%'");
			}
			if(map.containsKey("sql_candelacc")){
				sql.append(" " + StringUtil.vString(map.get("sql_candelacc")));
			}
			if(map.containsKey("isforwardrights")){
				sql.append(" and t.isforwardrights = '").append(StringUtil.vString(map.get("isforwardrights"))).append("'");
			}
			if(map.containsKey("like_isforwardrights")){
				sql.append(" and t.isforwardrights like '%").append(StringUtil.vString(map.get("like_isforwardrights"))).append("%'");
			}
			if(map.containsKey("sql_isforwardrights")){
				sql.append(" " + StringUtil.vString(map.get("sql_isforwardrights")));
			}
			if(map.containsKey("isimportwf")){
				sql.append(" and t.isimportwf = '").append(StringUtil.vString(map.get("isimportwf"))).append("'");
			}
			if(map.containsKey("like_isimportwf")){
				sql.append(" and t.isimportwf like '%").append(StringUtil.vString(map.get("like_isimportwf"))).append("%'");
			}
			if(map.containsKey("sql_isimportwf")){
				sql.append(" " + StringUtil.vString(map.get("sql_isimportwf")));
			}
			if(map.containsKey("isrejectremind")){
				sql.append(" and t.isrejectremind = '").append(StringUtil.vString(map.get("isrejectremind"))).append("'");
			}
			if(map.containsKey("like_isrejectremind")){
				sql.append(" and t.isrejectremind like '%").append(StringUtil.vString(map.get("like_isrejectremind"))).append("%'");
			}
			if(map.containsKey("sql_isrejectremind")){
				sql.append(" " + StringUtil.vString(map.get("sql_isrejectremind")));
			}
			if(map.containsKey("ischangrejectnode")){
				sql.append(" and t.ischangrejectnode = '").append(StringUtil.vString(map.get("ischangrejectnode"))).append("'");
			}
			if(map.containsKey("like_ischangrejectnode")){
				sql.append(" and t.ischangrejectnode like '%").append(StringUtil.vString(map.get("like_ischangrejectnode"))).append("%'");
			}
			if(map.containsKey("sql_ischangrejectnode")){
				sql.append(" " + StringUtil.vString(map.get("sql_ischangrejectnode")));
			}
			if(map.containsKey("newdocpath")){
				sql.append(" and t.newdocpath = '").append(StringUtil.vString(map.get("newdocpath"))).append("'");
			}
			if(map.containsKey("like_newdocpath")){
				sql.append(" and t.newdocpath like '%").append(StringUtil.vString(map.get("like_newdocpath"))).append("%'");
			}
			if(map.containsKey("sql_newdocpath")){
				sql.append(" " + StringUtil.vString(map.get("sql_newdocpath")));
			}
			if(map.containsKey("custompage")){
				sql.append(" and t.custompage = '").append(StringUtil.vString(map.get("custompage"))).append("'");
			}
			if(map.containsKey("like_custompage")){
				sql.append(" and t.custompage like '%").append(StringUtil.vString(map.get("like_custompage"))).append("%'");
			}
			if(map.containsKey("sql_custompage")){
				sql.append(" " + StringUtil.vString(map.get("sql_custompage")));
			}
			if(map.containsKey("IsSelectrejectNode")){
				sql.append(" and t.IsSelectrejectNode = '").append(StringUtil.vString(map.get("IsSelectrejectNode"))).append("'");
			}
			if(map.containsKey("like_IsSelectrejectNode")){
				sql.append(" and t.IsSelectrejectNode like '%").append(StringUtil.vString(map.get("like_IsSelectrejectNode"))).append("%'");
			}
			if(map.containsKey("sql_IsSelectrejectNode")){
				sql.append(" " + StringUtil.vString(map.get("sql_IsSelectrejectNode")));
			}
			if(map.containsKey("isImportDetail")){
				sql.append(" and t.isImportDetail = '").append(StringUtil.vString(map.get("isImportDetail"))).append("'");
			}
			if(map.containsKey("like_isImportDetail")){
				sql.append(" and t.isImportDetail like '%").append(StringUtil.vString(map.get("like_isImportDetail"))).append("%'");
			}
			if(map.containsKey("sql_isImportDetail")){
				sql.append(" " + StringUtil.vString(map.get("sql_isImportDetail")));
			}
			if(map.containsKey("specialApproval")){
				sql.append(" and t.specialApproval = '").append(StringUtil.vString(map.get("specialApproval"))).append("'");
			}
			if(map.containsKey("like_specialApproval")){
				sql.append(" and t.specialApproval like '%").append(StringUtil.vString(map.get("like_specialApproval"))).append("%'");
			}
			if(map.containsKey("sql_specialApproval")){
				sql.append(" " + StringUtil.vString(map.get("sql_specialApproval")));
			}
			if(map.containsKey("Cycle")){
				sql.append(" and t.Cycle = '").append(StringUtil.vString(map.get("Cycle"))).append("'");
			}
			if(map.containsKey("like_Cycle")){
				sql.append(" and t.Cycle like '%").append(StringUtil.vString(map.get("like_Cycle"))).append("%'");
			}
			if(map.containsKey("sql_Cycle")){
				sql.append(" " + StringUtil.vString(map.get("sql_Cycle")));
			}
			if(map.containsKey("nosynfields")){
				sql.append(" and t.nosynfields = '").append(StringUtil.vString(map.get("nosynfields"))).append("'");
			}
			if(map.containsKey("like_nosynfields")){
				sql.append(" and t.nosynfields like '%").append(StringUtil.vString(map.get("like_nosynfields"))).append("%'");
			}
			if(map.containsKey("sql_nosynfields")){
				sql.append(" " + StringUtil.vString(map.get("sql_nosynfields")));
			}
			if(map.containsKey("isneeddelacc")){
				sql.append(" and t.isneeddelacc = '").append(StringUtil.vString(map.get("isneeddelacc"))).append("'");
			}
			if(map.containsKey("like_isneeddelacc")){
				sql.append(" and t.isneeddelacc like '%").append(StringUtil.vString(map.get("like_isneeddelacc"))).append("%'");
			}
			if(map.containsKey("sql_isneeddelacc")){
				sql.append(" " + StringUtil.vString(map.get("sql_isneeddelacc")));
			}
			if(map.containsKey("SAPSource")){
				sql.append(" and t.SAPSource = '").append(StringUtil.vString(map.get("SAPSource"))).append("'");
			}
			if(map.containsKey("like_SAPSource")){
				sql.append(" and t.SAPSource like '%").append(StringUtil.vString(map.get("like_SAPSource"))).append("%'");
			}
			if(map.containsKey("sql_SAPSource")){
				sql.append(" " + StringUtil.vString(map.get("sql_SAPSource")));
			}
			if(map.containsKey("isfnacontrol")){
				sql.append(" and t.isfnacontrol = '").append(StringUtil.vString(map.get("isfnacontrol"))).append("'");
			}
			if(map.containsKey("like_isfnacontrol")){
				sql.append(" and t.isfnacontrol like '%").append(StringUtil.vString(map.get("like_isfnacontrol"))).append("%'");
			}
			if(map.containsKey("sql_isfnacontrol")){
				sql.append(" " + StringUtil.vString(map.get("sql_isfnacontrol")));
			}
			if(map.containsKey("fnanodeid")){
				sql.append(" and t.fnanodeid = '").append(StringUtil.vString(map.get("fnanodeid"))).append("'");
			}
			if(map.containsKey("like_fnanodeid")){
				sql.append(" and t.fnanodeid like '%").append(StringUtil.vString(map.get("like_fnanodeid"))).append("%'");
			}
			if(map.containsKey("sql_fnanodeid")){
				sql.append(" " + StringUtil.vString(map.get("sql_fnanodeid")));
			}
			if(map.containsKey("fnadepartmentid")){
				sql.append(" and t.fnadepartmentid = '").append(StringUtil.vString(map.get("fnadepartmentid"))).append("'");
			}
			if(map.containsKey("like_fnadepartmentid")){
				sql.append(" and t.fnadepartmentid like '%").append(StringUtil.vString(map.get("like_fnadepartmentid"))).append("%'");
			}
			if(map.containsKey("sql_fnadepartmentid")){
				sql.append(" " + StringUtil.vString(map.get("sql_fnadepartmentid")));
			}
			if(map.containsKey("smsAlertsType")){
				sql.append(" and t.smsAlertsType = '").append(StringUtil.vString(map.get("smsAlertsType"))).append("'");
			}
			if(map.containsKey("like_smsAlertsType")){
				sql.append(" and t.smsAlertsType like '%").append(StringUtil.vString(map.get("like_smsAlertsType"))).append("%'");
			}
			if(map.containsKey("sql_smsAlertsType")){
				sql.append(" " + StringUtil.vString(map.get("sql_smsAlertsType")));
			}
			if(map.containsKey("isSaveCheckForm")){
				sql.append(" and t.isSaveCheckForm = '").append(StringUtil.vString(map.get("isSaveCheckForm"))).append("'");
			}
			if(map.containsKey("like_isSaveCheckForm")){
				sql.append(" and t.isSaveCheckForm like '%").append(StringUtil.vString(map.get("like_isSaveCheckForm"))).append("%'");
			}
			if(map.containsKey("sql_isSaveCheckForm")){
				sql.append(" " + StringUtil.vString(map.get("sql_isSaveCheckForm")));
			}
			if(map.containsKey("archiveNoMsgAlert")){
				sql.append(" and t.archiveNoMsgAlert = '").append(StringUtil.vString(map.get("archiveNoMsgAlert"))).append("'");
			}
			if(map.containsKey("like_archiveNoMsgAlert")){
				sql.append(" and t.archiveNoMsgAlert like '%").append(StringUtil.vString(map.get("like_archiveNoMsgAlert"))).append("%'");
			}
			if(map.containsKey("sql_archiveNoMsgAlert")){
				sql.append(" " + StringUtil.vString(map.get("sql_archiveNoMsgAlert")));
			}
			if(map.containsKey("archiveNoMailAlert")){
				sql.append(" and t.archiveNoMailAlert = '").append(StringUtil.vString(map.get("archiveNoMailAlert"))).append("'");
			}
			if(map.containsKey("like_archiveNoMailAlert")){
				sql.append(" and t.archiveNoMailAlert like '%").append(StringUtil.vString(map.get("like_archiveNoMailAlert"))).append("%'");
			}
			if(map.containsKey("sql_archiveNoMailAlert")){
				sql.append(" " + StringUtil.vString(map.get("sql_archiveNoMailAlert")));
			}
			if(map.containsKey("isfnabudgetwf")){
				sql.append(" and t.isfnabudgetwf = '").append(StringUtil.vString(map.get("isfnabudgetwf"))).append("'");
			}
			if(map.containsKey("like_isfnabudgetwf")){
				sql.append(" and t.isfnabudgetwf like '%").append(StringUtil.vString(map.get("like_isfnabudgetwf"))).append("%'");
			}
			if(map.containsKey("sql_isfnabudgetwf")){
				sql.append(" " + StringUtil.vString(map.get("sql_isfnabudgetwf")));
			}
			if(map.containsKey("forwardReceiveDef")){
				sql.append(" and t.forwardReceiveDef = '").append(StringUtil.vString(map.get("forwardReceiveDef"))).append("'");
			}
			if(map.containsKey("like_forwardReceiveDef")){
				sql.append(" and t.forwardReceiveDef like '%").append(StringUtil.vString(map.get("like_forwardReceiveDef"))).append("%'");
			}
			if(map.containsKey("sql_forwardReceiveDef")){
				sql.append(" " + StringUtil.vString(map.get("sql_forwardReceiveDef")));
			}
			if(map.containsKey("versionDescription")){
				sql.append(" and t.versionDescription = '").append(StringUtil.vString(map.get("versionDescription"))).append("'");
			}
			if(map.containsKey("like_versionDescription")){
				sql.append(" and t.versionDescription like '%").append(StringUtil.vString(map.get("like_versionDescription"))).append("%'");
			}
			if(map.containsKey("sql_versionDescription")){
				sql.append(" " + StringUtil.vString(map.get("sql_versionDescription")));
			}
			if(map.containsKey("fieldNotImport")){
				sql.append(" and t.fieldNotImport = '").append(StringUtil.vString(map.get("fieldNotImport"))).append("'");
			}
			if(map.containsKey("like_fieldNotImport")){
				sql.append(" and t.fieldNotImport like '%").append(StringUtil.vString(map.get("like_fieldNotImport"))).append("%'");
			}
			if(map.containsKey("sql_fieldNotImport")){
				sql.append(" " + StringUtil.vString(map.get("sql_fieldNotImport")));
			}
			if(map.containsKey("isfree")){
				sql.append(" and t.isfree = '").append(StringUtil.vString(map.get("isfree"))).append("'");
			}
			if(map.containsKey("like_isfree")){
				sql.append(" and t.isfree like '%").append(StringUtil.vString(map.get("like_isfree"))).append("%'");
			}
			if(map.containsKey("sql_isfree")){
				sql.append(" " + StringUtil.vString(map.get("sql_isfree")));
			}
			if(map.containsKey("ecologyPinyinSearch")){
				sql.append(" and t.ecology_pinyin_search = '").append(StringUtil.vString(map.get("ecologyPinyinSearch"))).append("'");
			}
			if(map.containsKey("like_ecologyPinyinSearch")){
				sql.append(" and t.ecology_pinyin_search like '%").append(StringUtil.vString(map.get("like_ecologyPinyinSearch"))).append("%'");
			}
			if(map.containsKey("sql_ecologyPinyinSearch")){
				sql.append(" " + StringUtil.vString(map.get("sql_ecologyPinyinSearch")));
			}
			if(map.containsKey("custompage4Emoble")){
				sql.append(" and t.custompage4Emoble = '").append(StringUtil.vString(map.get("custompage4Emoble"))).append("'");
			}
			if(map.containsKey("like_custompage4Emoble")){
				sql.append(" and t.custompage4Emoble like '%").append(StringUtil.vString(map.get("like_custompage4Emoble"))).append("%'");
			}
			if(map.containsKey("sql_custompage4Emoble")){
				sql.append(" " + StringUtil.vString(map.get("sql_custompage4Emoble")));
			}
			if(map.containsKey("isshared")){
				sql.append(" and t.isshared = '").append(StringUtil.vString(map.get("isshared"))).append("'");
			}
			if(map.containsKey("like_isshared")){
				sql.append(" and t.isshared like '%").append(StringUtil.vString(map.get("like_isshared"))).append("%'");
			}
			if(map.containsKey("sql_isshared")){
				sql.append(" " + StringUtil.vString(map.get("sql_isshared")));
			}
			if(map.containsKey("isoverrb")){
				sql.append(" and t.isoverrb = '").append(StringUtil.vString(map.get("isoverrb"))).append("'");
			}
			if(map.containsKey("like_isoverrb")){
				sql.append(" and t.isoverrb like '%").append(StringUtil.vString(map.get("like_isoverrb"))).append("%'");
			}
			if(map.containsKey("sql_isoverrb")){
				sql.append(" " + StringUtil.vString(map.get("sql_isoverrb")));
			}
			if(map.containsKey("isoveriv")){
				sql.append(" and t.isoveriv = '").append(StringUtil.vString(map.get("isoveriv"))).append("'");
			}
			if(map.containsKey("like_isoveriv")){
				sql.append(" and t.isoveriv like '%").append(StringUtil.vString(map.get("like_isoveriv"))).append("%'");
			}
			if(map.containsKey("sql_isoveriv")){
				sql.append(" " + StringUtil.vString(map.get("sql_isoveriv")));
			}
			if(map.containsKey("mfsql")){
				sql.append(" " + StringUtil.vString(map.get("mfsql")));
			}
			if(map.containsKey("sqlorderby")){
				sql.append(" order by " + StringUtil.vString(map.get("sqlorderby")));
			}else{
				sql.append(" order by t.id ").append(StringUtil.vString(map.get("sqlsortway")).length() > 0 ? StringUtil.vString(map.get("sqlsortway")) : "desc");
			}
		}
		rs.executeSql(sql.toString());
		WorkflowBase bean = null;
		while(rs.next()){
			bean = new WorkflowBase();
			bean.setId(StringUtil.parseToInt(rs.getString("id")));
			bean.setWorkflowname(StringUtil.vString(rs.getString("workflowname")));
			bean.setWorkflowdesc(StringUtil.vString(rs.getString("workflowdesc")));
			bean.setWorkflowtype(StringUtil.parseToInt(rs.getString("workflowtype")));
			bean.setSecurelevel(StringUtil.vString(rs.getString("securelevel")));
			bean.setFormid(StringUtil.parseToInt(rs.getString("formid")));
			bean.setUserid(StringUtil.parseToInt(rs.getString("userid")));
			bean.setIsbill(StringUtil.vString(rs.getString("isbill")));
			bean.setIscust(StringUtil.parseToInt(rs.getString("iscust")));
			bean.setHelpdocid(StringUtil.parseToInt(rs.getString("helpdocid")));
			bean.setIsvalid(StringUtil.vString(rs.getString("isvalid")));
			bean.setNeedmark(StringUtil.vString(rs.getString("needmark")));
			bean.setMessagetype(StringUtil.parseToInt(rs.getString("messageType")));
			bean.setMultisubmit(StringUtil.parseToInt(rs.getString("multiSubmit")));
			bean.setDefaultname(StringUtil.parseToInt(rs.getString("defaultName")));
			bean.setDocpath(StringUtil.vString(rs.getString("docPath")));
			bean.setSubcompanyid(StringUtil.parseToInt(rs.getString("subcompanyid")));
			bean.setMailmessagetype(StringUtil.parseToInt(rs.getString("mailMessageType")));
			bean.setDocrightbyoperator(StringUtil.parseToInt(rs.getString("docRightByOperator")));
			bean.setDoccategory(StringUtil.vString(rs.getString("docCategory")));
			bean.setIstemplate(StringUtil.vString(rs.getString("istemplate")));
			bean.setTemplateid(StringUtil.parseToInt(rs.getString("templateid")));
			bean.setCatelogtype(StringUtil.parseToInt(rs.getString("catelogType")));
			bean.setSelectedcatelog(StringUtil.parseToInt(rs.getString("selectedCateLog")));
			bean.setDocrightbyhrmresource(StringUtil.parseToInt(rs.getString("docRightByHrmResource")));
			bean.setNeedaffirmance(StringUtil.vString(rs.getString("needAffirmance")));
			bean.setIsremarks(StringUtil.vString(rs.getString("isremarks")));
			bean.setIsannexupload(StringUtil.vString(rs.getString("isannexUpload")));
			bean.setAnnexdoccategory(StringUtil.vString(rs.getString("annexdoccategory")));
			bean.setIsshowonreportinput(StringUtil.vString(rs.getString("isShowOnReportInput")));
			bean.setTitlefieldid(StringUtil.parseToInt(rs.getString("titleFieldId")));
			bean.setKeywordfieldid(StringUtil.parseToInt(rs.getString("keywordFieldId")));
			bean.setIsshowchart(StringUtil.vString(rs.getString("isshowchart")));
			bean.setOrderbytype(StringUtil.vString(rs.getString("orderbytype")));
			bean.setIstridiffworkflow(StringUtil.vString(rs.getString("isTriDiffWorkflow")));
			bean.setIsmodifylog(StringUtil.vString(rs.getString("isModifyLog")));
			bean.setIfversion(StringUtil.vString(rs.getString("ifVersion")));
			bean.setWfdocpath(StringUtil.vString(rs.getString("wfdocpath")));
			bean.setWfdocowner(StringUtil.vString(rs.getString("wfdocowner")));
			bean.setIsedit(StringUtil.vString(rs.getString("isEdit")));
			bean.setEditor(StringUtil.parseToInt(rs.getString("editor")));
			bean.setEditdate(StringUtil.vString(rs.getString("editdate")));
			bean.setEdittime(StringUtil.vString(rs.getString("edittime")));
			bean.setShowdelbuttonbyreject(StringUtil.vString(rs.getString("ShowDelButtonByReject")));
			bean.setShowuploadtab(StringUtil.vString(rs.getString("showUploadTab")));
			bean.setIssigndoc(StringUtil.vString(rs.getString("isSignDoc")));
			bean.setShowdoctab(StringUtil.vString(rs.getString("showDocTab")));
			bean.setIssignworkflow(StringUtil.vString(rs.getString("isSignWorkflow")));
			bean.setShowworkflowtab(StringUtil.vString(rs.getString("showWorkflowTab")));
			bean.setCandelacc(StringUtil.vString(rs.getString("candelacc")));
			bean.setIsforwardrights(StringUtil.vString(rs.getString("isforwardrights")));
			bean.setIsimportwf(StringUtil.vString(rs.getString("isimportwf")));
			bean.setIsrejectremind(StringUtil.vString(rs.getString("isrejectremind")));
			bean.setIschangrejectnode(StringUtil.vString(rs.getString("ischangrejectnode")));
			bean.setWfdocownertype(StringUtil.parseToInt(rs.getString("wfdocownertype")));
			bean.setWfdocownerfieldid(StringUtil.parseToInt(rs.getString("wfdocownerfieldid")));
			bean.setNewdocpath(StringUtil.vString(rs.getString("newdocpath")));
			bean.setKeepsign(StringUtil.parseToInt(rs.getString("keepsign")));
			bean.setSeccategoryid(StringUtil.parseToInt(rs.getString("secCategoryId")));
			bean.setCustompage(StringUtil.vString(rs.getString("custompage")));
			bean.setIssignview(StringUtil.parseToInt(rs.getString("issignview")));
			bean.setIsselectrejectnode(StringUtil.vString(rs.getString("IsSelectrejectNode")));
			bean.setForbidattdownload(StringUtil.parseToInt(rs.getString("forbidAttDownload")));
			bean.setIsimportdetail(StringUtil.vString(rs.getString("isImportDetail")));
			bean.setSpecialapproval(StringUtil.vString(rs.getString("specialApproval")));
			bean.setFrequency(StringUtil.parseToInt(rs.getString("Frequency")));
			bean.setCycle(StringUtil.vString(rs.getString("Cycle")));
			bean.setNosynfields(StringUtil.vString(rs.getString("nosynfields")));
			bean.setIsneeddelacc(StringUtil.vString(rs.getString("isneeddelacc")));
			bean.setSapsource(StringUtil.vString(rs.getString("SAPSource")));
			bean.setIsfnacontrol(StringUtil.vString(rs.getString("isfnacontrol")));
			bean.setFnanodeid(StringUtil.vString(rs.getString("fnanodeid")));
			bean.setFnadepartmentid(StringUtil.vString(rs.getString("fnadepartmentid")));
			bean.setSmsalertstype(StringUtil.vString(rs.getString("smsAlertsType")));
			bean.setIssavecheckform(StringUtil.vString(rs.getString("isSaveCheckForm")));
			bean.setArchivenomsgalert(StringUtil.vString(rs.getString("archiveNoMsgAlert")));
			bean.setArchivenomailalert(StringUtil.vString(rs.getString("archiveNoMailAlert")));
			bean.setIsfnabudgetwf(StringUtil.vString(rs.getString("isfnabudgetwf")));
			bean.setForwardreceivedef(StringUtil.vString(rs.getString("forwardReceiveDef")));
			bean.setIsworkflowdoc(StringUtil.parseToInt(rs.getString("isWorkflowDoc")));
			bean.setOfficaltype(StringUtil.parseToInt(rs.getString("officalType")));
			bean.setVersion(StringUtil.parseToInt(rs.getString("version")));
			bean.setActiveversionid(StringUtil.parseToInt(rs.getString("activeVersionID")));
			bean.setVersiondescription(StringUtil.vString(rs.getString("versionDescription")));
			bean.setVersioncreater(StringUtil.parseToInt(rs.getString("VersionCreater")));
			bean.setDsporder(StringUtil.parseToInt(rs.getString("dsporder")));
			bean.setFieldnotimport(StringUtil.vString(rs.getString("fieldNotImport")));
			bean.setIsfree(StringUtil.vString(rs.getString("isfree")));
			bean.setEcologyPinyinSearch(StringUtil.vString(rs.getString("ecology_pinyin_search")));
			bean.setChatstype(StringUtil.parseToInt(rs.getString("chatsType")));
			bean.setChatsalerttype(StringUtil.parseToInt(rs.getString("chatsAlertType")));
			bean.setNotremindifarchived(StringUtil.parseToInt(rs.getString("notRemindifArchived")));
			bean.setCustompage4emoble(StringUtil.vString(rs.getString("custompage4Emoble")));
			bean.setIsupdatetitle(StringUtil.parseToInt(rs.getString("isupdatetitle")));
			bean.setIsshared(StringUtil.vString(rs.getString("isshared")));
			bean.setForwardingsmsalerts("");
			bean.setIsoverrb(StringUtil.vString(rs.getString("isoverrb")));
			bean.setIsoveriv(StringUtil.vString(rs.getString("isoveriv")));
			list.add(bean);
		}
		return list;
	}

	public WorkflowBase get(Comparable id) {
		Map<String, Comparable> map = new HashMap<String, Comparable>();
		map.put("id", id);
		List<WorkflowBase> list = find(map);
		return list != null && list.size() > 0 ? list.get(0) : null;
	}

	public int count(Map<String, Comparable> map) {
    RecordSet rs = new RecordSet();
		StringBuffer sql = new StringBuffer("select count(id) as result from workflow_base where 1 = 1");
		if(map != null) {
			if(map.containsKey("id")){
				sql.append(" and id = ").append(StringUtil.vString(map.get("id")));
			}
			if(map.containsKey("sql_id")){
				sql.append(" " + StringUtil.vString(map.get("sql_id")));
			}
			if(map.containsKey("workflowtype")){
				sql.append(" and workflowtype = ").append(StringUtil.vString(map.get("workflowtype")));
			}
			if(map.containsKey("sql_workflowtype")){
				sql.append(" " + StringUtil.vString(map.get("sql_workflowtype")));
			}
			if(map.containsKey("formid")){
				sql.append(" and formid = ").append(StringUtil.vString(map.get("formid")));
			}
			if(map.containsKey("sql_formid")){
				sql.append(" " + StringUtil.vString(map.get("sql_formid")));
			}
			if(map.containsKey("userid")){
				sql.append(" and userid = ").append(StringUtil.vString(map.get("userid")));
			}
			if(map.containsKey("sql_userid")){
				sql.append(" " + StringUtil.vString(map.get("sql_userid")));
			}
			if(map.containsKey("iscust")){
				sql.append(" and iscust = ").append(StringUtil.vString(map.get("iscust")));
			}
			if(map.containsKey("sql_iscust")){
				sql.append(" " + StringUtil.vString(map.get("sql_iscust")));
			}
			if(map.containsKey("helpdocid")){
				sql.append(" and helpdocid = ").append(StringUtil.vString(map.get("helpdocid")));
			}
			if(map.containsKey("sql_helpdocid")){
				sql.append(" " + StringUtil.vString(map.get("sql_helpdocid")));
			}
			if(map.containsKey("messageType")){
				sql.append(" and messageType = ").append(StringUtil.vString(map.get("messageType")));
			}
			if(map.containsKey("sql_messageType")){
				sql.append(" " + StringUtil.vString(map.get("sql_messageType")));
			}
			if(map.containsKey("multiSubmit")){
				sql.append(" and multiSubmit = ").append(StringUtil.vString(map.get("multiSubmit")));
			}
			if(map.containsKey("sql_multiSubmit")){
				sql.append(" " + StringUtil.vString(map.get("sql_multiSubmit")));
			}
			if(map.containsKey("defaultName")){
				sql.append(" and defaultName = ").append(StringUtil.vString(map.get("defaultName")));
			}
			if(map.containsKey("sql_defaultName")){
				sql.append(" " + StringUtil.vString(map.get("sql_defaultName")));
			}
			if(map.containsKey("subcompanyid")){
				sql.append(" and subcompanyid = ").append(StringUtil.vString(map.get("subcompanyid")));
			}
			if(map.containsKey("sql_subcompanyid")){
				sql.append(" " + StringUtil.vString(map.get("sql_subcompanyid")));
			}
			if(map.containsKey("mailMessageType")){
				sql.append(" and mailMessageType = ").append(StringUtil.vString(map.get("mailMessageType")));
			}
			if(map.containsKey("sql_mailMessageType")){
				sql.append(" " + StringUtil.vString(map.get("sql_mailMessageType")));
			}
			if(map.containsKey("docRightByOperator")){
				sql.append(" and docRightByOperator = ").append(StringUtil.vString(map.get("docRightByOperator")));
			}
			if(map.containsKey("sql_docRightByOperator")){
				sql.append(" " + StringUtil.vString(map.get("sql_docRightByOperator")));
			}
			if(map.containsKey("templateid")){
				sql.append(" and templateid = ").append(StringUtil.vString(map.get("templateid")));
			}
			if(map.containsKey("sql_templateid")){
				sql.append(" " + StringUtil.vString(map.get("sql_templateid")));
			}
			if(map.containsKey("catelogType")){
				sql.append(" and catelogType = ").append(StringUtil.vString(map.get("catelogType")));
			}
			if(map.containsKey("sql_catelogType")){
				sql.append(" " + StringUtil.vString(map.get("sql_catelogType")));
			}
			if(map.containsKey("selectedCateLog")){
				sql.append(" and selectedCateLog = ").append(StringUtil.vString(map.get("selectedCateLog")));
			}
			if(map.containsKey("sql_selectedCateLog")){
				sql.append(" " + StringUtil.vString(map.get("sql_selectedCateLog")));
			}
			if(map.containsKey("docRightByHrmResource")){
				sql.append(" and docRightByHrmResource = ").append(StringUtil.vString(map.get("docRightByHrmResource")));
			}
			if(map.containsKey("sql_docRightByHrmResource")){
				sql.append(" " + StringUtil.vString(map.get("sql_docRightByHrmResource")));
			}
			if(map.containsKey("titleFieldId")){
				sql.append(" and titleFieldId = ").append(StringUtil.vString(map.get("titleFieldId")));
			}
			if(map.containsKey("sql_titleFieldId")){
				sql.append(" " + StringUtil.vString(map.get("sql_titleFieldId")));
			}
			if(map.containsKey("keywordFieldId")){
				sql.append(" and keywordFieldId = ").append(StringUtil.vString(map.get("keywordFieldId")));
			}
			if(map.containsKey("sql_keywordFieldId")){
				sql.append(" " + StringUtil.vString(map.get("sql_keywordFieldId")));
			}
			if(map.containsKey("editor")){
				sql.append(" and editor = ").append(StringUtil.vString(map.get("editor")));
			}
			if(map.containsKey("sql_editor")){
				sql.append(" " + StringUtil.vString(map.get("sql_editor")));
			}
			if(map.containsKey("wfdocownertype")){
				sql.append(" and wfdocownertype = ").append(StringUtil.vString(map.get("wfdocownertype")));
			}
			if(map.containsKey("sql_wfdocownertype")){
				sql.append(" " + StringUtil.vString(map.get("sql_wfdocownertype")));
			}
			if(map.containsKey("wfdocownerfieldid")){
				sql.append(" and wfdocownerfieldid = ").append(StringUtil.vString(map.get("wfdocownerfieldid")));
			}
			if(map.containsKey("sql_wfdocownerfieldid")){
				sql.append(" " + StringUtil.vString(map.get("sql_wfdocownerfieldid")));
			}
			if(map.containsKey("keepsign")){
				sql.append(" and keepsign = ").append(StringUtil.vString(map.get("keepsign")));
			}
			if(map.containsKey("sql_keepsign")){
				sql.append(" " + StringUtil.vString(map.get("sql_keepsign")));
			}
			if(map.containsKey("secCategoryId")){
				sql.append(" and secCategoryId = ").append(StringUtil.vString(map.get("secCategoryId")));
			}
			if(map.containsKey("sql_secCategoryId")){
				sql.append(" " + StringUtil.vString(map.get("sql_secCategoryId")));
			}
			if(map.containsKey("issignview")){
				sql.append(" and issignview = ").append(StringUtil.vString(map.get("issignview")));
			}
			if(map.containsKey("sql_issignview")){
				sql.append(" " + StringUtil.vString(map.get("sql_issignview")));
			}
			if(map.containsKey("forbidAttDownload")){
				sql.append(" and forbidAttDownload = ").append(StringUtil.vString(map.get("forbidAttDownload")));
			}
			if(map.containsKey("sql_forbidAttDownload")){
				sql.append(" " + StringUtil.vString(map.get("sql_forbidAttDownload")));
			}
			if(map.containsKey("Frequency")){
				sql.append(" and Frequency = ").append(StringUtil.vString(map.get("Frequency")));
			}
			if(map.containsKey("sql_Frequency")){
				sql.append(" " + StringUtil.vString(map.get("sql_Frequency")));
			}
			if(map.containsKey("isWorkflowDoc")){
				sql.append(" and isWorkflowDoc = ").append(StringUtil.vString(map.get("isWorkflowDoc")));
			}
			if(map.containsKey("sql_isWorkflowDoc")){
				sql.append(" " + StringUtil.vString(map.get("sql_isWorkflowDoc")));
			}
			if(map.containsKey("officalType")){
				sql.append(" and officalType = ").append(StringUtil.vString(map.get("officalType")));
			}
			if(map.containsKey("sql_officalType")){
				sql.append(" " + StringUtil.vString(map.get("sql_officalType")));
			}
			if(map.containsKey("version")){
				sql.append(" and version = ").append(StringUtil.vString(map.get("version")));
			}
			if(map.containsKey("sql_version")){
				sql.append(" " + StringUtil.vString(map.get("sql_version")));
			}
			if(map.containsKey("activeVersionID")){
				sql.append(" and activeVersionID = ").append(StringUtil.vString(map.get("activeVersionID")));
			}
			if(map.containsKey("sql_activeVersionID")){
				sql.append(" " + StringUtil.vString(map.get("sql_activeVersionID")));
			}
			if(map.containsKey("VersionCreater")){
				sql.append(" and VersionCreater = ").append(StringUtil.vString(map.get("VersionCreater")));
			}
			if(map.containsKey("sql_VersionCreater")){
				sql.append(" " + StringUtil.vString(map.get("sql_VersionCreater")));
			}
			if(map.containsKey("dsporder")){
				sql.append(" and dsporder = ").append(StringUtil.vString(map.get("dsporder")));
			}
			if(map.containsKey("sql_dsporder")){
				sql.append(" " + StringUtil.vString(map.get("sql_dsporder")));
			}
			if(map.containsKey("chatsType")){
				sql.append(" and chatsType = ").append(StringUtil.vString(map.get("chatsType")));
			}
			if(map.containsKey("sql_chatsType")){
				sql.append(" " + StringUtil.vString(map.get("sql_chatsType")));
			}
			if(map.containsKey("chatsAlertType")){
				sql.append(" and chatsAlertType = ").append(StringUtil.vString(map.get("chatsAlertType")));
			}
			if(map.containsKey("sql_chatsAlertType")){
				sql.append(" " + StringUtil.vString(map.get("sql_chatsAlertType")));
			}
			if(map.containsKey("notRemindifArchived")){
				sql.append(" and notRemindifArchived = ").append(StringUtil.vString(map.get("notRemindifArchived")));
			}
			if(map.containsKey("sql_notRemindifArchived")){
				sql.append(" " + StringUtil.vString(map.get("sql_notRemindifArchived")));
			}
			if(map.containsKey("isupdatetitle")){
				sql.append(" and isupdatetitle = ").append(StringUtil.vString(map.get("isupdatetitle")));
			}
			if(map.containsKey("sql_isupdatetitle")){
				sql.append(" " + StringUtil.vString(map.get("sql_isupdatetitle")));
			}
			if(map.containsKey("workflowname")){
				sql.append(" and workflowname = '").append(StringUtil.vString(map.get("workflowname"))).append("'");
			}
			if(map.containsKey("sql_workflowname")){
				sql.append(" " + StringUtil.vString(map.get("sql_workflowname")));
			}
			if(map.containsKey("workflowdesc")){
				sql.append(" and workflowdesc = '").append(StringUtil.vString(map.get("workflowdesc"))).append("'");
			}
			if(map.containsKey("sql_workflowdesc")){
				sql.append(" " + StringUtil.vString(map.get("sql_workflowdesc")));
			}
			if(map.containsKey("securelevel")){
				sql.append(" and securelevel = '").append(StringUtil.vString(map.get("securelevel"))).append("'");
			}
			if(map.containsKey("sql_securelevel")){
				sql.append(" " + StringUtil.vString(map.get("sql_securelevel")));
			}
			if(map.containsKey("isbill")){
				sql.append(" and isbill = '").append(StringUtil.vString(map.get("isbill"))).append("'");
			}
			if(map.containsKey("sql_isbill")){
				sql.append(" " + StringUtil.vString(map.get("sql_isbill")));
			}
			if(map.containsKey("isvalid")){
				sql.append(" and isvalid = '").append(StringUtil.vString(map.get("isvalid"))).append("'");
			}
			if(map.containsKey("sql_isvalid")){
				sql.append(" " + StringUtil.vString(map.get("sql_isvalid")));
			}
			if(map.containsKey("needmark")){
				sql.append(" and needmark = '").append(StringUtil.vString(map.get("needmark"))).append("'");
			}
			if(map.containsKey("sql_needmark")){
				sql.append(" " + StringUtil.vString(map.get("sql_needmark")));
			}
			if(map.containsKey("docPath")){
				sql.append(" and docPath = '").append(StringUtil.vString(map.get("docPath"))).append("'");
			}
			if(map.containsKey("sql_docPath")){
				sql.append(" " + StringUtil.vString(map.get("sql_docPath")));
			}
			if(map.containsKey("docCategory")){
				sql.append(" and docCategory = '").append(StringUtil.vString(map.get("docCategory"))).append("'");
			}
			if(map.containsKey("sql_docCategory")){
				sql.append(" " + StringUtil.vString(map.get("sql_docCategory")));
			}
			if(map.containsKey("istemplate")){
				sql.append(" and istemplate = '").append(StringUtil.vString(map.get("istemplate"))).append("'");
			}
			if(map.containsKey("sql_istemplate")){
				sql.append(" " + StringUtil.vString(map.get("sql_istemplate")));
			}
			if(map.containsKey("needAffirmance")){
				sql.append(" and needAffirmance = '").append(StringUtil.vString(map.get("needAffirmance"))).append("'");
			}
			if(map.containsKey("sql_needAffirmance")){
				sql.append(" " + StringUtil.vString(map.get("sql_needAffirmance")));
			}
			if(map.containsKey("isremarks")){
				sql.append(" and isremarks = '").append(StringUtil.vString(map.get("isremarks"))).append("'");
			}
			if(map.containsKey("sql_isremarks")){
				sql.append(" " + StringUtil.vString(map.get("sql_isremarks")));
			}
			if(map.containsKey("isannexUpload")){
				sql.append(" and isannexUpload = '").append(StringUtil.vString(map.get("isannexUpload"))).append("'");
			}
			if(map.containsKey("sql_isannexUpload")){
				sql.append(" " + StringUtil.vString(map.get("sql_isannexUpload")));
			}
			if(map.containsKey("annexdoccategory")){
				sql.append(" and annexdoccategory = '").append(StringUtil.vString(map.get("annexdoccategory"))).append("'");
			}
			if(map.containsKey("sql_annexdoccategory")){
				sql.append(" " + StringUtil.vString(map.get("sql_annexdoccategory")));
			}
			if(map.containsKey("isShowOnReportInput")){
				sql.append(" and isShowOnReportInput = '").append(StringUtil.vString(map.get("isShowOnReportInput"))).append("'");
			}
			if(map.containsKey("sql_isShowOnReportInput")){
				sql.append(" " + StringUtil.vString(map.get("sql_isShowOnReportInput")));
			}
			if(map.containsKey("isshowchart")){
				sql.append(" and isshowchart = '").append(StringUtil.vString(map.get("isshowchart"))).append("'");
			}
			if(map.containsKey("sql_isshowchart")){
				sql.append(" " + StringUtil.vString(map.get("sql_isshowchart")));
			}
			if(map.containsKey("orderbytype")){
				sql.append(" and orderbytype = '").append(StringUtil.vString(map.get("orderbytype"))).append("'");
			}
			if(map.containsKey("sql_orderbytype")){
				sql.append(" " + StringUtil.vString(map.get("sql_orderbytype")));
			}
			if(map.containsKey("isTriDiffWorkflow")){
				sql.append(" and isTriDiffWorkflow = '").append(StringUtil.vString(map.get("isTriDiffWorkflow"))).append("'");
			}
			if(map.containsKey("sql_isTriDiffWorkflow")){
				sql.append(" " + StringUtil.vString(map.get("sql_isTriDiffWorkflow")));
			}
			if(map.containsKey("isModifyLog")){
				sql.append(" and isModifyLog = '").append(StringUtil.vString(map.get("isModifyLog"))).append("'");
			}
			if(map.containsKey("sql_isModifyLog")){
				sql.append(" " + StringUtil.vString(map.get("sql_isModifyLog")));
			}
			if(map.containsKey("ifVersion")){
				sql.append(" and ifVersion = '").append(StringUtil.vString(map.get("ifVersion"))).append("'");
			}
			if(map.containsKey("sql_ifVersion")){
				sql.append(" " + StringUtil.vString(map.get("sql_ifVersion")));
			}
			if(map.containsKey("wfdocpath")){
				sql.append(" and wfdocpath = '").append(StringUtil.vString(map.get("wfdocpath"))).append("'");
			}
			if(map.containsKey("sql_wfdocpath")){
				sql.append(" " + StringUtil.vString(map.get("sql_wfdocpath")));
			}
			if(map.containsKey("wfdocowner")){
				sql.append(" and wfdocowner = '").append(StringUtil.vString(map.get("wfdocowner"))).append("'");
			}
			if(map.containsKey("sql_wfdocowner")){
				sql.append(" " + StringUtil.vString(map.get("sql_wfdocowner")));
			}
			if(map.containsKey("isEdit")){
				sql.append(" and isEdit = '").append(StringUtil.vString(map.get("isEdit"))).append("'");
			}
			if(map.containsKey("sql_isEdit")){
				sql.append(" " + StringUtil.vString(map.get("sql_isEdit")));
			}
			if(map.containsKey("editdate")){
				sql.append(" and editdate = '").append(StringUtil.vString(map.get("editdate"))).append("'");
			}
			if(map.containsKey("sql_editdate")){
				sql.append(" " + StringUtil.vString(map.get("sql_editdate")));
			}
			if(map.containsKey("edittime")){
				sql.append(" and edittime = '").append(StringUtil.vString(map.get("edittime"))).append("'");
			}
			if(map.containsKey("sql_edittime")){
				sql.append(" " + StringUtil.vString(map.get("sql_edittime")));
			}
			if(map.containsKey("ShowDelButtonByReject")){
				sql.append(" and ShowDelButtonByReject = '").append(StringUtil.vString(map.get("ShowDelButtonByReject"))).append("'");
			}
			if(map.containsKey("sql_ShowDelButtonByReject")){
				sql.append(" " + StringUtil.vString(map.get("sql_ShowDelButtonByReject")));
			}
			if(map.containsKey("showUploadTab")){
				sql.append(" and showUploadTab = '").append(StringUtil.vString(map.get("showUploadTab"))).append("'");
			}
			if(map.containsKey("sql_showUploadTab")){
				sql.append(" " + StringUtil.vString(map.get("sql_showUploadTab")));
			}
			if(map.containsKey("isSignDoc")){
				sql.append(" and isSignDoc = '").append(StringUtil.vString(map.get("isSignDoc"))).append("'");
			}
			if(map.containsKey("sql_isSignDoc")){
				sql.append(" " + StringUtil.vString(map.get("sql_isSignDoc")));
			}
			if(map.containsKey("showDocTab")){
				sql.append(" and showDocTab = '").append(StringUtil.vString(map.get("showDocTab"))).append("'");
			}
			if(map.containsKey("sql_showDocTab")){
				sql.append(" " + StringUtil.vString(map.get("sql_showDocTab")));
			}
			if(map.containsKey("isSignWorkflow")){
				sql.append(" and isSignWorkflow = '").append(StringUtil.vString(map.get("isSignWorkflow"))).append("'");
			}
			if(map.containsKey("sql_isSignWorkflow")){
				sql.append(" " + StringUtil.vString(map.get("sql_isSignWorkflow")));
			}
			if(map.containsKey("showWorkflowTab")){
				sql.append(" and showWorkflowTab = '").append(StringUtil.vString(map.get("showWorkflowTab"))).append("'");
			}
			if(map.containsKey("sql_showWorkflowTab")){
				sql.append(" " + StringUtil.vString(map.get("sql_showWorkflowTab")));
			}
			if(map.containsKey("candelacc")){
				sql.append(" and candelacc = '").append(StringUtil.vString(map.get("candelacc"))).append("'");
			}
			if(map.containsKey("sql_candelacc")){
				sql.append(" " + StringUtil.vString(map.get("sql_candelacc")));
			}
			if(map.containsKey("isforwardrights")){
				sql.append(" and isforwardrights = '").append(StringUtil.vString(map.get("isforwardrights"))).append("'");
			}
			if(map.containsKey("sql_isforwardrights")){
				sql.append(" " + StringUtil.vString(map.get("sql_isforwardrights")));
			}
			if(map.containsKey("isimportwf")){
				sql.append(" and isimportwf = '").append(StringUtil.vString(map.get("isimportwf"))).append("'");
			}
			if(map.containsKey("sql_isimportwf")){
				sql.append(" " + StringUtil.vString(map.get("sql_isimportwf")));
			}
			if(map.containsKey("isrejectremind")){
				sql.append(" and isrejectremind = '").append(StringUtil.vString(map.get("isrejectremind"))).append("'");
			}
			if(map.containsKey("sql_isrejectremind")){
				sql.append(" " + StringUtil.vString(map.get("sql_isrejectremind")));
			}
			if(map.containsKey("ischangrejectnode")){
				sql.append(" and ischangrejectnode = '").append(StringUtil.vString(map.get("ischangrejectnode"))).append("'");
			}
			if(map.containsKey("sql_ischangrejectnode")){
				sql.append(" " + StringUtil.vString(map.get("sql_ischangrejectnode")));
			}
			if(map.containsKey("newdocpath")){
				sql.append(" and newdocpath = '").append(StringUtil.vString(map.get("newdocpath"))).append("'");
			}
			if(map.containsKey("sql_newdocpath")){
				sql.append(" " + StringUtil.vString(map.get("sql_newdocpath")));
			}
			if(map.containsKey("custompage")){
				sql.append(" and custompage = '").append(StringUtil.vString(map.get("custompage"))).append("'");
			}
			if(map.containsKey("sql_custompage")){
				sql.append(" " + StringUtil.vString(map.get("sql_custompage")));
			}
			if(map.containsKey("IsSelectrejectNode")){
				sql.append(" and IsSelectrejectNode = '").append(StringUtil.vString(map.get("IsSelectrejectNode"))).append("'");
			}
			if(map.containsKey("sql_IsSelectrejectNode")){
				sql.append(" " + StringUtil.vString(map.get("sql_IsSelectrejectNode")));
			}
			if(map.containsKey("isImportDetail")){
				sql.append(" and isImportDetail = '").append(StringUtil.vString(map.get("isImportDetail"))).append("'");
			}
			if(map.containsKey("sql_isImportDetail")){
				sql.append(" " + StringUtil.vString(map.get("sql_isImportDetail")));
			}
			if(map.containsKey("specialApproval")){
				sql.append(" and specialApproval = '").append(StringUtil.vString(map.get("specialApproval"))).append("'");
			}
			if(map.containsKey("sql_specialApproval")){
				sql.append(" " + StringUtil.vString(map.get("sql_specialApproval")));
			}
			if(map.containsKey("Cycle")){
				sql.append(" and Cycle = '").append(StringUtil.vString(map.get("Cycle"))).append("'");
			}
			if(map.containsKey("sql_Cycle")){
				sql.append(" " + StringUtil.vString(map.get("sql_Cycle")));
			}
			if(map.containsKey("nosynfields")){
				sql.append(" and nosynfields = '").append(StringUtil.vString(map.get("nosynfields"))).append("'");
			}
			if(map.containsKey("sql_nosynfields")){
				sql.append(" " + StringUtil.vString(map.get("sql_nosynfields")));
			}
			if(map.containsKey("isneeddelacc")){
				sql.append(" and isneeddelacc = '").append(StringUtil.vString(map.get("isneeddelacc"))).append("'");
			}
			if(map.containsKey("sql_isneeddelacc")){
				sql.append(" " + StringUtil.vString(map.get("sql_isneeddelacc")));
			}
			if(map.containsKey("SAPSource")){
				sql.append(" and SAPSource = '").append(StringUtil.vString(map.get("SAPSource"))).append("'");
			}
			if(map.containsKey("sql_SAPSource")){
				sql.append(" " + StringUtil.vString(map.get("sql_SAPSource")));
			}
			if(map.containsKey("isfnacontrol")){
				sql.append(" and isfnacontrol = '").append(StringUtil.vString(map.get("isfnacontrol"))).append("'");
			}
			if(map.containsKey("sql_isfnacontrol")){
				sql.append(" " + StringUtil.vString(map.get("sql_isfnacontrol")));
			}
			if(map.containsKey("fnanodeid")){
				sql.append(" and fnanodeid = '").append(StringUtil.vString(map.get("fnanodeid"))).append("'");
			}
			if(map.containsKey("sql_fnanodeid")){
				sql.append(" " + StringUtil.vString(map.get("sql_fnanodeid")));
			}
			if(map.containsKey("fnadepartmentid")){
				sql.append(" and fnadepartmentid = '").append(StringUtil.vString(map.get("fnadepartmentid"))).append("'");
			}
			if(map.containsKey("sql_fnadepartmentid")){
				sql.append(" " + StringUtil.vString(map.get("sql_fnadepartmentid")));
			}
			if(map.containsKey("smsAlertsType")){
				sql.append(" and smsAlertsType = '").append(StringUtil.vString(map.get("smsAlertsType"))).append("'");
			}
			if(map.containsKey("sql_smsAlertsType")){
				sql.append(" " + StringUtil.vString(map.get("sql_smsAlertsType")));
			}
			if(map.containsKey("isSaveCheckForm")){
				sql.append(" and isSaveCheckForm = '").append(StringUtil.vString(map.get("isSaveCheckForm"))).append("'");
			}
			if(map.containsKey("sql_isSaveCheckForm")){
				sql.append(" " + StringUtil.vString(map.get("sql_isSaveCheckForm")));
			}
			if(map.containsKey("archiveNoMsgAlert")){
				sql.append(" and archiveNoMsgAlert = '").append(StringUtil.vString(map.get("archiveNoMsgAlert"))).append("'");
			}
			if(map.containsKey("sql_archiveNoMsgAlert")){
				sql.append(" " + StringUtil.vString(map.get("sql_archiveNoMsgAlert")));
			}
			if(map.containsKey("archiveNoMailAlert")){
				sql.append(" and archiveNoMailAlert = '").append(StringUtil.vString(map.get("archiveNoMailAlert"))).append("'");
			}
			if(map.containsKey("sql_archiveNoMailAlert")){
				sql.append(" " + StringUtil.vString(map.get("sql_archiveNoMailAlert")));
			}
			if(map.containsKey("isfnabudgetwf")){
				sql.append(" and isfnabudgetwf = '").append(StringUtil.vString(map.get("isfnabudgetwf"))).append("'");
			}
			if(map.containsKey("sql_isfnabudgetwf")){
				sql.append(" " + StringUtil.vString(map.get("sql_isfnabudgetwf")));
			}
			if(map.containsKey("forwardReceiveDef")){
				sql.append(" and forwardReceiveDef = '").append(StringUtil.vString(map.get("forwardReceiveDef"))).append("'");
			}
			if(map.containsKey("sql_forwardReceiveDef")){
				sql.append(" " + StringUtil.vString(map.get("sql_forwardReceiveDef")));
			}
			if(map.containsKey("versionDescription")){
				sql.append(" and versionDescription = '").append(StringUtil.vString(map.get("versionDescription"))).append("'");
			}
			if(map.containsKey("sql_versionDescription")){
				sql.append(" " + StringUtil.vString(map.get("sql_versionDescription")));
			}
			if(map.containsKey("fieldNotImport")){
				sql.append(" and fieldNotImport = '").append(StringUtil.vString(map.get("fieldNotImport"))).append("'");
			}
			if(map.containsKey("sql_fieldNotImport")){
				sql.append(" " + StringUtil.vString(map.get("sql_fieldNotImport")));
			}
			if(map.containsKey("isfree")){
				sql.append(" and isfree = '").append(StringUtil.vString(map.get("isfree"))).append("'");
			}
			if(map.containsKey("sql_isfree")){
				sql.append(" " + StringUtil.vString(map.get("sql_isfree")));
			}
			if(map.containsKey("ecologyPinyinSearch")){
				sql.append(" and ecology_pinyin_search = '").append(StringUtil.vString(map.get("ecologyPinyinSearch"))).append("'");
			}
			if(map.containsKey("sql_ecologyPinyinSearch")){
				sql.append(" " + StringUtil.vString(map.get("sql_ecologyPinyinSearch")));
			}
			if(map.containsKey("custompage4Emoble")){
				sql.append(" and custompage4Emoble = '").append(StringUtil.vString(map.get("custompage4Emoble"))).append("'");
			}
			if(map.containsKey("sql_custompage4Emoble")){
				sql.append(" " + StringUtil.vString(map.get("sql_custompage4Emoble")));
			}
			if(map.containsKey("isshared")){
				sql.append(" and isshared = '").append(StringUtil.vString(map.get("isshared"))).append("'");
			}
			if(map.containsKey("sql_isshared")){
				sql.append(" " + StringUtil.vString(map.get("sql_isshared")));
			}
			if(map.containsKey("isoverrb")){
				sql.append(" and isoverrb = '").append(StringUtil.vString(map.get("isoverrb"))).append("'");
			}
			if(map.containsKey("sql_isoverrb")){
				sql.append(" " + StringUtil.vString(map.get("sql_isoverrb")));
			}
			if(map.containsKey("isoveriv")){
				sql.append(" and isoveriv = '").append(StringUtil.vString(map.get("isoveriv"))).append("'");
			}
			if(map.containsKey("sql_isoveriv")){
				sql.append(" " + StringUtil.vString(map.get("sql_isoveriv")));
			}
		}
		rs.executeSql(sql.toString());
		return rs.next() ? rs.getInt(1) : 0;
	}

	public void delete(Comparable id) {
		
	}

	public void delete(Map<String, Comparable> map) {
		if(map == null || map.isEmpty()) return;
	}

}
