diff --git a/renren-admin/src/main/java/io/renren/modules/processForm/service/impl/TAbilityApplicationServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/processForm/service/impl/TAbilityApplicationServiceImpl.java index bd8a539e..ae796363 100644 --- a/renren-admin/src/main/java/io/renren/modules/processForm/service/impl/TAbilityApplicationServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/processForm/service/impl/TAbilityApplicationServiceImpl.java @@ -292,7 +292,9 @@ public class TAbilityApplicationServiceImpl extends CrudServiceImpl()); + Map map = new HashMap<>(); + map.put("applyResult", "通过"); + Long sum = abilityApplicationDao.getFundStatementSum(map); BigDecimal result = new BigDecimal(sum).divide(new BigDecimal(10000)); result = result.setScale(1, BigDecimal.ROUND_HALF_UP); return result ; diff --git a/renren-admin/src/main/java/io/renren/modules/resource/dao/ResourceDao.java b/renren-admin/src/main/java/io/renren/modules/resource/dao/ResourceDao.java index c0703618..f8ce60db 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/dao/ResourceDao.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/dao/ResourceDao.java @@ -223,4 +223,6 @@ public interface ResourceDao extends BaseDao { List getAppListByDept(@Param("deptId") Long deptId, @Param("key") String key); Integer updateByDelProcinst(@Param("resourceId") Long resourceId); + + Integer selectYzyCount(); } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java index f1631dc0..2b919cfb 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java @@ -713,24 +713,37 @@ public class ResourceServiceImpl extends CrudServiceImpl() { - { - put("count", null == dataResource ? "0" : dataResource.get("rows") + ""); - put("type", "数据资源"); - } - }); - re.add(new HashMap() { - { - QueryWrapper queryWrapper = new QueryWrapper<>(); - queryWrapper.eq("check_status", 1).ne("gps_x", "").ne("gps_y", "").isNotNull("gps_x").isNotNull("gps_y"); - put("count", cameraChannelMapper.selectCount(queryWrapper) + ""); - put("type", "基础设施"); - } - }); + CompletableFuture sjzy = CompletableFuture.runAsync(() -> { + TsingtaoDataResourceService tsingtaoDataResourceService = new TsingtaoDataResourceService(); + GetDataResourceListDto getDataResourceListDto = new GetDataResourceListDto().setPageNum(1).setPageSize(5); + HashMap dataResource = (HashMap) tsingtaoDataResourceService.getDataResource(getDataResourceListDto); + re.add(new HashMap() { + { + put("count", null == dataResource ? "0" : dataResource.get("rows") + ""); + put("type", "数据资源"); + } + }); + }, executor); + + //基础设施 + CompletableFuture jcss = CompletableFuture.runAsync(() -> { + HashMap map = (HashMap) this.selectInfrastructureList(); + final Long[] total = {0L}; + map.forEach((k,v) -> { + total[0] = total[0] + (Integer) v; + }); + re.add(new HashMap() { + { + put("count", total[0]); + put("type", "基础设施"); + } + }); + }, executor); + + CompletableFuture all = CompletableFuture.allOf(sjzy, jcss); + all.join(); } break; @@ -1939,16 +1952,19 @@ public class ResourceServiceImpl extends CrudServiceImpl resultMap = new HashMap<>(); - resultMap.put("云资源", 0); + //云资源 + CompletableFuture yzy = CompletableFuture.runAsync(() -> { + resultMap.put("云资源", resourceDao.selectYzyCount()); + }, executor); + //视频资源 CompletableFuture jcss = CompletableFuture.runAsync(() -> { - Map map = (Map) selectTotal(); - List> list = (List>) map.get("total"); - list.forEach(index -> { - if ("基础设施".equals(index.get("type").toString())) { - resultMap.put("视频资源", Integer.parseInt(index.get("count").toString())); - } - }); + + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("check_status", 1).ne("gps_x", "").ne("gps_y", "").isNotNull("gps_x").isNotNull("gps_y"); + resultMap.put("视频资源", cameraChannelMapper.selectCount(queryWrapper)); + + }, executor); //新增会客厅和视频会议统计 diff --git a/renren-admin/src/main/java/io/renren/modules/sys/controller/SysUserController.java b/renren-admin/src/main/java/io/renren/modules/sys/controller/SysUserController.java index b104d5fd..48fef54d 100644 --- a/renren-admin/src/main/java/io/renren/modules/sys/controller/SysUserController.java +++ b/renren-admin/src/main/java/io/renren/modules/sys/controller/SysUserController.java @@ -197,7 +197,6 @@ public class SysUserController { } - @GetMapping("/getApproverUnconfiguredDepartment") @ApiOperation("查询未配置部门审核人部门列表") @LogOperation("查询未配置部门审核人部门列表") diff --git a/renren-admin/src/main/resources/mapper/processForm/TAbilityApplicationDao.xml b/renren-admin/src/main/resources/mapper/processForm/TAbilityApplicationDao.xml index ec356980..18a5a439 100644 --- a/renren-admin/src/main/resources/mapper/processForm/TAbilityApplicationDao.xml +++ b/renren-admin/src/main/resources/mapper/processForm/TAbilityApplicationDao.xml @@ -724,7 +724,7 @@ t_ability_application taa WHERE taa.del_flag = 0 - AND taa.approve_status IN ( '通过', '审核中' ) + AND taa.approve_status = '通过' GROUP BY resource_id ) taa ON taa.resource_id = tdr.id @@ -748,7 +748,7 @@ t_meetingroom_book tmb LEFT JOIN ( SELECT id, NAME, district FROM sys_dept ) sd ON tmb.dept = sd.NAME WHERE - tmb.state IN ( 0, 2 ) + tmb.state = 0 GROUP BY sd.id, tmb.dept @@ -787,7 +787,7 @@ t_ability_application taa WHERE taa.del_flag = 0 - AND taa.approve_status IN ( '通过', '审核中' ) + AND taa.approve_status = '通过' GROUP BY resource_id ) taa ON taa.resource_id = tdr.id @@ -816,7 +816,7 @@ t_ability_application taa WHERE taa.del_flag = 0 - AND taa.approve_status IN ( '通过', '审核中' ) + AND taa.approve_status = '通过' GROUP BY resource_id ) taa @@ -836,9 +836,7 @@ FROM t_meetingroom_book tmb WHERE - tmb.state IN ( - 0, - 2) + tmb.state = 0 + + \ No newline at end of file diff --git a/renren-admin/src/main/resources/mapper/sys/SysUserDao.xml b/renren-admin/src/main/resources/mapper/sys/SysUserDao.xml index b252e9a0..5984ddfc 100644 --- a/renren-admin/src/main/resources/mapper/sys/SysUserDao.xml +++ b/renren-admin/src/main/resources/mapper/sys/SysUserDao.xml @@ -163,7 +163,7 @@ AND su.id = sru.user_id AND sru.role_id = sr.id AND sd.district = srg.id - AND sru.del_falg = 0 + AND sru.del_flag = 0 AND sr.`name` = '区审批人' ) AND srg.tree_level = 3