人员统计合同查询问题

人员入场加一个ID查询
This commit is contained in:
方亮 2025-12-04 17:10:09 +08:00
parent 703bb79cc1
commit 32eaee2930
2 changed files with 2 additions and 2 deletions

View File

@ -84,7 +84,7 @@
WHERE
pw.is_active = 1
<if test="name != null and name != ''">
AND pw.`name` LIKE CONCAT('%',#{name},'%')
AND (pw.`name` LIKE CONCAT('%',#{name},'%') or pw.`id` = #{name})
</if>
<if test="idNumber != null and idNumber != ''">
AND pw.id_number LIKE CONCAT('%',#{idNumber},'%')

View File

@ -59,7 +59,7 @@
select bwc.id,bwc.contract_code,bwc.contract_term_type,bwc.is_active,bwc.contract_start_date,
bwc.contract_stop_date,bwc.wage_approved_way,bwc.wage_criterion,bwc.create_time
from bm_worker_contract bwc
left join bm_worker_ein_pro_record bwepr on bwc.id = bwepr.worker_id
left join bm_worker_ein_msg bwepr on bwc.id = bwepr.worker_id and bwc.pro_id = bwepr.pro_id
where bwc.worker_id =#{id}
<if test="proId != null">
AND bwepr.pro_id = #{proId}