<?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.machinefile.mapper.MachineAcceptedFileMapper">
|
|
<!--
|
<select id="pageQuery" resultType="org.springblade.mdm.machineback.vo.MachineBackFileVO">
|
select f.id,concat('xxx',f.id) name,1 as is_cured,f.create_time,'a' machine_code, f.create_time arrived_time
|
from mdm_machine_back_file f
|
<where>
|
f.status=1 and f.is_deleted=0
|
|
<if test="query.machineSpec!=null and query.machineSpec!=''">
|
and m.machine_spec=#{query.machineSpec,jdbcType=VARCHAR}
|
</if>
|
<if test="query.keyword!=null and query.keyword!=''">
|
and (m.code like CONCAT('%', #{query.keyword,jdbcType=VARCHAR},'%') or m.name like CONCAT('%', #{query.keyword,jdbcType=VARCHAR},'%')
|
|
)
|
</if>
|
</where>
|
</select>
|
-->
|
<!--机床回传程序处理分页-->
|
<select id="handlePageQuery" resultType="org.springblade.mdm.machinefile.vo.MachineAcceptedFileVO">
|
select f.id,f.name,f.oss_name,m.code machine_code, m.name machine_name,f.status,f.create_time,mf.program_status,mf.file_create_time,f.export_time,f.create_time
|
from mdm_machine_accepted_file f
|
left join mdm_machine_file mf on f.machine_file_id=mf.id
|
left join mdm_machine m on mf.machine_code=m.code
|
<where>
|
f.is_deleted=0
|
<if test="query.status!=null and query.status!=''">
|
and f.status=#{query.status}
|
</if>
|
<if test="query.name!=null and query.name!=''">
|
<bind name="fname" value="'%'+query.name+'%'"/>
|
and f.name like #{fname}
|
</if>
|
<if test="query.confirmTimeBegin!=null">
|
and m.confirm_time$gt;=#{query.confirmTimeBegin}
|
</if>
|
<if test="query.confirmTimeEnd!=null">
|
and m.confirm_time$lt;#{query.confirmTimeEnd}
|
</if>
|
</where>
|
order by f.export_time desc,f.create_time desc
|
</select>
|
|
|
</mapper>
|