From d40cde3bca854c21c869cb35d25ece4aa7dac265 Mon Sep 17 00:00:00 2001 From: eight <641137800@qq.com> Date: 星期四, 10 四月 2025 16:43:34 +0800 Subject: [PATCH] 检查记录 排除 未检查的记录 --- jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/appointment/AppointmentServiceImpl.java | 26 +++++++++----------------- 1 files changed, 9 insertions(+), 17 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 1eff7cd..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 @@ -133,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 ); + } } } @@ -199,10 +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( getBookSource(appointmentExternal.getAdmTypeCode()) ); + appointmentDO.setBookSrc( 0 ); // 鍏夊紑鍗曠殑鎯呭喌锛屾病鏈夐绾︽椂闂� if (null != appointmentExternal.getReqExtBooktime() ) { @@ -245,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()); @@ -263,19 +269,6 @@ } return newSeqNo; - } - - private Integer getBookSource(String admTypeCode) { - if (admTypeCode.equals("AMB")) // 闂ㄨ瘖 - return 1; - else if (admTypeCode.equals("EMER")) // 鎬ヨ瘖 - return 2; - else if (admTypeCode.equals("PHY")) // 浣撴 - return 3; - else if (admTypeCode.equals("IMP")) // 浣忛櫌 - return 4; - - return 1; } private Integer getCorrespondingCheckType(String strPlanDefItemcode) { @@ -337,7 +330,6 @@ patDetails.setWardDesc( appointment.getPatWardDesc() ); patDetails.setBedNo( appointment.getPatBedNo() ); patDetails.setSource( appointment.getPatSrc() ); - patDetails.setApplyNo( appointment.getApplyNo() ); return patDetails; } } -- Gitblit v1.9.3