From 916ef47a95bb8515f90b407dc80a96a804cc3a5e Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期二, 01 四月 2025 14:11:49 +0800
Subject: [PATCH] just comment
---
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/appointment/AppointmentServiceImpl.java | 24 +++++++++++++++---------
1 files changed, 15 insertions(+), 9 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 e6fdb12..254ea8e 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
@@ -73,7 +73,6 @@
AppointmentDO appointment = BeanUtils.toBean(createReqVO, AppointmentDO.class);
appointment.setBookTime( LocalDateTime.now() );
- appointment.setBookSrc( 1 );
try {
appointmentMapper.insert(appointment);
@@ -113,11 +112,10 @@
return appointmentMapper.selectById(id);
}
- // TODO 灏氫笉鏀寔, 涓�浣嶆偅鑰呭綋澶╀袱绉嶆鏌ラ」鐩殑鎯呭喌
@Override
- public AppointmentDO getCurAppointmentByPatId(String patId) {
- List<AppointmentDO> appointmentDOList = appointmentMapper.getCurrentPatId( patId );
- return 0 == appointmentDOList.size() ? null : appointmentDOList.get(0);
+ public AppointmentDO getCurAppointmentByPatIdAndCheckType(String patId, Integer checkType) {
+ AppointmentDO appointmentDO = appointmentMapper.getByPatAndCheckTypeAndBookDate( patId, checkType, LocalDate.now() );
+ return appointmentDO;
}
/**
@@ -135,11 +133,16 @@
continue;
// 浠嶥B鏌ヨ棰勭害锛屾槸鍚﹀凡缁忓瓨鍦�
- AppointmentDO appointmentDO = appointmentMapper.getByPatAndCheckTypeAndBookDate(appointmentExtermal.getPatId(), appointmentExtermal.getBookCheckType(), appointmentExtermal.getBookDate());
+ AppointmentDO appointmentDO = appointmentMapper.getByEpisodeIdAndApplyNo(appointmentExtermal.getEpisodeId(), appointmentExtermal.getApplyNo());
if (null == appointmentDO) {
appointmentMapper.insert(appointmentExtermal);
} else {
appointmentExtermal.setId( appointmentDO.getId() ); // 纭繚 杩斿洖鍊煎寘鍚� appointment id
+
+ // 澶勭悊绗竴娆$‘璁ゆ椂杩樻病鏈夐绾︽椂闂达紝鍐嶆潵纭鏃跺凡鏈夐绾︽椂闂寸殑鎯呭喌
+ if (appointmentDO.getBookDate() != appointmentExtermal.getBookDate()) {
+ appointmentMapper.updateById( appointmentExtermal );
+ }
}
}
@@ -187,6 +190,7 @@
AppointmentDO appointmentDO = BeanUtils.toBean(appointmentExternal, AppointmentDO.class);
appointmentDO.setApplyNo( appointmentExternal.getReqIdeApplyno() );
+ appointmentDO.setEpisodeId( appointmentExternal.getEpisodeID() );
appointmentDO.setPatSrc( getCorrespondingPatientSource(appointmentExternal.getAdmTypeCode()) );
appointmentDO.setPatId(appointmentExternal.getPatientID()); // 鍐呭涓� 韬唤璇佸彿 鎴� 闂ㄨ瘖浣忛櫌鍙�
appointmentDO.setPatName(appointmentExternal.getPatName());
@@ -200,9 +204,9 @@
appointmentDO.setPatWardDesc(appointmentExternal.getPatLocWardDesc());
appointmentDO.setPatMobile(appointmentExternal.getPhone());
appointmentDO.setPatBedNo(appointmentExternal.getEnBedno());
- appointmentDO.setBookId(appointmentExternal.getReqIdeApplyno());
appointmentDO.setBookCheckType(getCorrespondingCheckType(appointmentExternal.getPlanDefItemList().getPlanDefItem().getPlanDefItemcode()));
appointmentDO.setBookTime(DateUtils.ofUTC(appointmentExternal.getReqAuthoredOn())); // 寮�鍗曟椂闂�
+ appointmentDO.setBookSrc( 0 );
// 鍏夊紑鍗曠殑鎯呭喌锛屾病鏈夐绾︽椂闂�
if (null != appointmentExternal.getReqExtBooktime() ) {
@@ -212,8 +216,7 @@
appointmentDO.setBookTimeslot((bookStartTime.getHour() * 100 + bookStartTime.getMinute()) * 10000 + bookEndTime.getHour() * 100 + bookEndTime.getMinute());
}
- appointmentDO.setBookSrc(0);
- appointmentDO.setPaid(1);
+ appointmentDO.setPaid( 0 );
curAppointDOList.add( appointmentDO );
}
@@ -246,6 +249,8 @@
try {
QueueSaveReqVO queueSaveReqVO = new QueueSaveReqVO();
+ queueSaveReqVO.setApplyNo( appointment.getApplyNo() );
+ queueSaveReqVO.setEpisodeId( appointment.getEpisodeId() );
queueSaveReqVO.setAppointId(appointment.getId());
queueSaveReqVO.setPatId(appointment.getPatId());
queueSaveReqVO.setPatName(appointment.getPatName());
@@ -324,6 +329,7 @@
patDetails.setWardCode( appointment.getPatWardCode() );
patDetails.setWardDesc( appointment.getPatWardDesc() );
patDetails.setBedNo( appointment.getPatBedNo() );
+ patDetails.setSource( appointment.getPatSrc() );
return patDetails;
}
}
--
Gitblit v1.9.3