From f4c288c55d08c04cd026508b358beebfcdce5fc2 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期五, 22 五月 2026 09:29:09 +0800
Subject: [PATCH] feat(product): 添加产品型号向下复制功能并优化生产报工重量计算 - 在ProductController中新增downCopy接口实现产品型号批量复制功能 - 将ProductionProductMainDto中的bomInputQty字段重命名为inputWeight - 在ProductionProductMainServiceImpl中添加JSON解析逻辑支持从otherData中提取投入重量 - 新增resolveInputWeight、findParameterValue、findFieldValue等工具方法处理复杂参数解析 - 为ProductModelDto添加targetProductId字段用于指定复制目标 - 修复销售台账按调度员ID和姓名分组的SQL查询问题 - 优化库存服务中剩余数量计算的空值处理逻辑 - 完善生产投料数量为空时的默认值处理机制
---
src/main/resources/mapper/system/SysUserMapper.xml | 18 ++++++++++++++----
1 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/src/main/resources/mapper/system/SysUserMapper.xml b/src/main/resources/mapper/system/SysUserMapper.xml
index 441fd9a..6073e01 100644
--- a/src/main/resources/mapper/system/SysUserMapper.xml
+++ b/src/main/resources/mapper/system/SysUserMapper.xml
@@ -88,7 +88,7 @@
<if test="params.endTime != null and params.endTime != ''"><!-- 缁撴潫鏃堕棿妫�绱� -->
AND date_format(u.create_time,'%Y%m%d') <= date_format(#{params.endTime},'%Y%m%d')
</if>
- <if test="params.deptId != null">
+ <if test="deptId != null">
AND u.user_id IN
(
SELECT user_id FROM sys_user_dept WHERE dept_id = #{deptId}
@@ -158,7 +158,7 @@
#{item}
</foreach>
</select>
- <select id="selectList" resultType="com.ruoyi.project.system.domain.SysUser">
+ <select id="selectRegistrantIds" resultType="com.ruoyi.project.system.domain.SysUser">
SELECT user_id, nick_name FROM sys_user
<where>
<if test="list != null and list.size() > 0">
@@ -190,7 +190,6 @@
<insert id="insertUser" parameterType="com.ruoyi.project.system.domain.SysUser" useGeneratedKeys="true" keyProperty="userId">
insert into sys_user(
<if test="userId != null and userId != 0">user_id,</if>
- <if test="deptId != null and deptId != 0">dept_id,</if>
<if test="userName != null and userName != ''">user_name,</if>
<if test="nickName != null and nickName != ''">nick_name,</if>
<if test="email != null and email != ''">email,</if>
@@ -205,7 +204,6 @@
create_time
)values(
<if test="userId != null and userId != ''">#{userId},</if>
- <if test="deptId != null and deptId != ''">#{deptId},</if>
<if test="userName != null and userName != ''">#{userName},</if>
<if test="nickName != null and nickName != ''">#{nickName},</if>
<if test="email != null and email != ''">#{email},</if>
@@ -300,4 +298,16 @@
</if>
</select>
+ <!-- 鏍规嵁宀椾綅缂栫爜鏌ヨ鐢ㄦ埛鍒楄〃 -->
+ <select id="selectUserListByPostCode" resultType="com.ruoyi.project.system.domain.SysUser">
+ SELECT DISTINCT u.user_id, u.user_name, u.nick_name, u.phonenumber, u.status, u.tenant_id
+ FROM sys_user u
+ LEFT JOIN sys_user_post up ON u.user_id = up.user_id
+ LEFT JOIN sys_post p ON up.post_id = p.post_id
+ WHERE u.del_flag = '0'
+ AND u.status = '0'
+ AND p.post_code = #{postCode}
+ AND p.status = '0'
+ </select>
+
</mapper>
--
Gitblit v1.9.3