仓库管理,查询统计-库存明细查询 库存汇总查询 字典 关联查询

This commit is contained in:
liuhanqing
2025-06-27 11:15:03 +08:00
parent b01cff21d9
commit 2736aa6fb4
12 changed files with 365 additions and 180 deletions

View File

@@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.search.ViewStockDetail.mapper.ViewStockDetailMapper">
<resultMap type="ViewStockDetail" id="ViewStockDetailResult">
<result property="onlyIdentity" column="only_identity" />
<result property="stockId" column="stock_id" />
@@ -32,15 +32,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="spare7" column="spare7" />
<result property="spare8" column="spare8" />
<result property="remark" column="remark" />
<result property="warehouseName" column="warehouse_name" />
<result property="stockStatus" column="stock_status" />
<result property="productStatus" column="product_status" />
</resultMap>
<sql id="selectViewStockDetailVo">
select only_identity, stock_id, cargo_space_id, tray_code, quantity, job_id, lot_no, stockin_detail_id, in_date, warehouse_id, stacking_id, cargo_space_name, roadway_id, cargo_space_status, locked, product_id, product_name, spec, unit, price, remark,spare1,spare2,spare5,spare6,spare7,spare8 from view_stock_detail
select only_identity,stock_status,product_status, stock_id, cargo_space_id, tray_code, quantity, job_id, lot_no, stockin_detail_id, in_date, warehouse_id, stacking_id, cargo_space_name, roadway_id, cargo_space_status, locked, product_id, product_name, spec, unit, price, remark,spare1,spare2,spare5,spare6,spare7,spare8,warehouse_name from view_stock_detail
</sql>
<select id="selectViewStockDetailList" parameterType="ViewStockDetail" resultMap="ViewStockDetailResult">
<include refid="selectViewStockDetailVo"/>
<where>
<where>
<if test="onlyIdentity != null "> and only_identity = #{onlyIdentity}</if>
<if test="stockId != null and stockId != ''"> and stock_id like concat('%', #{stockId}, '%')</if>
<if test="cargoSpaceId != null and cargoSpaceId != ''"> and cargo_space_id like concat('%', #{cargoSpaceId}, '%')</if>
@@ -67,12 +70,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="spare6 != null and spare6 != ''"> and spare6 like concat('%', #{spare6}, '%')</if>
<if test="spare7 != null and spare7 != ''"> and spare7 like concat('%', #{spare7}, '%')</if>
<if test="spare8 != null and spare8 != ''"> and spare8 like concat('%', #{spare8}, '%')</if>
<if test="warehouseName != null and warehouseName != ''"> and warehouse_name like concat('%', #{warehouseName}, '%')</if>
<if test="stockStatus != null and stockStatus != ''"> and stock_status like concat('%', #{stockStatus}, '%')</if>
<if test="productStatus != null and productStatus != ''"> and product_status like concat('%', #{productStatus}, '%')</if>
<if test="params.warehouseDataScope != null and params.warehouseDataScope !=''">
${params.warehouseDataScope}
</if>
</where>
</select>
<select id="selectViewStockDetailByOnlyIdentity" parameterType="Long" resultMap="ViewStockDetailResult">
<include refid="selectViewStockDetailVo"/>
where only_identity = #{onlyIdentity}
@@ -178,9 +184,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteViewStockDetailByOnlyIdentitys" parameterType="String">
delete from view_stock_detail where only_identity in
delete from view_stock_detail where only_identity in
<foreach item="onlyIdentity" collection="array" open="(" separator="," close=")">
#{onlyIdentity}
</foreach>
</delete>
</mapper>
</mapper>