修改BUG

This commit is contained in:
lxd 2025-03-13 10:43:52 +08:00
parent e8b012a0b1
commit 54145e4be0

View File

@ -111,8 +111,12 @@ public class InspectPatientController {
patientInfoVO.setAge(String.valueOf(age));
patientInfoVO.setSex(patientDO.getGender());
// 使用 DateTimeFormatter 格式化 medicalDateTime
LocalDateTime medicalDateTime = patientDO.getMedicalDateTime();
if (medicalDateTime == null) {
medicalDateTime = LocalDateTime.now();
}
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
patientInfoVO.setKaifangsj(patientDO.getMedicalDateTime().format(formatter));
patientInfoVO.setKaifangsj(medicalDateTime.format(formatter));
patientInfoVO.setExamItemName("超声检查");
patientInfoVO.setExamItemCode("US00001");
}