<?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="org.springblade.mdm.gkw.task.mapper.MachineBackTaskMapper">
|
|
|
<!--文件记录查询-->
|
|
<select id="pageQuery" resultType="org.springblade.mdm.gkw.task.vo.MachineBackTaskVO">
|
select t.id,t.program_name,t.machine_code,t.task_type,t.deviation,t.deviation_serial,t.seg_count,t.finish_time,t.create_time,t.status,t.update_time,u.name create_user_name
|
from mdm_machine_back_task t left join blade_user u on t.create_user=u.id
|
<where>
|
t.is_deleted=0
|
<if test="query.status!=null and query.status!=''">
|
and t.status = #{query.status}
|
</if>
|
<if test="query.programName!=null and query.programName!=''">
|
<bind name="pname" value="'%'+query.programName+'%'"/>
|
and t.program_name like #{pname}
|
</if>
|
|
<if test="query.machineCode!=null and query.machineCode!=''">
|
<bind name="machineCode" value="'%'+query.machineCode+'%'"/>
|
and t.machine_code like #{machineCode}
|
</if>
|
<if test="query.createTimeBegin!=null">
|
and t.create_time >=#{query.createTimeBegin}
|
</if>
|
<if test="query.createTimeEnd!=null">
|
and t.create_time <=#{query.createTimeEnd}
|
</if>
|
|
</where>
|
order by t.create_time desc
|
</select>
|
</mapper>
|