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,6 +380,9 @@ public class InspectionPlanServiceImpl implements InspectionPlanService { | ||
| 380 | Long deptId = SecurityFrameworkUtils.getDeptId(); | 380 | Long deptId = SecurityFrameworkUtils.getDeptId(); |
| 381 | /*1.查询登录用户角色*/ | 381 | /*1.查询登录用户角色*/ |
| 382 | List<Long> roleIds = roleApi.getRoleIdsByUserId(SecurityFrameworkUtils.getLoginUserId()); | 382 | List<Long> roleIds = roleApi.getRoleIdsByUserId(SecurityFrameworkUtils.getLoginUserId()); |
| 383 | + if (CollectionUtils.isEmpty(roleIds)) { | ||
| 384 | + return Collections.emptySet(); | ||
| 385 | + } | ||
| 383 | QueryWrapper<InspectionPlanRoleDO> roleSql = new QueryWrapper<>(); | 386 | QueryWrapper<InspectionPlanRoleDO> roleSql = new QueryWrapper<>(); |
| 384 | roleSql.select("batch_no"); | 387 | roleSql.select("batch_no"); |
| 385 | roleSql.lambda().in(InspectionPlanRoleDO::getRoleId, roleIds). | 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,8 +132,10 @@ public class MaintainPlanDetailServiceImpl implements MaintainPlanDetailService | ||
| 132 | Long deptId = SecurityFrameworkUtils.getDeptId(); | 132 | Long deptId = SecurityFrameworkUtils.getDeptId(); |
| 133 | /*1.查询登录用户角色*/ | 133 | /*1.查询登录用户角色*/ |
| 134 | List<Long> roleIds = roleApi.getRoleIdsByUserId(SecurityFrameworkUtils.getLoginUserId()); | 134 | List<Long> roleIds = roleApi.getRoleIdsByUserId(SecurityFrameworkUtils.getLoginUserId()); |
| 135 | + if (CollectionUtils.isEmpty(roleIds)) { | ||
| 136 | + return Collections.emptySet(); | ||
| 137 | + } | ||
| 135 | QueryWrapper<MaintainPlanRoleDO> roleSql = new QueryWrapper<>(); | 138 | QueryWrapper<MaintainPlanRoleDO> roleSql = new QueryWrapper<>(); |
| 136 | - roleSql.select("batch_no"); | ||
| 137 | roleSql.lambda().in(MaintainPlanRoleDO::getRoleId, roleIds). | 139 | roleSql.lambda().in(MaintainPlanRoleDO::getRoleId, roleIds). |
| 138 | eq(MaintainPlanRoleDO::getCompanyId, companyId) | 140 | eq(MaintainPlanRoleDO::getCompanyId, companyId) |
| 139 | .eq(MaintainPlanRoleDO::getDeptId, deptId); | 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,6 +364,9 @@ public class MaintainPlanServiceImpl implements MaintainPlanService { | ||
| 364 | Long deptId = SecurityFrameworkUtils.getDeptId(); | 364 | Long deptId = SecurityFrameworkUtils.getDeptId(); |
| 365 | /*1.查询登录用户角色*/ | 365 | /*1.查询登录用户角色*/ |
| 366 | List<Long> roleIds = roleApi.getRoleIdsByUserId(SecurityFrameworkUtils.getLoginUserId()); | 366 | List<Long> roleIds = roleApi.getRoleIdsByUserId(SecurityFrameworkUtils.getLoginUserId()); |
| 367 | + if (CollectionUtils.isEmpty(roleIds)) { | ||
| 368 | + return Collections.emptySet(); | ||
| 369 | + } | ||
| 367 | QueryWrapper<MaintainPlanRoleDO> roleSql = new QueryWrapper<>(); | 370 | QueryWrapper<MaintainPlanRoleDO> roleSql = new QueryWrapper<>(); |
| 368 | roleSql.select("batch_no"); | 371 | roleSql.select("batch_no"); |
| 369 | roleSql.lambda().in(MaintainPlanRoleDO::getRoleId, roleIds). | 372 | roleSql.lambda().in(MaintainPlanRoleDO::getRoleId, roleIds). |