<?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>=#{query.createTimeBegin}
|
</if>
|
<if test="query.createTimeEnd != null">
|
and n.create_time<=#{query.createTimeEnd}
|
</if>
|
</where>
|
order by t.create_time desc
|
</select>
|
|
|
</mapper>
|