select res.*,pa.proc_inst_id,pa.assignee,pa.assignee_name,pa.main_title,pa.flow_branch_id,pa.task_name,pa.agree,pa.flow_last_time,pa.comment_msg,pa.proc_def_id,pa.flow_state from xm_env_list res left join xm_env_list_process_approva pa on res.id=pa.env_id and res.biz_proc_inst_id=pa.proc_inst_id and res.branch_id=pa.branch_id
select res.*,pa.proc_inst_id,pa.assignee,pa.assignee_name,pa.main_title,pa.flow_branch_id,pa.task_name,pa.agree,pa.flow_last_time,pa.comment_msg,pa.proc_def_id,pa.flow_state from xm_file res left join xm_file_process_approva pa on res.id=pa.file_id and res.biz_proc_inst_id=pa.proc_inst_id
select res.*,pa.proc_inst_id,pa.assignee,pa.assignee_name,pa.main_title,pa.flow_branch_id,pa.task_name,pa.agree,pa.flow_last_time,pa.comment_msg,pa.proc_def_id,pa.flow_state from xm_project_env_list res left join xm_project_env_list_process_approva pa on res.id=pa.env_id and res.biz_proc_inst_id=pa.proc_inst_id
select res.*,pa.proc_inst_id,pa.assignee,pa.assignee_name,pa.main_title,pa.flow_branch_id,pa.task_name,pa.agree,pa.flow_last_time,pa.comment_msg,pa.proc_def_id,pa.flow_state from xm_project_m_budget_cost_nouser res left join xm_project_m_budget_cost_nouser_process_approva pa on res.id=pa.budget_id and res.biz_proc_inst_id=pa.proc_inst_id
select res.* from xm_project_m_budget_cost_nouser res
select res.project_id,res.userid,res.username,subject_id,subject_name,bizz_month,sum(res.budget_cost) as budget_cost from xm_project_m_budget_cost_user res
select res.*,pa.proc_inst_id,pa.assignee,pa.assignee_name,pa.main_title,pa.flow_branch_id,pa.task_name,pa.agree,pa.flow_last_time,pa.comment_msg,pa.proc_def_id,pa.flow_state from xm_project_m_budget_cost_user res left join xm_project_m_budget_cost_user_process_approva pa on res.id=pa.budget_id and res.biz_proc_inst_id=pa.proc_inst_id
select res.* from xm_project_m_budget_cost_user res
select res.*,pa.proc_inst_id,pa.assignee,pa.assignee_name,pa.main_title,pa.flow_branch_id,pa.task_name,pa.agree,pa.flow_last_time,pa.comment_msg,pa.proc_def_id,pa.flow_state from xm_project_m_cost_nouser res left join xm_project_m_cost_nouser_process_approva pa on res.id=pa.cost_id and res.biz_proc_inst_id=pa.proc_inst_id
select res.*,pa.proc_inst_id,pa.assignee,pa.assignee_name,pa.main_title,pa.flow_branch_id,pa.task_name,pa.agree,pa.flow_last_time,pa.comment_msg,pa.proc_def_id,pa.flow_state from xm_project_m_cost_user res left join xm_project_m_cost_user_process_approva pa on res.id=pa.cost_id and res.biz_proc_inst_id=pa.proc_inst_id
<iftest="linkIterationId != null and linkIterationId != ''"> and exists (select 1 from xm_menu m where m.iteration_id=#{linkIterationId} and m.menu_id=res.menu_id) </if>