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.
132 lines
6.5 KiB
XML
132 lines
6.5 KiB
XML
1 year ago
|
<?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.QcCheckUnqualifiedDetailMapper">
|
||
|
|
||
|
<resultMap type="QcCheckUnqualifiedDetail" id="QcCheckUnqualifiedDetailResult">
|
||
|
<result property="recordId" column="record_id" />
|
||
|
<result property="unqualifiedId" column="unqualified_id" />
|
||
|
<result property="sort" column="sort" />
|
||
|
<result property="dowithCode" column="dowith_code" />
|
||
|
<result property="dowithName" column="dowith_name" />
|
||
|
<result property="dowithRemark" column="dowith_remark" />
|
||
|
<result property="status" column="status" />
|
||
|
<result property="remark" column="remark" />
|
||
|
<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" />
|
||
|
</resultMap>
|
||
|
|
||
|
<sql id="selectQcCheckUnqualifiedDetailVo">
|
||
|
select record_id, unqualified_id, sort, dowith_code, dowith_name, dowith_remark, status, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time, factory_code, del_flag from qc_check_unqualified_detail
|
||
|
</sql>
|
||
|
|
||
|
<select id="selectQcCheckUnqualifiedDetailList" parameterType="QcCheckUnqualifiedDetail" resultMap="QcCheckUnqualifiedDetailResult">
|
||
|
<include refid="selectQcCheckUnqualifiedDetailVo"/>
|
||
|
<where>
|
||
|
<if test="unqualifiedId != null and unqualifiedId != ''"> and unqualified_id = #{unqualifiedId}</if>
|
||
|
<if test="sort != null and sort != ''"> and sort = #{sort}</if>
|
||
|
<if test="dowithCode != null and dowithCode != ''"> and dowith_code = #{dowithCode}</if>
|
||
|
<if test="dowithName != null and dowithName != ''"> and dowith_name like concat('%', #{dowithName}, '%')</if>
|
||
|
<if test="dowithRemark != null and dowithRemark != ''"> and dowith_remark = #{dowithRemark}</if>
|
||
|
<if test="status != null and status != ''"> and status = #{status}</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>
|
||
|
</where>
|
||
|
</select>
|
||
|
|
||
|
<select id="selectQcCheckUnqualifiedDetailByRecordId" parameterType="String" resultMap="QcCheckUnqualifiedDetailResult">
|
||
|
<include refid="selectQcCheckUnqualifiedDetailVo"/>
|
||
|
where record_id = #{recordId}
|
||
|
</select>
|
||
|
|
||
|
<insert id="insertQcCheckUnqualifiedDetail" parameterType="QcCheckUnqualifiedDetail">
|
||
|
insert into qc_check_unqualified_detail
|
||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
<if test="recordId != null">record_id,</if>
|
||
|
<if test="unqualifiedId != null">unqualified_id,</if>
|
||
|
<if test="sort != null">sort,</if>
|
||
|
<if test="dowithCode != null">dowith_code,</if>
|
||
|
<if test="dowithName != null">dowith_name,</if>
|
||
|
<if test="dowithRemark != null">dowith_remark,</if>
|
||
|
<if test="status != null">status,</if>
|
||
|
<if test="remark != null">remark,</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 and factoryCode != ''">factory_code,</if>
|
||
|
<if test="delFlag != null">del_flag,</if>
|
||
|
</trim>
|
||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||
|
<if test="recordId != null">#{recordId},</if>
|
||
|
<if test="unqualifiedId != null">#{unqualifiedId},</if>
|
||
|
<if test="sort != null">#{sort},</if>
|
||
|
<if test="dowithCode != null">#{dowithCode},</if>
|
||
|
<if test="dowithName != null">#{dowithName},</if>
|
||
|
<if test="dowithRemark != null">#{dowithRemark},</if>
|
||
|
<if test="status != null">#{status},</if>
|
||
|
<if test="remark != null">#{remark},</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 and factoryCode != ''">#{factoryCode},</if>
|
||
|
<if test="delFlag != null">#{delFlag},</if>
|
||
|
</trim>
|
||
|
</insert>
|
||
|
|
||
|
<update id="updateQcCheckUnqualifiedDetail" parameterType="QcCheckUnqualifiedDetail">
|
||
|
update qc_check_unqualified_detail
|
||
|
<trim prefix="SET" suffixOverrides=",">
|
||
|
<if test="unqualifiedId != null">unqualified_id = #{unqualifiedId},</if>
|
||
|
<if test="sort != null">sort = #{sort},</if>
|
||
|
<if test="dowithCode != null">dowith_code = #{dowithCode},</if>
|
||
|
<if test="dowithName != null">dowith_name = #{dowithName},</if>
|
||
|
<if test="dowithRemark != null">dowith_remark = #{dowithRemark},</if>
|
||
|
<if test="status != null">status = #{status},</if>
|
||
|
<if test="remark != null">remark = #{remark},</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 and factoryCode != ''">factory_code = #{factoryCode},</if>
|
||
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||
|
</trim>
|
||
|
where record_id = #{recordId}
|
||
|
</update>
|
||
|
|
||
|
<delete id="deleteQcCheckUnqualifiedDetailByRecordId" parameterType="String">
|
||
|
delete from qc_check_unqualified_detail where record_id = #{recordId}
|
||
|
</delete>
|
||
|
|
||
|
<delete id="deleteQcCheckUnqualifiedDetailByRecordIds" parameterType="String">
|
||
|
delete from qc_check_unqualified_detail where record_id in
|
||
|
<foreach item="recordId" collection="array" open="(" separator="," close=")">
|
||
|
#{recordId}
|
||
|
</foreach>
|
||
|
</delete>
|
||
|
</mapper>
|