|
|
|
|
@ -63,6 +63,7 @@ import java.util.List;
|
|
|
|
|
import java.util.Map; |
|
|
|
|
import java.util.Objects; |
|
|
|
|
import java.util.function.Consumer; |
|
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
|
import static com.biutag.supervision.constants.AppConstants.ROOTID; |
|
|
|
|
|
|
|
|
|
@ -252,16 +253,19 @@ public class ReportProjectController {
|
|
|
|
|
if (!superAuth) { |
|
|
|
|
wrapper.and(p -> p.in("p.audit_unit_id", userAuthOrgIds).or().in("p.project_unit_id", userAuthOrgIds)); |
|
|
|
|
} |
|
|
|
|
List<String> dszdOrgIds = departService.getAllNodeIds(AppConstants.DSZD); |
|
|
|
|
// 页面鉴权
|
|
|
|
|
Map<String, Consumer<QueryWrapper<ReportProject>>> authStrategy = Map.of( |
|
|
|
|
// “审计单位”为督审支队的项目
|
|
|
|
|
"dszd", w -> { |
|
|
|
|
List<String> dszdOrgIds = departService.getAllNodeIds(AppConstants.DSZD); |
|
|
|
|
w.and(p -> p.in("p.audit_unit_id", dszdOrgIds)); |
|
|
|
|
}, |
|
|
|
|
// 内“审计单位”为各分县市局内审的项目
|
|
|
|
|
// 内“审计单位”为各分县市局内审的项目,还要去除督审支队
|
|
|
|
|
"self", w -> { |
|
|
|
|
w.and(p -> p.in("p.audit_unit_id", userAuthOrgIds)); |
|
|
|
|
List<String> filteredUserAuthOrgIds = userAuthOrgIds.stream() |
|
|
|
|
.filter(id -> !dszdOrgIds.contains(id)) |
|
|
|
|
.collect(Collectors.toList()); |
|
|
|
|
w.and(p -> p.in("p.audit_unit_id", filteredUserAuthOrgIds)); |
|
|
|
|
// w.and(p -> p.in("p.audit_unit_id", userAuthOrgIds).or().in("p.project_unit_id", userAuthOrgIds));
|
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
|