sql:
select pre_hire.employee_number 工号,
pre_hire.name 姓名,
legal_entity_trans.value 签订主体,
contract_agreement_trans.value 合同类型,
contract_category_trans.value 期限类型,
pre_hire.contract_date_start 开始日期,
pre_hire.contract_date_end 结束日期,
pre_hire.trial_date_start 试用期开始日期,
pre_hire.trial_date_end 试用期结束日期
from pre_hire
left join legal_entity
on pre_hire.sign_legal_entity_id=legal_entity.id
left join ir_translation legal_entity_trans on legal_entity_trans.res_id=legal_entity.id
and legal_entity_trans.name ='legal.entity,name'
and legal_entity_trans.lang='zh_CN'
left join contract_agreement
on pre_hire.contract_agreement_id=contract_agreement.id
left join ir_translation contract_agreement_trans on contract_agreement_trans.res_id=contract_agreement.id
and contract_agreement_trans.name ='contract.agreement,name'
and contract_agreement_trans.lang='zh_CN'
left join contract_category
on pre_hire.contract_category_id=contract_category.id
left join ir_translation contract_category_trans on contract_category_trans.res_id=contract_category.id
and contract_category_trans.name ='contract.category,name'
and contract_category_trans.lang='zh_CN'
where pre_hire.hire_status='hired'
sql:
select pre_hire.employee_number 工号,
pre_hire.name 姓名,
legal_entity_trans.value 签订主体,
contract_agreement_trans.value 合同类型,
contract_category_trans.value 期限类型,
pre_hire.contract_date_start 开始日期,
pre_hire.contract_date_end 结束日期,
pre_hire.trial_date_start 试用期开始日期,
pre_hire.trial_date_end 试用期结束日期
from pre_hire
left join legal_entity
on pre_hire.sign_legal_entity_id=legal_entity.id
left join ir_translation legal_entity_trans on legal_entity_trans.res_id=legal_entity.id
and legal_entity_trans.name ='legal.entity,name'
and legal_entity_trans.lang='zh_CN'
left join contract_agreement
on pre_hire.contract_agreement_id=contract_agreement.id
left join ir_translation contract_agreement_trans on contract_agreement_trans.res_id=contract_agreement.id
and contract_agreement_trans.name ='contract.agreement,name'
and contract_agreement_trans.lang='zh_CN'
left join contract_category
on pre_hire.contract_category_id=contract_category.id
left join ir_translation contract_category_trans on contract_category_trans.res_id=contract_category.id
and contract_category_trans.name ='contract.category,name'
and contract_category_trans.lang='zh_CN'
where pre_hire.hire_status='hired'