出库部分
This commit is contained in:
@@ -0,0 +1,212 @@
|
||||
<?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.outStockoutDetailFinish.mapper.OutStockoutDetailFinishMapper">
|
||||
|
||||
<resultMap type="OutStockoutDetailFinish" id="OutStockoutDetailFinishResult">
|
||||
<result property="stockoutDetailId" column="stockout_detail_id" />
|
||||
<result property="stockoutGuid" column="stockout_guid" />
|
||||
<result property="stockoutId" column="stockout_id" />
|
||||
<result property="lotNo" column="lot_no" />
|
||||
<result property="productGuid" column="product_guid" />
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="quantity" column="quantity" />
|
||||
<result property="quantityX" column="quantity_x" />
|
||||
<result property="quantityJ" column="quantity_j" />
|
||||
<result property="assignNum" column="assign_num" />
|
||||
<result property="assignNumX" column="assign_num_x" />
|
||||
<result property="assignNumJ" column="assign_num_j" />
|
||||
<result property="allotQuantity" column="allot_quantity" />
|
||||
<result property="allotQuantityX" column="allot_quantity_x" />
|
||||
<result property="allotQuantityJ" column="allot_quantity_j" />
|
||||
<result property="price" column="price" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="outId" column="out_id" />
|
||||
<result property="bukechaiQuantity" column="bukechai_quantity" />
|
||||
<result property="kechaiQuantity" column="kechai_quantity" />
|
||||
<result property="entryid" column="entryid" />
|
||||
<result property="flatQuantity" column="flat_quantity" />
|
||||
<result property="fid" column="fid" />
|
||||
<result property="erpStockoutId" column="erp_stockout_id" />
|
||||
<result property="unit" column="unit" />
|
||||
<result property="spec" column="spec" />
|
||||
<result property="productName" column="product_name" />
|
||||
<result property="supplierId" column="supplier_id" />
|
||||
<result property="cargoNo" column="cargo_no" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="printDate" column="print_date" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectOutStockoutDetailFinishVo">
|
||||
select stockout_detail_id, stockout_guid, stockout_id, lot_no, product_guid, product_id, quantity, quantity_x, quantity_j, assign_num, assign_num_x, assign_num_j, allot_quantity, allot_quantity_x, allot_quantity_j, price, remark, warehouse_id, out_id, bukechai_quantity, kechai_quantity, entryid, flat_quantity, fid, erp_stockout_id, unit, spec, product_name, supplier_id, cargo_no, create_time, print_date from out_stockout_detail_finish
|
||||
</sql>
|
||||
|
||||
<select id="selectOutStockoutDetailFinishList" parameterType="OutStockoutDetailFinish" resultMap="OutStockoutDetailFinishResult">
|
||||
<include refid="selectOutStockoutDetailFinishVo"/>
|
||||
<where>
|
||||
<if test="stockoutDetailId != null and stockoutDetailId != ''"> and stockout_detail_id = #{stockoutDetailId}</if>
|
||||
<if test="stockoutGuid != null and stockoutGuid != ''"> and stockout_guid = #{stockoutGuid}</if>
|
||||
<if test="stockoutId != null and stockoutId != ''"> and stockout_id = #{stockoutId}</if>
|
||||
<if test="lotNo != null and lotNo != ''"> and lot_no = #{lotNo}</if>
|
||||
<if test="productGuid != null and productGuid != ''"> and product_guid = #{productGuid}</if>
|
||||
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
|
||||
<if test="quantity != null "> and quantity = #{quantity}</if>
|
||||
<if test="quantityX != null "> and quantity_x = #{quantityX}</if>
|
||||
<if test="quantityJ != null "> and quantity_j = #{quantityJ}</if>
|
||||
<if test="assignNum != null "> and assign_num = #{assignNum}</if>
|
||||
<if test="assignNumX != null "> and assign_num_x = #{assignNumX}</if>
|
||||
<if test="assignNumJ != null "> and assign_num_j = #{assignNumJ}</if>
|
||||
<if test="allotQuantity != null "> and allot_quantity = #{allotQuantity}</if>
|
||||
<if test="allotQuantityX != null "> and allot_quantity_x = #{allotQuantityX}</if>
|
||||
<if test="allotQuantityJ != null "> and allot_quantity_j = #{allotQuantityJ}</if>
|
||||
<if test="price != null and price != ''"> and price = #{price}</if>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
|
||||
<if test="outId != null and outId != ''"> and out_id = #{outId}</if>
|
||||
<if test="bukechaiQuantity != null and bukechaiQuantity != ''"> and bukechai_quantity = #{bukechaiQuantity}</if>
|
||||
<if test="kechaiQuantity != null and kechaiQuantity != ''"> and kechai_quantity = #{kechaiQuantity}</if>
|
||||
<if test="entryid != null and entryid != ''"> and entryid = #{entryid}</if>
|
||||
<if test="flatQuantity != null and flatQuantity != ''"> and flat_quantity = #{flatQuantity}</if>
|
||||
<if test="fid != null and fid != ''"> and fid = #{fid}</if>
|
||||
<if test="erpStockoutId != null and erpStockoutId != ''"> and erp_stockout_id = #{erpStockoutId}</if>
|
||||
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
|
||||
<if test="spec != null and spec != ''"> and spec = #{spec}</if>
|
||||
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
||||
<if test="supplierId != null and supplierId != ''"> and supplier_id = #{supplierId}</if>
|
||||
<if test="cargoNo != null and cargoNo != ''"> and cargo_no = #{cargoNo}</if>
|
||||
<if test="printDate != null and printDate != ''"> and print_date = #{printDate}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectOutStockoutDetailFinishByStockoutDetailId" parameterType="String" resultMap="OutStockoutDetailFinishResult">
|
||||
<include refid="selectOutStockoutDetailFinishVo"/>
|
||||
where stockout_detail_id = #{stockoutDetailId}
|
||||
</select>
|
||||
|
||||
<insert id="insertOutStockoutDetailFinish" parameterType="OutStockoutDetailFinish">
|
||||
insert into out_stockout_detail_finish
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="stockoutDetailId != null and stockoutDetailId != ''">stockout_detail_id,</if>
|
||||
<if test="stockoutGuid != null">stockout_guid,</if>
|
||||
<if test="stockoutId != null">stockout_id,</if>
|
||||
<if test="lotNo != null">lot_no,</if>
|
||||
<if test="productGuid != null">product_guid,</if>
|
||||
<if test="productId != null">product_id,</if>
|
||||
<if test="quantity != null">quantity,</if>
|
||||
<if test="quantityX != null">quantity_x,</if>
|
||||
<if test="quantityJ != null">quantity_j,</if>
|
||||
<if test="assignNum != null">assign_num,</if>
|
||||
<if test="assignNumX != null">assign_num_x,</if>
|
||||
<if test="assignNumJ != null">assign_num_j,</if>
|
||||
<if test="allotQuantity != null">allot_quantity,</if>
|
||||
<if test="allotQuantityX != null">allot_quantity_x,</if>
|
||||
<if test="allotQuantityJ != null">allot_quantity_j,</if>
|
||||
<if test="price != null">price,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="warehouseId != null">warehouse_id,</if>
|
||||
<if test="outId != null">out_id,</if>
|
||||
<if test="bukechaiQuantity != null">bukechai_quantity,</if>
|
||||
<if test="kechaiQuantity != null">kechai_quantity,</if>
|
||||
<if test="entryid != null">entryid,</if>
|
||||
<if test="flatQuantity != null">flat_quantity,</if>
|
||||
<if test="fid != null">fid,</if>
|
||||
<if test="erpStockoutId != null">erp_stockout_id,</if>
|
||||
<if test="unit != null">unit,</if>
|
||||
<if test="spec != null">spec,</if>
|
||||
<if test="productName != null">product_name,</if>
|
||||
<if test="supplierId != null">supplier_id,</if>
|
||||
<if test="cargoNo != null">cargo_no,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="printDate != null">print_date,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="stockoutDetailId != null and stockoutDetailId != ''">#{stockoutDetailId},</if>
|
||||
<if test="stockoutGuid != null">#{stockoutGuid},</if>
|
||||
<if test="stockoutId != null">#{stockoutId},</if>
|
||||
<if test="lotNo != null">#{lotNo},</if>
|
||||
<if test="productGuid != null">#{productGuid},</if>
|
||||
<if test="productId != null">#{productId},</if>
|
||||
<if test="quantity != null">#{quantity},</if>
|
||||
<if test="quantityX != null">#{quantityX},</if>
|
||||
<if test="quantityJ != null">#{quantityJ},</if>
|
||||
<if test="assignNum != null">#{assignNum},</if>
|
||||
<if test="assignNumX != null">#{assignNumX},</if>
|
||||
<if test="assignNumJ != null">#{assignNumJ},</if>
|
||||
<if test="allotQuantity != null">#{allotQuantity},</if>
|
||||
<if test="allotQuantityX != null">#{allotQuantityX},</if>
|
||||
<if test="allotQuantityJ != null">#{allotQuantityJ},</if>
|
||||
<if test="price != null">#{price},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="warehouseId != null">#{warehouseId},</if>
|
||||
<if test="outId != null">#{outId},</if>
|
||||
<if test="bukechaiQuantity != null">#{bukechaiQuantity},</if>
|
||||
<if test="kechaiQuantity != null">#{kechaiQuantity},</if>
|
||||
<if test="entryid != null">#{entryid},</if>
|
||||
<if test="flatQuantity != null">#{flatQuantity},</if>
|
||||
<if test="fid != null">#{fid},</if>
|
||||
<if test="erpStockoutId != null">#{erpStockoutId},</if>
|
||||
<if test="unit != null">#{unit},</if>
|
||||
<if test="spec != null">#{spec},</if>
|
||||
<if test="productName != null">#{productName},</if>
|
||||
<if test="supplierId != null">#{supplierId},</if>
|
||||
<if test="cargoNo != null">#{cargoNo},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="printDate != null">#{printDate},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateOutStockoutDetailFinish" parameterType="OutStockoutDetailFinish">
|
||||
update out_stockout_detail_finish
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="stockoutGuid != null">stockout_guid = #{stockoutGuid},</if>
|
||||
<if test="stockoutId != null">stockout_id = #{stockoutId},</if>
|
||||
<if test="lotNo != null">lot_no = #{lotNo},</if>
|
||||
<if test="productGuid != null">product_guid = #{productGuid},</if>
|
||||
<if test="productId != null">product_id = #{productId},</if>
|
||||
<if test="quantity != null">quantity = #{quantity},</if>
|
||||
<if test="quantityX != null">quantity_x = #{quantityX},</if>
|
||||
<if test="quantityJ != null">quantity_j = #{quantityJ},</if>
|
||||
<if test="assignNum != null">assign_num = #{assignNum},</if>
|
||||
<if test="assignNumX != null">assign_num_x = #{assignNumX},</if>
|
||||
<if test="assignNumJ != null">assign_num_j = #{assignNumJ},</if>
|
||||
<if test="allotQuantity != null">allot_quantity = #{allotQuantity},</if>
|
||||
<if test="allotQuantityX != null">allot_quantity_x = #{allotQuantityX},</if>
|
||||
<if test="allotQuantityJ != null">allot_quantity_j = #{allotQuantityJ},</if>
|
||||
<if test="price != null">price = #{price},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
|
||||
<if test="outId != null">out_id = #{outId},</if>
|
||||
<if test="bukechaiQuantity != null">bukechai_quantity = #{bukechaiQuantity},</if>
|
||||
<if test="kechaiQuantity != null">kechai_quantity = #{kechaiQuantity},</if>
|
||||
<if test="entryid != null">entryid = #{entryid},</if>
|
||||
<if test="flatQuantity != null">flat_quantity = #{flatQuantity},</if>
|
||||
<if test="fid != null">fid = #{fid},</if>
|
||||
<if test="erpStockoutId != null">erp_stockout_id = #{erpStockoutId},</if>
|
||||
<if test="unit != null">unit = #{unit},</if>
|
||||
<if test="spec != null">spec = #{spec},</if>
|
||||
<if test="productName != null">product_name = #{productName},</if>
|
||||
<if test="supplierId != null">supplier_id = #{supplierId},</if>
|
||||
<if test="cargoNo != null">cargo_no = #{cargoNo},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="printDate != null">print_date = #{printDate},</if>
|
||||
</trim>
|
||||
where stockout_detail_id = #{stockoutDetailId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteOutStockoutDetailFinishByStockoutDetailId" parameterType="String">
|
||||
delete from out_stockout_detail_finish where stockout_detail_id = #{stockoutDetailId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteOutStockoutDetailFinishByStockoutDetailIds" parameterType="String">
|
||||
delete from out_stockout_detail_finish where stockout_detail_id in
|
||||
<foreach item="stockoutDetailId" collection="array" open="(" separator="," close=")">
|
||||
#{stockoutDetailId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectOutStockoutDetailFinishListByStockoutGuid" parameterType="string" resultMap="OutStockoutDetailFinishResult">
|
||||
<include refid="selectOutStockoutDetailFinishVo"/>
|
||||
where stockout_guid = #{stockoutGuid}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,212 @@
|
||||
<?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.outStockoutDetail.mapper.OutStockoutDetailMapper">
|
||||
|
||||
<resultMap type="OutStockoutDetail" id="OutStockoutDetailResult">
|
||||
<result property="stockoutDetailId" column="stockout_detail_id" />
|
||||
<result property="stockoutGuid" column="stockout_guid" />
|
||||
<result property="stockoutId" column="stockout_id" />
|
||||
<result property="lotNo" column="lot_no" />
|
||||
<result property="productGuid" column="product_guid" />
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="quantity" column="quantity" />
|
||||
<result property="quantityX" column="quantity_x" />
|
||||
<result property="quantityJ" column="quantity_j" />
|
||||
<result property="assignNum" column="assign_num" />
|
||||
<result property="assignNumX" column="assign_num_x" />
|
||||
<result property="assignNumJ" column="assign_num_j" />
|
||||
<result property="allotQuantity" column="allot_quantity" />
|
||||
<result property="allotQuantityX" column="allot_quantity_x" />
|
||||
<result property="allotQuantityJ" column="allot_quantity_j" />
|
||||
<result property="price" column="price" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="outId" column="out_id" />
|
||||
<result property="bukechaiQuantity" column="bukechai_quantity" />
|
||||
<result property="kechaiQuantity" column="kechai_quantity" />
|
||||
<result property="entryid" column="entryid" />
|
||||
<result property="flatQuantity" column="flat_quantity" />
|
||||
<result property="fid" column="fid" />
|
||||
<result property="erpStockoutId" column="erp_stockout_id" />
|
||||
<result property="unit" column="unit" />
|
||||
<result property="spec" column="spec" />
|
||||
<result property="productName" column="product_name" />
|
||||
<result property="supplierId" column="supplier_id" />
|
||||
<result property="cargoNo" column="cargo_no" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="printDate" column="print_date" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectOutStockoutDetailVo">
|
||||
select stockout_detail_id, stockout_guid, stockout_id, lot_no, product_guid, product_id, quantity, quantity_x, quantity_j, assign_num, assign_num_x, assign_num_j, allot_quantity, allot_quantity_x, allot_quantity_j, price, remark, warehouse_id, out_id, bukechai_quantity, kechai_quantity, entryid, flat_quantity, fid, erp_stockout_id, unit, spec, product_name, supplier_id, cargo_no, create_time, print_date from out_stockout_detail
|
||||
</sql>
|
||||
|
||||
<select id="selectOutStockoutDetailList" parameterType="OutStockoutDetail" resultMap="OutStockoutDetailResult">
|
||||
<include refid="selectOutStockoutDetailVo"/>
|
||||
<where>
|
||||
<if test="stockoutDetailId != null and stockoutDetailId != ''"> and stockout_detail_id = #{stockoutDetailId}</if>
|
||||
<if test="stockoutGuid != null and stockoutGuid != ''"> and stockout_guid = #{stockoutGuid}</if>
|
||||
<if test="stockoutId != null and stockoutId != ''"> and stockout_id = #{stockoutId}</if>
|
||||
<if test="lotNo != null and lotNo != ''"> and lot_no like concat('%', #{lotNo}, '%')</if>
|
||||
<if test="productGuid != null and productGuid != ''"> and product_guid = #{productGuid}</if>
|
||||
<if test="productId != null and productId != ''"> and product_id like concat('%', #{productId}, '%')</if>
|
||||
<if test="quantity != null "> and quantity = #{quantity}</if>
|
||||
<if test="quantityX != null "> and quantity_x = #{quantityX}</if>
|
||||
<if test="quantityJ != null "> and quantity_j = #{quantityJ}</if>
|
||||
<if test="assignNum != null "> and assign_num = #{assignNum}</if>
|
||||
<if test="assignNumX != null "> and assign_num_x = #{assignNumX}</if>
|
||||
<if test="assignNumJ != null "> and assign_num_j = #{assignNumJ}</if>
|
||||
<if test="allotQuantity != null "> and allot_quantity = #{allotQuantity}</if>
|
||||
<if test="allotQuantityX != null "> and allot_quantity_x = #{allotQuantityX}</if>
|
||||
<if test="allotQuantityJ != null "> and allot_quantity_j = #{allotQuantityJ}</if>
|
||||
<if test="price != null and price != ''"> and price = #{price}</if>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
|
||||
<if test="outId != null and outId != ''"> and out_id = #{outId}</if>
|
||||
<if test="bukechaiQuantity != null and bukechaiQuantity != ''"> and bukechai_quantity = #{bukechaiQuantity}</if>
|
||||
<if test="kechaiQuantity != null and kechaiQuantity != ''"> and kechai_quantity = #{kechaiQuantity}</if>
|
||||
<if test="entryid != null and entryid != ''"> and entryid = #{entryid}</if>
|
||||
<if test="flatQuantity != null and flatQuantity != ''"> and flat_quantity = #{flatQuantity}</if>
|
||||
<if test="fid != null and fid != ''"> and fid = #{fid}</if>
|
||||
<if test="erpStockoutId != null and erpStockoutId != ''"> and erp_stockout_id = #{erpStockoutId}</if>
|
||||
<if test="unit != null and unit != ''"> and unit like concat('%', #{unit}, '%')</if>
|
||||
<if test="spec != null and spec != ''"> and spec like concat('%', #{spec}, '%')</if>
|
||||
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
||||
<if test="supplierId != null and supplierId != ''"> and supplier_id like concat('%', #{supplierId}, '%')</if>
|
||||
<if test="cargoNo != null and cargoNo != ''"> and cargo_no = #{cargoNo}</if>
|
||||
<if test="printDate != null and printDate != ''"> and print_date = #{printDate}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectOutStockoutDetailByStockoutDetailId" parameterType="String" resultMap="OutStockoutDetailResult">
|
||||
<include refid="selectOutStockoutDetailVo"/>
|
||||
where stockout_detail_id = #{stockoutDetailId}
|
||||
</select>
|
||||
|
||||
<insert id="insertOutStockoutDetail" parameterType="OutStockoutDetail">
|
||||
insert into out_stockout_detail
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="stockoutDetailId != null and stockoutDetailId != ''">stockout_detail_id,</if>
|
||||
<if test="stockoutGuid != null">stockout_guid,</if>
|
||||
<if test="stockoutId != null">stockout_id,</if>
|
||||
<if test="lotNo != null">lot_no,</if>
|
||||
<if test="productGuid != null">product_guid,</if>
|
||||
<if test="productId != null">product_id,</if>
|
||||
<if test="quantity != null">quantity,</if>
|
||||
<if test="quantityX != null">quantity_x,</if>
|
||||
<if test="quantityJ != null">quantity_j,</if>
|
||||
<if test="assignNum != null">assign_num,</if>
|
||||
<if test="assignNumX != null">assign_num_x,</if>
|
||||
<if test="assignNumJ != null">assign_num_j,</if>
|
||||
<if test="allotQuantity != null">allot_quantity,</if>
|
||||
<if test="allotQuantityX != null">allot_quantity_x,</if>
|
||||
<if test="allotQuantityJ != null">allot_quantity_j,</if>
|
||||
<if test="price != null">price,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="warehouseId != null">warehouse_id,</if>
|
||||
<if test="outId != null">out_id,</if>
|
||||
<if test="bukechaiQuantity != null">bukechai_quantity,</if>
|
||||
<if test="kechaiQuantity != null">kechai_quantity,</if>
|
||||
<if test="entryid != null">entryid,</if>
|
||||
<if test="flatQuantity != null">flat_quantity,</if>
|
||||
<if test="fid != null">fid,</if>
|
||||
<if test="erpStockoutId != null">erp_stockout_id,</if>
|
||||
<if test="unit != null">unit,</if>
|
||||
<if test="spec != null">spec,</if>
|
||||
<if test="productName != null">product_name,</if>
|
||||
<if test="supplierId != null">supplier_id,</if>
|
||||
<if test="cargoNo != null">cargo_no,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="printDate != null">print_date,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="stockoutDetailId != null and stockoutDetailId != ''">#{stockoutDetailId},</if>
|
||||
<if test="stockoutGuid != null">#{stockoutGuid},</if>
|
||||
<if test="stockoutId != null">#{stockoutId},</if>
|
||||
<if test="lotNo != null">#{lotNo},</if>
|
||||
<if test="productGuid != null">#{productGuid},</if>
|
||||
<if test="productId != null">#{productId},</if>
|
||||
<if test="quantity != null">#{quantity},</if>
|
||||
<if test="quantityX != null">#{quantityX},</if>
|
||||
<if test="quantityJ != null">#{quantityJ},</if>
|
||||
<if test="assignNum != null">#{assignNum},</if>
|
||||
<if test="assignNumX != null">#{assignNumX},</if>
|
||||
<if test="assignNumJ != null">#{assignNumJ},</if>
|
||||
<if test="allotQuantity != null">#{allotQuantity},</if>
|
||||
<if test="allotQuantityX != null">#{allotQuantityX},</if>
|
||||
<if test="allotQuantityJ != null">#{allotQuantityJ},</if>
|
||||
<if test="price != null">#{price},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="warehouseId != null">#{warehouseId},</if>
|
||||
<if test="outId != null">#{outId},</if>
|
||||
<if test="bukechaiQuantity != null">#{bukechaiQuantity},</if>
|
||||
<if test="kechaiQuantity != null">#{kechaiQuantity},</if>
|
||||
<if test="entryid != null">#{entryid},</if>
|
||||
<if test="flatQuantity != null">#{flatQuantity},</if>
|
||||
<if test="fid != null">#{fid},</if>
|
||||
<if test="erpStockoutId != null">#{erpStockoutId},</if>
|
||||
<if test="unit != null">#{unit},</if>
|
||||
<if test="spec != null">#{spec},</if>
|
||||
<if test="productName != null">#{productName},</if>
|
||||
<if test="supplierId != null">#{supplierId},</if>
|
||||
<if test="cargoNo != null">#{cargoNo},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="printDate != null">#{printDate},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateOutStockoutDetail" parameterType="OutStockoutDetail">
|
||||
update out_stockout_detail
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="stockoutGuid != null">stockout_guid = #{stockoutGuid},</if>
|
||||
<if test="stockoutId != null">stockout_id = #{stockoutId},</if>
|
||||
<if test="lotNo != null">lot_no = #{lotNo},</if>
|
||||
<if test="productGuid != null">product_guid = #{productGuid},</if>
|
||||
<if test="productId != null">product_id = #{productId},</if>
|
||||
<if test="quantity != null">quantity = #{quantity},</if>
|
||||
<if test="quantityX != null">quantity_x = #{quantityX},</if>
|
||||
<if test="quantityJ != null">quantity_j = #{quantityJ},</if>
|
||||
<if test="assignNum != null">assign_num = #{assignNum},</if>
|
||||
<if test="assignNumX != null">assign_num_x = #{assignNumX},</if>
|
||||
<if test="assignNumJ != null">assign_num_j = #{assignNumJ},</if>
|
||||
<if test="allotQuantity != null">allot_quantity = #{allotQuantity},</if>
|
||||
<if test="allotQuantityX != null">allot_quantity_x = #{allotQuantityX},</if>
|
||||
<if test="allotQuantityJ != null">allot_quantity_j = #{allotQuantityJ},</if>
|
||||
<if test="price != null">price = #{price},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
|
||||
<if test="outId != null">out_id = #{outId},</if>
|
||||
<if test="bukechaiQuantity != null">bukechai_quantity = #{bukechaiQuantity},</if>
|
||||
<if test="kechaiQuantity != null">kechai_quantity = #{kechaiQuantity},</if>
|
||||
<if test="entryid != null">entryid = #{entryid},</if>
|
||||
<if test="flatQuantity != null">flat_quantity = #{flatQuantity},</if>
|
||||
<if test="fid != null">fid = #{fid},</if>
|
||||
<if test="erpStockoutId != null">erp_stockout_id = #{erpStockoutId},</if>
|
||||
<if test="unit != null">unit = #{unit},</if>
|
||||
<if test="spec != null">spec = #{spec},</if>
|
||||
<if test="productName != null">product_name = #{productName},</if>
|
||||
<if test="supplierId != null">supplier_id = #{supplierId},</if>
|
||||
<if test="cargoNo != null">cargo_no = #{cargoNo},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="printDate != null">print_date = #{printDate},</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>
|
||||
|
||||
<select id="selectOutStockoutDetailByStockoutGuid" parameterType="string" resultMap="OutStockoutDetailResult">
|
||||
<include refid="selectOutStockoutDetailVo"/>
|
||||
where stockout_guid = #{stockoutGuid}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,157 @@
|
||||
<?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.outStockoutFinish.mapper.OutStockoutFinishMapper">
|
||||
|
||||
<resultMap type="OutStockoutFinish" id="OutStockoutFinishResult">
|
||||
<result property="stockoutGuid" column="stockout_guid" />
|
||||
<result property="stockoutId" column="stockout_id" />
|
||||
<result property="outType" column="out_type" />
|
||||
<result property="createDate" column="create_date" />
|
||||
<result property="departmentNo" column="department_no" />
|
||||
<result property="customerNo" column="customer_no" />
|
||||
<result property="createManId" column="create_man_id" />
|
||||
<result property="status" column="status" />
|
||||
<result property="stockoutSource" column="stockout_source" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="classNowId" column="class_now_id" />
|
||||
<result property="exitId" column="exit_id" />
|
||||
<result property="carNumber" column="car_number" />
|
||||
<result property="FID" column="FID" />
|
||||
<result property="erpStockoutId" column="erp_stockout_id" />
|
||||
<result property="startDate" column="start_date" />
|
||||
<result property="finishDate" column="finish_date" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectOutStockoutFinishVo">
|
||||
select stockout_guid, stockout_id, out_type, create_date, department_no, customer_no, create_man_id, status, stockout_source, warehouse_id, class_now_id, exit_id, car_number, FID, erp_stockout_id, start_date, finish_date from out_stockout_finish
|
||||
</sql>
|
||||
|
||||
<select id="selectOutStockoutFinishList" parameterType="OutStockoutFinish" resultMap="OutStockoutFinishResult">
|
||||
<include refid="selectOutStockoutFinishVo"/>
|
||||
<where>
|
||||
<if test="stockoutGuid != null and stockoutGuid != ''"> and stockout_guid = #{stockoutGuid}</if>
|
||||
<if test="stockoutId != null and stockoutId != ''"> and stockout_id = #{stockoutId}</if>
|
||||
<if test="outType != null and outType != ''"> and out_type = #{outType}</if>
|
||||
<if test="createDate != null and createDate != ''"> and create_date = #{createDate}</if>
|
||||
<if test="departmentNo != null and departmentNo != ''"> and department_no = #{departmentNo}</if>
|
||||
<if test="customerNo != null and customerNo != ''"> and customer_no = #{customerNo}</if>
|
||||
<if test="createManId != null and createManId != ''"> and create_man_id = #{createManId}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="stockoutSource != null and stockoutSource != ''"> and stockout_source = #{stockoutSource}</if>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
|
||||
<if test="classNowId != null and classNowId != ''"> and class_now_id = #{classNowId}</if>
|
||||
<if test="exitId != null and exitId != ''"> and exit_id = #{exitId}</if>
|
||||
<if test="carNumber != null and carNumber != ''"> and car_number = #{carNumber}</if>
|
||||
<if test="FID != null and FID != ''"> and FID = #{FID}</if>
|
||||
<if test="erpStockoutId != null and erpStockoutId != ''"> and erp_stockout_id = #{erpStockoutId}</if>
|
||||
<if test="startDate != null and startDate != ''"> and start_date = #{startDate}</if>
|
||||
<if test="finishDate != null and finishDate != ''"> and finish_date = #{finishDate}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectOutStockoutFinishByStockoutGuid" parameterType="String" resultMap="OutStockoutFinishResult">
|
||||
<include refid="selectOutStockoutFinishVo"/>
|
||||
where stockout_guid = #{stockoutGuid}
|
||||
</select>
|
||||
|
||||
<insert id="insertOutStockoutFinish" parameterType="OutStockoutFinish">
|
||||
insert into out_stockout_finish
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="stockoutGuid != null and stockoutGuid != ''">stockout_guid,</if>
|
||||
<if test="stockoutId != null and stockoutId != ''">stockout_id,</if>
|
||||
<if test="outType != null and outType != ''">out_type,</if>
|
||||
<if test="createDate != null and createDate != ''">create_date,</if>
|
||||
<if test="departmentNo != null">department_no,</if>
|
||||
<if test="customerNo != null">customer_no,</if>
|
||||
<if test="createManId != null">create_man_id,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="stockoutSource != null">stockout_source,</if>
|
||||
<if test="warehouseId != null">warehouse_id,</if>
|
||||
<if test="classNowId != null">class_now_id,</if>
|
||||
<if test="exitId != null">exit_id,</if>
|
||||
<if test="carNumber != null">car_number,</if>
|
||||
<if test="FID != null">FID,</if>
|
||||
<if test="erpStockoutId != null">erp_stockout_id,</if>
|
||||
<if test="startDate != null">start_date,</if>
|
||||
<if test="finishDate != null">finish_date,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="stockoutGuid != null and stockoutGuid != ''">#{stockoutGuid},</if>
|
||||
<if test="stockoutId != null and stockoutId != ''">#{stockoutId},</if>
|
||||
<if test="outType != null and outType != ''">#{outType},</if>
|
||||
<if test="createDate != null and createDate != ''">#{createDate},</if>
|
||||
<if test="departmentNo != null">#{departmentNo},</if>
|
||||
<if test="customerNo != null">#{customerNo},</if>
|
||||
<if test="createManId != null">#{createManId},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="stockoutSource != null">#{stockoutSource},</if>
|
||||
<if test="warehouseId != null">#{warehouseId},</if>
|
||||
<if test="classNowId != null">#{classNowId},</if>
|
||||
<if test="exitId != null">#{exitId},</if>
|
||||
<if test="carNumber != null">#{carNumber},</if>
|
||||
<if test="FID != null">#{FID},</if>
|
||||
<if test="erpStockoutId != null">#{erpStockoutId},</if>
|
||||
<if test="startDate != null">#{startDate},</if>
|
||||
<if test="finishDate != null">#{finishDate},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateOutStockoutFinish" parameterType="OutStockoutFinish">
|
||||
update out_stockout_finish
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="stockoutId != null and stockoutId != ''">stockout_id = #{stockoutId},</if>
|
||||
<if test="outType != null and outType != ''">out_type = #{outType},</if>
|
||||
<if test="createDate != null and createDate != ''">create_date = #{createDate},</if>
|
||||
<if test="departmentNo != null">department_no = #{departmentNo},</if>
|
||||
<if test="customerNo != null">customer_no = #{customerNo},</if>
|
||||
<if test="createManId != null">create_man_id = #{createManId},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="stockoutSource != null">stockout_source = #{stockoutSource},</if>
|
||||
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
|
||||
<if test="classNowId != null">class_now_id = #{classNowId},</if>
|
||||
<if test="exitId != null">exit_id = #{exitId},</if>
|
||||
<if test="carNumber != null">car_number = #{carNumber},</if>
|
||||
<if test="FID != null">FID = #{FID},</if>
|
||||
<if test="erpStockoutId != null">erp_stockout_id = #{erpStockoutId},</if>
|
||||
<if test="startDate != null">start_date = #{startDate},</if>
|
||||
<if test="finishDate != null">finish_date = #{finishDate},</if>
|
||||
</trim>
|
||||
where stockout_guid = #{stockoutGuid}
|
||||
</update>
|
||||
|
||||
<delete id="deleteOutStockoutFinishByStockoutGuid" parameterType="String">
|
||||
delete from out_stockout_finish where stockout_guid = #{stockoutGuid}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteOutStockoutFinishByStockoutGuids" parameterType="String">
|
||||
delete from out_stockout_finish where stockout_guid in
|
||||
<foreach item="stockoutGuid" collection="array" open="(" separator="," close=")">
|
||||
#{stockoutGuid}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectOutStockoutFinishListByOutStockout" parameterType="OutStockout" resultMap="OutStockoutFinishResult">
|
||||
<include refid="selectOutStockoutFinishVo"/>
|
||||
<where>
|
||||
<if test="stockoutGuid != null and stockoutGuid != ''"> and stockout_guid = #{stockoutGuid}</if>
|
||||
<if test="stockoutId != null and stockoutId != ''"> and stockout_id = #{stockoutId}</if>
|
||||
<if test="outType != null and outType != ''"> and out_type = #{outType}</if>
|
||||
<if test="createDate != null and createDate != ''"> and create_date = #{createDate}</if>
|
||||
<if test="departmentNo != null and departmentNo != ''"> and department_no = #{departmentNo}</if>
|
||||
<if test="customerNo != null and customerNo != ''"> and customer_no = #{customerNo}</if>
|
||||
<if test="createManId != null and createManId != ''"> and create_man_id = #{createManId}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="stockoutSource != null and stockoutSource != ''"> and stockout_source = #{stockoutSource}</if>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
|
||||
<if test="classNowId != null and classNowId != ''"> and class_now_id = #{classNowId}</if>
|
||||
<if test="exitId != null and exitId != ''"> and exit_id = #{exitId}</if>
|
||||
<if test="carNumber != null and carNumber != ''"> and car_number = #{carNumber}</if>
|
||||
<if test="FID != null and FID != ''"> and FID = #{FID}</if>
|
||||
<if test="erpStockoutId != null and erpStockoutId != ''"> and erp_stockout_id = #{erpStockoutId}</if>
|
||||
<if test="startDate != null and startDate != ''"> and start_date = #{startDate}</if>
|
||||
<if test="finishDate != null and finishDate != ''"> and finish_date = #{finishDate}</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
140
ruoyi-admin/src/main/resources/mapper/out/OutStockoutMapper.xml
Normal file
140
ruoyi-admin/src/main/resources/mapper/out/OutStockoutMapper.xml
Normal file
@@ -0,0 +1,140 @@
|
||||
<?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.outStockout.mapper.OutStockoutMapper">
|
||||
|
||||
<resultMap type="OutStockout" id="OutStockoutResult">
|
||||
<result property="stockoutGuid" column="stockout_guid" />
|
||||
<result property="stockoutId" column="stockout_id" />
|
||||
<result property="outType" column="out_type" />
|
||||
<result property="createDate" column="create_date" />
|
||||
<result property="departmentNo" column="department_no" />
|
||||
<result property="customerNo" column="customer_no" />
|
||||
<result property="createManId" column="create_man_id" />
|
||||
<result property="status" column="status" />
|
||||
<result property="stockoutSource" column="stockout_source" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="classNowId" column="class_now_id" />
|
||||
<result property="exitId" column="exit_id" />
|
||||
<result property="carNumber" column="car_number" />
|
||||
<result property="FID" column="FID" />
|
||||
<result property="erpStockoutId" column="erp_stockout_id" />
|
||||
<result property="startDate" column="start_date" />
|
||||
<result property="finishDate" column="finish_date" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectOutStockoutVo">
|
||||
select stockout_guid, stockout_id, out_type, create_date, department_no, customer_no, create_man_id, status, stockout_source, warehouse_id, class_now_id, exit_id, car_number, FID, erp_stockout_id,start_date,finish_date from out_stockout
|
||||
</sql>
|
||||
|
||||
<select id="selectOutStockoutList" parameterType="OutStockout" resultMap="OutStockoutResult">
|
||||
<include refid="selectOutStockoutVo"/>
|
||||
<where>
|
||||
<if test="stockoutGuid != null and stockoutGuid != ''"> and stockout_guid = #{stockoutGuid}</if>
|
||||
<if test="stockoutId != null and stockoutId != ''"> and stockout_id = #{stockoutId}</if>
|
||||
<if test="outType != null and outType != ''"> and out_type = #{outType}</if>
|
||||
<if test="createDate != null and createDate != ''"> and create_date = #{createDate}</if>
|
||||
<if test="departmentNo != null and departmentNo != ''"> and department_no = #{departmentNo}</if>
|
||||
<if test="customerNo != null and customerNo != ''"> and customer_no = #{customerNo}</if>
|
||||
<if test="createManId != null and createManId != ''"> and create_man_id = #{createManId}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="stockoutSource != null and stockoutSource != ''"> and stockout_source = #{stockoutSource}</if>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
|
||||
<if test="classNowId != null and classNowId != ''"> and class_now_id = #{classNowId}</if>
|
||||
<if test="exitId != null and exitId != ''"> and exit_id = #{exitId}</if>
|
||||
<if test="carNumber != null and carNumber != ''"> and car_number = #{carNumber}</if>
|
||||
<if test="FID != null and FID != ''"> and FID = #{FID}</if>
|
||||
<if test="erpStockoutId != null and erpStockoutId != ''"> and erp_stockout_id = #{erpStockoutId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectOutStockoutByStockoutGuid" parameterType="String" resultMap="OutStockoutResult">
|
||||
<include refid="selectOutStockoutVo"/>
|
||||
where stockout_guid = #{stockoutGuid}
|
||||
</select>
|
||||
|
||||
<insert id="insertOutStockout" parameterType="OutStockout">
|
||||
insert into out_stockout
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="stockoutGuid != null and stockoutGuid != ''">stockout_guid,</if>
|
||||
<if test="stockoutId != null and stockoutId != ''">stockout_id,</if>
|
||||
<if test="outType != null and outType != ''">out_type,</if>
|
||||
<if test="createDate != null and createDate != ''">create_date,</if>
|
||||
<if test="departmentNo != null">department_no,</if>
|
||||
<if test="customerNo != null">customer_no,</if>
|
||||
<if test="createManId != null">create_man_id,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="stockoutSource != null">stockout_source,</if>
|
||||
<if test="warehouseId != null">warehouse_id,</if>
|
||||
<if test="classNowId != null">class_now_id,</if>
|
||||
<if test="exitId != null">exit_id,</if>
|
||||
<if test="carNumber != null">car_number,</if>
|
||||
<if test="FID != null">FID,</if>
|
||||
<if test="erpStockoutId != null">erp_stockout_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="stockoutGuid != null and stockoutGuid != ''">#{stockoutGuid},</if>
|
||||
<if test="stockoutId != null and stockoutId != ''">#{stockoutId},</if>
|
||||
<if test="outType != null and outType != ''">#{outType},</if>
|
||||
<if test="createDate != null and createDate != ''">#{createDate},</if>
|
||||
<if test="departmentNo != null">#{departmentNo},</if>
|
||||
<if test="customerNo != null">#{customerNo},</if>
|
||||
<if test="createManId != null">#{createManId},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="stockoutSource != null">#{stockoutSource},</if>
|
||||
<if test="warehouseId != null">#{warehouseId},</if>
|
||||
<if test="classNowId != null">#{classNowId},</if>
|
||||
<if test="exitId != null">#{exitId},</if>
|
||||
<if test="carNumber != null">#{carNumber},</if>
|
||||
<if test="FID != null">#{FID},</if>
|
||||
<if test="erpStockoutId != null">#{erpStockoutId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateOutStockout" parameterType="OutStockout">
|
||||
update out_stockout
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="stockoutId != null and stockoutId != ''">stockout_id = #{stockoutId},</if>
|
||||
<if test="outType != null and outType != ''">out_type = #{outType},</if>
|
||||
<if test="createDate != null and createDate != ''">create_date = #{createDate},</if>
|
||||
<if test="departmentNo != null">department_no = #{departmentNo},</if>
|
||||
<if test="customerNo != null">customer_no = #{customerNo},</if>
|
||||
<if test="createManId != null">create_man_id = #{createManId},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="stockoutSource != null">stockout_source = #{stockoutSource},</if>
|
||||
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
|
||||
<if test="classNowId != null">class_now_id = #{classNowId},</if>
|
||||
<if test="exitId != null">exit_id = #{exitId},</if>
|
||||
<if test="carNumber != null">car_number = #{carNumber},</if>
|
||||
<if test="FID != null">FID = #{FID},</if>
|
||||
<if test="erpStockoutId != null">erp_stockout_id = #{erpStockoutId},</if>
|
||||
<if test="startDate != null">start_date = #{startDate},</if>
|
||||
<if test="finishDate != null">finish_date = #{finishDate},</if>
|
||||
</trim>
|
||||
where stockout_guid = #{stockoutGuid}
|
||||
</update>
|
||||
|
||||
<delete id="deleteOutStockoutByStockoutGuid" parameterType="String">
|
||||
delete from out_stockout where stockout_guid = #{stockoutGuid}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteOutStockoutByStockoutGuids" parameterType="String">
|
||||
delete from out_stockout where stockout_guid in
|
||||
<foreach item="stockoutGuid" collection="array" open="(" separator="," close=")">
|
||||
#{stockoutGuid}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="updateOutStockoutStatus" parameterType="java.util.Map" statementType="CALLABLE">
|
||||
{
|
||||
call proc_update_outbill_status(
|
||||
#{outStockId,mode=IN,jdbcType=VARCHAR},
|
||||
#{status,mode=IN,jdbcType=VARCHAR},
|
||||
#{newStatus,mode=IN,jdbcType=VARCHAR},
|
||||
#{v_result,mode=OUT,jdbcType=VARCHAR},
|
||||
#{v_resultString,mode=OUT,jdbcType=VARCHAR}
|
||||
)
|
||||
}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,79 @@
|
||||
<?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.productAndStock.mapper.ViewProductAndStockMapper">
|
||||
|
||||
<resultMap type="ViewProductAndStock" id="ViewProductAndStockResult">
|
||||
<result property="onlyIdentity" column="only_identity" />
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="lotNo" column="lot_no" />
|
||||
<result property="productName" column="product_name" />
|
||||
<result property="quantity" column="quantity" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectViewProductAndStockVo">
|
||||
select only_identity, product_id, lot_no, product_name, quantity, warehouse_id from view_product_and_stock
|
||||
</sql>
|
||||
|
||||
<select id="selectViewProductAndStockList" parameterType="ViewProductAndStock" resultMap="ViewProductAndStockResult">
|
||||
<include refid="selectViewProductAndStockVo"/>
|
||||
<where>
|
||||
<if test="onlyIdentity != null "> and only_identity = #{onlyIdentity}</if>
|
||||
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
|
||||
<if test="lotNo != null and lotNo != ''"> and lot_no like concat('%', #{lotNo}, '%')</if>
|
||||
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
||||
<if test="quantity != null and quantity != ''"> and quantity = #{quantity}</if>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectViewProductAndStockByOnlyIdentity" parameterType="Long" resultMap="ViewProductAndStockResult">
|
||||
<include refid="selectViewProductAndStockVo"/>
|
||||
where only_identity = #{onlyIdentity}
|
||||
</select>
|
||||
|
||||
<insert id="insertViewProductAndStock" parameterType="ViewProductAndStock">
|
||||
insert into view_product_and_stock
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="onlyIdentity != null">only_identity,</if>
|
||||
<if test="productId != null">product_id,</if>
|
||||
<if test="lotNo != null">lot_no,</if>
|
||||
<if test="productName != null">product_name,</if>
|
||||
<if test="quantity != null">quantity,</if>
|
||||
<if test="warehouseId != null">warehouse_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="onlyIdentity != null">#{onlyIdentity},</if>
|
||||
<if test="productId != null">#{productId},</if>
|
||||
<if test="lotNo != null">#{lotNo},</if>
|
||||
<if test="productName != null">#{productName},</if>
|
||||
<if test="quantity != null">#{quantity},</if>
|
||||
<if test="warehouseId != null">#{warehouseId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateViewProductAndStock" parameterType="ViewProductAndStock">
|
||||
update view_product_and_stock
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="productId != null">product_id = #{productId},</if>
|
||||
<if test="lotNo != null">lot_no = #{lotNo},</if>
|
||||
<if test="productName != null">product_name = #{productName},</if>
|
||||
<if test="quantity != null">quantity = #{quantity},</if>
|
||||
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
|
||||
</trim>
|
||||
where only_identity = #{onlyIdentity}
|
||||
</update>
|
||||
|
||||
<delete id="deleteViewProductAndStockByOnlyIdentity" parameterType="Long">
|
||||
delete from view_product_and_stock where only_identity = #{onlyIdentity}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteViewProductAndStockByOnlyIdentitys" parameterType="String">
|
||||
delete from view_product_and_stock where only_identity in
|
||||
<foreach item="onlyIdentity" collection="array" open="(" separator="," close=")">
|
||||
#{onlyIdentity}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user