From dc4fcb297fb86794bca7e61d62f4fa5d0ddb8a89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E5=85=81=E6=9E=9E?= <3422692813@qq.com> Date: Thu, 6 Feb 2025 09:11:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A3=80=E6=B5=8B=E5=91=98=E5=B7=A5=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/InspectionStaffService.java | 2 +- .../impl/InspectionStaffServiceImpl.java | 28 +++++++++++-------- .../inspection/InspectionStaffMapper.xml | 2 +- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/InspectionStaffService.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/InspectionStaffService.java index 9da9b10d..55b8283c 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/InspectionStaffService.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/InspectionStaffService.java @@ -56,6 +56,6 @@ public interface InspectionStaffService extends IService { * @param inspectionStaffVo * @return */ - boolean saveInspectionStaff(InspectionStaffSaveVo inspectionStaffVo); + Long saveInspectionStaff(InspectionStaffSaveVo inspectionStaffVo); } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionStaffServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionStaffServiceImpl.java index 86b9125a..67c90fe2 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionStaffServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/InspectionStaffServiceImpl.java @@ -153,27 +153,28 @@ public class InspectionStaffServiceImpl extends ServiceImpl role = roleService.getRoleListByCodesTenant(Collections.singletonList(InspectionConstants.INSPECTION_BASE_STAFF_ROLE)); - - if (ObjectUtil.isNull(role)) { - throw new RuntimeException("检测基础员工角色不存在"); - } - - Set roleIds = role.stream().map(RoleDO::getId).collect(Collectors.toSet()); - //设置角色为检测基础员工 - permissionService.assignUserRole(userId, roleIds); +// //查询检测基础员工角色 +// List role = roleService.getRoleListByCodesTenant(Collections.singletonList(InspectionConstants.INSPECTION_BASE_STAFF_ROLE)); +// +// if (ObjectUtil.isNull(role)) { +// throw new RuntimeException("检测基础员工角色不存在"); +// } +// +// Set roleIds = role.stream().map(RoleDO::getId).collect(Collectors.toSet()); +// //设置角色为检测基础员工 +// permissionService.assignUserRole(userId, roleIds); InspectionStaff inspectionStaff = BeanUtil.copyProperties(inspectionStaffVo, InspectionStaff.class); inspectionStaff.setUserId(userId); //新增检测员工子表 - return this.save(inspectionStaff); + this.save(inspectionStaff); + return inspectionStaff.getUserId(); } /** @@ -229,6 +230,9 @@ public class InspectionStaffServiceImpl extends ServiceImpl - sr.service_package_id = 'jiance' and sr.code != 'jcyh' + sr.service_package_id = 'jiance' and sr.code != 'jcyh' and su.deleted = 0 and su.nickname like concat('%', #{query.nickname}, '%')