From 5f7a61e50bcf82f368272e29518b2bd3a85e4782 Mon Sep 17 00:00:00 2001 From: eight <641137800@qq.com> Date: 星期三, 14 八月 2024 10:59:18 +0800 Subject: [PATCH] update --- jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/appointment/AppointmentController.java | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 48 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..8a370d8 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,41 @@ 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(); + } + + // 鑾峰彇 姣忎釜钀ヤ笟鐨勮瘖瀹� 鍊欒瘖鍑嗗鐨勫綋鍓嶄汉鏁� 灏辫瘖涓殑褰撳墠浜烘暟 + // queueService.get + List<RoomStatisticsDO> roomStatisticsList = roomService.roomStatistics(); + roomStatisticsList.size(); + + 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