Files
FT542-WMS/ruoyi-admin/src/main/resources/mapper/out/ViewProductAndStockMapper.xml
liuhanqing 4b2e90d556 feat(out): 优化出库单管理界面并调整库存查询逻辑
- 移除了出库单管理页面中的客户名称、供应商名称及仓库名称查询条件
- 在出库单列表中新增“出库单主题”、“单据来源”和“ERP出库单编号”字段展示
- 调整库存管理页面,移除多个冗余的查询字段与表格列,包括仓库、库存状态、产品GUID等
- 简化库存列表显示内容,仅保留核心字段如库存数量、入库时间等
- 更新出库单实体类,增加theme属性以支持单据主题功能
- 优化后端服务接口调用逻辑,完善出库相关功能
- 修复了部分页面样式和交互问题,提升用户体验
2025-12-08 15:23:02 +08:00

69 lines
3.3 KiB
XML

<?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.productAndStock.mapper.ViewProductAndStockMapper">
<resultMap type="ViewProductAndStock" id="ViewProductAndStockResult">
<result property="onlyIdentity" column="only_identity" />
<result property="productId" column="product_id" />
<result property="productName" column="product_name" />
<result property="quantity" column="quantity" />
</resultMap>
<sql id="selectViewProductAndStockVo">
select only_identity, product_id, product_name, quantity from view_product_and_stock
</sql>
<select id="selectViewProductAndStockList" parameterType="ViewProductAndStock" resultMap="ViewProductAndStockResult">
<include refid="selectViewProductAndStockVo"/>
<where>
<if test="onlyIdentity != null "> and only_identity = #{onlyIdentity}</if>
<if test="productId != null and productId != ''"> and product_id like concat('%', #{productId}, '%')</if>
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
<if test="quantity != null and quantity != ''"> and quantity = #{quantity}</if>
</where>
</select>
<select id="selectViewProductAndStockByOnlyIdentity" parameterType="Long" resultMap="ViewProductAndStockResult">
<include refid="selectViewProductAndStockVo"/>
where only_identity = #{onlyIdentity}
</select>
<insert id="insertViewProductAndStock" parameterType="ViewProductAndStock">
insert into view_product_and_stock
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="onlyIdentity != null">only_identity,</if>
<if test="productId != null">product_id,</if>
<if test="productName != null">product_name,</if>
<if test="quantity != null">quantity,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="onlyIdentity != null">#{onlyIdentity},</if>
<if test="productId != null">#{productId},</if>
<if test="productName != null">#{productName},</if>
<if test="quantity != null">#{quantity},</if>
</trim>
</insert>
<update id="updateViewProductAndStock" parameterType="ViewProductAndStock">
update view_product_and_stock
<trim prefix="SET" suffixOverrides=",">
<if test="productId != null">product_id = #{productId},</if>
<if test="productName != null">product_name = #{productName},</if>
<if test="quantity != null">quantity = #{quantity},</if>
</trim>
where only_identity = #{onlyIdentity}
</update>
<delete id="deleteViewProductAndStockByOnlyIdentity" parameterType="Long">
delete from view_product_and_stock where only_identity = #{onlyIdentity}
</delete>
<delete id="deleteViewProductAndStockByOnlyIdentitys" parameterType="String">
delete from view_product_and_stock where only_identity in
<foreach item="onlyIdentity" collection="array" open="(" separator="," close=")">
#{onlyIdentity}
</foreach>
</delete>
</mapper>