From dff21f73e8b9088f4ad4539232e56cc6b768cd31 Mon Sep 17 00:00:00 2001 From: dinggang <2498628697@qq.com> Date: Thu, 10 Nov 2022 15:22:57 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=AF=B9=E6=8E=A5=E6=94=BF=E5=8A=A1=E4=BA=91?= =?UTF-8?q?=E8=B5=84=E6=BA=90=E5=92=8C=E4=BA=91=E8=A7=86=E9=A2=91=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=9F=A5=E8=AF=A2=E6=8E=A5=E5=8F=A3=202.=E5=85=A8?= =?UTF-8?q?=E5=B1=80=E6=90=9C=E7=B4=A2=E4=BC=9A=E5=AE=A2=E5=8E=85=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E9=94=99=E8=AF=AFbug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ResourceController.java | 24 +++++++++ .../resource/service/ResourceService.java | 4 ++ .../service/impl/ResourceServiceImpl.java | 50 ++++++++++++++----- 3 files changed, 65 insertions(+), 13 deletions(-) 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 3f9087a5..bfef2675 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 @@ -901,4 +901,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