From 9ffbdbdf57dfe36d3fa3648b34059cfe8cc1362a Mon Sep 17 00:00:00 2001 From: hongawen <83944980@qq.com> Date: Thu, 25 Dec 2025 20:39:28 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E9=A9=BE=E9=A9=B6=E8=88=B1=E5=85=A8?= =?UTF-8?q?=E5=B1=80=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../njcn/system/pojo/param/PqDashboardPageParam.java | 6 ++++++ .../com/njcn/system/pojo/vo/PqDashboardPageVO.java | 7 +++++++ .../system/controller/PqDashboardPageController.java | 10 ++++++++++ .../njcn/system/service/PqDashboardPageService.java | 2 ++ .../service/impl/PqDashboardPageServiceImpl.java | 10 +++++++++- 5 files changed, 34 insertions(+), 1 deletion(-) diff --git a/pqs-system/system-api/src/main/java/com/njcn/system/pojo/param/PqDashboardPageParam.java b/pqs-system/system-api/src/main/java/com/njcn/system/pojo/param/PqDashboardPageParam.java index ee89aaa37..2bb6c23ab 100644 --- a/pqs-system/system-api/src/main/java/com/njcn/system/pojo/param/PqDashboardPageParam.java +++ b/pqs-system/system-api/src/main/java/com/njcn/system/pojo/param/PqDashboardPageParam.java @@ -65,6 +65,12 @@ public class PqDashboardPageParam { @ApiModelProperty("图标") private String icon; + /** + * 页面名称 + */ + @ApiModelProperty("用户id") + private String userId; + /** * 更新操作实体 */ diff --git a/pqs-system/system-api/src/main/java/com/njcn/system/pojo/vo/PqDashboardPageVO.java b/pqs-system/system-api/src/main/java/com/njcn/system/pojo/vo/PqDashboardPageVO.java index e66c8d018..e2f9763d5 100644 --- a/pqs-system/system-api/src/main/java/com/njcn/system/pojo/vo/PqDashboardPageVO.java +++ b/pqs-system/system-api/src/main/java/com/njcn/system/pojo/vo/PqDashboardPageVO.java @@ -1,5 +1,6 @@ package com.njcn.system.pojo.vo; +import com.baomidou.mybatisplus.annotation.TableField; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; @@ -50,6 +51,12 @@ public class PqDashboardPageVO extends BaseEntity { */ private Integer sort; + /** + * 用户id + */ + @TableField(value = "user_id") + private String userId; + /** * 0未激活,1激活 */ diff --git a/pqs-system/system-boot/src/main/java/com/njcn/system/controller/PqDashboardPageController.java b/pqs-system/system-boot/src/main/java/com/njcn/system/controller/PqDashboardPageController.java index ad843a207..0af9e55a0 100644 --- a/pqs-system/system-boot/src/main/java/com/njcn/system/controller/PqDashboardPageController.java +++ b/pqs-system/system-boot/src/main/java/com/njcn/system/controller/PqDashboardPageController.java @@ -89,6 +89,16 @@ public class PqDashboardPageController extends BaseController { return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe); } + @PostMapping("/scopePage") + @OperateInfo(info = LogEnum.BUSINESS_COMMON) + @ApiOperation("全局的驾驶舱页面") + public HttpResult scopePage(@RequestParam("id") String id,@RequestParam("userId") String userId){ + log.info("全局的驾驶舱页面"); + String methodDescribe = getMethodDescribe("scopePage"); + Boolean result = pqDashboardPageService.scopePage(id,userId); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe); + } + @PostMapping("/queryActivatePage") @OperateInfo(info = LogEnum.BUSINESS_COMMON) @ApiOperation("查询激活的驾驶舱页面") diff --git a/pqs-system/system-boot/src/main/java/com/njcn/system/service/PqDashboardPageService.java b/pqs-system/system-boot/src/main/java/com/njcn/system/service/PqDashboardPageService.java index 267b414ad..1e430d811 100644 --- a/pqs-system/system-boot/src/main/java/com/njcn/system/service/PqDashboardPageService.java +++ b/pqs-system/system-boot/src/main/java/com/njcn/system/service/PqDashboardPageService.java @@ -33,4 +33,6 @@ public interface PqDashboardPageService extends IService { PqDashboardPageVO queryByPagePath(String pagePath); List getDashboardPageByUserId(String id,boolean state); + + Boolean scopePage(String id, String userId); } diff --git a/pqs-system/system-boot/src/main/java/com/njcn/system/service/impl/PqDashboardPageServiceImpl.java b/pqs-system/system-boot/src/main/java/com/njcn/system/service/impl/PqDashboardPageServiceImpl.java index 733031fd8..c92084c8d 100644 --- a/pqs-system/system-boot/src/main/java/com/njcn/system/service/impl/PqDashboardPageServiceImpl.java +++ b/pqs-system/system-boot/src/main/java/com/njcn/system/service/impl/PqDashboardPageServiceImpl.java @@ -42,7 +42,7 @@ public class PqDashboardPageServiceImpl extends ServiceImpl(PageFactory.getPageNum(param), PageFactory.getPageSize(param)), queryWrapper); } @@ -82,6 +83,11 @@ public class PqDashboardPageServiceImpl extends ServiceImpl userList = Arrays.asList("0",RequestUtil.getUserIndex()); @@ -108,6 +114,8 @@ public class PqDashboardPageServiceImpl extends ServiceImpl Date: Thu, 25 Dec 2025 20:44:52 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../device/impl/LineWarningServiceImpl.java | 16 ---------------- .../java/com/njcn/user/enums/AppRoleEnum.java | 2 ++ .../njcn/user/service/impl/UserServiceImpl.java | 9 ++++++++- 3 files changed, 10 insertions(+), 17 deletions(-) diff --git a/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/device/impl/LineWarningServiceImpl.java b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/device/impl/LineWarningServiceImpl.java index d508e8555..4df00b9fe 100644 --- a/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/device/impl/LineWarningServiceImpl.java +++ b/pqs-supervision/supervision-boot/src/main/java/com/njcn/supervision/service/device/impl/LineWarningServiceImpl.java @@ -231,22 +231,6 @@ public class LineWarningServiceImpl extends MppServiceImpl noDataLineInfo = lineFeignClient.getNoDataLine().getData(); -// if (CollUtil.isNotEmpty(noDataLineInfo)) { -// LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); -// lambdaQueryWrapper.eq(LineWarning::getTargetType, "0").eq(LineWarning::getAlarmTime, date); -// this.baseMapper.delete(lambdaQueryWrapper); -// noDataLineInfo.forEach(item -> { -// String deptId = Objects.isNull(deptLineMap.get(item.getLineId())) ? null : deptLineMap.get(item.getLineId()).get(0).getId(); -// LineWarning lineWarning = new LineWarning(); -// lineWarning.setAlarmTime(firstDayOfMonth); -// lineWarning.setDeptId(deptId); -// lineWarning.setLineId(item.getLineId()); -// lineWarning.setTargetType("0"); -// result.add(lineWarning); -// }); -// } this.saveOrUpdateBatchByMultiId(result); } diff --git a/pqs-user/user-api/src/main/java/com/njcn/user/enums/AppRoleEnum.java b/pqs-user/user-api/src/main/java/com/njcn/user/enums/AppRoleEnum.java index 1ec0f50d1..ea3531c1c 100644 --- a/pqs-user/user-api/src/main/java/com/njcn/user/enums/AppRoleEnum.java +++ b/pqs-user/user-api/src/main/java/com/njcn/user/enums/AppRoleEnum.java @@ -19,6 +19,8 @@ public enum AppRoleEnum { BXS_USER("bxs_user","便携式正式用户"), ROOT("root","超级管理员"), OPERATION_MANAGER("operation_manager","运维管理员"), + REGULAR_USER_8000("regular_user_8000","正式用户综合电能质量"), + REGULAR_USER("regular_user","正式用户物联云平台") ; private final String code; diff --git a/pqs-user/user-boot/src/main/java/com/njcn/user/service/impl/UserServiceImpl.java b/pqs-user/user-boot/src/main/java/com/njcn/user/service/impl/UserServiceImpl.java index b99a97d52..6c36d17b9 100644 --- a/pqs-user/user-boot/src/main/java/com/njcn/user/service/impl/UserServiceImpl.java +++ b/pqs-user/user-boot/src/main/java/com/njcn/user/service/impl/UserServiceImpl.java @@ -490,7 +490,14 @@ public class UserServiceImpl extends ServiceImpl implements IU List users = new ArrayList<>(); Role roleByCode1 = roleService.getRoleByCode(AppRoleEnum.APP_VIP_USER.getCode()); Role roleByCode2 = roleService.getRoleByCode(AppRoleEnum.BXS_USER.getCode()); - List userRoles = userRoleMapper.selectUserRole(Stream.of(roleByCode1.getId(),roleByCode2.getId()).collect(Collectors.toList())); + Role roleByCode3 = roleService.getRoleByCode(AppRoleEnum.REGULAR_USER_8000.getCode()); + Role roleByCode4 = roleService.getRoleByCode(AppRoleEnum.REGULAR_USER.getCode()); + List userRoles = userRoleMapper.selectUserRole( + Stream.of(roleByCode1.getId() + ,roleByCode2.getId() + ,roleByCode3.getId() + ,roleByCode4.getId() + ).collect(Collectors.toList())); List collect = userRoles.stream().map(UserRole::getUserId).distinct().collect(Collectors.toList()); List users1 = this.listByIds(collect); if (CollectionUtil.isNotEmpty(users1)) {