盘点差异,入库联查字段修改,历史单据作业查询
This commit is contained in:
@@ -0,0 +1,117 @@
|
||||
<?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.check.difference.mapper.CheckDifferenceRecordMapper">
|
||||
|
||||
<resultMap type="CheckDifferenceRecord" id="CheckDifferenceRecordResult">
|
||||
<result property="checkGuid" column="check_guid" />
|
||||
<result property="checkStockDetailId" column="check_stock_detail_id" />
|
||||
<result property="stockId" column="stock_id" />
|
||||
<result property="trayCode" column="tray_code" />
|
||||
<result property="cargoSpaceId" column="cargo_space_id" />
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="lotNo" column="lot_no" />
|
||||
<result property="supplier" column="supplier" />
|
||||
<result property="customer" column="customer" />
|
||||
<result property="oldQuantity" column="old_quantity" />
|
||||
<result property="newQuantity" column="new_quantity" />
|
||||
<result property="recordType" column="record_type" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="productGuid" column="product_guid" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCheckDifferenceRecordVo">
|
||||
select check_guid, check_stock_detail_id, stock_id, tray_code, cargo_space_id, product_id, lot_no, supplier, customer, old_quantity, new_quantity, record_type, create_time, product_guid from check_difference_record
|
||||
</sql>
|
||||
|
||||
<select id="selectCheckDifferenceRecordList" parameterType="CheckDifferenceRecord" resultMap="CheckDifferenceRecordResult">
|
||||
<include refid="selectCheckDifferenceRecordVo"/>
|
||||
<where>
|
||||
<if test="checkStockDetailId != null and checkStockDetailId != ''"> and check_stock_detail_id = #{checkStockDetailId}</if>
|
||||
<if test="stockId != null and stockId != ''"> and stock_id = #{stockId}</if>
|
||||
<if test="trayCode != null and trayCode != ''"> and tray_code = #{trayCode}</if>
|
||||
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and cargo_space_id = #{cargoSpaceId}</if>
|
||||
<if test="productId != null and productId != ''"> and product_id = #{productId}</if>
|
||||
<if test="lotNo != null and lotNo != ''"> and lot_no = #{lotNo}</if>
|
||||
<if test="supplier != null and supplier != ''"> and supplier = #{supplier}</if>
|
||||
<if test="customer != null and customer != ''"> and customer = #{customer}</if>
|
||||
<if test="oldQuantity != null and oldQuantity != ''"> and old_quantity = #{oldQuantity}</if>
|
||||
<if test="newQuantity != null and newQuantity != ''"> and new_quantity = #{newQuantity}</if>
|
||||
<if test="recordType != null "> and record_type = #{recordType}</if>
|
||||
<if test="productGuid != null and productGuid != ''"> and product_guid = #{productGuid}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCheckDifferenceRecordByCheckGuid" parameterType="String" resultMap="CheckDifferenceRecordResult">
|
||||
<include refid="selectCheckDifferenceRecordVo"/>
|
||||
where check_guid = #{checkGuid}
|
||||
</select>
|
||||
|
||||
<insert id="insertCheckDifferenceRecord" parameterType="CheckDifferenceRecord">
|
||||
insert into check_difference_record
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="checkGuid != null">check_guid,</if>
|
||||
<if test="checkStockDetailId != null">check_stock_detail_id,</if>
|
||||
<if test="stockId != null">stock_id,</if>
|
||||
<if test="trayCode != null">tray_code,</if>
|
||||
<if test="cargoSpaceId != null">cargo_space_id,</if>
|
||||
<if test="productId != null">product_id,</if>
|
||||
<if test="lotNo != null">lot_no,</if>
|
||||
<if test="supplier != null">supplier,</if>
|
||||
<if test="customer != null">customer,</if>
|
||||
<if test="oldQuantity != null">old_quantity,</if>
|
||||
<if test="newQuantity != null">new_quantity,</if>
|
||||
<if test="recordType != null">record_type,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="productGuid != null">product_guid,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="checkGuid != null">#{checkGuid},</if>
|
||||
<if test="checkStockDetailId != null">#{checkStockDetailId},</if>
|
||||
<if test="stockId != null">#{stockId},</if>
|
||||
<if test="trayCode != null">#{trayCode},</if>
|
||||
<if test="cargoSpaceId != null">#{cargoSpaceId},</if>
|
||||
<if test="productId != null">#{productId},</if>
|
||||
<if test="lotNo != null">#{lotNo},</if>
|
||||
<if test="supplier != null">#{supplier},</if>
|
||||
<if test="customer != null">#{customer},</if>
|
||||
<if test="oldQuantity != null">#{oldQuantity},</if>
|
||||
<if test="newQuantity != null">#{newQuantity},</if>
|
||||
<if test="recordType != null">#{recordType},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="productGuid != null">#{productGuid},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateCheckDifferenceRecord" parameterType="CheckDifferenceRecord">
|
||||
update check_difference_record
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="checkStockDetailId != null">check_stock_detail_id = #{checkStockDetailId},</if>
|
||||
<if test="stockId != null">stock_id = #{stockId},</if>
|
||||
<if test="trayCode != null">tray_code = #{trayCode},</if>
|
||||
<if test="cargoSpaceId != null">cargo_space_id = #{cargoSpaceId},</if>
|
||||
<if test="productId != null">product_id = #{productId},</if>
|
||||
<if test="lotNo != null">lot_no = #{lotNo},</if>
|
||||
<if test="supplier != null">supplier = #{supplier},</if>
|
||||
<if test="customer != null">customer = #{customer},</if>
|
||||
<if test="oldQuantity != null">old_quantity = #{oldQuantity},</if>
|
||||
<if test="newQuantity != null">new_quantity = #{newQuantity},</if>
|
||||
<if test="recordType != null">record_type = #{recordType},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="productGuid != null">product_guid = #{productGuid},</if>
|
||||
</trim>
|
||||
where check_guid = #{checkGuid}
|
||||
</update>
|
||||
|
||||
<delete id="deleteCheckDifferenceRecordByCheckGuid" parameterType="String">
|
||||
delete from check_difference_record where check_guid = #{checkGuid}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteCheckDifferenceRecordByCheckGuids" parameterType="String">
|
||||
delete from check_difference_record where check_guid in
|
||||
<foreach item="checkGuid" collection="array" open="(" separator="," close=")">
|
||||
#{checkGuid}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user