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/java/com/ruoyi/project/system/controller/SysProfileController.java | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/src/main/java/com/ruoyi/project/system/controller/SysProfileController.java b/src/main/java/com/ruoyi/project/system/controller/SysProfileController.java
index 11f2f386..7a6908a 100644
--- a/src/main/java/com/ruoyi/project/system/controller/SysProfileController.java
+++ b/src/main/java/com/ruoyi/project/system/controller/SysProfileController.java
@@ -1,5 +1,6 @@
package com.ruoyi.project.system.controller;
+import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@@ -67,13 +68,13 @@
currentUser.setSex(user.getSex());
if (StringUtils.isNotEmpty(user.getPhonenumber()) && !userService.checkPhoneUnique(currentUser))
{
- return error("淇敼鐢ㄦ埛'" + user.getUserName() + "'澶辫触锛屾墜鏈哄彿鐮佸凡瀛樺湪");
+ return error("淇敼鐢ㄦ埛'" + loginUser.getUsername() + "'澶辫触锛屾墜鏈哄彿鐮佸凡瀛樺湪");
}
if (StringUtils.isNotEmpty(user.getEmail()) && !userService.checkEmailUnique(currentUser))
{
- return error("淇敼鐢ㄦ埛'" + user.getUserName() + "'澶辫触锛岄偖绠辫处鍙峰凡瀛樺湪");
+ return error("淇敼鐢ㄦ埛'" + loginUser.getUsername() + "'澶辫触锛岄偖绠辫处鍙峰凡瀛樺湪");
}
- if (userService.updateUserProfile(user) > 0)
+ if (userService.updateUserProfile(currentUser) > 0)
{
// 鏇存柊缂撳瓨鐢ㄦ埛淇℃伅
tokenService.setLoginUser(loginUser);
@@ -87,8 +88,10 @@
*/
@Log(title = "涓汉淇℃伅", businessType = BusinessType.UPDATE)
@PutMapping("/updatePwd")
- public AjaxResult updatePwd(String oldPassword, String newPassword)
+ public AjaxResult updatePwd(@RequestBody Map<String, String> params)
{
+ String oldPassword = params.get("oldPassword");
+ String newPassword = params.get("newPassword");
LoginUser loginUser = getLoginUser();
String userName = loginUser.getUsername();
String password = loginUser.getPassword();
@@ -100,10 +103,11 @@
{
return error("鏂板瘑鐮佷笉鑳戒笌鏃у瘑鐮佺浉鍚�");
}
- if (userService.resetUserPwd(userName, SecurityUtils.encryptPassword(newPassword)) > 0)
+ newPassword = SecurityUtils.encryptPassword(newPassword);
+ if (userService.resetUserPwd(userName, newPassword) > 0)
{
// 鏇存柊缂撳瓨鐢ㄦ埛瀵嗙爜
- loginUser.getUser().setPassword(SecurityUtils.encryptPassword(newPassword));
+ loginUser.getUser().setPassword(newPassword);
tokenService.setLoginUser(loginUser);
return success();
}
--
Gitblit v1.9.3