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.
LanJu_Mes/op-modules/op-quality/src/main/resources/mapper/quality/QcSampleRuleAqlMapper.xml

466 lines
16 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.quality.mapper.QcSampleRuleAqlMapper">
<resultMap type="QcSampleRuleAql" id="QcSampleRuleAqlResult">
<result property="id" column="id"/>
<result property="sampleCode" column="sample_code"/>
<result property="sampleAql" column="sample_aql"/>
<result property="attr1" column="attr1"/>
<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="maxBadQuality" column="max_bad_quality"/>
<result property="checkType" column="check_type"/>
<result property="typeCode" column="type_code"/>
<result property="aql1" column="aql1"/>
<result property="aql2" column="aql2"/>
<result property="aql3" column="aql3"/>
<result property="aql4" column="aql4"/>
<result property="aql5" column="aql5"/>
<result property="aql6" column="aql6"/>
<result property="aql7" column="aql7"/>
<result property="aql8" column="aql8"/>
<result property="aql9" column="aql9"/>
<result property="aql10" column="aql10"/>
<result property="aql11" column="aql11"/>
<result property="aql12" column="aql12"/>
<result property="aql13" column="aql13"/>
<result property="aql14" column="aql14"/>
<result property="aql15" column="aql15"/>
<result property="aql16" column="aql16"/>
<result property="aql17" column="aql17"/>
<result property="aql18" column="aql18"/>
<result property="aql19" column="aql19"/>
<result property="aql20" column="aql20"/>
<result property="aql21" column="aql21"/>
<result property="aql22" column="aql22"/>
<result property="aql23" column="aql23"/>
<result property="aql24" column="aql24"/>
<result property="aql25" column="aql25"/>
<result property="aql26" column="aql26"/>
</resultMap>
<sql id="selectQcSampleRuleAqlVo">
select id, sample_code, sample_aql, attr1, create_by, create_time, update_by, update_time, factory_code, del_flag, max_bad_quality, check_type, type_code, aql1, aql2, aql3, aql4, aql5, aql6, aql7, aql8, aql9, aql10, aql11, aql12, aql13, aql14, aql15, aql16, aql17, aql18, aql19, aql20, aql21, aql22, aql23, aql24, aql25, aql26 from qc_sample_rule_aql
</sql>
<select id="selectQcSampleRuleAqlList" parameterType="QcSampleRuleAql" resultMap="QcSampleRuleAqlResult">
<include refid="selectQcSampleRuleAqlVo"/>
<where>
<if test="sampleCode != null and sampleCode != ''">
and sample_code = #{sampleCode}
</if>
<if test="sampleAql != null and sampleAql != ''">
and sample_aql = #{sampleAql}
</if>
<if test="attr1 != null and attr1 != ''">
and attr1 = #{attr1}
</if>
<if test="factoryCode != null and factoryCode != ''">
and factory_code = #{factoryCode}
</if>
<if test="maxBadQuality != null ">
and max_bad_quality = #{maxBadQuality}
</if>
<if test="checkType != null and checkType != ''">
and check_type = #{checkType}
</if>
<if test="typeCode != null and typeCode != ''">
and type_code = #{typeCode}
</if>
<if test="aql1 != null ">
and aql1 = #{aql1}
</if>
<if test="aql2 != null ">
and aql2 = #{aql2}
</if>
<if test="aql3 != null ">
and aql3 = #{aql3}
</if>
<if test="aql4 != null ">
and aql4 = #{aql4}
</if>
<if test="aql5 != null ">
and aql5 = #{aql5}
</if>
<if test="aql6 != null ">
and aql6 = #{aql6}
</if>
<if test="aql7 != null ">
and aql7 = #{aql7}
</if>
<if test="aql8 != null ">
and aql8 = #{aql8}
</if>
<if test="aql9 != null ">
and aql9 = #{aql9}
</if>
<if test="aql10 != null ">
and aql10 = #{aql10}
</if>
<if test="aql11 != null ">
and aql11 = #{aql11}
</if>
<if test="aql12 != null ">
and aql12 = #{aql12}
</if>
<if test="aql13 != null ">
and aql13 = #{aql13}
</if>
<if test="aql14 != null ">
and aql14 = #{aql14}
</if>
<if test="aql15 != null ">
and aql15 = #{aql15}
</if>
<if test="aql16 != null ">
and aql16 = #{aql16}
</if>
<if test="aql17 != null ">
and aql17 = #{aql17}
</if>
<if test="aql18 != null ">
and aql18 = #{aql18}
</if>
<if test="aql19 != null ">
and aql19 = #{aql19}
</if>
<if test="aql20 != null ">
and aql20 = #{aql20}
</if>
<if test="aql21 != null ">
and aql21 = #{aql21}
</if>
<if test="aql22 != null ">
and aql22 = #{aql22}
</if>
<if test="aql23 != null ">
and aql23 = #{aql23}
</if>
<if test="aql24 != null ">
and aql24 = #{aql24}
</if>
<if test="aql25 != null ">
and aql25 = #{aql25}
</if>
<if test="aql26 != null ">
and aql26 = #{aql26}
</if>
and del_flag = '0'
</where>
order by sample_code asc
</select>
<select id="selectQcSampleRuleAqlById" parameterType="String" resultMap="QcSampleRuleAqlResult">
<include refid="selectQcSampleRuleAqlVo"/>
where id = #{id}
and del_flag = '0'
</select>
<insert id="insertQcSampleRuleAql" parameterType="QcSampleRuleAql">
insert into qc_sample_rule_aql
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,
</if>
<if test="sampleCode != null">sample_code,
</if>
<if test="sampleAql != null">sample_aql,
</if>
<if test="attr1 != null">attr1,
</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="maxBadQuality != null">max_bad_quality,
</if>
<if test="checkType != null">check_type,
</if>
<if test="typeCode != null">type_code,
</if>
<if test="aql1 != null">aql1,
</if>
<if test="aql2 != null">aql2,
</if>
<if test="aql3 != null">aql3,
</if>
<if test="aql4 != null">aql4,
</if>
<if test="aql5 != null">aql5,
</if>
<if test="aql6 != null">aql6,
</if>
<if test="aql7 != null">aql7,
</if>
<if test="aql8 != null">aql8,
</if>
<if test="aql9 != null">aql9,
</if>
<if test="aql10 != null">aql10,
</if>
<if test="aql11 != null">aql11,
</if>
<if test="aql12 != null">aql12,
</if>
<if test="aql13 != null">aql13,
</if>
<if test="aql14 != null">aql14,
</if>
<if test="aql15 != null">aql15,
</if>
<if test="aql16 != null">aql16,
</if>
<if test="aql17 != null">aql17,
</if>
<if test="aql18 != null">aql18,
</if>
<if test="aql19 != null">aql19,
</if>
<if test="aql20 != null">aql20,
</if>
<if test="aql21 != null">aql21,
</if>
<if test="aql22 != null">aql22,
</if>
<if test="aql23 != null">aql23,
</if>
<if test="aql24 != null">aql24,
</if>
<if test="aql25 != null">aql25,
</if>
<if test="aql26 != null">aql26,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},
</if>
<if test="sampleCode != null">#{sampleCode},
</if>
<if test="sampleAql != null">#{sampleAql},
</if>
<if test="attr1 != null">#{attr1},
</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="maxBadQuality != null">#{maxBadQuality},
</if>
<if test="checkType != null">#{checkType},
</if>
<if test="typeCode != null">#{typeCode},
</if>
<if test="aql1 != null">#{aql1},
</if>
<if test="aql2 != null">#{aql2},
</if>
<if test="aql3 != null">#{aql3},
</if>
<if test="aql4 != null">#{aql4},
</if>
<if test="aql5 != null">#{aql5},
</if>
<if test="aql6 != null">#{aql6},
</if>
<if test="aql7 != null">#{aql7},
</if>
<if test="aql8 != null">#{aql8},
</if>
<if test="aql9 != null">#{aql9},
</if>
<if test="aql10 != null">#{aql10},
</if>
<if test="aql11 != null">#{aql11},
</if>
<if test="aql12 != null">#{aql12},
</if>
<if test="aql13 != null">#{aql13},
</if>
<if test="aql14 != null">#{aql14},
</if>
<if test="aql15 != null">#{aql15},
</if>
<if test="aql16 != null">#{aql16},
</if>
<if test="aql17 != null">#{aql17},
</if>
<if test="aql18 != null">#{aql18},
</if>
<if test="aql19 != null">#{aql19},
</if>
<if test="aql20 != null">#{aql20},
</if>
<if test="aql21 != null">#{aql21},
</if>
<if test="aql22 != null">#{aql22},
</if>
<if test="aql23 != null">#{aql23},
</if>
<if test="aql24 != null">#{aql24},
</if>
<if test="aql25 != null">#{aql25},
</if>
<if test="aql26 != null">#{aql26},
</if>
</trim>
</insert>
<update id="updateQcSampleRuleAql" parameterType="QcSampleRuleAql">
update qc_sample_rule_aql
<trim prefix="SET" suffixOverrides=",">
<if test="sampleCode != null">sample_code =
#{sampleCode},
</if>
<if test="sampleAql != null">sample_aql =
#{sampleAql},
</if>
<if test="attr1 != null">attr1 =
#{attr1},
</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="maxBadQuality != null">max_bad_quality =
#{maxBadQuality},
</if>
<if test="checkType != null">check_type =
#{checkType},
</if>
<if test="typeCode != null">type_code =
#{typeCode},
</if>
<if test="aql1 != null">aql1 =
#{aql1},
</if>
<if test="aql2 != null">aql2 =
#{aql2},
</if>
<if test="aql3 != null">aql3 =
#{aql3},
</if>
<if test="aql4 != null">aql4 =
#{aql4},
</if>
<if test="aql5 != null">aql5 =
#{aql5},
</if>
<if test="aql6 != null">aql6 =
#{aql6},
</if>
<if test="aql7 != null">aql7 =
#{aql7},
</if>
<if test="aql8 != null">aql8 =
#{aql8},
</if>
<if test="aql9 != null">aql9 =
#{aql9},
</if>
<if test="aql10 != null">aql10 =
#{aql10},
</if>
<if test="aql11 != null">aql11 =
#{aql11},
</if>
<if test="aql12 != null">aql12 =
#{aql12},
</if>
<if test="aql13 != null">aql13 =
#{aql13},
</if>
<if test="aql14 != null">aql14 =
#{aql14},
</if>
<if test="aql15 != null">aql15 =
#{aql15},
</if>
<if test="aql16 != null">aql16 =
#{aql16},
</if>
<if test="aql17 != null">aql17 =
#{aql17},
</if>
<if test="aql18 != null">aql18 =
#{aql18},
</if>
<if test="aql19 != null">aql19 =
#{aql19},
</if>
<if test="aql20 != null">aql20 =
#{aql20},
</if>
<if test="aql21 != null">aql21 =
#{aql21},
</if>
<if test="aql22 != null">aql22 =
#{aql22},
</if>
<if test="aql23 != null">aql23 =
#{aql23},
</if>
<if test="aql24 != null">aql24 =
#{aql24},
</if>
<if test="aql25 != null">aql25 =
#{aql25},
</if>
<if test="aql26 != null">aql26 =
#{aql26},
</if>
</trim>
where id = #{id}
</update>
<update id="deleteQcSampleRuleAqlById" parameterType="String">
update qc_sample_rule_aql
set del_flag = '1'
where id = #{id}
</update>
<update id="deleteQcSampleRuleAqlByIds" parameterType="String">
update qc_sample_rule_aql
set del_flag = '1'
where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</update>
</mapper>