万材erp项目
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.
 
 
 
 

92 lines
3.9 KiB

<?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.BoxWorkformHeadMapper">
<resultMap type="BoxWorkformHead" id="BoxWorkformHeadResult">
<result property="id" column="id" />
<result property="boxCode" column="box_code" />
<result property="workformCode" column="workform_code" />
<result property="maxNum" column="max_num" />
<result property="currNum" column="curr_num" />
<result property="space1" column="space1" />
<result property="space2" column="space2" />
</resultMap>
<sql id="selectBoxWorkformHeadVo">
select id, box_code, workform_code, max_num, curr_num, space1, space2 from box_workform_head
</sql>
<select id="selectBoxWorkformHeadList" parameterType="BoxWorkformHead" resultMap="BoxWorkformHeadResult">
<include refid="selectBoxWorkformHeadVo"/>
<where>
<if test="boxCode != null and boxCode != ''"> and box_code = #{boxCode}</if>
<if test="workformCode != null and workformCode != ''"> and workform_code = #{workformCode}</if>
<if test="maxNum != null "> and max_num = #{maxNum}</if>
<if test="currNum != null "> and curr_num = #{currNum}</if>
<if test="space1 != null and space1 != ''"> and space1 = #{space1}</if>
<if test="space2 != null and space2 != ''"> and space2 = #{space2}</if>
</where>
</select>
<select id="selectBoxWorkformHeadById" parameterType="Long" resultMap="BoxWorkformHeadResult">
<include refid="selectBoxWorkformHeadVo"/>
where id = #{id}
</select>
<select id="selectCountByDate" parameterType="String" resultType="int">
select count(*) from box_workform_head
where space1 != ""
</select>
<insert id="insertBoxWorkformHead" parameterType="BoxWorkformHead" useGeneratedKeys="true" keyProperty="id">
insert into box_workform_head
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="boxCode != null">box_code,</if>
<if test="workformCode != null">workform_code,</if>
<if test="maxNum != null">max_num,</if>
<if test="currNum != null "> curr_num</if>
<if test="space1 != null">space1,</if>
<if test="space2 != null">space2,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="boxCode != null">#{boxCode},</if>
<if test="workformCode != null">#{workformCode},</if>
<if test="maxNum != null">#{maxNum},</if>
<if test="currNum != null ">#{currNum}</if>
<if test="space1 != null">#{space1},</if>
<if test="space2 != null">#{space2},</if>
</trim>
</insert>
<update id="updateBoxWorkformHead" parameterType="BoxWorkformHead">
update box_workform_head
<trim prefix="SET" suffixOverrides=",">
<if test="boxCode != null">box_code = #{boxCode},</if>
<if test="workformCode != null">workform_code = #{workformCode},</if>
<if test="maxNum != null">max_num = #{maxNum},</if>
<if test="currNum != null">curr_num = #{currNum},</if>
<if test="space1 != null">space1 = #{space1},</if>
<if test="space2 != null">space2 = #{space2},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteBoxWorkformHeadById" parameterType="Long">
delete from box_workform_head where id = #{id}
</delete>
<delete id="deleteBoxWorkformHeadByIds" parameterType="String">
delete from box_workform_head where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>