|
@@ -11,7 +11,7 @@
|
|
|
fd.name AS deviceName,
|
|
|
log.user_id AS userId,
|
|
|
replace(log.`name`,' ','') AS name,
|
|
|
- ui.phone AS phone,
|
|
|
+ log.phone AS phone,
|
|
|
log.photo AS photo,
|
|
|
log.cardid AS cardid,
|
|
|
log.cardidex AS cardidex,
|
|
@@ -27,7 +27,6 @@
|
|
|
log.face_time AS faceTime,
|
|
|
log.create_time AS createTime
|
|
|
FROM face_log AS log
|
|
|
- LEFT JOIN user_info ui on log.user_id = ui.id
|
|
|
LEFT JOIN face_device fd on log.device_sn = fd.sn
|
|
|
left join admin a on a.id =log.admin_id
|
|
|
<where>
|
|
@@ -65,6 +64,7 @@
|
|
|
and a.area_id =#{query.areaId}
|
|
|
</if>
|
|
|
|
|
|
+
|
|
|
<!-- 体温 -->
|
|
|
<if test="query.twStatus != null and query.twStatus !=''">
|
|
|
<if test="query.twStatus == '1'.toString()">
|
|
@@ -115,7 +115,7 @@
|
|
|
AND replace(log.`name`,' ','') LIKE CONCAT('%',#{query.name},'%')
|
|
|
</if>
|
|
|
<if test="query.phone != null and query.phone != ''">
|
|
|
- AND ui.phone = #{query.phone}
|
|
|
+ AND log.phone = #{query.phone}
|
|
|
</if>
|
|
|
<if test="query.idNumber != null and query.idNumber != ''">
|
|
|
AND log.cardid = #{query.idNumber}
|
|
@@ -327,5 +327,108 @@
|
|
|
left join admin a on a.id =log.admin_id
|
|
|
where log.id = #{id}
|
|
|
</select>
|
|
|
+ <select id="getFaceLogsNew" resultType="com.yx.face.model.vo.FaceLogVO">
|
|
|
+ SELECT log.id AS logId,
|
|
|
+ log.recordid AS recordid,
|
|
|
+ log.action AS action,
|
|
|
+ log.device_sn AS deviceSn,
|
|
|
+ log.user_id AS userId,
|
|
|
+ replace(log.`name`,' ','') AS name,
|
|
|
+ log.phone AS phone,
|
|
|
+ log.photo AS photo,
|
|
|
+ log.cardid AS cardid,
|
|
|
+ log.cardidex AS cardidex,
|
|
|
+ log.verify_type AS verifyType,
|
|
|
+ log.rightno AS rightno,
|
|
|
+ log.tw_status AS twStatus,
|
|
|
+ log.jkm_status AS jkmStatus,
|
|
|
+ log.hs_status AS hsStatus,
|
|
|
+ log.ym_status AS ymStatus,
|
|
|
+ log.xc_info AS xcInfo,
|
|
|
+ log.extend3 AS extend3,
|
|
|
+ log.face_time AS faceTime,
|
|
|
+ log.create_time AS createTime,
|
|
|
+ log.admin_id AS adminId
|
|
|
+ FROM face_log AS log
|
|
|
+ <where>
|
|
|
+ <!-- 体温 -->
|
|
|
+ <if test="query.twStatus != null and query.twStatus !=''">
|
|
|
+ <if test="query.twStatus == '1'.toString()">
|
|
|
+ and replace(log.tw_status,' ','') = '0'
|
|
|
+ </if>
|
|
|
+ <if test="query.twStatus == '2'.toString()">
|
|
|
+ and replace(log.tw_status,' ','') = '1'
|
|
|
+ </if>
|
|
|
+ <if test="query.twStatus == '3'.toString()">
|
|
|
+ and replace(log.tw_status,' ','') = ''
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <!-- 健康码状态 -->
|
|
|
+ <if test="query.jkmStatus != null and query.jkmStatus !=''">
|
|
|
+ <if test="query.jkmStatus == 1">
|
|
|
+ and log.jkm_status = '00'
|
|
|
+ </if>
|
|
|
+ <if test="query.jkmStatus == 2">
|
|
|
+ and log.jkm_status = '01'
|
|
|
+ </if>
|
|
|
+ <if test="query.jkmStatus == 3">
|
|
|
+ and log.jkm_status = '10'
|
|
|
+ </if>
|
|
|
+ <if test="query.jkmStatus == 4">
|
|
|
+ and log.jkm_status = ''
|
|
|
+ </if>
|
|
|
+
|
|
|
+ </if>
|
|
|
+ <!-- 核酸 -->
|
|
|
+ <if test="query.hsStatus != null and query.hsStatus !=''">
|
|
|
+ <if test="query.hsStatus == 1">
|
|
|
+ and log.hs_status LIKE CONCAT('%','阴性','%')
|
|
|
+ </if>
|
|
|
+ <if test="query.hsStatus == 2">
|
|
|
+ and log.hs_status LIKE CONCAT('%','阳性','%')
|
|
|
+ </if>
|
|
|
+ <if test="query.hsStatus == 3">
|
|
|
+ and log.hs_status =''
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <!-- 疫苗状态 -->
|
|
|
+ <if test="query.ymStatus != null and query.ymStatus !=''">
|
|
|
+ and right(log.ym_status,1) = #{query.ymStatus}
|
|
|
+ </if>
|
|
|
+
|
|
|
+
|
|
|
+ <if test="query.name != null and query.name != ''">
|
|
|
+ AND replace(log.`name`,' ','') LIKE CONCAT('%',#{query.name},'%')
|
|
|
+ </if>
|
|
|
+ <if test="query.phone != null and query.phone != ''">
|
|
|
+ AND log.phone = #{query.phone}
|
|
|
+ </if>
|
|
|
+ <if test="query.idNumber != null and query.idNumber != ''">
|
|
|
+ AND log.cardid = #{query.idNumber}
|
|
|
+ </if>
|
|
|
+ <if test="query.deviceSn != null and query.deviceSn != ''">
|
|
|
+ AND log.device_sn = #{query.deviceSn}
|
|
|
+ </if>
|
|
|
+ <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != '' ">
|
|
|
+ AND <![CDATA[ log.face_time >= #{query.startTime}]]>
|
|
|
+ AND <![CDATA[ log.face_time < #{query.endTime}]]>
|
|
|
+ </if>
|
|
|
+ <if test="query.startTime == '' and query.endTime != null and query.endTime != '' ">
|
|
|
+ AND <![CDATA[ log.face_time <= #{query.endTime}]]>
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test="biggerNum != null ">
|
|
|
+ AND log.id > #{biggerNum}
|
|
|
+ </if>
|
|
|
+ <if test="adminIds !=null and adminIds.size()> 0">
|
|
|
+ and log.admin_id in
|
|
|
+ <foreach collection="adminIds" index="index" item="adminId" open="(" close=")" separator=",">
|
|
|
+ #{adminId}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+
|
|
|
+ </where>
|
|
|
+ ORDER BY log.id DESC
|
|
|
+ </select>
|
|
|
</mapper>
|
|
|
|