货位管理

This commit is contained in:
liuhanqing
2025-08-11 16:06:11 +08:00
parent 545d02da63
commit 1435b1b40f
8 changed files with 361 additions and 160 deletions

View File

@@ -75,6 +75,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="groupCoding != null and groupCoding != ''"> and bcs.group_coding = #{groupCoding}</if>
<if test="cargoSpaceLogo != null and cargoSpaceLogo != ''"> and bcs.cargo_space_logo = #{cargoSpaceLogo}</if>
<if test="thisCargoArea != null and thisCargoArea != ''"> and bcs.this_cargo_area = #{thisCargoArea}</if>
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
${params.warehouseDataScope}
</if>
</where>
order by the_platoon,the_floor,the_column
</select>

View File

@@ -0,0 +1,202 @@
<?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.DifferenceRecordFinish.mapper.CheckDifferenceRecordFinishMapper">
<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="cargoSpaceName" column="cargo_space_name"/>
<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"/>
<result property="status" column="status"/>
<result property="warehouseId" column="warehouse_id"/>
<result property="warehouseName" column="warehouse_name"/>
<association property="extraField" javaType="ExtraField">
<result property="productId" column="product_id"/>
<result property="materialDesc" column="product_name"/>
<result property="englishDesc" column="englishDesc"/>
<result property="length" column="length"/>
<result property="width" column="width"/>
<result property="height" column="height"/>
<result property="volume" column="volume"/>
<result property="netWeight" column="netWeight"/>
</association>
</resultMap>
<sql id="selectCheckDifferenceRecordVo">
select r.check_guid,
r.check_stock_detail_id,
r.stock_id,
r.tray_code,
r.cargo_space_id,
r.product_id,
r.lot_no,
r.supplier,
r.customer,
r.old_quantity,
r.new_quantity,
r.record_type,
r.create_time,
r.product_guid,
r.status,
r.warehouse_id,
w.warehouse_name,
bp.product_name,
bp.spare1 as englishDesc,
bp.spare2 as netWeight,
bp.spare5 as length,
bp.spare6 as width,
bp.spare7 as height,
bp.spare8 as volume,
bcs.cargo_space_name
from check_difference_record_finish r
left join bas_warehouse w on r.warehouse_id = w.warehouse_id
left join bas_product bp on r.product_id = bp.product_id
left join bas_cargo_space bcs on r.cargo_space_id = bcs.cargo_space_id
</sql>
<select id="selectCheckDifferenceRecordFinishList" parameterType="CheckDifferenceRecord"
resultMap="CheckDifferenceRecordResult">
<include refid="selectCheckDifferenceRecordVo"/>
<where>
<if test="checkStockDetailId != null and checkStockDetailId != ''">
and r.check_stock_detail_id = #{checkStockDetailId}
</if>
<if test="stockId != null and stockId != ''">
and r.stock_id = #{stockId}
</if>
<if test="trayCode != null and trayCode != ''">
and r.tray_code = #{trayCode}
</if>
<if test="cargoSpaceId != null and cargoSpaceId != ''">
and r.cargo_space_id = #{cargoSpaceId}
</if>
<if test="productId != null and productId != ''">
and r.product_id = #{productId}
</if>
<if test="lotNo != null and lotNo != ''">
and r.lot_no = #{lotNo}
</if>
<if test="supplier != null and supplier != ''">
and r.supplier = #{supplier}
</if>
<if test="customer != null and customer != ''">
and r.customer = #{customer}
</if>
<if test="oldQuantity != null and oldQuantity != ''">
and r.old_quantity = #{oldQuantity}
</if>
<if test="newQuantity != null and newQuantity != ''">
and r.new_quantity = #{newQuantity}
</if>
<if test="recordType != null ">
and r.record_type = #{recordType}
</if>
<if test="productGuid != null and productGuid != ''">
and r.product_guid = #{productGuid}
</if>
<if test="status != null and status != ''">
and r.status = #{status}
</if>
<if test="warehouseId != null and warehouseId != ''">
and r.warehouse_id = #{warehouseId}
</if>
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
${params.warehouseDataScope}
</if>
</where>
order by r.create_time desc
</select>
<select id="selectCheckDifferenceRecordFinishByCheckGuid" parameterType="String" resultMap="CheckDifferenceRecordResult">
<include refid="selectCheckDifferenceRecordVo"/>
where check_guid = #{checkGuid}
</select>
<insert id="insertCheckDifferenceRecordFinish" parameterType="CheckDifferenceRecord">
insert into check_difference_record_finish
<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>
<if test="status != null">status,</if>
<if test="warehouseId != null">warehouse_id,</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>
<if test="status != null">#{status},</if>
<if test="warehouseId != null">#{warehouseId},</if>
</trim>
</insert>
<update id="updateCheckDifferenceRecordFinish" parameterType="CheckDifferenceRecord">
update check_difference_record_finish
<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>
<if test="status != null">status = #{status},</if>
<if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
</trim>
where check_guid = #{checkGuid}
</update>
<delete id="deleteCheckDifferenceRecordFinishByCheckGuid" parameterType="String">
delete
from check_difference_record_finish
where check_guid = #{checkGuid}
</delete>
<delete id="deleteCheckDifferenceRecordFinishByCheckGuids" parameterType="String">
delete from check_difference_record_finish where check_guid in
<foreach item="checkGuid" collection="array" open="(" separator="," close=")">
#{checkGuid}
</foreach>
</delete>
</mapper>