<?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="com.qianwen.mdc.mapper.DncProcessingMapper">
|
<resultMap id="BaseResultMap" type="com.qianwen.mdc.domain.DncProcessing">
|
|
<id column="id" jdbcType="INTEGER" property="id" />
|
<result column="machine_id" jdbcType="INTEGER" property="machineId" />
|
<result column="file_name" jdbcType="VARCHAR" property="fileName" />
|
<result column="prog_name" jdbcType="VARCHAR" property="progName" />
|
<result column="component" jdbcType="VARCHAR" property="component" />
|
<result column="process" jdbcType="VARCHAR" property="process" />
|
<result column="version" jdbcType="VARCHAR" property="version" />
|
<result column="time" jdbcType="TIMESTAMP" property="time" />
|
</resultMap>
|
|
<select id="getComponentList" resultType="String">
|
select distinct component from dnc_processing
|
</select>
|
|
<select id="getProcessList" resultType="String">
|
select distinct process from dnc_processing
|
</select>
|
|
<select id="selectProgParseMachineList" resultType="Integer">
|
select
|
distinct machine_id machineId
|
from dnc_processing
|
<where>
|
<if test="component != null and component != ''">
|
and component = #{component}
|
</if>
|
<if test="process != null and process != ''">
|
and process = #{process}
|
</if>
|
<if test="timeBegin != null and timeBegin != ''">
|
and time >= #{timeBegin}
|
</if>
|
<if test="timeEnd != null and timeEnd != ''">
|
and time <= #{timeEnd}
|
</if>
|
</where>
|
</select>
|
|
<select id="selectProgParseList" resultType="com.qianwen.mdc.domain.DncProcessing">
|
select * from dnc_processing
|
<where>
|
<if test="component != null and component != ''">
|
and component = #{component}
|
</if>
|
<if test="process != null and process != ''">
|
and process = #{process}
|
</if>
|
<if test="timeBegin != null and timeBegin != ''">
|
and time >= #{timeBegin}
|
</if>
|
<if test="timeEnd != null and timeEnd != ''">
|
and time <= #{timeEnd}
|
</if>
|
<if test="machineId != null and machineId != ''">
|
and machine_id = #{machineId}
|
</if>
|
</where>
|
order by machine_id asc, time asc
|
</select>
|
|
<!-- 工件 分页查询 -->
|
<select id="queryPage" resultMap="BaseResultMap">
|
SELECT
|
id,machine_id,file_name,prog_name,component,process,version,time
|
FROM dnc_processing
|
<where>
|
<!--
|
<if test="dto.sn != null and dto.sn != ''">
|
<bind name="sn" value="'%' + dto.sn + '%'" />
|
and sn like #{sn}
|
</if>
|
-->
|
<if test="dto.component != null and dto.component != ''">
|
and component=#{dto.component}
|
</if>
|
<if test="dto.process != null and dto.process != ''">
|
and process=#{dto.process}
|
</if>
|
|
<if test="dto.timeBegin != null">
|
and time>=#{dto.timeBegin}
|
</if>
|
<if test="dto.timeEnd != null">
|
and time<=#{dto.timeEnd}
|
</if>
|
</where>
|
</select>
|
</mapper>
|