You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
227 lines
9.6 KiB
XML
227 lines
9.6 KiB
XML
<?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.op.mes.mapper.MesLineProcessMapper">
|
|
|
|
<resultMap type="MesLineProcess" id="MesLineProcessResult">
|
|
<result property="id" column="id"/>
|
|
<result property="belongTo" column="belong_to"/>
|
|
<result property="processCode" column="process_code"/>
|
|
<result property="processName" column="process_name"/>
|
|
<result property="quality" column="quality"/>
|
|
<result property="attr1" column="attr1"/>
|
|
<result property="attr2" column="attr2"/>
|
|
<result property="attr3" column="attr3"/>
|
|
<result property="attr4" column="attr4"/>
|
|
<result property="createBy" column="create_by"/>
|
|
<result property="createTime" column="create_time"/>
|
|
<result property="updateBy" column="update_by"/>
|
|
<result property="updateTime" column="update_time"/>
|
|
<result property="factoryCode" column="factory_code"/>
|
|
<result property="delFlag" column="del_flag"/>
|
|
<result property="lineCode" column="line_code"/>
|
|
<result property="lineName" column="line_name"/>
|
|
</resultMap>
|
|
|
|
<sql id="selectMesLineProcessVo">
|
|
select id, belong_to, process_code, process_name, quality, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time, factory_code, del_flag, line_code, line_name from mes_line_process
|
|
</sql>
|
|
|
|
<select id="selectMesLineProcessList" parameterType="MesLineProcess" resultMap="MesLineProcessResult">
|
|
<include refid="selectMesLineProcessVo"/>
|
|
<where>
|
|
<if test="belongTo != null and belongTo != ''">
|
|
and belong_to = #{belongTo}
|
|
</if>
|
|
<if test="processCode != null and processCode != ''">
|
|
and process_code = #{processCode}
|
|
</if>
|
|
<if test="processName != null and processName != ''">
|
|
and process_name like concat('%', #{processName}, '%')
|
|
</if>
|
|
<if test="quality != null ">
|
|
and quality = #{quality}
|
|
</if>
|
|
<if test="attr1 != null and attr1 != ''">
|
|
and attr1 = #{attr1}
|
|
</if>
|
|
<if test="attr2 != null and attr2 != ''">
|
|
and attr2 = #{attr2}
|
|
</if>
|
|
<if test="attr3 != null and attr3 != ''">
|
|
and attr3 = #{attr3}
|
|
</if>
|
|
<if test="attr4 != null and attr4 != ''">
|
|
and attr4 = #{attr4}
|
|
</if>
|
|
<if test="factoryCode != null and factoryCode != ''">
|
|
and factory_code = #{factoryCode}
|
|
</if>
|
|
<if test="lineCode != null and lineCode != ''">
|
|
and line_code = #{lineCode}
|
|
</if>
|
|
<if test="lineName != null and lineName != ''">
|
|
and line_name like concat('%', #{lineName}, '%')
|
|
</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectMesLineProcessById" parameterType="String"
|
|
resultMap="MesLineProcessResult">
|
|
<include refid="selectMesLineProcessVo"/>
|
|
where id = #{id}
|
|
</select>
|
|
<select id="selectMesLineProcessByBelongTo" parameterType="String"
|
|
resultMap="MesLineProcessResult">
|
|
<include refid="selectMesLineProcessVo"/>
|
|
where belong_to = #{belongTo}
|
|
</select>
|
|
|
|
<insert id="insertMesLineProcess" parameterType="MesLineProcess">
|
|
insert into mes_line_process
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">id,
|
|
</if>
|
|
<if test="belongTo != null">belong_to,
|
|
</if>
|
|
<if test="processCode != null">process_code,
|
|
</if>
|
|
<if test="processName != null">process_name,
|
|
</if>
|
|
<if test="quality != null">quality,
|
|
</if>
|
|
<if test="attr1 != null">attr1,
|
|
</if>
|
|
<if test="attr2 != null">attr2,
|
|
</if>
|
|
<if test="attr3 != null">attr3,
|
|
</if>
|
|
<if test="attr4 != null">attr4,
|
|
</if>
|
|
<if test="createBy != null">create_by,
|
|
</if>
|
|
<if test="createTime != null">create_time,
|
|
</if>
|
|
<if test="updateBy != null">update_by,
|
|
</if>
|
|
<if test="updateTime != null">update_time,
|
|
</if>
|
|
<if test="factoryCode != null">factory_code,
|
|
</if>
|
|
<if test="delFlag != null">del_flag,
|
|
</if>
|
|
<if test="lineCode != null">line_code,
|
|
</if>
|
|
<if test="lineName != null">line_name,
|
|
</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">#{id},
|
|
</if>
|
|
<if test="belongTo != null">#{belongTo},
|
|
</if>
|
|
<if test="processCode != null">#{processCode},
|
|
</if>
|
|
<if test="processName != null">#{processName},
|
|
</if>
|
|
<if test="quality != null">#{quality},
|
|
</if>
|
|
<if test="attr1 != null">#{attr1},
|
|
</if>
|
|
<if test="attr2 != null">#{attr2},
|
|
</if>
|
|
<if test="attr3 != null">#{attr3},
|
|
</if>
|
|
<if test="attr4 != null">#{attr4},
|
|
</if>
|
|
<if test="createBy != null">#{createBy},
|
|
</if>
|
|
<if test="createTime != null">#{createTime},
|
|
</if>
|
|
<if test="updateBy != null">#{updateBy},
|
|
</if>
|
|
<if test="updateTime != null">#{updateTime},
|
|
</if>
|
|
<if test="factoryCode != null">#{factoryCode},
|
|
</if>
|
|
<if test="delFlag != null">#{delFlag},
|
|
</if>
|
|
<if test="lineCode != null">#{lineCode},
|
|
</if>
|
|
<if test="lineName != null">#{lineName},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateMesLineProcess" parameterType="MesLineProcess">
|
|
update mes_line_process
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="belongTo != null">belong_to =
|
|
#{belongTo},
|
|
</if>
|
|
<if test="processCode != null">process_code =
|
|
#{processCode},
|
|
</if>
|
|
<if test="processName != null">process_name =
|
|
#{processName},
|
|
</if>
|
|
<if test="quality != null">quality =
|
|
#{quality},
|
|
</if>
|
|
<if test="attr1 != null">attr1 =
|
|
#{attr1},
|
|
</if>
|
|
<if test="attr2 != null">attr2 =
|
|
#{attr2},
|
|
</if>
|
|
<if test="attr3 != null">attr3 =
|
|
#{attr3},
|
|
</if>
|
|
<if test="attr4 != null">attr4 =
|
|
#{attr4},
|
|
</if>
|
|
<if test="createBy != null">create_by =
|
|
#{createBy},
|
|
</if>
|
|
<if test="createTime != null">create_time =
|
|
#{createTime},
|
|
</if>
|
|
<if test="updateBy != null">update_by =
|
|
#{updateBy},
|
|
</if>
|
|
<if test="updateTime != null">update_time =
|
|
#{updateTime},
|
|
</if>
|
|
<if test="factoryCode != null">factory_code =
|
|
#{factoryCode},
|
|
</if>
|
|
<if test="delFlag != null">del_flag =
|
|
#{delFlag},
|
|
</if>
|
|
<if test="lineCode != null">line_code =
|
|
#{lineCode},
|
|
</if>
|
|
<if test="lineName != null">line_name =
|
|
#{lineName},
|
|
</if>
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<delete id="deleteMesLineProcessById" parameterType="String">
|
|
delete from mes_line_process where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteMesLineProcessByIds" parameterType="String">
|
|
delete from mes_line_process where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
<delete id="deleteMesLineProcessByBelongTo" parameterType="String">
|
|
delete from mes_line_process where belong_to = #{belongTo}
|
|
</delete>
|
|
|
|
</mapper>
|