盘点逻辑修改 出库异常逻辑修改
This commit is contained in:
@@ -0,0 +1,86 @@
|
||||
<?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.mapper.OutExceptionRecordMapper">
|
||||
|
||||
<resultMap type="OutExceptionRecord" id="OutExceptionRecordResult">
|
||||
<result property="outGuid" column="out_guid" />
|
||||
<result property="warehouseId" column="warehouse_id" />
|
||||
<result property="stockId" column="stock_id" />
|
||||
<result property="trayCode" column="tray_code" />
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="spare1" column="spare1" />
|
||||
<result property="spare2" column="spare2" />
|
||||
<result property="spare3" column="spare3" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectOutExceptionRecordVo">
|
||||
select out_guid, warehouse_id, stock_id, tray_code, product_id, spare1, spare2, spare3 from out_exception_record
|
||||
</sql>
|
||||
|
||||
<select id="selectOutExceptionRecordList" parameterType="OutExceptionRecord" resultMap="OutExceptionRecordResult">
|
||||
<include refid="selectOutExceptionRecordVo"/>
|
||||
<where>
|
||||
<if test="warehouseId != null and warehouseId != ''"> and warehouse_id = #{warehouseId}</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="productId != null and productId != ''"> and product_id = #{productId}</if>
|
||||
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
|
||||
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
|
||||
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectOutExceptionRecordByOutGuid" parameterType="Long" resultMap="OutExceptionRecordResult">
|
||||
<include refid="selectOutExceptionRecordVo"/>
|
||||
where out_guid = #{outGuid}
|
||||
</select>
|
||||
|
||||
<insert id="insertOutExceptionRecord" parameterType="OutExceptionRecord" useGeneratedKeys="true" keyProperty="outGuid">
|
||||
insert into out_exception_record
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="warehouseId != null">warehouse_id,</if>
|
||||
<if test="stockId != null">stock_id,</if>
|
||||
<if test="trayCode != null">tray_code,</if>
|
||||
<if test="productId != null">product_id,</if>
|
||||
<if test="spare1 != null">spare1,</if>
|
||||
<if test="spare2 != null">spare2,</if>
|
||||
<if test="spare3 != null">spare3,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="warehouseId != null">#{warehouseId},</if>
|
||||
<if test="stockId != null">#{stockId},</if>
|
||||
<if test="trayCode != null">#{trayCode},</if>
|
||||
<if test="productId != null">#{productId},</if>
|
||||
<if test="spare1 != null">#{spare1},</if>
|
||||
<if test="spare2 != null">#{spare2},</if>
|
||||
<if test="spare3 != null">#{spare3},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateOutExceptionRecord" parameterType="OutExceptionRecord">
|
||||
update out_exception_record
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
|
||||
<if test="stockId != null">stock_id = #{stockId},</if>
|
||||
<if test="trayCode != null">tray_code = #{trayCode},</if>
|
||||
<if test="productId != null">product_id = #{productId},</if>
|
||||
<if test="spare1 != null">spare1 = #{spare1},</if>
|
||||
<if test="spare2 != null">spare2 = #{spare2},</if>
|
||||
<if test="spare3 != null">spare3 = #{spare3},</if>
|
||||
</trim>
|
||||
where out_guid = #{outGuid}
|
||||
</update>
|
||||
|
||||
<delete id="deleteOutExceptionRecordByOutGuid" parameterType="Long">
|
||||
delete from out_exception_record where out_guid = #{outGuid}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteOutExceptionRecordByOutGuids" parameterType="String">
|
||||
delete from out_exception_record where out_guid in
|
||||
<foreach item="outGuid" collection="array" open="(" separator="," close=")">
|
||||
#{outGuid}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user