From 79773cc96ed168954322b2a1acd89776ddbe1fe1 Mon Sep 17 00:00:00 2001
From: lixiaolong <702156524@qq.com>
Date: Tue, 15 Sep 2026 16:41:53 +0800
Subject: [PATCH] =?UTF-8?q?feat(warehouse):=20=E4=BC=98=E5=8C=96=E4=BB=93?=
=?UTF-8?q?=E5=BA=93=E7=AE=A1=E7=90=86=E6=A8=A1=E5=9D=97=E7=9A=84=E7=94=A8?=
=?UTF-8?q?=E6=88=B7=E4=BF=A1=E6=81=AF=E6=98=BE=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 在入库记录查询中关联用户表以显示操作员昵称
- 在出库记录查询中关联用户表以显示操作员昵称
- 在采购到货记录中关联用户表以显示申请人、验收人等昵称
- 在采购申请中关联用户表以显示申请人昵称并支持按昵称搜索
- 在库存盘点记录中关联用户表以显示检查人和确认人昵称
- 在系统公告中关联用户表以显示创建人和更新人昵称
- 在操作日志中关联用户表以显示操作员昵称
- 移除已废弃的OpenAI配置项
- 优化SQL查询中的字段别名和表关联逻辑
---
.../src/main/resources/application.yml | 5 ----
.../mapper/system/SysNoticeMapper.xml | 21 ++++++++-----
.../mapper/system/SysOperLogMapper.xml | 30 +++++++++++--------
.../mapper/warehouse/InRecordMapper.xml | 10 +++++--
.../mapper/warehouse/OutRecordMapper.xml | 11 +++++--
.../warehouse/PurchaseArrivalMapper.xml | 29 ++++++++++++++----
.../warehouse/PurchaseRequestMapper.xml | 9 ++++--
.../warehouse/StockCheckRecordMapper.xml | 7 ++++-
8 files changed, 84 insertions(+), 38 deletions(-)
diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml
index 4a42acf..bbb1a08 100644
--- a/ruoyi-admin/src/main/resources/application.yml
+++ b/ruoyi-admin/src/main/resources/application.yml
@@ -150,8 +150,3 @@ agent:
model: ${AGENT_MODEL_NAME:Qwen/Qwen3.8-27B-FP8}
timeout-ms: ${AGENT_MODEL_TIMEOUT_MS:8000}
max-output-tokens: ${AGENT_MODEL_MAX_OUTPUT_TOKENS:512}
- # 图片批量导入仍使用支持视觉输入的远程模型。
- openai:
- base-url: ${OPENAI_BASE_URL:http://192.168.28.10:18080}
- api-key: ${OPENAI_API_KEY:sk-dd185946191d42eaa54892dec488bf7b54cad2d7433aee8aac7a017365b0829d}
- model: ${OPENAI_MODEL:gpt-5.5}
diff --git a/ruoyi-system/src/main/resources/mapper/system/SysNoticeMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysNoticeMapper.xml
index 1fccd78..2be99a2 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysNoticeMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysNoticeMapper.xml
@@ -18,29 +18,34 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- select notice_id, notice_title, notice_type, cast(notice_content as char) as notice_content, status, create_by, create_time, update_by, update_time, remark
- from sys_notice
+ select sn.notice_id, sn.notice_title, sn.notice_type, cast(sn.notice_content as char) as notice_content,
+ sn.status, coalesce(cu.nick_name, sn.create_by) as create_by, sn.create_time,
+ coalesce(uu.nick_name, sn.update_by) as update_by, sn.update_time, sn.remark
+ from sys_notice sn
+ left join sys_user cu on cu.user_name = sn.create_by
+ left join sys_user uu on uu.user_name = sn.update_by
@@ -87,4 +92,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-
\ No newline at end of file
+
diff --git a/ruoyi-system/src/main/resources/mapper/system/SysOperLogMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysOperLogMapper.xml
index 201db07..d32f2ac 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysOperLogMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysOperLogMapper.xml
@@ -25,8 +25,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- select oper_id, title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, oper_time, cost_time
- from sys_oper_log
+ select sol.oper_id, sol.title, sol.business_type, sol.method, sol.request_method, sol.operator_type,
+ coalesce(su.nick_name, sol.oper_name) as oper_name, sol.dept_name, sol.oper_url, sol.oper_ip,
+ sol.oper_location, sol.oper_param, sol.json_result, sol.status, sol.error_msg, sol.oper_time, sol.cost_time
+ from sys_oper_log sol
+ left join sys_user su on su.user_name = sol.oper_name
@@ -38,34 +41,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- AND oper_ip like concat('%', #{operIp}, '%')
+ AND sol.oper_ip like concat('%', #{operIp}, '%')
- AND title like concat('%', #{title}, '%')
+ AND sol.title like concat('%', #{title}, '%')
- AND business_type = #{businessType}
+ AND sol.business_type = #{businessType}
- AND business_type in
+ AND sol.business_type in
#{businessType}
- AND status = #{status}
+ AND sol.status = #{status}
- AND oper_name like concat('%', #{operName}, '%')
+ AND (sol.oper_name like concat('%', #{operName}, '%')
+ OR su.nick_name like concat('%', #{operName}, '%'))
- AND oper_time >= #{params.beginTime}
+ AND sol.oper_time >= #{params.beginTime}
- AND oper_time <= #{params.endTime}
+ AND sol.oper_time <= #{params.endTime}
- order by oper_id desc
+ order by sol.oper_id desc
@@ -77,11 +81,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
truncate table sys_oper_log
-
\ No newline at end of file
+
diff --git a/ruoyi-system/src/main/resources/mapper/warehouse/InRecordMapper.xml b/ruoyi-system/src/main/resources/mapper/warehouse/InRecordMapper.xml
index cc46b5e..d6a27bc 100644
--- a/ruoyi-system/src/main/resources/mapper/warehouse/InRecordMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/warehouse/InRecordMapper.xml
@@ -31,11 +31,15 @@
select ir.id, ir.in_no, ir.area_id, ir.product_id, ir.purchase_request_id, ir.arrival_id, ir.source_no,
ir.in_type, ir.in_num, ir.in_status,
- ir.operator, ir.in_operator, ir.confirm_time, ir.remark, ir.create_time, ir.update_time,
+ coalesce(operator_user.nick_name, ir.operator) as operator,
+ coalesce(in_user.nick_name, ir.in_operator) as in_operator,
+ ir.confirm_time, ir.remark, ir.create_time, ir.update_time,
wa.area_code, wa.area_name, pi.product_code, pi.product_name, pi.brand, pi.category, pi.spec, pi.unit
from in_record ir
left join warehouse_area wa on wa.id = ir.area_id
left join product_info pi on pi.id = ir.product_id
+ left join sys_user operator_user on operator_user.user_name = ir.operator
+ left join sys_user in_user on in_user.user_name = ir.in_operator
diff --git a/ruoyi-system/src/main/resources/mapper/warehouse/OutRecordMapper.xml b/ruoyi-system/src/main/resources/mapper/warehouse/OutRecordMapper.xml
index d7e5de7..879427b 100644
--- a/ruoyi-system/src/main/resources/mapper/warehouse/OutRecordMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/warehouse/OutRecordMapper.xml
@@ -27,11 +27,16 @@
select orr.id, orr.out_no, orr.area_id, orr.product_id, orr.out_type, orr.out_num,
- orr.source_no, orr.operator, orr.out_operator, orr.out_time, orr.remark, orr.create_time, orr.update_time,
+ orr.source_no,
+ coalesce(operator_user.nick_name, orr.operator) as operator,
+ coalesce(out_user.nick_name, orr.out_operator) as out_operator,
+ orr.out_time, orr.remark, orr.create_time, orr.update_time,
wa.area_code, wa.area_name, pi.product_code, pi.product_name, pi.brand, pi.category, pi.spec, pi.unit
from out_record orr
left join warehouse_area wa on wa.id = orr.area_id
left join product_info pi on pi.id = orr.product_id
+ left join sys_user operator_user on operator_user.user_name = orr.operator
+ left join sys_user out_user on out_user.user_name = orr.out_operator