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); }