From a2a840d4969d680b30eeec184a7059fef64d0b84 Mon Sep 17 00:00:00 2001 From: liusheng <337615773@qq.com> Date: 星期五, 04 七月 2025 21:39:14 +0800 Subject: [PATCH] 代码提交 --- jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/appointment/AppointmentServiceImpl.java | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+), 0 deletions(-) diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/appointment/AppointmentServiceImpl.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/appointment/AppointmentServiceImpl.java index 4badfac..dc75d22 100644 --- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/appointment/AppointmentServiceImpl.java +++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/appointment/AppointmentServiceImpl.java @@ -20,6 +20,7 @@ import cn.lihu.jh.module.ecg.service.queuesequence.QueueSequenceService; import cn.lihu.jh.module.ecg.webservice.WebServiceClient; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; import org.apache.ibatis.annotations.Param; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.dao.DuplicateKeyException; @@ -32,6 +33,7 @@ import java.time.LocalDate; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; +import java.util.Date; import java.util.List; import java.util.Map; import java.util.Optional; @@ -199,6 +201,29 @@ @Override public PageResult<AppointmentDO> getAppointmentPage(AppointmentPageReqVO pageReqVO) { + //1. 鍏堟牴鎹畃atId鍘绘煡 + PageResult<AppointmentDO> result = appointmentMapper.selectPage(pageReqVO); + log.info("--------------PATID result鐨勫�间负锛歿}", result); + if (!result.getList().isEmpty()) { + return result; + } + + if (StringUtils.isNotEmpty(pageReqVO.getPatId())) { + // 2. 鐢� applyNo 鏌ヨ + pageReqVO.setApplyNo(pageReqVO.getPatId()); + pageReqVO.setPatId(null); + log.info("------------------ApplyNo pageReqVO鐨勫�间负锛歿}", pageReqVO); + result = appointmentMapper.selectPage(pageReqVO); + if (!result.getList().isEmpty()) { + return result; + } + + // 3. 鐢� episodeId 鏌ヨ + pageReqVO.setEpisodeId(pageReqVO.getApplyNo()); + pageReqVO.setPatId(null); + pageReqVO.setApplyNo(null); + log.info("-----------EpisodeId pageReqVO鐨勫�间负锛歿}", pageReqVO); + } return appointmentMapper.selectPage(pageReqVO); } @@ -564,6 +589,9 @@ String status = Optional.ofNullable(dataMap.get("controlActProcess")).map(controlActProcess -> (Map<String, Object>) controlActProcess).map(controlActProcess -> (Map<String, Object>) controlActProcess.get("subject")).map(subject -> (Map<String, Object>) subject.get("placerGroup")).map(placerGroup -> (Map<String, Object>) placerGroup.get("component2")).map(component2 -> (Map<String, Object>) component2.get("observationRequest")).map(observationRequest -> (Map<String, Object>) observationRequest.get("component1")).map(component1 -> (Map<String, Object>) component1.get("processStep")).map(processStep -> (Map<String, Object>) processStep.get("code")).map(code -> (String) code.get("code")).orElseThrow(() -> exception(APPOINTMENT_CREATE_FAIL)); existingAppointment.setStatus(status); + if ("3".equals(status)) { + existingAppointment.setRegisterDate(new Date()); + } // 灏咥ppointmentDO杞崲涓篈ppointmentSaveReqVO骞舵洿鏂� AppointmentSaveReqVO updateReqVO = BeanUtils.toBean(existingAppointment, AppointmentSaveReqVO.class); updateAppointment(updateReqVO); -- Gitblit v1.9.3