You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
125 lines
6.3 KiB
125 lines
6.3 KiB
2 years 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.ruoyi.ck.mapper.WorkformHeadMapper">
|
||
|
|
||
|
<resultMap type="WorkformHead" id="WorkformHeadResult">
|
||
|
<result property="id" column="id" />
|
||
|
<result property="formCode" column="form_code" />
|
||
|
<result property="formTemplate" column="form_template" />
|
||
|
<result property="formNeedNum" column="form_need_num" />
|
||
|
<result property="faildNum" column="faild_num" />
|
||
|
<result property="passNum" column="pass_num" />
|
||
|
<result property="createTime" column="create_time" />
|
||
|
<result property="wlCode" column="wlCode" />
|
||
|
<result property="special" column="special" />
|
||
|
<result property="vendor" column="vendor" />
|
||
|
<result property="batch" column="batch" />
|
||
|
<result property="snPrefix" column="sn_prefix" />
|
||
|
<result property="other" column="other" />
|
||
|
|
||
|
<result property="spare1" column="spare1" />
|
||
|
<result property="spare2" column="spare2" />
|
||
|
<result property="spare3" column="spare3" />
|
||
|
<result property="spare4" column="spare4" />
|
||
|
</resultMap>
|
||
|
|
||
|
<sql id="selectWorkformHeadVo">
|
||
|
select id, form_code, form_template, form_need_num, faild_num, pass_num, create_time, wlCode, special, vendor, batch ,sn_prefix,other,spare1,spare2,spare3,spare4 from workform_head
|
||
|
</sql>
|
||
|
|
||
|
<select id="selectWorkformHeadList" parameterType="WorkformHead" resultMap="WorkformHeadResult">
|
||
|
<include refid="selectWorkformHeadVo"/>
|
||
|
<where>
|
||
|
<if test="formCode != null and formCode != ''"> and form_code = #{formCode}</if>
|
||
|
<if test="formTemplate != null and formTemplate != ''"> and form_template = #{formTemplate}</if>
|
||
|
<if test="formNeedNum != null "> and form_need_num = #{formNeedNum}</if>
|
||
|
<if test="faildNum != null "> and faild_num = #{faildNum}</if>
|
||
|
<if test="passNum != null "> and pass_num = #{passNum}</if>
|
||
|
<if test="wlCode != null and wlCode != ''"> and wlCode = #{wlCode}</if>
|
||
|
<if test="special != null and special != ''"> and special = #{special}</if>
|
||
|
<if test="vendor != null and vendor != ''"> and vendor = #{vendor}</if>
|
||
|
<if test="batch != null and batch != ''"> and batch = #{batch}</if>
|
||
|
<if test="snPrefix != null and batch != ''"> and snPrefix = #{snPrefix}</if>
|
||
|
<if test="other != null and batch != ''"> and other = #{other}</if>
|
||
|
</where>
|
||
|
</select>
|
||
|
|
||
|
<select id="selectWorkformHeadById" parameterType="Integer" resultMap="WorkformHeadResult">
|
||
|
<include refid="selectWorkformHeadVo"/>
|
||
|
where id = #{id}
|
||
|
</select>
|
||
|
<select id="selectWorkformHeadByCode" parameterType="WorkformHead" resultMap="WorkformHeadResult">
|
||
|
<include refid="selectWorkformHeadVo"/>
|
||
|
where form_code = #{formCode}
|
||
|
</select>
|
||
|
|
||
|
<select id="selectWorkformHeadByCodeWlCode" parameterType="WorkformHead" resultMap="WorkformHeadResult">
|
||
|
<include refid="selectWorkformHeadVo"/>
|
||
|
where form_code != #{formCode} and wlCode = #{wlCode}
|
||
|
</select>
|
||
|
|
||
|
<insert id="insertWorkformHead" parameterType="WorkformHead" useGeneratedKeys="true" keyProperty="id">
|
||
|
insert into workform_head
|
||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
<if test="formCode != null">form_code,</if>
|
||
|
<if test="formTemplate != null">form_template,</if>
|
||
|
<if test="formNeedNum != null">form_need_num,</if>
|
||
|
<if test="faildNum != null">faild_num,</if>
|
||
|
<if test="passNum != null">pass_num,</if>
|
||
|
<if test="createTime != null">create_time,</if>
|
||
|
<if test="wlCode != null">wlCode,</if>
|
||
|
<if test="special != null">special,</if>
|
||
|
<if test="vendor != null">vendor,</if>
|
||
|
<if test="batch != null">batch,</if>
|
||
|
<if test="snPrefix != null">sn_Prefix,</if>
|
||
|
<if test="other != null">other,</if>
|
||
|
</trim>
|
||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||
|
<if test="formCode != null">#{formCode},</if>
|
||
|
<if test="formTemplate != null">#{formTemplate},</if>
|
||
|
<if test="formNeedNum != null">#{formNeedNum},</if>
|
||
|
<if test="faildNum != null">#{faildNum},</if>
|
||
|
<if test="passNum != null">#{passNum},</if>
|
||
|
<if test="createTime != null">#{createTime},</if>
|
||
|
<if test="wlCode != null">#{wlCode},</if>
|
||
|
<if test="special != null">#{special},</if>
|
||
|
<if test="vendor != null">#{vendor},</if>
|
||
|
<if test="batch != null">#{batch},</if>
|
||
|
<if test="snPrefix != null">#{snPrefix},</if>
|
||
|
<if test="other != null">#{other},</if>
|
||
|
</trim>
|
||
|
</insert>
|
||
|
|
||
|
<update id="updateWorkformHead" parameterType="WorkformHead">
|
||
|
update workform_head
|
||
|
<trim prefix="SET" suffixOverrides=",">
|
||
|
<if test="formCode != null">form_code = #{formCode},</if>
|
||
|
<if test="formTemplate != null">form_template = #{formTemplate},</if>
|
||
|
<if test="formNeedNum != null">form_need_num = #{formNeedNum},</if>
|
||
|
<if test="faildNum != null">faild_num = #{faildNum},</if>
|
||
|
<if test="passNum != null">pass_num = #{passNum},</if>
|
||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||
|
<if test="wlCode != null">wlCode = #{wlCode},</if>
|
||
|
<if test="special != null">special = #{special},</if>
|
||
|
<if test="vendor != null">vendor = #{vendor},</if>
|
||
|
<if test="batch != null">batch = #{batch},</if>
|
||
|
<if test="snPrefix != null">sn_Prefix = #{snPrefix},</if>
|
||
|
<if test="other != null">other = #{other},</if>
|
||
|
</trim>
|
||
|
where form_code = #{formCode}
|
||
|
</update>
|
||
|
|
||
|
<delete id="deleteWorkformHeadById" parameterType="Integer">
|
||
|
delete from workform_head where id = #{id}
|
||
|
</delete>
|
||
|
|
||
|
<delete id="deleteWorkformHeadByIds" parameterType="String">
|
||
|
delete from workform_head where id in
|
||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||
|
#{id}
|
||
|
</foreach>
|
||
|
</delete>
|
||
|
|
||
|
</mapper>
|