<?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.qianwen.smartman.modules.tpm.mapper.CheckRecordMapper">
|
|
<select id="getTodayPage" resultType="com.qianwen.smartman.modules.tpm.vo.CheckRecordTodayVO">
|
select
|
cr.id,
|
cr.check_code as checkCode,
|
wm.machine_code as machineCode,
|
wm.machine_name as machineName,
|
dt.name as typeName,
|
cp.name as checkProjectName,
|
cr.check_time as checkTime
|
from
|
blade_check_record cr
|
left join blade_check_project cp on cr.check_project_id = cp.id and cr.is_deleted =0
|
left join blade_device_type dt on cr.device_type_id = dt.id and dt.is_deleted =0
|
LEFT JOIN blade_machine wm on cr.device_id = wm.id and wm.is_deleted = 0
|
where cr.is_deleted =0 and TO_CHAR(cr.create_time, 'yyyy-mm-dd') = TO_CHAR(SYSDATE, 'yyyy-mm-dd')
|
<if test="searchDTO.machineCode != null and searchDTO.machineCode !=''">
|
and wm.machine_code like concat(#{searchDTO.machineCode},'%')
|
</if>
|
<if test="searchDTO.machineName != null and searchDTO.machineName !=''">
|
and wm.machine_name like concat(#{searchDTO.machineName},'%')
|
</if>
|
<if test="searchDTO.checkProjectName != null and searchDTO.checkProjectName !=''">
|
and cp.name like concat(#{searchDTO.checkProjectName},'%')
|
</if>
|
</select>
|
|
</mapper>
|