52 lines
2.0 KiB
XML
52 lines
2.0 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.gzrn.rnbmw.push.dao.attendance.AttendanceDao">
|
||
|
|
|
||
|
|
<select id="selectAttendance" resultType="com.bonus.gzrn.rnbmw.push.entity.attendance.AttendanceInfoBean">
|
||
|
|
select * from (
|
||
|
|
SELECT
|
||
|
|
ffc.id as id,
|
||
|
|
concat('SongBianDianProject', IFNULL(p.pro_old_id,p.id)) as projectId,
|
||
|
|
p.NAME AS projectName,
|
||
|
|
concat('SongBianDianTeam', bs.id) as teamId,
|
||
|
|
bs.NAME AS teamName,
|
||
|
|
'贵州送变电有限责任公司' AS orgName,
|
||
|
|
'9152000021440270X9' AS orgCreditCode,
|
||
|
|
ffc.name,ffc.ID_NUMBER as idCard,
|
||
|
|
add_time as attendTime,'人脸识别' as attendWay,
|
||
|
|
'入场' as direction,
|
||
|
|
CONCAT('http://116.63.142.171:1919/gzrnama/',PHOTO_PATH) as swipeRecentPhotos
|
||
|
|
from fc_face_contrast ffc
|
||
|
|
left join bm_worker_record bwr on ffc.ID_NUMBER = bwr.ID_NUMBER
|
||
|
|
left join sys_dic_detail bwt on bwt.id = bwr.POST_ID
|
||
|
|
left join bm_project p on bwr.project_id = p.id
|
||
|
|
left join bm_sub_team bs on bwr.team_id = bs.id
|
||
|
|
left join bm_worker_payroll bwp on bwp.ID_NUMBER = bwr.ID_NUMBER
|
||
|
|
where (bwp.ROLL_BANK_NAME is not null or bwp.BANK_NAME is not null)
|
||
|
|
and LENGTH(bwr.FOREMAN_IDNUMBER) = 18
|
||
|
|
and LENGTH(bwr.PRINCIPAL_IDNUMBER) = 18
|
||
|
|
and bwr.ein_status = 1 and bwr.is_ein_push = 1 and bwr.is_exit_push != 1
|
||
|
|
and p.is_push = 1
|
||
|
|
<if test="currentDay != null and currentDay != ''">
|
||
|
|
and ffc.CURRENT_DAY = #{currentDay}
|
||
|
|
</if>
|
||
|
|
<if test="proId != null and proId != ''">
|
||
|
|
and ffc.pro_id = #{proId}
|
||
|
|
</if>
|
||
|
|
<if test="idCard != null and idCard != ''">
|
||
|
|
and ffc.ID_NUMBER = #{idCard}
|
||
|
|
</if>
|
||
|
|
and ffc.name != "" and AUDIT_STATUS = '1'
|
||
|
|
and ffc.is_push != '1'and bwt.name != '管理人员'
|
||
|
|
ORDER BY add_time DESC LIMIT 1000000000
|
||
|
|
) a GROUP BY a.idCard
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<update id="updateAttendanceStatus">
|
||
|
|
update fc_face_contrast set is_push = #{status},push_time = #{nowTime}
|
||
|
|
where id = #{id}
|
||
|
|
</update>
|
||
|
|
|
||
|
|
</mapper>
|