优化
This commit is contained in:
@@ -242,25 +242,20 @@ public class PatientInformationController {
|
||||
// 创建Page对象并设置属性
|
||||
Page<PatientInformationDto> patientInformationPage = new Page<>(pageNo, pageSize, total);
|
||||
patientInformationPage.setRecords(listPatients);
|
||||
|
||||
patientInformationPage.getRecords().forEach(e -> {
|
||||
// 性别枚举类回显赋值
|
||||
patientInformationPage.getRecords().forEach(
|
||||
e -> e.setGenderEnum_text(EnumUtils.getInfoByValue(AdministrativeGender.class, e.getGenderEnum())));
|
||||
e.setGenderEnum_text(EnumUtils.getInfoByValue(AdministrativeGender.class, e.getGenderEnum()));
|
||||
// 婚姻状态枚举类回显赋值
|
||||
patientInformationPage.getRecords().forEach(
|
||||
e -> e.setMaritalStatusEnum_text(EnumUtils.getInfoByValue(MaritalStatus.class, e.getMaritalStatusEnum())));
|
||||
e.setMaritalStatusEnum_text(EnumUtils.getInfoByValue(MaritalStatus.class, e.getMaritalStatusEnum()));
|
||||
// 职业编码枚举类回显赋值
|
||||
patientInformationPage.getRecords()
|
||||
.forEach(e -> e.setPrfsEnum_text(EnumUtils.getInfoByValue(OccupationType.class, e.getPrfsEnum())));
|
||||
e.setPrfsEnum_text(EnumUtils.getInfoByValue(OccupationType.class, e.getPrfsEnum()));
|
||||
// 血型ABO枚举类回显赋值
|
||||
patientInformationPage.getRecords()
|
||||
.forEach(e -> e.setBloodAbo_text(EnumUtils.getInfoByValue(BloodTypeABO.class, e.getBloodAbo())));
|
||||
e.setBloodAbo_text(EnumUtils.getInfoByValue(BloodTypeABO.class, e.getBloodAbo()));
|
||||
// 血型RH枚举类回显赋值
|
||||
patientInformationPage.getRecords()
|
||||
.forEach(e -> e.setBloodRh_text(EnumUtils.getInfoByValue(BloodTypeRH.class, e.getBloodRh())));
|
||||
e.setBloodRh_text(EnumUtils.getInfoByValue(BloodTypeRH.class, e.getBloodRh()));
|
||||
// 家庭关系枚举类回显赋值
|
||||
patientInformationPage.getRecords().forEach(e -> e
|
||||
.setLinkRelationCode_text(EnumUtils.getInfoByValue(FamilyRelationshipType.class, e.getLinkRelationCode())));
|
||||
e.setLinkRelationCode_text(EnumUtils.getInfoByValue(FamilyRelationshipType.class, e.getLinkRelationCode()));
|
||||
});
|
||||
return R.ok(patientInformationPage);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user