添加分页 添加仓库数据权限

This commit is contained in:
liuhanqing
2025-07-24 11:33:24 +08:00
parent 10bcc1f2af
commit d2c10acb43
11 changed files with 137 additions and 60 deletions

View File

@@ -1,54 +1,74 @@
<?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">
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="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" />
<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" />
<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,
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 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
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="selectCheckDifferenceRecordList" parameterType="CheckDifferenceRecord" resultMap="CheckDifferenceRecordResult">
<select id="selectCheckDifferenceRecordList" parameterType="CheckDifferenceRecord"
resultMap="CheckDifferenceRecordResult">
<include refid="selectCheckDifferenceRecordVo"/>
<where>
<if test="checkStockDetailId != null and checkStockDetailId != ''">
@@ -93,6 +113,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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>
@@ -121,7 +144,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="productGuid != null">product_guid,</if>
<if test="status != null">status,</if>
<if test="warehouseId != null">warehouse_id,</if>
</trim>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="checkGuid != null">#{checkGuid},</if>
<if test="checkStockDetailId != null">#{checkStockDetailId},</if>
@@ -139,7 +162,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="productGuid != null">#{productGuid},</if>
<if test="status != null">#{status},</if>
<if test="warehouseId != null">#{warehouseId},</if>
</trim>
</trim>
</insert>
<update id="updateCheckDifferenceRecord" parameterType="CheckDifferenceRecord">
@@ -165,7 +188,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<delete id="deleteCheckDifferenceRecordByCheckGuid" parameterType="String">
delete from check_difference_record where check_guid = #{checkGuid}
delete
from check_difference_record
where check_guid = #{checkGuid}
</delete>
<delete id="deleteCheckDifferenceRecordByCheckGuids" parameterType="String">

View File

@@ -53,6 +53,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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>
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
${params.warehouseDataScope}
</if>
</where>
order by create_time desc
</select>

View File

@@ -53,6 +53,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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>
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
${params.warehouseDataScope}
</if>
</where>
order by create_time desc
</select>

View File

@@ -94,6 +94,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{item}
</foreach>
</if>
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
${params.warehouseDataScope}
</if>
</where>
</select>