From c3783c7784cdaff229b6eba5cbcedcb47644698f Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期三, 14 八月 2024 22:32:22 +0800
Subject: [PATCH] update
---
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/appointment/AppointmentController.java | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 49 insertions(+), 0 deletions(-)
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/appointment/AppointmentController.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/appointment/AppointmentController.java
index f43661c..6b0f76d 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/appointment/AppointmentController.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/appointment/AppointmentController.java
@@ -1,13 +1,19 @@
package cn.lihu.jh.module.ecg.controller.admin.appointment;
import cn.hutool.core.bean.BeanUtil;
+import cn.lihu.jh.framework.common.enums.CommonStatusEnum;
import cn.lihu.jh.module.ecg.controller.admin.queue.vo.QueueSaveReqVO;
import cn.lihu.jh.module.ecg.dal.dataobject.queue.QueueDO;
+import cn.lihu.jh.module.ecg.dal.dataobject.queue.QueueStatisticDO;
+import cn.lihu.jh.module.ecg.dal.dataobject.room.RoomStatisticsDO;
import cn.lihu.jh.module.ecg.feign.RemoteDataService;
import cn.lihu.jh.module.ecg.feign.RestApiReqBodyVo;
import cn.lihu.jh.module.ecg.feign.RestApiResult;
import cn.lihu.jh.module.ecg.feign.dto.AppointmentExternal;
import cn.lihu.jh.module.ecg.service.queue.QueueService;
+import cn.lihu.jh.module.ecg.service.room.RoomService;
+import cn.lihu.jh.module.system.api.dept.DeptApi;
+import cn.lihu.jh.module.system.api.dept.dto.DeptRespDTO;
import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.*;
import org.springframework.validation.annotation.Validated;
@@ -23,6 +29,7 @@
import java.time.format.ResolverStyle;
import java.util.*;
import java.io.IOException;
+import java.util.function.Supplier;
import java.util.stream.Collectors;
import cn.lihu.jh.framework.common.pojo.PageParam;
@@ -59,7 +66,13 @@
private QueueService queueService;
@Resource
+ private RoomService roomService;
+
+ @Resource
private RemoteDataService remoteDataService;
+
+ @Resource
+ private DeptApi deptApi;
@PostMapping("/create")
@Operation(summary = "鍒涘缓棰勭害")
@@ -174,6 +187,42 @@
queueService.createqueue(queueSaveReqVO);
+
+ // 鑾峰彇鍊欒瘖鍑嗗鐨勯厤缃汉鏁� 锛� 钀ヤ笟鐨勮瘖瀹�
+
+/*
+ List<DeptDO> list = deptService.getDeptList(
+ new DeptListReqVO().setStatus(CommonStatusEnum.ENABLE.getStatus()));
+ return success(BeanUtils.toBean(list, DeptSimpleRespVO.class));
+*/
+
+ List<DeptRespDTO> deptRespDTOList = deptApi.getSimpleDeptList();
+ Optional<DeptRespDTO> ecgDept = deptRespDTOList.stream()
+ .filter(a -> a.getName().equals("ECG"))
+ .findAny();
+
+ if (ecgDept.isPresent()){
+ System.out.println(ecgDept.get().getName());
+
+ List<DeptRespDTO> list2 = deptRespDTOList.stream()
+ .filter(a -> Objects.equals(a.getParentId(), ecgDept.get().getId()))
+ .toList();
+ list2.forEach(System.out::println);
+ list2.size();
+ }
+
+ // 鑾峰彇闂ㄨ瘖瀹� 璇婄枟搴婄殑缁熻
+ List<RoomStatisticsDO> roomStatisticsList = roomService.roomStatistics();
+ roomStatisticsList.size();
+
+ // 鑾峰彇 姣忎釜钀ヤ笟鐨勮瘖瀹� 鍊欒瘖鍑嗗鐨勫綋鍓嶄汉鏁� 灏辫瘖涓殑褰撳墠浜烘暟
+ // queueService.get
+ List statusList = new ArrayList<Byte>();
+ statusList.add((byte)20);
+ statusList.add((byte)30);
+ List<QueueStatisticDO> queueStatisticDOList = queueService.queueStatistics(statusList);
+ queueStatisticDOList.size();
+
return success("hello");
}
}
--
Gitblit v1.9.3