From 1fd7a7d67a5df84b57af4fbcc310aa66da3cd8ca Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期三, 25 三月 2026 17:51:16 +0800
Subject: [PATCH] feat:1.出入库单位转换 2.仓储/耗材导出字段值优化 3.仓储/耗材库存为0不展示

---
 src/main/resources/mapper/stock/StockOutRecordMapper.xml |   44 ++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 42 insertions(+), 2 deletions(-)

diff --git a/src/main/resources/mapper/stock/StockOutRecordMapper.xml b/src/main/resources/mapper/stock/StockOutRecordMapper.xml
index 565c89e..ccf3e5a 100644
--- a/src/main/resources/mapper/stock/StockOutRecordMapper.xml
+++ b/src/main/resources/mapper/stock/StockOutRecordMapper.xml
@@ -15,9 +15,39 @@
         <result column="update_time" property="updateTime" />
         <result column="create_user" property="createUser" />
         <result column="update_user" property="updateUser" />
+        <result column="license_plate_no" property="licensePlateNo" />
     </resultMap>
 
     <select id="listPage" resultType="com.ruoyi.stock.dto.StockOutRecordDto">
+        SELECT
+        sor.*,
+        p.product_name as productName,
+        pm.model,
+        pm.unit,
+        sor.weighbridge_doc_path,
+        u.nick_name as createBy
+        FROM stock_out_record as sor
+        LEFT JOIN product_model as pm on sor.product_model_id = pm.id
+        LEFT JOIN product as p on pm.product_id = p.id
+        LEFT JOIN sys_user as u on sor.create_user = u.user_id
+        <where>
+            1=1
+            <if test="params.timeStr != null and params.timeStr != ''">
+                and sor.create_time like concat('%',#{params.timeStr},'%')
+            </if>
+            <if test="params.productName != null and params.productName != ''">
+                and p.product_name like concat('%',#{params.productName},'%')
+            </if>
+            <if test="params.type != null and params.type != ''">
+                and sor.type = #{params.type}
+            </if>
+            <if test="params.recordType != null and params.recordType != ''">
+                and sor.record_type = #{params.recordType}
+            </if>
+        </where>
+        order by sor.id desc
+    </select>
+    <select id="listStockOutRecordExportData" resultType="com.ruoyi.stock.execl.StockOutRecordExportData">
         SELECT
         sor.*,
         p.product_name as productName,
@@ -27,10 +57,20 @@
         FROM stock_out_record as sor
         LEFT JOIN product_model as pm on sor.product_model_id = pm.id
         LEFT JOIN product as p on pm.product_id = p.id
-        LEFT JOIN sys_user as u on sir.create_user = u.user_id
+        LEFT JOIN sys_user as u on sor.create_user = u.user_id
         <where>
+            1=1
             <if test="params.timeStr != null and params.timeStr != ''">
-                and sor.create_time like concat('%',#{param.timeStr},'%')
+                and sor.create_time like concat('%',#{params.timeStr},'%')
+            </if>
+            <if test="params.productName != null and params.productName != ''">
+                and p.product_name like concat('%',#{params.productName},'%')
+            </if>
+            <if test="params.type != null and params.type != ''">
+                and sor.type = #{params.type}
+            </if>
+            <if test="params.recordType != null and params.recordType != ''">
+                and sor.record_type = #{params.recordType}
             </if>
         </where>
         order by sor.id desc

--
Gitblit v1.9.3