From 45e47b330985b1aee8320428353e0a584b5433f2 Mon Sep 17 00:00:00 2001 From: lxd <1004405501@qq.com> Date: Thu, 22 Aug 2024 20:27:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9C=BA=E6=9E=84=E5=92=8C?= =?UTF-8?q?=E8=B6=85=E5=A3=B0=E5=BD=B1=E5=83=8F=E5=88=97=E8=A1=A8=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/dal/dataobject/org/OrgUnitDO.java | 4 ++-- .../PatientexamlistController.java | 20 +++++++++++++------ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/org/OrgUnitDO.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/org/OrgUnitDO.java index 0af8d0898..3e5c774f0 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/org/OrgUnitDO.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/org/OrgUnitDO.java @@ -52,7 +52,7 @@ public class OrgUnitDO { /** * 上级判读医院机构ID */ - @TableField("highLevelOrgID") + @TableField(value ="highLevelOrgID",updateStrategy = FieldStrategy.IGNORED) private String highLevelOrgID; /** * 能收到微信消息提醒的微信列表,格式为:wxopenid1,wxopenid2,wxopenid3 @@ -72,7 +72,7 @@ public class OrgUnitDO { /** * 上级机构的机构名称 */ - @TableField("highLevelOrgName") + @TableField(value ="highLevelOrgName",updateStrategy = FieldStrategy.IGNORED) private String highLevelOrgName; /** * 机构logo的URL diff --git a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/patientexamlist/PatientexamlistController.java b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/patientexamlist/PatientexamlistController.java index 36ade8b21..49c5ac9e8 100644 --- a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/patientexamlist/PatientexamlistController.java +++ b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/patientexamlist/PatientexamlistController.java @@ -27,6 +27,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.error; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; @@ -118,16 +119,20 @@ public class PatientexamlistController { // 筛选条件: doList = pageResult.getList().stream() .filter(PatientexamlistDO -> (PatientexamlistDO.getDeviceType().contains("US"))) + .sorted(Comparator.comparing(PatientexamlistDO::getExamDate, Comparator.nullsLast(Comparator.reverseOrder()))) // 降序排序,null值排在后面 .collect(Collectors.toList()); } else if (devicetype != null && !devicetype.trim().isEmpty())//表示只查询影像的数据 { // 筛选条件: doList = pageResult.getList().stream() .filter(PatientexamlistDO -> !(PatientexamlistDO.getDeviceType().contains("US"))) + .sorted(Comparator.comparing(PatientexamlistDO::getExamDate, Comparator.nullsLast(Comparator.reverseOrder()))) // 降序排序,null值排在后面 .collect(Collectors.toList()); } else //devicetype为空,查询全部数据 { - doList = pageResult.getList(); + doList = pageResult.getList().stream() + .sorted(Comparator.comparing(PatientexamlistDO::getExamDate, Comparator.nullsLast(Comparator.reverseOrder()))) // 降序排序,null值排在后面 + .collect(Collectors.toList()); } pageResult.setList(doList); @@ -197,22 +202,25 @@ public class PatientexamlistController { @Parameter(name = "id", description = "编号", required = true, example = "1024") @Parameter(name = "orgId", description = "机构编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('tblist:patientexamlist:query')") - @LogRecord(type = "检查列表", subType = "申请", bizNo = "{{#id}}", success = "ID为{{#id}}的患者申请") - public void UPDATEHigOrg(@RequestParam("id") String id, @RequestParam("orgId") String orgId) { + @LogRecord(type = "检查列表", subType = "申请", bizNo = "999999", success = "ID为{{#id}}的患者申请") + public CommonResult UPDATEHigOrg(@RequestParam("id") String id, @RequestParam("orgId") String orgId) { //先拿orgid查询出来对应的org表的上级机构代码 String hiorgid = OrgService.GetOrgHiORGId(orgId); log.debug("查询出来对应的org表的上级机构代码" + hiorgid); - if (!hiorgid.isEmpty()) { + if (hiorgid!=null &&!hiorgid.isEmpty()) { PatientexamlistSaveReqVO updateReqVO = new PatientexamlistSaveReqVO(); updateReqVO.setId(id); updateReqVO.setHighLevelOrgId(hiorgid); - updateReqVO.setReportstatus("已申请"); updateReqVO.setApplicationDate(LocalDateTime.parse(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); patientexamlistService.updatePatientexamlist(updateReqVO); } - + else + { + return error(9999,"上级机构为空,请先设置上级机构"); + } + return success("申请成功"); } @PutMapping("/examineupdate")