yangys
2025-09-25 31ecdb8c700529a59dd762f0c47f0ed9c66d5092
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?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.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 &gt;=#{query.createTimeBegin}
            </if>
            <if test="query.createTimeEnd!=null">
                and t.create_time &lt;=#{query.createTimeEnd}
            </if>
 
        </where>
        order by t.create_time desc
    </select>
</mapper>