|
|
|
@ -3,7 +3,7 @@
|
|
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
<mapper namespace="com.op.quality.mapper.QcSampleRuleMapper">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<resultMap type="QcSampleRule" id="QcSampleRuleResult">
|
|
|
|
|
<result property="id" column="id" />
|
|
|
|
|
<result property="startValue" column="start_value" />
|
|
|
|
@ -26,7 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
|
|
|
|
<select id="selectQcSampleRuleList" parameterType="QcSampleRule" resultMap="QcSampleRuleResult">
|
|
|
|
|
<include refid="selectQcSampleRuleVo"/>
|
|
|
|
|
<where>
|
|
|
|
|
<where>
|
|
|
|
|
<if test="startValue != null "> and start_value = #{startValue}</if>
|
|
|
|
|
<if test="endValue != null "> and end_value = #{endValue}</if>
|
|
|
|
|
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
|
|
|
|
@ -36,13 +36,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="typeCode != null and typeCode != ''"> and type_code = #{typeCode}</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectQcSampleRuleById" parameterType="String" resultMap="QcSampleRuleResult">
|
|
|
|
|
<include refid="selectQcSampleRuleVo"/>
|
|
|
|
|
where id = #{id}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<insert id="insertQcSampleRule" parameterType="QcSampleRule">
|
|
|
|
|
<select id="getSampNum" resultType="java.lang.String">
|
|
|
|
|
select sample_quality
|
|
|
|
|
from qc_sample_rule
|
|
|
|
|
where end_value>= #{quality} and #{quality}>=start_value and del_flag = '0'
|
|
|
|
|
and check_type = #{checkType}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<insert id="insertQcSampleRule" parameterType="QcSampleRule">
|
|
|
|
|
insert into qc_sample_rule
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="id != null">id,</if>
|
|
|
|
@ -100,9 +106,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteQcSampleRuleByIds" parameterType="String">
|
|
|
|
|
delete from qc_sample_rule where id in
|
|
|
|
|
delete from qc_sample_rule where id in
|
|
|
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
|
|
#{id}
|
|
|
|
|
</foreach>
|
|
|
|
|
</delete>
|
|
|
|
|
</mapper>
|
|
|
|
|
</mapper>
|
|
|
|
|