select a.id,a.proc_inst_id,a.project_name, d.channel_group project_group, a.record_date, a.project_code, a.channel, a.contact_date, a.project_date, a.decision_date, a.industry, a.company, a.description, a.project_contacts, a.invest_head, a.previous_financing, a.financing_stage, a.financing_condition, a.financing_money, a.financing_date, a.invest_sparkle, a.invest_valuation, a.invest_money, a.invest_type, a.invest_ploy, a.invest_worth, a.shareholding, a.project_stage, a.project_state, a.mark, a.approval_flag, a.investigate_flag, a.decision_flag, a.del_flag, a.create_by, a.create_time, a.update_by, a.update_time,
b.id companyId, b.company_name, b.project_pool_id, b.filing_time, b.company_code, b.start_time, b.end_time, b.registered_capital, b.registered_address, b.paid_capital, b.business_address, b.actual_bod, b.phone, b.type,
c.id, c.name, c.position, c.contact,
d.channel_name, d.channel_code, d.channel_type, d.channel_group, d.channel_blurb, d.contacts, d.telephone, d.address, d.channel_head
from t_project_pool a
left join t_project_company b ON a.id = b.project_pool_id
left join t_project_contacts c ON a.project_contacts = c.id
left join t_project_channel d ON a.channel = d.id
select a.id,a.proc_inst_id, a.project_name, d.channel_group project_group, a.record_date, a.project_code, a.channel, a.contact_date, a.project_date, a.decision_date, a.industry, a.company, a.description, a.project_contacts, a.invest_head, a.previous_financing, a.financing_stage, a.financing_condition, a.financing_money, a.financing_date, a.invest_sparkle, a.invest_valuation, a.invest_money, a.invest_type, a.invest_ploy, a.invest_worth, a.shareholding, a.project_stage, a.project_state, a.mark, a.approval_flag, a.investigate_flag, a.decision_flag, a.del_flag, a.create_by, a.create_time, a.update_by, a.update_time,
b.id companyId, b.company_name, b.project_pool_id, b.filing_time, b.company_code, b.start_time, b.end_time, b.registered_capital, b.registered_address, b.paid_capital, b.business_address, b.actual_bod, b.phone, b.type,
c.id, c.name, c.position, c.contact,
d.channel_name, d.channel_code, d.channel_type, d.channel_group, d.channel_blurb, d.contacts, d.telephone, d.address, d.channel_head,
r.id, r.context, r.review_person, r.review_person_id
from t_project_pool a
left join t_project_company b ON a.id = b.project_pool_id
left join t_project_contacts c ON a.project_contacts = c.id
left join t_project_channel d ON a.channel = d.id
left join t_project_review r ON a.id = r.project_pool_id AND r.review_person_id = #{createBy}
and a.project_name like concat('%', #{projectPool.projectName}, '%')
and a.project_group = #{projectPool.projectGroup}
and a.project_code = #{projectPool.projectCode}
and a.channel = #{projectPool.channel}
and a.contact_date = #{projectPool.contactDate}
and a.project_date = #{projectPool.projectDate}
and a.decision_date = #{projectPool.decisionDate}
and a.industry = #{projectPool.industry}
and b.company_name like concat('%', #{projectPool.company}, '%')
and c.name like concat('%', #{projectPool.projectContacts}, '%')
and a.invest_head like concat('%', #{projectPool.investHead}, '%')
and a.previous_financing = #{projectPool.previousFinancing}
and a.financing_stage = #{projectPool.financingStage}
and a.financing_money = #{projectPool.financingMoney}
and a.financing_date = #{projectPool.financingDate}
and a.invest_valuation = #{projectPool.investValuation}
and a.invest_money = #{projectPool.investMoney}
and a.invest_type = #{projectPool.investType}
and a.invest_ploy = #{projectPool.investPloy}
and a.invest_worth = #{projectPool.investWorth}
and a.project_stage = #{projectPool.projectStage}
and a.project_state = #{projectPool.projectState}
and a.del_flag = #{projectPool.delFlag}