96 lines
4.5 KiB
XML
96 lines
4.5 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE mapper
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.bonus.hnrn.rnbmw.personnelWarning.dao.AttentionWarningDao">
|
|
|
|
<select id="getAttentionWarningListCount" resultType="java.lang.Integer">
|
|
SELECT count(1)
|
|
FROM bm_worker_record bwr
|
|
left join bm_worker bw on bwr.ID_NUMBER=bw.ID_NUMBER
|
|
left join sys_dic_detail sdd ON bwr.POST_ID = sdd.id
|
|
left join bm_project bp on bwr.PROJECT_ID = bp.ID
|
|
WHERE bwr.IS_ACTIVE = 1 and bwr.examine_status = '1' AND ( bw.ETHNIC = '彝' OR bwr.ID_NUMBER LIKE '5134%')
|
|
<if test="params != null and params.size()>0">
|
|
<if test="params.name != null and params.name !=''">
|
|
and bw.name like concat('%',#{params.name},'%')
|
|
</if>
|
|
<if test="params.idNumber != null and params.idNumber !=''">
|
|
and bwr.ID_NUMBER like concat('%',#{params.idNumber},'%')
|
|
</if>
|
|
<if test="params.jobType != null and params.jobType !=''">
|
|
and sdd.job_type like concat('%',#{params.jobType},'%')
|
|
</if>
|
|
<if test="params.project != null and params.project !=''">
|
|
and bp.name like concat('%',#{params.project},'%')
|
|
</if>
|
|
<if test="params.status != null and params.status !=''">
|
|
and bwr.ein_status like concat('%',#{params.status},'%')
|
|
</if>
|
|
</if>
|
|
</select>
|
|
|
|
<select id="getAttentionWarningList" resultType="com.bonus.hnrn.rnbmw.personnelWarning.entity.AttentionWarningBean">
|
|
select
|
|
bw.name as name,bwr.ID_NUMBER as idNumber,bw.phone as phone,
|
|
sdd.job_type as jobType,bp.name as project,bwr.ein_status as status,
|
|
ETHNIC as ethnic , ADDRESS as address
|
|
from bm_worker_record bwr
|
|
left join bm_worker bw on bwr.ID_NUMBER=bw.ID_NUMBER
|
|
left join sys_dic_detail sdd ON bwr.POST_ID = sdd.id
|
|
left join bm_project bp on bwr.PROJECT_ID = bp.ID
|
|
where bwr.IS_ACTIVE='1' and bwr.examine_status = '1' AND ( bw.ETHNIC = '彝' OR bwr.ID_NUMBER LIKE '5134%')
|
|
<if test="params != null and params.size()>0">
|
|
<if test="params.name != null and params.name !=''">
|
|
and bw.name like concat('%',#{params.name},'%')
|
|
</if>
|
|
<if test="params.idNumber != null and params.idNumber !=''">
|
|
and bwr.ID_NUMBER like concat('%',#{params.idNumber},'%')
|
|
</if>
|
|
<if test="params.jobType != null and params.jobType !=''">
|
|
and sdd.job_type like concat('%',#{params.jobType},'%')
|
|
</if>
|
|
<if test="params.project != null and params.project !=''">
|
|
and bp.name like concat('%',#{params.project},'%')
|
|
</if>
|
|
<if test="params.status != null and params.status !=''">
|
|
and bwr.ein_status like concat('%',#{params.status},'%')
|
|
</if>
|
|
</if>
|
|
${params.orderBy}
|
|
limit #{offset}, #{limit}
|
|
|
|
</select>
|
|
|
|
|
|
<select id="getAttentionWarningLists"
|
|
resultType="com.bonus.hnrn.rnbmw.personnelWarning.entity.AttentionWarningBean">
|
|
select
|
|
bw.name as name,bwr.ID_NUMBER as idNumber,bw.phone as phone,
|
|
sdd.job_type as jobType,bp.name as project,bwr.ein_status as status
|
|
from bm_worker_record bwr
|
|
left join bm_worker bw on bwr.ID_NUMBER=bw.ID_NUMBER
|
|
left join sys_dic_detail sdd ON bwr.POST_ID = sdd.id
|
|
left join bm_project bp on bwr.PROJECT_ID = bp.ID
|
|
where bwr.IS_ACTIVE='1' and bw.ETHNIC= '彝'
|
|
<if test="params != null and params.size()>0">
|
|
<if test="params.name != null and params.name !=''">
|
|
and bw.name like concat('%',#{params.name},'%')
|
|
</if>
|
|
<if test="params.idNumber != null and params.idNumber !=''">
|
|
and bwr.ID_NUMBER like concat('%',#{params.idNumber},'%')
|
|
</if>
|
|
<if test="params.jobType != null and params.jobType !=''">
|
|
and sdd.job_type like concat('%',#{params.jobType},'%')
|
|
</if>
|
|
<if test="params.project != null and params.project !=''">
|
|
and bp.name like concat('%',#{params.project},'%')
|
|
</if>
|
|
<if test="params.status != null and params.status !=''">
|
|
and bwr.ein_status like concat('%',#{params.status},'%')
|
|
</if>
|
|
</if>
|
|
</select>
|
|
|
|
</mapper>
|