package com.engine.htsc.workflow.ld;

import weaver.conn.RecordSet;
import weaver.general.Util;

public class whGetTableTools {
    public boolean getTableByRequestid(String requestid){
        boolean flag=true;
        try {
            RecordSet rs = new RecordSet();
            String formid = "formtable_main_";

            String sql = " select abs(t.formid) as formid \n" +
                    " from workflow_base t\n" +
                    " inner join workflow_requestbase l on l.workflowid = t.id\n" +
                    " where l.requestid=" + requestid + "";
            rs.execute(sql);
            if (rs.next()) {
                formid = formid + Util.getIntValues(rs.getString("formid"));
            }

            String sqlvalue = "  update  " + formid + " set  sfbh='1'   where requestid=" + requestid + "";
            rs.execute(sqlvalue);
        }catch (Exception exo){
            flag=false;
        }
        return flag;
    }
}
