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}, '%')