项目初始化
This commit is contained in:
@@ -0,0 +1,112 @@
|
||||
<?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.out.stockoutdetail.mapper.OutStockoutDetailMapper">
|
||||
|
||||
<resultMap type="OutStockoutDetail" id="OutStockoutDetailResult">
|
||||
<result property="stockoutDetailId" column="stockout_detail_id" />
|
||||
<result property="stockoutId" column="stockout_id" />
|
||||
<result property="lotNo" column="lot_no" />
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="productName" column="product_name" />
|
||||
<result property="quantity" column="quantity" />
|
||||
<result property="allotNum" column="allot_num" />
|
||||
<result property="assignNum" column="assign_num" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="status" column="status" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectOutStockoutDetailVo">
|
||||
select stockout_detail_id, stockout_id, lot_no, product_id, product_name, quantity, allot_num, assign_num, remark from out_stockout_detail
|
||||
</sql>
|
||||
<sql id="selectOutStockoutDetailFinishVo">
|
||||
select stockout_detail_id, stockout_id, lot_no, product_id, product_name, quantity, allot_num, assign_num, remark from out_stockout_detail_finish
|
||||
</sql>
|
||||
|
||||
<select id="selectOutStockoutDetailList" parameterType="OutStockoutDetail" resultMap="OutStockoutDetailResult">
|
||||
<include refid="selectOutStockoutDetailVo"/>
|
||||
<where>
|
||||
<if test="stockoutId != null and stockoutId != ''"> and stockout_id = #{stockoutId}</if>
|
||||
<if test="lotNo != null and lotNo != ''"> and lot_no = #{lotNo}</if>
|
||||
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
|
||||
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
||||
<if test="quantity != null "> and quantity = #{quantity}</if>
|
||||
<if test="allotNum != null "> and allot_num = #{allotNum}</if>
|
||||
<if test="assignNum != null "> and assign_num = #{assignNum}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectOutStockoutDetailByStockoutDetailId" parameterType="String" resultMap="OutStockoutDetailResult">
|
||||
<include refid="selectOutStockoutDetailVo"/>
|
||||
where stockout_detail_id = #{stockoutDetailId}
|
||||
</select>
|
||||
<select id="selectOutStockoutDetailListByStockoutId" parameterType="String" resultMap="OutStockoutDetailResult">
|
||||
<include refid="selectOutStockoutDetailVo"/>
|
||||
where stockout_id = #{stockoutDetailId}
|
||||
</select>
|
||||
<select id="selectOutStockoutDetailFinishList" parameterType="OutStockoutDetail" resultMap="OutStockoutDetailResult">
|
||||
<include refid="selectOutStockoutDetailFinishVo"/>
|
||||
<where>
|
||||
<if test="stockoutId != null and stockoutId != ''"> and stockout_id = #{stockoutId}</if>
|
||||
<if test="lotNo != null and lotNo != ''"> and lot_no = #{lotNo}</if>
|
||||
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
|
||||
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
||||
<if test="quantity != null "> and quantity = #{quantity}</if>
|
||||
<if test="allotNum != null "> and allot_num = #{allotNum}</if>
|
||||
<if test="assignNum != null "> and assign_num = #{assignNum}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insertOutStockoutDetail" parameterType="OutStockoutDetail">
|
||||
insert into out_stockout_detail
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="stockoutDetailId != null">stockout_detail_id,</if>
|
||||
<if test="stockoutId != null and stockoutId != ''">stockout_id,</if>
|
||||
<if test="lotNo != null">lot_no,</if>
|
||||
<if test="productId != null and productId != ''">product_id,</if>
|
||||
<if test="productName != null">product_name,</if>
|
||||
<if test="quantity != null">quantity,</if>
|
||||
<if test="allotNum != null">allot_num,</if>
|
||||
<if test="assignNum != null">assign_num,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="stockoutDetailId != null">#{stockoutDetailId},</if>
|
||||
<if test="stockoutId != null and stockoutId != ''">#{stockoutId},</if>
|
||||
<if test="lotNo != null">#{lotNo},</if>
|
||||
<if test="productId != null and productId != ''">#{productId},</if>
|
||||
<if test="productName != null">#{productName},</if>
|
||||
<if test="quantity != null">#{quantity},</if>
|
||||
<if test="allotNum != null">#{allotNum},</if>
|
||||
<if test="assignNum != null">#{assignNum},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateOutStockoutDetail" parameterType="OutStockoutDetail">
|
||||
update out_stockout_detail
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="stockoutId != null and stockoutId != ''">stockout_id = #{stockoutId},</if>
|
||||
<if test="lotNo != null">lot_no = #{lotNo},</if>
|
||||
<if test="productId != null and productId != ''">product_id = #{productId},</if>
|
||||
<if test="productName != null">product_name = #{productName},</if>
|
||||
<if test="quantity != null">quantity = #{quantity},</if>
|
||||
<if test="allotNum != null">allot_num = #{allotNum},</if>
|
||||
<if test="assignNum != null">assign_num = #{assignNum},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where stockout_detail_id = #{stockoutDetailId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteOutStockoutDetailByStockoutDetailId" parameterType="String">
|
||||
delete from out_stockout_detail where stockout_detail_id = #{stockoutDetailId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteOutStockoutDetailByStockoutDetailIds" parameterType="String">
|
||||
delete from out_stockout_detail where stockout_detail_id in
|
||||
<foreach item="stockoutDetailId" collection="array" open="(" separator="," close=")">
|
||||
#{stockoutDetailId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user