From 51cd82211d497269fb1af9b7f60e67d308683711 Mon Sep 17 00:00:00 2001 From: liuhongrui Date: Thu, 20 Mar 2025 13:55:18 +0800 Subject: [PATCH] =?UTF-8?q?UP=20=E8=8D=AF=E5=93=81=E7=8A=B6=E6=80=81check?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/OutpatientInfusionRecordServiceImpl.java | 9 ++++++++- .../dto/OutpatientInfusionPatientDto.java | 2 +- .../mapper/outpatientmanage/OutpatientManageMapper.xml | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/appservice/impl/OutpatientInfusionRecordServiceImpl.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/appservice/impl/OutpatientInfusionRecordServiceImpl.java index 4822b88e..a8c0dcc4 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/appservice/impl/OutpatientInfusionRecordServiceImpl.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/appservice/impl/OutpatientInfusionRecordServiceImpl.java @@ -87,7 +87,7 @@ public class OutpatientInfusionRecordServiceImpl implements IOutpatientInfusionR // 性别 e.setGenderEnum_enumText(EnumUtils.getInfoByValue(AdministrativeGender.class, e.getGenderEnum())); // 计算年龄 - e.setAgeString(AgeCalculatorUtil.getAge(e.getBirthDate())); + e.setAgeString(AgeCalculatorUtil.getAge(DateUtils.parseDate(e.getBirthDate()))); }); return outpatientInfusionPatientDto; @@ -161,6 +161,13 @@ public class OutpatientInfusionRecordServiceImpl implements IOutpatientInfusionR // 构造批量插入的 ServiceRequest 列表 List serviceRequests = new ArrayList<>(); for (OutpatientInfusionRecordDto record : groupRecords) { + + //判断当前组药品状态不是已领药,有未领药的数据,跳过执行下一组数据 + if(record.getMedicationStatusEnum() != EventStatus.COMPLETED.getValue()){ + // 跳过当前分组的剩余处理,继续下一个分组 + break; + } + String prefixBusNo = record.getBusNo() + "." + record.getGroupId() + "." + record.getMedicationId(); // 获取执行次数 Long exeCount = diff --git a/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/dto/OutpatientInfusionPatientDto.java b/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/dto/OutpatientInfusionPatientDto.java index 30797d28..752e2031 100644 --- a/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/dto/OutpatientInfusionPatientDto.java +++ b/openhis-server/openhis-application/src/main/java/com/openhis/web/outpatientmanage/dto/OutpatientInfusionPatientDto.java @@ -42,7 +42,7 @@ public class OutpatientInfusionPatientDto { private String genderEnum_enumText; /** 病人生日 */ - private Date birthDate; + private String birthDate; /** 病人身份证号 */ private String idCard; diff --git a/openhis-server/openhis-application/src/main/resources/mapper/outpatientmanage/OutpatientManageMapper.xml b/openhis-server/openhis-application/src/main/resources/mapper/outpatientmanage/OutpatientManageMapper.xml index 097dd5db..8c1f76d8 100644 --- a/openhis-server/openhis-application/src/main/resources/mapper/outpatientmanage/OutpatientManageMapper.xml +++ b/openhis-server/openhis-application/src/main/resources/mapper/outpatientmanage/OutpatientManageMapper.xml @@ -151,7 +151,7 @@ sr.prescription_no, --处方号 sr.encounter_id, e.bus_no as encounter_bus_no, --就诊号 - pt.birth_date , --病人生日 + TO_CHAR(pt.birth_date, 'YYYY-MM-DD') AS birth_date , --病人生日 pt.bus_no AS patient_bus_no, --病人ID(前台显示用) sr.patient_id, --病人ID pt.name AS patient_name, --病人姓名