diff --git a/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java b/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java index fb7434b4..107f9a5a 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java @@ -912,4 +912,28 @@ public class ResourceController { } } + @PostMapping("/getResourceBusinessList") + @ApiOperation("/获取申请云资源业务列表") + @LogOperation("/获取申请云资源业务列表") + public Object getResourceBusinessList(String userAccount, String status) { + try { + return resourceService.getResourceBusinessList(userAccount, status); + } catch (Exception e) { + e.printStackTrace(); + return new Result<>().error("云资源查询接口调用失败!"); + } + } + + @PostMapping("/getVideoBusinessList") + @ApiOperation("/获取云视频业务列表") + @LogOperation("/获取云视频业务列表") + public Object getVideoBusinessList(String userAccount, String status) { + try { + return resourceService.getVideoBusinessList(userAccount, status); + } catch (Exception e) { + e.printStackTrace(); + return new Result<>().error("云视频查询接口调用失败!"); + } + } + } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/resource/service/ResourceService.java b/renren-admin/src/main/java/io/renren/modules/resource/service/ResourceService.java index 912e1805..90b9cec5 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/service/ResourceService.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/service/ResourceService.java @@ -165,4 +165,8 @@ public interface ResourceService extends CrudService temp = new ArrayList<>(); resultList.forEach(map -> { temp.add(map.get("type").toString()); - if ("基础设施".equals(map.get("type").toString())) { - int num = meetCountNew[0] + Integer.parseInt(map.get("count").toString()); - map.replace("count", num); - } }); Arrays.stream(censusTypes).filter(index -> !temp.contains(index)).forEach(index -> { Map nullMap = new HashMap() { @@ -2112,6 +2116,12 @@ public class ResourceServiceImpl extends CrudServiceImpl { + if ("基础设施".equals(map.get("type").toString())) { + int num = meetCountNew[0] + Integer.parseInt(map.get("count").toString()); + map.replace("count", num); + } + }); return resultList; } @@ -2628,21 +2638,13 @@ public class ResourceServiceImpl extends CrudServiceImpl delRoom = CompletableFuture.runAsync(() -> { - Map map = new HashMap<>(); - map.put("room_id", id); meetingroomMapper.deleteById(id); //获取当前会客厅预约记录用于删除消息数据 List idList = meetingroomBookMapper.selectBookIdByRoomId(id); if (!idList.isEmpty()) { //清除消息数据 - idList.forEach(x -> { - Map deleteMap = new HashMap() {{ - put("apply_id", x.toString()); - }}; - sysNoticeDao.deleteByMap(deleteMap); - }); + idList.forEach(x -> this.delProcinstBySuAd(x, "会客厅申请", null)); } - meetingroomBookMapper.deleteByMap(map); }, executor); //删除申请表单数据 @@ -2665,6 +2667,10 @@ public class ResourceServiceImpl extends CrudServiceImpl deleteMap = new HashMap() {{ + put("apply_id", id.toString()); + }}; + sysNoticeDao.deleteByMap(deleteMap); } else { //清除流程实例数据 @@ -2728,5 +2734,23 @@ public class ResourceServiceImpl extends CrudServiceImpl param = new LinkedMultiValueMap<>(); + param.add("userAccount", userAccount); + param.add("status", status); + HttpEntity requestEntity = new HttpEntity(param, new HttpHeaders()); + return restTemplate.postForEntity("http://15.72.183.88:8760/yzy/main/cloudresource/getResourceBusinessList", requestEntity, String.class).getBody(); + } + + @Override + public Object getVideoBusinessList(String userAccount, String status) { + + MultiValueMap param = new LinkedMultiValueMap<>(); + param.add("userAccount", userAccount); + param.add("status", status); + HttpEntity requestEntity = new HttpEntity(param, new HttpHeaders()); + return restTemplate.postForEntity("http://15.72.183.88:8760/yzy/main/cloudresource/getVideoBusinessList", requestEntity, String.class).getBody(); + } } \ No newline at end of file