Commit 9f40ae38d8b1e3b7d2269144c3d864ca5f15caca
1 parent
842c1a15
app养护计划明细提交
Showing
3 changed files
with
9 additions
and
1 deletions
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/inspectionplan/InspectionPlanServiceImpl.java
| ... | ... | @@ -380,6 +380,9 @@ public class InspectionPlanServiceImpl implements InspectionPlanService { |
| 380 | 380 | Long deptId = SecurityFrameworkUtils.getDeptId(); |
| 381 | 381 | /*1.查询登录用户角色*/ |
| 382 | 382 | List<Long> roleIds = roleApi.getRoleIdsByUserId(SecurityFrameworkUtils.getLoginUserId()); |
| 383 | + if (CollectionUtils.isEmpty(roleIds)) { | |
| 384 | + return Collections.emptySet(); | |
| 385 | + } | |
| 383 | 386 | QueryWrapper<InspectionPlanRoleDO> roleSql = new QueryWrapper<>(); |
| 384 | 387 | roleSql.select("batch_no"); |
| 385 | 388 | roleSql.lambda().in(InspectionPlanRoleDO::getRoleId, roleIds). | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/maintainplan/MaintainPlanDetailServiceImpl.java
| ... | ... | @@ -132,8 +132,10 @@ public class MaintainPlanDetailServiceImpl implements MaintainPlanDetailService |
| 132 | 132 | Long deptId = SecurityFrameworkUtils.getDeptId(); |
| 133 | 133 | /*1.查询登录用户角色*/ |
| 134 | 134 | List<Long> roleIds = roleApi.getRoleIdsByUserId(SecurityFrameworkUtils.getLoginUserId()); |
| 135 | + if (CollectionUtils.isEmpty(roleIds)) { | |
| 136 | + return Collections.emptySet(); | |
| 137 | + } | |
| 135 | 138 | QueryWrapper<MaintainPlanRoleDO> roleSql = new QueryWrapper<>(); |
| 136 | - roleSql.select("batch_no"); | |
| 137 | 139 | roleSql.lambda().in(MaintainPlanRoleDO::getRoleId, roleIds). |
| 138 | 140 | eq(MaintainPlanRoleDO::getCompanyId, companyId) |
| 139 | 141 | .eq(MaintainPlanRoleDO::getDeptId, deptId); | ... | ... |
urbanops-module-garden/src/main/java/com/zteits/urbanops/module/garden/service/maintainplan/MaintainPlanServiceImpl.java
| ... | ... | @@ -364,6 +364,9 @@ public class MaintainPlanServiceImpl implements MaintainPlanService { |
| 364 | 364 | Long deptId = SecurityFrameworkUtils.getDeptId(); |
| 365 | 365 | /*1.查询登录用户角色*/ |
| 366 | 366 | List<Long> roleIds = roleApi.getRoleIdsByUserId(SecurityFrameworkUtils.getLoginUserId()); |
| 367 | + if (CollectionUtils.isEmpty(roleIds)) { | |
| 368 | + return Collections.emptySet(); | |
| 369 | + } | |
| 367 | 370 | QueryWrapper<MaintainPlanRoleDO> roleSql = new QueryWrapper<>(); |
| 368 | 371 | roleSql.select("batch_no"); |
| 369 | 372 | roleSql.lambda().in(MaintainPlanRoleDO::getRoleId, roleIds). | ... | ... |