|
|
@@ -6,6 +6,7 @@ import cn.hutool.core.util.StrUtil;
|
|
|
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
|
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
|
|
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
|
|
+import cn.iocoder.yudao.framework.datapermission.core.util.DataPermissionUtils;
|
|
|
import cn.iocoder.yudao.module.pms.constant.PmsConstants;
|
|
|
import cn.iocoder.yudao.module.pms.controller.admin.iotfivedailyreport.vo.IotFiveDailyReportPageReqVO;
|
|
|
import cn.iocoder.yudao.module.pms.controller.admin.iotfivedailyreport.vo.IotFiveDailyReportSaveReqVO;
|
|
|
@@ -152,25 +153,28 @@ public class IotFiveDailyReportServiceImpl implements IotFiveDailyReportService
|
|
|
malfunction, brief, nextPlan, accidentDay
|
|
|
);
|
|
|
|
|
|
- // 封装以上消息内容 发送到公司 角色 (生产异常通知)
|
|
|
- // 查询瑞恒 157l 下具有以上角色的人员 查询集团(科瑞石油技术) 拥有以上角色的人员
|
|
|
Set<Long> userIds = new HashSet<>();
|
|
|
Set<Long> deptIds = new HashSet<>();
|
|
|
- deptIds.add(388l);
|
|
|
- List<AdminUserDO> companyUsers = adminUserService.getUserListByDeptIds(deptIds);
|
|
|
- if (CollUtil.isNotEmpty(companyUsers)) {
|
|
|
- companyUsers.forEach(user -> {
|
|
|
- userIds.add(user.getId());
|
|
|
- });
|
|
|
- }
|
|
|
- deptIds.clear();
|
|
|
- deptIds.add(156l);
|
|
|
- List<AdminUserDO> groupUsers = adminUserService.getUserListByDeptIds(deptIds);
|
|
|
- if (CollUtil.isNotEmpty(groupUsers)) {
|
|
|
- groupUsers.forEach(user -> {
|
|
|
- userIds.add(user.getId());
|
|
|
- });
|
|
|
- }
|
|
|
+ DataPermissionUtils.executeIgnore(() -> {
|
|
|
+ // 封装以上消息内容 发送到公司 角色 (生产异常通知)
|
|
|
+ // 查询瑞恒 157l 下具有以上角色的人员 查询集团(科瑞石油技术) 拥有以上角色的人员
|
|
|
+ deptIds.add(388l);
|
|
|
+ List<AdminUserDO> companyUsers = adminUserService.getUserListByDeptIds(deptIds);
|
|
|
+ if (CollUtil.isNotEmpty(companyUsers)) {
|
|
|
+ companyUsers.forEach(user -> {
|
|
|
+ userIds.add(user.getId());
|
|
|
+ });
|
|
|
+ }
|
|
|
+ deptIds.clear();
|
|
|
+ deptIds.add(156l);
|
|
|
+ List<AdminUserDO> groupUsers = adminUserService.getUserListByDeptIds(deptIds);
|
|
|
+ if (CollUtil.isNotEmpty(groupUsers)) {
|
|
|
+ groupUsers.forEach(user -> {
|
|
|
+ userIds.add(user.getId());
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
RoleDO role = roleService.getRoleByCode("生产异常通知");
|
|
|
if (ObjUtil.isNotEmpty(role)) {
|
|
|
Set<Long> roleIds = new HashSet<>();
|