修改获取诊断模判断
Some checks are pending
Java CI with Maven / build (11) (push) Waiting to run
Java CI with Maven / build (17) (push) Waiting to run
Java CI with Maven / build (8) (push) Waiting to run
yudao-ui-admin CI / build (14.x) (push) Waiting to run
yudao-ui-admin CI / build (16.x) (push) Waiting to run

This commit is contained in:
lxd 2024-08-27 18:39:13 +08:00
parent 39b3f5ba18
commit 0b8568689c

View File

@ -4,8 +4,10 @@ import cn.iocoder.yudao.module.system.dal.dataobject.dicomworklist.DicomImagesDO
import cn.iocoder.yudao.module.system.dal.dataobject.dicomworklist.DicomSeriesDO;
import cn.iocoder.yudao.module.system.dal.dataobject.dicomworklist.DicompatientDO;
import cn.iocoder.yudao.module.system.dal.dataobject.org.OrgUnitDO;
import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
import cn.iocoder.yudao.module.system.service.dicomworklist.DicomworklistService;
import cn.iocoder.yudao.module.system.service.org.OrgUnitService;
import cn.iocoder.yudao.module.system.service.user.AdminUserService;
import com.fasterxml.jackson.databind.SerializationFeature;
import okhttp3.OkHttpClient;
import okhttp3.Request;
@ -51,6 +53,7 @@ import java.util.*;
import java.util.stream.Collectors;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
@Tag(name = "管理后台 - 超声科组件")
@RestController
@ -68,7 +71,8 @@ public class ultrasonicController {
@Resource
private OrgUnitService Service;
@Resource
private AdminUserService userService;
@GetMapping("/reporttemplatetlist")
@Operation(summary = "获取模版表数据")
@ -77,7 +81,8 @@ public class ultrasonicController {
public CommonResult<List<Tree>> getreporttemplatelist(@RequestParam("orgID") String orgID, @RequestParam("type") String type, @RequestParam("isprivate") String isprivate) throws Exception {
List<ultrasonicDO> devicelist = ultrasonicService.getreporttemplate();
List<ultrasonicDO> filteredList = new ArrayList<>();
//当前登陆用户
AdminUserDO user = userService.getUser(getLoginUserId());
// 按照 updateTime 字段降序排列空值放在最后
List<ultrasonicDO> sortedList = devicelist.stream()
.sorted(Comparator.comparing(ultrasonicDO::getUpdateTime, Comparator.nullsLast(Comparator.reverseOrder())))
@ -102,7 +107,7 @@ public class ultrasonicController {
if (isprivate.equals("1")) {
// 筛选条件
filteredList = filteredList.stream()
.filter(ultrasonicDO -> (ultrasonicDO.getPrivateDoctorId() != null))
.filter(ultrasonicDO -> Objects.equals(ultrasonicDO.getPrivateDoctorId(), user.getId().toString()))
.collect(Collectors.toList());
}