|
@@ -158,8 +158,8 @@ public class WorkbenchManage { |
|
|
|
|
|
|
|
|
List<Project> projects = projectService.list(Wrappers.lambdaQuery(Project.class) |
|
|
List<Project> projects = projectService.list(Wrappers.lambdaQuery(Project.class) |
|
|
.eq(Project::getNewest, Boolean.TRUE) |
|
|
.eq(Project::getNewest, Boolean.TRUE) |
|
|
.eq(user.getRegionAdmin(),Project::getAreaCode,user.getRegionCode()) |
|
|
|
|
|
.eq(user.getIsOrgAdmin() || user.notAdmin(),Project::getBuildOrgCode,user.getEmpPosUnitCode())); |
|
|
|
|
|
|
|
|
.eq(user.getRegionAdmin()&&!user.getSuperAdmin(),Project::getAreaCode,user.getRegionCode()) |
|
|
|
|
|
.eq((user.getIsOrgAdmin()&&!user.getSuperAdmin()) || user.notAdmin(),Project::getBuildOrgCode,user.getEmpPosUnitCode())); |
|
|
Set<String> projectCodeS = Sets.newHashSet(); |
|
|
Set<String> projectCodeS = Sets.newHashSet(); |
|
|
Map<String,String> projectNameMap = projects.stream() |
|
|
Map<String,String> projectNameMap = projects.stream() |
|
|
.filter(p -> projectCodeS.add(p.getProjectCode())) |
|
|
.filter(p -> projectCodeS.add(p.getProjectCode())) |
|
@@ -171,13 +171,13 @@ public class WorkbenchManage { |
|
|
Long overCount = earlyWarningRecordsService.count(Wrappers.lambdaQuery(WflowEarlyWarningRecords.class) |
|
|
Long overCount = earlyWarningRecordsService.count(Wrappers.lambdaQuery(WflowEarlyWarningRecords.class) |
|
|
.eq(WflowEarlyWarningRecords::getNoticeType, WarningNoticeTypeEnum.OVER.getCode()) |
|
|
.eq(WflowEarlyWarningRecords::getNoticeType, WarningNoticeTypeEnum.OVER.getCode()) |
|
|
.or(q2 -> q2.isNull(WflowEarlyWarningRecords::getNoticeType)) |
|
|
.or(q2 -> q2.isNull(WflowEarlyWarningRecords::getNoticeType)) |
|
|
.eq(user.getRegionAdmin(),WflowEarlyWarningRecords::getAreaCode,user.getRegionCode()) |
|
|
|
|
|
.eq(user.getIsOrgAdmin() || user.notAdmin(),WflowEarlyWarningRecords::getBuildOrgCode,user.getEmpPosUnitCode())); |
|
|
|
|
|
|
|
|
.eq(user.getRegionAdmin()&&!user.getSuperAdmin(),WflowEarlyWarningRecords::getAreaCode,user.getRegionCode()) |
|
|
|
|
|
.eq((user.getIsOrgAdmin()&&!user.getSuperAdmin()) || user.notAdmin(),WflowEarlyWarningRecords::getBuildOrgCode,user.getEmpPosUnitCode())); |
|
|
accumulate.setOver(overCount.intValue()); |
|
|
accumulate.setOver(overCount.intValue()); |
|
|
Long adventCount = earlyWarningRecordsService.count(Wrappers.lambdaQuery(WflowEarlyWarningRecords.class) |
|
|
Long adventCount = earlyWarningRecordsService.count(Wrappers.lambdaQuery(WflowEarlyWarningRecords.class) |
|
|
.eq(WflowEarlyWarningRecords::getNoticeType, WarningNoticeTypeEnum.ADVENT.getCode()) |
|
|
.eq(WflowEarlyWarningRecords::getNoticeType, WarningNoticeTypeEnum.ADVENT.getCode()) |
|
|
.eq(user.getRegionAdmin(),WflowEarlyWarningRecords::getAreaCode,user.getRegionCode()) |
|
|
.eq(user.getRegionAdmin(),WflowEarlyWarningRecords::getAreaCode,user.getRegionCode()) |
|
|
.eq(user.getIsOrgAdmin() || user.notAdmin(),WflowEarlyWarningRecords::getBuildOrgCode,user.getEmpPosUnitCode())); |
|
|
|
|
|
|
|
|
.eq((user.getIsOrgAdmin()&&!user.getSuperAdmin()) || user.notAdmin(),WflowEarlyWarningRecords::getBuildOrgCode,user.getEmpPosUnitCode())); |
|
|
accumulate.setAdvent(adventCount.intValue()); |
|
|
accumulate.setAdvent(adventCount.intValue()); |
|
|
projectEarlyWarning.setAccumulate(accumulate); |
|
|
projectEarlyWarning.setAccumulate(accumulate); |
|
|
|
|
|
|
|
@@ -189,18 +189,18 @@ public class WorkbenchManage { |
|
|
Page<ProjectEarlyWarning> normalPage = Page.of(1,1000); |
|
|
Page<ProjectEarlyWarning> normalPage = Page.of(1,1000); |
|
|
LambdaQueryWrapper<ProjectEarlyWarning> overWrapper = Wrappers.lambdaQuery(ProjectEarlyWarning.class) |
|
|
LambdaQueryWrapper<ProjectEarlyWarning> overWrapper = Wrappers.lambdaQuery(ProjectEarlyWarning.class) |
|
|
.eq(ProjectEarlyWarning::getStatus, ProjectEarlyWarningStatusEnum.OVER_TIME.name()) |
|
|
.eq(ProjectEarlyWarning::getStatus, ProjectEarlyWarningStatusEnum.OVER_TIME.name()) |
|
|
.eq(user.getRegionAdmin(),ProjectEarlyWarning::getAreaCode,user.getRegionCode()) |
|
|
|
|
|
.eq(user.getIsOrgAdmin() || user.notAdmin(),ProjectEarlyWarning::getBuildOrgCode,user.getEmpPosUnitCode()); |
|
|
|
|
|
|
|
|
.eq(user.getRegionAdmin()&&!user.getSuperAdmin(),ProjectEarlyWarning::getAreaCode,user.getRegionCode()) |
|
|
|
|
|
.eq((user.getIsOrgAdmin()&&!user.getSuperAdmin()) || user.notAdmin(),ProjectEarlyWarning::getBuildOrgCode,user.getEmpPosUnitCode()); |
|
|
projectEarlyWarningService.page(overPage,overWrapper); |
|
|
projectEarlyWarningService.page(overPage,overWrapper); |
|
|
LambdaQueryWrapper<ProjectEarlyWarning> adventWrapper = Wrappers.lambdaQuery(ProjectEarlyWarning.class) |
|
|
LambdaQueryWrapper<ProjectEarlyWarning> adventWrapper = Wrappers.lambdaQuery(ProjectEarlyWarning.class) |
|
|
.eq(ProjectEarlyWarning::getStatus, ProjectEarlyWarningStatusEnum.ADVENT_TIME.name()) |
|
|
.eq(ProjectEarlyWarning::getStatus, ProjectEarlyWarningStatusEnum.ADVENT_TIME.name()) |
|
|
.eq(user.getRegionAdmin(),ProjectEarlyWarning::getAreaCode,user.getRegionCode()) |
|
|
|
|
|
.eq(user.getIsOrgAdmin() || user.notAdmin(),ProjectEarlyWarning::getBuildOrgCode,user.getEmpPosUnitCode()); |
|
|
|
|
|
|
|
|
.eq(user.getRegionAdmin()&&!user.getSuperAdmin(),ProjectEarlyWarning::getAreaCode,user.getRegionCode()) |
|
|
|
|
|
.eq((user.getIsOrgAdmin()&&!user.getSuperAdmin()) || user.notAdmin(),ProjectEarlyWarning::getBuildOrgCode,user.getEmpPosUnitCode()); |
|
|
projectEarlyWarningService.page(adventPage,adventWrapper); |
|
|
projectEarlyWarningService.page(adventPage,adventWrapper); |
|
|
LambdaQueryWrapper<ProjectEarlyWarning> normalWrapper = Wrappers.lambdaQuery(ProjectEarlyWarning.class) |
|
|
LambdaQueryWrapper<ProjectEarlyWarning> normalWrapper = Wrappers.lambdaQuery(ProjectEarlyWarning.class) |
|
|
.eq(ProjectEarlyWarning::getStatus, ProjectEarlyWarningStatusEnum.NORMAL.name()) |
|
|
.eq(ProjectEarlyWarning::getStatus, ProjectEarlyWarningStatusEnum.NORMAL.name()) |
|
|
.eq(user.getRegionAdmin(),ProjectEarlyWarning::getAreaCode,user.getRegionCode()) |
|
|
|
|
|
.eq(user.getIsOrgAdmin() || user.notAdmin(),ProjectEarlyWarning::getBuildOrgCode,user.getEmpPosUnitCode()); |
|
|
|
|
|
|
|
|
.eq(user.getRegionAdmin()&&!user.getSuperAdmin(),ProjectEarlyWarning::getAreaCode,user.getRegionCode()) |
|
|
|
|
|
.eq((user.getIsOrgAdmin()&&!user.getSuperAdmin()) || user.notAdmin(),ProjectEarlyWarning::getBuildOrgCode,user.getEmpPosUnitCode()); |
|
|
projectEarlyWarningService.page(normalPage,normalWrapper); |
|
|
projectEarlyWarningService.page(normalPage,normalWrapper); |
|
|
|
|
|
|
|
|
WorkbenchVO.WarningStatistics cuurent = new WorkbenchVO.WarningStatistics(); |
|
|
WorkbenchVO.WarningStatistics cuurent = new WorkbenchVO.WarningStatistics(); |
|
@@ -213,8 +213,8 @@ public class WorkbenchManage { |
|
|
projectEarlyWarning.setCurrent(cuurent); |
|
|
projectEarlyWarning.setCurrent(cuurent); |
|
|
|
|
|
|
|
|
List<WflowEarlyWarningRecords> warningRecords = earlyWarningRecordsService.list(Wrappers.lambdaQuery(WflowEarlyWarningRecords.class) |
|
|
List<WflowEarlyWarningRecords> warningRecords = earlyWarningRecordsService.list(Wrappers.lambdaQuery(WflowEarlyWarningRecords.class) |
|
|
.eq(user.getRegionAdmin(),WflowEarlyWarningRecords::getAreaCode,user.getRegionCode()) |
|
|
|
|
|
.eq(user.getIsOrgAdmin() || user.notAdmin(),WflowEarlyWarningRecords::getBuildOrgCode,user.getEmpPosUnitCode()) |
|
|
|
|
|
|
|
|
.eq(user.getRegionAdmin()&&!user.getSuperAdmin(),WflowEarlyWarningRecords::getAreaCode,user.getRegionCode()) |
|
|
|
|
|
.eq((user.getIsOrgAdmin()&&!user.getSuperAdmin()) || user.notAdmin(),WflowEarlyWarningRecords::getBuildOrgCode,user.getEmpPosUnitCode()) |
|
|
.orderByDesc(WflowEarlyWarningRecords::getWarningTime)); |
|
|
.orderByDesc(WflowEarlyWarningRecords::getWarningTime)); |
|
|
Set<String> projectCodeSet = Sets.newHashSet(); |
|
|
Set<String> projectCodeSet = Sets.newHashSet(); |
|
|
Map<String, WflowEarlyWarningRecords> warningMap = warningRecords.stream() |
|
|
Map<String, WflowEarlyWarningRecords> warningMap = warningRecords.stream() |
|
|