库存维护记录
This commit is contained in:
@@ -0,0 +1,137 @@
|
||||
<?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.stock.maintain.mapper.BasStockMaintainRecordMapper">
|
||||
|
||||
<resultMap type="BasStockMaintainRecord" id="BasStockMaintainRecordResult">
|
||||
<result property="whGuid" column="wh_guid" />
|
||||
<result property="stockId" column="stock_id" />
|
||||
<result property="cargoSpaceId" column="cargo_space_id" />
|
||||
<result property="trayCode" column="tray_code" />
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="productName" column="product_name" />
|
||||
<result property="printDate" column="print_date" />
|
||||
<result property="lotNo" column="lot_no" />
|
||||
<result property="oldQuantity" column="old_quantity" />
|
||||
<result property="quantity" column="quantity" />
|
||||
<result property="method" column="method" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="stockDetailId" column="stock_detail_id" />
|
||||
<result property="operatingTarget" column="operating_target" />
|
||||
<result property="barCodeOldQuantity" column="bar_code_old_quantity" />
|
||||
<result property="barCodeQuantity" column="bar_code_quantity" />
|
||||
<result property="productGuid" column="product_guid" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasStockMaintainRecordVo">
|
||||
select wh_guid, stock_id, cargo_space_id, tray_code, product_id, product_name, print_date, lot_no, old_quantity, quantity, method, warehouse_id, create_time, stock_detail_id, operating_target, bar_code_old_quantity, bar_code_quantity, product_guid from bas_stock_maintain_record
|
||||
</sql>
|
||||
|
||||
<select id="selectBasStockMaintainRecordList" parameterType="BasStockMaintainRecord" resultMap="BasStockMaintainRecordResult">
|
||||
<include refid="selectBasStockMaintainRecordVo"/>
|
||||
<where>
|
||||
<if test="stockId != null and stockId != ''"> and stock_id = #{stockId}</if>
|
||||
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and cargo_space_id = #{cargoSpaceId}</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</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="printDate != null and printDate != ''"> and print_date = #{printDate}</if>
|
||||
<if test="lotNo != null and lotNo != ''"> and lot_no = #{lotNo}</if>
|
||||
<if test="oldQuantity != null and oldQuantity != ''"> and old_quantity = #{oldQuantity}</if>
|
||||
<if test="quantity != null and quantity != ''"> and quantity = #{quantity}</if>
|
||||
<if test="method != null and method != ''"> and method = #{method}</if>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</if>
|
||||
<if test="stockDetailId != null and stockDetailId != ''"> and stock_detail_id = #{stockDetailId}</if>
|
||||
<if test="operatingTarget != null and operatingTarget != ''"> and operating_target = #{operatingTarget}</if>
|
||||
<if test="barCodeOldQuantity != null and barCodeOldQuantity != ''"> and bar_code_old_quantity = #{barCodeOldQuantity}</if>
|
||||
<if test="barCodeQuantity != null and barCodeQuantity != ''"> and bar_code_quantity = #{barCodeQuantity}</if>
|
||||
<if test="productGuid != null and productGuid != ''"> and product_guid = #{productGuid}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBasStockMaintainRecordByWhGuid" parameterType="String" resultMap="BasStockMaintainRecordResult">
|
||||
<include refid="selectBasStockMaintainRecordVo"/>
|
||||
where wh_guid = #{whGuid}
|
||||
</select>
|
||||
|
||||
<insert id="insertBasStockMaintainRecord" parameterType="BasStockMaintainRecord">
|
||||
insert into bas_stock_maintain_record
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="whGuid != null">wh_guid,</if>
|
||||
<if test="stockId != null">stock_id,</if>
|
||||
<if test="cargoSpaceId != null">cargo_space_id,</if>
|
||||
<if test="trayCode != null">tray_code,</if>
|
||||
<if test="productId != null">product_id,</if>
|
||||
<if test="productName != null">product_name,</if>
|
||||
<if test="printDate != null">print_date,</if>
|
||||
<if test="lotNo != null">lot_no,</if>
|
||||
<if test="oldQuantity != null">old_quantity,</if>
|
||||
<if test="quantity != null">quantity,</if>
|
||||
<if test="method != null">method,</if>
|
||||
<if test="warehouseId != null">warehouse_id,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="stockDetailId != null">stock_detail_id,</if>
|
||||
<if test="operatingTarget != null">operating_target,</if>
|
||||
<if test="barCodeOldQuantity != null">bar_code_old_quantity,</if>
|
||||
<if test="barCodeQuantity != null">bar_code_quantity,</if>
|
||||
<if test="productGuid != null">product_guid,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="whGuid != null">#{whGuid},</if>
|
||||
<if test="stockId != null">#{stockId},</if>
|
||||
<if test="cargoSpaceId != null">#{cargoSpaceId},</if>
|
||||
<if test="trayCode != null">#{trayCode},</if>
|
||||
<if test="productId != null">#{productId},</if>
|
||||
<if test="productName != null">#{productName},</if>
|
||||
<if test="printDate != null">#{printDate},</if>
|
||||
<if test="lotNo != null">#{lotNo},</if>
|
||||
<if test="oldQuantity != null">#{oldQuantity},</if>
|
||||
<if test="quantity != null">#{quantity},</if>
|
||||
<if test="method != null">#{method},</if>
|
||||
<if test="warehouseId != null">#{warehouseId},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="stockDetailId != null">#{stockDetailId},</if>
|
||||
<if test="operatingTarget != null">#{operatingTarget},</if>
|
||||
<if test="barCodeOldQuantity != null">#{barCodeOldQuantity},</if>
|
||||
<if test="barCodeQuantity != null">#{barCodeQuantity},</if>
|
||||
<if test="productGuid != null">#{productGuid},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBasStockMaintainRecord" parameterType="BasStockMaintainRecord">
|
||||
update bas_stock_maintain_record
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="stockId != null">stock_id = #{stockId},</if>
|
||||
<if test="cargoSpaceId != null">cargo_space_id = #{cargoSpaceId},</if>
|
||||
<if test="trayCode != null">tray_code = #{trayCode},</if>
|
||||
<if test="productId != null">product_id = #{productId},</if>
|
||||
<if test="productName != null">product_name = #{productName},</if>
|
||||
<if test="printDate != null">print_date = #{printDate},</if>
|
||||
<if test="lotNo != null">lot_no = #{lotNo},</if>
|
||||
<if test="oldQuantity != null">old_quantity = #{oldQuantity},</if>
|
||||
<if test="quantity != null">quantity = #{quantity},</if>
|
||||
<if test="method != null">method = #{method},</if>
|
||||
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="stockDetailId != null">stock_detail_id = #{stockDetailId},</if>
|
||||
<if test="operatingTarget != null">operating_target = #{operatingTarget},</if>
|
||||
<if test="barCodeOldQuantity != null">bar_code_old_quantity = #{barCodeOldQuantity},</if>
|
||||
<if test="barCodeQuantity != null">bar_code_quantity = #{barCodeQuantity},</if>
|
||||
<if test="productGuid != null">product_guid = #{productGuid},</if>
|
||||
</trim>
|
||||
where wh_guid = #{whGuid}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBasStockMaintainRecordByWhGuid" parameterType="String">
|
||||
delete from bas_stock_maintain_record where wh_guid = #{whGuid}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBasStockMaintainRecordByWhGuids" parameterType="String">
|
||||
delete from bas_stock_maintain_record where wh_guid in
|
||||
<foreach item="whGuid" collection="array" open="(" separator="," close=")">
|
||||
#{whGuid}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user