From 5c1bc76dee102ef37886548b9dcbfba114f8d14e Mon Sep 17 00:00:00 2001 From: "Wang.Huan" Date: Mon, 3 Mar 2025 14:50:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PatientInformationController.java | 33 ++++++++----------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/patientmanage/controller/PatientInformationController.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/patientmanage/controller/PatientInformationController.java index 7998e2dc..8e6d6ff7 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/patientmanage/controller/PatientInformationController.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/patientmanage/controller/PatientInformationController.java @@ -242,25 +242,20 @@ public class PatientInformationController { // 创建Page对象并设置属性 Page patientInformationPage = new Page<>(pageNo, pageSize, total); patientInformationPage.setRecords(listPatients); - - // 性别枚举类回显赋值 - patientInformationPage.getRecords().forEach( - e -> e.setGenderEnum_text(EnumUtils.getInfoByValue(AdministrativeGender.class, e.getGenderEnum()))); - // 婚姻状态枚举类回显赋值 - patientInformationPage.getRecords().forEach( - e -> e.setMaritalStatusEnum_text(EnumUtils.getInfoByValue(MaritalStatus.class, e.getMaritalStatusEnum()))); - // 职业编码枚举类回显赋值 - patientInformationPage.getRecords() - .forEach(e -> e.setPrfsEnum_text(EnumUtils.getInfoByValue(OccupationType.class, e.getPrfsEnum()))); - // 血型ABO枚举类回显赋值 - patientInformationPage.getRecords() - .forEach(e -> e.setBloodAbo_text(EnumUtils.getInfoByValue(BloodTypeABO.class, e.getBloodAbo()))); - // 血型RH枚举类回显赋值 - patientInformationPage.getRecords() - .forEach(e -> e.setBloodRh_text(EnumUtils.getInfoByValue(BloodTypeRH.class, e.getBloodRh()))); - // 家庭关系枚举类回显赋值 - patientInformationPage.getRecords().forEach(e -> e - .setLinkRelationCode_text(EnumUtils.getInfoByValue(FamilyRelationshipType.class, e.getLinkRelationCode()))); + patientInformationPage.getRecords().forEach(e -> { + // 性别枚举类回显赋值 + e.setGenderEnum_text(EnumUtils.getInfoByValue(AdministrativeGender.class, e.getGenderEnum())); + // 婚姻状态枚举类回显赋值 + e.setMaritalStatusEnum_text(EnumUtils.getInfoByValue(MaritalStatus.class, e.getMaritalStatusEnum())); + // 职业编码枚举类回显赋值 + e.setPrfsEnum_text(EnumUtils.getInfoByValue(OccupationType.class, e.getPrfsEnum())); + // 血型ABO枚举类回显赋值 + e.setBloodAbo_text(EnumUtils.getInfoByValue(BloodTypeABO.class, e.getBloodAbo())); + // 血型RH枚举类回显赋值 + e.setBloodRh_text(EnumUtils.getInfoByValue(BloodTypeRH.class, e.getBloodRh())); + // 家庭关系枚举类回显赋值 + e.setLinkRelationCode_text(EnumUtils.getInfoByValue(FamilyRelationshipType.class, e.getLinkRelationCode())); + }); return R.ok(patientInformationPage); }