yangys
2025-09-09 fc3ae614a4c5a2a7cdb9029ecfc4372eb1c28b18
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
<?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.statreport.mapper.TaskDispatchStatMapper">
 
    <select id="pageQuery" resultType="org.springblade.mdm.statreport.vo.TaskDispatchStatVO">
        select t.id,t.drawing_no,t.process_no,t.process_edition,t.machine_code,t.create_time,n.update_time cure_time,
               t.process_instance_id
        from mdm_task_dispatch t
        left join mdm_nc_node n
            on t.drawing_no=n.drawing_no and t.process_no=n.process_no and t.process_edition=n.process_edition
                   and n.is_deleted=0 and n.is_cured=1 and n.node_type='60' and t.machine_code=n.machine_code
                and n.is_last_edition=1
        <where>
            t.is_deleted=0 and t.status=2 and (t.deviation is null or t.deviation='')
            <if test="query.drawingNo != null and query.drawingNo!=''">
                <bind name="drawingNo" value="'%'+query.drawingNo+'%'"/>
                and t.drawing_no like #{drawingNo}
            </if>
            <if test="query.createTimeBegin != null">
                and n.create_time&gt;=#{query.createTimeBegin}
            </if>
            <if test="query.createTimeEnd != null">
                and n.create_time&lt;=#{query.createTimeEnd}
            </if>
        </where>
        order by t.create_time desc
    </select>
 
 
</mapper>