From b22b13bcbcae91fc00500d73645962fd2a45e836 Mon Sep 17 00:00:00 2001 From: eight <641137800@qq.com> Date: 星期五, 08 十一月 2024 15:24:54 +0800 Subject: [PATCH] update --- jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/appointment/AppointmentController.java | 6 +++--- jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/appointment/AppointmentService.java | 2 +- jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/dataobject/appointment/AppointmentDO.java | 9 +++++++++ jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/appointment/AppointmentServiceImpl.java | 22 ++++++++++++++++++++-- 4 files changed, 33 insertions(+), 6 deletions(-) diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/appointment/AppointmentController.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/appointment/AppointmentController.java index 4bc8001..8eff24c 100644 --- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/appointment/AppointmentController.java +++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/appointment/AppointmentController.java @@ -103,9 +103,9 @@ @Operation(summary = "鏍规嵁鎮h�呯紪鍙�.鑾峰緱棰勭害.骞跺唴閮ㄥ垱寤洪绾�") @Parameter(name = "id", description = "缂栧彿", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('ecg:appointment:query')") - public CommonResult<AppointmentRespVO> queryAndCreateAppointmentByPatId(@RequestParam("patId") String patId) { - AppointmentDO appointment = appointmentService.queryAndCreateAppointmentByPatId( patId ); - return success(BeanUtils.toBean(appointment, AppointmentRespVO.class)); + public CommonResult<List<AppointmentRespVO>> queryAndCreateAppointmentByPatId(@RequestParam("patId") String patId) { + List<AppointmentDO> appointmentDOList = appointmentService.queryAndCreateAppointmentByPatId( patId ); + return success(BeanUtils.toBean(appointmentDOList, AppointmentRespVO.class)); } @GetMapping("/query-his-by-patient") diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/dataobject/appointment/AppointmentDO.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/dataobject/appointment/AppointmentDO.java index 5ef58b3..74a488b 100644 --- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/dataobject/appointment/AppointmentDO.java +++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/dataobject/appointment/AppointmentDO.java @@ -34,6 +34,15 @@ */ @TableId private Long id; + + /** + * 鐢宠缂栧彿 + */ + private String applyNo; + /** + * 鎮h�呮潵婧愮被鍨� 01闂瘖 02鎬ヨ瘖 03浣撴 04浣忛櫌 + */ + private Integer patSrc; /** * 鎮h�呯紪鍙� */ diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/appointment/AppointmentService.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/appointment/AppointmentService.java index 945f967..1823a35 100644 --- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/appointment/AppointmentService.java +++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/appointment/AppointmentService.java @@ -58,7 +58,7 @@ * @param patId 缂栧彿 * @return 棰勭害 */ - AppointmentDO queryAndCreateAppointmentByPatId(String patCode); + List<AppointmentDO> queryAndCreateAppointmentByPatId(String patCode); /** * 鑾峰緱棰勭害鍒嗛〉 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 0621eed..7e5ef71 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 @@ -114,14 +114,16 @@ } /** - * // TODO 灏氫笉鏀寔, 涓�浣嶆偅鑰呭綋澶╀袱绉嶆鏌ラ」鐩殑鎯呭喌 * @param patCode 缂栧彿 : !!! 涓嶄竴瀹氬氨鏄湰绯荤粺鐨� 鎮h�呯紪鍙�(patID), 鏍规簮鍦ㄤ簬 妫�鏌ュ崟鎵弿鍑烘潵鐨勭紪鍙� 涓嶄竴瀹氭槸 鏈郴缁熺殑 鎮h�呯紪鍙�(patID) * @return */ @Override - public AppointmentDO queryAndCreateAppointmentByPatId(String patCode) { + public List<AppointmentDO> queryAndCreateAppointmentByPatId(String patCode) { // 鍏堜粠鍖婚櫌骞冲彴鏌ヨ List<AppointmentDO> appointmentExtermalList = getAppointmentExtermal( patCode ); + return appointmentExtermalList; + +/* 鍏堜繚鐣� for ( int appointmentIndex = 0; appointmentIndex < appointmentExtermalList.size(); appointmentIndex++ ) { AppointmentDO appointmentExtermal = appointmentExtermalList.get(appointmentIndex); if (null != appointmentExtermal && null != appointmentExtermal.getBookDate() && appointmentExtermal.getBookDate().isEqual(LocalDate.now())) { @@ -137,6 +139,7 @@ List<AppointmentDO> appointmentDOList = appointmentMapper.getCurrentPatId( patCode ); return 0 == appointmentDOList.size() ? null : appointmentDOList.get(0); + */ } @Override @@ -165,6 +168,8 @@ AppointmentExternal appointmentExternal = result.getRow().get( appointIndex ); AppointmentDO appointmentDO = BeanUtils.toBean(appointmentExternal, AppointmentDO.class); + appointmentDO.setApplyNo( appointmentExternal.getReqIdeApplyno() ); + appointmentDO.setPatSrc( getCorrespondingPatientSource(appointmentExternal.getAdmTypeCode()) ); appointmentDO.setPatId(appointmentExternal.getPatientID()); // 鍐呭涓� 韬唤璇佸彿 鎴� 闂ㄨ瘖浣忛櫌鍙� appointmentDO.setPatName(appointmentExternal.getPatName()); appointmentDO.setPatGender(Byte.valueOf(appointmentExternal.getPatgender())); @@ -271,4 +276,17 @@ return 100; } + + private Integer getCorrespondingPatientSource(String admTypeCode) { + if (admTypeCode.equals("AMB")) + return 1; + else if (admTypeCode.equals("EMER")) + return 2; + else if (admTypeCode.equals("IMP")) + return 3; + else if (admTypeCode.equals("PHY")) + return 4; + + return 0; + } } \ No newline at end of file -- Gitblit v1.9.3