From 7660fe12273a6b132256a2fa83ca1b11d6b2381f Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期二, 13 八月 2024 17:48:44 +0800
Subject: [PATCH] update
---
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/appointment/AppointmentController.java | 35 +++++++++++++++++++++++++++++++++++
1 files changed, 35 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..518f1a4 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,6 +1,7 @@
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.feign.RemoteDataService;
@@ -8,6 +9,8 @@
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.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 +26,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;
@@ -60,6 +64,9 @@
@Resource
private RemoteDataService remoteDataService;
+
+ @Resource
+ private DeptApi deptApi;
@PostMapping("/create")
@Operation(summary = "鍒涘缓棰勭害")
@@ -174,6 +181,34 @@
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
+
+
return success("hello");
}
}
--
Gitblit v1.9.3