解决员工查询报错
This commit is contained in:
parent
000cedfaf3
commit
1dec0a793f
|
|
@ -8,84 +8,92 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="listPage" resultType="com.nu.modules.employeesapply.entity.EmployeesApply">
|
<select id="listPage" resultType="com.nu.modules.employeesapply.entity.EmployeesApply">
|
||||||
SELECT sup.* FROM (
|
SELECT
|
||||||
SELECT
|
sup.*
|
||||||
IFNULL(b.id, a.id) AS id,
|
FROM
|
||||||
a.id as employee_id,
|
(
|
||||||
a.name,
|
SELECT
|
||||||
a.sex,
|
IFNULL( b.id, a.id ) AS id,
|
||||||
a.date_of_birth,
|
a.id AS employee_id,
|
||||||
a.tel,
|
a.NAME,
|
||||||
a.national,
|
a.sex,
|
||||||
a.id_card,
|
a.date_of_birth,
|
||||||
a.married_or_not,
|
a.tel,
|
||||||
CONCAT(a.height, '') as height,
|
a.national,
|
||||||
CONCAT(a.weight, '') as weight,
|
a.id_card,
|
||||||
a.health_status,
|
a.married_or_not,
|
||||||
a.political_appearance,
|
CONCAT( a.height, '' ) AS height,
|
||||||
a.house_address,
|
CONCAT( a.weight, '' ) AS weight,
|
||||||
a.emergency_contact,
|
a.health_status,
|
||||||
a.emergency_tel,
|
a.political_appearance,
|
||||||
a.emergency_relationship,
|
a.house_address,
|
||||||
a.hukou_nature,
|
a.emergency_contact,
|
||||||
a.current_address,
|
a.emergency_tel,
|
||||||
a.id_card_positive,
|
a.emergency_relationship,
|
||||||
a.id_card_negative,
|
a.hukou_nature,
|
||||||
a.health_certificate_positive,
|
a.current_address,
|
||||||
a.bank_positive,
|
a.id_card_positive,
|
||||||
a.qualification,
|
a.id_card_negative,
|
||||||
a.no_crime_certificate,
|
a.health_certificate_positive,
|
||||||
a.head_path,
|
a.bank_positive,
|
||||||
a.create_time,
|
a.qualification,
|
||||||
b.status,
|
a.no_crime_certificate,
|
||||||
b.modify_status,
|
a.head_path,
|
||||||
b.apply_type,
|
a.create_time,
|
||||||
b.audit_content,
|
b.STATUS,
|
||||||
b.iz_history,
|
b.modify_status,
|
||||||
b.open_id
|
b.apply_type,
|
||||||
FROM nu_biz_employees_info a
|
b.audit_content,
|
||||||
LEFT JOIN nu_biz_employees_apply b ON a.id = b.employee_id AND b.iz_history = 'N'
|
b.iz_history,
|
||||||
WHERE a.del_flag = '0' AND a.iz_freeze = 'N'
|
b.open_id
|
||||||
UNION ALL
|
FROM
|
||||||
SELECT
|
nu_biz_employees_info a
|
||||||
b.id AS id,
|
LEFT JOIN nu_biz_employees_apply b ON a.id = b.employee_id
|
||||||
b.employee_id,
|
AND b.iz_history = 'N'
|
||||||
b.name,
|
WHERE
|
||||||
b.sex,
|
a.del_flag = '0'
|
||||||
b.date_of_birth,
|
AND a.iz_freeze = 'N' UNION ALL
|
||||||
b.tel,
|
SELECT
|
||||||
b.national,
|
b.id AS id,
|
||||||
b.id_card,
|
b.employee_id,
|
||||||
b.married_or_not,
|
b.NAME,
|
||||||
CONCAT(b.height, '') as height,
|
b.sex,
|
||||||
CONCAT(b.weight, '') as weight,
|
b.date_of_birth,
|
||||||
b.health_status,
|
b.tel,
|
||||||
b.political_appearance,
|
b.national,
|
||||||
b.house_address,
|
b.id_card,
|
||||||
b.emergency_contact,
|
b.married_or_not,
|
||||||
b.emergency_tel,
|
CONCAT( b.height, '' ) AS height,
|
||||||
b.emergency_relationship,
|
CONCAT( b.weight, '' ) AS weight,
|
||||||
b.hukou_nature,
|
b.health_status,
|
||||||
b.current_address,
|
b.political_appearance,
|
||||||
b.id_card_positive,
|
b.house_address,
|
||||||
b.id_card_negative,
|
b.emergency_contact,
|
||||||
b.health_certificate_positive,
|
b.emergency_tel,
|
||||||
b.bank_positive,
|
b.emergency_relationship,
|
||||||
b.qualification,
|
b.hukou_nature,
|
||||||
b.no_crime_certificate,
|
b.current_address,
|
||||||
b.create_time,
|
b.id_card_positive,
|
||||||
b.status,
|
b.id_card_negative,
|
||||||
b.modify_status,
|
b.health_certificate_positive,
|
||||||
b.apply_type,
|
b.bank_positive,
|
||||||
b.audit_content,
|
b.qualification,
|
||||||
b.iz_history,
|
b.no_crime_certificate,
|
||||||
b.open_id,
|
b.head_path,
|
||||||
b.head_path
|
b.create_time,
|
||||||
FROM nu_biz_employees_apply b
|
b.STATUS,
|
||||||
WHERE b.employee_id NOT IN (SELECT id FROM nu_biz_employees_info)
|
b.modify_status,
|
||||||
AND b.apply_type = '1'
|
b.apply_type,
|
||||||
AND b.iz_history = 'N'
|
b.audit_content,
|
||||||
) sup
|
b.iz_history,
|
||||||
|
b.open_id
|
||||||
|
FROM
|
||||||
|
nu_biz_employees_apply b
|
||||||
|
WHERE
|
||||||
|
b.employee_id NOT IN ( SELECT id FROM nu_biz_employees_info )
|
||||||
|
AND b.apply_type = '1'
|
||||||
|
AND b.iz_history = 'N'
|
||||||
|
) sup
|
||||||
${ew.customSqlSegment}
|
${ew.customSqlSegment}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue